> On 7 Apr 2022, at 10:14, tom2 <t...@tomflux.xyz> wrote: > > It does actually cause an issue because I am rely on the idea that the rule > will be matched before the next if token is found, in order to have nested > conditionals.
Typically, one build an AST (abstract syntax/semantic tree) that can be executed after the parse. This is necessary for loops. Sometimes it is necessary to avoid lookahead when the lexer has context switches that are set in the parser; this can be done by have a distinct lookahead token for such contexts (there is more info about it in the Bison manual somewhere).