[PATCH] D119172: [pseudo] Implement LRGraph

2022-03-07 Thread Alex Tsao via Phabricator via cfe-commits
alextsao1999 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. +}; sammccall wrote: > alextsao1999 wrote: > > hokein wrote: > > > alextsao1999 wr

[PATCH] D119172: [pseudo] Implement LRGraph

2022-03-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall 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: > hokein wrote: > > alextsao1999 wrote: > > > Can we add Look

[PATCH] D119172: [pseudo] Implement LRGraph

2022-03-07 Thread Alex Tsao via Phabricator via cfe-commits
alextsao1999 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. +}; hokein wrote: > alextsao1999 wrote: > > Can we add LookaheadSymbol here to imp

[PATCH] D119172: [pseudo] Implement LRGraph

2022-03-07 Thread Haojian Wu via Phabricator via cfe-commits
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 d

[PATCH] D119172: [pseudo] Implement LRGraph

2022-03-05 Thread Alex Tsao via Phabricator via cfe-commits
alextsao1999 added inline comments. Herald added a project: All. Comment at: clang/include/clang/Tooling/Syntax/Pseudo/LRGraph.h:96 + uint8_t DotPos = 0; + uint8_t RuleLength = 0; // the length of rule body. +}; Can we add LookaheadSymbol here to implement LR(1

[PATCH] D119172: [pseudo] Implement LRGraph

2022-02-09 Thread Haojian Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGf1984b143367: [pseudo] Implement LRGraph (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D119172: [pseudo] Implement LRGraph

2022-02-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Pseudo/LRGraph.h:131 + + // Constructs an LR(0) automaton. + static LRGraph buildLR0(const Grammar &); sammccall wrote: > IIUC the data structure used here is inherently LR0, rather th

[PATCH] D119172: [pseudo] Implement LRGraph

2022-02-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 407092. hokein marked 16 inline comments as done. hokein added a comment. address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119172/new/ https://reviews.llvm.org/D119172 Files: clang/inclu

[PATCH] D119172: [pseudo] Implement LRGraph

2022-02-08 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. LG, thank you! Bunch of nits, up to you what you want to do with them. Comment at: clang/include/clang/Tooling/Syntax/Pseudo/LRGraph.h:10 +// LR parsers are bottom-up

[PATCH] D119172: [pseudo] Implement LRGraph

2022-02-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: mgrang, mgorny. hokein requested review of this revision. Herald added a project: clang. LRGraph is the key component of the clang pseudo parser, it is a deterministic handle-finding finite-state machine, w