rVM 0.0.14 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. data/README +4 -4
  2. data/bin/rvm +229 -0
  3. data/lib/rvm.rb +6 -6
  4. data/lib/rvm/acts_as_rvm_type.rb +26 -3
  5. data/lib/rvm/classes.rb +9 -15
  6. data/lib/rvm/classes/block.rb +8 -3
  7. data/lib/rvm/classes/class.rb +2 -2
  8. data/lib/rvm/classes/list.rb +1 -1
  9. data/lib/rvm/classes/null.rb +31 -0
  10. data/lib/rvm/classes/number.rb +4 -0
  11. data/lib/rvm/classes/object.rb +1 -1
  12. data/lib/rvm/classes/string.rb +6 -1
  13. data/lib/rvm/environment.rb +256 -0
  14. data/lib/rvm/functions.rb +9 -4
  15. data/lib/rvm/functions/array.rb +26 -2
  16. data/lib/rvm/functions/array/append.rb +31 -1
  17. data/lib/rvm/functions/array/at.rb +29 -1
  18. data/lib/rvm/functions/array/set_at.rb +29 -0
  19. data/lib/rvm/functions/association/assoc_get.rb +34 -0
  20. data/lib/rvm/functions/association/assoc_set.rb +32 -0
  21. data/lib/rvm/functions/bitwise.rb +3 -0
  22. data/lib/rvm/functions/bitwise/bitwise_and.rb +41 -0
  23. data/lib/rvm/functions/bitwise/bitwise_or.rb +41 -0
  24. data/lib/rvm/functions/bitwise/bitwise_xor.rb +41 -0
  25. data/lib/rvm/functions/collection/get.rb +37 -4
  26. data/lib/rvm/functions/collection/set.rb +37 -3
  27. data/lib/rvm/functions/collection/size.rb +33 -1
  28. data/lib/rvm/functions/general/cmp.rb +35 -7
  29. data/lib/rvm/functions/general/eq.rb +29 -0
  30. data/lib/rvm/functions/general/gt.rb +29 -0
  31. data/lib/rvm/functions/general/gte.rb +29 -0
  32. data/lib/rvm/functions/general/lt.rb +29 -0
  33. data/lib/rvm/functions/general/lte.rb +29 -0
  34. data/lib/rvm/functions/general/neq.rb +5 -0
  35. data/lib/rvm/functions/io/print.rb +38 -8
  36. data/lib/rvm/functions/list/align.rb +25 -1
  37. data/lib/rvm/functions/list/join.rb +27 -0
  38. data/lib/rvm/functions/list/map.rb +34 -0
  39. data/lib/rvm/functions/list/split.rb +31 -0
  40. data/lib/rvm/functions/logic/and.rb +36 -2
  41. data/lib/rvm/functions/logic/not.rb +27 -0
  42. data/lib/rvm/functions/logic/or.rb +32 -2
  43. data/lib/rvm/functions/math/add.rb +25 -0
  44. data/lib/rvm/functions/math/cos.rb +39 -0
  45. data/lib/rvm/functions/math/div.rb +25 -0
  46. data/lib/rvm/functions/math/mod.rb +41 -0
  47. data/lib/rvm/functions/math/mul.rb +25 -0
  48. data/lib/rvm/functions/math/neg.rb +25 -0
  49. data/lib/rvm/functions/math/power.rb +25 -0
  50. data/lib/rvm/functions/math/shl.rb +41 -0
  51. data/lib/rvm/functions/math/shr.rb +41 -0
  52. data/lib/rvm/functions/math/sin.rb +39 -0
  53. data/lib/rvm/functions/math/sub.rb +25 -0
  54. data/lib/rvm/functions/math/tan.rb +39 -0
  55. data/lib/rvm/functions/rails/print.rb +33 -3
  56. data/lib/rvm/interpreter.rb +405 -272
  57. data/lib/rvm/languages.rb +45 -11
  58. data/lib/rvm/languages/brainfuck.rb +15 -16
  59. data/lib/rvm/languages/ecma.rb +4 -1257
  60. data/lib/rvm/languages/ecma/compiler.rb +1353 -0
  61. data/lib/rvm/languages/ecma/core-math.js +84 -0
  62. data/lib/rvm/languages/math.rb +9 -16
  63. data/lib/rvm/languages/math/compiler.rb +9 -9
  64. data/lib/rvm/languages/math/tokenizer.rb +1 -1
  65. data/lib/rvm/languages/math/tree.rb +14 -14
  66. data/lib/rvm/library.rb +26 -18
  67. data/lib/rvm/optimisation.rb +109 -0
  68. data/lib/rvm/plugin.rb +109 -45
  69. data/lib/rvm/rails.rb +79 -54
  70. data/spec/classes/atom/association_spec.rb +8 -8
  71. data/spec/classes/atom/block_spec.rb +8 -5
  72. data/spec/classes/atom/boolean_spec.rb +1 -1
  73. data/spec/classes/atom/error_spec.rb +1 -1
  74. data/spec/classes/atom/list_spec.rb +1 -1
  75. data/spec/classes/atom/number_spec.rb +2 -2
  76. data/spec/classes/atom/string_spec.rb +1 -1
  77. data/spec/languages/ecma/ecma_spec.rb +94 -38
  78. data/spec/languages/ecma/json_spec.rb +4 -4
  79. data/spec/languages/math/compiler_spec.rb +5 -5
  80. data/spec/languages/math/tokenizer_spec.rb +1 -1
  81. data/spec/languages/math/tree_spec.rb +1 -1
  82. data/spec/{base → rvm}/class_spec.rb +2 -2
  83. data/spec/{base/interpreter → rvm}/enviroment_spec.rb +19 -9
  84. data/spec/{base → rvm}/function_spec.rb +2 -2
  85. data/spec/{functions → rvm/functions}/association/assoc_get_spec.rb +2 -2
  86. data/spec/{functions → rvm/functions}/association/assoc_set_spec.rb +2 -2
  87. data/spec/rvm/functions/collection/get_spec.rb +12 -0
  88. data/spec/rvm/functions/collection/set_spec.rb +10 -0
  89. data/spec/rvm/functions/collection/size_spec.rb +10 -0
  90. data/spec/{functions → rvm/functions}/list/split_spec.rb +3 -3
  91. data/spec/{functions → rvm/functions}/string/ansi_spec.rb +3 -3
  92. data/spec/{functions → rvm/functions}/string/capstr_spec.rb +3 -3
  93. data/spec/{functions → rvm/functions}/string/center_spec.rb +3 -3
  94. data/spec/{functions → rvm/functions}/string/ljust_spec.rb +3 -3
  95. data/spec/{functions → rvm/functions}/string/regmatch_spec.rb +3 -3
  96. data/spec/{functions → rvm/functions}/string/rjust_spec.rb +3 -3
  97. data/spec/{base → rvm}/interpreter/assignment_spec.rb +1 -1
  98. data/spec/rvm/interpreter/condition_spec.rb +103 -0
  99. data/spec/{base → rvm}/interpreter/constant_spec.rb +1 -1
  100. data/spec/rvm/interpreter/core_call_spec.rb +72 -0
  101. data/spec/{base → rvm}/interpreter/interpreter_spec.rb +1 -1
  102. data/spec/{base → rvm}/interpreter/parameter_spec.rb +1 -1
  103. data/spec/rvm/interpreter/sequence_spec.rb +47 -0
  104. data/spec/{base → rvm}/interpreter/variable_spec.rb +1 -1
  105. data/spec/{base → rvm}/plugin_spec.rb +2 -2
  106. metadata +66 -35
  107. data/lib/rake/helpers/code_statistics.rb +0 -167
  108. data/spec/base/interpreter/condition_spec.rb +0 -47
  109. data/spec/base/interpreter/function_call_spec.rb +0 -72
  110. data/spec/base/interpreter/sequence_spec.rb +0 -20
  111. data/spec/functions/collection/get_spec.rb +0 -12
  112. data/spec/functions/collection/set_spec.rb +0 -10
  113. data/spec/functions/collection/size_spec.rb +0 -10
@@ -0,0 +1,1353 @@
1
+ #
2
+ # DO NOT MODIFY!!!!
3
+ # This file is automatically generated by Racc 1.4.6
4
+ # from Racc grammer file "".
5
+ #
6
+
7
+ require 'racc/parser.rb'
8
+
9
+
10
+ require 'strscan'
11
+ require 'rvm/functions/math'
12
+ require 'rvm/functions/logic'
13
+ require 'rvm/functions/array'
14
+ require 'rvm/functions/general'
15
+ require 'rvm/functions/bitwise'
16
+ require 'rvm/classes/string'
17
+ require 'rvm/classes/list'
18
+ require 'rvm/classes/number'
19
+ require 'pp'
20
+
21
+ module RVM
22
+ module Languages
23
+ class ECMA
24
+ class Compiler < Racc::Parser
25
+
26
+ module_eval(<<'...end ecma.y/module_eval...', 'ecma.y', 271)
27
+ def compile(str, include_core = false)
28
+ @q = []
29
+ s = StringScanner.new(str)
30
+ pos = 0
31
+ line = 1
32
+ while not s.eos?
33
+ if s.scan(/\/\/.*/)
34
+ # ignore comments
35
+ elsif s.scan(/\n/)
36
+ line += 1
37
+ pos = s.pos
38
+ elsif s.scan(/\/\*.*?\*\//m)
39
+ line += s.matched.count("\n")
40
+ elsif s.scan(/' [^\\']* (?: \\ (?: u[a-zA-Z0-9]{4} | [a-tv-wyz1-9_\W] ) [^\\']* )* '/x)
41
+ m = s.matched[1..-2]
42
+ @q.push [:STRING, [m, [s.pos, line, s.pos - pos]]]
43
+ elsif s.scan(/" [^\\"]* (?: \\ (?: u[a-zA-Z0-9]{4} | [a-tv-wyz1-9_\W] ) [^\\"]* )* "/x)
44
+ m = s.matched[1..-2]
45
+ m.gsub!(/\\./) do |repl|
46
+ case repl[1]
47
+ when ?n
48
+ "\n"
49
+ when ?t
50
+ "\t"
51
+ when ?\\
52
+ '\\'
53
+ end
54
+ end
55
+ @q.push [:STRING, [m, [s.pos, line, s.pos - pos]]]
56
+ elsif s.scan(/(\.\d+|(0(\.\d+)?)|([1-9](\d*(\.\d+)?)))(e[+-]?\d+)?/i)
57
+ @q.push [:NUMBER, [s.matched, [s.pos, line, s.pos - pos]]]
58
+ elsif s.scan(/\[/)
59
+ @q.push [:SBRACKET_OPEN, [s.matched, [s.pos, line, s.pos - pos]]]
60
+ elsif s.scan(/\]/)
61
+ @q.push [:SBRACKET_CLOSE, [s.matched, [s.pos, line, s.pos - pos]]]
62
+ elsif s.scan(/\{/)
63
+ @q.push [:CBRACKET_OPEN, [s.matched, [s.pos, line, s.pos - pos]]]
64
+ elsif s.scan(/\}/)
65
+ @q.push [:CBRACKET_CLOSE, [s.matched, [s.pos, line, s.pos - pos]]]
66
+ elsif s.scan(/\$?[a-z_][a-z_0-9]*/i)
67
+ m = s.matched
68
+ type = case m
69
+ when '__RVM__'
70
+ include_core ? :KW_CORE : :IDENT
71
+ when 'function'
72
+ :KW_FUNCTION
73
+ when 'for'
74
+ :KW_FOR
75
+ when 'while'
76
+ :KW_WHILE
77
+ when 'do'
78
+ :KW_DO
79
+ when 'if'
80
+ :KW_IF
81
+ when 'return'
82
+ :KW_RETURN
83
+ when 'else'
84
+ :KW_ELSE
85
+ when 'new'
86
+ :KW_NEW
87
+ when 'this'
88
+ :KW_THIS
89
+ when 'var'
90
+ :KW_VAR
91
+ when 'true'
92
+ :KW_TRUE
93
+ when 'false'
94
+ :KW_FALSE
95
+ when 'null'
96
+ :KW_NULL
97
+ else
98
+ :IDENT
99
+ end
100
+ @q.push [type, [m, [s.pos, line, s.pos - pos]]]
101
+ elsif s.scan(/>>[>=]?|<<=?|&&|\|\||[<>]=?|[!=]=?=?|[-+]{2}|[-+*\/%^|&]=?|[.,()?:;]/)
102
+ m = s.matched
103
+ @q.push [m, [m, [s.pos, line, s.pos - pos]]]
104
+ elsif s.scan(/[ \t]+/)
105
+ # ignore white space
106
+ else c = s.getch
107
+ raise Exception, "Woops! I can't deal with char %p at #{line}:#{s.pos - pos}" % [c]
108
+ end
109
+ end
110
+ @q.push([false, '$end'])
111
+
112
+ do_parse
113
+ end
114
+
115
+ def next_token
116
+ @q.shift
117
+ end
118
+ ...end ecma.y/module_eval...
119
+ ##### State transition tables begin ###
120
+
121
+ clist = [
122
+ '64,66,67,69,51,52,55,84,58,60,62,63,65,101,68,175,53,56,57,64,66,67',
123
+ '69,51,52,55,64,66,67,69,51,52,55,100,58,60,62,63,65,176,68,175,53,56',
124
+ '64,66,67,69,51,97,163,130,64,66,67,69,51,52,55,50,58,60,62,63,65,191',
125
+ '68,131,97,97,64,66,67,69,51,97,124,125,50,50,127,123,102,128,80,50,64',
126
+ '66,67,69,51,52,55,97,58,60,62,63,65,126,68,97,53,50,64,66,67,69,51,52',
127
+ '55,50,58,60,62,63,65,171,68,97,53,56,57,59,61,162,137,157,173,50,64',
128
+ '66,67,80,150,97,157,157,64,66,67,69,51,52,55,50,58,60,62,63,65,181,68',
129
+ '54,53,56,57,59,61,177,182,158,96,50,64,66,67,69,51,52,55,93,58,60,62',
130
+ '63,65,143,68,97,53,56,57,59,61,80,129,97,149,50,64,66,67,69,51,52,55',
131
+ '50,58,60,62,63,65,148,68,74,53,56,57,59,80,80,97,97,64,66,67,69,51,52',
132
+ '55,87,50,50,184,64,66,67,69,51,52,55,186,160,64,66,67,145,80,97,80,177',
133
+ '64,66,67,69,51,52,55,50,58,60,62,63,65,82,68,88,53,56,57,59,61,97,64',
134
+ '66,67,69,51,52,55,189,190,50,97,97,97,80,97,97,129,89,91,97,50,50,50',
135
+ '88,50,50,147,97,166,50,64,66,67,69,51,52,55,50,58,60,62,63,177,71,46',
136
+ '177,196,89,91,97,90,92,64,66,67,69,51,52,55,50,58,60,62,63,65,42,68',
137
+ '97,53,56,57,59,61,,,-99,,50,,97,90,92,64,66,67,69,51,52,55,50,58,60',
138
+ '62,63,,,,,-99,-99,-99,97,,,64,66,67,69,51,52,55,50,58,60,62,63,65,,68',
139
+ ',53,56,57,59,61,,,,,84,,97,-99,-99,,,,,,,,50,,,,,,,,,,,,97,,,,,133,',
140
+ ',,,50,64,66,67,69,51,52,55,,58,60,62,63,65,,68,,53,56,57,59,61,64,66',
141
+ '67,69,51,52,55,,58,60,62,63,65,,68,,53,56,57,59,61,,,,,,,,97,,,,,,,',
142
+ ',,50,,,,,,,,,,,97,,,64,66,67,69,51,52,55,50,58,60,62,63,65,,68,,53,56',
143
+ '57,59,61,64,66,67,69,51,52,55,,58,60,62,63,65,,68,,53,56,57,59,61,,',
144
+ '39,2,,,,97,,,,,,,,,,50,,,,,,,,39,2,,97,,16,24,,,,,,,50,11,13,18,20,25',
145
+ ',,38,1,5,,44,,17,16,45,39,2,40,,,,,,13,18,20,25,,,38,1,5,,44,,17,,,39',
146
+ '2,40,,,16,45,,,,,,,,,13,18,20,25,,,38,1,5,,44,,17,16,45,39,2,40,,,,',
147
+ ',13,18,20,25,,,38,1,5,,44,,17,,,39,2,40,,,16,45,,,,,,,,,13,18,20,25',
148
+ ',,38,1,5,,44,,17,16,45,39,2,40,,,,,,13,18,20,25,,,38,1,5,,44,,17,,,',
149
+ ',40,,,16,45,39,2,,,,,,,13,18,20,25,,,38,1,5,,44,,17,169,,39,2,40,,,16',
150
+ '45,,,,,,,,,13,18,20,25,,,38,1,5,,44,,17,16,45,39,2,40,,,,,,13,18,20',
151
+ '25,,,38,1,5,,44,,17,,,39,2,40,,,16,45,,,,,,,,,13,18,20,25,,,38,1,5,',
152
+ '44,,17,16,45,39,2,40,,,,,,13,18,20,25,,,38,1,5,,44,,17,,,39,2,40,,,16',
153
+ '45,,,,,,,,,13,18,20,25,,,38,1,5,,44,,17,16,45,39,2,40,,,,,,13,18,20',
154
+ '25,,,38,1,5,,44,,17,,,39,2,40,,,16,45,,,,,,,,,13,18,20,25,,,38,1,5,',
155
+ '44,,17,16,45,39,2,40,,,,,,13,18,20,25,,,38,1,5,,44,,17,,,39,2,40,,,16',
156
+ '45,,,,,,,,,13,18,20,25,,,38,1,5,,44,,17,16,45,39,2,40,,,,,,13,18,20',
157
+ '25,,,38,1,5,,44,,17,,,39,2,40,,,16,45,,,,,,,,,13,18,20,25,,,38,1,5,',
158
+ '44,,17,16,45,39,2,40,,,,,,13,18,20,25,,,38,1,5,,44,,17,,,,,40,,,16,45',
159
+ '39,2,,,,,,,13,18,20,25,,,38,1,5,,44,,17,,,39,2,40,,,16,24,,,33,36,,3',
160
+ '7,11,13,18,20,25,29,,38,1,5,,10,,17,16,24,39,2,40,,,,,11,13,18,20,25',
161
+ ',,38,1,5,,44,,17,,,,,40,,,16,45,39,2,,,,,,,13,18,20,25,,,38,1,5,,44',
162
+ ',17,165,,39,2,40,,,16,24,,,,,,,,11,13,18,20,25,,,38,1,5,,44,,17,16,45',
163
+ '39,2,40,,,,,,13,18,20,25,,,38,1,5,,44,,17,,,,,40,,,16,24,39,2,,,,,,11',
164
+ '13,18,20,25,,,38,1,5,,44,,17,,,39,2,40,,,16,24,,31,33,36,,3,7,11,13',
165
+ '18,20,25,29,,38,1,5,,10,,17,16,24,39,2,40,,,,,11,13,18,20,25,,,38,1',
166
+ '5,,44,,17,,,,,40,,,16,45,39,2,,,,,,,13,18,20,25,,,38,1,5,,44,,17,136',
167
+ ',39,2,40,,,16,45,,154,,,,,,,13,18,20,25,,,38,1,5,,44,,17,16,24,39,2',
168
+ '40,,,,,11,13,18,20,25,,,38,1,5,,44,,17,,,39,2,40,,,16,24,,,,,,,,11,13',
169
+ '18,20,25,,,38,1,5,,44,,17,16,45,39,2,40,,,,,,13,18,20,25,,,38,1,5,,44',
170
+ ',17,,,39,2,40,,,16,24,,,,,,,,11,13,18,20,25,,,38,1,5,,44,,17,16,24,39',
171
+ '2,40,,,,,11,13,18,20,25,,,38,1,5,,44,,17,,,39,2,40,,,16,24,,,33,36,',
172
+ '3,7,11,13,18,20,25,29,,38,1,5,,10,,17,16,45,39,2,40,,,,,,13,18,20,25',
173
+ ',,38,1,5,,44,,17,,,39,2,40,,,16,45,,,,,,,,,13,18,20,25,,,38,1,5,,44',
174
+ ',17,16,45,39,2,40,,,,,,13,18,20,25,,,38,1,5,,44,,17,,,39,2,40,,,16,24',
175
+ ',,33,36,,3,7,11,13,18,20,25,29,,38,1,5,,10,,17,16,45,39,2,40,,,,,,13',
176
+ '18,20,25,,,38,1,5,,44,,17,,,39,2,40,,,16,45,,,,,,,,,13,18,20,25,,,38',
177
+ '1,5,,44,,17,16,24,39,2,40,,,,,11,13,18,20,25,,,38,1,5,,44,,17,,,,,40',
178
+ ',,16,45,39,2,,,,,,,13,18,20,25,,,38,1,5,,44,,17,,,,,40,,,16,24,39,2',
179
+ '33,36,,3,7,11,13,18,20,25,29,,38,1,5,,10,,17,,,39,2,40,,,16,24,,,33',
180
+ '36,,3,7,11,13,18,20,25,29,,38,1,5,,10,74,17,16,24,39,2,40,,,,,11,13',
181
+ '18,20,25,,,38,1,5,,44,,17,,,39,2,40,,,16,24,,,33,36,,3,7,11,13,18,20',
182
+ '25,29,,38,1,5,,10,,17,16,45,39,2,40,,,,,,13,18,20,25,,,38,1,5,49,44',
183
+ ',17,,,39,2,40,,,16,24,,,33,36,,3,7,11,13,18,20,25,29,,38,1,5,,10,,17',
184
+ '16,45,39,2,40,,,,,,13,18,20,25,,,38,1,5,,44,,17,,,,,40,,,16,24,39,2',
185
+ '33,36,,3,7,11,13,18,20,25,29,,38,1,5,,10,,17,,,39,2,40,,,16,24,,31,33',
186
+ '36,,3,7,11,13,18,20,25,29,,38,1,5,,10,,17,16,45,,,40,,,,,,13,18,20,25',
187
+ ',,38,1,5,,44,,17,,,,,40' ]
188
+ racc_action_table = arr = Array.new(2030, nil)
189
+ idx = 0
190
+ clist.each do |str|
191
+ str.split(',', -1).each do |i|
192
+ arr[idx] = i.to_i unless i.empty?
193
+ idx += 1
194
+ end
195
+ end
196
+
197
+ clist = [
198
+ '112,112,112,112,112,112,112,45,112,112,112,112,112,47,112,159,112,112',
199
+ '112,111,111,111,111,111,111,111,110,110,110,110,110,110,110,47,110,110',
200
+ '110,110,110,159,110,185,110,110,108,108,108,108,108,112,142,79,106,106',
201
+ '106,106,106,106,106,112,106,106,106,106,106,185,106,81,111,95,105,105',
202
+ '105,105,105,110,71,72,111,95,75,70,50,75,130,110,109,109,109,109,109',
203
+ '109,109,108,109,109,109,109,109,72,109,106,109,108,6,6,6,6,6,6,6,106',
204
+ '6,6,6,6,6,149,6,105,6,6,6,6,6,138,86,164,154,105,104,104,104,125,123',
205
+ '109,168,135,107,107,107,107,107,107,107,109,107,107,107,107,107,164',
206
+ '107,6,107,107,107,107,107,160,168,135,42,6,183,183,183,183,183,183,183',
207
+ '36,183,183,183,183,183,96,183,104,183,183,183,183,183,44,98,107,107',
208
+ '104,114,114,114,114,114,114,114,107,114,114,114,114,114,103,114,44,114',
209
+ '114,114,114,173,137,94,183,113,113,113,113,113,113,113,33,94,183,172',
210
+ '115,115,115,115,115,115,115,173,137,122,122,122,99,31,114,175,176,144',
211
+ '144,144,144,144,144,144,114,144,144,144,144,144,12,144,77,144,144,144',
212
+ '144,144,113,116,116,116,116,116,116,116,179,180,113,115,120,43,11,170',
213
+ '117,77,77,77,122,115,120,43,35,170,117,102,144,144,122,118,118,118,118',
214
+ '118,118,118,144,118,118,118,118,186,8,3,191,193,35,35,116,77,77,48,48',
215
+ '48,48,48,48,48,116,48,48,48,48,48,1,48,119,48,48,48,48,48,,,24,,119',
216
+ ',118,35,35,121,121,121,121,121,121,121,118,121,121,121,121,,,,,24,24',
217
+ '24,48,,,83,83,83,83,83,83,83,48,83,83,83,83,83,,83,,83,83,83,83,83,',
218
+ ',,,24,,121,24,24,,,,,,,,121,,,,,,,,,,,,83,,,,,83,,,,,83,134,134,134',
219
+ '134,134,134,134,,134,134,134,134,134,,134,,134,134,134,134,134,153,153',
220
+ '153,153,153,153,153,,153,153,153,153,153,,153,,153,153,153,153,153,',
221
+ ',,,,,,134,,,,,,,,,,134,,,,,,,,,,,153,,,146,146,146,146,146,146,146,153',
222
+ '146,146,146,146,146,,146,,146,146,146,146,146,174,174,174,174,174,174',
223
+ '174,,174,174,174,174,174,,174,,174,174,174,174,174,,,89,89,,,,146,,',
224
+ ',,,,,,,146,,,,,,,,52,52,,174,,89,89,,,,,,,174,89,89,89,89,89,,,89,89',
225
+ '89,,89,,89,52,52,53,53,89,,,,,,52,52,52,52,,,52,52,52,,52,,52,,,54,54',
226
+ '52,,,53,53,,,,,,,,,53,53,53,53,,,53,53,53,,53,,53,54,54,55,55,53,,,',
227
+ ',,54,54,54,54,,,54,54,54,,54,,54,,,56,56,54,,,55,55,,,,,,,,,55,55,55',
228
+ '55,,,55,55,55,,55,,55,56,56,147,147,55,,,,,,56,56,56,56,,,56,56,56,',
229
+ '56,,56,,,,,56,,,147,147,58,58,,,,,,,147,147,147,147,,,147,147,147,,147',
230
+ ',147,147,,59,59,147,,,58,58,,,,,,,,,58,58,58,58,,,58,58,58,,58,,58,59',
231
+ '59,60,60,58,,,,,,59,59,59,59,,,59,59,59,,59,,59,,,61,61,59,,,60,60,',
232
+ ',,,,,,,60,60,60,60,,,60,60,60,,60,,60,61,61,62,62,60,,,,,,61,61,61,61',
233
+ ',,61,61,61,,61,,61,,,63,63,61,,,62,62,,,,,,,,,62,62,62,62,,,62,62,62',
234
+ ',62,,62,63,63,64,64,62,,,,,,63,63,63,63,,,63,63,63,,63,,63,,,65,65,63',
235
+ ',,64,64,,,,,,,,,64,64,64,64,,,64,64,64,,64,,64,65,65,66,66,64,,,,,,65',
236
+ '65,65,65,,,65,65,65,,65,,65,,,67,67,65,,,66,66,,,,,,,,,66,66,66,66,',
237
+ ',66,66,66,,66,,66,67,67,68,68,66,,,,,,67,67,67,67,,,67,67,67,,67,,67',
238
+ ',,69,69,67,,,68,68,,,,,,,,,68,68,68,68,,,68,68,68,,68,,68,69,69,148',
239
+ '148,68,,,,,,69,69,69,69,,,69,69,69,,69,,69,,,,,69,,,148,148,145,145',
240
+ ',,,,,,148,148,148,148,,,148,148,148,,148,,148,,,46,46,148,,,145,145',
241
+ ',,145,145,,145,145,145,145,145,145,145,145,,145,145,145,,145,,145,46',
242
+ '46,143,143,145,,,,,46,46,46,46,46,,,46,46,46,,46,,46,,,,,46,,,143,143',
243
+ '150,150,,,,,,,143,143,143,143,,,143,143,143,,143,,143,143,,157,157,143',
244
+ ',,150,150,,,,,,,,150,150,150,150,150,,,150,150,150,,150,,150,157,157',
245
+ '131,131,150,,,,,,157,157,157,157,,,157,157,157,,157,,157,,,,,157,,,131',
246
+ '131,82,82,,,,,,131,131,131,131,131,,,131,131,131,,131,,131,,,162,162',
247
+ '131,,,82,82,,82,82,82,,82,82,82,82,82,82,82,82,,82,82,82,,82,,82,162',
248
+ '162,84,84,82,,,,,162,162,162,162,162,,,162,162,162,,162,,162,,,,,162',
249
+ ',,84,84,129,129,,,,,,,84,84,84,84,,,84,84,84,,84,,84,84,,87,87,84,,',
250
+ '129,129,,129,,,,,,,129,129,129,129,,,129,129,129,,129,,129,87,87,88',
251
+ '88,129,,,,,87,87,87,87,87,,,87,87,87,,87,,87,,,51,51,87,,,88,88,,,,',
252
+ ',,,88,88,88,88,88,,,88,88,88,,88,,88,51,51,91,91,88,,,,,,51,51,51,51',
253
+ ',,51,51,51,,51,,51,,,93,93,51,,,91,91,,,,,,,,91,91,91,91,91,,,91,91',
254
+ '91,,91,,91,93,93,128,128,91,,,,,93,93,93,93,93,,,93,93,93,,93,,93,,',
255
+ '40,40,93,,,128,128,,,128,128,,128,128,128,128,128,128,128,128,,128,128',
256
+ '128,,128,,128,40,40,39,39,128,,,,,,40,40,40,40,,,40,40,40,,40,,40,,',
257
+ '97,97,40,,,39,39,,,,,,,,,39,39,39,39,,,39,39,39,,39,,39,97,97,163,163',
258
+ '39,,,,,,97,97,97,97,,,97,97,97,,97,,97,,,171,171,97,,,163,163,,,163',
259
+ '163,,163,163,163,163,163,163,163,163,,163,163,163,,163,,163,171,171',
260
+ '101,101,163,,,,,,171,171,171,171,,,171,171,171,,171,,171,,,29,29,171',
261
+ ',,101,101,,,,,,,,,101,101,101,101,,,101,101,101,,101,,101,29,29,17,17',
262
+ '101,,,,,29,29,29,29,29,,,29,29,29,,29,,29,,,,,29,,,17,17,177,177,,,',
263
+ ',,,17,17,17,17,,,17,17,17,,17,,17,,,,,17,,,177,177,10,10,177,177,,177',
264
+ '177,177,177,177,177,177,177,,177,177,177,,177,,177,,,189,189,177,,,10',
265
+ '10,,,10,10,,10,10,10,10,10,10,10,10,,10,10,10,,10,10,10,189,189,7,7',
266
+ '10,,,,,189,189,189,189,189,,,189,189,189,,189,,189,,,5,5,189,,,7,7,',
267
+ ',7,7,,7,7,7,7,7,7,7,7,,7,7,7,,7,,7,5,5,190,190,7,,,,,,5,5,5,5,,,5,5',
268
+ '5,5,5,,5,,,2,2,5,,,190,190,,,190,190,,190,190,190,190,190,190,190,190',
269
+ ',190,190,190,,190,,190,2,2,196,196,190,,,,,,2,2,2,2,,,2,2,2,,2,,2,,',
270
+ ',,2,,,196,196,0,0,196,196,,196,196,196,196,196,196,196,196,,196,196',
271
+ '196,,196,,196,,,57,57,196,,,0,0,,0,0,0,,0,0,0,0,0,0,0,0,,0,0,0,,0,,0',
272
+ '57,57,,,0,,,,,,57,57,57,57,,,57,57,57,,57,,57,,,,,57' ]
273
+ racc_action_check = arr = Array.new(2030, 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
+ racc_action_pointer = [
283
+ 1941, 263, 1881, 248, nil, 1828, 97, 1805, 307, nil,
284
+ 1752, 238, 193, nil, nil, nil, nil, 1692, nil, nil,
285
+ nil, nil, nil, nil, 333, nil, nil, nil, nil, 1662,
286
+ nil, 199, nil, 161, nil, 281, 111, nil, nil, 1533,
287
+ 1503, nil, 123, 220, 146, -53, 1095, -24, 309, nil,
288
+ 43, 1397, 558, 588, 611, 641, 664, 1964, 724, 747,
289
+ 777, 800, 830, 853, 883, 906, 936, 959, 989, 1012,
290
+ 36, 76, 40, nil, nil, 21, nil, 251, nil, 14,
291
+ nil, 61, 1238, 361, 1291, nil, 66, 1344, 1374, 535,
292
+ nil, 1427, nil, 1450, 156, 13, 117, 1556, 157, 176,
293
+ nil, 1639, 230, 197, 123, 63, 45, 131, 37, 79,
294
+ 19, 12, -7, 207, 183, 218, 257, 223, 287, 275,
295
+ 219, 339, 227, 74, nil, 94, nil, nil, 1480, 1321,
296
+ 45, 1208, nil, nil, 421, 100, nil, 172, 63, nil,
297
+ nil, nil, -11, 1125, 235, 1072, 494, 694, 1042, 111,
298
+ 1155, nil, nil, 442, 68, nil, nil, 1178, nil, -22,
299
+ 101, nil, 1261, 1586, 90, nil, nil, nil, 99, nil,
300
+ 222, 1609, 163, 171, 515, 201, 183, 1722, nil, 209,
301
+ 228, nil, nil, 157, nil, 4, 248, nil, nil, 1775,
302
+ 1858, 251, nil, 249, nil, nil, 1911, nil ]
303
+
304
+ racc_action_default = [
305
+ -2, -100, -100, -100, -91, -100, -19, -100, -100, -31,
306
+ -100, -100, -1, -69, -68, -65, -88, -100, -70, -66,
307
+ -71, -67, -33, -7, -72, -89, -75, -34, -5, -100,
308
+ -35, -100, -6, -100, -36, -100, -100, -90, -73, -100,
309
+ -100, -32, -100, -56, -100, -72, -100, -100, -40, -38,
310
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
311
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
312
+ -100, -100, -100, -47, -42, -100, -27, -100, -17, -25,
313
+ -99, -100, -9, -100, -100, -37, -100, -100, -100, -100,
314
+ -20, -100, -21, -100, -57, -55, -100, -100, -100, -100,
315
+ -39, -100, -99, -84, -50, -63, -58, -100, -64, -59,
316
+ -60, -77, -61, -76, -62, -80, -81, -51, -78, -52,
317
+ -53, -79, -49, -100, 198, -100, -43, -30, -29, -100,
318
+ -100, -100, -8, -74, -14, -100, -3, -100, -100, -24,
319
+ -22, -23, -100, -100, -100, -100, -41, -100, -100, -54,
320
+ -100, -48, -28, -44, -100, -18, -16, -100, -4, -100,
321
+ -100, -12, -100, -100, -100, -83, -54, -97, -100, -87,
322
+ -85, -100, -100, -100, -15, -100, -100, -100, -10, -100,
323
+ -95, -82, -86, -26, -98, -100, -100, -13, -11, -100,
324
+ -100, -100, -45, -100, -94, -46, -100, -96 ]
325
+
326
+ racc_goto_table = [
327
+ 70, 78, 43, 76, 23, 48, 159, 178, 8, 12,
328
+ 77, 81, 85, 79, 135, 47, 151, 83, nil, nil,
329
+ nil, nil, nil, 188, nil, nil, nil, nil, nil, 99,
330
+ nil, 86, nil, 192, nil, nil, nil, nil, 195, 94,
331
+ 95, nil, 185, nil, 98, nil, nil, nil, nil, nil,
332
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
333
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
334
+ 138, 139, 140, 164, 141, nil, 142, 168, nil, nil,
335
+ nil, nil, nil, nil, 134, nil, 132, nil, nil, nil,
336
+ nil, nil, nil, nil, nil, nil, nil, 144, nil, nil,
337
+ nil, 146, nil, nil, nil, nil, nil, nil, nil, nil,
338
+ nil, nil, nil, nil, 156, nil, nil, nil, nil, nil,
339
+ 155, 152, nil, nil, nil, 98, nil, nil, nil, 153,
340
+ 81, nil, nil, 172, nil, nil, nil, 161, 167, nil,
341
+ nil, nil, nil, 134, nil, 179, nil, 134, 170, nil,
342
+ nil, nil, nil, nil, nil, nil, 180, 174, nil, nil,
343
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
344
+ 76, 183, 193, 161, nil, 187, nil, nil, nil, nil,
345
+ nil, nil, nil, 194, nil, nil, nil, nil, nil, 197 ]
346
+
347
+ racc_goto_check = [
348
+ 6, 12, 11, 6, 5, 11, 10, 9, 1, 2,
349
+ 8, 8, 13, 14, 4, 21, 24, 11, nil, nil,
350
+ nil, nil, nil, 9, nil, nil, nil, nil, nil, 13,
351
+ nil, 8, nil, 9, nil, nil, nil, nil, 9, 11,
352
+ 11, nil, 10, nil, 8, nil, nil, nil, nil, nil,
353
+ 8, 11, 11, 11, 11, 11, 11, 11, 11, 11,
354
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
355
+ 13, 13, 13, 4, 13, nil, 13, 4, nil, nil,
356
+ nil, nil, nil, nil, 11, nil, 5, nil, nil, nil,
357
+ nil, nil, nil, nil, nil, nil, nil, 11, nil, nil,
358
+ nil, 11, nil, nil, nil, nil, nil, nil, nil, nil,
359
+ nil, nil, nil, nil, 13, nil, nil, nil, nil, nil,
360
+ 12, 6, nil, nil, nil, 8, nil, nil, nil, 11,
361
+ 8, nil, nil, 13, nil, nil, nil, 8, 6, nil,
362
+ nil, nil, nil, 11, nil, 13, nil, 11, 11, nil,
363
+ nil, nil, nil, nil, nil, nil, 6, 11, nil, nil,
364
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
365
+ 6, 11, 13, 8, nil, 8, nil, nil, nil, nil,
366
+ nil, nil, nil, 6, nil, nil, nil, nil, nil, 6 ]
367
+
368
+ racc_goto_pointer = [
369
+ nil, 8, 9, nil, -70, 4, -7, nil, 0, -153,
370
+ -131, 0, -10, -17, 2, nil, nil, nil, nil, nil,
371
+ nil, 10, nil, nil, -109, nil, nil, nil, nil ]
372
+
373
+ racc_goto_default = [
374
+ nil, nil, nil, 14, nil, nil, 28, 32, 35, 41,
375
+ nil, 6, nil, 9, nil, 75, 22, 27, 30, 34,
376
+ 37, nil, 4, 72, 73, 15, 19, 21, 26 ]
377
+
378
+ racc_reduce_table = [
379
+ 0, 0, :racc_error,
380
+ 1, 68, :_reduce_none,
381
+ 0, 68, :_reduce_2,
382
+ 3, 70, :_reduce_3,
383
+ 4, 70, :_reduce_4,
384
+ 1, 72, :_reduce_none,
385
+ 1, 72, :_reduce_none,
386
+ 1, 69, :_reduce_7,
387
+ 3, 69, :_reduce_8,
388
+ 2, 69, :_reduce_none,
389
+ 5, 74, :_reduce_10,
390
+ 6, 74, :_reduce_11,
391
+ 1, 77, :_reduce_12,
392
+ 3, 77, :_reduce_13,
393
+ 1, 71, :_reduce_14,
394
+ 3, 71, :_reduce_15,
395
+ 3, 79, :_reduce_16,
396
+ 1, 81, :_reduce_17,
397
+ 3, 81, :_reduce_18,
398
+ 1, 80, :_reduce_none,
399
+ 2, 80, :_reduce_20,
400
+ 2, 80, :_reduce_21,
401
+ 3, 80, :_reduce_22,
402
+ 3, 80, :_reduce_23,
403
+ 3, 80, :_reduce_24,
404
+ 2, 80, :_reduce_25,
405
+ 6, 80, :_reduce_26,
406
+ 1, 82, :_reduce_27,
407
+ 3, 82, :_reduce_28,
408
+ 2, 82, :_reduce_none,
409
+ 3, 76, :_reduce_30,
410
+ 1, 73, :_reduce_none,
411
+ 1, 73, :_reduce_none,
412
+ 1, 73, :_reduce_none,
413
+ 1, 73, :_reduce_none,
414
+ 1, 73, :_reduce_none,
415
+ 1, 73, :_reduce_none,
416
+ 2, 86, :_reduce_37,
417
+ 2, 87, :_reduce_38,
418
+ 3, 87, :_reduce_39,
419
+ 1, 88, :_reduce_40,
420
+ 3, 88, :_reduce_41,
421
+ 2, 89, :_reduce_42,
422
+ 3, 89, :_reduce_43,
423
+ 3, 91, :_reduce_44,
424
+ 6, 91, :_reduce_45,
425
+ 7, 91, :_reduce_46,
426
+ 1, 90, :_reduce_47,
427
+ 3, 90, :_reduce_48,
428
+ 3, 78, :_reduce_49,
429
+ 3, 78, :_reduce_50,
430
+ 3, 78, :_reduce_51,
431
+ 3, 78, :_reduce_52,
432
+ 3, 78, :_reduce_53,
433
+ 4, 78, :_reduce_54,
434
+ 2, 78, :_reduce_55,
435
+ 2, 78, :_reduce_56,
436
+ 2, 78, :_reduce_none,
437
+ 3, 78, :_reduce_58,
438
+ 3, 78, :_reduce_59,
439
+ 3, 78, :_reduce_60,
440
+ 3, 78, :_reduce_61,
441
+ 3, 78, :_reduce_62,
442
+ 3, 78, :_reduce_63,
443
+ 3, 78, :_reduce_64,
444
+ 1, 78, :_reduce_none,
445
+ 1, 78, :_reduce_none,
446
+ 1, 78, :_reduce_none,
447
+ 1, 78, :_reduce_none,
448
+ 1, 78, :_reduce_69,
449
+ 1, 78, :_reduce_70,
450
+ 1, 78, :_reduce_71,
451
+ 1, 78, :_reduce_72,
452
+ 1, 78, :_reduce_73,
453
+ 3, 78, :_reduce_74,
454
+ 1, 78, :_reduce_none,
455
+ 3, 93, :_reduce_76,
456
+ 3, 93, :_reduce_77,
457
+ 3, 93, :_reduce_78,
458
+ 3, 93, :_reduce_79,
459
+ 3, 93, :_reduce_80,
460
+ 3, 93, :_reduce_81,
461
+ 6, 92, :_reduce_82,
462
+ 5, 92, :_reduce_83,
463
+ 3, 94, :_reduce_84,
464
+ 5, 94, :_reduce_85,
465
+ 6, 94, :_reduce_86,
466
+ 5, 94, :_reduce_87,
467
+ 1, 95, :_reduce_88,
468
+ 1, 95, :_reduce_89,
469
+ 1, 95, :_reduce_none,
470
+ 1, 95, :_reduce_none,
471
+ 1, 95, :_reduce_92,
472
+ 1, 95, :_reduce_93,
473
+ 7, 84, :_reduce_94,
474
+ 5, 84, :_reduce_95,
475
+ 9, 83, :_reduce_96,
476
+ 5, 85, :_reduce_97,
477
+ 6, 85, :_reduce_98,
478
+ 1, 75, :_reduce_99 ]
479
+
480
+ racc_reduce_n = 100
481
+
482
+ racc_shift_n = 198
483
+
484
+ racc_token_table = {
485
+ false => 0,
486
+ :error => 1,
487
+ :UMINUS => 2,
488
+ :UPLUS => 3,
489
+ :LNOT => 4,
490
+ :BNOT => 5,
491
+ "=" => 6,
492
+ "*" => 7,
493
+ "/" => 8,
494
+ "%" => 9,
495
+ "+" => 10,
496
+ "-" => 11,
497
+ ">>" => 12,
498
+ "<<" => 13,
499
+ ">>>" => 14,
500
+ ">" => 15,
501
+ "<" => 16,
502
+ ">=" => 17,
503
+ "<=" => 18,
504
+ "==" => 19,
505
+ "===" => 20,
506
+ "!=" => 21,
507
+ "!==" => 22,
508
+ "&" => 23,
509
+ "^" => 24,
510
+ "|" => 25,
511
+ "&&" => 26,
512
+ "||" => 27,
513
+ "?" => 28,
514
+ ":" => 29,
515
+ "+=" => 30,
516
+ "-=" => 31,
517
+ "<<=" => 32,
518
+ ">>=" => 33,
519
+ "&=" => 34,
520
+ "^=" => 35,
521
+ "|=" => 36,
522
+ "," => 37,
523
+ :NUMBER => 38,
524
+ :IDENT => 39,
525
+ :O_IDENT => 40,
526
+ :KW_FUNCTION => 41,
527
+ :KW_FOR => 42,
528
+ :KW_IF => 43,
529
+ :KW_ELSE => 44,
530
+ :KW_WHILE => 45,
531
+ :KW_DO => 46,
532
+ :KW_VAR => 47,
533
+ :KW_TRUE => 48,
534
+ :KW_FALSE => 49,
535
+ :KW_NULL => 50,
536
+ :STRING => 51,
537
+ :KW_RETURN => 52,
538
+ :KW_NEW => 53,
539
+ :KW_THIS => 54,
540
+ :KW_CORE => 55,
541
+ :SBRACKET_OPEN => 56,
542
+ :SBRACKET_CLOSE => 57,
543
+ :CBRACKET_OPEN => 58,
544
+ :CBRACKET_CLOSE => 59,
545
+ "(" => 60,
546
+ ")" => 61,
547
+ ";" => 62,
548
+ "++" => 63,
549
+ "--" => 64,
550
+ "!" => 65,
551
+ "." => 66 }
552
+
553
+ racc_nt_base = 67
554
+
555
+ racc_use_result_var = true
556
+
557
+ Racc_arg = [
558
+ racc_action_table,
559
+ racc_action_check,
560
+ racc_action_default,
561
+ racc_action_pointer,
562
+ racc_goto_table,
563
+ racc_goto_check,
564
+ racc_goto_default,
565
+ racc_goto_pointer,
566
+ racc_nt_base,
567
+ racc_reduce_table,
568
+ racc_token_table,
569
+ racc_shift_n,
570
+ racc_reduce_n,
571
+ racc_use_result_var ]
572
+
573
+ Racc_token_to_s_table = [
574
+ "$end",
575
+ "error",
576
+ "UMINUS",
577
+ "UPLUS",
578
+ "LNOT",
579
+ "BNOT",
580
+ "\"=\"",
581
+ "\"*\"",
582
+ "\"/\"",
583
+ "\"%\"",
584
+ "\"+\"",
585
+ "\"-\"",
586
+ "\">>\"",
587
+ "\"<<\"",
588
+ "\">>>\"",
589
+ "\">\"",
590
+ "\"<\"",
591
+ "\">=\"",
592
+ "\"<=\"",
593
+ "\"==\"",
594
+ "\"===\"",
595
+ "\"!=\"",
596
+ "\"!==\"",
597
+ "\"&\"",
598
+ "\"^\"",
599
+ "\"|\"",
600
+ "\"&&\"",
601
+ "\"||\"",
602
+ "\"?\"",
603
+ "\":\"",
604
+ "\"+=\"",
605
+ "\"-=\"",
606
+ "\"<<=\"",
607
+ "\">>=\"",
608
+ "\"&=\"",
609
+ "\"^=\"",
610
+ "\"|=\"",
611
+ "\",\"",
612
+ "NUMBER",
613
+ "IDENT",
614
+ "O_IDENT",
615
+ "KW_FUNCTION",
616
+ "KW_FOR",
617
+ "KW_IF",
618
+ "KW_ELSE",
619
+ "KW_WHILE",
620
+ "KW_DO",
621
+ "KW_VAR",
622
+ "KW_TRUE",
623
+ "KW_FALSE",
624
+ "KW_NULL",
625
+ "STRING",
626
+ "KW_RETURN",
627
+ "KW_NEW",
628
+ "KW_THIS",
629
+ "KW_CORE",
630
+ "SBRACKET_OPEN",
631
+ "SBRACKET_CLOSE",
632
+ "CBRACKET_OPEN",
633
+ "CBRACKET_CLOSE",
634
+ "\"(\"",
635
+ "\")\"",
636
+ "\";\"",
637
+ "\"++\"",
638
+ "\"--\"",
639
+ "\"!\"",
640
+ "\".\"",
641
+ "$start",
642
+ "target",
643
+ "root_seq",
644
+ "fun",
645
+ "args",
646
+ "root_stmt",
647
+ "stmt",
648
+ "fun_def",
649
+ "ident",
650
+ "block",
651
+ "arg_def",
652
+ "exp",
653
+ "declaration",
654
+ "ass",
655
+ "ass_list",
656
+ "seq",
657
+ "for",
658
+ "if",
659
+ "while",
660
+ "return",
661
+ "array",
662
+ "array_content",
663
+ "object",
664
+ "object_content",
665
+ "object_element",
666
+ "rvm_core",
667
+ "comp",
668
+ "objcall",
669
+ "const" ]
670
+
671
+ Racc_debug_parser = false
672
+
673
+ ##### State transition tables end #####
674
+
675
+ # reduce 0 omitted
676
+
677
+ # reduce 1 omitted
678
+
679
+ module_eval(<<'.,.,', 'ecma.y', 44)
680
+ def _reduce_2(val, _values, result)
681
+ result = RVM::Interpreter::Sequence.new([])
682
+ result
683
+ end
684
+ .,.,
685
+
686
+ module_eval(<<'.,.,', 'ecma.y', 46)
687
+ def _reduce_3(val, _values, result)
688
+ result = RVM::Interpreter::FunctionCall.new(val[0][0], [], val[0][1])
689
+ result
690
+ end
691
+ .,.,
692
+
693
+ module_eval(<<'.,.,', 'ecma.y', 47)
694
+ def _reduce_4(val, _values, result)
695
+ result = RVM::Interpreter::FunctionCall.new(val[0][0], val[2], val[0][1])
696
+ result
697
+ end
698
+ .,.,
699
+
700
+ # reduce 5 omitted
701
+
702
+ # reduce 6 omitted
703
+
704
+ module_eval(<<'.,.,', 'ecma.y', 52)
705
+ def _reduce_7(val, _values, result)
706
+ result = RVM::Interpreter::Sequence.new([result])
707
+ result
708
+ end
709
+ .,.,
710
+
711
+ module_eval(<<'.,.,', 'ecma.y', 53)
712
+ def _reduce_8(val, _values, result)
713
+ result << val[2]
714
+ result
715
+ end
716
+ .,.,
717
+
718
+ # reduce 9 omitted
719
+
720
+ module_eval(<<'.,.,', 'ecma.y', 57)
721
+ def _reduce_10(val, _values, result)
722
+ #TODO: THIS
723
+ b = val[4]
724
+ ident = val[1]
725
+ if not b.content.is_a?(RVM::Interpreter::Sequence)
726
+ c = b.content
727
+ b.content = RVM::Interpreter::Sequence.new()
728
+ b.content << c
729
+ end
730
+ b.content << RVM::Interpreter::Return.new(RVM::Interpreter.const(:boolean, false))
731
+
732
+ result = RVM::Interpreter::FunctionDefinition.new(ident, RVM::Classes::Block.new(b))
733
+
734
+ result
735
+ end
736
+ .,.,
737
+
738
+ module_eval(<<'.,.,', 'ecma.y', 70)
739
+ def _reduce_11(val, _values, result)
740
+ block = val[5]
741
+ i = 0
742
+ val[3].each do |a|
743
+ block.content.unshift RVM::Interpreter::Declaration.new(a, RVM::Interpreter::Parameter.new(RVM::Interpreter.const(:number,i)))
744
+ i +=1
745
+ end
746
+ result = RVM::Interpreter::FunctionDefinition.new(val[1], RVM::Classes::Block.new(block))
747
+
748
+ result
749
+ end
750
+ .,.,
751
+
752
+ module_eval(<<'.,.,', 'ecma.y', 79)
753
+ def _reduce_12(val, _values, result)
754
+ result = [result]
755
+ result
756
+ end
757
+ .,.,
758
+
759
+ module_eval(<<'.,.,', 'ecma.y', 80)
760
+ def _reduce_13(val, _values, result)
761
+ result << val[2]
762
+ result
763
+ end
764
+ .,.,
765
+
766
+ module_eval(<<'.,.,', 'ecma.y', 82)
767
+ def _reduce_14(val, _values, result)
768
+ result = [result]
769
+ result
770
+ end
771
+ .,.,
772
+
773
+ module_eval(<<'.,.,', 'ecma.y', 83)
774
+ def _reduce_15(val, _values, result)
775
+ result << val[2]
776
+ result
777
+ end
778
+ .,.,
779
+
780
+ module_eval(<<'.,.,', 'ecma.y', 85)
781
+ def _reduce_16(val, _values, result)
782
+ result = RVM::Interpreter::Declaration.new(result, val[2], val[1][1])
783
+ result
784
+ end
785
+ .,.,
786
+
787
+ module_eval(<<'.,.,', 'ecma.y', 87)
788
+ def _reduce_17(val, _values, result)
789
+ result = RVM::Interpreter::Sequence.new([result])
790
+ result
791
+ end
792
+ .,.,
793
+
794
+ module_eval(<<'.,.,', 'ecma.y', 88)
795
+ def _reduce_18(val, _values, result)
796
+ result << val[2]
797
+ result
798
+ end
799
+ .,.,
800
+
801
+ # reduce 19 omitted
802
+
803
+ module_eval(<<'.,.,', 'ecma.y', 90)
804
+ def _reduce_20(val, _values, result)
805
+ result = RVM::Interpreter::Assignment.new(result, RVM::Interpreter::CoreCall.new(:add, [RVM::Interpreter::Variable.new(result, val[1][1]), RVM::Interpreter.const(:number, 1)], val[1][1]), val[1][1])
806
+ result
807
+ end
808
+ .,.,
809
+
810
+ module_eval(<<'.,.,', 'ecma.y', 91)
811
+ def _reduce_21(val, _values, result)
812
+ result = RVM::Interpreter::Assignment.new(result, RVM::Interpreter::CoreCall.new(:sub, [RVM::Interpreter::Variable.new(result, val[1][1]), RVM::Interpreter.const(:number, 1)], val[1][1]), val[1][1])
813
+ result
814
+ end
815
+ .,.,
816
+
817
+ module_eval(<<'.,.,', 'ecma.y', 92)
818
+ def _reduce_22(val, _values, result)
819
+ result = RVM::Interpreter::Assignment.new(result, RVM::Interpreter::CoreCall.new(:add, [RVM::Interpreter::Variable.new(result, val[1][1]), val[2]], val[1][1]), val[1][1])
820
+ result
821
+ end
822
+ .,.,
823
+
824
+ module_eval(<<'.,.,', 'ecma.y', 93)
825
+ def _reduce_23(val, _values, result)
826
+ result = RVM::Interpreter::Assignment.new(result, RVM::Interpreter::CoreCall.new(:sub, [RVM::Interpreter::Variable.new(result, val[1][1]), val[2]], val[1][1]), val[1][1])
827
+ result
828
+ end
829
+ .,.,
830
+
831
+ module_eval(<<'.,.,', 'ecma.y', 94)
832
+ def _reduce_24(val, _values, result)
833
+ result = RVM::Interpreter::Assignment.new(result, val[2], val[1][1])
834
+ result
835
+ end
836
+ .,.,
837
+
838
+ module_eval(<<'.,.,', 'ecma.y', 95)
839
+ def _reduce_25(val, _values, result)
840
+ result = val[1]
841
+ result
842
+ end
843
+ .,.,
844
+
845
+ module_eval(<<'.,.,', 'ecma.y', 96)
846
+ def _reduce_26(val, _values, result)
847
+ result = RVM::Interpreter::CoreCall.new(:set_at, [result, val[2], val[5]], val[1][1])
848
+ result
849
+ end
850
+ .,.,
851
+
852
+ module_eval(<<'.,.,', 'ecma.y', 98)
853
+ def _reduce_27(val, _values, result)
854
+ result = RVM::Interpreter::Sequence.new([result],result.pos)
855
+ result
856
+ end
857
+ .,.,
858
+
859
+ module_eval(<<'.,.,', 'ecma.y', 99)
860
+ def _reduce_28(val, _values, result)
861
+ result << val[2]
862
+ result
863
+ end
864
+ .,.,
865
+
866
+ # reduce 29 omitted
867
+
868
+ module_eval(<<'.,.,', 'ecma.y', 102)
869
+ def _reduce_30(val, _values, result)
870
+ result = RVM::Interpreter::Block.new(val[1], val[0][1])
871
+ result
872
+ end
873
+ .,.,
874
+
875
+ # reduce 31 omitted
876
+
877
+ # reduce 32 omitted
878
+
879
+ # reduce 33 omitted
880
+
881
+ # reduce 34 omitted
882
+
883
+ # reduce 35 omitted
884
+
885
+ # reduce 36 omitted
886
+
887
+ module_eval(<<'.,.,', 'ecma.y', 111)
888
+ def _reduce_37(val, _values, result)
889
+ result = RVM::Interpreter::Return.new(val[1])
890
+ result
891
+ end
892
+ .,.,
893
+
894
+ module_eval(<<'.,.,', 'ecma.y', 113)
895
+ def _reduce_38(val, _values, result)
896
+ result = RVM::Interpreter.const(:list, [])
897
+ result
898
+ end
899
+ .,.,
900
+
901
+ module_eval(<<'.,.,', 'ecma.y', 115)
902
+ def _reduce_39(val, _values, result)
903
+ seq = RVM::Interpreter::Sequence.new()
904
+ seq << RVM::Interpreter::Assignment.new(RVM::Interpreter.const(:string,"!array-#{val[1].hash}"), RVM::Interpreter.const(:list, Array.new(val[1].size)))
905
+ val[1].size.times do |i|
906
+ seq << RVM::Interpreter::CoreCall.new(:set_at, [RVM::Interpreter::Variable.new(RVM::Interpreter.const(:string,"!array-#{val[1].hash}",['internal', 'array creation'])), RVM::Interpreter.const(:number,val[1].size - i - 1), val[1][i]])
907
+ end
908
+ seq << RVM::Interpreter::Variable.new(RVM::Interpreter.const(:string,"!array-#{val[1].hash}"), ['internal', 'array creation'])
909
+ result = RVM::Interpreter::Block.new(seq)
910
+
911
+ result
912
+ end
913
+ .,.,
914
+
915
+ module_eval(<<'.,.,', 'ecma.y', 124)
916
+ def _reduce_40(val, _values, result)
917
+ result = [result]
918
+ result
919
+ end
920
+ .,.,
921
+
922
+ module_eval(<<'.,.,', 'ecma.y', 125)
923
+ def _reduce_41(val, _values, result)
924
+ result.unshift val[2]
925
+ result
926
+ end
927
+ .,.,
928
+
929
+ module_eval(<<'.,.,', 'ecma.y', 127)
930
+ def _reduce_42(val, _values, result)
931
+ result = RVM::Interpreter.const(:object, nil)
932
+ result
933
+ end
934
+ .,.,
935
+
936
+ module_eval(<<'.,.,', 'ecma.y', 129)
937
+ def _reduce_43(val, _values, result)
938
+ object = RVM::Interpreter::Constant.new(RVM::Classes[:object].new(RVM::Classes[:class].new))
939
+ seq = RVM::Interpreter::Sequence.new()
940
+ seq << RVM::Interpreter::ObjectContext.new(object, val[1])
941
+ seq << object
942
+ result = seq
943
+
944
+ result
945
+ end
946
+ .,.,
947
+
948
+ module_eval(<<'.,.,', 'ecma.y', 136)
949
+ def _reduce_44(val, _values, result)
950
+ result = RVM::Interpreter::Declaration.new(val[0], val[2], val[1][1])
951
+ result
952
+ end
953
+ .,.,
954
+
955
+ module_eval(<<'.,.,', 'ecma.y', 138)
956
+ def _reduce_45(val, _values, result)
957
+ #TODO: THIS
958
+ b = val[5]
959
+ ident = val[0]
960
+ if not b.content.is_a?(RVM::Interpreter::Sequence)
961
+ c = b.content
962
+ b.content = RVM::Interpreter::Sequence.new()
963
+ b.content << c
964
+ end
965
+ b.content << RVM::Interpreter::Return.new(RVM::Interpreter.const(:boolean, false))
966
+
967
+ result = RVM::Interpreter::FunctionDefinition.new(ident, RVM::Classes::Block.new(b))
968
+
969
+ result
970
+ end
971
+ .,.,
972
+
973
+ module_eval(<<'.,.,', 'ecma.y', 151)
974
+ def _reduce_46(val, _values, result)
975
+ block = val[6]
976
+ i = 0
977
+ val[4].each do |a|
978
+ block.content.unshift RVM::Interpreter::Declaration.new(a, RVM::Interpreter::Parameter.new(RVM::Interpreter.const(:number,i)))
979
+ i +=1
980
+ end
981
+ result = RVM::Interpreter::FunctionDefinition.new(val[0], RVM::Classes::Block.new(block))
982
+
983
+ result
984
+ end
985
+ .,.,
986
+
987
+ module_eval(<<'.,.,', 'ecma.y', 160)
988
+ def _reduce_47(val, _values, result)
989
+ result = RVM::Interpreter::Sequence.new([result])
990
+ result
991
+ end
992
+ .,.,
993
+
994
+ module_eval(<<'.,.,', 'ecma.y', 161)
995
+ def _reduce_48(val, _values, result)
996
+ result.unshift val[2]
997
+ result
998
+ end
999
+ .,.,
1000
+
1001
+ module_eval(<<'.,.,', 'ecma.y', 163)
1002
+ def _reduce_49(val, _values, result)
1003
+ result = RVM::Interpreter::CoreCall.new(:add, [result, val[2]], val[1][1])
1004
+ result
1005
+ end
1006
+ .,.,
1007
+
1008
+ module_eval(<<'.,.,', 'ecma.y', 164)
1009
+ def _reduce_50(val, _values, result)
1010
+ result = RVM::Interpreter::CoreCall.new(:sub, [result, val[2]], val[1][1])
1011
+ result
1012
+ end
1013
+ .,.,
1014
+
1015
+ module_eval(<<'.,.,', 'ecma.y', 165)
1016
+ def _reduce_51(val, _values, result)
1017
+ result = RVM::Interpreter::CoreCall.new(:mul, [result, val[2]], val[1][1])
1018
+ result
1019
+ end
1020
+ .,.,
1021
+
1022
+ module_eval(<<'.,.,', 'ecma.y', 166)
1023
+ def _reduce_52(val, _values, result)
1024
+ result = RVM::Interpreter::CoreCall.new(:div, [result, val[2]], val[1][1])
1025
+ result
1026
+ end
1027
+ .,.,
1028
+
1029
+ module_eval(<<'.,.,', 'ecma.y', 167)
1030
+ def _reduce_53(val, _values, result)
1031
+ result = RVM::Interpreter::CoreCall.new(:mod, [result, val[2]], val[1][1])
1032
+ result
1033
+ end
1034
+ .,.,
1035
+
1036
+ module_eval(<<'.,.,', 'ecma.y', 168)
1037
+ def _reduce_54(val, _values, result)
1038
+ result = RVM::Interpreter::CoreCall.new(:at, [result, val[2]], val[1][1])
1039
+ result
1040
+ end
1041
+ .,.,
1042
+
1043
+ module_eval(<<'.,.,', 'ecma.y', 169)
1044
+ def _reduce_55(val, _values, result)
1045
+ result = RVM::Interpreter::CoreCall.new(:not, [val[1]], val[0][1])
1046
+ result
1047
+ end
1048
+ .,.,
1049
+
1050
+ module_eval(<<'.,.,', 'ecma.y', 170)
1051
+ def _reduce_56(val, _values, result)
1052
+ result = RVM::Interpreter::CoreCall.new(:neg, [val[1]], val[0][1])
1053
+ result
1054
+ end
1055
+ .,.,
1056
+
1057
+ # reduce 57 omitted
1058
+
1059
+ module_eval(<<'.,.,', 'ecma.y', 172)
1060
+ def _reduce_58(val, _values, result)
1061
+ result = RVM::Interpreter::CoreCall.new(:bitwise_and, [result, val[2]])
1062
+ result
1063
+ end
1064
+ .,.,
1065
+
1066
+ module_eval(<<'.,.,', 'ecma.y', 173)
1067
+ def _reduce_59(val, _values, result)
1068
+ result = RVM::Interpreter::CoreCall.new(:bitwise_xor, [result, val[2]])
1069
+ result
1070
+ end
1071
+ .,.,
1072
+
1073
+ module_eval(<<'.,.,', 'ecma.y', 174)
1074
+ def _reduce_60(val, _values, result)
1075
+ result = RVM::Interpreter::CoreCall.new(:bitwise_or, [result, val[2]])
1076
+ result
1077
+ end
1078
+ .,.,
1079
+
1080
+ module_eval(<<'.,.,', 'ecma.y', 175)
1081
+ def _reduce_61(val, _values, result)
1082
+ result = RVM::Interpreter::CoreCall.new(:and, [result, val[2]])
1083
+ result
1084
+ end
1085
+ .,.,
1086
+
1087
+ module_eval(<<'.,.,', 'ecma.y', 176)
1088
+ def _reduce_62(val, _values, result)
1089
+ result = RVM::Interpreter::CoreCall.new(:or, [result, val[2]])
1090
+ result
1091
+ end
1092
+ .,.,
1093
+
1094
+ module_eval(<<'.,.,', 'ecma.y', 177)
1095
+ def _reduce_63(val, _values, result)
1096
+ result = RVM::Interpreter::CoreCall.new(:shr, [result, val[2]])
1097
+ result
1098
+ end
1099
+ .,.,
1100
+
1101
+ module_eval(<<'.,.,', 'ecma.y', 178)
1102
+ def _reduce_64(val, _values, result)
1103
+ result = RVM::Interpreter::CoreCall.new(:shl, [result, val[2]])
1104
+ result
1105
+ end
1106
+ .,.,
1107
+
1108
+ # reduce 65 omitted
1109
+
1110
+ # reduce 66 omitted
1111
+
1112
+ # reduce 67 omitted
1113
+
1114
+ # reduce 68 omitted
1115
+
1116
+ module_eval(<<'.,.,', 'ecma.y', 183)
1117
+ def _reduce_69(val, _values, result)
1118
+ result = RVM::Interpreter.const(:boolean, true)
1119
+ result
1120
+ end
1121
+ .,.,
1122
+
1123
+ module_eval(<<'.,.,', 'ecma.y', 184)
1124
+ def _reduce_70(val, _values, result)
1125
+ result = RVM::Interpreter.const(:boolean, false)
1126
+ result
1127
+ end
1128
+ .,.,
1129
+
1130
+ module_eval(<<'.,.,', 'ecma.y', 185)
1131
+ def _reduce_71(val, _values, result)
1132
+ result = RVM::Interpreter.const(:null, nil)
1133
+ result
1134
+ end
1135
+ .,.,
1136
+
1137
+ module_eval(<<'.,.,', 'ecma.y', 186)
1138
+ def _reduce_72(val, _values, result)
1139
+ result = RVM::Interpreter::Variable.new(RVM::Interpreter.const(:string,result[0], result[1]), result[1])
1140
+ result
1141
+ end
1142
+ .,.,
1143
+
1144
+ module_eval(<<'.,.,', 'ecma.y', 187)
1145
+ def _reduce_73(val, _values, result)
1146
+ result = RVM::Interpreter::Variable.new(:self, val[0][1])
1147
+ result
1148
+ end
1149
+ .,.,
1150
+
1151
+ module_eval(<<'.,.,', 'ecma.y', 188)
1152
+ def _reduce_74(val, _values, result)
1153
+ result = val[1]
1154
+ result
1155
+ end
1156
+ .,.,
1157
+
1158
+ # reduce 75 omitted
1159
+
1160
+ module_eval(<<'.,.,', 'ecma.y', 191)
1161
+ def _reduce_76(val, _values, result)
1162
+ result = RVM::Interpreter::CoreCall.new(:lt, [result, val[2]], val[1][1])
1163
+ result
1164
+ end
1165
+ .,.,
1166
+
1167
+ module_eval(<<'.,.,', 'ecma.y', 192)
1168
+ def _reduce_77(val, _values, result)
1169
+ result = RVM::Interpreter::CoreCall.new(:gt, [result, val[2]], val[1][1])
1170
+ result
1171
+ end
1172
+ .,.,
1173
+
1174
+ module_eval(<<'.,.,', 'ecma.y', 193)
1175
+ def _reduce_78(val, _values, result)
1176
+ result = RVM::Interpreter::CoreCall.new(:eq, [result, val[2]], val[1][1])
1177
+ result
1178
+ end
1179
+ .,.,
1180
+
1181
+ module_eval(<<'.,.,', 'ecma.y', 194)
1182
+ def _reduce_79(val, _values, result)
1183
+ result = RVM::Interpreter::CoreCall.new(:neq, [result, val[2]], val[1][1])
1184
+ result
1185
+ end
1186
+ .,.,
1187
+
1188
+ module_eval(<<'.,.,', 'ecma.y', 195)
1189
+ def _reduce_80(val, _values, result)
1190
+ result = RVM::Interpreter::CoreCall.new(:gte, [result, val[2]], val[1][1])
1191
+ result
1192
+ end
1193
+ .,.,
1194
+
1195
+ module_eval(<<'.,.,', 'ecma.y', 196)
1196
+ def _reduce_81(val, _values, result)
1197
+ result = RVM::Interpreter::CoreCall.new(:lte, [result, val[2]], val[1][1])
1198
+ result
1199
+ end
1200
+ .,.,
1201
+
1202
+ module_eval(<<'.,.,', 'ecma.y', 198)
1203
+ def _reduce_82(val, _values, result)
1204
+ result = RVM::Interpreter::CoreCall.new(val[2][0].to_sym, val[4], val[1][1])
1205
+ result
1206
+ end
1207
+ .,.,
1208
+
1209
+ module_eval(<<'.,.,', 'ecma.y', 199)
1210
+ def _reduce_83(val, _values, result)
1211
+ result = RVM::Interpreter::CoreCall.new(val[2][0].to_sym, [], val[1][1])
1212
+ result
1213
+ end
1214
+ .,.,
1215
+
1216
+ module_eval(<<'.,.,', 'ecma.y', 201)
1217
+ def _reduce_84(val, _values, result)
1218
+ result = RVM::Interpreter::ObjectContext.new(val[0], RVM::Interpreter::Variable.new(val[2], val[2].pos))
1219
+ result
1220
+ end
1221
+ .,.,
1222
+
1223
+ module_eval(<<'.,.,', 'ecma.y', 202)
1224
+ def _reduce_85(val, _values, result)
1225
+ result = RVM::Interpreter::ObjectContext.new(val[0], RVM::Interpreter::Assignment.new(val[2], val[4]))
1226
+ result
1227
+ end
1228
+ .,.,
1229
+
1230
+ module_eval(<<'.,.,', 'ecma.y', 203)
1231
+ def _reduce_86(val, _values, result)
1232
+ result = RVM::Interpreter::ObjectContext.new(val[0], RVM::Interpreter::FunctionCall.new(val[2][0], val[4], val[2][1]))
1233
+ result
1234
+ end
1235
+ .,.,
1236
+
1237
+ module_eval(<<'.,.,', 'ecma.y', 204)
1238
+ def _reduce_87(val, _values, result)
1239
+ result = RVM::Interpreter::ObjectContext.new(val[0], RVM::Interpreter::FunctionCall.new(val[2][0], [], val[2][1]))
1240
+ result
1241
+ end
1242
+ .,.,
1243
+
1244
+ module_eval(<<'.,.,', 'ecma.y', 206)
1245
+ def _reduce_88(val, _values, result)
1246
+ result = RVM::Interpreter.const(:number, val[0][0], val[0][1])
1247
+ result
1248
+ end
1249
+ .,.,
1250
+
1251
+ module_eval(<<'.,.,', 'ecma.y', 207)
1252
+ def _reduce_89(val, _values, result)
1253
+ result = RVM::Interpreter.const(:string, val[0][0], val[0][1])
1254
+ result
1255
+ end
1256
+ .,.,
1257
+
1258
+ # reduce 90 omitted
1259
+
1260
+ # reduce 91 omitted
1261
+
1262
+ module_eval(<<'.,.,', 'ecma.y', 210)
1263
+ def _reduce_92(val, _values, result)
1264
+ result = RVM::Interpreter.const(:boolean, true, val[0][1])
1265
+ result
1266
+ end
1267
+ .,.,
1268
+
1269
+ module_eval(<<'.,.,', 'ecma.y', 211)
1270
+ def _reduce_93(val, _values, result)
1271
+ result = RVM::Interpreter.const(:boolean, false, val[0][1])
1272
+ result
1273
+ end
1274
+ .,.,
1275
+
1276
+ module_eval(<<'.,.,', 'ecma.y', 213)
1277
+ def _reduce_94(val, _values, result)
1278
+ result = RVM::Interpreter::Condition.new(val[2], val[4], val[6], val[0][1])
1279
+ result
1280
+ end
1281
+ .,.,
1282
+
1283
+ module_eval(<<'.,.,', 'ecma.y', 214)
1284
+ def _reduce_95(val, _values, result)
1285
+ result = RVM::Interpreter::Condition.new(val[2], val[4], nil, val[0][1])
1286
+ result
1287
+ end
1288
+ .,.,
1289
+
1290
+ module_eval(<<'.,.,', 'ecma.y', 217)
1291
+ def _reduce_96(val, _values, result)
1292
+ init = val[2]
1293
+ cond = val[4]
1294
+ event = val[6]
1295
+ command = val[8]
1296
+
1297
+ body = if command.is_a?(RVM::Interpreter::Block)
1298
+ command.content << event
1299
+ else
1300
+ RVM::Interpreter::Sequence.new([command, event])
1301
+ end
1302
+
1303
+ result = RVM::Interpreter::Block.new(
1304
+ RVM::Interpreter::Sequence.new(
1305
+ [init,RVM::Interpreter::Loop.new(cond, body, val[0][1])]
1306
+ ), val[0][1]
1307
+ )
1308
+
1309
+ result
1310
+ end
1311
+ .,.,
1312
+
1313
+ module_eval(<<'.,.,', 'ecma.y', 236)
1314
+ def _reduce_97(val, _values, result)
1315
+ cond = val[2]
1316
+ body = val[4]
1317
+ result = RVM::Interpreter::Block.new(
1318
+ RVM::Interpreter::Loop.new(cond, body, val[0][1]), val[0][1]
1319
+ )
1320
+
1321
+ result
1322
+ end
1323
+ .,.,
1324
+
1325
+ module_eval(<<'.,.,', 'ecma.y', 243)
1326
+ def _reduce_98(val, _values, result)
1327
+ cond = val[4]
1328
+ block = val[1]
1329
+ result = RVM::Interpreter::Block.new(
1330
+ RVM::Interpreter::Sequence.new(
1331
+ [block,RVM::Interpreter::Loop.new(cond, block, val[2][1])]
1332
+ ), val[0][1]
1333
+ )
1334
+
1335
+ result
1336
+ end
1337
+ .,.,
1338
+
1339
+ module_eval(<<'.,.,', 'ecma.y', 252)
1340
+ def _reduce_99(val, _values, result)
1341
+ result = RVM::Interpreter.const(:string, result[0], result[1])
1342
+ result
1343
+ end
1344
+ .,.,
1345
+
1346
+ def _reduce_none(val, _values, result)
1347
+ val[0]
1348
+ end
1349
+
1350
+ end # class Compiler
1351
+ end # module ECMA
1352
+ end # module Languages
1353
+ end # module RVM