英文:
Implementing M3 in RascalMPL
问题
我如何实现一个M3模型(关系和AST)用于任何编程语言,我已经看过《M3:Rascal中源代码分析的通用模型》的文章,我大致了解了其中的内容,但我如何实际实现一个(比如说SQL)。还有任何资源将不胜感激,谢谢。
英文:
How can I implement an M3 model (relation & AST) for any language, I have looked at the "M3: A General Model for Source Code Analytics in Rascal" and I get the gist of it but how can I actually implement one (for let's say SQL). Also any resource would be greatly appreciated, thanks.
答案1
得分: 0
以下是翻译好的部分:
总的来说,M3论文 是该设计的高层描述。
如何实现一个新的模型取决于您的源数据和您想要建模的语言类型。有时我们使用Rascal来恢复所有数据,有时我们使用现有的库/解析器来恢复数据。
一个例子是ClaiR - Rascal中的C语言分析 M3库。它主要使用eclipse cdt来获取大部分数据。
英文:
In general, that M3 paper is the high level description of the design.
How to implement a new one, depends on both your source data and what kind of language you want to model. Sometimes we recover all data using Rascal, sometimes we use an existing library/parser to recover the data.
An example is the ClaiR - C Language Analysis in Rascal m3 library. Which uses the eclipse cdt for most of the data.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论