Skip to content

Commit 8fee667

Browse files
committed
[pseudo] NFC, fix some typos.
1 parent d84dedc commit 8fee667

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clang/include/clang/Tooling/Syntax/Pseudo/Grammar.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ struct Rule {
8383

8484
// We occupy 4 bits for the sequence, in theory, it can be at most 2^4 tokens
8585
// 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).
8787
static constexpr unsigned SizeBits = 4;
8888
static constexpr unsigned MaxElements = 9;
8989
static_assert(MaxElements <= (1 << SizeBits), "Exceeds the maximum limit");
@@ -167,7 +167,7 @@ struct GrammarTable {
167167
// The rules are sorted (and thus grouped) by target symbol.
168168
// RuleID is the index of the vector.
169169
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.
171171
// clang::tok::TokenKind is the index of the table.
172172
std::vector<std::string> Terminals;
173173
// A table of nonterminals, sorted by name.

clang/include/clang/Tooling/Syntax/Pseudo/LRGraph.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
//
1919
// LRGraph can be constructed for any context-free grammars.
2020
// 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
2222
// we can continue searching an handle and identify a handle (called
2323
// shift/reduce conflicts), or identify more than one handle (callled
2424
// reduce/reduce conflicts).
@@ -116,7 +116,7 @@ struct State {
116116
//
117117
// Intuitively, an LR automaton is a transition graph. The graph has a
118118
// 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
120120
// parsing a production. Edges are directed from one state to another. Each edge
121121
// is labeled by a grammar symbol (terminal or nonterminal).
122122
//

0 commit comments

Comments
 (0)