develooper Front page | perl.perl6.internals.api.parser | Postings from December 2000

Re: the mutant beast (was Re: Backtracking through the source)

Thread Previous | Thread Next
Dan Sugalski
December 2, 2000 00:46
Re: the mutant beast (was Re: Backtracking through the source)
Message ID:
At 08:42 PM 12/1/00 -0500, Bradley M. Kuhn wrote:
>I believe that to do a true port to the JVM (e.g., supporting
>eval($STRING)), we'll need to implement a bootstrapping parser for the
>parser code in Java.
>My concern is that the more integrated the lexer, parser and tokenizer are
>integrated, the harder it will be to reimplement in other languages.

It's more than just the parser. You've got the bytecode compiler and 
possibly the optimizer as well, and they're probably going to be all, or 
mostly, C. On the other hand they might not have any internal hooks for 
perl code to wedge into, in which case they're just black boxes and not of 
much concern.

>Can anyone address this concern?  Will it still be easy to reimplement the
>whole "mutant beast" anew as needed?

It'll never be easy, not even the first time. :)

>At this point, since the discussion still quite abstract (i.e., we have no
>APIs ;), I am unable to talk myself down that this won't be a problem.  Can
>someone else talk me down?  ;)

It might be a problem. But, then, it might not. That is, unfortunately, 
rather difficult to say one way or the other. I don't think you'll have any 
more trouble that way than any other way--it's going to be a pain no matter 
how you slice it, and emulating the internals of perl are going to be a 
bitch for anyone not using the core interpreter.

That probably didn't talk you down, did it? :-/


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai                         have teddy bears and even
                                      teddy bears get drunk

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About