DESIGN AND IMPLEMENTATION OF A LANGUAGE SCANNER GENERATOR (KnitAutoGen)

B. Chile-Agada, N. M. Offiong, M. Adehi
{"title":"DESIGN AND IMPLEMENTATION OF A LANGUAGE SCANNER GENERATOR (KnitAutoGen)","authors":"B. Chile-Agada, N. M. Offiong, M. Adehi","doi":"10.7176/cti/8-02","DOIUrl":null,"url":null,"abstract":"The need for fast, efficient and simple scanner generator that has the primary responsibility to perform efficiently gave rise to this paper. This is due to the fact that, on daily basis new technologies arise which brings a great improvement on the design of computer architecture. However, attention was given to speed, run time and resource availability of the design machine to be used since lexical analysis has an impact on how the compiler works. This paper seeks to develop a lexical analyzer (scanner generator) automatically by specifying the lexemes patterns to a lexical analyzer generator and compiling those patterns into a code that functions as a lexical analyzer. The scanner accepts characters as input and breaks them down to produce tokens by grouping the characters and not deviating from specifications. The project employs one of the different methods of lexical analyzer generator to perform pattern-matching on text using regular expression over a global character set. The paper shows how input is matched and specifies what to do when a pattern is matched. This was achieved with the use of regular expressions (RE) which were converted to non-deterministic finite automata (NFA) or deterministic finite automata (DFA). The regular expression and the regular grammar were thus joined together mathematically. Various results are presented and further work on micro compilers was proposed. Keyword: Scanner generator, Regular expression, KnitAutoGen, DFA, NFA. DOI : 10.7176/CTI/8-02","PeriodicalId":437485,"journal":{"name":"Control Theory and Informatics","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1900-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Control Theory and Informatics","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.7176/cti/8-02","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

The need for fast, efficient and simple scanner generator that has the primary responsibility to perform efficiently gave rise to this paper. This is due to the fact that, on daily basis new technologies arise which brings a great improvement on the design of computer architecture. However, attention was given to speed, run time and resource availability of the design machine to be used since lexical analysis has an impact on how the compiler works. This paper seeks to develop a lexical analyzer (scanner generator) automatically by specifying the lexemes patterns to a lexical analyzer generator and compiling those patterns into a code that functions as a lexical analyzer. The scanner accepts characters as input and breaks them down to produce tokens by grouping the characters and not deviating from specifications. The project employs one of the different methods of lexical analyzer generator to perform pattern-matching on text using regular expression over a global character set. The paper shows how input is matched and specifies what to do when a pattern is matched. This was achieved with the use of regular expressions (RE) which were converted to non-deterministic finite automata (NFA) or deterministic finite automata (DFA). The regular expression and the regular grammar were thus joined together mathematically. Various results are presented and further work on micro compilers was proposed. Keyword: Scanner generator, Regular expression, KnitAutoGen, DFA, NFA. DOI : 10.7176/CTI/8-02
语言扫描器生成器(KnitAutoGen)的设计与实现
对快速、高效和简单的扫描器生成器的需求,使其具有高效执行的主要责任,从而产生了本文。这是因为,每天都有新技术出现,这给计算机体系结构的设计带来了很大的改进。但是,由于词法分析对编译器的工作方式有影响,因此要注意要使用的设计机器的速度、运行时间和资源可用性。本文试图通过向词法分析器生成器指定词法模式并将这些模式编译成作为词法分析器的代码来自动开发一个词法分析器(扫描器生成器)。扫描器接受字符作为输入,并通过对字符进行分组而不偏离规范来分解它们以生成令牌。该项目使用词法分析器生成器的一种不同方法,在全局字符集上使用正则表达式对文本执行模式匹配。本文展示了输入是如何匹配的,并指定了匹配模式时要做什么。这是通过使用正则表达式(RE)实现的,正则表达式被转换为非确定性有限自动机(NFA)或确定性有限自动机(DFA)。因此,正则表达式和正则语法在数学上结合在一起。给出了各种结果,并对微编译器的进一步研究提出了建议。关键词:扫描器生成器,正则表达式,KnitAutoGen, DFA, NFA。Doi: 10.7176/ cti /8-02
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信