]> granicus.if.org Git - re2c/commitdiff
Added warnings stubs.
authorUlya Trofimovich <skvadrik@gmail.com>
Thu, 5 Nov 2015 14:12:20 +0000 (14:12 +0000)
committerUlya Trofimovich <skvadrik@gmail.com>
Thu, 5 Nov 2015 14:12:20 +0000 (14:12 +0000)
16 files changed:
src/manual/features/features.rst
src/manual/manual.rst
src/manual/options/home.rst [new file with mode: 0644]
src/manual/options/options.rst [new file with mode: 0644]
src/manual/syntax/syntax.rst
src/manual/warnings/home.rst [new file with mode: 0644]
src/manual/warnings/warnings.rst
src/manual/warnings/warnings_general.rst [new file with mode: 0644]
src/manual/warnings/warnings_list.rst
src/manual/warnings/wcondition_order.rst [new file with mode: 0644]
src/manual/warnings/wempty_character_class.rst [new file with mode: 0644]
src/manual/warnings/wmatch_empty_string.rst [new file with mode: 0644]
src/manual/warnings/wswapped_range.rst [new file with mode: 0644]
src/manual/warnings/wundefined_control_flow.rst [new file with mode: 0644]
src/manual/warnings/wunreachable_rules.rst [new file with mode: 0644]
src/manual/warnings/wuseless_escape.rst [new file with mode: 0644]

index 15e7b13a4cb31fd391ace2078db5624f410948ca..baa38db0ad9072a992d337fa8ffd1f1f200eac3e 100644 (file)
@@ -158,8 +158,7 @@ In Unicode, values from range 0xD800 to 0xDFFF (surrogates) are not
 valid Unicode code points, any encoded sequence of code units, that
 would map to Unicode code points in the range 0xD800-0xDFFF, is
 ill-formed. The user can control how ``re2c`` treats such ill-formed
-sequences with ``--encoding-policy <policy>`` flag (see `Options`_
-for full explanation).
+sequences with ``--encoding-policy <policy>`` flag.
 
 For some encodings, there are code units, that never occur in valid
 encoded stream (e.g. 0xFF byte in UTF-8). If the generated scanner must
index c2863d695ddf4b79ea78c40e3fbceb0ea2771686..f8fa7d0c7086a22d2de2be080037666fc5c5f850 100644 (file)
@@ -6,7 +6,7 @@ Manual
 
 ★
 
-* `Options   <options/options_list.html>`_
+* `Options   <options/options.html>`_
 * `Warnings  <warnings/warnings.html>`_
 * `Syntax    <syntax/syntax.html>`_
 * `Features  <features/features.html>`_
diff --git a/src/manual/options/home.rst b/src/manual/options/home.rst
new file mode 100644 (file)
index 0000000..56b7b5c
--- /dev/null
@@ -0,0 +1,4 @@
+.. |[manual_warnings_home]| replace:: [home]
+.. _[manual_warnings_home]: ../../index.html
+.. header:: |[manual_warnings_home]|_ `[Manual] <../manual.html>`_ `[Options] <options.html>`_
+.. footer:: |[manual_warnings_home]|_ `[Manual] <../manual.html>`_ `[Options] <options.html>`_
diff --git a/src/manual/options/options.rst b/src/manual/options/options.rst
new file mode 100644 (file)
index 0000000..bdc1097
--- /dev/null
@@ -0,0 +1,8 @@
+=======
+Options
+=======
+
+.. include:: ../home.rst
+
+.. include:: options_list.rst
+
index edcd63b30d4e8b10a309a2a942513f66c21e09bb..ef13ff53ea882386d1ac3a4f9fe130f32c5d1fab 100644 (file)
@@ -36,7 +36,7 @@ Note that default rule ``*`` differs from ``[^]``: default rule has the lowest p
 matches any code unit (either valid or invalid) and always consumes one character;
 while ``[^]`` matches any valid code point (not code unit) and can consume multiple
 code units. In fact, when variable-length encoding is used, ``*``
-is the only possible way to match invalid input character (see `Encodings`_ for details).
+is the only possible way to match invalid input character.
 
 If ``-c`` is active then each regular expression is preceeded by a list
 of comma separated condition names. Besides normal naming rules there
diff --git a/src/manual/warnings/home.rst b/src/manual/warnings/home.rst
new file mode 100644 (file)
index 0000000..4307a92
--- /dev/null
@@ -0,0 +1,4 @@
+.. |[manual_warnings_home]| replace:: [home]
+.. _[manual_warnings_home]: ../../index.html
+.. header:: |[manual_warnings_home]|_ `[Manual] <../manual.html>`_ `[Warnings] <warnings.html>`_
+.. footer:: |[manual_warnings_home]|_ `[Manual] <../manual.html>`_ `[Warnings] <warnings.html>`_
index 7898f8d2e9ecb0120779dc5888104b15a8afe6d8..02eb43477c6d2b1cf18a4e3557ac34933f78f2ea 100644 (file)
@@ -3,6 +3,16 @@ Warnings
 ========
 
 .. include:: ../home.rst
-.. include:: ../../contents.rst
 
