help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lexical feedback and lookahead


From: Frans Englich
Subject: Re: Lexical feedback and lookahead
Date: Wed, 27 Jul 2005 15:42:55 +0000
User-agent: KMail/1.8.50

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]