pegs: bugfixes and extensions

This commit is contained in:
Araq 2010-10-31 00:16:01 +02:00
commit ec67d98286
4 changed files with 51 additions and 16 deletions

View file

@ -150,6 +150,16 @@ The PEG parser implements this grammar (written in PEG syntax)::
expr <- seqExpr (ig "/" expr)*
**Note**: As a special syntactic extension if the whole PEG is only a single
expression, identifiers are not interpreted as non-terminals, but are
interpreted as verbatim string:
.. code-block:: nimrod
abc =~ peg"abc" # is true
So it is not necessary to write ``peg" 'abc' "`` in the above example.
Examples
--------