Closed kfsone closed 2 years ago
p <- identifier NAME_START <- [A-Za-z_] NAME_CONTINUATION<- NAME_START / [0-9] identifier <- < NAME_START NAME_CONTINUATION* >
given an invalid identifier, this does not report 'expected identifier' but instead exposes the internal terminal name NAME_START:
perhaps support for
identifier <- <= NAME_START NAME_CONTINUATION* =>
could be added to peglib to allow identifier to behave in reporting as though it was not a compound?
identifier
Bonus points if it could be used to produce:
syntax error, unexpected '2', expecting <identifier> could not match <NAME_START>
or if I used better labels:
program <- identifier identifier <- <= AllowedIdentifierFirstCharacters AllowedIdentifierCharacters* => AllowedIdentifierFirstCharacters <- [A-Za-z_] AllowedIdentifierCharacters <- AllowedIdentifierFirstCharacters / [0-9]
->
syntax error, unexpected '2', expecting <identifier>: could not match <AllowedIdentifierFirstCharacters>
@kfsone, thanks for the report. I fixed this problem without introducing any new operator.
given an invalid identifier, this does not report 'expected identifier' but instead exposes the internal terminal name NAME_START:
perhaps support for
identifier <- <= NAME_START NAME_CONTINUATION* =>
could be added to peglib to allow
identifier
to behave in reporting as though it was not a compound?Bonus points if it could be used to produce:
or if I used better labels:
->