[Top][All Lists]

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

Re: How to make Bison disregard tokens?

From: Edsko de Vries
Subject: Re: How to make Bison disregard tokens?
Date: Fri, 2 Mar 2007 14:15:23 +0000
User-agent: Mutt/1.5.9i

On Fri, Mar 02, 2007 at 03:02:43PM +0100, address@hidden wrote:
> On Friday 02 March 2007 14:54, Edsko de Vries wrote:
> > If you have a
> > good solution for that, I'd be very interested to hear it!
> look at
> in the scanner you 'just' have to do all the bean counting yourself, and you 
> have to come up with a prober structure to keep the locations, but other than 
> that it is straight forward to implement.

The problem is that our scanner is rather complicated (lexical analysis
for PHP is not easy), and I'd rather not have the logic of the "bean
counting" as you refer to it mixed throughout with the logic of the
token generation. I've considered modifying YY_INPUT to keep count
automatically, but then you have to worry about the scanner looking
ahead and then backtracking, calls to yyunput, etc. 


reply via email to

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