hokein added a comment.

+1 on this change, it would make the expose-lookahead-index-to-guard change 
easier.



================
Comment at: clang-tools-extra/pseudo/include/clang-pseudo/GLR.h:74
     bool GCParity;
+    // Have we already used this node for error recovery? (prevents loops)
+    mutable bool Recovered = false;
----------------
haven't look at it deeply -- is this bug related to this eof change? This looks 
like a different bug in recovery.


================
Comment at: clang-tools-extra/pseudo/lib/Forest.cpp:191
+  // This is important to drive the final shift/recover/reduce loop.
+  new (&Terminals[Index])
+      ForestNode(ForestNode::Terminal, tokenSymbol(tok::eof),
----------------
nit: in the underlying TokenStream implementation, `tokens()` has a trailing 
eof token, I think we can fold this into the above loop (if we expose a 
`token_eof()` method in TokenStream). Not sure we should do this. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130550

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to