From f5072bf4cec8d8bca1148b59645c4f25f9ad1ca4 Mon Sep 17 00:00:00 2001 From: jcfp Date: Mon, 12 Aug 2019 12:41:10 +0200 Subject: [PATCH] fix documentation typos --- doc/manpage.rst.in | 4 ++-- doc/manual/conditions/conditions.rst_ | 6 +++--- doc/manual/configurations/configurations.rst_ | 10 +++++----- doc/manual/directives/directives.rst_ | 4 ++-- doc/manual/eof/04_generic_api.rst_ | 4 ++-- doc/manual/fill/02_fill.rst_ | 2 +- doc/manual/headers/headers.rst_ | 2 +- doc/manual/includes/includes.rst_ | 2 +- doc/manual/reuse/reuse.rst_ | 2 +- doc/manual/skeleton/skeleton.rst_ | 2 +- doc/manual/state/state.rst_ | 2 +- doc/manual/syntax/syntax.rst_ | 2 +- 12 files changed, 21 insertions(+), 21 deletions(-) diff --git a/doc/manpage.rst.in b/doc/manpage.rst.in index f31fa328..6c2bd60e 100644 --- a/doc/manpage.rst.in +++ b/doc/manpage.rst.in @@ -27,7 +27,7 @@ Various re2c features are described in sections `include files`_, `encoding support`_, `start conditions`_, `skeleton programs`_ and `visualization and debug`_. Re2c provides a lot of `options`_, `configurations`_ and `directives`_ that -allow to customize the generated code. +allow one to customize the generated code. Options ======= @@ -153,7 +153,7 @@ Similar programs are flex(1), lex(1), quex(http://quex.sourceforge.net). AUTHORS ======= Re2c was originaly written by Peter Bumbulis in 1993. -Since then it has been developed and maintained by mutiple volunteers; +Since then it has been developed and maintained by multiple volunteers; mots notably, Brain Young, Marcus Boerger, Dan Nuffer and Ulya Trofimovich. VERSION INFORMATION diff --git a/doc/manual/conditions/conditions.rst_ b/doc/manual/conditions/conditions.rst_ index 3edfcdd5..ed0491d4 100644 --- a/doc/manual/conditions/conditions.rst_ +++ b/doc/manual/conditions/conditions.rst_ @@ -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 * `` 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`` diff --git a/doc/manual/configurations/configurations.rst_ b/doc/manual/configurations/configurations.rst_ index ff6aad11..54dea327 100644 --- a/doc/manual/configurations/configurations.rst_ +++ b/doc/manual/configurations/configurations.rst_ @@ -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;`` @@ -225,7 +225,7 @@ 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. @@ -258,14 +258,14 @@ ``/*!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``, 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``. ``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. diff --git a/doc/manual/directives/directives.rst_ b/doc/manual/directives/directives.rst_ index d3ad1d97..012c451a 100644 --- a/doc/manual/directives/directives.rst_ +++ b/doc/manual/directives/directives.rst_ @@ -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*/`` diff --git a/doc/manual/eof/04_generic_api.rst_ b/doc/manual/eof/04_generic_api.rst_ index f713c09f..b604a08b 100644 --- a/doc/manual/eof/04_generic_api.rst_ +++ b/doc/manual/eof/04_generic_api.rst_ @@ -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;`` diff --git a/doc/manual/fill/02_fill.rst_ b/doc/manual/fill/02_fill.rst_ index eaad8321..b0648767 100644 --- a/doc/manual/fill/02_fill.rst_ +++ b/doc/manual/fill/02_fill.rst_ @@ -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 diff --git a/doc/manual/headers/headers.rst_ b/doc/manual/headers/headers.rst_ index 7ce55878..939c1610 100644 --- a/doc/manual/headers/headers.rst_ +++ b/doc/manual/headers/headers.rst_ @@ -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 diff --git a/doc/manual/includes/includes.rst_ b/doc/manual/includes/includes.rst_ index bc7408c9..704eebd0 100644 --- a/doc/manual/includes/includes.rst_ +++ b/doc/manual/includes/includes.rst_ @@ -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. diff --git a/doc/manual/reuse/reuse.rst_ b/doc/manual/reuse/reuse.rst_ index 4f02c258..76e633e3 100644 --- a/doc/manual/reuse/reuse.rst_ +++ b/doc/manual/reuse/reuse.rst_ @@ -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 diff --git a/doc/manual/skeleton/skeleton.rst_ b/doc/manual/skeleton/skeleton.rst_ index 7abd284f..c7e30780 100644 --- a/doc/manual/skeleton/skeleton.rst_ +++ b/doc/manual/skeleton/skeleton.rst_ @@ -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 diff --git a/doc/manual/state/state.rst_ b/doc/manual/state/state.rst_ index 447e81c2..2adf1667 100644 --- a/doc/manual/state/state.rst_ +++ b/doc/manual/state/state.rst_ @@ -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 diff --git a/doc/manual/syntax/syntax.rst_ b/doc/manual/syntax/syntax.rst_ index fc535642..c1e7acf3 100644 --- a/doc/manual/syntax/syntax.rst_ +++ b/doc/manual/syntax/syntax.rst_ @@ -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. -- 2.40.0