【发布时间】:2014-08-24 08:52:43
【问题描述】:
我有这个 pegjs 语法。 如何删除左递归?
atom = term
/ "^"
/ "_"
/ "\\"
/ atom "."
/ atom "." label
/ atom ".(" labels ")"
term = [a-zA-Z0-9]+
labels = label ("|" label)*
label = ("+" / "-")* [A-Za-z0-9]+
【问题讨论】: