Nimrod renamed to Nim

This commit is contained in:
Araq 2014-08-28 22:36:14 +02:00
commit 3ea6446900
30 changed files with 379 additions and 379 deletions

View file

@ -171,7 +171,7 @@ The PEG parser implements this grammar (written in PEG syntax)::
expression, identifiers are not interpreted as non-terminals, but are
interpreted as verbatim string:
.. code-block:: nimrod
.. code-block:: nim
abc =~ peg"abc" # is true
So it is not necessary to write ``peg" 'abc' "`` in the above example.
@ -182,17 +182,17 @@ Examples
Check if `s` matches Nim's "while" keyword:
.. code-block:: nimrod
.. code-block:: nim
s =~ peg" y'while'"
Exchange (key, val)-pairs:
.. code-block:: nimrod
.. code-block:: nim
"key: val; key2: val2".replace(peg"{\ident} \s* ':' \s* {\ident}", "$2: $1")
Determine the ``#include``'ed files of a C file:
.. code-block:: nimrod
.. code-block:: nim
for line in lines("myfile.c"):
if line =~ peg"""s <- ws '#include' ws '"' {[^"]+} '"' ws
comment <- '/*' @ '*/' / '//' .*