Sean P. DeNigris wrote
> - is there any specific reason that rules can't contain dashes? This seems
> pretty common.
Added by changing #grammrPEG from "Identifier <- [a-zA-Z_] [a-zA-Z0-9_]*" to
"Identifier <- [a-zA-Z_] [a-zA-Z0-9_\-]*"
Sean P. DeNigris wrote
> - Why use <- instead of = to separa
Sean P. DeNigris wrote
> I wanted to extend the Xtream grammar to handle "/d97".
Okay, I added to PEGParser class>>grammarPEG
...
/ BACKSLASH [d] [0-9]+
Sean P. DeNigris wrote
> I extended PEGParserGenerator and PEGParserParser with the following:
> Escape: backslash character: char
Sean P. DeNigris wrote
> I wanted to extend the Xtream grammar to handle "/d97"
I also wonder:
- is there any specific reason that rules can't contain dashes? This seems
pretty common.
- Why use <- instead of = to separate the rule name from the definition? The
standards I want to parse use the la
I copy-pasted the addr-spec grammar from rfc5322 and was converting it to
Xtreams format. One PITA was converting all the decimal values to hex e.g.
"%d97" -> "\x61". I wanted to extend the Xtream grammar to handle
"/d97". I extended PEGParserGenerator and PEGParserParser with the
following: