csv_plus_plus 0.0.5 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -0
  4. data/lib/csv_plus_plus/cell.rb +24 -8
  5. data/lib/csv_plus_plus/cli.rb +29 -16
  6. data/lib/csv_plus_plus/cli_flag.rb +10 -2
  7. data/lib/csv_plus_plus/code_section.rb +55 -3
  8. data/lib/csv_plus_plus/color.rb +19 -5
  9. data/lib/csv_plus_plus/google_options.rb +6 -2
  10. data/lib/csv_plus_plus/graph.rb +0 -1
  11. data/lib/csv_plus_plus/language/ast_builder.rb +68 -0
  12. data/lib/csv_plus_plus/language/benchmarked_compiler.rb +65 -0
  13. data/lib/csv_plus_plus/language/builtins.rb +46 -0
  14. data/lib/csv_plus_plus/language/cell_value.tab.rb +106 -134
  15. data/lib/csv_plus_plus/language/code_section.tab.rb +163 -192
  16. data/lib/csv_plus_plus/language/compiler.rb +75 -92
  17. data/lib/csv_plus_plus/language/entities/boolean.rb +3 -2
  18. data/lib/csv_plus_plus/language/entities/cell_reference.rb +10 -3
  19. data/lib/csv_plus_plus/language/entities/entity.rb +20 -8
  20. data/lib/csv_plus_plus/language/entities/function.rb +6 -4
  21. data/lib/csv_plus_plus/language/entities/function_call.rb +17 -5
  22. data/lib/csv_plus_plus/language/entities/number.rb +6 -4
  23. data/lib/csv_plus_plus/language/entities/runtime_value.rb +9 -8
  24. data/lib/csv_plus_plus/language/entities/string.rb +6 -4
  25. data/lib/csv_plus_plus/language/references.rb +22 -5
  26. data/lib/csv_plus_plus/language/runtime.rb +80 -22
  27. data/lib/csv_plus_plus/language/scope.rb +34 -39
  28. data/lib/csv_plus_plus/language/syntax_error.rb +10 -5
  29. data/lib/csv_plus_plus/lexer/lexer.rb +27 -13
  30. data/lib/csv_plus_plus/lexer/tokenizer.rb +35 -11
  31. data/lib/csv_plus_plus/modifier.rb +38 -18
  32. data/lib/csv_plus_plus/modifier.tab.rb +2 -2
  33. data/lib/csv_plus_plus/options.rb +20 -2
  34. data/lib/csv_plus_plus/row.rb +15 -4
  35. data/lib/csv_plus_plus/template.rb +26 -6
  36. data/lib/csv_plus_plus/version.rb +1 -1
  37. data/lib/csv_plus_plus/writer/excel.rb +2 -9
  38. data/lib/csv_plus_plus/writer/file_backer_upper.rb +22 -20
  39. data/lib/csv_plus_plus/writer/google_sheet_builder.rb +8 -10
  40. data/lib/csv_plus_plus/writer/google_sheets.rb +4 -10
  41. data/lib/csv_plus_plus/writer/rubyxl_builder.rb +23 -15
  42. data/lib/csv_plus_plus/writer/rubyxl_modifier.rb +15 -8
  43. data/lib/csv_plus_plus.rb +42 -8
  44. metadata +5 -2
@@ -6,15 +6,17 @@
6
6
 
7
7
  require 'racc/parser.rb'
8
8
 
9
- require_relative '../lexer'
10
- require_relative '../code_section'
9
+ require_relative '../lexer'
10
+ require_relative '../code_section'
11
+ require_relative '../language/ast_builder'
11
12
 
12
13
  module CSVPlusPlus
13
14
  module Language
14
15
  class CodeSectionParser < Racc::Parser
15
16
 
16
- module_eval(<<'...end code_section.y/module_eval...', 'code_section.y', 67)
17
+ module_eval(<<'...end code_section.y/module_eval...', 'code_section.y', 71)
17
18
  include ::CSVPlusPlus::Lexer
