Re: Table of Perl 5 Operators

Alberto Manuel Brandão Simões <[email protected]>
Newsgroups gmane.comp.lang.perl.perl5.porters,gmane.comp.lang.perl.fun
Message-ID <[email protected]>
He! Nice colection. Now, anybody up to DRAW the table? :)

Michael G Schwern wrote:
> You've seen Mark Lentczner's Periodic Table of Perl 6 Operators
> http://www.ozonehouse.com/mark/blog/code/PeriodicTable.html
> 
> What about one for Perl 5?
> 
> Using perlop, opcode.pl and Mark's table I've done step one: drawn up a
> complete list of Perl 5 operators.  All 129 of them [1] in no particular
> order.
> http://www.pobox.com/~schwern/tmp/perl5ops
> 
> I've followed Mark's lead as to what is and is not an op.  The -X filetest
> operators, despite being in perlfunc, are ops.  "scalar" is listed to
> match up with Mark's Contextegens.  "ref", "exists", "delete", etc...
> are listed to match up with the Textaveries.  "sub" is not an op, that's
> syntax... I guess.  I've asked Mark what his system was for deciding what
> is an what is not an op but it seems fairly sensible to me.
> 
> So... did I miss anything?
> 
> The big step is to work out operator precedence.  perlop has a 24 level
> precedence table but I suspect that's perhaps the biggest white lie in all
> the Perl docs.  Can Perl 5 even be said to have a simple enough idea of
> op precedence to apply a number to each op?  If so, how does one go about
> figuring this out?
> 
> 
> [1] Mark's table shows 180 ops, but its a year out of date.  If we remove
> the bitwise operators we get 153 for Perl 6 and 123 for Perl 5 and things
> start to look more sane.
> 

-- 
Alberto Simões - Departamento de Informática - Universidade do Minho
                  Campus de Gualtar - 4710-057 Braga - Portugal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.