E301 Syntactic rule in a terminalΒΆ

A terminal or the %ignore expression uses a syntactic rule or a level of a precedence block. A terminal matches one token with nothing skipped inside, and the skip expression runs before tokens, so both may use only terminals.

start: WORD
WORD: letter+
letter: [a-z]
grammar.fpeg:2:7: error[E301]: a terminal or the skip expression cannot use the rule letter

Make the rule a terminal, with an uppercase name.

start: WORD
WORD: LETTER+
LETTER: [a-z]