perl/mad/P5AST.pm
<<
>>
Prefs
   1package P5AST;
   2
   3$::herequeue = '';
   4
   51;
   6
   7{
   8    my %newkey = qw(
   9    );
  10
  11    sub translate {
  12        my $class = shift;
  13        my $key = shift;
  14        $key = $newkey{$key} || "op_$key";
  15        return "P5AST::$key";
  16    }
  17}
  18
  19sub new {
  20    my $class = shift;
  21    bless {@_}, $class;
  22}
  23
  24sub AUTOLOAD {
  25    warn "AUTOLOAD $P5AST::AUTOLOAD(" . join(',', @_) . ")\n";
  26}
  27
  28sub DESTROY { }
  29
  30sub p5arraytext {
  31    my $kid = shift;
  32    my $text = "";
  33    for my $subkid (@$kid) {
  34        my $type = ref $subkid;
  35        if ($type eq 'ARRAY') {
  36            if ($dowarn) {
  37                warn "Extra array\n";
  38                $text .= '〔 '. p5arraytext($subkid) . ' 〕';
  39            }
  40            else {
  41                $text .= p5arraytext($subkid);
  42            }
  43        }
  44        elsif ($type =~ /^p5::/) {
  45            my $newtext = $subkid->enc();
  46            if ($::herequeue && $newtext =~ s/\n/\n$::herequeue/) {
  47                $::herequeue = '';
  48            }
  49            $text .= $newtext;
  50        }
  51        elsif ($type) {
  52            $text .= $subkid->text(@_);
  53        }
  54        else {
  55            $text .= $subkid;
  56        }
  57    }
  58    return $text;
  59}
  60
  61sub p5text {
  62    my $self = shift;
  63#    my $pre = $self->pretext();
  64#    my $post = $self->posttext();
  65    my $text = "";
  66    foreach my $kid (@{$$self{Kids}}) {
  67        my $type = ref $kid;
  68        if ($type eq 'ARRAY') {
  69            $text .= p5arraytext($kid);
  70        }
  71        elsif ($type =~ /^p5::/) {
  72            my $newtext = $kid->enc();
  73            if ($::herequeue && $newtext =~ s/\n/\n$::herequeue/) {
  74                $::herequeue = '';
  75            }
  76            $text .= $newtext;
  77        }
  78        elsif ($type eq "chomp") {
  79            $text =~ s/\n$//g;
  80        }
  81        elsif ($type) {
  82            $text .= $kid->p5text(@_);
  83        }
  84        elsif (defined $kid) {
  85            $text .= $kid;
  86        }
  87        else {
  88            $text .= '[[[ UNDEF ]]]';
  89        }
  90    }
  91    return $text;
  92}
  93
  94sub p5subtext {
  95    my $self = shift;
  96    my @text;
  97    foreach my $kid (@{$$self{Kids}}) {
  98        my $text = $kid->p5text(@_);
  99        push @text, $text if defined $text;
 100    }
 101    return @text;
 102}
 103
 104sub p6text {
 105    return $_[0]->p5text();     # assume it's the same
 106}
 107
 108package P5AST::heredoc; @ISA = 'P5AST';
 109
 110sub p5text {
 111    my $self = shift;
 112    my $newdoc;
 113    {
 114        local $::herequeue;                     # don't interpolate outer heredoc yet
 115        $newdoc = $self->{doc}->p5text(@_) .  $self->{end}->enc();
 116        if ($::herequeue) {                     # heredoc within the heredoc?
 117            $newdoc .= $::herequeue;
 118            $::herequeue = '';
 119        }
 120    }
 121    $::herequeue .= $newdoc;
 122    my $start = $self->{start};
 123    my $type = ref $start;
 124    if ($type =~ /^p5::/) {             # XXX too much cut-n-paste here...
 125        return $start->enc();
 126    }
 127    elsif ($type) {
 128        return $start->p5text(@_);
 129    }
 130    else {
 131        return $start;
 132    }
 133}
 134
 135package P5AST::BAD;
 136
 137sub p5text {
 138    my $self = shift;
 139    my $t = ref $t;
 140    warn "Shouldn't have a node of type $t";
 141}
 142
 143package P5AST::baseop;          @ISA = 'P5AST';
 144package P5AST::baseop_unop;     @ISA = 'P5AST::baseop';
 145package P5AST::binop;           @ISA = 'P5AST::baseop';
 146package P5AST::cop;             @ISA = 'P5AST::baseop';
 147package P5AST::filestatop;      @ISA = 'P5AST::baseop';
 148package P5AST::listop;          @ISA = 'P5AST::baseop';
 149package P5AST::logop;           @ISA = 'P5AST::baseop';
 150package P5AST::loop;            @ISA = 'P5AST::baseop';
 151package P5AST::loopexop;        @ISA = 'P5AST::baseop';
 152package P5AST::padop;           @ISA = 'P5AST::baseop';
 153package P5AST::padop_svop;      @ISA = 'P5AST::baseop';
 154package P5AST::pmop;            @ISA = 'P5AST::baseop';
 155package P5AST::pvop_svop;       @ISA = 'P5AST::baseop';
 156package P5AST::unop;            @ISA = 'P5AST::baseop';
 157
 158# Nothing.
 159
 160package P5AST::op_null;         @ISA = 'P5AST::baseop';
 161package P5AST::op_stub;         @ISA = 'P5AST::baseop';
 162package P5AST::op_scalar;       @ISA = 'P5AST::baseop_unop';
 163
 164# Pushy stuff.
 165
 166package P5AST::op_pushmark;     @ISA = 'P5AST::baseop';
 167package P5AST::op_wantarray;    @ISA = 'P5AST::baseop';
 168package P5AST::op_const;        @ISA = 'P5AST::padop_svop';
 169package P5AST::op_gvsv;         @ISA = 'P5AST::padop_svop';
 170package P5AST::op_gv;           @ISA = 'P5AST::padop_svop';
 171package P5AST::op_gelem;        @ISA = 'P5AST::binop';
 172package P5AST::op_padsv;        @ISA = 'P5AST::baseop';
 173package P5AST::op_padav;        @ISA = 'P5AST::baseop';
 174package P5AST::op_padhv;        @ISA = 'P5AST::baseop';
 175package P5AST::op_padany;       @ISA = 'P5AST::baseop';
 176package P5AST::op_pushre;       @ISA = 'P5AST::pmop';
 177package P5AST::op_rv2gv;        @ISA = 'P5AST::unop';
 178package P5AST::op_rv2sv;        @ISA = 'P5AST::unop';
 179package P5AST::op_av2arylen;    @ISA = 'P5AST::unop';
 180package P5AST::op_rv2cv;        @ISA = 'P5AST::unop';
 181package P5AST::op_anoncode;     @ISA = 'P5AST::padop_svop';
 182package P5AST::op_prototype;    @ISA = 'P5AST::baseop_unop';
 183package P5AST::op_refgen;       @ISA = 'P5AST::unop';
 184package P5AST::op_srefgen;      @ISA = 'P5AST::unop';
 185package P5AST::op_ref;          @ISA = 'P5AST::baseop_unop';
 186package P5AST::op_bless;        @ISA = 'P5AST::listop';
 187package P5AST::op_backtick;     @ISA = 'P5AST::baseop_unop';
 188package P5AST::op_glob;         @ISA = 'P5AST::listop';
 189package P5AST::op_readline;     @ISA = 'P5AST::baseop_unop';
 190package P5AST::op_rcatline;     @ISA = 'P5AST::padop_svop';
 191package P5AST::op_regcmaybe;    @ISA = 'P5AST::unop';
 192package P5AST::op_regcreset;    @ISA = 'P5AST::unop';
 193package P5AST::op_regcomp;      @ISA = 'P5AST::logop';
 194package P5AST::op_match;        @ISA = 'P5AST::pmop';
 195package P5AST::op_qr;           @ISA = 'P5AST::pmop';
 196package P5AST::op_subst;        @ISA = 'P5AST::pmop';
 197package P5AST::op_substcont;    @ISA = 'P5AST::logop';
 198package P5AST::op_trans;        @ISA = 'P5AST::pvop_svop';
 199package P5AST::op_sassign;      @ISA = 'P5AST::baseop';
 200package P5AST::op_aassign;      @ISA = 'P5AST::binop';
 201package P5AST::op_chop;         @ISA = 'P5AST::baseop_unop';
 202package P5AST::op_schop;        @ISA = 'P5AST::baseop_unop';
 203package P5AST::op_chomp;        @ISA = 'P5AST::baseop_unop';
 204package P5AST::op_schomp;       @ISA = 'P5AST::baseop_unop';
 205package P5AST::op_defined;      @ISA = 'P5AST::baseop_unop';
 206package P5AST::op_undef;        @ISA = 'P5AST::baseop_unop';
 207package P5AST::op_study;        @ISA = 'P5AST::baseop_unop';
 208package P5AST::op_pos;          @ISA = 'P5AST::baseop_unop';
 209package P5AST::op_preinc;       @ISA = 'P5AST::unop';
 210package P5AST::op_i_preinc;     @ISA = 'P5AST::unop';
 211package P5AST::op_predec;       @ISA = 'P5AST::unop';
 212package P5AST::op_i_predec;     @ISA = 'P5AST::unop';
 213package P5AST::op_postinc;      @ISA = 'P5AST::unop';
 214package P5AST::op_i_postinc;    @ISA = 'P5AST::unop';
 215package P5AST::op_postdec;      @ISA = 'P5AST::unop';
 216package P5AST::op_i_postdec;    @ISA = 'P5AST::unop';
 217package P5AST::op_pow;          @ISA = 'P5AST::binop';
 218package P5AST::op_multiply;     @ISA = 'P5AST::binop';
 219package P5AST::op_i_multiply;   @ISA = 'P5AST::binop';
 220package P5AST::op_divide;       @ISA = 'P5AST::binop';
 221package P5AST::op_i_divide;     @ISA = 'P5AST::binop';
 222package P5AST::op_modulo;       @ISA = 'P5AST::binop';
 223package P5AST::op_i_modulo;     @ISA = 'P5AST::binop';
 224package P5AST::op_repeat;       @ISA = 'P5AST::binop';
 225package P5AST::op_add;          @ISA = 'P5AST::binop';
 226package P5AST::op_i_add;        @ISA = 'P5AST::binop';
 227package P5AST::op_subtract;     @ISA = 'P5AST::binop';
 228package P5AST::op_i_subtract;   @ISA = 'P5AST::binop';
 229package P5AST::op_concat;       @ISA = 'P5AST::binop';
 230package P5AST::op_stringify;    @ISA = 'P5AST::listop';
 231package P5AST::op_left_shift;   @ISA = 'P5AST::binop';
 232package P5AST::op_right_shift;  @ISA = 'P5AST::binop';
 233package P5AST::op_lt;           @ISA = 'P5AST::binop';
 234package P5AST::op_i_lt;         @ISA = 'P5AST::binop';
 235package P5AST::op_gt;           @ISA = 'P5AST::binop';
 236package P5AST::op_i_gt;         @ISA = 'P5AST::binop';
 237package P5AST::op_le;           @ISA = 'P5AST::binop';
 238package P5AST::op_i_le;         @ISA = 'P5AST::binop';
 239package P5AST::op_ge;           @ISA = 'P5AST::binop';
 240package P5AST::op_i_ge;         @ISA = 'P5AST::binop';
 241package P5AST::op_eq;           @ISA = 'P5AST::binop';
 242package P5AST::op_i_eq;         @ISA = 'P5AST::binop';
 243package P5AST::op_ne;           @ISA = 'P5AST::binop';
 244package P5AST::op_i_ne;         @ISA = 'P5AST::binop';
 245package P5AST::op_ncmp;         @ISA = 'P5AST::binop';
 246package P5AST::op_i_ncmp;       @ISA = 'P5AST::binop';
 247package P5AST::op_slt;          @ISA = 'P5AST::binop';
 248package P5AST::op_sgt;          @ISA = 'P5AST::binop';
 249package P5AST::op_sle;          @ISA = 'P5AST::binop';
 250package P5AST::op_sge;          @ISA = 'P5AST::binop';
 251package P5AST::op_seq;          @ISA = 'P5AST::binop';
 252package P5AST::op_sne;          @ISA = 'P5AST::binop';
 253package P5AST::op_scmp;         @ISA = 'P5AST::binop';
 254package P5AST::op_bit_and;      @ISA = 'P5AST::binop';
 255package P5AST::op_bit_xor;      @ISA = 'P5AST::binop';
 256package P5AST::op_bit_or;       @ISA = 'P5AST::binop';
 257package P5AST::op_negate;       @ISA = 'P5AST::unop';
 258package P5AST::op_i_negate;     @ISA = 'P5AST::unop';
 259package P5AST::op_not;          @ISA = 'P5AST::unop';
 260package P5AST::op_complement;   @ISA = 'P5AST::unop';
 261package P5AST::op_atan2;        @ISA = 'P5AST::listop';
 262package P5AST::op_sin;          @ISA = 'P5AST::baseop_unop';
 263package P5AST::op_cos;          @ISA = 'P5AST::baseop_unop';
 264package P5AST::op_rand;         @ISA = 'P5AST::baseop_unop';
 265package P5AST::op_srand;        @ISA = 'P5AST::baseop_unop';
 266package P5AST::op_exp;          @ISA = 'P5AST::baseop_unop';
 267package P5AST::op_log;          @ISA = 'P5AST::baseop_unop';
 268package P5AST::op_sqrt;         @ISA = 'P5AST::baseop_unop';
 269package P5AST::op_int;          @ISA = 'P5AST::baseop_unop';
 270package P5AST::op_hex;          @ISA = 'P5AST::baseop_unop';
 271package P5AST::op_oct;          @ISA = 'P5AST::baseop_unop';
 272package P5AST::op_abs;          @ISA = 'P5AST::baseop_unop';
 273package P5AST::op_length;       @ISA = 'P5AST::baseop_unop';
 274package P5AST::op_substr;       @ISA = 'P5AST::listop';
 275package P5AST::op_vec;          @ISA = 'P5AST::listop';
 276package P5AST::op_index;        @ISA = 'P5AST::listop';
 277package P5AST::op_rindex;       @ISA = 'P5AST::listop';
 278package P5AST::op_sprintf;      @ISA = 'P5AST::listop';
 279package P5AST::op_formline;     @ISA = 'P5AST::listop';
 280package P5AST::op_ord;          @ISA = 'P5AST::baseop_unop';
 281package P5AST::op_chr;          @ISA = 'P5AST::baseop_unop';
 282package P5AST::op_crypt;        @ISA = 'P5AST::listop';
 283package P5AST::op_ucfirst;      @ISA = 'P5AST::baseop_unop';
 284package P5AST::op_lcfirst;      @ISA = 'P5AST::baseop_unop';
 285package P5AST::op_uc;           @ISA = 'P5AST::baseop_unop';
 286package P5AST::op_lc;           @ISA = 'P5AST::baseop_unop';
 287package P5AST::op_quotemeta;    @ISA = 'P5AST::baseop_unop';
 288package P5AST::op_rv2av;        @ISA = 'P5AST::unop';
 289package P5AST::op_aelemfast;    @ISA = 'P5AST::padop_svop';
 290package P5AST::op_aelem;        @ISA = 'P5AST::binop';
 291package P5AST::op_aslice;       @ISA = 'P5AST::listop';
 292package P5AST::op_each;         @ISA = 'P5AST::baseop_unop';
 293package P5AST::op_values;       @ISA = 'P5AST::baseop_unop';
 294package P5AST::op_keys;         @ISA = 'P5AST::baseop_unop';
 295package P5AST::op_delete;       @ISA = 'P5AST::baseop_unop';
 296package P5AST::op_exists;       @ISA = 'P5AST::baseop_unop';
 297package P5AST::op_rv2hv;        @ISA = 'P5AST::unop';
 298package P5AST::op_helem;        @ISA = 'P5AST::listop';
 299package P5AST::op_hslice;       @ISA = 'P5AST::listop';
 300package P5AST::op_unpack;       @ISA = 'P5AST::listop';
 301package P5AST::op_pack;         @ISA = 'P5AST::listop';
 302package P5AST::op_split;        @ISA = 'P5AST::listop';
 303package P5AST::op_join;         @ISA = 'P5AST::listop';
 304package P5AST::op_list;         @ISA = 'P5AST::listop';
 305package P5AST::op_lslice;       @ISA = 'P5AST::binop';
 306package P5AST::op_anonlist;     @ISA = 'P5AST::listop';
 307package P5AST::op_anonhash;     @ISA = 'P5AST::listop';
 308package P5AST::op_splice;       @ISA = 'P5AST::listop';
 309package P5AST::op_push;         @ISA = 'P5AST::listop';
 310package P5AST::op_pop;          @ISA = 'P5AST::baseop_unop';
 311package P5AST::op_shift;        @ISA = 'P5AST::baseop_unop';
 312package P5AST::op_unshift;      @ISA = 'P5AST::listop';
 313package P5AST::op_sort;         @ISA = 'P5AST::listop';
 314package P5AST::op_reverse;      @ISA = 'P5AST::listop';
 315package P5AST::op_grepstart;    @ISA = 'P5AST::listop';
 316package P5AST::op_grepwhile;    @ISA = 'P5AST::logop';
 317package P5AST::op_mapstart;     @ISA = 'P5AST::listop';
 318package P5AST::op_mapwhile;     @ISA = 'P5AST::logop';
 319package P5AST::op_range;        @ISA = 'P5AST::logop';
 320package P5AST::op_flip;         @ISA = 'P5AST::unop';
 321package P5AST::op_flop;         @ISA = 'P5AST::unop';
 322package P5AST::op_and;          @ISA = 'P5AST::logop';
 323package P5AST::op_or;           @ISA = 'P5AST::logop';
 324package P5AST::op_xor;          @ISA = 'P5AST::binop';
 325package P5AST::op_cond_expr;    @ISA = 'P5AST::logop';
 326package P5AST::op_andassign;    @ISA = 'P5AST::logop';
 327package P5AST::op_orassign;     @ISA = 'P5AST::logop';
 328package P5AST::op_method;       @ISA = 'P5AST::unop';
 329package P5AST::op_entersub;     @ISA = 'P5AST::unop';
 330package P5AST::op_leavesub;     @ISA = 'P5AST::unop';
 331package P5AST::op_leavesublv;   @ISA = 'P5AST::unop';
 332package P5AST::op_caller;       @ISA = 'P5AST::baseop_unop';
 333package P5AST::op_warn;         @ISA = 'P5AST::listop';
 334package P5AST::op_die;          @ISA = 'P5AST::listop';
 335package P5AST::op_reset;        @ISA = 'P5AST::baseop_unop';
 336package P5AST::op_lineseq;      @ISA = 'P5AST::listop';
 337package P5AST::op_nextstate;    @ISA = 'P5AST::BAD';
 338package P5AST::op_dbstate;      @ISA = 'P5AST::cop';
 339package P5AST::op_unstack;      @ISA = 'P5AST::baseop';
 340package P5AST::op_enter;        @ISA = 'P5AST::baseop';
 341package P5AST::op_leave;        @ISA = 'P5AST::listop';
 342package P5AST::op_scope;        @ISA = 'P5AST::listop';
 343package P5AST::op_enteriter;    @ISA = 'P5AST::loop';
 344package P5AST::op_iter;         @ISA = 'P5AST::baseop';
 345package P5AST::op_enterloop;    @ISA = 'P5AST::loop';
 346package P5AST::op_leaveloop;    @ISA = 'P5AST::binop';
 347package P5AST::op_return;       @ISA = 'P5AST::listop';
 348package P5AST::op_last;         @ISA = 'P5AST::loopexop';
 349package P5AST::op_next;         @ISA = 'P5AST::loopexop';
 350package P5AST::op_redo;         @ISA = 'P5AST::loopexop';
 351package P5AST::op_dump;         @ISA = 'P5AST::loopexop';
 352package P5AST::op_goto;         @ISA = 'P5AST::loopexop';
 353package P5AST::op_exit;         @ISA = 'P5AST::baseop_unop';
 354package P5AST::op_open;         @ISA = 'P5AST::listop';
 355package P5AST::op_close;        @ISA = 'P5AST::baseop_unop';
 356package P5AST::op_pipe_op;      @ISA = 'P5AST::listop';
 357package P5AST::op_fileno;       @ISA = 'P5AST::baseop_unop';
 358package P5AST::op_umask;        @ISA = 'P5AST::baseop_unop';
 359package P5AST::op_binmode;      @ISA = 'P5AST::listop';
 360package P5AST::op_tie;          @ISA = 'P5AST::listop';
 361package P5AST::op_untie;        @ISA = 'P5AST::baseop_unop';
 362package P5AST::op_tied;         @ISA = 'P5AST::baseop_unop';
 363package P5AST::op_dbmopen;      @ISA = 'P5AST::listop';
 364package P5AST::op_dbmclose;     @ISA = 'P5AST::baseop_unop';
 365package P5AST::op_sselect;      @ISA = 'P5AST::listop';
 366package P5AST::op_select;       @ISA = 'P5AST::listop';
 367package P5AST::op_getc;         @ISA = 'P5AST::baseop_unop';
 368package P5AST::op_read;         @ISA = 'P5AST::listop';
 369package P5AST::op_enterwrite;   @ISA = 'P5AST::baseop_unop';
 370package P5AST::op_leavewrite;   @ISA = 'P5AST::unop';
 371package P5AST::op_prtf;         @ISA = 'P5AST::listop';
 372package P5AST::op_print;        @ISA = 'P5AST::listop';
 373package P5AST::op_sysopen;      @ISA = 'P5AST::listop';
 374package P5AST::op_sysseek;      @ISA = 'P5AST::listop';
 375package P5AST::op_sysread;      @ISA = 'P5AST::listop';
 376package P5AST::op_syswrite;     @ISA = 'P5AST::listop';
 377package P5AST::op_send;         @ISA = 'P5AST::listop';
 378package P5AST::op_recv;         @ISA = 'P5AST::listop';
 379package P5AST::op_eof;          @ISA = 'P5AST::baseop_unop';
 380package P5AST::op_tell;         @ISA = 'P5AST::baseop_unop';
 381package P5AST::op_seek;         @ISA = 'P5AST::listop';
 382package P5AST::op_truncate;     @ISA = 'P5AST::listop';
 383package P5AST::op_fcntl;        @ISA = 'P5AST::listop';
 384package P5AST::op_ioctl;        @ISA = 'P5AST::listop';
 385package P5AST::op_flock;        @ISA = 'P5AST::listop';
 386package P5AST::op_socket;       @ISA = 'P5AST::listop';
 387package P5AST::op_sockpair;     @ISA = 'P5AST::listop';
 388package P5AST::op_bind;         @ISA = 'P5AST::listop';
 389package P5AST::op_connect;      @ISA = 'P5AST::listop';
 390package P5AST::op_listen;       @ISA = 'P5AST::listop';
 391package P5AST::op_accept;       @ISA = 'P5AST::listop';
 392package P5AST::op_shutdown;     @ISA = 'P5AST::listop';
 393package P5AST::op_gsockopt;     @ISA = 'P5AST::listop';
 394package P5AST::op_ssockopt;     @ISA = 'P5AST::listop';
 395package P5AST::op_getsockname;  @ISA = 'P5AST::baseop_unop';
 396package P5AST::op_getpeername;  @ISA = 'P5AST::baseop_unop';
 397package P5AST::op_lstat;        @ISA = 'P5AST::filestatop';
 398package P5AST::op_stat;         @ISA = 'P5AST::filestatop';
 399package P5AST::op_ftrread;      @ISA = 'P5AST::filestatop';
 400package P5AST::op_ftrwrite;     @ISA = 'P5AST::filestatop';
 401package P5AST::op_ftrexec;      @ISA = 'P5AST::filestatop';
 402package P5AST::op_fteread;      @ISA = 'P5AST::filestatop';
 403package P5AST::op_ftewrite;     @ISA = 'P5AST::filestatop';
 404package P5AST::op_fteexec;      @ISA = 'P5AST::filestatop';
 405package P5AST::op_ftis;         @ISA = 'P5AST::filestatop';
 406package P5AST::op_fteowned;     @ISA = 'P5AST::filestatop';
 407package P5AST::op_ftrowned;     @ISA = 'P5AST::filestatop';
 408package P5AST::op_ftzero;       @ISA = 'P5AST::filestatop';
 409package P5AST::op_ftsize;       @ISA = 'P5AST::filestatop';
 410package P5AST::op_ftmtime;      @ISA = 'P5AST::filestatop';
 411package P5AST::op_ftatime;      @ISA = 'P5AST::filestatop';
 412package P5AST::op_ftctime;      @ISA = 'P5AST::filestatop';
 413package P5AST::op_ftsock;       @ISA = 'P5AST::filestatop';
 414package P5AST::op_ftchr;        @ISA = 'P5AST::filestatop';
 415package P5AST::op_ftblk;        @ISA = 'P5AST::filestatop';
 416package P5AST::op_ftfile;       @ISA = 'P5AST::filestatop';
 417package P5AST::op_ftdir;        @ISA = 'P5AST::filestatop';
 418package P5AST::op_ftpipe;       @ISA = 'P5AST::filestatop';
 419package P5AST::op_ftlink;       @ISA = 'P5AST::filestatop';
 420package P5AST::op_ftsuid;       @ISA = 'P5AST::filestatop';
 421package P5AST::op_ftsgid;       @ISA = 'P5AST::filestatop';
 422package P5AST::op_ftsvtx;       @ISA = 'P5AST::filestatop';
 423package P5AST::op_fttty;        @ISA = 'P5AST::filestatop';
 424package P5AST::op_fttext;       @ISA = 'P5AST::filestatop';
 425package P5AST::op_ftbinary;     @ISA = 'P5AST::filestatop';
 426package P5AST::op_chdir;        @ISA = 'P5AST::baseop_unop';
 427package P5AST::op_chown;        @ISA = 'P5AST::listop';
 428package P5AST::op_chroot;       @ISA = 'P5AST::baseop_unop';
 429package P5AST::op_unlink;       @ISA = 'P5AST::listop';
 430package P5AST::op_chmod;        @ISA = 'P5AST::listop';
 431package P5AST::op_utime;        @ISA = 'P5AST::listop';
 432package P5AST::op_rename;       @ISA = 'P5AST::listop';
 433package P5AST::op_link;         @ISA = 'P5AST::listop';
 434package P5AST::op_symlink;      @ISA = 'P5AST::listop';
 435package P5AST::op_readlink;     @ISA = 'P5AST::baseop_unop';
 436package P5AST::op_mkdir;        @ISA = 'P5AST::listop';
 437package P5AST::op_rmdir;        @ISA = 'P5AST::baseop_unop';
 438package P5AST::op_open_dir;     @ISA = 'P5AST::listop';
 439package P5AST::op_readdir;      @ISA = 'P5AST::baseop_unop';
 440package P5AST::op_telldir;      @ISA = 'P5AST::baseop_unop';
 441package P5AST::op_seekdir;      @ISA = 'P5AST::listop';
 442package P5AST::op_rewinddir;    @ISA = 'P5AST::baseop_unop';
 443package P5AST::op_closedir;     @ISA = 'P5AST::baseop_unop';
 444package P5AST::op_fork;         @ISA = 'P5AST::baseop';
 445package P5AST::op_wait;         @ISA = 'P5AST::baseop';
 446package P5AST::op_waitpid;      @ISA = 'P5AST::listop';
 447package P5AST::op_system;       @ISA = 'P5AST::listop';
 448package P5AST::op_exec;         @ISA = 'P5AST::listop';
 449package P5AST::op_kill;         @ISA = 'P5AST::listop';
 450package P5AST::op_getppid;      @ISA = 'P5AST::baseop';
 451package P5AST::op_getpgrp;      @ISA = 'P5AST::baseop_unop';
 452package P5AST::op_setpgrp;      @ISA = 'P5AST::listop';
 453package P5AST::op_getpriority;  @ISA = 'P5AST::listop';
 454package P5AST::op_setpriority;  @ISA = 'P5AST::listop';
 455package P5AST::op_time;         @ISA = 'P5AST::baseop';
 456package P5AST::op_tms;          @ISA = 'P5AST::baseop';
 457package P5AST::op_localtime;    @ISA = 'P5AST::baseop_unop';
 458package P5AST::op_gmtime;       @ISA = 'P5AST::baseop_unop';
 459package P5AST::op_alarm;        @ISA = 'P5AST::baseop_unop';
 460package P5AST::op_sleep;        @ISA = 'P5AST::baseop_unop';
 461package P5AST::op_shmget;       @ISA = 'P5AST::listop';
 462package P5AST::op_shmctl;       @ISA = 'P5AST::listop';
 463package P5AST::op_shmread;      @ISA = 'P5AST::listop';
 464package P5AST::op_shmwrite;     @ISA = 'P5AST::listop';
 465package P5AST::op_msgget;       @ISA = 'P5AST::listop';
 466package P5AST::op_msgctl;       @ISA = 'P5AST::listop';
 467package P5AST::op_msgsnd;       @ISA = 'P5AST::listop';
 468package P5AST::op_msgrcv;       @ISA = 'P5AST::listop';
 469package P5AST::op_semget;       @ISA = 'P5AST::listop';
 470package P5AST::op_semctl;       @ISA = 'P5AST::listop';
 471package P5AST::op_semop;        @ISA = 'P5AST::listop';
 472package P5AST::op_require;      @ISA = 'P5AST::baseop_unop';
 473package P5AST::op_dofile;       @ISA = 'P5AST::unop';
 474package P5AST::op_entereval;    @ISA = 'P5AST::baseop_unop';
 475package P5AST::op_leaveeval;    @ISA = 'P5AST::unop';
 476package P5AST::op_entertry;     @ISA = 'P5AST::logop';
 477package P5AST::op_leavetry;     @ISA = 'P5AST::listop';
 478package P5AST::op_ghbyname;     @ISA = 'P5AST::baseop_unop';
 479package P5AST::op_ghbyaddr;     @ISA = 'P5AST::listop';
 480package P5AST::op_ghostent;     @ISA = 'P5AST::baseop';
 481package P5AST::op_gnbyname;     @ISA = 'P5AST::baseop_unop';
 482package P5AST::op_gnbyaddr;     @ISA = 'P5AST::listop';
 483package P5AST::op_gnetent;      @ISA = 'P5AST::baseop';
 484package P5AST::op_gpbyname;     @ISA = 'P5AST::baseop_unop';
 485package P5AST::op_gpbynumber;   @ISA = 'P5AST::listop';
 486package P5AST::op_gprotoent;    @ISA = 'P5AST::baseop';
 487package P5AST::op_gsbyname;     @ISA = 'P5AST::listop';
 488package P5AST::op_gsbyport;     @ISA = 'P5AST::listop';
 489package P5AST::op_gservent;     @ISA = 'P5AST::baseop';
 490package P5AST::op_shostent;     @ISA = 'P5AST::baseop_unop';
 491package P5AST::op_snetent;      @ISA = 'P5AST::baseop_unop';
 492package P5AST::op_sprotoent;    @ISA = 'P5AST::baseop_unop';
 493package P5AST::op_sservent;     @ISA = 'P5AST::baseop_unop';
 494package P5AST::op_ehostent;     @ISA = 'P5AST::baseop';
 495package P5AST::op_enetent;      @ISA = 'P5AST::baseop';
 496package P5AST::op_eprotoent;    @ISA = 'P5AST::baseop';
 497package P5AST::op_eservent;     @ISA = 'P5AST::baseop';
 498package P5AST::op_gpwnam;       @ISA = 'P5AST::baseop_unop';
 499package P5AST::op_gpwuid;       @ISA = 'P5AST::baseop_unop';
 500package P5AST::op_gpwent;       @ISA = 'P5AST::baseop';
 501package P5AST::op_spwent;       @ISA = 'P5AST::baseop';
 502package P5AST::op_epwent;       @ISA = 'P5AST::baseop';
 503package P5AST::op_ggrnam;       @ISA = 'P5AST::baseop_unop';
 504package P5AST::op_ggrgid;       @ISA = 'P5AST::baseop_unop';
 505package P5AST::op_ggrent;       @ISA = 'P5AST::baseop';
 506package P5AST::op_sgrent;       @ISA = 'P5AST::baseop';
 507package P5AST::op_egrent;       @ISA = 'P5AST::baseop';
 508package P5AST::op_getlogin;     @ISA = 'P5AST::baseop';
 509package P5AST::op_syscall;      @ISA = 'P5AST::listop';
 510package P5AST::op_lock;         @ISA = 'P5AST::baseop_unop';
 511package P5AST::op_threadsv;     @ISA = 'P5AST::baseop';
 512package P5AST::op_setstate;     @ISA = 'P5AST::cop';
 513package P5AST::op_method_named; @ISA = 'P5AST::padop_svop';
 514package P5AST::op_dor;          @ISA = 'P5AST::logop';
 515package P5AST::op_dorassign;    @ISA = 'P5AST::logop';
 516package P5AST::op_custom;       @ISA = 'P5AST::baseop';
 517
 518# New node types (implicit types within perl)
 519
 520package P5AST::statement;       @ISA = 'P5AST::cop';
 521package P5AST::peg;             @ISA = 'P5AST::baseop';
 522package P5AST::parens;          @ISA = 'P5AST::baseop';
 523package P5AST::bindop;          @ISA = 'P5AST::baseop';
 524package P5AST::nothing;         @ISA = 'P5AST::baseop';
 525package P5AST::condstate;       @ISA = 'P5AST::logop';
 526package P5AST::use;             @ISA = 'P5AST::baseop';
 527package P5AST::ternary;         @ISA = 'P5AST::baseop';
 528package P5AST::sub;             @ISA = 'P5AST::baseop';
 529package P5AST::condmod;         @ISA = 'P5AST::logop';
 530package P5AST::package;         @ISA = 'P5AST::baseop';
 531package P5AST::format;          @ISA = 'P5AST::baseop';
 532package P5AST::qwliteral;       @ISA = 'P5AST::baseop';
 533package P5AST::quote;           @ISA = 'P5AST::baseop';
 534package P5AST::token;           @ISA = 'P5AST::baseop';
 535package P5AST::attrlist;        @ISA = 'P5AST::baseop';
 536package P5AST::listelem;        @ISA = 'P5AST::baseop';
 537package P5AST::preplus;         @ISA = 'P5AST::baseop';
 538package P5AST::doblock;         @ISA = 'P5AST::baseop';
 539package P5AST::cfor;            @ISA = 'P5AST::baseop';
 540package P5AST::pmop;            @ISA = 'P5AST::baseop';
 541
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.