网站首页
编程语言
数据库
系统相关
其他分享
编程问答
textx
2024-08-04
textx 模型的类型检查
我正在尝试使用python的textx模块来解释语法的语言原型。我正在创建一个像这样的模型:fromtextximportmetamodel_from_strfunl_grammar="""Model:statement*=Statement;Statement:FunctionDefinition|Function;FunctionDefinition:name=ID