Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
242 views
in Technique[技术] by (71.8m points)

parsing - Can only 'perl6' parse Perl 6?

There's that (relatively) well known Perl axiom, "Only perl can parse Perl." I'm wondering, will that remain true for Perl 6?

Expanding the discussion... I thought of this question given the recent update of PyPy. Does Perl's unique parsability preclude it from similar efforts? Is there much value in a restricted, static view of Perl code (PPI?)? Can Perl 6 have a JIT compiler?*

* I'm not sure if these concepts are related. Are they?

question from:https://stackoverflow.com/questions/5916194/can-only-perl6-parse-perl-6

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

There is no perl6, and there are many Perl 6 compilers. Perl 6 has a grammar, although it's written in Perl 6, so as long as you can understand that, it tells you everything you need to know.

I just asked Larry this question, since I'm sitting across from him at lunch at the S?o Paulo Perl Workshop. He says it's now "Only Perl 6 can parse Perl 6", with capital letters on both Perls, which means something different than the original statement.

You don't need a specific program to do that though since Perl 6's goal is one standard and many implementations. There is no "perl6", although Larry had that aliased to his Rakudo for today's talk, even though he used a few different implementations for the examples.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...