[antlr-interest] [comp.compilers.tools.pccts] Re: Is there a run-time parsing facility

micheal_jor open.zone at virgin.net
Wed May 7 15:11:45 PDT 2003

> Hi,

Hi Ric,

> > Not sure about how it can be done with C++ in the general case, 
> > Monty?
> You could hack something together that does this I guess. Dynamic 
> works pretty ok on unix, yet you need a working compiler set, some 
way to
> specify the right libraries and stuff for the loaded parts.

Dynamic loading (DLL) is at the core of Windows too.

> Best would probably be to rewrite a bit and convert the switch 
> and contents to tables with char ranges and function pointers to the
> actions (bit of a simplified description this). These then could be 
> on runtime. Parser would then degenerate to a driver for these 

My first thought was defining COM-like binary interfaces for the 
Lexer/Parser/TreeParser that generated components will be required to 
implement. All interaction is then through those binary interfaces. 
Of course this is much easier for Windows - since COM is present - 
than other platforms (although Mozilla's XPCOM fills the gap nicely).
In the end, it similar to the C#/Java solution actually but the devil 
is in the details as you mentioned.

> I guess it's doable but not with the time I have to spent on antlr 
atm (and
> then I'm not even mentioning d*mn MSVC)

With MS's recent-ish "acquisitions" of quite a few good C++ guys like 
Herb Sutter and Stan Lippman, it can only get better right?




Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

More information about the antlr-interest mailing list