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

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



Bart Schaefer wrote:

> 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 we are quite picky about distinguishing between the two.

> But perhaps a better question is: `tok' is a global, right? 

Yes.

> Why not put
> the `tok = LEXERROR' into yyerror() itself?

Good question. Haven't looked yet...

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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