Generating Tokenizers with Flat Automata

H. D. Nivelle, Dina Muktubayeva
{"title":"Generating Tokenizers with Flat Automata","authors":"H. D. Nivelle, Dina Muktubayeva","doi":"10.4204/EPTCS.370.5","DOIUrl":null,"url":null,"abstract":"We introduce flat automata for automatic generation of tokenizers. Flat automata are a simple representation of standard finite automata. Using the flat representation, automata can be easily constructed, combined and printed. Due to the use of border functions, flat automata are more compact than standard automata in the case where intervals of characters are attached to transitions, and the standard algorithms on automata are simpler. We give the standard algorithms for tokenizer construction with automata, namely construction using regular operations, determinization, and minimization. We prove their correctness. The algorithms work with intervals of characters, but are not more complicated than their counterparts on single characters. It is easy to generate C++ code from the final deterministic automaton. All procedures have been implemented in C++ and are publicly available. The implementation has been used in applications and in teaching.","PeriodicalId":104855,"journal":{"name":"International Symposium on Games, Automata, Logics and Formal Verification","volume":"35 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-09-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"International Symposium on Games, Automata, Logics and Formal Verification","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4204/EPTCS.370.5","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

We introduce flat automata for automatic generation of tokenizers. Flat automata are a simple representation of standard finite automata. Using the flat representation, automata can be easily constructed, combined and printed. Due to the use of border functions, flat automata are more compact than standard automata in the case where intervals of characters are attached to transitions, and the standard algorithms on automata are simpler. We give the standard algorithms for tokenizer construction with automata, namely construction using regular operations, determinization, and minimization. We prove their correctness. The algorithms work with intervals of characters, but are not more complicated than their counterparts on single characters. It is easy to generate C++ code from the final deterministic automaton. All procedures have been implemented in C++ and are publicly available. The implementation has been used in applications and in teaching.
用平面自动机生成标记器
我们引入了用于自动生成标记器的平面自动机。平面自动机是标准有限自动机的一种简单表示。使用平面表示,自动机可以很容易地构造、组合和打印。由于边界函数的使用,在字符间隔附加到转换的情况下,平面自动机比标准自动机更紧凑,并且自动机的标准算法更简单。我们给出了带有自动机的标记器构造的标准算法,即使用规则操作、确定和最小化的构造。我们证明了它们的正确性。这些算法可以处理字符间隔,但并不比处理单个字符的算法复杂。从最终的确定性自动机生成c++代码是很容易的。所有的程序都是用c++实现的,并且是公开的。该方法已在实际应用和教学中得到了应用。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术文献互助群
群 号:481959085
Book学术官方微信