[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: set flex start conditions from bison?
From: |
Rui Maciel |
Subject: |
Re: set flex start conditions from bison? |
Date: |
Tue, 25 Aug 2009 12:53:26 +0100 |
User-agent: |
KMail/1.12.0 (Linux/2.6.28-15-generic; KDE/4.3.0; x86_64; ; ) |
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 file from
> like any other.
Flex does generate a header file, which also holds the definitions for the
start
conditions. You can try it out by running the following:
flex --header-file=lex.yy.h test.l
If you defined starting conditions on your test.l file then the lex.yy.h will
hold the definitions. Unfortunately they are enclosed in a #define statement.
Rui Maciel
- set flex start conditions from bison?, Rui Maciel, 2009/08/25
- Re: set flex start conditions from bison?, Akim Demaille, 2009/08/25
- Re: set flex start conditions from bison?,
Rui Maciel <=
- Re: set flex start conditions from bison?, Akim Demaille, 2009/08/26
- Re: set flex start conditions from bison?, Rui Maciel, 2009/08/26
- Re: set flex start conditions from bison?, Akim Demaille, 2009/08/26
- Re: set flex start conditions from bison?, Rui Maciel, 2009/08/27
- Re: set flex start conditions from bison?, Akim Demaille, 2009/08/28
- Re: set flex start conditions from bison?, Rui Maciel, 2009/08/26