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

Ric Klaren klaren at cs.utwente.nl
Wed May 7 03:08:11 PDT 2003


Hi,

On Wed, May 07, 2003 at 09:44:45AM -0000, micheal_jor wrote:
> The exchange below from the pccts newsgroup properly belongs here...
>
> I'd just like to add that the technique Kunle describes applies to
> Java as well.
>
> Not sure about how it can be done with C++ in the general case, Ric?.
> Monty?

You could hack something together that does this I guess. Dynamic loading
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.

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

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)

Cheers,

Ric
--
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893722  ----
-----+++++*****************************************************+++++++++-------
  Chaos is found in greatest abundance wherever order is being sought.
  --- Terry Pratchet


 

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




More information about the antlr-interest mailing list