Skip to content

Commit c40101b

Browse files
authored
PEP 617: Grammar (#2029)
1 parent f6c6e24 commit c40101b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pep-0617.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ machinery in CPython that motivates the need for a new parser.
158158
Some rules are not actually LL(1)
159159
---------------------------------
160160

161-
Although the Python grammar is technically an LL(1) grammar (because is parsed by
161+
Although the Python grammar is technically an LL(1) grammar (because it is parsed by
162162
an LL(1) parser) several rules are not LL(1) and several workarounds are
163163
implemented in the grammar and in other parts of CPython to deal with this. For
164164
example, consider the rule for assignment expressions::
@@ -472,7 +472,7 @@ that parses grammar files is bootstrapped from a meta-grammar file with
472472
Python actions that generate the grammar tree as a result of the parsing.
473473

474474
In the specific case of the new proposed PEG grammar for Python, having
475-
actions allows to directly describe how the AST is composed in the grammar
475+
actions allows directly describing how the AST is composed in the grammar
476476
itself, making it more clear and maintainable. This AST generation process is
477477
supported by the use of some helper functions that factor out common AST
478478
object manipulations and some other required operations that are not directly
@@ -585,8 +585,8 @@ The full meta-grammar for the grammars supported by the PEG generator is:
585585
| "?" { "?" }
586586
| ":" { ":" }
587587

588-
As an illustrative example this simple grammar file allows to directly
589-
generate a full parser that can parse simple arithmetic expressions and that
588+
As an illustrative example this simple grammar file allows directly
589+
generating a full parser that can parse simple arithmetic expressions and that
590590
returns a valid C-based Python AST:
591591

592592
::

0 commit comments

Comments
 (0)