On 04.04, Pablo Neira Ayuso wrote: > On Sat, Apr 04, 2015 at 01:13:06PM +0200, Alexander Holler wrote: > > Context sensitive handling of "param-problem" and "redirect" is necessary > > to allow usage of them as token or as string for icmp types. > [...] > > I think we need some evaluation step at scanner level. This new > evaluation routine needs to understand the token semantics to set some > context information. > > "redirect" { return scanner_evaluate(ctx, REDIRECT); } > > We have to catch up more use cases such as sets and concatenations. I > started a patch here, a bit more generalized than this when you > reported this problem (we actually already knew about it). > > @Patrick, any better idea? This won't work because the grammar currently allows both cases. The proper solution IMO is to change the grammar so we know where such keywords are keywords and where they are constants. Basically this involves splitting the expression types into lhs (non-const) and rhs (const) parts. Keywords on the RHS side can be caught using an error statement and deferred to resolution during runtime. The second benefit is that we can then use the grammar for tab completion. I have patches for this, but as I'm currently trying to get the remaining set and concat patches submitted, I won't be able to work on this until after the merge window closes. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html