19
+ include ::CSVPlusPlus::Language::ASTBuilder
18
20
 
19
21
  def initialize
20
22
  super
@@ -33,11 +35,10 @@ module_eval(<<'...end code_section.y/module_eval...', 'code_section.y', 67)
33
35
  'code section'
34
36
  end
35
37
 
36
- def tokenizer(input)
38
+ def tokenizer
37
39
  ::CSVPlusPlus::Lexer::Tokenizer.new(
38
- catchall: /[\(\)\{\}\/\*\+\-,=&]/,
40
+ catchall: /[\{\}\(\),]/, # TODO: do I even need this (oh I think brackets are for arrays
39
41
  ignore: /\s+|\#[^\n]+\n/,
40
- input:,
41
42
  stop_fn: lambda do |scanner|
42
43
  return false unless scanner.scan(/#{::CSVPlusPlus::Lexer::END_OF_CODE_SECTION}/)
43
44
 
@@ -46,15 +47,16 @@ module_eval(<<'...end code_section.y/module_eval...', 'code_section.y', 67)
46
47
  true
47
48
  end,
48
49
  tokens: [
49
- [/\n/, :EOL],
50
+ [/\n/, :EOL], # XXX do I need this?
50
51
  [/:=/, :ASSIGN],
51
- [/\bdef\b/, :FN_DEF],
52
- [/\bTRUE\b/i, :TRUE],
53
- [/\bFALSE\b/i, :FALSE],
54
- [/"(?:[^"\\]|\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4}))*"/, :STRING],
55
- [/-?[\d.]+/, :NUMBER],
56
- [/\$\$/, :VAR_REF],
57
- [/[!:\w_]+/, :ID],
52
+ [/def/, :FN_DEF],
53
+ TOKEN_LIBRARY[:TRUE],
54
+ TOKEN_LIBRARY[:FALSE],
55
+ TOKEN_LIBRARY[:NUMBER],
56
+ TOKEN_LIBRARY[:STRING],
57
+ TOKEN_LIBRARY[:INFIX_OP],
58
+ TOKEN_LIBRARY[:VAR_REF],
59
+ TOKEN_LIBRARY[:ID]
58
60
  ],
59
61
  )
60
62
  end
@@ -65,12 +67,8 @@ module_eval(<<'...end code_section.y/module_eval...', 'code_section.y', 67)
65
67
 
66
68
  private
67
69
 
68
- def e(type, *entity_args)
69
- ::CSVPlusPlus::Language::TYPES[type].new(*entity_args)
70
- end
71
-
72
70
  def def_function(id, arguments, body)
73
- fn_def = e(:function, id, arguments, body)
71
+ fn_def = function(id, arguments, body)
74
72
  @code_section.def_function(fn_def.id, fn_def)
75
73
  end
76
74
 
@@ -81,112 +79,91 @@ module_eval(<<'...end code_section.y/module_eval...', 'code_section.y', 67)
81
79
  ##### State transition tables begin ###
82
80
 
83
81
  racc_action_table = [
84
- 45, 27, 3, 37, 51, 7, 38, 52, 28, 9,
85
- 19, 8, 29, 30, 31, 32, 33, 24, 25, 22,
86
- 21, 23, 20, 19, 29, 30, 31, 32, 33, 19,
87
- 24, 25, 22, 21, 23, 20, 24, 25, 22, 21,
88
- 23, 20, 19, 29, 30, 31, 32, 33, 19, 24,
89
- 25, 22, 21, 23, 20, 24, 25, 22, 21, 23,
90
- 20, 19, 29, 30, 31, 32, 33, 19, 24, 25,
91
- 22, 21, 23, 20, 24, 25, 22, 21, 23, 20,
92
- 19, 29, 30, 31, 32, 33, 12, 24, 25, 22,
93
- 21, 23, 20, 19, 48, 13, 14, 15, 35, 19,
94
- 24, 25, 22, 21, 23, 20, 24, 25, 22, 21,
95
- 23, 20, 19, 29, 30, 31, 32, 33, 36, 24,
96
- 25, 22, 21, 23, 20, 10, 50, nil, 7, 29,
97
- 30, 31, 32, 33, 8, 29, 30, 31, 32, 33,
98
- 29, 30, 31, 32, 33, 29, 30, 31, 32, 33,
99
- 29, 30, 31, 32, 33 ]
82
+ 20, 38, 35, 9, 12, 13, 14, 20, 16, 31,
83
+ 33, 34, 31, 42, 20, 31, 29, 36, 25, 26,
84
+ 31, 23, 22, 24, 21, 25, 26, 20, 23, 22,
85
+ 24, 21, 25, 26, 30, 23, 22, 24, 21, 20,
86
+ 41, 31, 31, nil, 43, 25, 26, 20, 23, 22,
87
+ 24, 21, 3, 10, nil, 7, 7, 25, 26, 44,
88
+ 23, 22, 24, 21, nil, 25, 26, nil, 23, 22,
89
+ 24, 21, 8, 8 ]
100
90
 
