|Does Flex support file nesting (C/C++ like include files)? firstname.lastname@example.org (2000-08-10)|
|Re: Does Flex support file nesting (C/C++ like include files)? email@example.com (Kevin Handy) (2000-08-13)|
|Re: Does Flex support file nesting (C/C++ like include files)? firstname.lastname@example.org (2000-08-21)|
|From:||Kevin Handy <email@example.com>|
|Date:||13 Aug 2000 18:58:57 -0400|
|Organization:||Software Solutions, Inc|
> I am trying to do a parsar, using bison and flex, to read a file of the
> following format:
> #include "file1"
> If I move all the include statements to the end of the input file, Flex
> does work perfectly. So File chaining works as expected.
> What have I done wrong?
> Could anyone confirm Flex does support file nesting?
> Your help is much appreciated! Many thanks!!
> [Yes, flex does support file nesting. If you're not getting the EOF
> correctly, you're probably smashing the buffer or pointers to it somehow.
I've used include files in flex, and they work fine. If you want to
see the source to what I've done, go to http://www.srv.net/~kth and
get the btran.tgz file (Vax/Basic to C++ conversion program) I believe
I got most of the code out of the flex documentation for this.
It's includes are of the form '%include' instead of '#include', but
the same idea applies.
Return to the
Search the comp.compilers archives again.