A Call for Parsers

pudge on 2001-09-28T20:31:29

Dan writes "Through the rather impressive work of a number of people, we now parse subsets of several languages down to run on the Parrot interpreter, including Python, Ruby, Java Bytecode, and Tcl. (Not to mention Jako, of course, a new mini-language designed specifically for Parrot) Specifically absent from this list is, well... Perl!

So, anyone care to take this interesting feat on? We don't need a complete solution, of course, since we can't support that yet, but even something as simple as being able to parse and run:

   my int $foo;
   $foo = 1;
   while ($foo 

would be fine..."


where are the parsers?

hossman on 2001-09-28T23:54:50

Where are the existing parses for the other languages mentioned? (I didn't seem them when browsing through the CVS Repository)

... That way people can see examples of the kinds of things they'll need to do.

Re:where are the parsers?

Elian on 2001-09-29T02:45:39

Check the archives of perl6-internals on dev.perl.org. There's mention of them in there. (Jako ships with parrot at the moment, check the languages or little_languages directory) I'll try and get better references soon.

Re:where are the parsers?

jns on 2001-09-30T09:28:40

You might see for instance tclc
or ruby
or even python

Re:where are the parsers?

jns on 2001-09-30T09:42:44

Oh and of course Java Bytecode

Parse::Perl

acme on 2001-09-30T10:38:26

You know, this whole task of writing a Perl compiler would be much much easier if Damian released Parse::Perl ;-) So Damian, when will it be ready? Before Christmas?

Re:Parse::Perl

Damian on 2001-09-30T21:51:57

...much much easier if Damian released Parse::Perl...Before Christmas?

Definitely before a Christmas. ;-)

I'll update my projects page later today (it's about to become a public ToDo list), and you'll see where Parse::Perl sits in the queue.

(Hint: somewhere below Perl 6; preparing for my January speaking tour; updating Filter::Simple, Hook::Lexwrap, and Class::Multimethods; creating Attribute::Handlers::Filtered and Parse::FastDescent; and releasing Class::Delegation, Lingua::thlInganHol::yIghun, and about a dozen other new modules.)

Besides, if I wait a little longer, Brent Dax will have done most of the hard work for me! ;-)

Re:Parse::Perl

chromatic on 2001-10-01T01:15:34

*cough* Regexp::Configurable ? *cough*

If you wait a little longer, chromatic will have picked the API for you already. :)

(My apologies to Mrs. Conway for adding to your workload.)

Re:Parse::Perl

Damian on 2001-10-01T07:11:27

*cough* Regexp::Configurable ? *cough*

That's right: pour it on, all of ya! I ain't afeared o' drownin'!

Actually, it is now on the ToDo list, but not yet high enough for me to give you an ETA. Sorry.

If you wait a little longer, chromatic will have picked the API for you already. :)

I thought that was the whole idea! ;-)

Re:Parse::Perl

pudge on 2001-10-05T03:44:29

Hey, what about the Astral::Projection module?

Re:Parse::Perl

brentdax on 2001-10-03T20:38:04

Besides, if I wait a little longer, Brent Dax will have done most of the hard work for me! ;-)

Dammit, he's on to my plan to replace him! :^)

Be patient...

brentdax on 2001-10-03T20:46:28

...I'm working on it. Since the version I sent to the Perl 6 groups (which had variables, precedence-less operators and basically any straight built-in function call) I've convinced it to handle if statements and I'm working on if/else, while, and do/while. It's much more strict about syntax (I may add unparenthesized function calls soon) than Perl is.

On a fairly separate note, a question for Damian: how can I convince Parse::RecDescent that there's a semicolon at the end of every BLOCK, even if there isn't one? Is there some sort of lookbehind available?