101
91
  racc_action_check = [
102
- 34, 15, 0, 26, 47, 0, 26, 47, 15, 1,
103
- 13, 0, 34, 34, 34, 34, 34, 13, 13, 13,
104
- 13, 13, 13, 19, 16, 16, 16, 16, 16, 27,
105
- 19, 19, 19, 19, 19, 19, 27, 27, 27, 27,
106
- 27, 27, 29, 39, 39, 39, 39, 39, 30, 29,
107
- 29, 29, 29, 29, 29, 30, 30, 30, 30, 30,
108
- 30, 31, 40, 40, 40, 40, 40, 32, 31, 31,
109
- 31, 31, 31, 31, 32, 32, 32, 32, 32, 32,
110
- 33, 41, 41, 41, 41, 41, 7, 33, 33, 33,
111
- 33, 33, 33, 36, 36, 8, 9, 12, 20, 37,
112
- 36, 36, 36, 36, 36, 36, 37, 37, 37, 37,
113
- 37, 37, 52, 42, 42, 42, 42, 42, 25, 52,
114
- 52, 52, 52, 52, 52, 2, 38, nil, 2, 43,
115
- 43, 43, 43, 43, 2, 44, 44, 44, 44, 44,
116
- 46, 46, 46, 46, 46, 49, 49, 49, 49, 49,
117
- 53, 53, 53, 53, 53 ]
92
+ 13, 32, 28, 1, 7, 8, 9, 15, 12, 17,
93
+ 21, 26, 27, 36, 20, 37, 16, 28, 13, 13,
94
+ 32, 13, 13, 13, 13, 15, 15, 31, 15, 15,
95
+ 15, 15, 20, 20, 16, 20, 20, 20, 20, 34,
96
+ 34, 39, 45, nil, 40, 31, 31, 44, 31, 31,
97
+ 31, 31, 0, 2, nil, 0, 2, 34, 34, 40,
98
+ 34, 34, 34, 34, nil, 44, 44, nil, 44, 44,
99
+ 44, 44, 0, 2 ]
118
100
 
119
101
  racc_action_pointer = [
120
- 0, 9, 123, nil, nil, nil, nil, 75, 89, 96,
121
- nil, nil, 94, 7, nil, -3, 8, nil, nil, 20,
122
- 87, nil, nil, nil, nil, 115, -1, 26, nil, 39,
123
- 45, 58, 64, 77, -4, nil, 90, 96, 115, 27,
124
- 46, 65, 97, 113, 119, nil, 124, 0, nil, 129,
125
- nil, nil, 109, 134 ]
102
+ 50, 3, 51, nil, nil, nil, nil, -18, -1, 6,
103
+ nil, nil, 5, -3, nil, 4, 12, -14, nil, nil,
104
+ 11, -12, nil, nil, nil, nil, 8, -11, -2, nil,
105
+ nil, 24, -3, nil, 36, nil, -9, -8, nil, 18,
106
+ 40, nil, nil, nil, 44, 19 ]
126
107
 
