How to make yyerror() report line?

2009-10-14 Thread Rui Maciel
How is it possible to make yyerror also report the line where an error was found? Thanks in advance, Rui Maciel ___ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

How can I understand the output of bison's debug output ??

2009-10-14 Thread wan sheg
How can I understand the output of bison's debug output ?? such as --(end of buffer or a NUL) --accepting rule at line 95 ("int") --accepting rule at line 173 (" ") --accepting rule at line 112 ("x") --accepting rule at line 173 (" ") --accepting rule at line 146 (";") --accepting rule at line

Re: yy_scan_string

2009-10-14 Thread never2di
Luca-63 wrote: > > never2di ha scritto: >> I'm a newbie to Bison + Flex. and I'm having trouble in getting >> yy_scan_string to work. I have tried the following >> >> YY_BUFFER_STATE my_string_buffer = yy_scan_string(my_string); >> yyparse(); >> yy_delete_buffer(my_string_buffer ); >> >> the pa

%name-prefix: manual not consistent with bison

2009-10-14 Thread Rui Maciel
I've just noticed that the manual entry on the %name-prefix option isn't consistent with the way Bison handles this option, as, while the manual states[1] that the option should be used like: %name-prefix "prefix" When Bison stumbles on that entry it throws an error. On the other hand, it acce

Re: yy_scan_string

2009-10-14 Thread Luca
never2di ha scritto: I'm a newbie to Bison + Flex. and I'm having trouble in getting yy_scan_string to work. I have tried the following YY_BUFFER_STATE my_string_buffer = yy_scan_string(my_string); yyparse(); yy_delete_buffer(my_string_buffer ); the parser errors out with a syntax error at the

Re: yy_scan_string

2009-10-14 Thread never2di
Philip Herron wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > never2di wrote: >> I'm a newbie to Bison + Flex. and I'm having trouble in getting >> yy_scan_string to work. I have tried the following >> >> YY_BUFFER_STATE my_string_buffer = yy_scan_string(my_string); >> yyparse()

Re: yy_scan_string

2009-10-14 Thread Philip Herron
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 never2di wrote: > I'm a newbie to Bison + Flex. and I'm having trouble in getting > yy_scan_string to work. I have tried the following > > YY_BUFFER_STATE my_string_buffer = yy_scan_string(my_string); > yyparse(); yy_delete_buffer(my_string_buffer ); >

yy_scan_string

2009-10-14 Thread never2di
I'm a newbie to Bison + Flex. and I'm having trouble in getting yy_scan_string to work. I have tried the following YY_BUFFER_STATE my_string_buffer = yy_scan_string(my_string); yyparse(); yy_delete_buffer(my_string_buffer ); the parser errors out with a syntax error at the first token. I have ve