@@ -56,7 +56,7 @@ an input string as its argument, and yields one of the following results:
56
56
57
57
Note that "failure" results do not imply that the program is incorrect, nor do
58
58
they necessarily mean that the parsing has failed. Since the choice operator is
59
- ordered, a failure very often merely indicates "try the following option". A
59
+ ordered, a failure very often merely indicates "try the following option". A
60
60
direct implementation of a PEG parser as a recursive descent parser will present
61
61
exponential time performance in the worst case, because PEG parsers have
62
62
infinite lookahead (this means that they can consider an arbitrary number of
@@ -253,7 +253,7 @@ inside curly-braces, which specifies the return value of the alternative:
253
253
If the action is omitted, a default action is generated:
254
254
255
255
- If there is a single name in the rule, it gets returned.
256
- - If there multiple names in the rule, a collection with all parsed
256
+ - If there are multiple names in the rule, a collection with all parsed
257
257
expressions gets returned (the type of the collection will be different
258
258
in C and Python).
259
259
@@ -447,7 +447,7 @@ parser (the one used by the interpreter) just execute:
447
447
$ make regen-pegen
448
448
```
449
449
450
- using the ` Makefile ` in the main directory. If you are on Windows you can
450
+ using the ` Makefile ` in the main directory. If you are on Windows you can
451
451
use the Visual Studio project files to regenerate the parser or to execute:
452
452
453
453
``` dos
@@ -539,7 +539,7 @@ memoization is used.
539
539
The C parser used by Python is highly optimized and memoization can be expensive
540
540
both in memory and time. Although the memory cost is obvious (the parser needs
541
541
memory for storing previous results in the cache) the execution time cost comes
542
- for continuously checking if the given rule has a cache hit or not. In many
542
+ from continuously checking if the given rule has a cache hit or not. In many
543
543
situations, just parsing it again can be faster. Pegen ** disables memoization
544
544
by default** except for rules with the special marker ` memo ` after the rule
545
545
name (and type, if present):
@@ -605,7 +605,7 @@ File "<stdin>", line 1
605
605
SyntaxError: invalid syntax
606
606
```
607
607
608
- While soft keywords don't have this limitation if used in a context other the
608
+ While soft keywords don't have this limitation if used in a context other than
609
609
one where they are defined as keywords:
610
610
611
611
``` pycon
0 commit comments