127
108
  racc_action_default = [
128
- -30, -30, -30, -2, -4, -5, -6, -30, -30, -30,
129
- -1, -3, -30, -30, 54, -30, -11, -12, -13, -30,
130
- -30, -16, -17, -18, -19, -20, -30, -30, -10, -30,
131
- -30, -30, -30, -30, -30, -15, -30, -30, -30, -8,
132
- -21, -22, -23, -24, -25, -14, -29, -30, -27, -7,
133
- -9, -26, -30, -28 ]
109
+ -27, -27, -27, -2, -4, -5, -6, -27, -27, -27,
110
+ -1, -3, -27, -27, 46, -27, -27, -12, -13, -14,
111
+ -27, -27, -17, -18, -19, -20, -21, -7, -27, -9,
112
+ -11, -27, -27, -16, -27, -8, -27, -22, -15, -26,
113
+ -27, -24, -10, -23, -27, -25 ]
134
114
 
135
115
  racc_goto_table = [
136
- 16, 4, 1, 11, 2, 26, 34, 47, nil, nil,
137
- nil, nil, nil, nil, 39, nil, 40, 41, 42, 43,
138
- 44, nil, nil, 46, 49, nil, nil, nil, nil, nil,
139
- nil, nil, nil, nil, nil, nil, nil, nil, nil, 53 ]
116
+ 17, 4, 27, 11, 1, 2, 15, 32, 28, 40,
117
+ nil, nil, nil, nil, nil, nil, nil, nil, 37, nil,
118
+ nil, 39, nil, nil, nil, nil, nil, nil, nil, nil,
119
+ nil, 45 ]
140
120
 
141
121
  racc_goto_check = [
142
- 7, 3, 1, 3, 2, 6, 7, 10, nil, nil,
143
- nil, nil, nil, nil, 7, nil, 7, 7, 7, 7,
144
- 7, nil, nil, 7, 7, nil, nil, nil, nil, nil,
145
- nil, nil, nil, nil, nil, nil, nil, nil, nil, 7 ]
122
+ 7, 3, 7, 3, 1, 2, 6, 7, 8, 11,
123
+ nil, nil, nil, nil, nil, nil, nil, nil, 7, nil,
124
+ nil, 7, nil, nil, nil, nil, nil, nil, nil, nil,
125
+ nil, 7 ]
146
126
 
147
127
  racc_goto_pointer = [
148
- nil, 2, 4, 1, nil, nil, -10, -13, nil, nil,
149
- -29 ]
128
+ nil, 4, 5, 1, nil, nil, -6, -13, -8, nil,
129
+ nil, -25 ]
150
130
 
151
131
  racc_goto_default = [
152
- nil, nil, nil, nil, 5, 6, nil, nil, 17, 18,
153
- nil ]
132
+ nil, nil, nil, nil, 5, 6, nil, nil, nil, 18,
133
+ 19, nil ]
154
134
 
