Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 43710b6

Browse files
shashi278awecx
authored andcommitted
Fix typos in the documentation of Parser/pgen (GH-15416)
Co-Authored-By: Antoine <[email protected]>
1 parent 8ad22a4 commit 43710b6

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Parser/pgen/pgen.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
* An LL(1) parser (Left-to-right, Leftmost derivation, 1 token-lookahead) is a
1111
top-down parser for a subset of context-free languages. It parses the input
1212
from Left to right, performing Leftmost derivation of the sentence, and can
13-
only use 1 tokens of lookahead when parsing a sentence.
13+
only use 1 token of lookahead when parsing a sentence.
1414
1515
* A parsing table is a collection of data that a generic implementation of the
1616
LL(1) parser consumes to know how to parse a given context-free grammar. In
17-
this case the collection of thata involves Deterministic Finite Automatons,
17+
this case the collection of data involves Deterministic Finite Automatons,
1818
calculated first sets, keywords and transition labels.
1919
2020
* A grammar is defined by production rules (or just 'productions') that specify
@@ -26,9 +26,9 @@
2626
2727
rule_name: rule_description;
2828
29-
meaning the rule 'a: b' specifies that a can be replaced by b. A Context-free
30-
grammars is a grammars in which the left-hand side of each production rule
31-
consists of only a single nonterminal symbol. Context free grammars can
29+
meaning the rule 'a: b' specifies that a can be replaced by b. A context-free
30+
grammar is a grammar in which the left-hand side of each production rule
31+
consists of only a single nonterminal symbol. Context-free grammars can
3232
always be recognized by a Non-Deterministic Automatons.
3333
3434
* Terminal symbols are literal symbols which may appear in the outputs of the
@@ -47,8 +47,8 @@
4747
4848
* The first sets of a rule (FIRST(rule)) are defined to be the set of terminals
4949
that can appear in the first position of any string derived from the rule.
50-
This is useful for LL(1) parsers as the parser is only allow to look at the
51-
next token in the input to know which rule needs to parse. For example given
50+
This is useful for LL(1) parsers as the parser is only allowed to look at the
51+
next token in the input to know which rule needs to parse. For example, given
5252
this grammar:
5353
5454
start: '(' A | B ')'

0 commit comments

Comments
 (0)