On Jan 14, 2008 12:38 PM, Allison Randal <[EMAIL PROTECTED]> wrote: > Klaas-Jan Stol wrote: > > > > Was there a "programming perl" book for Perl 1? Or any other books? > > For now I'm kinda stuck, because I don't know the exact semantics of > each > > construct of Perl 1. > > I ran into the same thing. The first edition of "Programming perl" > wasn't until Perl 4. The best you're going to do is Larry's examples > post <http://dev.perl.org/perl1/dist/example.gz>. If you pass the test > suite, and those code examples, that's a reasonable success. > > When you need to fill in gaps in the semantics that aren't covered by > the tests, and aren't decodable by digging through the Perl 1 source > code, you can assume that it's fundamentally similar to Perl 5. (That > is, don't add Perl 5 features, but use Perl 5 semantics for the Perl 1 > features, as long as it still passes the tests.) For example, I used the > Perl 5 operator precedence table for PGE's OPP tools. Perl 1 doesn't > really have a documented operator precedence table, it only has a > parsing order.
a bit of topic, but just a note on this remark: Unless I misunderstood the Yacc/bison manual, the /order/ in which the operator associativity is declared, defines the precedence, from top to bottom in increasing order. So: %left '+' '-' %left '*' '/' '%' means that *, / and % take precedence over + and -. > But, Perl 5's operator precedence table works for Perl 1 > and passes the tests. > > If we later run across old Perl 1 code that doesn't work with Punie on > these assumptions, we can always change Punie to match. > thanks for your tips! kjs > > Allison >