File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
clang/include/clang/Tooling/Syntax/Pseudo Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ struct Rule {
83
83
84
84
// We occupy 4 bits for the sequence, in theory, it can be at most 2^4 tokens
85
85
// long, however, we're stricter in order to reduce the size, we limit the max
86
- // lenth to 9 (this is the longest sequence in cxx grammar).
86
+ // length to 9 (this is the longest sequence in cxx grammar).
87
87
static constexpr unsigned SizeBits = 4 ;
88
88
static constexpr unsigned MaxElements = 9 ;
89
89
static_assert (MaxElements <= (1 << SizeBits), " Exceeds the maximum limit" );
@@ -167,7 +167,7 @@ struct GrammarTable {
167
167
// The rules are sorted (and thus grouped) by target symbol.
168
168
// RuleID is the index of the vector.
169
169
std::vector<Rule> Rules;
170
- // A table of terminals (aka tokens). It correspond to the clang::Token.
170
+ // A table of terminals (aka tokens). It corresponds to the clang::Token.
171
171
// clang::tok::TokenKind is the index of the table.
172
172
std::vector<std::string> Terminals;
173
173
// A table of nonterminals, sorted by name.
Original file line number Diff line number Diff line change 18
18
//
19
19
// LRGraph can be constructed for any context-free grammars.
20
20
// Even for a LR-ambiguous grammar, we can construct a deterministic FSA, but
21
- // interpretation of the FSA is nondeterminsitic -- we might in a state where
21
+ // interpretation of the FSA is nondeterministic -- we might in a state where
22
22
// we can continue searching an handle and identify a handle (called
23
23
// shift/reduce conflicts), or identify more than one handle (callled
24
24
// reduce/reduce conflicts).
@@ -116,7 +116,7 @@ struct State {
116
116
//
117
117
// Intuitively, an LR automaton is a transition graph. The graph has a
118
118
// collection of nodes, called States. Each state corresponds to a particular
119
- // item set, which represents a condition that could occur duing the process of
119
+ // item set, which represents a condition that could occur during the process of
120
120
// parsing a production. Edges are directed from one state to another. Each edge
121
121
// is labeled by a grammar symbol (terminal or nonterminal).
122
122
//
You can’t perform that action at this time.
0 commit comments