[PATCH] D118196: [syntax][pseudo] Implement LR parsing table.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 21 01:24:52 PST 2022


sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.

Thanks, I really like the way the tests look now!



================
Comment at: clang/include/clang/Tooling/Syntax/Pseudo/LRTable.h:78
+      Shift,
+      // Reduce by a rule, the value is a ruleID.
+      Reduce,
----------------
// Pops 


================
Comment at: clang/include/clang/Tooling/Syntax/Pseudo/LRTable.h:80
+      Reduce,
+      // Signals that we have parsd the input successfully.
+      Accept,
----------------
parsd -> parsed


================
Comment at: clang/lib/Tooling/Syntax/Pseudo/LRTable.cpp:28
+  case LRTable::Action::GoTo:
+    return OS << llvm::formatv("goTo state {0}", A.getGoToState());
+  case LRTable::Action::Accept:
----------------
nit: goTo -> go to, like dumpForTests?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118196/new/

https://reviews.llvm.org/D118196



More information about the cfe-commits mailing list