{"title":"用Python开发GAMA32处理器指令集编译器中的词法分析器和解析器","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":"{\"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}","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}
The Development of Lexer and Parser as Parts of Compiler for GAMA32 Processor’s Instruction-set using Python
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.