Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH (!): Re: PATCH: (very) bad syntax error checking



On May 29, 10:27am, Sven Wischnowsky wrote:
} Subject: Re: PATCH (!): Re: PATCH: (very) bad syntax error checking
}
} Bart Schaefer wrote:
} 
} > I wonder why parse_list() doesn't use YYERROR() ... is there some reason
} > why `ecused' should not be set to 0 in that specific case?
} 
} It doesn't use YYERROR* because it has to return NULL and we have
} YYERRORs only for void and integer, I think (I didn't change that
} part).

Zero is NULL, and NULL is zero.  Using YYERROR(0) would return NULL.

But perhaps a better question is: `tok' is a global, right?  Why not put
the `tok = LEXERROR' into yyerror() itself?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



Messages sorted by: Reverse Date, Date, Thread, Author