[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]Treecc help required
From: |
Rhys Weatherley |
Subject: |
Re: [DotGNU]Treecc help required |
Date: |
Wed, 21 May 2003 07:27:51 +1000 |
User-agent: |
KMail/1.4.3 |
On Tuesday 20 May 2003 11:07 pm, CH Gowri Kumar wrote:
> Hi all,
> Is it possible to add our own code into the *create functions
> which are created by the treecc (through some option).
It isn't possible to augment what happens in "create". I would normally
define a helper function which calls the create routine and performs the
additional work afterwards.
In your case, you appear to be creating a doubly linked list with an extra
dummy head node. Why not dispense with the dummy head and use "head = NULL"
and "tail = NULL" to indicate an empty list? Then the default treecc
"create" logic will properly initialize the list.
> %option no_allocator
>
> seems to be saying something abt. it, but not too sure
> it that's useful here.
no_allocator allows you to replace yynodealloc, yynodeclear, etc with your own
versions. It isn't relevant to what you're trying to do, since node
allocation happens at a much lower level than the "create" functions.
Treecc tries to solve the common case uniformly and well. So sometimes it can
be a little annoying for the less common cases.
Cheers,
Rhys.