在编译器设计中对高效词法分析的考虑

∗. AlexandraB˘AICOIANU, Ioana Plajer
{"title":"在编译器设计中对高效词法分析的考虑","authors":"∗. AlexandraB˘AICOIANU, Ioana Plajer","doi":"10.31926/but.mif.2023.3.65.2.14","DOIUrl":null,"url":null,"abstract":"Each programming language needs a mechanism of translating source code into code understood by the computer, i.e., machine code or assembly. This is done by a compiler. A compiler is thus a fundamental tool for software development. Lexical analysis, as the first step of compilation, has an important role and should be performed in an optimal way. But not only compilers rely on lexical analysis. Its role lies nowadays also in pattern recognition or natural language processing. In this paper, we present some of the main aspects of lexical analysis and how to efficiently perform it. Our aim is to offer some guidelines in constructing a modern and efficient scanner (lexer), outlining the criteria, which should be considered, presenting some pitfalls, and comparing existent tools for compiler construction. The main contribution of the paper is to offer practical guidelines and recommendations, especially to graduate students and programmers, in constructing an efficient scanner (lexer), considering also the proper tools currently available.","PeriodicalId":505295,"journal":{"name":"Bulletin of the Transilvania University of Brasov. Series III: Mathematics and Computer Science","volume":"339 ","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2023-12-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Considerations on efficient lexical analysis in the context of compiler design\",\"authors\":\"∗. AlexandraB˘AICOIANU, Ioana Plajer\",\"doi\":\"10.31926/but.mif.2023.3.65.2.14\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Each programming language needs a mechanism of translating source code into code understood by the computer, i.e., machine code or assembly. This is done by a compiler. A compiler is thus a fundamental tool for software development. Lexical analysis, as the first step of compilation, has an important role and should be performed in an optimal way. But not only compilers rely on lexical analysis. Its role lies nowadays also in pattern recognition or natural language processing. In this paper, we present some of the main aspects of lexical analysis and how to efficiently perform it. Our aim is to offer some guidelines in constructing a modern and efficient scanner (lexer), outlining the criteria, which should be considered, presenting some pitfalls, and comparing existent tools for compiler construction. The main contribution of the paper is to offer practical guidelines and recommendations, especially to graduate students and programmers, in constructing an efficient scanner (lexer), considering also the proper tools currently available.\",\"PeriodicalId\":505295,\"journal\":{\"name\":\"Bulletin of the Transilvania University of Brasov. Series III: Mathematics and Computer Science\",\"volume\":\"339 \",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-12-18\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Bulletin of the Transilvania University of Brasov. Series III: Mathematics and Computer Science\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.31926/but.mif.2023.3.65.2.14\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Bulletin of the Transilvania University of Brasov. Series III: Mathematics and Computer Science","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.31926/but.mif.2023.3.65.2.14","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

每种编程语言都需要一种机制,将源代码翻译成计算机能理解的代码,即机器码或汇编。这项工作由编译器完成。因此,编译器是软件开发的基本工具。作为编译的第一步,词法分析具有重要作用,并应以最佳方式进行。但并非只有编译器依赖于词法分析。如今,词法分析还在模式识别或自然语言处理中发挥作用。在本文中,我们将介绍词法分析的一些主要方面以及如何有效地进行词法分析。我们的目的是为构建现代、高效的扫描器(词法分析器)提供一些指导,概述应考虑的标准,提出一些陷阱,并比较现有的编译器构建工具。本文的主要贡献在于提供实用的指南和建议,特别是向研究生和程序员提供构建高效扫描器(词法)的指南和建议,同时考虑到目前可用的适当工具。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Considerations on efficient lexical analysis in the context of compiler design
Each programming language needs a mechanism of translating source code into code understood by the computer, i.e., machine code or assembly. This is done by a compiler. A compiler is thus a fundamental tool for software development. Lexical analysis, as the first step of compilation, has an important role and should be performed in an optimal way. But not only compilers rely on lexical analysis. Its role lies nowadays also in pattern recognition or natural language processing. In this paper, we present some of the main aspects of lexical analysis and how to efficiently perform it. Our aim is to offer some guidelines in constructing a modern and efficient scanner (lexer), outlining the criteria, which should be considered, presenting some pitfalls, and comparing existent tools for compiler construction. The main contribution of the paper is to offer practical guidelines and recommendations, especially to graduate students and programmers, in constructing an efficient scanner (lexer), considering also the proper tools currently available.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
CiteScore
0.70
自引率
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学术官方微信