基于Meta建模的自适应符号表管理及符号表结构生成
Adaptable Symbol Table Management by Meta Modeling and Generation of Symbol Table Infrastructures
摘要:
许多文本软件语言共享共同的概念,例如定义和引用元素,约束名称可见性的层次结构,以及允许不同元素类型使用相同的名称。符号表对于处理这些引用和可见性概念非常有用。然而,开发符号表可能是一项乏味的任务,这会导致语言工程师付出额外的努力。本文提出了一个符号表Meta模型,用于定义特定语言的符号表。此外,我们将这个符号表Meta模型与基于语法的语言定义的Meta模型相结合。这使得语言工程师能够根据需要在模型结构和符号表之间切换。最后,基于一个grammarannotation机制,我们的方法是能够生成一个符号表的基础设施,可以使用的是或作为自定义符号表的基础。
英文摘要:
Many textual software languages share common concepts such as defining and referencing elements, hierarchical structures constraining the visibility of names, and allowing for identical names for different element kinds. Symbol tables are useful to handle those reference and visibility concepts. However, developing a symbol table can be a tedious task that leads to an additional effort for the language engineer. This paper presents a symbol table meta model usable to define languagespecific symbol tables. Furthermore, we integrate this symbol table meta model with a meta model of a grammar-based language definition. This enables the language engineer to switch between the model structure and the symbol table as needed. Finally, based on a grammarannotation mechanism, our approach is able to generate a symbol table infrastructure that can be used as is or serve as a basis for custom symbol tables.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。