155
135
  racc_reduce_table = [
156
136
  0, 0, :racc_error,
157
- 2, 22, :_reduce_none,
158
- 1, 22, :_reduce_none,
159
- 2, 23, :_reduce_none,
160
- 1, 23, :_reduce_none,
161
- 1, 24, :_reduce_none,
162
- 1, 24, :_reduce_none,
163
- 6, 25, :_reduce_7,
164
- 5, 25, :_reduce_8,
165
- 3, 27, :_reduce_9,
166
- 1, 27, :_reduce_10,
167
- 3, 26, :_reduce_11,
168
- 1, 28, :_reduce_none,
169
- 1, 28, :_reduce_none,
170
- 3, 28, :_reduce_14,
171
- 2, 28, :_reduce_15,
172
- 1, 28, :_reduce_16,
173
- 1, 28, :_reduce_17,
174
- 1, 28, :_reduce_18,
175
- 1, 28, :_reduce_19,
176
- 1, 28, :_reduce_20,
177
- 3, 30, :_reduce_21,
178
- 3, 30, :_reduce_22,
179
- 3, 30, :_reduce_23,
180
- 3, 30, :_reduce_24,
181
- 3, 30, :_reduce_25,
182
- 4, 29, :_reduce_26,
183
- 3, 29, :_reduce_27,
184
- 3, 31, :_reduce_28,
185
- 1, 31, :_reduce_29 ]
186
-
187
- racc_reduce_n = 30
188
-
189
- racc_shift_n = 54
137
+ 2, 29, :_reduce_none,
138
+ 1, 29, :_reduce_none,
139
+ 2, 30, :_reduce_none,
140
+ 1, 30, :_reduce_none,
141
+ 1, 31, :_reduce_none,
142
+ 1, 31, :_reduce_none,
143
+ 4, 32, :_reduce_7,
144
+ 3, 34, :_reduce_8,
145
+ 2, 34, :_reduce_9,
146
+ 3, 36, :_reduce_10,
147
+ 1, 36, :_reduce_11,
148
+ 3, 33, :_reduce_12,
149
+ 1, 35, :_reduce_none,
150
+ 1, 35, :_reduce_none,
151
+ 3, 35, :_reduce_15,
152
+ 2, 35, :_reduce_16,
153
+ 1, 35, :_reduce_17,
154
+ 1, 35, :_reduce_18,
155
+ 1, 35, :_reduce_19,
156
+ 1, 35, :_reduce_20,
157
+ 1, 35, :_reduce_21,
158
+ 3, 38, :_reduce_22,
159
+ 4, 37, :_reduce_23,
160
+ 3, 37, :_reduce_24,
161
+ 3, 39, :_reduce_25,
162
+ 1, 39, :_reduce_26 ]
163
+
164
+ racc_reduce_n = 27
165
+
166
+ racc_shift_n = 46
190
167
 
191
168
  racc_token_table = {
192
169
  false => 0,
@@ -196,22 +173,29 @@ racc_token_table = {
196
173
  ")" => 4,
197
174
  :FN_DEF => 5,
198
175
  :ASSIGN => 6,
199
- "," => 7,
200
- :CELL_REF => 8,
201
- :EOL => 9,
202
- :FALSE => 10,
203
- :ID => 11,
204
- :NUMBER => 12,
205
- :STRING => 13,
206
- :TRUE => 14,
207
- :VAR_REF => 15,
208
- "&" => 16,
209
- "*" => 17,
210
- "+" => 18,
211
- "-" => 19,
212
- "/" => 20 }
213
-
214
- racc_nt_base = 21
176
+ "^" => 7,
177
+ "*" => 8,
178
+ "/" => 9,
179
+ "+" => 10,
180
+ "-" => 11,
181
+ "&" => 12,
182
+ "=" => 13,
183
+ "<" => 14,
184
+ ">" => 15,
185
+ "<=" => 16,
186
+ ">=" => 17,
187
+ "<>" => 18,
188
+ "," => 19,
189
+ :EOL => 20,
190
+ :FALSE => 21,
191
+ :ID => 22,
192
+ :INFIX_OP => 23,
193
+ :NUMBER => 24,
194
+ :STRING => 25,
195
+ :TRUE => 26,
196
+ :VAR_REF => 27 }
197
+
198
+ racc_nt_base = 28
215
199
 
216
200
  racc_use_result_var = true
217
201
 
@@ -239,28 +223,36 @@ Racc_token_to_s_table = [
239
223
  "\")\"",
240
224
  "FN_DEF",
241
225
  "ASSIGN",
226
+ "\"^\"",
227
+ "\"*\"",
228
+ "\"/\"",
229
+ "\"+\"",
230
+ "\"-\"",
231
+ "\"&\"",
232
+ "\"=\"",
233
+ "\"<\"",
234
+ "\">\"",
235
+ "\"<=\"",
236
+ "\">=\"",
237
+ "\"<>\"",
242
238
  "\",\"",
243
- "CELL_REF",
244
239
  "EOL",
245
240
  "FALSE",
246
241
  "ID",
242
+ "INFIX_OP",
247
243
  "NUMBER",
248
244
  "STRING",
249
245
  "TRUE",
250
246
  "VAR_REF",
251
- "\"&\"",
252
- "\"*\"",
253
- "\"+\"",
254
- "\"-\"",
255
- "\"/\"",
256
247
  "$start",
257
248
  "code_section",
258
249
  "code",
259
250
  "def",
260
251
  "fn_def",
261
252
  "var_def",
262
- "fn_def_args",
253
+ "fn_def_args_or_not",
263
254
  "exp",
255
+ "fn_def_args",
264
256
  "fn_call",
265
257
  "infix_fn_call",
266
258
  "fn_call_args" ]
