From: Ulya Trofimovich Date: Thu, 10 Aug 2017 15:43:02 +0000 (+0100) Subject: Fixed Sphinx warnings and synced 'submatch' section from master. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=688fd00e3dbade2d220db4d71f582543d87df323;p=re2c Fixed Sphinx warnings and synced 'submatch' section from master. --- diff --git a/src/manual/features/features.rst b/src/manual/features/features.rst index c7c71fc4..8994019b 100644 --- a/src/manual/features/features.rst +++ b/src/manual/features/features.rst @@ -5,6 +5,7 @@ Features .. toctree:: :maxdepth: 1 + Submatch Conditions State Reuse diff --git a/src/manual/features/skeleton/example.rst b/src/manual/features/skeleton/example.rst index 94e47303..7004eebc 100644 --- a/src/manual/features/skeleton/example.rst +++ b/src/manual/features/skeleton/example.rst @@ -18,7 +18,7 @@ First, let's look at the generated strings: :download:`[example.c.line4.input] ` -.. code-block:: bash +.. code-block:: none $ hexdump -v -e '"%08_ax " 24/1 "%02x "' -e '" |" 24/1 "%_p" "|\n"' example.c.line4.input 00000000 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 |........................| @@ -60,7 +60,7 @@ For that re2c generates keys: :download:`[example.c.line4.keys] ` -.. code-block:: bash +.. code-block:: none $hexdump -v -e '"%08_ax " 36/1 "%02x " "\n"' example.c.line4.keys 00000000 01 01 fe 01 01 fe 01 01 fe 01 01 fe 01 01 fe 01 01 fe 01 01 fe 01 01 fe 01 01 fe 01 01 fe 01 01 fe 01 01 fe @@ -128,7 +128,7 @@ Lexing is done by ``lex_line4``: this function contains the generated DFA. Compile and run: -.. code-block:: bash +.. code-block:: none $ gcc -o example example.c $ ./example diff --git a/src/manual/features/submatch/submatch.rst b/src/manual/features/submatch/submatch.rst new file mode 100644 index 00000000..052892d0 --- /dev/null +++ b/src/manual/features/submatch/submatch.rst @@ -0,0 +1,7 @@ +Submatch +-------- + +.. toctree:: + :hidden: + +.. include:: submatch.rst_ diff --git a/src/manual/syntax/syntax.rst b/src/manual/syntax/syntax.rst index 6294c774..c0b6a80b 100644 --- a/src/manual/syntax/syntax.rst +++ b/src/manual/syntax/syntax.rst @@ -11,7 +11,7 @@ Code for ``re2c`` consists of a set of `rules`_, `definitions`_ and Rules ---------- -Each rule consist of a `regular expression`_ accompanied with a block of C/C++ code +Each rule consist of a `regular expressions`_ accompanied with a block of C/C++ code which is to be executed when the associated regular expression is matched. You can either start the code with an opening curly brace or the sequence ``:=``. If you use an opening curly brace, ``re2c`` will count brace depth