These will be used when building parsing table for LR parsers.
Separate from https://reviews.llvm.org/D118196.
Paths
| Differential D118990
[pseudo] Add first and follow set computation in Grammar. ClosedPublic Authored by hokein on Feb 4 2022, 5:58 AM.
Details Summary These will be used when building parsing table for LR parsers. Separate from https://reviews.llvm.org/D118196.
Diff Detail
Event Timelinesammccall added inline comments.
This revision is now accepted and ready to land.Feb 4 2022, 8:46 AM
This revision was landed with ongoing or failed builds.Feb 9 2022, 12:16 AM Closed by commit rGfe932a88e970: [pseudo] Add first and follow set computation in Grammar. (authored by hokein). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 407064 clang/include/clang/Tooling/Syntax/Pseudo/Grammar.h
clang/lib/Tooling/Syntax/Pseudo/Grammar.cpp
clang/unittests/Tooling/Syntax/Pseudo/GrammarTest.cpp
|
AFAICS, firstSets are iterated over in followSets, and followSets are iterated over when building SLR.
Seems like exposing vector<vector<SymbolID>> would be enough. Up to you.
(Or the Epochs<SymbolID> data structure from the prototype - there must be a name for that data structure)