摘要
针对特定域语言(DSL)的定义问题,提出了一种基于对象的语言构造方法,该方法将特定域语言语义划分为领域相关语义和领域无关语义,针对领域相关语义,采用对象将其封装,并通过视图对象和模型对象分别完成领域相关语义的定义与解释;针对领域无关语义,利用现有语言开发工具,直接定义并生成语言基本特性的解释模块,最后将对象和语言基本特性相集成,从而完成DSL的定义与实现.采用基于对象的构造方法可迅速地定义DSL,且具有较强的扩展性.
This paper aims at giving out a guideline for defining a DSL( Domain Specific Language) by presenting a language constructing method based on Objects. DSL semantics is analyzed and decomposed into Domain Specific Semantics and Domain Independent Semantics, and then objects are employed to encapsulate the former. View objects and model objects are used to define and interpret the Domain Specific Semantics, and language tools are used to generate the general features of a language. Then objects and general language features are combined and a DSL is constructed. This method makes the DSL constructing process rapid and clear, and more expandability can be achieved. DSL developers can implement the DSL interpreter by efficiently incorporating this method with language tools.
出处
《西安电子科技大学学报》
EI
CAS
CSCD
北大核心
2006年第1期80-84,共5页
Journal of Xidian University
基金
国家教育部博士点基金(20030701009)
"十五"国家部委预研项目(41306060106)
关键词
基于对象
特定域语言
语言构造方法
特定域语言语义
object based
domain specific language
language constructing method
DSL semantics