[PATCH] D128805: [pseudo] Fix bugs/inconsistencies in forest dump.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 29 06:32:11 PDT 2022


hokein accepted this revision.
hokein added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/pseudo/unittests/ForestTest.cpp:138
+
+  const auto *B = &Arena.createSequence(symbol("B"), ruleFor("B"), {Star});
+  const auto *A1 = &Arena.createSequence(symbol("A"), ruleFor("A"), {B});
----------------
I was confused by the forest here -- the fact that it doesn't reflect the grammar (I was trying to figure out why there is an ambiguous node for A by reading the grammar above)

I think there should be a comment clarifying the gap between the grammar and forest --  this is an artificial forest which is only for testing the dump purpose -- we only need the symbol bits from the grammar (I actual think `GLRTest::buildGrammar` is a better fit for the tests in this file). 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128805/new/

https://reviews.llvm.org/D128805



More information about the cfe-commits mailing list