help-bison
[Top][All Lists]
Advanced

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

Re: Bison & flex on start conditions


From: Henrik Sorensen
Subject: Re: Bison & flex on start conditions
Date: Sat, 14 Jan 2006 22:00:40 +0000
User-agent: KMail/1.8.3

On Friday 13 January 2006 13.10, Steve Murphy wrote:
> Hello--
>
> Been playing with bison/flex for years; think they're great.
indeed !
>
> There are few interoperability issues between them, however.
well, that's of course a point of view, but IMO they really serve two 
different purposes.
>
> One that would be nice to smooth out would be the start-condition
> capability in flex... and how to trigger it from the bison grammar end
> of things.
Can you be more specific why you want to do this ?

In my pl1 project, I had similar thoughts, but then I thought a bit harder, 
and didn't need it. The advantage of having the scanner completely free of 
the context of the grammar, outweigthed any code that would have allowed 
bison to influence the start state of flex.
For the pl1 problem, I cheated a bit with flex, and when certain conditions 
are met I simply save all the token met, and then change them to what I need 
before returning the tokens to bison. If you are interested in more feel free 
to contact me, or better look at the code (pl1gcc.sourceforge.net).

> murf
Henrik




reply via email to

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