E302 Form that does not fit the ruleΒΆ
A rule carries a form that its kind does not have, two that exclude each other, or a form where it cannot stand:
a terminal cannot be transparent with
?, since it produces one token and never a node, and an inlined rule_namecannot, since it never produces a node of its own,a terminal cannot be
@lexical, since lexical rules produce nodes,an alternative of a terminal cannot have an alias
->, since there is no node to name,only a terminal can be
@reserved,only a terminal can have a display name, since an error names tokens and never nodes, and the name cannot be empty,
no rule can be both
@memoand@nomemo,%errorends its alternative, so nothing can follow it.
start: NAME
?NAME: [a-z]+
grammar.fpeg:2:2: error[E302]: the terminal NAME cannot be transparent
Remove the form, or make the rule a syntactic rule with a lowercase name.
start: NAME
NAME: [a-z]+