The Development of Lexer and Parser as Parts of Compiler for GAMA32 Processor’s Instruction-set using Python

Willy Jordan, Agus Bejo, A. G. Persada
{"title":"The Development of Lexer and Parser as Parts of Compiler for GAMA32 Processor’s Instruction-set using Python","authors":"Willy Jordan, Agus Bejo, A. G. Persada","doi":"10.1109/ISRITI48646.2019.9034617","DOIUrl":null,"url":null,"abstract":"At this time, there are many products based on embedded systems, each of these products requires an embedded processor. This results in high demand for embedded processors. Therefore, we need a tool that is able to design an embedded processor completely with its software development tool. One of the embedded processor that is developed is GAMA32 processor. GAMA32 processor is a 32-bit embedded processor designed using System C Model. Its processor architecture is General Purpose Processor (GPP). GAMA32 processor has its own software development tool, but it has no compiler. The most common used compiler is open source compiler like GNU Compiler Collection (GCC) and Low Level Virtual Machine (LLVM). However, this two open source compilers are not compatible with GAMA32 processor because their complexity. In this research, a simple and flexible compiler will be developed, especially the Abstract Syntax Tree (AST) generator part using Python library rPLY and the AST’s output is in the format of JavaScript Object Notation (JSON). For testing the result of AST generator, 5 statement patterns are used namely if, if-else, while, do-while, and for patterns with initial value, and data type declaration as well. The test results show that the correct AST can be produced from the patterns used.","PeriodicalId":367363,"journal":{"name":"2019 International Seminar on Research of Information Technology and Intelligent Systems (ISRITI)","volume":"5 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2019 International Seminar on Research of Information Technology and Intelligent Systems (ISRITI)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ISRITI48646.2019.9034617","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2

Abstract

At this time, there are many products based on embedded systems, each of these products requires an embedded processor. This results in high demand for embedded processors. Therefore, we need a tool that is able to design an embedded processor completely with its software development tool. One of the embedded processor that is developed is GAMA32 processor. GAMA32 processor is a 32-bit embedded processor designed using System C Model. Its processor architecture is General Purpose Processor (GPP). GAMA32 processor has its own software development tool, but it has no compiler. The most common used compiler is open source compiler like GNU Compiler Collection (GCC) and Low Level Virtual Machine (LLVM). However, this two open source compilers are not compatible with GAMA32 processor because their complexity. In this research, a simple and flexible compiler will be developed, especially the Abstract Syntax Tree (AST) generator part using Python library rPLY and the AST’s output is in the format of JavaScript Object Notation (JSON). For testing the result of AST generator, 5 statement patterns are used namely if, if-else, while, do-while, and for patterns with initial value, and data type declaration as well. The test results show that the correct AST can be produced from the patterns used.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
用Python开发GAMA32处理器指令集编译器中的词法分析器和解析器
此时,有许多基于嵌入式系统的产品,这些产品中的每一个都需要一个嵌入式处理器。这导致了对嵌入式处理器的高需求。因此,我们需要一种能够完整地设计嵌入式处理器的软件开发工具。开发的嵌入式处理器之一是GAMA32处理器。GAMA32处理器是采用System C模型设计的32位嵌入式处理器。其处理器架构为通用处理器(General Purpose processor, GPP)。GAMA32处理器有自己的软件开发工具,但没有编译器。最常用的编译器是像GNU compiler Collection (GCC)和Low Level Virtual Machine (LLVM)这样的开源编译器。然而,这两个开源编译器由于其复杂性而与GAMA32处理器不兼容。在本研究中,将开发一个简单灵活的编译器,特别是使用Python库rPLY的抽象语法树(AST)生成器部分,AST的输出格式为JavaScript Object Notation (JSON)。为了测试AST生成器的结果,使用了5种语句模式,即if、if-else、while、do-while,以及具有初始值的模式和数据类型声明。测试结果表明,使用的模式可以生成正确的AST。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
TrendiTex: An Intelligent Fashion Designer Pair Extraction of Aspect and Implicit Opinion Word based on its Co-occurrence in Corpus of Bahasa Indonesia Parameter Tuning of G-mapping SLAM (Simultaneous Localization and Mapping) on Mobile Robot with Laser-Range Finder 360° Sensor ISRITI 2019 Committees Network Architecture Design of Indonesia Research and Education Network (IDREN)
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1