You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 20, 2021. It is now read-only.
%pragma parser.lookahead 0
%skip space \s
%token a a+
%token b b+
%token c c+
#root:
( <a> | <b> | <c> )*
Source
a
b
c
d
Results
Parsing above scenario leads to expected exception, since lexeme d is not defined in grammar. In thrown UnrecognizedToken
line & column can be enhanced
(helpful) position pointer can be adjusted
Hoa\Compiler\Exception\UnrecognizedToken: Unrecognized token "d" at line 1 and column 7:
a
b
c
d
↑ in /Users/olly/Development/Packages/fluid-compiler/vendor/hoa/compiler/Llk/Lexer.php on line 1
With adjustments
Hoa\Compiler\Exception\UnrecognizedToken: Unrecognized token "d" at line 4 and column 1:
a
b
c
d
↑ in /Users/olly/Development/Packages/fluid-compiler/vendor/hoa/compiler/Llk/Lexer.php on line 1