This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
hokein marked 2 inline comments as done.
Closed by commit rG1a65c491be71: [pseudo] Support parsing variant target
symbols. (authored by hokein).
Changed prior to commi
hokein updated this revision to Diff 429645.
hokein added a comment.
move the findNonterminal to Grammar.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125006/new/
https://reviews.llvm.org/D125006
Files:
clang-tools-extra/pseudo/benchmarks/Bench
sammccall accepted this revision.
sammccall added inline comments.
Comment at: clang-tools-extra/pseudo/include/clang-pseudo/Grammar.h:188
+// Name must be a valid nonterminal symbol name in the grammar.
+SymbolID findNonterminal(llvm::StringRef Name,
+ co
hokein added a comment.
> Would including *every* nonterminal as a start symbol would blow the size up
> a bit?
> This would eliminate some complexity in the interface.
This does increase the size, some datapoints:
- ~240 start symbols
- number of states: 1.4K -> 2K
- number of actions: 83K ->
hokein updated this revision to Diff 428634.
hokein added a comment.
add a comment in cxx.bnf explaining why not making all nonterminals as start
symbol by default.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125006/new/
https://reviews.llvm.org
hokein marked 3 inline comments as done.
hokein added inline comments.
Comment at: clang-tools-extra/pseudo/include/clang-pseudo/GLR.h:125
};
-// Parse the given token stream with the GLR algorithm, and return a forest
node
-// of the start symbol.
sammccall wr
hokein updated this revision to Diff 428479.
hokein marked 3 inline comments as done.
hokein added a comment.
- adress comments
- rename TargetSymbol -> StartSymbol
- don't use StartSymbol for "_", rename and update a few occurrences
- move findNonterminal to Grammar.h since it is used in various
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
Very nice!
And change to compiled grammar size is small.
Would including *every* nonterminal as a start symbol would blow the size up a
bit?
This would eliminate some complexity in the in
hokein created this revision.
hokein added a reviewer: sammccall.
Herald added a subscriber: mgrang.
Herald added a project: All.
hokein requested review of this revision.
Herald added a subscriber: alextsao1999.
Herald added a project: clang-tools-extra.
With this patch, we're able to parse small