cloning precompiled parsers or mixing with non-precompiled

[email protected] (Dave McD)
Newsgroups perl.recdescent
Message-ID <[email protected]>
Damian,

It seems that the namespace for pre-compiled parsers
(ie. compiled into a perl module) have hard-coded
namespaces (IE. namespace00001).  I was trying to
clone one of these parsers by calling its 'new'
method, but each parser is sharing the same namespace
and thus any global variables I have in that namespace
within a startcode block of my grammar before the
first rule get overwritten by the other corresponding
parser.  I assume this is not a problem for parser
objects created directly from RecDescent directly
since it seems to increment its 'namespace' variable
every time 'new' is called.  The grammar I am using is
huge (ie. the precompiled grammar module files are
almost 5MB), so I really want to use precompiled
grammars.  If I mix a large, single pre-compiled
grammar with some smaller grammar objects which I
create directly from RecDescent, I suspect this is
still going to be a problem since the first smaller
grammar object will still share the same namespace as
the large precompiled grammar?

BTW Damian, I don't know if you have had time lately
to view the posts here, but when you do, there are a
few of my posts that I could use some answers on. :)

Cheers,

Dave Mc


__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.