Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

philcrow (3401)

  (email not shown publicly)

Journal of philcrow (3401)

Monday April 16, 2007
06:01 PM

Java to Perl Grammar snag

[ #33004 ]

I've hit a snag with my Java to Perl 6 API converter. Apparently pugs grammars are not yet returning ASTs as the synopsis describes.

I'm still weighing what to do about that. There are several options. Of course, I could learn Haskell and pitch in on the grammar internals of Perl 6, but that seems unlikely. I'd be starting from scratch on Haskell, having never coded in a functional language before, with almost no background in grammar implementation (one admittedly close reading of the dragon book notwithstanding).

Alternatively, I could approach this as an exercise in Perl 6 generation where the implementation language of the generator is immaterial. This is not ideal, because part of why I wanted to work on this project was to learn about Perl 6 grammars. But it would enable me to implement something. Then I would implement the code in Perl 5, waiting for the right moment to translate it to Perl 6.

Or, if grammars building ASTs are imminent, I could wait for the features to appear, then start.

I'm leaning heavily toward implementing in Perl 5, but have not yet firmly decided.

In the meantime, I've been thinking (with help from Tim Bunce) about the structure of the AST I want the grammar to build. The design sketch is basically done.

All that is to say, that I hope to make some coding progress this week.


The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.