sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land.
================ Comment at: clang-tools-extra/pseudo/include/clang-pseudo/grammar/Grammar.h:172 + // terminal `,` becomes `comma`; + // terminal `INT` becomes `int`; + std::string mangleSymbol(SymbolID) const; ---------------- I hope you mean kw_int? I'd like this to compile :-) Can you also give the example for IDENTIFIER? ================ Comment at: clang-tools-extra/pseudo/lib/grammar/Grammar.cpp:48 +std::string Grammar::mangleSymbol(SymbolID SID) const { + static const char *const TokNames[] = { ---------------- I'm not sure exposing these from `Grammar` is an improvement, i think even in principle we'd only want to use these for codegen. The need for testing is real, but i guess you can add a test that uses the CXX generated grammar, assert the elements of Rule::whatever, and the name of Symbol::whatever? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129359/new/ https://reviews.llvm.org/D129359 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits