Skip to content

Commit fef2607

Browse files
WolframAlphsrinivasreddy
authored andcommitted
pythongh-119786: Fix typos in InternalDocs/parser.md (python#128314)
1 parent 2d567cc commit fef2607

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: InternalDocs/parser.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ an input string as its argument, and yields one of the following results:
5656

5757
Note that "failure" results do not imply that the program is incorrect, nor do
5858
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
6060
direct implementation of a PEG parser as a recursive descent parser will present
6161
exponential time performance in the worst case, because PEG parsers have
6262
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:
253253
If the action is omitted, a default action is generated:
254254

255255
- 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
257257
expressions gets returned (the type of the collection will be different
258258
in C and Python).
259259

@@ -447,7 +447,7 @@ parser (the one used by the interpreter) just execute:
447447
$ make regen-pegen
448448
```
449449

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
451451
use the Visual Studio project files to regenerate the parser or to execute:
452452

453453
```dos
@@ -539,7 +539,7 @@ memoization is used.
539539
The C parser used by Python is highly optimized and memoization can be expensive
540540
both in memory and time. Although the memory cost is obvious (the parser needs
541541
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
543543
situations, just parsing it again can be faster. Pegen **disables memoization
544544
by default** except for rules with the special marker `memo` after the rule
545545
name (and type, if present):
@@ -605,7 +605,7 @@ File "<stdin>", line 1
605605
SyntaxError: invalid syntax
606606
```
607607

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
609609
one where they are defined as keywords:
610610

611611
```pycon

0 commit comments

Comments
 (0)