@@ -283,152 +275,131 @@ Racc_debug_parser = false
283
275
 
284
276
  # reduce 6 omitted
285
277
 
286
- module_eval(<<'.,.,', 'code_section.y', 29)
278
+ module_eval(<<'.,.,', 'code_section.y', 34)
287
279
  def _reduce_7(val, _values, result)
288
- def_function(val[1], val[3], val[5])
280
+ def_function(val[1], val[2], val[3])
289
281
  result
290
282
  end
291
283
  .,.,
292
284
 
293
- module_eval(<<'.,.,', 'code_section.y', 30)
285
+ module_eval(<<'.,.,', 'code_section.y', 36)
294
286
  def _reduce_8(val, _values, result)
295
- def_function(val[1], [], val[4])
287
+ result = val[1]
296
288
  result
297
289
  end
298
290
  .,.,
299
291
 
300
- module_eval(<<'.,.,', 'code_section.y', 32)
292
+ module_eval(<<'.,.,', 'code_section.y', 37)
301
293
  def _reduce_9(val, _values, result)
302
- result = val[0] << val[2]
294
+ result = []
303
295
  result
304
296
  end
305
297
  .,.,
306
298
 
307
- module_eval(<<'.,.,', 'code_section.y', 33)
299
+ module_eval(<<'.,.,', 'code_section.y', 39)
308
300
  def _reduce_10(val, _values, result)
309
- result = [val[0]]
301
+ result = val[0] << val[2]
310
302
  result
311
303
  end
312
304
  .,.,
313
305
 
314
- module_eval(<<'.,.,', 'code_section.y', 35)
306
+ module_eval(<<'.,.,', 'code_section.y', 40)
315
307
  def _reduce_11(val, _values, result)
316
- def_variable(val[0], val[2])
308
+ result = [val[0]]
317
309
  result
318
310
  end
319
311
  .,.,
320
312
 
321
- # reduce 12 omitted
322
-
323
- # reduce 13 omitted
324
-
325
- module_eval(<<'.,.,', 'code_section.y', 39)
326
- def _reduce_14(val, _values, result)
327
- result = val[1]
313
+ module_eval(<<'.,.,', 'code_section.y', 42)
314
+ def _reduce_12(val, _values, result)
315
+ def_variable(val[0], val[2])
328
316
  result
329
317
  end
330
318
  .,.,
331
319
 
332
- module_eval(<<'.,.,', 'code_section.y', 40)
320
+ # reduce 13 omitted
321
+
322
+ # reduce 14 omitted
323
+
324
+ module_eval(<<'.,.,', 'code_section.y', 46)
333
325
  def _reduce_15(val, _values, result)
334
- result = e(:variable, val[1])
326
+ result = val[1]
335
327
  result
336
328
  end
337
329
  .,.,
338
330
 
339
- module_eval(<<'.,.,', 'code_section.y', 41)
331
+ module_eval(<<'.,.,', 'code_section.y', 47)
340
332
  def _reduce_16(val, _values, result)
341
- result = e(:string, val[0])
333
+ result = variable(val[1])
342
334
  result
343
335
  end
344
336
  .,.,
345
337
 
346
- module_eval(<<'.,.,', 'code_section.y', 42)
338
+ module_eval(<<'.,.,', 'code_section.y', 48)
347
339
  def _reduce_17(val, _values, result)
348
- result = e(:number, val[0])
340
+ result = string(val[0])
349
341
  result
