Phil Sutter <phil@xxxxxx> wrote: > > I don't see a solution, perhaps add dummy bison rule(s) > > to explicitly signal closure of e.g. a rule context? > > We can't influence start conditions from within bison (if that's what > you had in mind). Why not? in scanner.l: void scanner_pop_start_cond(void *scanner) { yy_pop_state(scanner); } And then call it from bison as 'scanner_pop_start_cond(nft->scanner)'. Needs %stack in scanner.l so yy_pop_state() is defined. bison has more clue as to when a expression/rule/set block etc has finished parsing than the scanner. Not sure tracking { } nesting depth is enough with a pure scanner.l approach.