]> granicus.if.org Git - re2c/commitdiff
Sync with master.
authorUlya Trofimovich <skvadrik@gmail.com>
Tue, 13 Aug 2019 05:51:06 +0000 (06:51 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Tue, 13 Aug 2019 05:51:06 +0000 (06:51 +0100)
src/manual/conditions/conditions.rst_
src/manual/configurations/configurations.rst_
src/manual/directives/directives.rst_
src/manual/eof/04_generic_api.rst_
src/manual/fill/02_fill.rst_
src/manual/headers/headers.rst_
src/manual/includes/includes.rst_
src/manual/reuse/reuse.rst_
src/manual/skeleton/skeleton.rst_
src/manual/state/state.rst_
src/manual/syntax/syntax.rst_

index 3edfcdd5d4d8598ee044349a45eab45a5831c144..ed0491d41c1b0b2b6616affb252a531747c2be62 100644 (file)
@@ -1,5 +1,5 @@
 *Conditions* are enabled with ``-c`` ``--conditions``.
-This option allows to encode multiple interrelated lexers within the same re2c block.
+This option allows one to encode multiple interrelated lexers within the same re2c block.
 
 Each lexer corresponds to a single *condition*.
 It starts with a label of the form ``yyc_name``,
@@ -19,7 +19,7 @@ and transfers control flow to the start label of the active *condition*.
 After matching some rule of this *condition*,
 lexer may either transfer control flow back to the entry code (after executing the associated action and optionally setting another *condition* with ``=>``),
 or use ``:=>`` shortcut and transition directly to the start label of another *condition* (skipping the action and the entry code).
-Configuration ``re2c:cond:goto`` allows to change the default behavior.
+Configuration ``re2c:cond:goto`` allows one to change the default behavior.
 
 Syntactically each rule must be preceded with a list of comma-separated *condition* names or a wildcard ``*``
 enclosed in angle brackets ``<`` and ``>``.
@@ -41,7 +41,7 @@ This might be a convenient place to peform a routine task that is common to all
 *    ``<!conditions-or-wildcard>  action``
 
 Another special form of rules with an empty condition list ``<>`` and no regular expression
-allows to specify an "entry condition" that can be used to execute code before entering the lexer.
+allows one to specify an "entry condition" that can be used to execute code before entering the lexer.
 It is semantically equivalent to a condition with number zero, name ``0`` and an empty regular expression.
 
 *    ``<>                 action``
index ff6aad11a950a062213cf817f42972ce7cbbce75..54dea327f836be8b28b9ce969a1e3bf9ad74d9c2 100644 (file)
@@ -4,7 +4,7 @@
     than nested ``if`` statements and bit masks.
 
 ``re2c:cond:divider = '/* *********************************** */';``
-    Allows to customize the divider for condition blocks. One can use ``@@`` to insert condition name.
+    Allows one to customize the divider for condition blocks. One can use ``@@`` to insert condition name.
 
 ``re2c:cond:divider@cond = @@;``
     Specifies the placeholder that will be replaced with condition name in ``re2c:cond:divider``.
@@ -16,7 +16,7 @@
     Specifies the placeholder that will be replaced with condition label in ``re2c:cond:goto``.
 
 ``re2c:cond:goto = 'goto @@;';``
-    Allows to customize ``goto`` statements used with ``:=>`` style rules.
+    Allows one to customize ``goto`` statements used with ``:=>`` style rules.
     One can use ``@@`` to insert the condition name.
 
 ``re2c:condprefix = yyc;``
     use. Requires a numeric value greater than or equal to zero.
 
 ``re2c:labelprefix = 'yy';``
-    Allows to change the prefix of numbered
+    Allows one to change the prefix of numbered
     labels. The default is ``yy``. Can be set any string that is valid in
     a label name.
 
     ``/*!getstate:re2c*/`` comment.
 
 ``re2c:tags:expression = '@@';``
-    Allows to customize the way re2c addresses tag variables:
+    Allows one to customize the way re2c addresses tag variables:
     by default it emits expressions of the form ``yyt<N>``,
     but this might be inconvenient if tag variables are defined as fields in a struct,
     or for any other reason require special accessors.
     For example, setting ``re2c:tags:expression = p->@@`` will result in ``p->yyt<N>``.
 
 ``re2c:tags:prefix = 'yyt';``
-    Allows to override prefix of tag variables.
+    Allows one to override prefix of tag variables.
 
 ``re2c:variable:yyaccept = yyaccept;``
     Overrides the name of the ``yyaccept`` variable.
index d3ad1d970c7e6c963ececd85a50cfff90d0bbd20..012c451a0ce48cf5a2b7629ea9cb07432de7b021 100644 (file)
@@ -33,7 +33,7 @@ More information on each directive can be found in the related sections.
     (requires ``-c --conditions`` option).
 
 ``/*!stags:re2c ... */``, ``/*!mtags:re2c ... */``
-    These directives allow to specify a template piece of code that is expanded
+    These directives allow one to specify a template piece of code that is expanded
     for each s-tag/m-tag variable generated by re2c. This block has two optional
     configurations: ``format = "@@";`` (specifies the template where ``@@`` is
     substituted with the name of each tag variable), and ``separator = "";``
@@ -41,7 +41,7 @@ More information on each directive can be found in the related sections.
     tag variables).
 
 ``/*!include:re2c FILE */``
