[clang] 8fee667 - [pseudo] NFC, fix some typos.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 11 06:35:24 PST 2022


Author: Haojian Wu
Date: 2022-02-11T15:35:11+01:00
New Revision: 8fee667d31f6af9a8a6b44b120164fff4f65d198

URL: https://github.com/llvm/llvm-project/commit/8fee667d31f6af9a8a6b44b120164fff4f65d198
DIFF: https://github.com/llvm/llvm-project/commit/8fee667d31f6af9a8a6b44b120164fff4f65d198.diff

LOG: [pseudo] NFC, fix some typos.

Added: 
    

Modified: 
    clang/include/clang/Tooling/Syntax/Pseudo/Grammar.h
    clang/include/clang/Tooling/Syntax/Pseudo/LRGraph.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Tooling/Syntax/Pseudo/Grammar.h b/clang/include/clang/Tooling/Syntax/Pseudo/Grammar.h
index c6e2f09d5fb47..a7ecfea902b6d 100644
--- a/clang/include/clang/Tooling/Syntax/Pseudo/Grammar.h
+++ b/clang/include/clang/Tooling/Syntax/Pseudo/Grammar.h
@@ -83,7 +83,7 @@ struct Rule {
 
   // We occupy 4 bits for the sequence, in theory, it can be at most 2^4 tokens
   // long, however, we're stricter in order to reduce the size, we limit the max
-  // lenth to 9 (this is the longest sequence in cxx grammar).
+  // length to 9 (this is the longest sequence in cxx grammar).
   static constexpr unsigned SizeBits = 4;
   static constexpr unsigned MaxElements = 9;
   static_assert(MaxElements <= (1 << SizeBits), "Exceeds the maximum limit");
@@ -167,7 +167,7 @@ struct GrammarTable {
   // The rules are sorted (and thus grouped) by target symbol.
   // RuleID is the index of the vector.
   std::vector<Rule> Rules;
-  // A table of terminals (aka tokens). It correspond to the clang::Token.
+  // A table of terminals (aka tokens). It corresponds to the clang::Token.
   // clang::tok::TokenKind is the index of the table.
   std::vector<std::string> Terminals;
   // A table of nonterminals, sorted by name.

diff  --git a/clang/include/clang/Tooling/Syntax/Pseudo/LRGraph.h b/clang/include/clang/Tooling/Syntax/Pseudo/LRGraph.h
index 8a4bdb76e49e8..1de15b79ee40f 100644
--- a/clang/include/clang/Tooling/Syntax/Pseudo/LRGraph.h
+++ b/clang/include/clang/Tooling/Syntax/Pseudo/LRGraph.h
@@ -18,7 +18,7 @@
 //
 //  LRGraph can be constructed for any context-free grammars.
 //  Even for a LR-ambiguous grammar, we can construct a deterministic FSA, but
-//  interpretation of the FSA is nondeterminsitic -- we might in a state where
+//  interpretation of the FSA is nondeterministic -- we might in a state where
 //  we can continue searching an handle and identify a handle (called
 //  shift/reduce conflicts), or identify more than one handle (callled
 //  reduce/reduce conflicts).
@@ -116,7 +116,7 @@ struct State {
 //
 // Intuitively, an LR automaton is a transition graph. The graph has a
 // collection of nodes, called States. Each state corresponds to a particular
-// item set, which represents a condition that could occur duing the process of
+// item set, which represents a condition that could occur during the process of
 // parsing a production. Edges are directed from one state to another. Each edge
 // is labeled by a grammar symbol (terminal or nonterminal).
 //


        


More information about the cfe-commits mailing list