On Tuesday 19 July 2005 15:01, Evan Lavelle wrote: > Thanks Tim. At first sight, this fix should be exactly what I need; > however, in my case, it doesn't work... :( > > The problem is that COBOL has a real keyword - FUNCTION - to 'lock on' > > to. So, in your production: > > xxx > > > > : { recognize_function_names = true; } FUNCTION valid_function > > > > ; > > the lexer can recognise FUNCTION, independently of context. The problem > is, in my input, there aren't *any* context-independent keywords (not in > this case, anyway). This is equivalent to the COBOL problem where > FUNCTION is optional. The grammar looks like this: [...]
> The only way that I know a new function is coming up is that an existing > function has just completed: there's no convenient keyword to give me > warning. Out of curiosity, what language are you building a parser/scanner for? XPath/XQuery? Cheers, Frans _______________________________________________ Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison