On Jan 17, 2006, at 18:01, Andrew Rodland wrote:
Doesn't that imply that "print print print print 1;" is a valid Punie
program? Is that intentional? It seems to me that the gprint rule
should instead contain "cexpr":
rule gprint { (print) \s* <PunieGrammar::cexpr> }
"print print print print 1;" is certainly a valid Perl 5 program;
it prints a
1 followed by 3 other things (which are defined to be true, and
which happen
to also be the number 1). Digging on retroperl.cpan.org shows that
it did
exactly the same thing on perl 1.0.0. So to answer your question, it's
probably intentional :)
Yup, that part of the punie grammar is pretty direct translation of
the original perl.y.
Allison