RE: cloning precompiled parsers or mixing with non-precompiled

[email protected] (Dave McD)
Newsgroups perl.recdescent
Message-ID <[email protected]>
Thank you Yves, I will give that a try!

The large grammar is for a proprietary hardware
description language which also supports a compile
time grammar on top of the basic language.

Dave Mc

--- "Orton, Yves" <[email protected]> wrote:
> Dave McD wrote:
> 
> > It seems that the namespace for pre-compiled
> parsers
> > (ie. compiled into a perl module) have hard-coded
> > namespaces (IE. namespace00001). 
> 
> Hmm. well line 1692 reads:
> 
> my $nextnamespace = "namespace000001";
> 
> So if you find that then I think that if you add the
> following
> 
> sub set_namespace {
> 	local $_=$_[1];
> 	croak "$_ is not a legal namespace." if /[^\w]/;
> 	$_.="00" unless /\d+$/;
> 	$nextnamespace=$_;
> }
> 
> Then you can call
> 
> Parse::RecDescent->set_namespace("MyNameSpace");
> 
> And it will start counting in the new namespace. 
> 
> HTH for now...
> 
> Yves
> 
> 
> 
> 
> 


__________________________________________________
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.