-.. include:: wundefined_control_flow.rst
+★
+
+* `[-Wundefined-control-flow] <wundefined_control_flow.html>`_
+* `[-Wunreachable-rules]      <wunreachable_rules.html>`_
+* `[-Wcondition-order]        <wcondition_order.html>`_
+* `[-Wuseless-escape]         <wuseless_escape.html>`_
+* `[-Wswapped-range]          <wswapped_range.html>`_
+* `[-Wempty-character-class]  <wempty_character_class.html>`_
+* `[-Wmatch-empty-string]     <wmatch_empty_string.html>`_
+
+.. include:: warnings_general.rst
+
diff --git a/src/manual/warnings/warnings_general.rst b/src/manual/warnings/warnings_general.rst
new file mode 100644 (file)
index 0000000..50fdc47
--- /dev/null
@@ -0,0 +1,22 @@
+
+``-W``
+    Turn on all warnings.
+
+``-Werror``
+    Turn warnings into errors. Note that this option along
+    doesn't turn on any warnings, it only affects those warnings that have
+    been turned on so far or will be turned on later.
+
+``-W<warning>``
+    Turn on individual ``warning``.
+
+``-Wno-<warning>``
+    Turn off individual ``warning``.
+
+``-Werror-<warning>``
+    Turn on individual ``warning`` and treat it as error (this implies ``-W<warning>``).
+
+``-Wno-error-<warning>``
+    Don't treat this particular ``warning`` as error. This doesn't turn off
+    the warning itself.
+
index 3c175a612f5785632722185f30b1ec97c0fb5d7c..b3a05ee861eab1b341ed0d02ec9efbbe58a7d05b 100644 (file)
@@ -1,23 +1,3 @@
-``-W``
-    Turn on all warnings.
-
-``-Werror``
-    Turn warnings into errors. Note that this option along
-    doesn't turn on any warnings, it only affects those warnings that have
-    been turned on so far or will be turned on later.
-
-``-W<warning>``
-    Turn on individual ``warning``.
-
-``-Wno-<warning>``
-    Turn off individual ``warning``.
-
-``-Werror-<warning>``
-    Turn on individual ``warning`` and treat it as error (this implies ``-W<warning>``).
-
-``-Wno-error-<warning>``
-    Don't treat this particular ``warning`` as error. This doesn't turn off
-    the warning itself.
 
 ``-Wcondition-order``
     Warn if the generated program makes implicit
@@ -50,6 +30,9 @@
     default rule ``*`` (this rule has the lowest priority, matches any code unit and consumes
     exactly one code unit).
 
+``-Wunreachable-rules``
+    Warn about rules that are shadowed by other rules and will never match.
+
 ``-Wuseless-escape``
     Warn if a symbol is escaped when it shouldn't be.
     By default re2c silently ignores escape, but this may as well indicate a
diff --git a/src/manual/warnings/wcondition_order.rst b/src/manual/warnings/wcondition_order.rst
new file mode 100644 (file)
index 0000000..5d6e7cd
--- /dev/null
@@ -0,0 +1,5 @@
+[-Wcondition-order]
+--------------------------
+
+.. include:: home.rst
+
diff --git a/src/manual/warnings/wempty_character_class.rst b/src/manual/warnings/wempty_character_class.rst
new file mode 100644 (file)
index 0000000..69e0889
--- /dev/null
@@ -0,0 +1,5 @@
+[-Wempty-character-class]
+--------------------------
+
+.. include:: home.rst
+
diff --git a/src/manual/warnings/wmatch_empty_string.rst b/src/manual/warnings/wmatch_empty_string.rst
new file mode 100644 (file)
index 0000000..7d89643
--- /dev/null
@@ -0,0 +1,5 @@
+[-Wmatch-empty-string]
+--------------------------
+
+.. include:: home.rst
+
diff --git a/src/manual/warnings/wswapped_range.rst b/src/manual/warnings/wswapped_range.rst
new file mode 100644 (file)
index 0000000..6158501
--- /dev/null
@@ -0,0 +1,5 @@
+[-Wswapped-range]
+--------------------------
+
+.. include:: home.rst
+
diff --git a/src/manual/warnings/wundefined_control_flow.rst b/src/manual/warnings/wundefined_control_flow.rst
new file mode 100644 (file)
index 0000000..751fe24
--- /dev/null
@@ -0,0 +1,17 @@
+[-Wundefined-control-flow]
+--------------------------
+
+.. include:: home.rst
+
+.. code-block:: cpp
+
+    /*!re2c
+        [1-9][0-9]* {}
+    */
+
+
+.. code-block:: cpp
+
+    /*!re2c
+        [^] {}
+    */
diff --git a/src/manual/warnings/wunreachable_rules.rst b/src/manual/warnings/wunreachable_rules.rst
new file mode 100644 (file)
index 0000000..4e4c8a1
--- /dev/null
@@ -0,0 +1,11 @@
+[-Wunreachable-rules]
+--------------------------
+
+.. include:: home.rst
+
+.. code-block:: cpp
+
+    /*!re2c
+        [^]* "a" {}
+    */
+
diff --git a/src/manual/warnings/wuseless_escape.rst b/src/manual/warnings/wuseless_escape.rst
new file mode 100644 (file)
index 0000000..d7437e0
--- /dev/null
@@ -0,0 +1,5 @@
+[-Wuseless-escape]
+--------------------------
+
+.. include:: home.rst
+