-    This directive allows to include ``FILE`` (in the same sense as ``#include``
+    This directive allows one to include ``FILE`` (in the same sense as ``#include``
     directive in C/C++).
 
 ``/*!header:re2c:on*/``
index f713c09ff55e485f5cfc9f072fa38084026508aa..b604a08b5d21e87379a6c71cd394309453921a5c 100644 (file)
@@ -1,7 +1,7 @@
 Using generic API
 -----------------
 
-Generic API can be used with any of the above methods. It also allows to use a
+Generic API can be used with any of the above methods. It also allows one to use a
 user-defined method by placing EOF checks in one of the basic primitives.
 Usually this is either ``YYSKIP`` (the check is performed when advancing to the
 next input character), or ``YYPEEK`` (the check is performed when reading the
@@ -12,7 +12,7 @@ should be cautious when using such ad-hoc methods, as it is easy to overlook
 some corner cases and come up with a method that only partially works. Also it
 should be noted that not everything can be expressed via generic API: for
 example, it is impossible to reimplement the way EOF rule works (in particular,
-it is impossible to re-match the character after successfull ``YYFILL``).
+it is impossible to re-match the character after successful ``YYFILL``).
 
 Below is an example of using ``YYSKIP`` to perform bounds checking without
 padding. ``YYFILL`` generation is suppressed using ``re2c:yyfill:enable = 0;``
index eaad8321a0fca9e9f2b7242f980be1f76feba1fa..b064876700ed26e5e58f178aedc0720e3215ddeb 100644 (file)
@@ -8,7 +8,7 @@ default API and ``YYLESSTHAN(n)`` in generic API. The argument passed to
 ``YYFILL`` is the minimal number of characters that must be supplied. If it
 fails to do so, ``YYFILL`` must not return to the lexer (for that reason it is
 best implemented as a macro that returns from the calling function on failure).
-In case of a successfull ``YYFILL`` invocation the limit position must be set
+In case of a successful ``YYFILL`` invocation the limit position must be set
 either to one after the last input position in buffer, or to the end of
 ``YYMAXFILL`` padding (in case ``YYFILL`` has successfully read at least ``n``
 characters, but not enough to fill the entire buffer). The pictures below show
index 7ce55878bd9c5e814687e0dcf41fb41dac966d20..939c16108a7b2770502fd1d5961d34b84b7a1658 100644 (file)
@@ -1,4 +1,4 @@
-Re2c allows to generate header file from the input ``.re`` file using option
+Re2c allows one to generate header file from the input ``.re`` file using option
 ``-t --type-header`` (or the corresponding configurations) and directives
 ``/*!header:re2c:on*/`` and ``/*!header:re2c:off*/``. The first directive
 marks the beginning of header file, and the second directive marks the end of
index bc7408c9e5d77410482eca3102c15b7c0161228f..704eebd07e24a33ded2459db5bb72c9984ba8c43 100644 (file)
@@ -1,4 +1,4 @@
-Re2c allows to include other files using directive ``/*!include:re2c FILE */``,
+Re2c allows one to include other files using directive ``/*!include:re2c FILE */``,
 where ``FILE`` is the name of file to be included. Re2c looks for included
 files in the directory of the including file and in include locations, which
 can be specified with ``-I`` option.
index 4f02c25864ce06f0e719fe0a5d74aa78f64c9c1c..76e633e33f4be471f9e5d5ff01fed67fcdbc3c9e 100644 (file)
@@ -1,5 +1,5 @@
 Reuse mode is enabled with the ``-r --reusable`` option. In this mode re2c
-allows to reuse definitions, configurations and rules specified by a
+allows one to reuse definitions, configurations and rules specified by a
 ``/*!rules:re2c*/`` block in subsequent ``/*!use:re2c*/`` blocks. As of
 re2c-1.2 it is possible to mix such blocks with normal ``/*!re2c*/`` blocks;
 prior to that re2c expects a single rules-block followed by use-blocks (normal
index 7abd284f905ba5de386bdf4ed4938463baa3fa34..c7e307808bf822880ce3adb1e28d4d28f03c4578 100644 (file)
@@ -14,7 +14,7 @@ Skeleton programs are very useful for a number of reasons:
 - Generating a set of input data with good coverage may be useful for both
   testing and benchmarking.
 
-- Generating self-contained executable programs allows to get minimized test
+- Generating self-contained executable programs allows one to get minimized test
   cases (the original code may be large or have a lot of dependencies).
 
 The difficulty with generating input data is that for all but the most trivial
index 447e81c21d4c099f9461ff116ecdb61777f38297..2adf16676f0cbd1500981b73214459e1c85cd007 100644 (file)
@@ -6,7 +6,7 @@ unacceptable in cases when the input becomes available piece by piece (for
 example, if the lexer is invoked by the parser, or if the lexer program
 communicates via a socket protocol with some other program that must wait for a
 reply from the lexer before it transmits the next message). Storable state
-feature is intended exactly for such cases: it allows to generate lexers that
+feature is intended exactly for such cases: it allows one to generate lexers that
 work in a "push" model. When the lexer needs more input, it stores its state and
 returns to the caller. Later, when more input becomes available, the caller
 resumes the lexer exactly where it stopped. There are a few changes necessary
index fc535642bd6a61c3cfa67d74aa68a09512fdbb46..c1e7acf36af5941b3b115e29b42aa0774b7b0666 100644 (file)
@@ -4,7 +4,7 @@ definitions, configurations and rules that contain regular expressions. The
 generated lexer communicates with the outer world by the means of user
 interface.
 Rules consist of a regular expression followed by a user-defined action
-(semantic action): a block of C/C++ code that is executed in case of sucessful
+(semantic action): a block of C/C++ code that is executed in case of successful
 match. Semantic action can be either an arbitrary block of code enclosed in
 curly braces ``{`` and ``}``, or a block of code without curly braces preceded
 with ``:=`` and ended with a newline that is not followed by a whitespace.