On 10 Oct 2005, at 20:21, Gill,Michael J wrote:
Hans,
Thanks for the response. So, I can indicate an error in the actions
with YYERROR if the data type of the VAR from the dtype field of the
symrec union is wrong. How do you indicate to Bison that this is an
error? Do I need to set YYERROR to something (i.e. True)?
Look in the output file. It is just a macro jumping to the error
recovery place. There is alos YYABORT, which terminates the parser
instead. Look in the Bison manual for details.
Also, I
don't think I really understand the Bison type system is it
possible to
have a dynamically typed VAR specified in the grammar only without
checking its type in the actions?
No, only statically typed in Bison static type system. Static =
compile-time, dynamic = run-time. The grammar actions are executed at
parser run-time. If VAR is dynamically typed, it must be checked at
run-time.
Hans Aberg
_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison