AmberVM 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
- data/README +38 -0
- data/bin/ambervm +278 -0
- data/lib/amber/acts_as_rvm_type.rb +157 -0
- data/lib/amber/classes/association.rb +36 -0
- data/lib/amber/classes/block.rb +52 -0
- data/lib/amber/classes/boolean.rb +40 -0
- data/lib/amber/classes/class.rb +50 -0
- data/lib/amber/classes/error.rb +22 -0
- data/lib/amber/classes/list.rb +96 -0
- data/lib/amber/classes/null.rb +35 -0
- data/lib/amber/classes/number.rb +95 -0
- data/lib/amber/classes/object.rb +56 -0
- data/lib/amber/classes/string.rb +79 -0
- data/lib/amber/classes.rb +113 -0
- data/lib/amber/environment.rb +251 -0
- data/lib/amber/fukubukuro/ecma_core.rb +409 -0
- data/lib/amber/fukubukuro.rb +866 -0
- data/lib/amber/functions/all.rb +3 -0
- data/lib/amber/functions/array/append.rb +50 -0
- data/lib/amber/functions/array/at.rb +50 -0
- data/lib/amber/functions/array/set_at.rb +50 -0
- data/lib/amber/functions/array.rb +30 -0
- data/lib/amber/functions/association/assoc_get.rb +55 -0
- data/lib/amber/functions/association/assoc_set.rb +56 -0
- data/lib/amber/functions/bitwise/bitwise_and.rb +41 -0
- data/lib/amber/functions/bitwise/bitwise_not.rb +41 -0
- data/lib/amber/functions/bitwise/bitwise_or.rb +41 -0
- data/lib/amber/functions/bitwise/bitwise_xor.rb +41 -0
- data/lib/amber/functions/bitwise.rb +3 -0
- data/lib/amber/functions/collection/get.rb +66 -0
- data/lib/amber/functions/collection/set.rb +67 -0
- data/lib/amber/functions/collection/size.rb +54 -0
- data/lib/amber/functions/general/cmp.rb +43 -0
- data/lib/amber/functions/general/eq.rb +45 -0
- data/lib/amber/functions/general/gt.rb +45 -0
- data/lib/amber/functions/general/gte.rb +45 -0
- data/lib/amber/functions/general/lt.rb +45 -0
- data/lib/amber/functions/general/lte.rb +45 -0
- data/lib/amber/functions/general/neq.rb +45 -0
- data/lib/amber/functions/general/type.rb +43 -0
- data/lib/amber/functions/general.rb +3 -0
- data/lib/amber/functions/io/print.rb +45 -0
- data/lib/amber/functions/io.rb +3 -0
- data/lib/amber/functions/list/align.rb +73 -0
- data/lib/amber/functions/list/join.rb +45 -0
- data/lib/amber/functions/list/map.rb +58 -0
- data/lib/amber/functions/list/split.rb +55 -0
- data/lib/amber/functions/list.rb +3 -0
- data/lib/amber/functions/logic/and.rb +55 -0
- data/lib/amber/functions/logic/not.rb +40 -0
- data/lib/amber/functions/logic/or.rb +50 -0
- data/lib/amber/functions/logic.rb +3 -0
- data/lib/amber/functions/math/abs.rb +39 -0
- data/lib/amber/functions/math/acos.rb +39 -0
- data/lib/amber/functions/math/add.rb +40 -0
- data/lib/amber/functions/math/asin.rb +39 -0
- data/lib/amber/functions/math/atan.rb +39 -0
- data/lib/amber/functions/math/ceil.rb +39 -0
- data/lib/amber/functions/math/cos.rb +39 -0
- data/lib/amber/functions/math/dec.rb +39 -0
- data/lib/amber/functions/math/div.rb +44 -0
- data/lib/amber/functions/math/exp.rb +39 -0
- data/lib/amber/functions/math/floor.rb +39 -0
- data/lib/amber/functions/math/inc.rb +39 -0
- data/lib/amber/functions/math/log.rb +39 -0
- data/lib/amber/functions/math/mod.rb +41 -0
- data/lib/amber/functions/math/mul.rb +43 -0
- data/lib/amber/functions/math/neg.rb +43 -0
- data/lib/amber/functions/math/power.rb +43 -0
- data/lib/amber/functions/math/rand.rb +36 -0
- data/lib/amber/functions/math/round.rb +39 -0
- data/lib/amber/functions/math/shl.rb +41 -0
- data/lib/amber/functions/math/shr.rb +41 -0
- data/lib/amber/functions/math/sin.rb +39 -0
- data/lib/amber/functions/math/sub.rb +43 -0
- data/lib/amber/functions/math/tan.rb +39 -0
- data/lib/amber/functions/math.rb +3 -0
- data/lib/amber/functions/objects/send.rb +22 -0
- data/lib/amber/functions/rails/print.rb +44 -0
- data/lib/amber/functions/rails.rb +3 -0
- data/lib/amber/functions/string/ansi.rb +24 -0
- data/lib/amber/functions/string/capstr.rb +23 -0
- data/lib/amber/functions/string/center.rb +25 -0
- data/lib/amber/functions/string/chr.rb +16 -0
- data/lib/amber/functions/string/ljust.rb +26 -0
- data/lib/amber/functions/string/regmatch.rb +34 -0
- data/lib/amber/functions/string/rjust.rb +26 -0
- data/lib/amber/functions/string.rb +3 -0
- data/lib/amber/functions.rb +103 -0
- data/lib/amber/interpreter.rb +1380 -0
- data/lib/amber/languages/brainfuck.rb +153 -0
- data/lib/amber/languages/ecma/compiler.rb +1661 -0
- data/lib/amber/languages/ecma/core-math.js +67 -0
- data/lib/amber/languages/ecma/core-objects.js +57 -0
- data/lib/amber/languages/ecma.rb +9 -0
- data/lib/amber/languages/ecma_fuku/compiler.rb +1622 -0
- data/lib/amber/languages/ecma_fuku/core-math.js +67 -0
- data/lib/amber/languages/ecma_fuku/core-objects.js +56 -0
- data/lib/amber/languages/ecma_fuku.rb +13 -0
- data/lib/amber/languages/math/compiler.rb +70 -0
- data/lib/amber/languages/math/tokenizer.rb +69 -0
- data/lib/amber/languages/math/tree.rb +110 -0
- data/lib/amber/languages/math.rb +26 -0
- data/lib/amber/languages.rb +99 -0
- data/lib/amber/library.rb +79 -0
- data/lib/amber/optimisation.rb +299 -0
- data/lib/amber/plugin.rb +337 -0
- data/lib/amber/rails.rb +90 -0
- data/lib/amber.rb +106 -0
- data/spec/amber/class_spec.rb +27 -0
- data/spec/amber/enviroment_spec.rb +61 -0
- data/spec/amber/function_spec.rb +25 -0
- data/spec/amber/functions/association/assoc_get_spec.rb +41 -0
- data/spec/amber/functions/association/assoc_set_spec.rb +43 -0
- data/spec/amber/functions/collection/get_spec.rb +12 -0
- data/spec/amber/functions/collection/set_spec.rb +10 -0
- data/spec/amber/functions/collection/size_spec.rb +10 -0
- data/spec/amber/functions/list/split_spec.rb +47 -0
- data/spec/amber/functions/string/ansi_spec.rb +44 -0
- data/spec/amber/functions/string/capstr_spec.rb +42 -0
- data/spec/amber/functions/string/center_spec.rb +49 -0
- data/spec/amber/functions/string/ljust_spec.rb +49 -0
- data/spec/amber/functions/string/regmatch_spec.rb +52 -0
- data/spec/amber/functions/string/rjust_spec.rb +49 -0
- data/spec/amber/interpreter/assignment_spec.rb +22 -0
- data/spec/amber/interpreter/condition_spec.rb +103 -0
- data/spec/amber/interpreter/constant_spec.rb +31 -0
- data/spec/amber/interpreter/core_call_spec.rb +72 -0
- data/spec/amber/interpreter/interpreter_spec.rb +11 -0
- data/spec/amber/interpreter/parameter_spec.rb +24 -0
- data/spec/amber/interpreter/sequence_spec.rb +47 -0
- data/spec/amber/interpreter/variable_spec.rb +24 -0
- data/spec/amber/plugin_spec.rb +10 -0
- data/spec/classes/atom/association_spec.rb +39 -0
- data/spec/classes/atom/block_spec.rb +25 -0
- data/spec/classes/atom/boolean_spec.rb +67 -0
- data/spec/classes/atom/error_spec.rb +43 -0
- data/spec/classes/atom/list_spec.rb +68 -0
- data/spec/classes/atom/number_spec.rb +132 -0
- data/spec/classes/atom/string_spec.rb +175 -0
- data/spec/languages/ecma/ecma_array_spec.rb +79 -0
- data/spec/languages/ecma/ecma_closure_spec.rb +38 -0
- data/spec/languages/ecma/ecma_literals_spec.rb +71 -0
- data/spec/languages/ecma/ecma_objects_spec.rb +165 -0
- data/spec/languages/ecma/ecma_old_spec.rb +540 -0
- data/spec/languages/ecma/ecma_spec.rb +64 -0
- data/spec/languages/ecma_fuku/ecma_array_spec.rb +61 -0
- data/spec/languages/ecma_fuku/ecma_closure_spec.rb +33 -0
- data/spec/languages/ecma_fuku/ecma_function_spec.rb +84 -0
- data/spec/languages/ecma_fuku/ecma_literals_spec.rb +55 -0
- data/spec/languages/ecma_fuku/ecma_objects_spec.rb +133 -0
- data/spec/languages/ecma_fuku/ecma_old_spec.rb +415 -0
- data/spec/languages/ecma_fuku/ecma_operator_spec.rb +33 -0
- data/spec/languages/ecma_fuku/ecma_spec.rb +52 -0
- data/spec/languages/math/compiler_spec.rb +49 -0
- data/spec/languages/math/tokenizer_spec.rb +73 -0
- data/spec/languages/math/tree_spec.rb +153 -0
- metadata +225 -0
@@ -0,0 +1,1622 @@
|
|
1
|
+
#
|
2
|
+
# DO NOT MODIFY!!!!
|
3
|
+
# This file is automatically generated by Racc 1.4.5
|
4
|
+
# from Racc grammer file "".
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'racc/parser.rb'
|
8
|
+
|
9
|
+
|
10
|
+
require 'strscan'
|
11
|
+
require 'amber/fukubukuro'
|
12
|
+
require 'amber/fukubukuro/ecma_core'
|
13
|
+
require 'ostruct'
|
14
|
+
require 'pp'
|
15
|
+
|
16
|
+
module AmberVM
|
17
|
+
module Languages
|
18
|
+
class ECMA_Fuku
|
19
|
+
class Compiler < Racc::Parser
|
20
|
+
|
21
|
+
module_eval(<<'...end ecma_fuku.y/module_eval...', 'ecma_fuku.y', 288)
|
22
|
+
|
23
|
+
include Fukubukuro
|
24
|
+
|
25
|
+
if RUBY_VERSION < '1.9' and not true.respond_to?(:~)
|
26
|
+
class ::TrueClass
|
27
|
+
def ~; false end
|
28
|
+
end
|
29
|
+
class ::FalseClass
|
30
|
+
def ~; true end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def compile(str, include_core = false)
|
35
|
+
@variables = Environment.new
|
36
|
+
@q = []
|
37
|
+
str = str.chomp(';') + ';'
|
38
|
+
s = StringScanner.new(str)
|
39
|
+
pos = 0
|
40
|
+
line = 1
|
41
|
+
while not s.eos?
|
42
|
+
if s.scan(/\/\/.*/)
|
43
|
+
# ignore comments
|
44
|
+
elsif s.scan(/\n/)
|
45
|
+
line += 1
|
46
|
+
pos = s.pos
|
47
|
+
elsif s.scan(/\/\*.*?\*\//m)
|
48
|
+
line += s.matched.count("\n")
|
49
|
+
elsif s.scan(/' [^\\']* (?: \\ (?: u[a-zA-Z0-9]{4} | [a-tv-wyz1-9_\W] ) [^\\']* )* '/x)
|
50
|
+
m = s.matched[1..-2]
|
51
|
+
@q.push [:STRING, [m, [s.pos, line, s.pos - pos]]]
|
52
|
+
elsif s.scan(/" [^\\"]* (?: \\ (?: u[a-zA-Z0-9]{4} | [a-tv-wyz1-9_\W] ) [^\\"]* )* "/x)
|
53
|
+
m = s.matched[1..-2]
|
54
|
+
m.gsub!(/\\./) do |repl|
|
55
|
+
case repl[1]
|
56
|
+
when ?n
|
57
|
+
"\n"
|
58
|
+
when ?t
|
59
|
+
"\t"
|
60
|
+
when ?\\
|
61
|
+
'\\'
|
62
|
+
end
|
63
|
+
end
|
64
|
+
@q.push [:STRING, [m, [s.pos, line, s.pos - pos]]]
|
65
|
+
elsif s.scan(/ (?:\d*\.\d+) (?:e[-+]?\d+)? | \d+e[-+]?\d+ /ix)
|
66
|
+
@q.push [:FLOAT, [Float(s.matched), [s.pos, line, s.pos - pos]]]
|
67
|
+
elsif s.scan(/0x[0-9A-F]+ | \d+/ix)
|
68
|
+
@q.push [:INTEGER, [Integer(s.matched), [s.pos, line, s.pos - pos]]]
|
69
|
+
elsif s.scan(/\[/)
|
70
|
+
@q.push [:SBRACKET_OPEN, [s.matched, [s.pos, line, s.pos - pos]]]
|
71
|
+
elsif s.scan(/\]/)
|
72
|
+
@q.push [:SBRACKET_CLOSE, [s.matched, [s.pos, line, s.pos - pos]]]
|
73
|
+
elsif s.scan(/\{/)
|
74
|
+
@q.push [:CBRACKET_OPEN, [s.matched, [s.pos, line, s.pos - pos]]]
|
75
|
+
elsif s.scan(/\}/)
|
76
|
+
@q.push [:CBRACKET_CLOSE, [s.matched, [s.pos, line, s.pos - pos]]]
|
77
|
+
elsif s.scan(/\$?[a-z_][a-z_0-9]*/i)
|
78
|
+
m = s.matched
|
79
|
+
type = case m
|
80
|
+
when '__AmberVM__'
|
81
|
+
include_core ? :KW_CORE : :IDENT
|
82
|
+
when 'function'
|
83
|
+
:KW_FUNCTION
|
84
|
+
when 'typeof'
|
85
|
+
:KW_TYPEOF
|
86
|
+
when 'for'
|
87
|
+
:KW_FOR
|
88
|
+
when 'while'
|
89
|
+
:KW_WHILE
|
90
|
+
when 'do'
|
91
|
+
:KW_DO
|
92
|
+
when 'if'
|
93
|
+
:KW_IF
|
94
|
+
when 'return'
|
95
|
+
:KW_RETURN
|
96
|
+
when 'else'
|
97
|
+
:KW_ELSE
|
98
|
+
when 'new'
|
99
|
+
:KW_NEW
|
100
|
+
when 'this'
|
101
|
+
:KW_THIS
|
102
|
+
when 'var'
|
103
|
+
:KW_VAR
|
104
|
+
when 'true'
|
105
|
+
:KW_TRUE
|
106
|
+
when 'false'
|
107
|
+
:KW_FALSE
|
108
|
+
when 'null'
|
109
|
+
:KW_NULL
|
110
|
+
else
|
111
|
+
m = m.to_sym
|
112
|
+
:IDENT
|
113
|
+
end
|
114
|
+
@q.push [type, [m, [s.pos, line, s.pos - pos]]]
|
115
|
+
elsif s.scan(/>>>?=?|<<=?|&&|\|\||[<>]=?|[!=]=?=?|[-+]{2}|[-+*\/%^|&~]=?|[.,()?:;]/)
|
116
|
+
m = s.matched
|
117
|
+
@q.push [m, [m, [s.pos, line, s.pos - pos]]]
|
118
|
+
elsif s.scan(/[ \t]+/)
|
119
|
+
# ignore white space
|
120
|
+
else c = s.getch
|
121
|
+
raise Exception, "Woops! I can't deal with char %p at #{line}:#{s.pos - pos}" % [c]
|
122
|
+
end
|
123
|
+
end
|
124
|
+
@q.push([false, '$end'])
|
125
|
+
|
126
|
+
do_parse
|
127
|
+
end
|
128
|
+
|
129
|
+
def next_token
|
130
|
+
@q.shift
|
131
|
+
end
|
132
|
+
|
133
|
+
def const value
|
134
|
+
Constant.new Fukubukuro::ECMA.make_core_object_from(value)
|
135
|
+
end
|
136
|
+
def immediate const
|
137
|
+
Constant.new const.value.value
|
138
|
+
end
|
139
|
+
def new_object
|
140
|
+
Constant.new Fukubukuro::ECMA::Core::Object.new(::OpenStruct.new)
|
141
|
+
end
|
142
|
+
def new_variable name
|
143
|
+
var = @variables[name] = Variable.new(const(:undefined))
|
144
|
+
var.name = name
|
145
|
+
var
|
146
|
+
end
|
147
|
+
def get_variable name
|
148
|
+
var = @variables[name] ||= new_variable(name)
|
149
|
+
var
|
150
|
+
end
|
151
|
+
|
152
|
+
def env
|
153
|
+
{}
|
154
|
+
end
|
155
|
+
|
156
|
+
class self::Program < Fukubukuro::Program
|
157
|
+
def ruby_to_amber object
|
158
|
+
Fukubukuro::ECMA.make_core_object_from(object)
|
159
|
+
end
|
160
|
+
end
|
161
|
+
...end ecma_fuku.y/module_eval...
|
162
|
+
##### State transition tables begin ###
|
163
|
+
|
164
|
+
clist = [
|
165
|
+
'-70,-70,-70,-71,127,95,97,132,184,107,186,-70,81,63,64,66,67,187,26',
|
166
|
+
'30,34,39,46,198,198,19,8,14,185,133,106,86,87,88,89,91,92,93,94,96,98',
|
167
|
+
'99,85,26,30,34,39,46,212,199,201,8,14,120,-4,155,-4,203,56,10,17,19',
|
168
|
+
'-70,-70,-70,-71,128,90,90,5,9,16,21,-70,196,36,40,48,19,82,119,-3,15',
|
169
|
+
'-3,10,17,19,206,-5,19,-5,118,36,1,5,9,16,21,182,155,36,40,48,36,82,184',
|
170
|
+
'19,15,26,30,34,39,46,81,63,64,8,14,81,63,64,66,67,68,70,72,74,76,78',
|
171
|
+
'80,210,180,26,30,34,39,46,81,63,64,8,14,81,63,64,66,67,112,111,10,17',
|
172
|
+
'19,24,28,33,109,44,50,1,5,9,16,21,23,129,36,40,48,178,2,57,12,15,10',
|
173
|
+
'17,19,81,63,64,66,67,19,197,5,9,16,21,130,210,36,40,48,219,82,26,30',
|
174
|
+
'15,220,46,221,131,131,8,14,81,63,64,66,67,68,70,72,74,76,78,80,56,225',
|
175
|
+
'26,30,34,39,46,155,,,8,14,,,,,,,,10,17,19,,,,,,,,5,9,16,21,,,36,40,48',
|
176
|
+
',82,,,15,10,17,19,24,28,33,,44,50,1,5,9,16,21,23,,36,40,48,,2,,12,15',
|
177
|
+
'26,30,,,46,,,,8,14,81,63,64,66,67,68,70,72,,,,,,,26,30,34,39,46,,,,8',
|
178
|
+
'14,,,,,,,,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,,82,,,15,10,17,19,,,',
|
179
|
+
',,,,5,9,16,21,,,36,40,48,,82,,,15,26,30,34,39,46,,,,8,14,81,63,64,66',
|
180
|
+
'67,68,70,72,,,,,,,26,30,34,39,46,,,,8,14,,,,,,,,10,17,19,,,,,,,,5,9',
|
181
|
+
'16,21,,,36,40,48,,82,,,15,10,17,19,24,28,33,,44,50,1,5,9,16,21,23,,36',
|
182
|
+
'40,48,,2,,124,15,26,30,,,46,,,,8,14,81,63,64,66,67,68,70,72,,,,,,,26',
|
183
|
+
'30,34,39,46,,,,8,14,,,,,,,,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,,82',
|
184
|
+
',,15,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,,82,26,30,15,,46,,,,8,14,81',
|
185
|
+
'63,64,66,67,68,70,72,,,,,,,26,30,34,39,46,,,,8,14,,,,,,,,10,17,19,,',
|
186
|
+
',,,,,5,9,16,21,,,36,40,48,,82,,,15,10,17,19,24,28,33,,44,50,1,5,9,16',
|
187
|
+
'21,23,,36,40,48,,2,,124,15,26,30,34,39,46,,,,8,14,,,,,,,,,,,,,,,26,30',
|
188
|
+
'34,39,46,,,,8,14,,,,,,,,10,17,19,,,,,,,1,5,9,16,21,,,36,40,48,,82,,',
|
189
|
+
'15,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,,82,,,15,26,30,34,39,46,,,,8',
|
190
|
+
'14,,,,,,,,,,,,,,,26,30,34,39,46,,,,8,14,,,,,,,,10,17,19,24,28,33,,44',
|
191
|
+
'50,1,5,9,16,21,23,,36,40,48,,2,,115,15,10,17,19,,,,,,,,5,9,16,21,,,36',
|
192
|
+
'40,48,,82,,,15,26,30,34,39,46,,,,8,14,,,,,,,,,,,,,,,26,30,34,39,46,',
|
193
|
+
',,8,14,,,,,,,,10,17,19,24,,,,,,,5,9,16,21,,,36,40,48,,82,,,15,10,17',
|
194
|
+
'19,,,,,,,,5,9,16,21,,,36,40,48,,82,,,15,26,30,34,39,46,,,,8,14,,,,,',
|
195
|
+
',,,,,,,,,26,30,34,39,46,,,,8,14,,,,,,,,10,17,19,,,,,,,,5,9,16,21,,,36',
|
196
|
+
'40,48,,82,,,15,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,,82,,,15,26,30,34',
|
197
|
+
'39,46,,,,8,14,,,,,,,,,,,,,,,26,30,34,39,46,,,,8,14,,,,,,,,10,17,19,',
|
198
|
+
',,,,,,5,9,16,21,,,36,40,48,,82,,,15,10,17,19,,,,,,,,5,9,16,21,,,36,40',
|
199
|
+
'48,,82,,,15,26,30,34,39,46,,,,8,14,,,,,,,,,,,,,,,26,30,34,39,46,,,,8',
|
200
|
+
'14,,,,,,,,10,17,19,24,28,33,,44,50,1,5,9,16,21,23,,36,40,48,,2,,124',
|
201
|
+
'15,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,,82,,,15,26,30,34,39,46,,,,8',
|
202
|
+
'14,,,,,,,,,,,,,,,26,30,34,39,46,,,,8,14,,,,,,,,10,17,19,,,,,,,,5,9,16',
|
203
|
+
'21,,,36,40,48,,82,,,15,10,17,19,,,,,,,1,5,9,16,21,,,36,40,48,,82,,,15',
|
204
|
+
'26,30,34,39,46,,,,8,14,,,,,,,,,,,,,,,26,30,34,39,46,,,,8,14,,,,,,,,10',
|
205
|
+
'17,19,,,,,,,,5,9,16,21,,,36,40,48,,82,,,15,10,17,19,,,,,,,,5,9,16,21',
|
206
|
+
',,36,40,48,,82,,,15,26,30,34,39,46,,,,8,14,,,,,,,,,,,,,,,26,30,34,39',
|
207
|
+
'46,,,,8,14,,,,,,,,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,,82,,,15,10,17',
|
208
|
+
'19,24,28,33,,44,50,1,5,9,16,21,23,,36,40,48,,2,134,115,15,26,30,34,39',
|
209
|
+
'46,,,,8,14,,,,,,,,,,,,,,,26,30,34,39,46,,,,8,14,,,,,,,,10,17,19,,,,',
|
210
|
+
',,,5,9,16,21,,,36,40,48,,82,,,15,10,17,19,,,,,,,,5,9,16,21,,,36,40,48',
|
211
|
+
',82,,,15,26,30,34,39,46,,,,8,14,,,,,,,,,,,,,,,26,30,34,39,46,,,,8,14',
|
212
|
+
',,,,,,,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,,82,,,15,10,17,19,,,,,,',
|
213
|
+
',5,9,16,21,,,36,40,48,,82,,,15,26,30,34,39,46,,,,8,14,,,,,,,,,,,,,,',
|
214
|
+
'26,30,34,39,46,,,,8,14,,,,,,,,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,',
|
215
|
+
'82,,,15,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,,82,,,15,26,30,34,39,46',
|
216
|
+
',,,8,14,,,,,,,,,,,,,,,26,30,34,39,46,,,,8,14,,,,,,,,10,17,19,,,,,,,',
|
217
|
+
'5,9,16,21,,,36,40,48,,82,,,15,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,',
|
218
|
+
'82,,,15,26,30,34,39,46,,,,8,14,,,,,,,,,,,,,,,26,30,34,39,46,,,,8,14',
|
219
|
+
',,,,,,,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,,82,,,15,10,17,19,,,,,,',
|
220
|
+
',5,9,16,21,,,36,40,48,,82,,,15,26,30,34,39,46,,,,8,14,,,,,,,,,,,,,,',
|
221
|
+
'26,30,34,39,46,,,,8,14,,,,,,,,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,',
|
222
|
+
'82,,,15,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,,82,,,15,26,30,34,39,46',
|
223
|
+
',,,8,14,,,,,,,,,,,,,,,26,30,34,39,46,,,,8,14,,,,,,,,10,17,19,,,,,,,',
|
224
|
+
'5,9,16,21,,,36,40,48,,82,,,15,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,',
|
225
|
+
'82,,,15,26,30,34,39,46,,,,8,14,,,,,,,,,,,,,,,26,30,34,39,46,,,,8,14',
|
226
|
+
',,,,,,,10,17,58,24,28,33,,44,50,1,5,9,16,21,23,,36,40,48,,2,57,12,15',
|
227
|
+
'10,17,19,,,,,,,,5,9,16,21,,,36,40,48,,82,,,15,26,30,34,39,46,,,,8,14',
|
228
|
+
',,,,,,,,,,,,,,26,30,34,39,46,,,,8,14,,,,,,,,10,17,19,,,,,,,,5,9,16,21',
|
229
|
+
',,36,40,48,,82,,,15,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,,82,,,15,26',
|
230
|
+
'30,34,39,46,,,,8,14,,,,,,,,,,,,,,,26,30,34,39,46,,,,8,14,,,,,,,,10,17',
|
231
|
+
'19,,,,,,,,5,9,16,21,,,36,40,48,,82,,,15,10,17,19,,,,,,,,5,9,16,21,,',
|
232
|
+
'36,40,48,,82,,,15,26,30,34,39,46,,,,8,14,,,,,,,,,,,,,,,26,30,34,39,46',
|
233
|
+
',,,8,14,,,,,,,,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,,82,,,15,10,17,19',
|
234
|
+
'24,28,33,,44,50,1,5,9,16,21,23,,36,40,48,,2,,124,15,26,30,34,39,46,',
|
235
|
+
',,8,14,,,,,,,,,,,,,,,26,30,34,39,46,,,,8,14,,,,,,,,10,17,19,,,,,,,,5',
|
236
|
+
'9,16,21,,,36,40,48,,82,,,15,10,17,19,24,,,,,,,5,9,16,21,,,36,40,48,',
|
237
|
+
'157,,,15,26,30,34,39,46,,,,8,14,,,,,,,,,,,,,,,26,30,34,39,46,,,,8,14',
|
238
|
+
',,,,,,,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,,82,,,15,10,17,19,,,,,,',
|
239
|
+
',5,9,16,21,,,36,40,48,,82,,,15,26,30,34,39,46,,,,8,14,,,,,,,,,,,,,,',
|
240
|
+
'26,30,34,39,46,,,,8,14,,,,,,,,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,',
|
241
|
+
'82,,,15,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,,82,,,15,26,30,34,39,46',
|
242
|
+
',,,8,14,,,,,,,,,,,,,,,26,30,34,39,46,,,,8,14,,,,,,,,10,17,19,,,,,,,',
|
243
|
+
'5,9,16,21,,,36,40,48,,82,,,15,10,17,19,,,,,,,,5,9,16,21,,,36,40,48,',
|
244
|
+
'82,,,15,26,30,34,39,46,,,,8,14,81,63,64,66,67,68,70,72,74,76,78,80,62',
|
245
|
+
',65,,69,71,73,75,77,79,,,,,,,,,,10,17,19,24,28,33,,44,50,1,5,9,16,21',
|
246
|
+
'23,,36,40,48,,2,,124,15,,,,,,173,81,63,64,66,67,68,70,72,74,76,78,80',
|
247
|
+
'62,,65,,69,71,73,75,77,79,81,63,64,66,67,68,70,72,74,76,78,80,62,,65',
|
248
|
+
',69,71,73,75,77,79,,81,63,64,66,67,68,70,72,74,76,78,80,62,,65,222,69',
|
249
|
+
'71,73,75,77,79,81,63,64,66,67,68,70,72,74,76,78,80,62,,65,202,69,71',
|
250
|
+
'73,75,77,79,,81,63,64,66,67,68,70,72,74,76,78,80,62,,65,204,69,71,73',
|
251
|
+
'75,77,79,81,63,64,66,67,68,70,72,74,76,78,80,62,174,65,,69,71,73,75',
|
252
|
+
'77,79,195,,,,,,,,,,,207,81,63,64,66,67,68,70,72,74,76,78,80,62,,65,',
|
253
|
+
'69,71,73,75,77,79,81,63,64,66,67,68,70,72,74,76,78,80,62,,65,,69,71',
|
254
|
+
'73,75,77,79,81,63,64,66,67,68,70,72,74,76,78,80,62,,65,,69,71,73,75',
|
255
|
+
'77,79,81,63,64,66,67,68,70,72,74,76,78,80,62,,65,,69,71,73,75,77,79',
|
256
|
+
'81,63,64,66,67,68,70,72,74,76,78,80,62,,65,,69,71,73,75,77,79,81,63',
|
257
|
+
'64,66,67,68,70,72,74,76,78,80,62,,65,,69,71,73,75,77,79,81,63,64,66',
|
258
|
+
'67,68,70,72,74,76,78,80,62,,65,,69,71,73,75,77,79,81,63,64,66,67,68',
|
259
|
+
'70,72,74,76,78,80,62,,65,,69,71,73,75,77,79,81,63,64,66,67,68,70,72',
|
260
|
+
'74,76,78,80,62,,65,,69,71,73,75,77,79,81,63,64,66,67,68,70,72,74,76',
|
261
|
+
'78,80,62,,65,,69,71,73,75,77,79,81,63,64,66,67,68,70,72,74,76,78,80',
|
262
|
+
'62,,65,,69,71,73,75,77,79,81,63,64,66,67,68,70,72,74,76,78,80,62,,65',
|
263
|
+
',69,71,73,75,77,79,81,63,64,66,67,68,70,72,74,76,78,80,62,,65,,69,71',
|
264
|
+
'73,75,77,79,81,63,64,66,67,68,70,72,74,76,78,80,62,,65,,69,71,73,75',
|
265
|
+
'77,79,81,63,64,66,67,68,70,72,74,76,78,80,62,,65,,69,71,73,75,77,79',
|
266
|
+
'81,63,64,66,67,68,70,72,74,76,78,80,62,,65,,69,71,73,75,77,79,81,63',
|
267
|
+
'64,66,67,68,70,72,74,76,78,80,62,,65,,69,71,73,75,77,79,81,63,64,66',
|
268
|
+
'67,68,70,72,74,76,78,80,62,,65,,69,71,73,75,77,81,63,64,66,67,68,70',
|
269
|
+
'72,74,76,78,80,62,,65,,69,71,73,75,81,63,64,66,67,68,70,72,74,76,78',
|
270
|
+
'80,62,,65,,69,71,73,81,63,64,66,67,68,70,72,74,76,78,80,62,,65,,69,71',
|
271
|
+
'81,63,64,66,67,68,70,72,74,76,78,80,62,,65,,69,81,63,64,66,67,68,70',
|
272
|
+
'72,74,76,78,80,62,,65' ]
|
273
|
+
racc_action_table = arr = Array.new(3473, nil)
|
274
|
+
idx = 0
|
275
|
+
clist.each do |str|
|
276
|
+
str.split(',', -1).each do |i|
|
277
|
+
arr[idx] = i.to_i unless i.empty?
|
278
|
+
idx += 1
|
279
|
+
end
|
280
|
+
end
|
281
|
+
|
282
|
+
clist = [
|
283
|
+
'13,84,117,7,51,13,13,59,122,24,126,114,143,143,143,143,143,127,76,76',
|
284
|
+
'76,76,76,200,176,178,76,76,122,59,24,13,13,13,13,13,13,13,13,13,13,13',
|
285
|
+
'13,219,219,219,219,219,200,176,179,219,219,44,53,157,53,182,129,76,76',
|
286
|
+
'76,13,84,117,7,51,13,84,76,76,76,76,114,157,76,76,76,39,76,43,49,76',
|
287
|
+
'49,219,219,219,186,3,34,3,40,39,219,219,219,219,219,118,132,219,219',
|
288
|
+
'219,34,219,165,198,219,210,210,210,210,210,140,140,140,210,210,135,135',
|
289
|
+
'135,135,135,135,135,135,135,135,135,135,199,111,206,206,206,206,206',
|
290
|
+
'139,139,139,206,206,145,145,145,145,145,33,32,210,210,210,210,210,210',
|
291
|
+
'28,210,210,210,210,210,210,210,210,55,210,210,210,107,210,210,210,210',
|
292
|
+
'206,206,206,141,141,141,141,141,106,164,206,206,206,206,56,212,206,206',
|
293
|
+
'206,213,206,8,8,206,214,8,215,58,155,8,8,138,138,138,138,138,138,138',
|
294
|
+
'138,138,138,138,138,1,223,0,0,0,0,0,82,,,0,0,,,,,,,,8,8,8,,,,,,,,8,8',
|
295
|
+
'8,8,,,8,8,8,,8,,,8,0,0,0,0,0,0,,0,0,0,0,0,0,0,0,,0,0,0,,0,,0,0,14,14',
|
296
|
+
',,14,,,,14,14,149,149,149,149,149,149,149,149,,,,,,,15,15,15,15,15,',
|
297
|
+
',,15,15,,,,,,,,14,14,14,,,,,,,,14,14,14,14,,,14,14,14,,14,,,14,15,15',
|
298
|
+
'15,,,,,,,,15,15,15,15,,,15,15,15,,15,,,15,23,23,23,23,23,,,,23,23,153',
|
299
|
+
'153,153,153,153,153,153,153,,,,,,,204,204,204,204,204,,,,204,204,,,',
|
300
|
+
',,,,23,23,23,,,,,,,,23,23,23,23,,,23,23,23,,23,,,23,204,204,204,204',
|
301
|
+
'204,204,,204,204,204,204,204,204,204,204,,204,204,204,,204,,204,204',
|
302
|
+
'26,26,,,26,,,,26,26,147,147,147,147,147,147,147,147,,,,,,,203,203,203',
|
303
|
+
'203,203,,,,203,203,,,,,,,,26,26,26,,,,,,,,26,26,26,26,,,26,26,26,,26',
|
304
|
+
',,26,203,203,203,,,,,,,,203,203,203,203,,,203,203,203,,203,30,30,203',
|
305
|
+
',30,,,,30,30,151,151,151,151,151,151,151,151,,,,,,,202,202,202,202,202',
|
306
|
+
',,,202,202,,,,,,,,30,30,30,,,,,,,,30,30,30,30,,,30,30,30,,30,,,30,202',
|
307
|
+
'202,202,202,202,202,,202,202,202,202,202,202,202,202,,202,202,202,,202',
|
308
|
+
',202,202,201,201,201,201,201,,,,201,201,,,,,,,,,,,,,,,195,195,195,195',
|
309
|
+
'195,,,,195,195,,,,,,,,201,201,201,,,,,,,201,201,201,201,201,,,201,201',
|
310
|
+
'201,,201,,,201,195,195,195,,,,,,,,195,195,195,195,,,195,195,195,,195',
|
311
|
+
',,195,38,38,38,38,38,,,,38,38,,,,,,,,,,,,,,,184,184,184,184,184,,,,184',
|
312
|
+
'184,,,,,,,,38,38,38,38,38,38,,38,38,38,38,38,38,38,38,,38,38,38,,38',
|
313
|
+
',38,38,184,184,184,,,,,,,,184,184,184,184,,,184,184,184,,184,,,184,131',
|
314
|
+
'131,131,131,131,,,,131,131,,,,,,,,,,,,,,,130,130,130,130,130,,,,130',
|
315
|
+
'130,,,,,,,,131,131,131,131,,,,,,,131,131,131,131,,,131,131,131,,131',
|
316
|
+
',,131,130,130,130,,,,,,,,130,130,130,130,,,130,130,130,,130,,,130,128',
|
317
|
+
'128,128,128,128,,,,128,128,,,,,,,,,,,,,,,46,46,46,46,46,,,,46,46,,,',
|
318
|
+
',,,,128,128,128,,,,,,,,128,128,128,128,,,128,128,128,,128,,,128,46,46',
|
319
|
+
'46,,,,,,,,46,46,46,46,,,46,46,46,,46,,,46,48,48,48,48,48,,,,48,48,,',
|
320
|
+
',,,,,,,,,,,,120,120,120,120,120,,,,120,120,,,,,,,,48,48,48,,,,,,,,48',
|
321
|
+
'48,48,48,,,48,48,48,,48,,,48,120,120,120,,,,,,,,120,120,120,120,,,120',
|
322
|
+
'120,120,,120,,,120,50,50,50,50,50,,,,50,50,,,,,,,,,,,,,,,93,93,93,93',
|
323
|
+
'93,,,,93,93,,,,,,,,50,50,50,50,50,50,,50,50,50,50,50,50,50,50,,50,50',
|
324
|
+
'50,,50,,50,50,93,93,93,,,,,,,,93,93,93,93,,,93,93,93,,93,,,93,112,112',
|
325
|
+
'112,112,112,,,,112,112,,,,,,,,,,,,,,,109,109,109,109,109,,,,109,109',
|
326
|
+
',,,,,,,112,112,112,,,,,,,,112,112,112,112,,,112,112,112,,112,,,112,109',
|
327
|
+
'109,109,,,,,,,109,109,109,109,109,,,109,109,109,,109,,,109,99,99,99',
|
328
|
+
'99,99,,,,99,99,,,,,,,,,,,,,,,98,98,98,98,98,,,,98,98,,,,,,,,99,99,99',
|
329
|
+
',,,,,,,99,99,99,99,,,99,99,99,,99,,,99,98,98,98,,,,,,,,98,98,98,98,',
|
330
|
+
',98,98,98,,98,,,98,96,96,96,96,96,,,,96,96,,,,,,,,,,,,,,,60,60,60,60',
|
331
|
+
'60,,,,60,60,,,,,,,,96,96,96,,,,,,,,96,96,96,96,,,96,96,96,,96,,,96,60',
|
332
|
+
'60,60,60,60,60,,60,60,60,60,60,60,60,60,,60,60,60,,60,60,60,60,62,62',
|
333
|
+
'62,62,62,,,,62,62,,,,,,,,,,,,,,,63,63,63,63,63,,,,63,63,,,,,,,,62,62',
|
334
|
+
'62,,,,,,,,62,62,62,62,,,62,62,62,,62,,,62,63,63,63,,,,,,,,63,63,63,63',
|
335
|
+
',,63,63,63,,63,,,63,64,64,64,64,64,,,,64,64,,,,,,,,,,,,,,,65,65,65,65',
|
336
|
+
'65,,,,65,65,,,,,,,,64,64,64,,,,,,,,64,64,64,64,,,64,64,64,,64,,,64,65',
|
337
|
+
'65,65,,,,,,,,65,65,65,65,,,65,65,65,,65,,,65,66,66,66,66,66,,,,66,66',
|
338
|
+
',,,,,,,,,,,,,,67,67,67,67,67,,,,67,67,,,,,,,,66,66,66,,,,,,,,66,66,66',
|
339
|
+
'66,,,66,66,66,,66,,,66,67,67,67,,,,,,,,67,67,67,67,,,67,67,67,,67,,',
|
340
|
+
'67,68,68,68,68,68,,,,68,68,,,,,,,,,,,,,,,69,69,69,69,69,,,,69,69,,,',
|
341
|
+
',,,,68,68,68,,,,,,,,68,68,68,68,,,68,68,68,,68,,,68,69,69,69,,,,,,,',
|
342
|
+
'69,69,69,69,,,69,69,69,,69,,,69,70,70,70,70,70,,,,70,70,,,,,,,,,,,,',
|
343
|
+
',,71,71,71,71,71,,,,71,71,,,,,,,,70,70,70,,,,,,,,70,70,70,70,,,70,70',
|
344
|
+
'70,,70,,,70,71,71,71,,,,,,,,71,71,71,71,,,71,71,71,,71,,,71,72,72,72',
|
345
|
+
'72,72,,,,72,72,,,,,,,,,,,,,,,73,73,73,73,73,,,,73,73,,,,,,,,72,72,72',
|
346
|
+
',,,,,,,72,72,72,72,,,72,72,72,,72,,,72,73,73,73,,,,,,,,73,73,73,73,',
|
347
|
+
',73,73,73,,73,,,73,74,74,74,74,74,,,,74,74,,,,,,,,,,,,,,,75,75,75,75',
|
348
|
+
'75,,,,75,75,,,,,,,,74,74,74,,,,,,,,74,74,74,74,,,74,74,74,,74,,,74,75',
|
349
|
+
'75,75,,,,,,,,75,75,75,75,,,75,75,75,,75,,,75,2,2,2,2,2,,,,2,2,,,,,,',
|
350
|
+
',,,,,,,,77,77,77,77,77,,,,77,77,,,,,,,,2,2,2,2,2,2,,2,2,2,2,2,2,2,2',
|
351
|
+
',2,2,2,,2,2,2,2,77,77,77,,,,,,,,77,77,77,77,,,77,77,77,,77,,,77,78,78',
|
352
|
+
'78,78,78,,,,78,78,,,,,,,,,,,,,,,79,79,79,79,79,,,,79,79,,,,,,,,78,78',
|
353
|
+
'78,,,,,,,,78,78,78,78,,,78,78,78,,78,,,78,79,79,79,,,,,,,,79,79,79,79',
|
354
|
+
',,79,79,79,,79,,,79,80,80,80,80,80,,,,80,80,,,,,,,,,,,,,,,81,81,81,81',
|
355
|
+
'81,,,,81,81,,,,,,,,80,80,80,,,,,,,,80,80,80,80,,,80,80,80,,80,,,80,81',
|
356
|
+
'81,81,,,,,,,,81,81,81,81,,,81,81,81,,81,,,81,94,94,94,94,94,,,,94,94',
|
357
|
+
',,,,,,,,,,,,,,220,220,220,220,220,,,,220,220,,,,,,,,94,94,94,,,,,,,',
|
358
|
+
'94,94,94,94,,,94,94,94,,94,,,94,220,220,220,220,220,220,,220,220,220',
|
359
|
+
'220,220,220,220,220,,220,220,220,,220,,220,220,85,85,85,85,85,,,,85',
|
360
|
+
'85,,,,,,,,,,,,,,,86,86,86,86,86,,,,86,86,,,,,,,,85,85,85,,,,,,,,85,85',
|
361
|
+
'85,85,,,85,85,85,,85,,,85,86,86,86,86,,,,,,,86,86,86,86,,,86,86,86,',
|
362
|
+
'86,,,86,87,87,87,87,87,,,,87,87,,,,,,,,,,,,,,,88,88,88,88,88,,,,88,88',
|
363
|
+
',,,,,,,87,87,87,,,,,,,,87,87,87,87,,,87,87,87,,87,,,87,88,88,88,,,,',
|
364
|
+
',,,88,88,88,88,,,88,88,88,,88,,,88,89,89,89,89,89,,,,89,89,,,,,,,,,',
|
365
|
+
',,,,,90,90,90,90,90,,,,90,90,,,,,,,,89,89,89,,,,,,,,89,89,89,89,,,89',
|
366
|
+
'89,89,,89,,,89,90,90,90,,,,,,,,90,90,90,90,,,90,90,90,,90,,,90,91,91',
|
367
|
+
'91,91,91,,,,91,91,,,,,,,,,,,,,,,92,92,92,92,92,,,,92,92,,,,,,,,91,91',
|
368
|
+
'91,,,,,,,,91,91,91,91,,,91,91,91,,91,,,91,92,92,92,,,,,,,,92,92,92,92',
|
369
|
+
',,92,92,92,,92,,,92,225,225,225,225,225,,,,225,225,102,102,102,102,102',
|
370
|
+
'102,102,102,102,102,102,102,102,,102,,102,102,102,102,102,102,,,,,,',
|
371
|
+
',,,225,225,225,225,225,225,,225,225,225,225,225,225,225,225,,225,225',
|
372
|
+
'225,,225,,225,225,,,,,,102,217,217,217,217,217,217,217,217,217,217,217',
|
373
|
+
'217,217,,217,,217,217,217,217,217,217,181,181,181,181,181,181,181,181',
|
374
|
+
'181,181,181,181,181,,181,,181,181,181,181,181,181,,183,183,183,183,183',
|
375
|
+
'183,183,183,183,183,183,183,183,,183,217,183,183,183,183,183,183,105',
|
376
|
+
'105,105,105,105,105,105,105,105,105,105,105,105,,105,181,105,105,105',
|
377
|
+
'105,105,105,,188,188,188,188,188,188,188,188,188,188,188,188,188,,188',
|
378
|
+
'183,188,188,188,188,188,188,152,152,152,152,152,152,152,152,152,152',
|
379
|
+
'152,152,152,105,152,,152,152,152,152,152,152,152,,,,,,,,,,,188,172,172',
|
380
|
+
'172,172,172,172,172,172,172,172,172,172,172,,172,,172,172,172,172,172',
|
381
|
+
'172,4,4,4,4,4,4,4,4,4,4,4,4,4,,4,,4,4,4,4,4,4,123,123,123,123,123,123',
|
382
|
+
'123,123,123,123,123,123,123,,123,,123,123,123,123,123,123,191,191,191',
|
383
|
+
'191,191,191,191,191,191,191,191,191,191,,191,,191,191,191,191,191,191',
|
384
|
+
'205,205,205,205,205,205,205,205,205,205,205,205,205,,205,,205,205,205',
|
385
|
+
'205,205,205,171,171,171,171,171,171,171,171,171,171,171,171,171,,171',
|
386
|
+
',171,171,171,171,171,171,170,170,170,170,170,170,170,170,170,170,170',
|
387
|
+
'170,170,,170,,170,170,170,170,170,170,169,169,169,169,169,169,169,169',
|
388
|
+
'169,169,169,169,169,,169,,169,169,169,169,169,169,168,168,168,168,168',
|
389
|
+
'168,168,168,168,168,168,168,168,,168,,168,168,168,168,168,168,167,167',
|
390
|
+
'167,167,167,167,167,167,167,167,167,167,167,,167,,167,167,167,167,167',
|
391
|
+
'167,166,166,166,166,166,166,166,166,166,166,166,166,166,,166,,166,166',
|
392
|
+
'166,166,166,166,163,163,163,163,163,163,163,163,163,163,163,163,163',
|
393
|
+
',163,,163,163,163,163,163,163,162,162,162,162,162,162,162,162,162,162',
|
394
|
+
'162,162,162,,162,,162,162,162,162,162,162,161,161,161,161,161,161,161',
|
395
|
+
'161,161,161,161,161,161,,161,,161,161,161,161,161,161,158,158,158,158',
|
396
|
+
'158,158,158,158,158,158,158,158,158,,158,,158,158,158,158,158,158,156',
|
397
|
+
'156,156,156,156,156,156,156,156,156,156,156,156,,156,,156,156,156,156',
|
398
|
+
'156,156,190,190,190,190,190,190,190,190,190,190,190,190,190,,190,,190',
|
399
|
+
'190,190,190,190,190,208,208,208,208,208,208,208,208,208,208,208,208',
|
400
|
+
'208,,208,,208,208,208,208,208,150,150,150,150,150,150,150,150,150,150',
|
401
|
+
'150,150,150,,150,,150,150,150,150,148,148,148,148,148,148,148,148,148',
|
402
|
+
'148,148,148,148,,148,,148,148,148,146,146,146,146,146,146,146,146,146',
|
403
|
+
'146,146,146,146,,146,,146,146,144,144,144,144,144,144,144,144,144,144',
|
404
|
+
'144,144,144,,144,,144,142,142,142,142,142,142,142,142,142,142,142,142',
|
405
|
+
'142,,142' ]
|
406
|
+
racc_action_check = arr = Array.new(3473, nil)
|
407
|
+
idx = 0
|
408
|
+
clist.each do |str|
|
409
|
+
str.split(',', -1).each do |i|
|
410
|
+
arr[idx] = i.to_i unless i.empty?
|
411
|
+
idx += 1
|
412
|
+
end
|
413
|
+
end
|
414
|
+
|
415
|
+
racc_action_pointer = [
|
416
|
+
213, 168, 2055, 20, 3001, nil, nil, 1, 189, nil,
|
417
|
+
nil, nil, nil, -2, 278, 302, nil, nil, nil, nil,
|
418
|
+
nil, nil, nil, 367, -39, nil, 456, nil, 86, nil,
|
419
|
+
542, nil, 148, 78, 41, nil, nil, nil, 720, 30,
|
420
|
+
89, nil, nil, 12, -16, nil, 922, nil, 987, 13,
|
421
|
+
1076, 2, nil, -14, nil, 119, 154, nil, 168, -38,
|
422
|
+
1367, nil, 1432, 1456, 1521, 1545, 1610, 1634, 1699, 1723,
|
423
|
+
1788, 1812, 1877, 1901, 1966, 1990, 13, 2079, 2144, 2168,
|
424
|
+
2233, 2257, 175, nil, -1, 2411, 2435, 2500, 2524, 2589,
|
425
|
+
2613, 2678, 2702, 1100, 2322, nil, 1343, nil, 1278, 1254,
|
426
|
+
nil, nil, 2772, nil, nil, 2900, 133, 99, nil, 1189,
|
427
|
+
nil, 131, 1165, nil, 9, nil, nil, 0, 50, nil,
|
428
|
+
1011, nil, -37, 3023, nil, nil, -43, -31, 898, 10,
|
429
|
+
833, 809, 51, nil, nil, 108, nil, nil, 194, 127,
|
430
|
+
103, 166, 3448, 2, 3431, 132, 3413, 461, 3394, 283,
|
431
|
+
3374, 547, 2945, 372, nil, 169, 3309, 7, 3287, nil,
|
432
|
+
nil, 3265, 3243, 3221, 112, 60, 3199, 3177, 3155, 3133,
|
433
|
+
3111, 3089, 2979, nil, nil, nil, -21, nil, -23, -18,
|
434
|
+
nil, 2855, -12, 2878, 744, nil, 18, nil, 2923, nil,
|
435
|
+
3331, 3045, nil, nil, nil, 655, nil, nil, 58, 64,
|
436
|
+
-22, 631, 566, 480, 391, 3067, 127, nil, 3353, nil,
|
437
|
+
103, nil, 122, 124, 145, 129, nil, 2833, nil, 38,
|
438
|
+
2346, nil, nil, 147, nil, 2767, nil ]
|
439
|
+
|
440
|
+
racc_action_default = [
|
441
|
+
-2, -122, -122, -64, -122, -23, -6, -58, -122, -24,
|
442
|
+
-20, -15, -14, -57, -122, -122, -25, -21, -8, -81,
|
443
|
+
-59, -22, -9, -122, -122, -62, -122, -10, -122, -63,
|
444
|
+
-122, -11, -122, -122, -122, -67, -50, -12, -1, -122,
|
445
|
+
-122, -68, -13, -122, -122, -69, -122, -51, -29, -65,
|
446
|
+
-122, -122, -60, -66, -85, -84, -83, -19, -81, -122,
|
447
|
+
-122, -120, -122, -122, -122, -122, -122, -122, -122, -122,
|
448
|
+
-122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
|
449
|
+
-122, -122, -122, -53, -57, -122, -122, -122, -122, -122,
|
450
|
+
-29, -122, -122, -122, -122, -92, -122, -93, -122, -122,
|
451
|
+
-54, -64, -122, -65, -66, -122, -78, -122, -55, -122,
|
452
|
+
-56, -122, -122, -71, -90, -17, -16, -91, -122, -7,
|
453
|
+
-122, -61, -122, -27, -108, -107, -122, -122, -122, -122,
|
454
|
+
-122, -122, -122, -116, -18, -46, -33, -34, -47, -30,
|
455
|
+
-31, -38, -35, -40, -37, -39, -36, -45, -41, -44,
|
456
|
+
-42, -48, -122, -49, -32, -122, -98, -122, -87, -88,
|
457
|
+
-89, -94, -95, -102, -122, -74, -103, -104, -100, -101,
|
458
|
+
-99, -96, -97, -52, -114, -76, -122, -75, -78, -122,
|
459
|
+
227, -122, -122, -122, -122, -26, -122, -72, -122, -86,
|
460
|
+
-82, -117, -118, -119, -121, -122, -115, -73, -122, -122,
|
461
|
+
-122, -122, -122, -29, -122, -28, -122, -80, -43, -77,
|
462
|
+
-122, -105, -122, -122, -113, -122, -109, -122, -106, -122,
|
463
|
+
-122, -79, -110, -122, -112, -122, -111 ]
|
464
|
+
|
465
|
+
racc_goto_table = [
|
466
|
+
3, 164, 3, 177, 49, 179, 49, 11, 83, 11,
|
467
|
+
126, 53, 176, 53, 100, 54, 211, 160, 113, 32,
|
468
|
+
209, 84, 122, 113, 55, 159, 108, 84, 38, 218,
|
469
|
+
110, 193, 194, nil, nil, nil, nil, nil, 3, 84,
|
470
|
+
nil, nil, 49, 84, nil, 116, nil, 114, nil, 53,
|
471
|
+
3, nil, 117, nil, 49, nil, nil, nil, nil, nil,
|
472
|
+
3, 53, 192, nil, 49, nil, nil, 116, nil, nil,
|
473
|
+
nil, 53, nil, nil, 102, 177, nil, nil, nil, nil,
|
474
|
+
nil, nil, 105, nil, 200, nil, nil, nil, nil, nil,
|
475
|
+
nil, nil, nil, nil, nil, 177, nil, 213, nil, nil,
|
476
|
+
nil, nil, nil, nil, nil, 121, nil, 123, nil, 3,
|
477
|
+
nil, nil, nil, 49, 215, 223, nil, nil, nil, nil,
|
478
|
+
53, 135, 136, 137, 138, 139, 140, 141, 142, 143,
|
479
|
+
144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
|
480
|
+
154, nil, nil, 189, 156, 158, 161, 162, 163, 123,
|
481
|
+
166, 167, 168, 169, nil, 170, nil, 171, 172, nil,
|
482
|
+
nil, nil, 214, nil, 216, nil, nil, nil, nil, nil,
|
483
|
+
nil, 181, nil, nil, nil, nil, nil, nil, nil, 183,
|
484
|
+
224, nil, nil, nil, nil, 226, nil, 188, nil, 190,
|
485
|
+
191, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
486
|
+
nil, 3, 3, nil, 3, 49, 49, nil, 49, nil,
|
487
|
+
3, nil, 53, 53, 49, 53, nil, 11, nil, 3,
|
488
|
+
3, 53, nil, 49, 49, 3, nil, nil, nil, 49,
|
489
|
+
53, 53, nil, nil, nil, nil, 53, nil, nil, nil,
|
490
|
+
nil, nil, nil, 205, nil, nil, nil, nil, nil, nil,
|
491
|
+
nil, nil, nil, nil, 208, nil, nil, nil, nil, nil,
|
492
|
+
nil, nil, 123, nil, nil, 217 ]
|
493
|
+
|
494
|
+
racc_goto_check = [
|
495
|
+
6, 28, 6, 24, 4, 3, 4, 8, 6, 8,
|
496
|
+
34, 5, 30, 5, 6, 31, 14, 13, 19, 1,
|
497
|
+
29, 20, 17, 19, 32, 33, 6, 20, 2, 14,
|
498
|
+
6, 36, 37, nil, nil, nil, nil, nil, 6, 20,
|
499
|
+
nil, nil, 4, 20, nil, 8, nil, 20, nil, 5,
|
500
|
+
6, nil, 20, nil, 4, nil, nil, nil, nil, nil,
|
501
|
+
6, 5, 13, nil, 4, nil, nil, 8, nil, nil,
|
502
|
+
nil, 5, nil, nil, 18, 24, nil, nil, nil, nil,
|
503
|
+
nil, nil, 18, nil, 30, nil, nil, nil, nil, nil,
|
504
|
+
nil, nil, nil, nil, nil, 24, nil, 3, nil, nil,
|
505
|
+
nil, nil, nil, nil, nil, 18, nil, 18, nil, 6,
|
506
|
+
nil, nil, nil, 4, 28, 3, nil, nil, nil, nil,
|
507
|
+
5, 18, 18, 18, 18, 18, 18, 18, 18, 18,
|
508
|
+
18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
|
509
|
+
18, nil, nil, 31, 18, 18, 18, 18, 18, 18,
|
510
|
+
18, 18, 18, 18, nil, 18, nil, 18, 18, nil,
|
511
|
+
nil, nil, 34, nil, 34, nil, nil, nil, nil, nil,
|
512
|
+
nil, 18, nil, nil, nil, nil, nil, nil, nil, 18,
|
513
|
+
34, nil, nil, nil, nil, 34, nil, 18, nil, 18,
|
514
|
+
18, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
515
|
+
nil, 6, 6, nil, 6, 4, 4, nil, 4, nil,
|
516
|
+
6, nil, 5, 5, 4, 5, nil, 8, nil, 6,
|
517
|
+
6, 5, nil, 4, 4, 6, nil, nil, nil, 4,
|
518
|
+
5, 5, nil, nil, nil, nil, 5, nil, nil, nil,
|
519
|
+
nil, nil, nil, 18, nil, nil, nil, nil, nil, nil,
|
520
|
+
nil, nil, nil, nil, 18, nil, nil, nil, nil, nil,
|
521
|
+
nil, nil, 18, nil, nil, 18 ]
|
522
|
+
|
523
|
+
racc_goto_pointer = [
|
524
|
+
nil, 19, 28, -104, 4, 11, 0, nil, 7, nil,
|
525
|
+
nil, nil, nil, -69, -183, nil, nil, -26, 59, -16,
|
526
|
+
13, nil, nil, nil, -103, nil, nil, nil, -89, -178,
|
527
|
+
-94, 14, 23, -61, -40, nil, -100, -100 ]
|
528
|
+
|
529
|
+
racc_goto_default = [
|
530
|
+
nil, nil, 60, 43, 103, 104, 101, 6, 125, 18,
|
531
|
+
22, 27, 31, 37, 42, 47, 52, 165, 4, 7,
|
532
|
+
13, 20, 25, 29, 35, 41, 45, 51, nil, 175,
|
533
|
+
nil, nil, nil, nil, nil, 59, nil, 61 ]
|
534
|
+
|
535
|
+
racc_reduce_table = [
|
536
|
+
0, 0, :racc_error,
|
537
|
+
1, 72, :_reduce_1,
|
538
|
+
0, 72, :_reduce_2,
|
539
|
+
1, 74, :_reduce_none,
|
540
|
+
1, 74, :_reduce_none,
|
541
|
+
1, 74, :_reduce_none,
|
542
|
+
1, 74, :_reduce_none,
|
543
|
+
2, 79, :_reduce_none,
|
544
|
+
1, 79, :_reduce_none,
|
545
|
+
1, 79, :_reduce_none,
|
546
|
+
1, 79, :_reduce_none,
|
547
|
+
1, 79, :_reduce_none,
|
548
|
+
1, 79, :_reduce_none,
|
549
|
+
1, 79, :_reduce_none,
|
550
|
+
1, 73, :_reduce_14,
|
551
|
+
1, 73, :_reduce_15,
|
552
|
+
2, 73, :_reduce_16,
|
553
|
+
2, 73, :_reduce_none,
|
554
|
+
3, 85, :_reduce_18,
|
555
|
+
2, 85, :_reduce_19,
|
556
|
+
1, 86, :_reduce_20,
|
557
|
+
1, 86, :_reduce_21,
|
558
|
+
1, 86, :_reduce_22,
|
559
|
+
1, 86, :_reduce_23,
|
560
|
+
1, 86, :_reduce_24,
|
561
|
+
1, 86, :_reduce_25,
|
562
|
+
3, 87, :_reduce_26,
|
563
|
+
1, 88, :_reduce_27,
|
564
|
+
3, 88, :_reduce_28,
|
565
|
+
0, 88, :_reduce_29,
|
566
|
+
3, 75, :_reduce_30,
|
567
|
+
3, 75, :_reduce_31,
|
568
|
+
3, 75, :_reduce_32,
|
569
|
+
3, 75, :_reduce_33,
|
570
|
+
3, 75, :_reduce_34,
|
571
|
+
3, 75, :_reduce_35,
|
572
|
+
3, 75, :_reduce_36,
|
573
|
+
3, 75, :_reduce_37,
|
574
|
+
3, 75, :_reduce_38,
|
575
|
+
3, 75, :_reduce_39,
|
576
|
+
3, 75, :_reduce_40,
|
577
|
+
3, 75, :_reduce_41,
|
578
|
+
3, 75, :_reduce_42,
|
579
|
+
5, 75, :_reduce_43,
|
580
|
+
3, 75, :_reduce_44,
|
581
|
+
3, 75, :_reduce_45,
|
582
|
+
3, 75, :_reduce_46,
|
583
|
+
3, 75, :_reduce_47,
|
584
|
+
3, 75, :_reduce_48,
|
585
|
+
3, 75, :_reduce_49,
|
586
|
+
1, 90, :_reduce_50,
|
587
|
+
1, 77, :_reduce_none,
|
588
|
+
3, 77, :_reduce_52,
|
589
|
+
2, 77, :_reduce_53,
|
590
|
+
2, 77, :_reduce_54,
|
591
|
+
2, 77, :_reduce_55,
|
592
|
+
2, 77, :_reduce_56,
|
593
|
+
1, 77, :_reduce_none,
|
594
|
+
1, 77, :_reduce_none,
|
595
|
+
1, 77, :_reduce_none,
|
596
|
+
1, 77, :_reduce_none,
|
597
|
+
2, 77, :_reduce_61,
|
598
|
+
1, 77, :_reduce_none,
|
599
|
+
1, 77, :_reduce_none,
|
600
|
+
1, 89, :_reduce_none,
|
601
|
+
1, 89, :_reduce_none,
|
602
|
+
1, 89, :_reduce_none,
|
603
|
+
1, 91, :_reduce_none,
|
604
|
+
1, 91, :_reduce_none,
|
605
|
+
1, 91, :_reduce_none,
|
606
|
+
1, 98, :_reduce_none,
|
607
|
+
1, 98, :_reduce_none,
|
608
|
+
3, 96, :_reduce_72,
|
609
|
+
4, 93, :_reduce_73,
|
610
|
+
1, 99, :_reduce_none,
|
611
|
+
1, 100, :_reduce_none,
|
612
|
+
1, 101, :_reduce_76,
|
613
|
+
3, 101, :_reduce_77,
|
614
|
+
0, 101, :_reduce_78,
|
615
|
+
6, 94, :_reduce_79,
|
616
|
+
4, 97, :_reduce_80,
|
617
|
+
1, 95, :_reduce_81,
|
618
|
+
3, 102, :_reduce_82,
|
619
|
+
1, 102, :_reduce_83,
|
620
|
+
2, 78, :_reduce_84,
|
621
|
+
1, 103, :_reduce_85,
|
622
|
+
3, 103, :_reduce_86,
|
623
|
+
3, 76, :_reduce_87,
|
624
|
+
3, 76, :_reduce_88,
|
625
|
+
3, 76, :_reduce_89,
|
626
|
+
2, 76, :_reduce_90,
|
627
|
+
2, 76, :_reduce_91,
|
628
|
+
2, 76, :_reduce_92,
|
629
|
+
2, 76, :_reduce_93,
|
630
|
+
3, 76, :_reduce_94,
|
631
|
+
3, 76, :_reduce_95,
|
632
|
+
3, 76, :_reduce_96,
|
633
|
+
3, 76, :_reduce_97,
|
634
|
+
3, 76, :_reduce_98,
|
635
|
+
3, 76, :_reduce_99,
|
636
|
+
3, 76, :_reduce_100,
|
637
|
+
3, 76, :_reduce_101,
|
638
|
+
3, 76, :_reduce_102,
|
639
|
+
3, 76, :_reduce_103,
|
640
|
+
3, 76, :_reduce_104,
|
641
|
+
5, 84, :_reduce_105,
|
642
|
+
6, 84, :_reduce_106,
|
643
|
+
1, 105, :_reduce_none,
|
644
|
+
1, 105, :_reduce_none,
|
645
|
+
5, 80, :_reduce_109,
|
646
|
+
6, 80, :_reduce_110,
|
647
|
+
9, 81, :_reduce_111,
|
648
|
+
7, 82, :_reduce_112,
|
649
|
+
5, 82, :_reduce_113,
|
650
|
+
3, 83, :_reduce_114,
|
651
|
+
2, 104, :_reduce_115,
|
652
|
+
3, 92, :_reduce_116,
|
653
|
+
1, 107, :_reduce_none,
|
654
|
+
1, 107, :_reduce_none,
|
655
|
+
3, 108, :_reduce_119,
|
656
|
+
1, 106, :_reduce_120,
|
657
|
+
3, 106, :_reduce_121 ]
|
658
|
+
|
659
|
+
racc_reduce_n = 122
|
660
|
+
|
661
|
+
racc_shift_n = 227
|
662
|
+
|
663
|
+
racc_token_table = {
|
664
|
+
false => 0,
|
665
|
+
:error => 1,
|
666
|
+
"." => 2,
|
667
|
+
:UMINUS => 3,
|
668
|
+
:UPLUS => 4,
|
669
|
+
"!" => 5,
|
670
|
+
"~" => 6,
|
671
|
+
"++" => 7,
|
672
|
+
"--" => 8,
|
673
|
+
:KW_TYPEOF => 9,
|
674
|
+
"*" => 10,
|
675
|
+
"/" => 11,
|
676
|
+
"%" => 12,
|
677
|
+
"+" => 13,
|
678
|
+
"-" => 14,
|
679
|
+
">>" => 15,
|
680
|
+
"<<" => 16,
|
681
|
+
">>>" => 17,
|
682
|
+
">" => 18,
|
683
|
+
"<" => 19,
|
684
|
+
">=" => 20,
|
685
|
+
"<=" => 21,
|
686
|
+
"==" => 22,
|
687
|
+
"===" => 23,
|
688
|
+
"!=" => 24,
|
689
|
+
"!==" => 25,
|
690
|
+
"&" => 26,
|
691
|
+
"^" => 27,
|
692
|
+
"|" => 28,
|
693
|
+
"&&" => 29,
|
694
|
+
"||" => 30,
|
695
|
+
"?" => 31,
|
696
|
+
":" => 32,
|
697
|
+
"=" => 33,
|
698
|
+
"+=" => 34,
|
699
|
+
"-=" => 35,
|
700
|
+
"<<=" => 36,
|
701
|
+
">>=" => 37,
|
702
|
+
">>>=" => 38,
|
703
|
+
"&=" => 39,
|
704
|
+
"^=" => 40,
|
705
|
+
"|=" => 41,
|
706
|
+
"*=" => 42,
|
707
|
+
"/=" => 43,
|
708
|
+
"%=" => 44,
|
709
|
+
"," => 45,
|
710
|
+
:FLOAT => 46,
|
711
|
+
:INTEGER => 47,
|
712
|
+
:IDENT => 48,
|
713
|
+
:KW_FUNCTION => 49,
|
714
|
+
:KW_FOR => 50,
|
715
|
+
:KW_IF => 51,
|
716
|
+
:KW_ELSE => 52,
|
717
|
+
:KW_WHILE => 53,
|
718
|
+
:KW_DO => 54,
|
719
|
+
:KW_VAR => 55,
|
720
|
+
:KW_TRUE => 56,
|
721
|
+
:KW_FALSE => 57,
|
722
|
+
:KW_NULL => 58,
|
723
|
+
:STRING => 59,
|
724
|
+
:KW_RETURN => 60,
|
725
|
+
:KW_NEW => 61,
|
726
|
+
:KW_THIS => 62,
|
727
|
+
:KW_CORE => 63,
|
728
|
+
:SBRACKET_OPEN => 64,
|
729
|
+
:SBRACKET_CLOSE => 65,
|
730
|
+
:CBRACKET_OPEN => 66,
|
731
|
+
:CBRACKET_CLOSE => 67,
|
732
|
+
";" => 68,
|
733
|
+
"(" => 69,
|
734
|
+
")" => 70 }
|
735
|
+
|
736
|
+
racc_nt_base = 71
|
737
|
+
|
738
|
+
racc_use_result_var = true
|
739
|
+
|
740
|
+
Racc_arg = [
|
741
|
+
racc_action_table,
|
742
|
+
racc_action_check,
|
743
|
+
racc_action_default,
|
744
|
+
racc_action_pointer,
|
745
|
+
racc_goto_table,
|
746
|
+
racc_goto_check,
|
747
|
+
racc_goto_default,
|
748
|
+
racc_goto_pointer,
|
749
|
+
racc_nt_base,
|
750
|
+
racc_reduce_table,
|
751
|
+
racc_token_table,
|
752
|
+
racc_shift_n,
|
753
|
+
racc_reduce_n,
|
754
|
+
racc_use_result_var ]
|
755
|
+
|
756
|
+
Racc_token_to_s_table = [
|
757
|
+
"$end",
|
758
|
+
"error",
|
759
|
+
"\".\"",
|
760
|
+
"UMINUS",
|
761
|
+
"UPLUS",
|
762
|
+
"\"!\"",
|
763
|
+
"\"~\"",
|
764
|
+
"\"++\"",
|
765
|
+
"\"--\"",
|
766
|
+
"KW_TYPEOF",
|
767
|
+
"\"*\"",
|
768
|
+
"\"/\"",
|
769
|
+
"\"%\"",
|
770
|
+
"\"+\"",
|
771
|
+
"\"-\"",
|
772
|
+
"\">>\"",
|
773
|
+
"\"<<\"",
|
774
|
+
"\">>>\"",
|
775
|
+
"\">\"",
|
776
|
+
"\"<\"",
|
777
|
+
"\">=\"",
|
778
|
+
"\"<=\"",
|
779
|
+
"\"==\"",
|
780
|
+
"\"===\"",
|
781
|
+
"\"!=\"",
|
782
|
+
"\"!==\"",
|
783
|
+
"\"&\"",
|
784
|
+
"\"^\"",
|
785
|
+
"\"|\"",
|
786
|
+
"\"&&\"",
|
787
|
+
"\"||\"",
|
788
|
+
"\"?\"",
|
789
|
+
"\":\"",
|
790
|
+
"\"=\"",
|
791
|
+
"\"+=\"",
|
792
|
+
"\"-=\"",
|
793
|
+
"\"<<=\"",
|
794
|
+
"\">>=\"",
|
795
|
+
"\">>>=\"",
|
796
|
+
"\"&=\"",
|
797
|
+
"\"^=\"",
|
798
|
+
"\"|=\"",
|
799
|
+
"\"*=\"",
|
800
|
+
"\"/=\"",
|
801
|
+
"\"%=\"",
|
802
|
+
"\",\"",
|
803
|
+
"FLOAT",
|
804
|
+
"INTEGER",
|
805
|
+
"IDENT",
|
806
|
+
"KW_FUNCTION",
|
807
|
+
"KW_FOR",
|
808
|
+
"KW_IF",
|
809
|
+
"KW_ELSE",
|
810
|
+
"KW_WHILE",
|
811
|
+
"KW_DO",
|
812
|
+
"KW_VAR",
|
813
|
+
"KW_TRUE",
|
814
|
+
"KW_FALSE",
|
815
|
+
"KW_NULL",
|
816
|
+
"STRING",
|
817
|
+
"KW_RETURN",
|
818
|
+
"KW_NEW",
|
819
|
+
"KW_THIS",
|
820
|
+
"KW_CORE",
|
821
|
+
"SBRACKET_OPEN",
|
822
|
+
"SBRACKET_CLOSE",
|
823
|
+
"CBRACKET_OPEN",
|
824
|
+
"CBRACKET_CLOSE",
|
825
|
+
"\";\"",
|
826
|
+
"\"(\"",
|
827
|
+
"\")\"",
|
828
|
+
"$start",
|
829
|
+
"target",
|
830
|
+
"seq",
|
831
|
+
"simple_stmt",
|
832
|
+
"exp",
|
833
|
+
"ass",
|
834
|
+
"simple_rhs",
|
835
|
+
"local_def",
|
836
|
+
"stmt",
|
837
|
+
"while_stmt",
|
838
|
+
"for_stmt",
|
839
|
+
"if_stmt",
|
840
|
+
"return_stmt",
|
841
|
+
"fun_def",
|
842
|
+
"block",
|
843
|
+
"literal",
|
844
|
+
"array",
|
845
|
+
"array_content",
|
846
|
+
"rhs",
|
847
|
+
"this",
|
848
|
+
"lhs",
|
849
|
+
"object",
|
850
|
+
"function_call",
|
851
|
+
"amber_core",
|
852
|
+
"variable",
|
853
|
+
"object_variable",
|
854
|
+
"array_variable",
|
855
|
+
"lhs_or_this",
|
856
|
+
"args",
|
857
|
+
"argument",
|
858
|
+
"arg_def",
|
859
|
+
"declaration",
|
860
|
+
"ass_list",
|
861
|
+
"empty_object",
|
862
|
+
"optional_statement",
|
863
|
+
"object_content",
|
864
|
+
"object_value",
|
865
|
+
"object_element" ]
|
866
|
+
|
867
|
+
Racc_debug_parser = false
|
868
|
+
|
869
|
+
##### State transition tables end #####
|
870
|
+
|
871
|
+
# reduce 0 omitted
|
872
|
+
|
873
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 48)
|
874
|
+
def _reduce_1(val, _values, result)
|
875
|
+
result = Program.new val[0], @variables
|
876
|
+
result
|
877
|
+
end
|
878
|
+
.,.,
|
879
|
+
|
880
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 49)
|
881
|
+
def _reduce_2(val, _values, result)
|
882
|
+
result = Program.new
|
883
|
+
result
|
884
|
+
end
|
885
|
+
.,.,
|
886
|
+
|
887
|
+
# reduce 3 omitted
|
888
|
+
|
889
|
+
# reduce 4 omitted
|
890
|
+
|
891
|
+
# reduce 5 omitted
|
892
|
+
|
893
|
+
# reduce 6 omitted
|
894
|
+
|
895
|
+
# reduce 7 omitted
|
896
|
+
|
897
|
+
# reduce 8 omitted
|
898
|
+
|
899
|
+
# reduce 9 omitted
|
900
|
+
|
901
|
+
# reduce 10 omitted
|
902
|
+
|
903
|
+
# reduce 11 omitted
|
904
|
+
|
905
|
+
# reduce 12 omitted
|
906
|
+
|
907
|
+
# reduce 13 omitted
|
908
|
+
|
909
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 64)
|
910
|
+
def _reduce_14(val, _values, result)
|
911
|
+
result = Sequence[]
|
912
|
+
result
|
913
|
+
end
|
914
|
+
.,.,
|
915
|
+
|
916
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 65)
|
917
|
+
def _reduce_15(val, _values, result)
|
918
|
+
result = Sequence[val[0]]
|
919
|
+
result
|
920
|
+
end
|
921
|
+
.,.,
|
922
|
+
|
923
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 66)
|
924
|
+
def _reduce_16(val, _values, result)
|
925
|
+
result << val[1]
|
926
|
+
result
|
927
|
+
end
|
928
|
+
.,.,
|
929
|
+
|
930
|
+
# reduce 17 omitted
|
931
|
+
|
932
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 69)
|
933
|
+
def _reduce_18(val, _values, result)
|
934
|
+
result = val[1]
|
935
|
+
result
|
936
|
+
end
|
937
|
+
.,.,
|
938
|
+
|
939
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 70)
|
940
|
+
def _reduce_19(val, _values, result)
|
941
|
+
result = const :undefined
|
942
|
+
result
|
943
|
+
end
|
944
|
+
.,.,
|
945
|
+
|
946
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 72)
|
947
|
+
def _reduce_20(val, _values, result)
|
948
|
+
result = const val[0][0]
|
949
|
+
result
|
950
|
+
end
|
951
|
+
.,.,
|
952
|
+
|
953
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 73)
|
954
|
+
def _reduce_21(val, _values, result)
|
955
|
+
result = const val[0][0]
|
956
|
+
result
|
957
|
+
end
|
958
|
+
.,.,
|
959
|
+
|
960
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 74)
|
961
|
+
def _reduce_22(val, _values, result)
|
962
|
+
result = const val[0][0]
|
963
|
+
result
|
964
|
+
end
|
965
|
+
.,.,
|
966
|
+
|
967
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 75)
|
968
|
+
def _reduce_23(val, _values, result)
|
969
|
+
result = const true
|
970
|
+
result
|
971
|
+
end
|
972
|
+
.,.,
|
973
|
+
|
974
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 76)
|
975
|
+
def _reduce_24(val, _values, result)
|
976
|
+
result = const false
|
977
|
+
result
|
978
|
+
end
|
979
|
+
.,.,
|
980
|
+
|
981
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 77)
|
982
|
+
def _reduce_25(val, _values, result)
|
983
|
+
result = const nil
|
984
|
+
result
|
985
|
+
end
|
986
|
+
.,.,
|
987
|
+
|
988
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 80)
|
989
|
+
def _reduce_26(val, _values, result)
|
990
|
+
list = const([])
|
991
|
+
result = Sequence[]
|
992
|
+
val[1].each_with_index do |item, i|
|
993
|
+
# TODO: use just i as index? special method call?
|
994
|
+
result << meth(list, :[]=, const(i), item)
|
995
|
+
end
|
996
|
+
result << list
|
997
|
+
|
998
|
+
result
|
999
|
+
end
|
1000
|
+
.,.,
|
1001
|
+
|
1002
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 89)
|
1003
|
+
def _reduce_27(val, _values, result)
|
1004
|
+
result = [result]
|
1005
|
+
result
|
1006
|
+
end
|
1007
|
+
.,.,
|
1008
|
+
|
1009
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 90)
|
1010
|
+
def _reduce_28(val, _values, result)
|
1011
|
+
result << val[2]
|
1012
|
+
result
|
1013
|
+
end
|
1014
|
+
.,.,
|
1015
|
+
|
1016
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 91)
|
1017
|
+
def _reduce_29(val, _values, result)
|
1018
|
+
result = []
|
1019
|
+
result
|
1020
|
+
end
|
1021
|
+
.,.,
|
1022
|
+
|
1023
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 93)
|
1024
|
+
def _reduce_30(val, _values, result)
|
1025
|
+
result = meth(val[0], :+, val[2])
|
1026
|
+
result
|
1027
|
+
end
|
1028
|
+
.,.,
|
1029
|
+
|
1030
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 94)
|
1031
|
+
def _reduce_31(val, _values, result)
|
1032
|
+
result = meth(val[0], :-, val[2])
|
1033
|
+
result
|
1034
|
+
end
|
1035
|
+
.,.,
|
1036
|
+
|
1037
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 95)
|
1038
|
+
def _reduce_32(val, _values, result)
|
1039
|
+
result = meth(val[0], :*, val[2])
|
1040
|
+
result
|
1041
|
+
end
|
1042
|
+
.,.,
|
1043
|
+
|
1044
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 96)
|
1045
|
+
def _reduce_33(val, _values, result)
|
1046
|
+
result = meth(val[0], :'/', val[2])
|
1047
|
+
result
|
1048
|
+
end
|
1049
|
+
.,.,
|
1050
|
+
|
1051
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 97)
|
1052
|
+
def _reduce_34(val, _values, result)
|
1053
|
+
result = meth(val[0], :'%', val[2])
|
1054
|
+
result
|
1055
|
+
end
|
1056
|
+
.,.,
|
1057
|
+
|
1058
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 98)
|
1059
|
+
def _reduce_35(val, _values, result)
|
1060
|
+
result = meth(val[0], :&, val[2])
|
1061
|
+
result
|
1062
|
+
end
|
1063
|
+
.,.,
|
1064
|
+
|
1065
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 99)
|
1066
|
+
def _reduce_36(val, _values, result)
|
1067
|
+
result = meth(val[0], :|, val[2])
|
1068
|
+
result
|
1069
|
+
end
|
1070
|
+
.,.,
|
1071
|
+
|
1072
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 100)
|
1073
|
+
def _reduce_37(val, _values, result)
|
1074
|
+
result = meth(val[0], :^, val[2])
|
1075
|
+
result
|
1076
|
+
end
|
1077
|
+
.,.,
|
1078
|
+
|
1079
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 101)
|
1080
|
+
def _reduce_38(val, _values, result)
|
1081
|
+
result = meth(val[0], :>>, val[2])
|
1082
|
+
result
|
1083
|
+
end
|
1084
|
+
.,.,
|
1085
|
+
|
1086
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 102)
|
1087
|
+
def _reduce_39(val, _values, result)
|
1088
|
+
result = meth(val[0], :lsr, val[2])
|
1089
|
+
result
|
1090
|
+
end
|
1091
|
+
.,.,
|
1092
|
+
|
1093
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 103)
|
1094
|
+
def _reduce_40(val, _values, result)
|
1095
|
+
result = meth(val[0], :<<, val[2])
|
1096
|
+
result
|
1097
|
+
end
|
1098
|
+
.,.,
|
1099
|
+
|
1100
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 104)
|
1101
|
+
def _reduce_41(val, _values, result)
|
1102
|
+
result = ShortCircuitAnd.new(val[0], val[1])
|
1103
|
+
result
|
1104
|
+
end
|
1105
|
+
.,.,
|
1106
|
+
|
1107
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 105)
|
1108
|
+
def _reduce_42(val, _values, result)
|
1109
|
+
result = ShortCircuitOr.new(val[0], val[1])
|
1110
|
+
result
|
1111
|
+
end
|
1112
|
+
.,.,
|
1113
|
+
|
1114
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 106)
|
1115
|
+
def _reduce_43(val, _values, result)
|
1116
|
+
result = IfCondition.new(val[0], val[2], val[4])
|
1117
|
+
result
|
1118
|
+
end
|
1119
|
+
.,.,
|
1120
|
+
|
1121
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 107)
|
1122
|
+
def _reduce_44(val, _values, result)
|
1123
|
+
result = meth(val[0], :<, val[2])
|
1124
|
+
result
|
1125
|
+
end
|
1126
|
+
.,.,
|
1127
|
+
|
1128
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 108)
|
1129
|
+
def _reduce_45(val, _values, result)
|
1130
|
+
result = meth(val[0], :>, val[2])
|
1131
|
+
result
|
1132
|
+
end
|
1133
|
+
.,.,
|
1134
|
+
|
1135
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 109)
|
1136
|
+
def _reduce_46(val, _values, result)
|
1137
|
+
result = meth(val[0], :==, val[2])
|
1138
|
+
result
|
1139
|
+
end
|
1140
|
+
.,.,
|
1141
|
+
|
1142
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 111)
|
1143
|
+
def _reduce_47(val, _values, result)
|
1144
|
+
if RUBY_VERSION >= '1.9'
|
1145
|
+
if val[2].is_a? Constant
|
1146
|
+
result = meth(val[0], :not_equal_const, immediate(val[2]))
|
1147
|
+
else
|
1148
|
+
result = meth(val[0], :'!=', val[2])
|
1149
|
+
end
|
1150
|
+
else
|
1151
|
+
result = meth(meth(val[0], :==, val[2]), :~)
|
1152
|
+
end
|
1153
|
+
|
1154
|
+
result
|
1155
|
+
end
|
1156
|
+
.,.,
|
1157
|
+
|
1158
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 121)
|
1159
|
+
def _reduce_48(val, _values, result)
|
1160
|
+
result = meth(val[0], :>=, val[2])
|
1161
|
+
result
|
1162
|
+
end
|
1163
|
+
.,.,
|
1164
|
+
|
1165
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 122)
|
1166
|
+
def _reduce_49(val, _values, result)
|
1167
|
+
result = meth(val[0], :<=, val[2])
|
1168
|
+
result
|
1169
|
+
end
|
1170
|
+
.,.,
|
1171
|
+
|
1172
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 124)
|
1173
|
+
def _reduce_50(val, _values, result)
|
1174
|
+
result = CurrentReceiver
|
1175
|
+
result
|
1176
|
+
end
|
1177
|
+
.,.,
|
1178
|
+
|
1179
|
+
# reduce 51 omitted
|
1180
|
+
|
1181
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 127)
|
1182
|
+
def _reduce_52(val, _values, result)
|
1183
|
+
result = val[1]
|
1184
|
+
result
|
1185
|
+
end
|
1186
|
+
.,.,
|
1187
|
+
|
1188
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 128)
|
1189
|
+
def _reduce_53(val, _values, result)
|
1190
|
+
result = meth(val[1], :+@)
|
1191
|
+
result
|
1192
|
+
end
|
1193
|
+
.,.,
|
1194
|
+
|
1195
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 129)
|
1196
|
+
def _reduce_54(val, _values, result)
|
1197
|
+
result = meth(val[1], :-@)
|
1198
|
+
result
|
1199
|
+
end
|
1200
|
+
.,.,
|
1201
|
+
|
1202
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 131)
|
1203
|
+
def _reduce_55(val, _values, result)
|
1204
|
+
if RUBY_VERSION >= '1.9'
|
1205
|
+
result = meth(val[1], :'!')
|
1206
|
+
else
|
1207
|
+
result = IfCondition.new(val[1], const(true), const(false))
|
1208
|
+
end
|
1209
|
+
|
1210
|
+
result
|
1211
|
+
end
|
1212
|
+
.,.,
|
1213
|
+
|
1214
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 137)
|
1215
|
+
def _reduce_56(val, _values, result)
|
1216
|
+
result = meth(val[1], :~)
|
1217
|
+
result
|
1218
|
+
end
|
1219
|
+
.,.,
|
1220
|
+
|
1221
|
+
# reduce 57 omitted
|
1222
|
+
|
1223
|
+
# reduce 58 omitted
|
1224
|
+
|
1225
|
+
# reduce 59 omitted
|
1226
|
+
|
1227
|
+
# reduce 60 omitted
|
1228
|
+
|
1229
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 142)
|
1230
|
+
def _reduce_61(val, _values, result)
|
1231
|
+
raise NotImplementedError, 'typeof'
|
1232
|
+
result
|
1233
|
+
end
|
1234
|
+
.,.,
|
1235
|
+
|
1236
|
+
# reduce 62 omitted
|
1237
|
+
|
1238
|
+
# reduce 63 omitted
|
1239
|
+
|
1240
|
+
# reduce 64 omitted
|
1241
|
+
|
1242
|
+
# reduce 65 omitted
|
1243
|
+
|
1244
|
+
# reduce 66 omitted
|
1245
|
+
|
1246
|
+
# reduce 67 omitted
|
1247
|
+
|
1248
|
+
# reduce 68 omitted
|
1249
|
+
|
1250
|
+
# reduce 69 omitted
|
1251
|
+
|
1252
|
+
# reduce 70 omitted
|
1253
|
+
|
1254
|
+
# reduce 71 omitted
|
1255
|
+
|
1256
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 156)
|
1257
|
+
def _reduce_72(val, _values, result)
|
1258
|
+
result = meth(val[0], :fuku_send, immediate(const(val[2][0])))
|
1259
|
+
result
|
1260
|
+
end
|
1261
|
+
.,.,
|
1262
|
+
|
1263
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 158)
|
1264
|
+
def _reduce_73(val, _values, result)
|
1265
|
+
result = meth(val[0], :fuku_call, *val[2])
|
1266
|
+
result
|
1267
|
+
end
|
1268
|
+
.,.,
|
1269
|
+
|
1270
|
+
# reduce 74 omitted
|
1271
|
+
|
1272
|
+
# reduce 75 omitted
|
1273
|
+
|
1274
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 164)
|
1275
|
+
def _reduce_76(val, _values, result)
|
1276
|
+
result = [val[0]]
|
1277
|
+
result
|
1278
|
+
end
|
1279
|
+
.,.,
|
1280
|
+
|
1281
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 165)
|
1282
|
+
def _reduce_77(val, _values, result)
|
1283
|
+
result << val[2]
|
1284
|
+
result
|
1285
|
+
end
|
1286
|
+
.,.,
|
1287
|
+
|
1288
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 166)
|
1289
|
+
def _reduce_78(val, _values, result)
|
1290
|
+
result = []
|
1291
|
+
result
|
1292
|
+
end
|
1293
|
+
.,.,
|
1294
|
+
|
1295
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 168)
|
1296
|
+
def _reduce_79(val, _values, result)
|
1297
|
+
result = CoreCall.new(val[2][0].to_sym, *val[4])
|
1298
|
+
result
|
1299
|
+
end
|
1300
|
+
.,.,
|
1301
|
+
|
1302
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 170)
|
1303
|
+
def _reduce_80(val, _values, result)
|
1304
|
+
result = meth(val[0], :[], val[2])
|
1305
|
+
result
|
1306
|
+
end
|
1307
|
+
.,.,
|
1308
|
+
|
1309
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 173)
|
1310
|
+
def _reduce_81(val, _values, result)
|
1311
|
+
result = get_variable(val[0][0])
|
1312
|
+
|
1313
|
+
result
|
1314
|
+
end
|
1315
|
+
.,.,
|
1316
|
+
|
1317
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 177)
|
1318
|
+
def _reduce_82(val, _values, result)
|
1319
|
+
var = new_variable(val[0][0]); result = ass(var, val[2])
|
1320
|
+
|
1321
|
+
result
|
1322
|
+
end
|
1323
|
+
.,.,
|
1324
|
+
|
1325
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 180)
|
1326
|
+
def _reduce_83(val, _values, result)
|
1327
|
+
var = new_variable(val[0][0]); result = ass(var, const(:undefined))
|
1328
|
+
|
1329
|
+
result
|
1330
|
+
end
|
1331
|
+
.,.,
|
1332
|
+
|
1333
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 183)
|
1334
|
+
def _reduce_84(val, _values, result)
|
1335
|
+
result = val[1]
|
1336
|
+
result
|
1337
|
+
end
|
1338
|
+
.,.,
|
1339
|
+
|
1340
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 184)
|
1341
|
+
def _reduce_85(val, _values, result)
|
1342
|
+
result = Sequence[result]
|
1343
|
+
result
|
1344
|
+
end
|
1345
|
+
.,.,
|
1346
|
+
|
1347
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 185)
|
1348
|
+
def _reduce_86(val, _values, result)
|
1349
|
+
result << val[2]
|
1350
|
+
result
|
1351
|
+
end
|
1352
|
+
.,.,
|
1353
|
+
|
1354
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 187)
|
1355
|
+
def _reduce_87(val, _values, result)
|
1356
|
+
result = Assignment.new val[0], val[2]
|
1357
|
+
result
|
1358
|
+
end
|
1359
|
+
.,.,
|
1360
|
+
|
1361
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 188)
|
1362
|
+
def _reduce_88(val, _values, result)
|
1363
|
+
result = Assignment.new val[0], val[2]
|
1364
|
+
result
|
1365
|
+
end
|
1366
|
+
.,.,
|
1367
|
+
|
1368
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 189)
|
1369
|
+
def _reduce_89(val, _values, result)
|
1370
|
+
result = Assignment.new val[0], val[2]
|
1371
|
+
result
|
1372
|
+
end
|
1373
|
+
.,.,
|
1374
|
+
|
1375
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 190)
|
1376
|
+
def _reduce_90(val, _values, result)
|
1377
|
+
result = meth(val[1], :_increment_prefix)
|
1378
|
+
result
|
1379
|
+
end
|
1380
|
+
.,.,
|
1381
|
+
|
1382
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 191)
|
1383
|
+
def _reduce_91(val, _values, result)
|
1384
|
+
result = meth(val[1], :_decrement_prefix)
|
1385
|
+
result
|
1386
|
+
end
|
1387
|
+
.,.,
|
1388
|
+
|
1389
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 193)
|
1390
|
+
def _reduce_92(val, _values, result)
|
1391
|
+
result = meth(val[0], :_increment_suffix)
|
1392
|
+
|
1393
|
+
result
|
1394
|
+
end
|
1395
|
+
.,.,
|
1396
|
+
|
1397
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 196)
|
1398
|
+
def _reduce_93(val, _values, result)
|
1399
|
+
result = meth(val[0], :_decrement_suffix)
|
1400
|
+
|
1401
|
+
result
|
1402
|
+
end
|
1403
|
+
.,.,
|
1404
|
+
|
1405
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 199)
|
1406
|
+
def _reduce_94(val, _values, result)
|
1407
|
+
if val[2].is_a? Constant
|
1408
|
+
result = meth(val[0], :increment_const, immediate(val[2]))
|
1409
|
+
else
|
1410
|
+
result = meth(val[0], :increment, val[2])
|
1411
|
+
end
|
1412
|
+
|
1413
|
+
result
|
1414
|
+
end
|
1415
|
+
.,.,
|
1416
|
+
|
1417
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 206)
|
1418
|
+
def _reduce_95(val, _values, result)
|
1419
|
+
if val[2].is_a? Constant
|
1420
|
+
result = meth(val[0], :decrement_const, immediate(val[2]))
|
1421
|
+
else
|
1422
|
+
result = meth(val[0], :decrement, val[2])
|
1423
|
+
end
|
1424
|
+
|
1425
|
+
result
|
1426
|
+
end
|
1427
|
+
.,.,
|
1428
|
+
|
1429
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 212)
|
1430
|
+
def _reduce_96(val, _values, result)
|
1431
|
+
result = ass(val[0], meth(val[0], :*, val[2]))
|
1432
|
+
result
|
1433
|
+
end
|
1434
|
+
.,.,
|
1435
|
+
|
1436
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 213)
|
1437
|
+
def _reduce_97(val, _values, result)
|
1438
|
+
result = ass(val[0], meth(val[0], :'/', val[2]))
|
1439
|
+
result
|
1440
|
+
end
|
1441
|
+
.,.,
|
1442
|
+
|
1443
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 214)
|
1444
|
+
def _reduce_98(val, _values, result)
|
1445
|
+
result = ass(val[0], meth(val[0], :'%', val[2]))
|
1446
|
+
result
|
1447
|
+
end
|
1448
|
+
.,.,
|
1449
|
+
|
1450
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 215)
|
1451
|
+
def _reduce_99(val, _values, result)
|
1452
|
+
result = ass(val[0], meth(val[0], :|, val[2]))
|
1453
|
+
result
|
1454
|
+
end
|
1455
|
+
.,.,
|
1456
|
+
|
1457
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 216)
|
1458
|
+
def _reduce_100(val, _values, result)
|
1459
|
+
result = ass(val[0], meth(val[0], :&, val[2]))
|
1460
|
+
result
|
1461
|
+
end
|
1462
|
+
.,.,
|
1463
|
+
|
1464
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 217)
|
1465
|
+
def _reduce_101(val, _values, result)
|
1466
|
+
result = ass(val[0], meth(val[0], :^, val[2]))
|
1467
|
+
result
|
1468
|
+
end
|
1469
|
+
.,.,
|
1470
|
+
|
1471
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 218)
|
1472
|
+
def _reduce_102(val, _values, result)
|
1473
|
+
result = ass(val[0], meth(val[0], :<<, val[2]))
|
1474
|
+
result
|
1475
|
+
end
|
1476
|
+
.,.,
|
1477
|
+
|
1478
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 219)
|
1479
|
+
def _reduce_103(val, _values, result)
|
1480
|
+
result = ass(val[0], meth(val[0], :>>, val[2]))
|
1481
|
+
result
|
1482
|
+
end
|
1483
|
+
.,.,
|
1484
|
+
|
1485
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 220)
|
1486
|
+
def _reduce_104(val, _values, result)
|
1487
|
+
result = ass(val[0], meth(val[0], :lsr, val[2]))
|
1488
|
+
result
|
1489
|
+
end
|
1490
|
+
.,.,
|
1491
|
+
|
1492
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 223)
|
1493
|
+
def _reduce_105(val, _values, result)
|
1494
|
+
name = nil
|
1495
|
+
arg_def = val[2]
|
1496
|
+
block = val[4]
|
1497
|
+
raise 'expected Sequence, got %p' % block unless block.is_a? Sequence
|
1498
|
+
block << ReturnStatement.new(const(:undefined))
|
1499
|
+
function_def = FunctionDefinition.new(arg_def, block) # TODO: functions have names
|
1500
|
+
result = ass(var, function_def)
|
1501
|
+
|
1502
|
+
result
|
1503
|
+
end
|
1504
|
+
.,.,
|
1505
|
+
|
1506
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 232)
|
1507
|
+
def _reduce_106(val, _values, result)
|
1508
|
+
name = val[1][0]
|
1509
|
+
arg_def = val[3]
|
1510
|
+
block = val[5]
|
1511
|
+
raise 'expected Sequence, got %p' % block unless block.is_a? Sequence
|
1512
|
+
block << ReturnStatement.new(const(:undefined))
|
1513
|
+
function_def = FunctionDefinition.new(arg_def, block) # TODO: functions have names
|
1514
|
+
var = get_variable(name)
|
1515
|
+
result = ass(var, function_def)
|
1516
|
+
|
1517
|
+
result
|
1518
|
+
end
|
1519
|
+
.,.,
|
1520
|
+
|
1521
|
+
# reduce 107 omitted
|
1522
|
+
|
1523
|
+
# reduce 108 omitted
|
1524
|
+
|
1525
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 246)
|
1526
|
+
def _reduce_109(val, _values, result)
|
1527
|
+
result = WhileLoop.new(val[2], val[4])
|
1528
|
+
|
1529
|
+
result
|
1530
|
+
end
|
1531
|
+
.,.,
|
1532
|
+
|
1533
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 249)
|
1534
|
+
def _reduce_110(val, _values, result)
|
1535
|
+
result = DoWhileLoop.new(val[4], val[1])
|
1536
|
+
|
1537
|
+
result
|
1538
|
+
end
|
1539
|
+
.,.,
|
1540
|
+
|
1541
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 253)
|
1542
|
+
def _reduce_111(val, _values, result)
|
1543
|
+
result = ForLoop.new(val[2], val[4], val[6], val[8])
|
1544
|
+
|
1545
|
+
result
|
1546
|
+
end
|
1547
|
+
.,.,
|
1548
|
+
|
1549
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 256)
|
1550
|
+
def _reduce_112(val, _values, result)
|
1551
|
+
result = IfCondition.new(val[2], val[4], val[6])
|
1552
|
+
result
|
1553
|
+
end
|
1554
|
+
.,.,
|
1555
|
+
|
1556
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 257)
|
1557
|
+
def _reduce_113(val, _values, result)
|
1558
|
+
result = IfCondition.new(val[2], val[4])
|
1559
|
+
result
|
1560
|
+
end
|
1561
|
+
.,.,
|
1562
|
+
|
1563
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 259)
|
1564
|
+
def _reduce_114(val, _values, result)
|
1565
|
+
result = ReturnStatement.new(val[1])
|
1566
|
+
result
|
1567
|
+
end
|
1568
|
+
.,.,
|
1569
|
+
|
1570
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 261)
|
1571
|
+
def _reduce_115(val, _values, result)
|
1572
|
+
result = new_object
|
1573
|
+
result
|
1574
|
+
end
|
1575
|
+
.,.,
|
1576
|
+
|
1577
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 263)
|
1578
|
+
def _reduce_116(val, _values, result)
|
1579
|
+
object = new_object
|
1580
|
+
result = Sequence[]
|
1581
|
+
for key, value in val[1]
|
1582
|
+
result << meth(object, :fuku_send, immediate(const(:"#{key}=")), value)
|
1583
|
+
end
|
1584
|
+
result << object
|
1585
|
+
|
1586
|
+
result
|
1587
|
+
end
|
1588
|
+
.,.,
|
1589
|
+
|
1590
|
+
# reduce 117 omitted
|
1591
|
+
|
1592
|
+
# reduce 118 omitted
|
1593
|
+
|
1594
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 272)
|
1595
|
+
def _reduce_119(val, _values, result)
|
1596
|
+
result = [val[0][0], val[2]]
|
1597
|
+
result
|
1598
|
+
end
|
1599
|
+
.,.,
|
1600
|
+
|
1601
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 273)
|
1602
|
+
def _reduce_120(val, _values, result)
|
1603
|
+
result = [result]
|
1604
|
+
result
|
1605
|
+
end
|
1606
|
+
.,.,
|
1607
|
+
|
1608
|
+
module_eval(<<'.,.,', 'ecma_fuku.y', 274)
|
1609
|
+
def _reduce_121(val, _values, result)
|
1610
|
+
result << val[2]
|
1611
|
+
result
|
1612
|
+
end
|
1613
|
+
.,.,
|
1614
|
+
|
1615
|
+
def _reduce_none(val, _values, result)
|
1616
|
+
val[0]
|
1617
|
+
end
|
1618
|
+
|
1619
|
+
end # class Compiler
|
1620
|
+
end # module ECMA_Fuku
|
1621
|
+
end # module Languages
|
1622
|
+
end # module AmberVM
|