Menhir is based on LR(1), but I want to stop lookahead in some parser rules. My parser will update some mutable states during semantic actions, which will be used in lexer, but lookahead will process before my state updated. So the lexer may not work as expected.
Is there a way to stop lookahead in a parser rule? I tried to add dummy tokens at the end of the rule, but I cannot figure out how to get these dummy tokens from lexer