{"title":"基于元模型的Python语言定义","authors":"Sergej Chodarev, Sharoon Ilyas","doi":"10.58245/ipsi.tir.2301.06","DOIUrl":null,"url":null,"abstract":"Most of the parser tools are concentrated on concrete syntax and grammar definition. This paper describes a language definition tool that uses a metamodel specification instead of grammar as the basis of the language definition. Inspired by a similar Java tool known as YAJCo, the metamodel is defined using usual object-oriented techniques—as classes in the Python programming language, and the result of the parsing process is a graph of objects. The tool is demonstrated in a case study of a simple imperative programming language. We explain our design decisions and also demonstrate the suitability of a dynamic language such, as Python, for this task.","PeriodicalId":41192,"journal":{"name":"IPSI BgD Transactions on Internet Research","volume":"9 1","pages":""},"PeriodicalIF":0.4000,"publicationDate":"2023-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Metamodel-based Language Definition with Python\",\"authors\":\"Sergej Chodarev, Sharoon Ilyas\",\"doi\":\"10.58245/ipsi.tir.2301.06\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Most of the parser tools are concentrated on concrete syntax and grammar definition. This paper describes a language definition tool that uses a metamodel specification instead of grammar as the basis of the language definition. Inspired by a similar Java tool known as YAJCo, the metamodel is defined using usual object-oriented techniques—as classes in the Python programming language, and the result of the parsing process is a graph of objects. The tool is demonstrated in a case study of a simple imperative programming language. We explain our design decisions and also demonstrate the suitability of a dynamic language such, as Python, for this task.\",\"PeriodicalId\":41192,\"journal\":{\"name\":\"IPSI BgD Transactions on Internet Research\",\"volume\":\"9 1\",\"pages\":\"\"},\"PeriodicalIF\":0.4000,\"publicationDate\":\"2023-01-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"IPSI BgD Transactions on Internet Research\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.58245/ipsi.tir.2301.06\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q4\",\"JCRName\":\"COMPUTER SCIENCE, INFORMATION SYSTEMS\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"IPSI BgD Transactions on Internet Research","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.58245/ipsi.tir.2301.06","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"COMPUTER SCIENCE, INFORMATION SYSTEMS","Score":null,"Total":0}
Most of the parser tools are concentrated on concrete syntax and grammar definition. This paper describes a language definition tool that uses a metamodel specification instead of grammar as the basis of the language definition. Inspired by a similar Java tool known as YAJCo, the metamodel is defined using usual object-oriented techniques—as classes in the Python programming language, and the result of the parsing process is a graph of objects. The tool is demonstrated in a case study of a simple imperative programming language. We explain our design decisions and also demonstrate the suitability of a dynamic language such, as Python, for this task.