Re: YACC and yyerror



i would like to know how i can continue scanning my file after it has
detected a syntax error. I have yyerror which is called when an error
is found

That is not quite true. Yacc uses an error token. You can define rules
containing this
token to recover from errors. AFAIK, it depends on the yacc version
(yacc, byacc, bison).
Have a look at

http://publib16.boulder.ibm.com/pseries/en_US/aixprggd/genprogc/yacc_prg_error.htm

Hubble

.



Relevant Pages

  • Re: bash 4.2 patchlevel 28
    ... bash: command substitution: line 3: syntax error near unexpected token ... It's patch level 12. ... parse.y through yacc, it breaks. ... You must use bison. ...
    (freebsd-stable)
  • Re: Default argument values for blocks
    ... Yukihiro Matsumoto wrote: ... > Mostly because yacc does not allow it. ... It confuses ... > and causes syntax error. ...
    (comp.lang.ruby)
  • Re: Csup cvsmode build discussion
    ... lex and yacc files that I would like to discuss. ... I implemented the RCS parser required to operate on RCS files ... I've been compiling the parser and tokenizer with the help of bison ... Now, the base system already have flex, but the flex version in base is heavily ...
    (freebsd-hackers)
  • Csup cvsmode build discussion
    ... lex and yacc files that I would like to discuss. ... I implemented the RCS parser required to operate on RCS files ... I've been compiling the parser and tokenizer with the help of bison ... Now, the base system already have flex, but the flex version in base is heavily ...
    (freebsd-hackers)
  • Re: Error reporting, was Infinite look ahead required by C++?
    ... Yacc and Bison don't support reporting errors in this form AFAIK, ... There indeed doesn't appear to be a way in Yacc to access the state and ... one of the issues with yacc and bison ... tables and produce the desired list of expected tokens. ...
    (comp.compilers)