Allow - in peg.ebnf identifiers. Eating still not allowed...
parent
c7351595e5
commit
fa07f5d85f
|
@ -549,3 +549,10 @@ Tok = Spaces (Number | Special )
|
|||
EBNF: foo3 Bar = "a":11 "a":22 => [[ 11 22 2array ]] ;EBNF
|
||||
"aa" foo3
|
||||
] unit-test
|
||||
|
||||
[
|
||||
{ "a" "a" }
|
||||
] [
|
||||
EBNF: foo4 Bar = "a":a-1 "a":a-2 => [[ a-1 a-2 2array ]] ;EBNF
|
||||
"aa" foo4
|
||||
] unit-test
|
||||
|
|
|
@ -230,7 +230,7 @@ DEFER: 'action'
|
|||
|
||||
: 'element' ( -- parser )
|
||||
[
|
||||
[ ('element') , ":" syntax , "(a-zA-Z0-9_)+" range-pattern repeat1 [ >string ] action , ] seq* [ first2 <ebnf-var> ] action ,
|
||||
[ ('element') , ":" syntax , "(a-zA-Z0-9_-)+" range-pattern repeat1 [ >string ] action , ] seq* [ first2 <ebnf-var> ] action ,
|
||||
('element') ,
|
||||
] choice* ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue