- the grammar ambiguity is eliminate by a guard;
- modify the guard function signatures, now all parameters are folded in to a single object, avoid a long parameter list (as we will add more parameters in the near future);
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/pseudo/include/clang-pseudo/Language.h | ||
---|---|---|
25 | passing the position in the stream would be more general, there's no reason in particular that the amount of lookahead the guard needs is the same as what we have in GLR OTOH as long as it *is* the same this is probably faster | |
clang-tools-extra/pseudo/lib/cxx/CXX.cpp | ||
26–27 | nit: I would suggest calling this conventionally P instead of Params, the bodies of these are really verbose | |
clang-tools-extra/pseudo/test/cxx/dangling-else.cpp | ||
4 | nit: place this all on one line so it's clear there's no indentation-based heuristics at play? |
address comments.
clang-tools-extra/pseudo/include/clang-pseudo/Language.h | ||
---|---|---|
25 | +1, agree. This'd requires some non-trivial changes in the GLR because we use Lookahead in the Reduce rather than the token stream index. I think it is better to do it in a followup patch. I added a FIXME. |
passing the position in the stream would be more general, there's no reason in particular that the amount of lookahead the guard needs is the same as what we have in GLR
OTOH as long as it *is* the same this is probably faster