Re: Including a new file in Bison sources

2006-07-24 Thread Guillaume Rousse
es. Just list bison source file among other sources, and list header as generated source: hello_SOURCES = main.c hello.y BUILT_SOURCES = hello.h Otherwise, have a look at automake manual: http://www.gnu.org/software/automake/manual/html_mono/automake.html#Yacc%20and%20Lex -- Guillaume Rousse Projet Est

mid-rule actions and lexical ties-in

2006-06-27 Thread Guillaume Rousse
ule at line 64 (";") Next token is token ";" () Reducing stack by rule 101 (line 392): pushing back 8 last bytes -> $$ = nterm @7 () Stack now 0 1 8 16 21 25 66 107 160 199 Entering state 201 Next token is token ";" () syntax error, unexpected ;, expecting VALUE_FLOAT_BINARY at line 8 Am i missing something there ? -- Guillaume Rousse Projet Estime, INRIA Domaine de Voluceau Rocquencourt - B.P. 105 78153 Le Chesnay Cedex - France ___ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Re: better error reporting with bison and flex

2006-06-27 Thread Guillaume Rousse
Tim Van Holder wrote: > Guillaume Rousse wrote: >> Which is really not meaningful for user :/ I'd prefer to at least >> display current line, and avoid refering to internal grammar symbols. > > Part 2 - not referring to internal grammar symbols: use string aliases

Re: better error reporting with bison and flex

2006-06-22 Thread Guillaume Rousse
, but not in yyerror(). I can use yytext, indeed, but this only give me found symbol, not expected ones: syntax error, unexpected TYPE_FLOAT_BINARY, expecting TYPE_INT or TYPE_STRING or TYPE_FLOAT <- bison message found token: %fb <- yytext -- Guillaume Rousse Projet Estime, INRIA Domain

better error reporting with bison and flex

2006-06-22 Thread Guillaume Rousse
1D_STOP Location: line 7, columns 0-0 Which is really not meaningful for user :/ I'd prefer to at least display current line, and avoid refering to internal grammar symbols. I've searched mailing-list without success. I also read generated scanner.c file, in order to access yy_current_buffer o