Re: flex header file

2011-06-13 Thread Stefano Lattarini
[adding bug-automake, so that we won't forgot about this report]

On Monday 13 June 2011, Pippijn van Steenhoven wrote:
 Hi,
 
 in some of my projects, I use (reentrant) flex with the header-file
 option. This causes flex to generate a .h file in addition to the usual
 lex.yy.c file. However, ylwrap doesn't know about this. What would be the
 correct way to use flex with header files?

I see two ways out, not mutually exclusive:

 1. Introduce a new automake option `no-ylwrap', instructing automake not
to use ylwrap to process Yacc and Lex files; this should assume that
bison and flex can be used, so that we know no problem with concurrent
make will arise (we can use the `--output' option for both tools).
Then you can manually add some rules about the header on your
Makefile.am, without ylwrap getting in your way.

 2. Improve ylwrap and automake Lex support to recognize the `--header'
Lex option, similarly to what is done for the `-d' Yacc option, and
emit code handling the header creation, dependencies, etc.

Regards,
  Stefano



flex header file

2011-06-12 Thread Pippijn van Steenhoven
Hi,

in some of my projects, I use (reentrant) flex with the header-file
option. This causes flex to generate a .h file in addition to the usual
lex.yy.c file. However, ylwrap doesn't know about this. What would be the
correct way to use flex with header files?

Regards,
-- 
Pippijn van Steenhoven


signature.asc
Description: Digital signature


ylwrap and flex --header-file

2009-03-24 Thread Jan Engelhardt
Hi,


when one uses --header-file in conjunction with ylwrap, the header file 
is produced in the temporary directory ylwrap runs in instead of 
${srcdir}. I think this should be addresses somehow - I'm open 
to suggestions or ideas on how this could be tackled. One way would 
probably just to add ../ in the right place.

# -*- Makefile -*-
AM_LFLAGS = --header-file=$(:.l=.h)
foo_SOURCES = scanner.l main.c

scanner.h: scanner.l


/* main.c */
#include scanner.h

main_program_here