RE: Precompiled grammars and Start-up Actions

[email protected] ("Orton, Yves") Tue, 22 Apr 2003 09:36:31 +0100
Newsgroups perl.recdescent
Message-ID <71B318898201D311845C0008C75DAD1C08960969@defra1ex2>
> Or you could simply have a "reinitialize" start rule whose 
> only purpose is to reset whatever variables you need to 
> initialize.  After calling that start rule you could then 
> call the "regular" start rule to parse your data.  I've done 
> that in a couple of different grammars and it works great.

Yeah thats also an approach. Im not sure if I would go that way in this
case, if only cause im a tad forgetful and id probably forget to call the
reset. I think it probably comes down to whether it makes sense to allow the
parser to maintain its state in between parses or not. If it didnt then I
would go my way. If it did then i'd go your way.

Anyway, much of muchness innit?

;-)

yves