On Wed, Dec 07, 2005 at 16:48:11 -0500, Peter Schwenn wrote: > Dear Perl6 Language, > > I am Perl user from near year 0. For me the easiest way to learn (, > track, and get to the point of contributing to) Perl6 would be a Perl > grammar (a regex rule set in, preferably, Perl6) that transforms any > Perl5 script into a Perl6. Of couse, besides learning Perl6 for a > regex'r or Perl5'r such as myself, and tracking, and documenting 6, it > would have huge use for Perl5 users making or considering the > transition.
IMHO machine translation is not that good a way to start learning - the real benefit of Perl 6 is in the features which have no perl 5 equivalents and solve problems much more elegantly. The best thing to do is to hang out on #perl6 and get involved with the test suite, as well as reading the synopses. Perhaps writing a toy program or something like that could also help. > For example one can infer the structure and some of the rules from > http://svn.openfoundry.org/pugs/docs/other/porting_howto which is > however written out in informal (not regex) rules such as $array[idx] -> > @array[idx] These are rules for humans with lots and lots of context info... Furthermore, they are more of a perl 6 gotcha list, for perl 5 programmers than a translation guide. > Is there such a Perl5->Perl6 translator underway? Larry Wall is working on using the perl (5) interpreter to create compiled output (as opposed to just something that executes in memory) that can then be read by a translator without actually parsing perl 5. Before this happens this will be very very hard - the high level language has vast amounts of implications on execution etc, but the opcode tree is much more simpler to predict (for a computer). > p.s. The developing form of such a grammar could likely lead to > a grammar package which facilitates rule sets for languages in > other domains, in terms of illuminating means of choosing among modes > for rule ordering, collecting, scoping, re-application, recursion, exclusion > and so forth. Since perl 5's actual parser and tokenizer will be used for this it won't be very extensible, but this is important because perl is reaaaaaaaaaaaaaaaaaaaaaaaaallly hard to parse. -- () Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker & /\ kung foo master: /me supports the ASCII Ribbon Campaign: neeyah!!!
pgpnA5re5zZw2.pgp
Description: PGP signature