Re: set flex start conditions from bison?

2009-08-25 Thread Rui Maciel
Hans-Bernhard Bröker wrote: > Rui Maciel wrote: > > Is it possible to set the flex start conditions from within bison? > > See "info flex faq unnamed-faq-71". The article you pointed out suggests that a flex-generated header file would be cleaner but it's unavailable. Yet, flex does export a hea

Re: set flex start conditions from bison?

2009-08-25 Thread Rui Maciel
Akim Demaille wrote: > AFAIK, Flex does not generate a header file with its definitions such > as start conditions, so you probably need to write a small wrapper > around flex that extracts it from the generated scanner *.c file. > Then, from the grammar file, just include that extracted fil

Re: set flex start conditions from bison?

2009-08-25 Thread Akim Demaille
Le 25 août 09 à 12:19, Rui Maciel a écrit : Is it possible to set the flex start conditions from within bison? I've set a couple of lexer start conditions in the flex file and added yy_push_state() to the bison file, which already includes a flex- generated header. Nonetheless, the compiler

set flex start conditions from bison?

2009-08-25 Thread Rui Maciel
Is it possible to set the flex start conditions from within bison? I've set a couple of lexer start conditions in the flex file and added yy_push_state() to the bison file, which already includes a flex- generated header. Nonetheless, the compiler still complains that the start condition symbol