tty1
     KˆÁÙ„L‰¿À¿× ?÷     Kpackage YAML::Loader;
use YAML::Mo;
extends 'YAML::Loader::Base';

our $VERSION = '0.84';

use YAML::Loader::Base;
use YAML::Types;

# Context constants
use constant LEAF       => 1;
use constant COLLECTION => 2;
use constant VALUE      => "\x07YAML\x07VALUE\x07";
use constant COMMENT    => "\x07YAML\x07COMMENT\x07";

# Common YAML character sets
my $ESCAPE_CHAR = '[\\x00-\\x08\\x0b-\\x0d\\x0e-\\x1f]';
my $FOLD_CHAR   = '>';
my $LIT_CHAR    = '|';    
my $LIT_CHAR_RX = "\\$LIT_CHAR";    

sub load {
    my $self = shift;
    $self->stream($_[0] || '');
    return $self->_parse();
}

# Top level function for parsing. Parse each document in order and
# handle processing for YAML headers.
sub _parse {
    my $self = shift;
    my (%directives, $preface);
    $self->{stream} =~ s|\015\012|\012|g;
    $self->{stream} =~ s|\015|\012|g;
    $self->line(0);
    $self->die('YAML_PARSE_ERR_BAD_CHARS') 
      if $self->stream =~ /$ESCAPE_CHAR/;
    $self->die('YAML_PARSE_ERR_NO_FINAL_NEWLINE') 
      if length($self->stream) and 
         $self->{stream} !~ s/(.)\n\Z/$1/s;
    $self->lines([split /\x0a/, $self->stream, -1]);
    $self->line(1);
    # Throw away any comments or blanks before the header (or start of
    # content for headerless streams)
    $self->_parse_throwaway_comments();
    $self->document(0);
    $self->documents([]);
    # Add an "assumed" header if there is no header and the stream is
    # not empty (after initial throwaways).
    if (not $self->eos) {
        if ($self->lines->[0] !~ /^---(\s|$)/) {
            unshift @{$self->lines}, '---';
            $self->{line}--;
        }
    }

    # Main Loop. Parse out all the top level nodes and return them.
    while (not $self->eos) {
        $self->anchor2node({});
        $self->{document}++;
        $self->done(0);
        $self->level(0);
        $self->offset->[0] = -1;

        if ($self->lines->[0] =~ /^---\s*(.*)$/) {
            my @words = split /\s+/, $1;
            %directives = ();
            while (@words && $words[0] =~ /^#(\w+):(\S.*)$/) {
                my ($key, $value) = ($1, $2);
                shift(@words);
                if (defined $directives{$key}) {
                    $self->warn('YAML_PARSE_WARN_MULTIPLE_DIRECTIVES',
                      $key, $self->document);
                    next;
                }
                $directives{$key} = $value;
            }
            $self->preface(join ' ', @words);
        }
        else {
            $self->die('YAML_PARSE_ERR_NO_SEPARATOR');
        }

        if (not $self->done) {
            $self->_parse_next_line(COLLECTION);
        }
        if ($self->done) {
            $self->{indent} = -1;
            $self->content('');
        }

        $directives{YAML} ||= '1.0';
        $directives{TAB} ||= 'NONE';
        ($self->{major_version}, $self->{minor_version}) = 
          split /\./, $directives{YAML}, 2;
        $self->die('YAML_PARSE_ERR_BAD_MAJOR_VERSION', $directives{YAML})
          if $self->major_version ne '1';
        $self->warn('YAML_PARSE_WARN_BAD_MINOR_VERSION', $directives{YAML})
          if $self->minor_version ne '0';
        $self->die('Unrecognized TAB policy')
          unless $directives{TAB} =~ /^(NONE|\d+)(:HARD)?$/;

        push @{$self->documents}, $self->_parse_node();
    }
    return wantarray ? @{$self->documents} : $self->documents->[-1];
}

# This function is the dispatcher for parsing each node. Every node
# recurses back through here. (Inlines are an exception as they have
# their own sub-parser.)
sub _parse_node {
    my $self = shift;
    my $preface = $self->preface;
    $self->preface('');
    my ($node, $type, $indicator, $escape, $chomp) = ('') x 5;
    my ($anchor, $alias, $explicit, $implicit, $class) = ('') x 5;
    ($anchor, $alias, $explicit, $implicit, $preface) = 
      $self->_parse_qualifiers($preface);
    if ($anchor) {
        $self->anchor2node->{$anchor} = CORE::bless [], 'YAML-anchor2node';
    }
    $self->inline('');
    while (length $preface) {
        my $line = $self->line 