On 06/20/2011 03:34 PM, Ian Romanick wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 06/17/2011 05:43 PM, Dan McCabe wrote:
We now tie the grammar to the ctors of the ASTs they reference.
This requires that we actually have definitions of the ctors.
In addition, we also need to define "print" and "hir" methods for the AST
classes. At this stage of the development, we simply stub out the "print"
and "hir" methods and flesh them out later.
Also, since actual class instances get returned by the productions in the
grammar, we also need to designate the type of the productions that
reference those instances.
+ void *ctx = state;
+ $$ = new(ctx) ast_switch_statement($3, $5);
In this instance (and the similar ones below), I'd just do 'new(state)'.
After most of the parser was written we started always calling the
memory context mem_ctx.
Will do. It wasn't clear to me what the rhyme or reason was behind using
state vs. ctx. Apparently, my usage matched that rationale.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev