Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (12 sloc) 353 Bytes
#!nqp
grammar Kea {
token TOP { <expr> }
proto token expr { <...> }
rule expr:sym<+> { <expr> <expr> '+' }
rule expr:sym<-> { <expr> <expr> '-' }
rule expr:sym<*> { <expr> <expr> '*' }
rule expr:sym</> { <expr> <expr> '/' }
token expr:sym<value> { \d+ }
}
my $match := Kea.parse('2 4 * 8 +');
_dumper($match);
Jump to Line
Something went wrong with that request. Please try again.