From 10eb13007efb29b48455bb0b317be59f07fb901a Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 7 Nov 2020 17:12:21 +0100 Subject: [PATCH] d: remove dead comment * data/skeletons/lalr1.d (reportSyntaxError): here. --- data/skeletons/lalr1.d | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/data/skeletons/lalr1.d b/data/skeletons/lalr1.d index c85c712c..73ece8ff 100644 --- a/data/skeletons/lalr1.d +++ b/data/skeletons/lalr1.d @@ -677,37 +677,6 @@ m4_popdef([b4_at_dollar])])dnl [custom], [[ yylexer.syntax_error(yyctx);]], [detailed\|verbose], [[ - /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. - See - - for details. YYERROR is fine as it does not invoke this - function. - - If this state is a consistent state with a default action, - then the only way this function was invoked is if the - default action is an error action. In that case, don't - check for expected tokens because there are none. - - The only way there can be no lookahead present (in tok) is - if this state is a consistent state with a default action. - Thus, detecting the absence of a lookahead is sufficient to - determine that there is no unexpected or expected token to - report. In that case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this - state is a consistent state with a default action. There - might have been a previous inconsistent state, consistent - state with a non-default action, or user semantic action - that manipulated yychar. (However, yychar is currently out - of scope during semantic actions.) - - Of course, the expected token list depends on states to - have correct lookahead information, and it depends on the - parser not to perform extra reductions after fetching a - lookahead from the scanner and before detecting a syntax - error. Thus, state merging (from LALR or IELR) and default - reductions corrupt the expected token list. However, the - list is correct for canonical LR with one exception: it - will still contain any token that will not be accepted due - to an error action in a later state. - */ if (yyctx.getToken() != ]b4_symbol(empty, kind)[) { // FIXME: This method of building the message is not compatible