Allow - in peg.ebnf identifiers. Eating still not allowed...

db4
Doug Coleman 2010-05-03 23:40:50 -05:00
parent c7351595e5
commit fa07f5d85f
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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* ;