bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FYI: default %destructor/%printer for error, $undefined, $accept


From: Paul Eggert
Subject: Re: FYI: default %destructor/%printer for error, $undefined, $accept
Date: Mon, 21 Aug 2006 15:31:17 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

"Joel E. Denny" <address@hidden> writes:

> I'm also thinking it's strange that the user can declare %type, 
> %destructor, and %printer for the error token.  I'm thinking it's even 
> stranger that the parser copies the semantic value for the error token 
> from the lookahead (yylval), for which there may be a separate %destructor 
> invocation.

Obviously it's bogus to copy the value from the lookahead token.  But
what about "error: ...;" rules?  For them, it sort of makes sense to
have a type for the error token.

Perhaps if we had some way to specify the semantic value for an error
token that is generated internally by the parser?  Just thinking out
loud here.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]