350
342
  end
351
343
  .,.,
352
344
 
353
- module_eval(<<'.,.,', 'code_section.y', 43)
345
+ module_eval(<<'.,.,', 'code_section.y', 49)
354
346
  def _reduce_18(val, _values, result)
355
- result = e(:boolean, true)
347
+ result = number(val[0])
356
348
  result
357
349
  end
358
350
  .,.,
359
351
 
360
- module_eval(<<'.,.,', 'code_section.y', 44)
352
+ module_eval(<<'.,.,', 'code_section.y', 50)
361
353
  def _reduce_19(val, _values, result)
362
- result = e(:boolean, false)
354
+ result = boolean(true)
363
355
  result
364
356
  end
365
357
  .,.,
366
358
 
367
- module_eval(<<'.,.,', 'code_section.y', 45)
359
+ module_eval(<<'.,.,', 'code_section.y', 51)
368
360
  def _reduce_20(val, _values, result)
369
- result = e(:cell_reference, val[0])
361
+ result = boolean(false)
370
362
  result
371
363
  end
372
364
  .,.,
373
365
 
374
- module_eval(<<'.,.,', 'code_section.y', 47)
366
+ module_eval(<<'.,.,', 'code_section.y', 52)
375
367
  def _reduce_21(val, _values, result)
376
- result = e(:function_call, :concat, [val[0], val[2]])
368
+ result = cell_reference(val[0])
377
369
  result
378
370
  end
379
371
  .,.,
380
372
 
381
- module_eval(<<'.,.,', 'code_section.y', 48)
373
+ module_eval(<<'.,.,', 'code_section.y', 54)
382
374
  def _reduce_22(val, _values, result)
383
- result = e(:function_call, :multiply, [val[0], val[2]])
375
+ result = function_call(val[1], [val[0], val[2]], infix: true)
384
376
  result
385
377
  end
386
378
  .,.,
387
379
 
388
- module_eval(<<'.,.,', 'code_section.y', 49)
380
+ module_eval(<<'.,.,', 'code_section.y', 56)
389
381
  def _reduce_23(val, _values, result)
390
- result = e(:function_call, :add, [val[0], val[2]])
382
+ result = function_call(val[0], val[2])
391
383
  result
392
384
  end
393
385
  .,.,
394
386
 
395
- module_eval(<<'.,.,', 'code_section.y', 50)
387
+ module_eval(<<'.,.,', 'code_section.y', 57)
396
388
  def _reduce_24(val, _values, result)
397
- result = e(:function_call, :minus, [val[0], val[2]])
389
+ result = function_call(val[0], [])
398
390
  result
399
391
  end
400
392
  .,.,
401
393
 
402
- module_eval(<<'.,.,', 'code_section.y', 51)
394
+ module_eval(<<'.,.,', 'code_section.y', 59)
403
395
  def _reduce_25(val, _values, result)
404
- result = e(:function_call, :divide, [val[0], val[2]])
405
- result
406
- end
407
- .,.,
408
-
409
- module_eval(<<'.,.,', 'code_section.y', 53)
410
- def _reduce_26(val, _values, result)
411
- result = e(:function_call, val[0], val[2])
412
- result
413
- end
414
- .,.,
415
-
416
- module_eval(<<'.,.,', 'code_section.y', 54)
417
- def _reduce_27(val, _values, result)
418
- result = e(:function_call, val[0], [])
419
- result
420
- end
421
- .,.,
422
-
423
- module_eval(<<'.,.,', 'code_section.y', 56)
424
- def _reduce_28(val, _values, result)
425
396
  result = val[0] << val[2]
426
397
  result
427
398
  end
428
399
  .,.,
429
400
 
430
- module_eval(<<'.,.,', 'code_section.y', 57)
431
- def _reduce_29(val, _values, result)
401
+ module_eval(<<'.,.,', 'code_section.y', 60)
402
+ def _reduce_26(val, _values, result)
432
403
  result = [val[0]]
433
404
  result
434
405
  end