deprecated/buildtools/buildsystemtools/lib/Parse/Yapp/Parse.pm
author jascui
Tue, 16 Nov 2010 15:56:27 +0800
changeset 683 8e0eb519ef53
parent 655 3f65fd25dfd4
permissions -rw-r--r--
Solve incorrect handling of ExportName=SymbolName@Ordinal syntax
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
655
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     1
####################################################################
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     2
#
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     3
#    This file was generated using Parse::Yapp version 1.05.
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     4
#
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     5
#        Don't edit this file, use source file instead.
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     6
#
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     7
#             ANY CHANGE MADE HERE WILL BE LOST !
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     8
#
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     9
####################################################################
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    10
package Parse::Yapp::Parse;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    11
use vars qw ( @ISA );
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    12
use strict;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    13
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    14
@ISA= qw ( Parse::Yapp::Driver );
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    15
use Parse::Yapp::Driver;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    16
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    17
#line 1 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    18
# (c) Copyright Francois Desarmenien 1998-2001, all rights reserved.
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    19
# (see COPYRIGHT in Parse::Yapp.pm pod section for use and distribution rights)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    20
#
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    21
# Parse/Yapp/Parser.yp: Parse::Yapp::Parser.pm source file
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    22
#
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    23
# Use: yapp -m 'Parse::Yapp::Parse' -o Parse/Yapp/Parse.pm YappParse.yp
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    24
#
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    25
# to generate the Parser module.
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    26
# 
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    27
#line 12 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    28
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    29
require 5.004;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    30
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    31
use Carp;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    32
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    33
my($input,$lexlevel,@lineno,$nberr,$prec,$labelno);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    34
my($syms,$head,$tail,$token,$term,$nterm,$rules,$precterm,$start,$nullable);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    35
my($expect);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    36
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    37
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    38
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    39
sub new {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    40
        my($class)=shift;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    41
        ref($class)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    42
    and $class=ref($class);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    43
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    44
    my($self)=$class->SUPER::new( yyversion => '1.05',
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    45
                                  yystates =>
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    46
[
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    47
	{#State 0
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    48
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    49
			"%%" => -6,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    50
			'HEADCODE' => 3,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    51
			'UNION' => 2,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    52
			'TOKEN' => 5,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    53
			'ASSOC' => 7,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    54
			'START' => 6,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    55
			'error' => 9,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    56
			'TYPE' => 10,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    57
			"\n" => 11,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    58
			'EXPECT' => 13
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    59
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    60
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    61
			'head' => 1,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    62
			'decls' => 12,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    63
			'yapp' => 4,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    64
			'decl' => 14,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    65
			'headsec' => 8
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    66
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    67
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    68
	{#State 1
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    69
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    70
			'error' => 19,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    71
			"%%" => 16,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    72
			'IDENT' => 18
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    73
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    74
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    75
			'rules' => 15,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    76
			'rulesec' => 20,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    77
			'body' => 17
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    78
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    79
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    80
	{#State 2
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    81
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    82
			'CODE' => 21
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    83
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    84
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    85
	{#State 3
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    86
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    87
			"\n" => 22
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    88
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    89
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    90
	{#State 4
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    91
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    92
			'' => 23
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    93
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    94
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    95
	{#State 5
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    96
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    97
			"<" => 25
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    98
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    99
		DEFAULT => -19,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   100
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   101
			'typedecl' => 24
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   102
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   103
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   104
	{#State 6
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   105
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   106
			'IDENT' => 26
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   107
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   108
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   109
			'ident' => 27
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   110
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   111
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   112
	{#State 7
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   113
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   114
			"<" => 25
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   115
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   116
		DEFAULT => -19,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   117
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   118
			'typedecl' => 28
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   119
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   120
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   121
	{#State 8
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   122
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   123
			"%%" => 29
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   124
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   125
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   126
	{#State 9
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   127
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   128
			"\n" => 30
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   129
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   130
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   131
	{#State 10
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   132
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   133
			"<" => 25
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   134
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   135
		DEFAULT => -19,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   136
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   137
			'typedecl' => 31
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   138
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   139
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   140
	{#State 11
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   141
		DEFAULT => -10
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   142
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   143
	{#State 12
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   144
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   145
			"%%" => -7,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   146
			'HEADCODE' => 3,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   147
			'UNION' => 2,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   148
			'TOKEN' => 5,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   149
			'ASSOC' => 7,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   150
			'START' => 6,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   151
			'error' => 9,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   152
			'TYPE' => 10,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   153
			"\n" => 11,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   154
			'EXPECT' => 13
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   155
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   156
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   157
			'decl' => 32
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   158
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   159
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   160
	{#State 13
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   161
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   162
			'NUMBER' => 33
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   163
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   164
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   165
	{#State 14
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   166
		DEFAULT => -9
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   167
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   168
	{#State 15
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   169
		DEFAULT => -28
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   170
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   171
	{#State 16
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   172
		DEFAULT => -26
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   173
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   174
	{#State 17
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   175
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   176
			'TAILCODE' => 34
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   177
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   178
		DEFAULT => -45,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   179
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   180
			'tail' => 35
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   181
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   182
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   183
	{#State 18
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   184
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   185
			":" => 36
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   186
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   187
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   188
	{#State 19
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   189
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   190
			";" => 37
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   191
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   192
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   193
	{#State 20
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   194
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   195
			'error' => 19,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   196
			"%%" => 39,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   197
			'IDENT' => 18
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   198
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   199
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   200
			'rules' => 38
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   201
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   202
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   203
	{#State 21
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   204
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   205
			"\n" => 40
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   206
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   207
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   208
	{#State 22
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   209
		DEFAULT => -14
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   210
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   211
	{#State 23
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   212
		DEFAULT => -0
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   213
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   214
	{#State 24
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   215
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   216
			'LITERAL' => 41,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   217
			'IDENT' => 26
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   218
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   219
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   220
			'symlist' => 43,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   221
			'ident' => 44,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   222
			'symbol' => 42
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   223
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   224
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   225
	{#State 25
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   226
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   227
			'IDENT' => 45
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   228
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   229
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   230
	{#State 26
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   231
		DEFAULT => -4
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   232
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   233
	{#State 27
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   234
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   235
			"\n" => 46
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   236
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   237
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   238
	{#State 28
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   239
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   240
			'LITERAL' => 41,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   241
			'IDENT' => 26
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   242
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   243
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   244
			'symlist' => 47,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   245
			'ident' => 44,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   246
			'symbol' => 42
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   247
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   248
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   249
	{#State 29
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   250
		DEFAULT => -5
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   251
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   252
	{#State 30
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   253
		DEFAULT => -18
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   254
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   255
	{#State 31
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   256
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   257
			'IDENT' => 26
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   258
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   259
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   260
			'ident' => 48,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   261
			'identlist' => 49
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   262
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   263
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   264
	{#State 32
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   265
		DEFAULT => -8
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   266
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   267
	{#State 33
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   268
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   269
			"\n" => 50
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   270
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   271
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   272
	{#State 34
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   273
		DEFAULT => -46
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   274
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   275
	{#State 35
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   276
		DEFAULT => -1
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   277
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   278
	{#State 36
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   279
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   280
			'CODE' => 57,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   281
			'LITERAL' => 41,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   282
			'IDENT' => 26
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   283
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   284
		DEFAULT => -35,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   285
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   286
			'rhselts' => 56,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   287
			'rule' => 51,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   288
			'code' => 52,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   289
			'rhs' => 53,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   290
			'ident' => 44,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   291
			'rhselt' => 58,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   292
			'rhss' => 55,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   293
			'symbol' => 54
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   294
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   295
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   296
	{#State 37
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   297
		DEFAULT => -30
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   298
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   299
	{#State 38
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   300
		DEFAULT => -27
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   301
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   302
	{#State 39
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   303
		DEFAULT => -25
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   304
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   305
	{#State 40
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   306
		DEFAULT => -15
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   307
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   308
	{#State 41
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   309
		DEFAULT => -2
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   310
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   311
	{#State 42
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   312
		DEFAULT => -22
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   313
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   314
	{#State 43
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   315
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   316
			"\n" => 60,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   317
			'LITERAL' => 41,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   318
			'IDENT' => 26
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   319
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   320
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   321
			'ident' => 44,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   322
			'symbol' => 59
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   323
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   324
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   325
	{#State 44
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   326
		DEFAULT => -3
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   327
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   328
	{#State 45
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   329
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   330
			">" => 61
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   331
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   332
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   333
	{#State 46
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   334
		DEFAULT => -13
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   335
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   336
	{#State 47
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   337
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   338
			"\n" => 62,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   339
			'LITERAL' => 41,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   340
			'IDENT' => 26
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   341
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   342
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   343
			'ident' => 44,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   344
			'symbol' => 59
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   345
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   346
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   347
	{#State 48
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   348
		DEFAULT => -24
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   349
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   350
	{#State 49
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   351
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   352
			"\n" => 63,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   353
			'IDENT' => 26
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   354
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   355
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   356
			'ident' => 64
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   357
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   358
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   359
	{#State 50
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   360
		DEFAULT => -17
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   361
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   362
	{#State 51
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   363
		DEFAULT => -32
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   364
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   365
	{#State 52
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   366
		DEFAULT => -40
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   367
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   368
	{#State 53
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   369
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   370
			'PREC' => 66
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   371
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   372
		DEFAULT => -34,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   373
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   374
			'prec' => 65
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   375
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   376
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   377
	{#State 54
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   378
		DEFAULT => -39
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   379
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   380
	{#State 55
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   381
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   382
			"|" => 68,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   383
			";" => 67
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   384
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   385
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   386
	{#State 56
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   387
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   388
			'CODE' => 57,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   389
			'LITERAL' => 41,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   390
			'IDENT' => 26
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   391
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   392
		DEFAULT => -36,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   393
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   394
			'code' => 52,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   395
			'ident' => 44,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   396
			'rhselt' => 69,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   397
			'symbol' => 54
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   398
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   399
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   400
	{#State 57
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   401
		DEFAULT => -44
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   402
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   403
	{#State 58
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   404
		DEFAULT => -38
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   405
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   406
	{#State 59
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   407
		DEFAULT => -21
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   408
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   409
	{#State 60
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   410
		DEFAULT => -11
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   411
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   412
	{#State 61
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   413
		DEFAULT => -20
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   414
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   415
	{#State 62
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   416
		DEFAULT => -12
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   417
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   418
	{#State 63
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   419
		DEFAULT => -16
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   420
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   421
	{#State 64
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   422
		DEFAULT => -23
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   423
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   424
	{#State 65
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   425
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   426
			'CODE' => 57
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   427
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   428
		DEFAULT => -42,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   429
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   430
			'code' => 70,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   431
			'epscode' => 71
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   432
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   433
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   434
	{#State 66
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   435
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   436
			'LITERAL' => 41,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   437
			'IDENT' => 26
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   438
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   439
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   440
			'ident' => 44,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   441
			'symbol' => 72
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   442
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   443
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   444
	{#State 67
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   445
		DEFAULT => -29
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   446
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   447
	{#State 68
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   448
		ACTIONS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   449
			'CODE' => 57,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   450
			'LITERAL' => 41,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   451
			'IDENT' => 26
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   452
		},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   453
		DEFAULT => -35,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   454
		GOTOS => {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   455
			'rhselts' => 56,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   456
			'rule' => 73,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   457
			'code' => 52,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   458
			'rhs' => 53,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   459
			'ident' => 44,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   460
			'rhselt' => 58,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   461
			'symbol' => 54
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   462
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   463
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   464
	{#State 69
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   465
		DEFAULT => -37
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   466
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   467
	{#State 70
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   468
		DEFAULT => -43
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   469
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   470
	{#State 71
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   471
		DEFAULT => -33
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   472
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   473
	{#State 72
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   474
		DEFAULT => -41
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   475
	},
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   476
	{#State 73
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   477
		DEFAULT => -31
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   478
	}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   479
],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   480
                                  yyrules  =>
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   481
[
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   482
	[#Rule 0
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   483
		 '$start', 2, undef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   484
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   485
	[#Rule 1
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   486
		 'yapp', 3, undef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   487
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   488
	[#Rule 2
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   489
		 'symbol', 1,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   490
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   491
#line 30 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   492
{
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   493
                        exists($$syms{$_[1][0]})
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   494
                    or  do {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   495
                        $$syms{$_[1][0]} = $_[1][1];
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   496
                        $$term{$_[1][0]} = undef;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   497
                    };
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   498
                    $_[1]
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   499
                }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   500
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   501
	[#Rule 3
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   502
		 'symbol', 1, undef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   503
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   504
	[#Rule 4
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   505
		 'ident', 1,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   506
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   507
#line 41 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   508
{
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   509
                        exists($$syms{$_[1][0]})
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   510
                    or  do {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   511
                        $$syms{$_[1][0]} = $_[1][1];
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   512
                        $$term{$_[1][0]} = undef;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   513
                    };
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   514
                    $_[1]
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   515
                }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   516
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   517
	[#Rule 5
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   518
		 'head', 2, undef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   519
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   520
	[#Rule 6
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   521
		 'headsec', 0, undef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   522
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   523
	[#Rule 7
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   524
		 'headsec', 1, undef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   525
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   526
	[#Rule 8
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   527
		 'decls', 2, undef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   528
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   529
	[#Rule 9
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   530
		 'decls', 1, undef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   531
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   532
	[#Rule 10
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   533
		 'decl', 1, undef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   534
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   535
	[#Rule 11
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   536
		 'decl', 4,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   537
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   538
#line 66 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   539
{
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   540
                for (@{$_[3]}) {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   541
                    my($symbol,$lineno)=@$_;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   542
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   543
                        exists($$token{$symbol})
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   544
                    and do {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   545
                        _SyntaxError(0,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   546
                                "Token $symbol redefined: ".
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   547
                                "Previously defined line $$syms{$symbol}",
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   548
                                $lineno);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   549
                        next;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   550
                    };
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   551
                    $$token{$symbol}=$lineno;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   552
                    $$term{$symbol} = [ ];
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   553
                }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   554
                undef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   555
            }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   556
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   557
	[#Rule 12
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   558
		 'decl', 4,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   559
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   560
#line 84 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   561
{
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   562
                for (@{$_[3]}) {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   563
                    my($symbol,$lineno)=@$_;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   564
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   565
                        defined($$term{$symbol}[0])
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   566
                    and do {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   567
                        _SyntaxError(1,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   568
                            "Precedence for symbol $symbol redefined: ".
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   569
                            "Previously defined line $$syms{$symbol}",
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   570
                            $lineno);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   571
                        next;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   572
                    };
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   573
                    $$token{$symbol}=$lineno;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   574
                    $$term{$symbol} = [ $_[1][0], $prec ];
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   575
                }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   576
                ++$prec;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   577
                undef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   578
            }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   579
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   580
	[#Rule 13
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   581
		 'decl', 3,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   582
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   583
#line 102 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   584
{ $start=$_[2][0]; undef }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   585
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   586
	[#Rule 14
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   587
		 'decl', 2,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   588
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   589
#line 103 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   590
{ push(@$head,$_[1]); undef }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   591
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   592
	[#Rule 15
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   593
		 'decl', 3,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   594
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   595
#line 104 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   596
{ undef }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   597
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   598
	[#Rule 16
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   599
		 'decl', 4,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   600
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   601
#line 106 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   602
{
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   603
                for ( @{$_[3]} ) {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   604
                    my($symbol,$lineno)=@$_;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   605
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   606
                        exists($$nterm{$symbol})
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   607
                    and do {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   608
                        _SyntaxError(0,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   609
                                "Non-terminal $symbol redefined: ".
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   610
                                "Previously defined line $$syms{$symbol}",
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   611
                                $lineno);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   612
                        next;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   613
                    };
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   614
                    delete($$term{$symbol});   #not a terminal
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   615
                    $$nterm{$symbol}=undef;    #is a non-terminal
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   616
                }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   617
            }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   618
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   619
	[#Rule 17
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   620
		 'decl', 3,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   621
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   622
#line 122 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   623
{ $expect=$_[2][0]; undef }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   624
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   625
	[#Rule 18
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   626
		 'decl', 2,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   627
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   628
#line 123 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   629
{ $_[0]->YYErrok }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   630
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   631
	[#Rule 19
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   632
		 'typedecl', 0, undef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   633
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   634
	[#Rule 20
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   635
		 'typedecl', 3, undef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   636
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   637
	[#Rule 21
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   638
		 'symlist', 2,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   639
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   640
#line 130 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   641
{ push(@{$_[1]},$_[2]); $_[1] }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   642
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   643
	[#Rule 22
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   644
		 'symlist', 1,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   645
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   646
#line 131 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   647
{ [ $_[1] ] }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   648
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   649
	[#Rule 23
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   650
		 'identlist', 2,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   651
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   652
#line 134 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   653
{ push(@{$_[1]},$_[2]); $_[1] }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   654
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   655
	[#Rule 24
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   656
		 'identlist', 1,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   657
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   658
#line 135 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   659
{ [ $_[1] ] }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   660
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   661
	[#Rule 25
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   662
		 'body', 2,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   663
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   664
#line 140 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   665
{
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   666
                    $start
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   667
                or  $start=$$rules[1][0];
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   668
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   669
                    ref($$nterm{$start})
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   670
                or  _SyntaxError(2,"Start symbol $start not found ".
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   671
                                   "in rules section",$_[2][1]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   672
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   673
                $$rules[0]=[ '$start', [ $start, chr(0) ], undef, undef ];
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   674
            }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   675
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   676
	[#Rule 26
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   677
		 'body', 1,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   678
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   679
#line 150 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   680
{ _SyntaxError(2,"No rules in input grammar",$_[1][1]); }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   681
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   682
	[#Rule 27
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   683
		 'rulesec', 2, undef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   684
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   685
	[#Rule 28
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   686
		 'rulesec', 1, undef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   687
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   688
	[#Rule 29
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   689
		 'rules', 4,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   690
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   691
#line 157 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   692
{ _AddRules($_[1],$_[3]); undef }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   693
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   694
	[#Rule 30
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   695
		 'rules', 2,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   696
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   697
#line 158 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   698
{ $_[0]->YYErrok }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   699
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   700
	[#Rule 31
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   701
		 'rhss', 3,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   702
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   703
#line 161 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   704
{ push(@{$_[1]},$_[3]); $_[1] }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   705
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   706
	[#Rule 32
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   707
		 'rhss', 1,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   708
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   709
#line 162 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   710
{ [ $_[1] ] }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   711
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   712
	[#Rule 33
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   713
		 'rule', 3,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   714
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   715
#line 165 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   716
{ push(@{$_[1]}, $_[2], $_[3]); $_[1] }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   717
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   718
	[#Rule 34
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   719
		 'rule', 1,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   720
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   721
#line 166 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   722
{
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   723
                                my($code)=undef;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   724
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   725
                                    defined($_[1])
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   726
                                and $_[1][-1][0] eq 'CODE'
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   727
                                and $code = ${pop(@{$_[1]})}[1];
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   728
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   729
                                push(@{$_[1]}, undef, $code);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   730
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   731
                                $_[1]
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   732
                            }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   733
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   734
	[#Rule 35
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   735
		 'rhs', 0, undef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   736
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   737
	[#Rule 36
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   738
		 'rhs', 1, undef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   739
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   740
	[#Rule 37
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   741
		 'rhselts', 2,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   742
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   743
#line 183 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   744
{ push(@{$_[1]},$_[2]); $_[1] }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   745
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   746
	[#Rule 38
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   747
		 'rhselts', 1,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   748
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   749
#line 184 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   750
{ [ $_[1] ] }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   751
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   752
	[#Rule 39
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   753
		 'rhselt', 1,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   754
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   755
#line 187 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   756
{ [ 'SYMB', $_[1] ] }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   757
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   758
	[#Rule 40
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   759
		 'rhselt', 1,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   760
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   761
#line 188 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   762
{ [ 'CODE', $_[1] ] }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   763
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   764
	[#Rule 41
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   765
		 'prec', 2,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   766
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   767
#line 192 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   768
{
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   769
                       	defined($$term{$_[2][0]})
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   770
                    or  do {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   771
                        _SyntaxError(1,"No precedence for symbol $_[2][0]",
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   772
                                         $_[2][1]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   773
                        return undef;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   774
                    };
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   775
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   776
                    ++$$precterm{$_[2][0]};
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   777
                    $$term{$_[2][0]}[1];
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   778
				}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   779
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   780
	[#Rule 42
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   781
		 'epscode', 0,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   782
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   783
#line 205 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   784
{ undef }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   785
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   786
	[#Rule 43
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   787
		 'epscode', 1,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   788
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   789
#line 206 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   790
{ $_[1] }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   791
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   792
	[#Rule 44
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   793
		 'code', 1,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   794
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   795
#line 209 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   796
{ $_[1] }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   797
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   798
	[#Rule 45
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   799
		 'tail', 0, undef
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   800
	],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   801
	[#Rule 46
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   802
		 'tail', 1,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   803
sub
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   804
#line 215 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   805
{ $tail=$_[1] }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   806
	]
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   807
],
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   808
                                  @_);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   809
    bless($self,$class);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   810
}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   811
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   812
#line 218 "YappParse.yp"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   813
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   814
sub _Error {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   815
    my($value)=$_[0]->YYCurval;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   816
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   817
    my($what)= $token ? "input: '$$value[0]'" : "end of input";
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   818
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   819
    _SyntaxError(1,"Unexpected $what",$$value[1]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   820
}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   821
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   822
sub _Lexer {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   823
 
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   824
    #At EOF
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   825
        pos($$input) >= length($$input)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   826
    and return('',[ undef, -1 ]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   827
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   828
    #In TAIL section
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   829
        $lexlevel > 1
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   830
    and do {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   831
        my($pos)=pos($$input);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   832
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   833
        $lineno[0]=$lineno[1];
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   834
        $lineno[1]=-1;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   835
        pos($$input)=length($$input);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   836
        return('TAILCODE',[ substr($$input,$pos), $lineno[0] ]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   837
    };
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   838
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   839
    #Skip blanks
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   840
            $lexlevel == 0
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   841
        ?   $$input=~m{\G((?:
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   842
                                [\t\ ]+    # Any white space char but \n
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   843
                            |   \#[^\n]*  # Perl like comments
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   844
                            |   /\*.*?\*/ # C like comments
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   845
                            )+)}xsgc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   846
        :   $$input=~m{\G((?:
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   847
                                \s+       # any white space char
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   848
                            |   \#[^\n]*  # Perl like comments
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   849
                            |   /\*.*?\*/ # C like comments
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   850
                            )+)}xsgc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   851
    and do {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   852
        my($blanks)=$1;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   853
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   854
        #Maybe At EOF
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   855
            pos($$input) >= length($$input)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   856
        and return('',[ undef, -1 ]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   857
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   858
        $lineno[1]+= $blanks=~tr/\n//;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   859
    };
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   860
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   861
    $lineno[0]=$lineno[1];
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   862
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   863
        $$input=~/\G([A-Za-z_][A-Za-z0-9_]*)/gc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   864
    and return('IDENT',[ $1, $lineno[0] ]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   865
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   866
        $$input=~/\G('(?:[^'\\]|\\\\|\\'|\\)+?')/gc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   867
    and do {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   868
            $1 eq "'error'"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   869
        and do {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   870
            _SyntaxError(0,"Literal 'error' ".
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   871
                           "will be treated as error token",$lineno[0]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   872
            return('IDENT',[ 'error', $lineno[0] ]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   873
        };
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   874
        return('LITERAL',[ $1, $lineno[0] ]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   875
    };
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   876
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   877
        $$input=~/\G(%%)/gc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   878
    and do {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   879
        ++$lexlevel;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   880
        return($1, [ $1, $lineno[0] ]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   881
    };
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   882
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   883
        $$input=~/\G{/gc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   884
    and do {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   885
        my($level,$from,$code);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   886
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   887
        $from=pos($$input);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   888
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   889
        $level=1;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   890
        while($$input=~/([{}])/gc) {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   891
                substr($$input,pos($$input)-1,1) eq '\\' #Quoted
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   892
            and next;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   893
                $level += ($1 eq '{' ? 1 : -1)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   894
            or last;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   895
        }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   896
            $level
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   897
        and  _SyntaxError(2,"Unmatched { opened line $lineno[0]",-1);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   898
        $code = substr($$input,$from,pos($$input)-$from-1);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   899
        $lineno[1]+= $code=~tr/\n//;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   900
        return('CODE',[ $code, $lineno[0] ]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   901
    };
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   902
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   903
    if($lexlevel == 0) {# In head section
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   904
            $$input=~/\G%(left|right|nonassoc)/gc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   905
        and return('ASSOC',[ uc($1), $lineno[0] ]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   906
            $$input=~/\G%(start)/gc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   907
        and return('START',[ undef, $lineno[0] ]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   908
            $$input=~/\G%(expect)/gc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   909
        and return('EXPECT',[ undef, $lineno[0] ]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   910
            $$input=~/\G%{/gc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   911
        and do {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   912
            my($code);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   913
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   914
                $$input=~/\G(.*?)%}/sgc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   915
            or  _SyntaxError(2,"Unmatched %{ opened line $lineno[0]",-1);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   916
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   917
            $code=$1;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   918
            $lineno[1]+= $code=~tr/\n//;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   919
            return('HEADCODE',[ $code, $lineno[0] ]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   920
        };
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   921
            $$input=~/\G%(token)/gc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   922
        and return('TOKEN',[ undef, $lineno[0] ]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   923
            $$input=~/\G%(type)/gc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   924
        and return('TYPE',[ undef, $lineno[0] ]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   925
            $$input=~/\G%(union)/gc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   926
        and return('UNION',[ undef, $lineno[0] ]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   927
            $$input=~/\G([0-9]+)/gc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   928
        and return('NUMBER',[ $1, $lineno[0] ]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   929
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   930
    }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   931
    else {# In rule section
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   932
            $$input=~/\G%(prec)/gc
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   933
        and return('PREC',[ undef, $lineno[0] ]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   934
    }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   935
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   936
    #Always return something
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   937
        $$input=~/\G(.)/sg
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   938
    or  die "Parse::Yapp::Grammar::Parse: Match (.) failed: report as a BUG";
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   939
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   940
        $1 eq "\n"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   941
    and ++$lineno[1];
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   942
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   943
    ( $1 ,[ $1, $lineno[0] ]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   944
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   945
}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   946
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   947
sub _SyntaxError {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   948
    my($level,$message,$lineno)=@_;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   949
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   950
    $message= "*".
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   951
              [ 'Warning', 'Error', 'Fatal' ]->[$level].
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   952
              "* $message, at ".
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   953
              ($lineno < 0 ? "eof" : "line $lineno").
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   954
              ".\n";
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   955
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   956
        $level > 1
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   957
    and die $message;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   958
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   959
    warn $message;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   960
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   961
        $level > 0
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   962
    and ++$nberr;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   963
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   964
        $nberr == 20 
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   965
    and die "*Fatal* Too many errors detected.\n"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   966
}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   967
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   968
sub _AddRules {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   969
    my($lhs,$lineno)=@{$_[0]};
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   970
    my($rhss)=$_[1];
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   971
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   972
        ref($$nterm{$lhs})
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   973
    and do {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   974
        _SyntaxError(1,"Non-terminal $lhs redefined: ".
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   975
                       "Previously declared line $$syms{$lhs}",$lineno);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   976
        return;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   977
    };
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   978
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   979
        ref($$term{$lhs})
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   980
    and do {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   981
        my($where) = exists($$token{$lhs}) ? $$token{$lhs} : $$syms{$lhs};
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   982
        _SyntaxError(1,"Non-terminal $lhs previously ".
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   983
                       "declared as token line $where",$lineno);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   984
        return;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   985
    };
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   986
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   987
        ref($$nterm{$lhs})      #declared through %type
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   988
    or  do {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   989
            $$syms{$lhs}=$lineno;   #Say it's declared here
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   990
            delete($$term{$lhs});   #No more a terminal
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   991
    };
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   992
    $$nterm{$lhs}=[];       #It's a non-terminal now
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   993
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   994
    my($epsrules)=0;        #To issue a warning if more than one epsilon rule
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   995
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   996
    for my $rhs (@$rhss) {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   997
        my($tmprule)=[ $lhs, [ ], splice(@$rhs,-2) ]; #Init rule
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   998
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
   999
            @$rhs
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1000
        or  do {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1001
            ++$$nullable{$lhs};
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1002
            ++$epsrules;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1003
        };
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1004
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1005
        for (0..$#$rhs) {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1006
            my($what,$value)=@{$$rhs[$_]};
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1007
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1008
                $what eq 'CODE'
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1009
            and do {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1010
                my($name)='@'.++$labelno."-$_";
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1011
                push(@$rules,[ $name, [], undef, $value ]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1012
                push(@{$$tmprule[1]},$name);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1013
                next;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1014
            };
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1015
            push(@{$$tmprule[1]},$$value[0]);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1016
        }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1017
        push(@$rules,$tmprule);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1018
        push(@{$$nterm{$lhs}},$#$rules);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1019
    }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1020
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1021
        $epsrules > 1
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1022
    and _SyntaxError(0,"More than one empty rule for symbol $lhs",$lineno);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1023
}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1024
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1025
sub Parse {
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1026
    my($self)=shift;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1027
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1028
        @_ > 0
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1029
    or  croak("No input grammar\n");
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1030
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1031
    my($parsed)={};
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1032
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1033
    $input=\$_[0];
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1034
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1035
    $lexlevel=0;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1036
    @lineno=(1,1);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1037
    $nberr=0;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1038
    $prec=0;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1039
    $labelno=0;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1040
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1041
    $head=();
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1042
    $tail="";
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1043
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1044
    $syms={};
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1045
    $token={};
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1046
    $term={};
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1047
    $nterm={};
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1048
    $rules=[ undef ];   #reserve slot 0 for start rule
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1049
    $precterm={};
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1050
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1051
    $start="";
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1052
    $nullable={};
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1053
    $expect=0;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1054
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1055
    pos($$input)=0;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1056
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1057
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1058
    $self->YYParse(yylex => \&_Lexer, yyerror => \&_Error);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1059
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1060
        $nberr
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1061
    and _SyntaxError(2,"Errors detected: No output",-1);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1062
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1063
    @$parsed{ 'HEAD', 'TAIL', 'RULES', 'NTERM', 'TERM',
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1064
              'NULL', 'PREC', 'SYMS',  'START', 'EXPECT' }
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1065
    =       (  $head,  $tail,  $rules,  $nterm,  $term,
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1066
               $nullable, $precterm, $syms, $start, $expect);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1067
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1068
    undef($input);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1069
    undef($lexlevel);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1070
    undef(@lineno);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1071
    undef($nberr);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1072
    undef($prec);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1073
    undef($labelno);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1074
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1075
    undef($head);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1076
    undef($tail);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1077
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1078
    undef($syms);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1079
    undef($token);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1080
    undef($term);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1081
    undef($nterm);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1082
    undef($rules);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1083
    undef($precterm);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1084
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1085
    undef($start);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1086
    undef($nullable);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1087
    undef($expect);
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1088
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1089
    $parsed
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1090
}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1091
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1092
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
  1093
1;