Re: Platforms supported by Bison

2006-12-28 Thread Hans Aberg
On 28 Dec 2006, at 19:21, YiQing Yang wrote: I would like to know if it supports Windows, Linux and major UNIX systems (Sun, HP, IBM). If I want to try Bison on a particular system, what settings do I need to make before trying to run it. Note that there is a difference between running B

Re: re-entrant parser scanner "%pure-parser g++

2006-12-28 Thread Hans Aberg
On 28 Dec 2006, at 16:59, Anouar LACHHEB wrote: I'm using flex 2.5.4a, ... This version is ancient; see http://flex.sourceforge.net/ Hans Aberg ___ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

RE: re-entrant parser scanner "%pure-parser g++

2006-12-28 Thread David Fang
> I tried before your solution using a common .h file for .lex and .yacc, > however since I'm using "%pure-parser" in my .yacc, the YYSTYPE used in > "yylex" proto is not visible to the .h itself. Hi, If you pass '-d' to bison, it should produce a header file with enumerations and the definition

Re: Platforms supported by Bison

2006-12-28 Thread Bob Rossi
On Thu, Dec 28, 2006 at 10:21:27AM -0800, YiQing Yang wrote: > Thanks Hans for your reply. > > I would like to know if it supports Windows, Linux and major UNIX systems > (Sun, HP, IBM). > If I want to try Bison on a particular system, what settings do I need to > make before trying to run it.

RE: Platforms supported by Bison

2006-12-28 Thread YiQing Yang
Thanks Hans for your reply. I would like to know if it supports Windows, Linux and major UNIX systems (Sun, HP, IBM). If I want to try Bison on a particular system, what settings do I need to make before trying to run it. Thanks, YiQing Yang -Original Message- From: Hans Aberg [mailt

RE: re-entrant parser scanner "%pure-parser g++

2006-12-28 Thread Anouar LACHHEB
Hi David, I tried before your solution using a common .h file for .lex and .yacc, however since I'm using "%pure-parser" in my .yacc, the YYSTYPE used in "yylex" proto is not visible to the .h itself. Any help (more verbose please) ? Here is the yylex proto: #define YY_DECL int yt_unique_datalo

Re: re-entrant parser scanner "%pure-parser g++

2006-12-28 Thread David Fang
> bison --debug -px -o x.c -dv x_yacc.c > g++ -c -o x_yacc.o x_yacc.c > > I got a compilation error: > > x_yacc.c: In function `int x_parse(char*, char*, int)': > x_yacc.c:1382: error: `x_lex' was not declared in this scope > make: *** [linux32/x_yacc.o] Error 1 Hi, You need to declare a matchin

re-entrant parser scanner "%pure-parser g++

2006-12-28 Thread Anouar LACHHEB
Hi, I'm using flex 2.5.4a, bison 2.3 & g++ 3.4.5. I added "%pure-parser" directive to my .yacc in order to produce a re-entrant parser and I compile my .lex.c with g++ in order to get a re-entrant scanner (as written in flex manual). I defined YY_DECL as follow (in .lex prelude): %{ //Head

Re: parsing compressed files with flex & bison

2006-12-28 Thread Hans Aberg
Flex was not built to generate lexers for essentially binary files, though you may try it. And one can easily pipe streams under UNIX- like OS's. Hans Aberg On 28 Dec 2006, at 14:27, Aïmen Troudi wrote: I want to parse files in one pass for 2 reasons : 1- size of (5) files is important

POSIX threads %union YYSTYPE

2006-12-28 Thread Anouar LACHHEB
Hi Hans, You are right, "YYSTYPE" is defined in .yacc.h as "%union" directive. Best regards, AnL. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hans Aberg Sent: jeudi 28 décembre 2006 13:16 To: Anouar LACHHEB Cc: Help Bison Subject: Re: (no subject) O

Re: Platforms supported by Bison

2006-12-28 Thread Hans Aberg
On 22 Dec 2006, at 02:34, YiQing Yang wrote: I am interested in using Bison to generate parser for a query language. I would like to know what are all supported platforms for Bison. I am not sure there is such a list, but it checks on each platform what features are available. Hans Abe

Re: Suggestion: enumerating non-terminals

2006-12-28 Thread Hans Aberg
On 21 Dec 2006, at 00:34, Tony Li wrote: I have a small proposal that I'd like to float. In building a parse tree for a complex language, it's very helpful to identify which nodes correspond to which productions in the grammar. Bison already has internal identifiers for each non- terminal

Re: (no subject)

2006-12-28 Thread Hans Aberg
On 27 Dec 2006, at 20:41, Anouar LACHHEB wrote: I want to use POSIX threads into my application which includes a scanner and a parser. I read that in that case I have to use re- entrant parser through %pure-parser directive. I notice that I need to introduce some changes to my parser such as

Re: parsing compressed files with flex & bison

2006-12-28 Thread Hans Aberg
On 26 Dec 2006, at 11:48, Aïmen Troudi wrote: I have to support compressed files in a project with flex & bison, actually, the project support only ascii files, my question is : How to manage compressed files (zip,gzip,bzip2,Z) with flex & bison ? Can I used zlib library with flex & bison ?