我如何防止结构规则中的",“字面被解析为以下用于Instaparse的EBNF语法中的运算符?
语法:
structure = atom <"("> term ("," term)* <")">
term = atom | number | structure | variable | "(" term ")" | term operator term
operator = "," | ";" | "\\=" | "=="发布于 2018-06-03 21:20:01
像您一样使用逗号作为分隔符和运算符会使逗号上下文敏感,而Ebnf本身无法处理这一问题。
https://stackoverflow.com/questions/50660298
复制相似问题