[PATCH] D119172: [pseudo] Implement LRGraph

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 7 01:10:37 PST 2022


hokein added inline comments.


================
Comment at: clang/include/clang/Tooling/Syntax/Pseudo/LRGraph.h:96
+  uint8_t DotPos = 0;
+  uint8_t RuleLength = 0; // the length of rule body.
+};
----------------
alextsao1999 wrote:
> Can we add LookaheadSymbol here to implement LR(1)?
we could do that. However, we don't have a plan to implement an `LR(1)` yet, we use `SLR(1)`. (though LR(1) is more powerful than SLR(1), the typical deterministic LR(1) parser cannot handle the C++ grammar, we need a "general" parser GLR which can be able to handle arbitrary context-free grammars).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119172



More information about the cfe-commits mailing list