pegs: bugfixes and extensions
This commit is contained in:
parent
11d3d94438
commit
ec67d98286
4 changed files with 51 additions and 16 deletions
|
|
@ -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
|
||||
--------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue