B-DeparseTree
view release on metacpan or search on metacpan
lib/B/DeparseTree/PP_OPtable.pm view on Meta::CPAN
# 21 right ! ~ \ and unary + and -
# 20 left =~ !~
# 19 left * / % x
# 18 left + - .
# 17 left << >>
# 16 nonassoc named unary operators
# 15 nonassoc < > <= >= lt gt le ge
# 14 nonassoc == != <=> eq ne cmp
# 13 left &
# 12 left | ^
# 11 left &&
# 10 left ||
# 9 nonassoc .. ...
# 8 right ?:
# 7 right = += -= *= etc.
# 6 left , =>
# 5 nonassoc list operators (rightward)
# 4 right not
# 3 left and
# 2 left or xor
# 1 statement modifiers
# 0.5 statements, but still print scopes as do { ... }
# 0 statement level
# -1 format body
%PP_MAPFNS = (
# 'avalues' => ['unop', 'value'],
# 'values' => 'unop', # FIXME
# 'sselect' => 'listop', FIXME: is used in PPfns
# 'sockpair' => 'listop', ""
# 'exec' => ['maybe_targmy', 'unop'],
# 'exp' => ['maybe_targmy', 'listop'],
# 'or' => ['logop', 'or', 2, '//', 10, "unless"],
# 'preinc' => ['maybe_targmy', 'pfixop', "++", 23],
# 'print' => ['indirop'],
# 'prtf' => ['indirop', 'printf'],
# 'xor' => ['logop', 'xor', 2, '', 0, ''],
'aassign' => ['binop', '=', 7, SWAP_CHILDREN | LIST_CONTEXT, 'array assign'],
'abs' => ['maybe_targmy', 'unop'],
'accept' => 'listop',
'add' => ['maybe_targmy', 'binop', '+', 18, ASSIGN],
'aeach' => ['unop', 'each'],
'akeys' => ['unop', 'keys'],
'alarm' => 'unop',
'andassign' => ['logassignop', '&&='],
'atan2' => ['maybe_targmy', 'listop'],
'bind' => 'listop',
'binmode' => 'listop',
'bit_and' => ['maybe_targmy', 'binop', "&", 13, ASSIGN],
'bit_or' => ['maybe_targmy', 'binop', "|", 12, ASSIGN],
'bit_xor' => ['maybe_targmy', 'binop', "^", 12, ASSIGN],
'bless' => 'listop',
'break' => 'unop',
'caller' => 'unop',
'chdir' => ['maybe_targmy', 'unop'], # modified below
'chr' => ['maybe_targmy', 'unop'],
'chmod' => ['maybe_targmy', 'listop'],
'chomp' => ['maybe_targmy', 'unop'],
'chop' => ['maybe_targmy', 'unop'],
'chown' => ['maybe_targmy', 'listop'],
'chroot' => ['maybe_targmy', 'unop'],
'close' => 'unop',
'closedir' => 'unop',
'connect' => 'listop',
'complement' => ['maybe_targmy', 'pfixop', '~', 21],
'concat' => ['maybe_targmy', 'concat'],
'continue' => 'unop',
'cos' => ['maybe_targmy', 'unop'],
'crypt' => ['maybe_targmy', 'listop'],
'db_open' => 'listop',
'dbmclose' => 'unop',
'dbmopen' => 'listop',
'dbstate' => 'cops',
'defined' => 'unop',
'die' => 'listop',
'divide' => ['maybe_targmy', 'binop', "/", 19, ASSIGN],
'dor' => ['logop', 'or', '//', 10],
'dorassign' => ['logassignop', '//='],
'dump' => ['loopex', "CORE::dump"],
'each' => 'unop',
'egrent' => ['baseop', 'endgrent'],
'ehostent' => ['baseop', "endhostent"],
'enetent' => ['baseop', "endnetent"],
'enterwrite' => ['unop', "write"],
'eof' => 'unop',
'eprotoent' => ['baseop', "endprotoent"],
'epwent' => ['baseop', "endpwent"],
'eservent' => ['baseop', "endservent"],
'exit' => 'unop',
'fc' => 'unop',
'fcntl' => 'listop',
'fileno' => 'unop',
'flock' => ['maybe_targmy', 'listop'],
'fork' => 'baseop',
'formline' => 'listop', # see also deparse_format
'ftatime' => ['filetest', "-A"],
'ftbinary' => ['filetest', "-B"],
'ftblk' => ['filetest', "-b"],
'ftchr' => ['filetest', "-c"],
'ftctime' => ['filetest', "-C"],
'ftdir' => ['filetest', "-d"],
'fteexec' => ['filetest', "-x"],
'fteowned' => ['filetest', "-O"],
'fteread' => ['filetest', "-r"],
'ftewrite' => ['filetest', "-w"],
'ftfile' => ['filetest', "-f"],
'ftis' => ['filetest', "-e"],
'ftlink' => ['filetest', "-l"],
'ftmtime' => ['filetest', "-M"],
'ftpipe' => ['filetest', "-p"],
'ftrexec' => ['filetest', "-X"],
'ftrowned' => ['filetest', "-o"],
'ftrread' => ['filetest', '-R'],
'ftrwrite' => ['filetest', "-W"],
( run in 0.720 second using v1.01-cache-2.11-cpan-39bf76dae61 )