csv_plus_plus 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +7 -0
  2. data/lib/csv_plus_plus/cell.rb +51 -0
  3. data/lib/csv_plus_plus/code_section.rb +49 -0
  4. data/lib/csv_plus_plus/color.rb +22 -0
  5. data/lib/csv_plus_plus/expand.rb +18 -0
  6. data/lib/csv_plus_plus/google_options.rb +23 -0
  7. data/lib/csv_plus_plus/graph.rb +68 -0
  8. data/lib/csv_plus_plus/language/cell_value.tab.rb +333 -0
  9. data/lib/csv_plus_plus/language/code_section.tab.rb +443 -0
  10. data/lib/csv_plus_plus/language/compiler.rb +170 -0
  11. data/lib/csv_plus_plus/language/entities/boolean.rb +32 -0
  12. data/lib/csv_plus_plus/language/entities/cell_reference.rb +26 -0
  13. data/lib/csv_plus_plus/language/entities/entity.rb +70 -0
  14. data/lib/csv_plus_plus/language/entities/function.rb +33 -0
  15. data/lib/csv_plus_plus/language/entities/function_call.rb +25 -0
  16. data/lib/csv_plus_plus/language/entities/number.rb +34 -0
  17. data/lib/csv_plus_plus/language/entities/runtime_value.rb +27 -0
  18. data/lib/csv_plus_plus/language/entities/string.rb +29 -0
  19. data/lib/csv_plus_plus/language/entities/variable.rb +25 -0
  20. data/lib/csv_plus_plus/language/entities.rb +28 -0
  21. data/lib/csv_plus_plus/language/references.rb +53 -0
  22. data/lib/csv_plus_plus/language/runtime.rb +147 -0
  23. data/lib/csv_plus_plus/language/scope.rb +199 -0
  24. data/lib/csv_plus_plus/language/syntax_error.rb +61 -0
  25. data/lib/csv_plus_plus/lexer/lexer.rb +64 -0
  26. data/lib/csv_plus_plus/lexer/tokenizer.rb +65 -0
  27. data/lib/csv_plus_plus/lexer.rb +14 -0
  28. data/lib/csv_plus_plus/modifier.rb +124 -0
  29. data/lib/csv_plus_plus/modifier.tab.rb +921 -0
  30. data/lib/csv_plus_plus/options.rb +70 -0
  31. data/lib/csv_plus_plus/row.rb +42 -0
  32. data/lib/csv_plus_plus/template.rb +61 -0
  33. data/lib/csv_plus_plus/version.rb +6 -0
  34. data/lib/csv_plus_plus/writer/base_writer.rb +21 -0
  35. data/lib/csv_plus_plus/writer/csv.rb +31 -0
  36. data/lib/csv_plus_plus/writer/excel.rb +13 -0
  37. data/lib/csv_plus_plus/writer/google_sheet_builder.rb +173 -0
  38. data/lib/csv_plus_plus/writer/google_sheets.rb +139 -0
  39. data/lib/csv_plus_plus/writer/open_document.rb +14 -0
  40. data/lib/csv_plus_plus/writer.rb +25 -0
  41. data/lib/csv_plus_plus.rb +20 -0
  42. metadata +83 -0
@@ -0,0 +1,921 @@
1
+ #
2
+ # DO NOT MODIFY!!!!
3
+ # This file is automatically generated by Racc 1.6.2
4
+ # from Racc grammar file "".
5
+ #
6
+
7
+ require 'racc/parser.rb'
8
+
9
+ require_relative './expand'
10
+ require_relative './lexer'
11
+
12
+ module CSVPlusPlus
13
+ class ModifierParser < Racc::Parser
14
+
15
+ module_eval(<<'...end modifier.y/module_eval...', 'modifier.y', 123)
16
+ attr_reader :return_value
17
+
18
+ include ::CSVPlusPlus::Lexer
19
+
20
+ def initialize(cell_modifier:, row_modifier:)
21
+ super()
22
+
23
+ @parsing_row = false
24
+ @cell_modifier = cell_modifier
25
+ @row_modifier = row_modifier
26
+ end
27
+
28
+ protected
29
+
30
+ def anything_to_parse?(input)
31
+ @modifiers_to_parse = input.scan(/!?\[\[/).count
32
+
33
+ if @modifiers_to_parse == 0
34
+ assign_defaults!
35
+ @return_value = input
36
+ end
37
+
38
+ @modifiers_to_parse > 0
39
+ end
40
+
41
+ def parse_subject
42
+ 'modifier'
43
+ end
44
+
45
+ def tokenizer(input)
46
+ ::CSVPlusPlus::Lexer::Tokenizer.new(
47
+ catchall: /\w+/,
48
+ ignore: /\s+/,
49
+ input:,
50
+ stop_fn: lambda do |scanner|
51
+ return false unless scanner.scan(/\]\]/)
52
+
53
+ @tokens << [:END_MODIFIERS, scanner.matched]
54
+ @return_value = scanner.rest
55
+
56
+ @modifiers_to_parse -= 1
57
+ @modifiers_to_parse == 0
58
+ end,
59
+ tokens: [
60
+ [/\[\[/, :START_CELL_MODIFIERS],
61
+ [/!\[\[/, :START_ROW_MODIFIERS],
62
+ [/^#(([0-9a-fA-F]{2}){3}|([0-9a-fA-F]){3})/, :HEX_COLOR],
63
+ [/(['\w]+\!)?[\w\d]+:[\w\d]+/, :A1_NOTATION],
64
+ [/=/, :EQ],
65
+ [/-?[\d.]+/, :NUMBER],
66
+ [/'(?:[^'\\]|\\(?:['\\\/bfnrt]|u[0-9a-fA-F]{4}))*'/, :STRING],
67
+ [/\//, :MODIFIER_SEPARATOR],
68
+ ],
69
+ alter_matches: {
70
+ STRING: ->(s) { s.gsub(/^'|'$/, '') }
71
+ },
72
+ )
73
+ end
74
+
75
+ private
76
+
77
+ def assign_defaults!
78
+ @cell_modifier.take_defaults_from!(@row_modifier)
79
+ end
80
+
81
+ def parsing_row!
82
+ @parsing_row = true
83
+ end
84
+
85
+ def finished_row!
86
+ parsing_cell!
87
+ end
88
+
89
+ def parsing_cell!
90
+ @parsing_row = false
91
+ assign_defaults!
92
+ end
93
+
94
+ def freeze!
95
+ (@parsing_row ? @row_modifier : @cell_modifier).freeze!
96
+ end
97
+
98
+ def s!(property, value)
99
+ target = @parsing_row ? @row_modifier : @cell_modifier
100
+ target.public_send("#{property}=".to_sym, value)
101
+ end
102
+ ...end modifier.y/module_eval...
103
+ ##### State transition tables begin ###
104
+
105
+ racc_action_table = [
106
+ 126, 13, 14, 15, 16, 17, 18, 19, 20, 21,
107
+ 22, 23, 24, 25, 26, 27, 13, 14, 15, 16,
108
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
109
+ 27, 84, 85, 86, 87, 88, 89, 90, 91, 5,
110
+ 4, 93, 94, 96, 97, 98, 99, 100, 101, 102,
111
+ 103, 104, 106, 107, 108, 109, 110, 111, 112, 113,
112
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
113
+ 124, 125, 127, 128, 129, 130, 131, 132, 13, 14,
114
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
115
+ 25, 26, 27, 29, 45, 50, 136, 52, 30, 30,
116
+ 60, 6, 59, 58, 61, 57, 64, 65, 66, 67,
117
+ 68, 69, 60, 5, 59, 58, 61, 57, 127, 128,
118
+ 129, 130, 131, 132, 127, 128, 129, 130, 131, 132,
119
+ 50, 51, 52, 53, 54, 78, 79, 80, 81, 134,
120
+ 10, 53, 54, 78, 79, 80, 81, -40, 31, -40,
121
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
122
+ 42, 43, 44, 62, 70, 71, 72, 73, 74, 75,
123
+ 82, 139, 140, 141, 142, 143, 144, 145, 146, 147,
124
+ 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
125
+ 158, 159, 160, 161, 162, 163, 164, 126, 126, 126,
126
+ 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
127
+ 126, 126, 126, 126, 185, 126, 126, 126, 126, 126,
128
+ 126, 126, 126, 126, 126, 126, 126, 126 ]
129
+
130
+ racc_action_check = [
131
+ 44, 8, 8, 8, 8, 8, 8, 8, 8, 8,
132
+ 8, 8, 8, 8, 8, 8, 9, 9, 9, 9,
133
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
134
+ 9, 43, 43, 43, 43, 43, 43, 43, 43, 0,
135
+ 0, 44, 44, 44, 44, 44, 44, 44, 44, 44,
136
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
137
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
138
+ 44, 44, 44, 44, 44, 44, 44, 44, 30, 30,
139
+ 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
140
+ 30, 30, 30, 11, 28, 49, 49, 49, 11, 28,
141
+ 32, 1, 32, 32, 32, 32, 34, 34, 34, 34,
142
+ 34, 34, 55, 2, 55, 55, 55, 55, 141, 141,
143
+ 141, 141, 141, 141, 142, 142, 142, 142, 142, 142,
144
+ 31, 31, 31, 31, 31, 41, 41, 41, 41, 48,
145
+ 6, 48, 48, 76, 76, 76, 76, 51, 13, 51,
146
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
147
+ 25, 26, 27, 33, 35, 36, 37, 38, 39, 40,
148
+ 42, 94, 96, 97, 98, 99, 100, 102, 103, 104,
149
+ 106, 108, 109, 110, 111, 112, 113, 114, 115, 116,
150
+ 117, 118, 119, 120, 123, 124, 125, 139, 140, 143,
151
+ 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
152
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
153
+ 164, 169, 171, 172, 176, 182, 184, 190 ]
154
+
155
+ racc_action_pointer = [
156
+ 27, 101, 101, nil, nil, nil, 140, nil, -15, 0,
157
+ nil, 87, nil, 141, 143, 144, 145, 146, 147, 148,
158
+ 149, 150, 151, 152, nil, 153, 154, 155, 88, nil,
159
+ 62, 95, 65, 155, 65, 156, 156, 152, 159, 154,
160
+ 160, 104, 156, -16, -14, nil, nil, nil, 103, 60,
161
+ nil, 112, nil, nil, nil, 77, nil, nil, nil, nil,
162
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
163
+ nil, nil, nil, nil, nil, nil, 112, nil, nil, nil,
164
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
165
+ nil, nil, nil, nil, 169, nil, 170, 171, 172, 173,
166
+ 174, nil, 175, 176, 177, nil, 178, nil, 179, 180,
167
+ 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
168
+ 191, nil, nil, 192, 193, 194, nil, nil, nil, nil,
169
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, 183,
170
+ 184, 32, 38, 185, 186, 187, 188, 189, 190, 191,
171
+ 192, 193, 194, 195, 196, 197, 198, 199, 209, 201,
172
+ 202, 203, 204, 205, 206, nil, nil, nil, nil, 207,
173
+ nil, 208, 209, nil, nil, nil, 210, nil, nil, nil,
174
+ nil, nil, 211, nil, 212, nil, nil, nil, nil, nil,
175
+ 213, nil, nil, nil, nil, nil, nil ]
176
+
177
+ racc_action_default = [
178
+ -108, -108, -2, -3, -4, -6, -108, -1, -108, -108,
179
+ 197, -108, -9, -108, -108, -108, -108, -108, -16, -108,
180
+ -108, -108, -108, -108, -22, -108, -108, -108, -108, -5,
181
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
182
+ -108, -108, -108, -108, -108, -7, -8, -10, -34, -35,
183
+ -36, -37, -38, -39, -41, -11, -43, -44, -45, -46,
184
+ -47, -48, -12, -13, -49, -50, -51, -52, -53, -54,
185
+ -14, -15, -17, -18, -19, -20, -21, -27, -28, -29,
186
+ -30, -31, -23, -24, -55, -56, -57, -58, -59, -60,
187
+ -61, -62, -25, -63, -64, -67, -108, -108, -108, -108,
188
+ -108, -73, -108, -108, -108, -77, -108, -80, -108, -108,
189
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
190
+ -108, -94, -95, -108, -108, -108, -101, -102, -103, -104,
191
+ -105, -106, -107, -32, -40, -33, -37, -42, -26, -108,
192
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
193
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
194
+ -108, -108, -108, -108, -108, -65, -68, -69, -70, -108,
195
+ -72, -108, -75, -100, -76, -78, -108, -82, -83, -84,
196
+ -85, -86, -108, -88, -89, -90, -91, -92, -93, -96,
197
+ -97, -98, -71, -74, -99, -81, -87 ]
198
+
199
+ racc_goto_table = [
200
+ 95, 77, 56, 48, 1, 49, 172, 3, 2, 7,
201
+ 11, 28, 8, 9, 46, 47, 105, 184, 55, 63,
202
+ 76, 135, 133, 190, 83, 137, 92, nil, nil, nil,
203
+ nil, nil, nil, nil, nil, nil, 138, nil, nil, nil,
204
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
205
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
206
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
207
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
208
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
209
+ nil, nil, nil, nil, nil, 165, 166, nil, nil, 169,
210
+ 170, 171, nil, 174, 175, 176, 177, 178, 179, 180,
211
+ 181, 182, 183, 167, 168, 186, 187, 188, 189, nil,
212
+ 191, nil, nil, nil, nil, 192, nil, 193, 194, nil,
213
+ nil, nil, 195, nil, nil, nil, nil, nil, 196, nil,
214
+ 194, nil, nil, nil, nil, nil, 194 ]
215
+
216
+ racc_goto_check = [
217
+ 18, 14, 17, 15, 1, 16, 20, 3, 2, 3,
218
+ 4, 4, 5, 6, 7, 8, 19, 20, 9, 10,
219
+ 11, 15, 16, 20, 12, 17, 13, nil, nil, nil,
220
+ nil, nil, nil, nil, nil, nil, 14, nil, nil, nil,
221
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
222
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
223
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
224
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
225
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
226
+ nil, nil, nil, nil, nil, 18, 18, nil, nil, 18,
227
+ 18, 18, nil, 18, 18, 18, 18, 18, 18, 18,
228
+ 18, 18, 18, 19, 19, 18, 18, 18, 18, nil,
229
+ 18, nil, nil, nil, nil, 18, nil, 18, 18, nil,
230
+ nil, nil, 18, nil, nil, nil, nil, nil, 18, nil,
231
+ 18, nil, nil, nil, nil, nil, 18 ]
232
+
233
+ racc_goto_pointer = [
234
+ nil, 4, 8, 7, 2, 8, 8, -16, -16, -14,
235
+ -15, -21, -19, -18, -40, -28, -26, -30, -44, -28,
236
+ -140 ]
237
+
238
+ racc_goto_default = [
239
+ nil, nil, nil, nil, nil, nil, nil, 12, nil, nil,
240
+ nil, nil, nil, nil, nil, nil, nil, nil, 173, nil,
241
+ nil ]
242
+
243
+ racc_reduce_table = [
244
+ 0, 0, :racc_error,
245
+ 2, 93, :_reduce_none,
246
+ 1, 93, :_reduce_none,
247
+ 1, 93, :_reduce_none,
248
+ 0, 97, :_reduce_4,
249
+ 4, 94, :_reduce_5,
250
+ 0, 98, :_reduce_6,
251
+ 4, 95, :_reduce_none,
252
+ 3, 96, :_reduce_none,
253
+ 1, 96, :_reduce_none,
254
+ 3, 99, :_reduce_none,
255
+ 3, 99, :_reduce_none,
256
+ 3, 99, :_reduce_12,
257
+ 3, 99, :_reduce_13,
258
+ 3, 99, :_reduce_14,
259
+ 3, 99, :_reduce_15,
260
+ 1, 99, :_reduce_16,
261
+ 3, 99, :_reduce_17,
262
+ 3, 99, :_reduce_18,
263
+ 3, 99, :_reduce_19,
264
+ 3, 99, :_reduce_20,
265
+ 3, 99, :_reduce_none,
266
+ 1, 99, :_reduce_22,
267
+ 3, 99, :_reduce_23,
268
+ 3, 99, :_reduce_24,
269
+ 3, 99, :_reduce_25,
270
+ 2, 103, :_reduce_none,
271
+ 1, 103, :_reduce_27,
272
+ 1, 106, :_reduce_none,
273
+ 1, 106, :_reduce_none,
274
+ 1, 106, :_reduce_none,
275
+ 1, 106, :_reduce_none,
276
+ 2, 100, :_reduce_32,
277
+ 2, 100, :_reduce_33,
278
+ 1, 100, :_reduce_34,
279
+ 1, 100, :_reduce_35,
280
+ 1, 107, :_reduce_none,
281
+ 1, 107, :_reduce_none,
282
+ 1, 107, :_reduce_none,
283
+ 1, 108, :_reduce_none,
284
+ 1, 108, :_reduce_none,
285
+ 1, 108, :_reduce_none,
286
+ 2, 101, :_reduce_none,
287
+ 1, 101, :_reduce_43,
288
+ 1, 109, :_reduce_none,
289
+ 1, 109, :_reduce_none,
290
+ 1, 109, :_reduce_none,
291
+ 1, 109, :_reduce_none,
292
+ 1, 109, :_reduce_none,
293
+ 1, 102, :_reduce_none,
294
+ 1, 102, :_reduce_none,
295
+ 1, 102, :_reduce_none,
296
+ 1, 102, :_reduce_none,
297
+ 1, 102, :_reduce_none,
298
+ 1, 102, :_reduce_none,
299
+ 1, 104, :_reduce_none,
300
+ 1, 104, :_reduce_none,
301
+ 1, 104, :_reduce_none,
302
+ 1, 104, :_reduce_none,
303
+ 1, 104, :_reduce_none,
304
+ 1, 104, :_reduce_none,
305
+ 1, 104, :_reduce_none,
306
+ 1, 104, :_reduce_none,
307
+ 1, 105, :_reduce_none,
308
+ 1, 105, :_reduce_none,
309
+ 3, 105, :_reduce_none,
310
+ 3, 105, :_reduce_none,
311
+ 1, 105, :_reduce_none,
312
+ 3, 105, :_reduce_none,
313
+ 3, 105, :_reduce_none,
314
+ 3, 105, :_reduce_none,
315
+ 4, 105, :_reduce_none,
316
+ 3, 105, :_reduce_none,
317
+ 1, 105, :_reduce_none,
318
+ 4, 105, :_reduce_none,
319
+ 3, 105, :_reduce_none,
320
+ 3, 105, :_reduce_none,
321
+ 1, 105, :_reduce_none,
322
+ 3, 105, :_reduce_none,
323
+ 1, 105, :_reduce_none,
324
+ 1, 105, :_reduce_none,
325
+ 4, 105, :_reduce_none,
326
+ 3, 105, :_reduce_none,
327
+ 3, 105, :_reduce_none,
328
+ 3, 105, :_reduce_none,
329
+ 3, 105, :_reduce_none,
330
+ 3, 105, :_reduce_none,
331
+ 4, 105, :_reduce_none,
332
+ 3, 105, :_reduce_none,
333
+ 3, 105, :_reduce_none,
334
+ 3, 105, :_reduce_none,
335
+ 3, 105, :_reduce_none,
336
+ 3, 105, :_reduce_none,
337
+ 3, 105, :_reduce_none,
338
+ 1, 105, :_reduce_none,
339
+ 1, 105, :_reduce_none,
340
+ 3, 105, :_reduce_none,
341
+ 3, 105, :_reduce_none,
342
+ 3, 105, :_reduce_none,
343
+ 2, 112, :_reduce_none,
344
+ 1, 112, :_reduce_none,
345
+ 1, 110, :_reduce_none,
346
+ 1, 111, :_reduce_none,
347
+ 1, 111, :_reduce_none,
348
+ 1, 111, :_reduce_none,
349
+ 1, 111, :_reduce_none,
350
+ 1, 111, :_reduce_none,
351
+ 1, 111, :_reduce_none ]
352
+
353
+ racc_reduce_n = 108
354
+
355
+ racc_shift_n = 197
356
+
357
+ racc_token_table = {
358
+ false => 0,
359
+ :error => 1,
360
+ ":" => 2,
361
+ "=" => 3,
362
+ "/" => 4,
363
+ :A1_NOTATION => 5,
364
+ :END_MODIFIERS => 6,
365
+ :EQ => 7,
366
+ :HEX_COLOR => 8,
367
+ :NUMBER => 9,
368
+ :MODIFIER_ID => 10,
369
+ :MODIFIER_SEPARATOR => 11,
370
+ :START_CELL_MODIFIERS => 12,
371
+ :START_ROW_MODIFIERS => 13,
372
+ :STRING => 14,
373
+ :URL => 15,
374
+ "align" => 16,
375
+ "border" => 17,
376
+ "bordercolor" => 18,
377
+ "borderstyle" => 19,
378
+ "color" => 20,
379
+ "expand" => 21,
380
+ "font" => 22,
381
+ "fontcolor" => 23,
382
+ "fontfamily" => 24,
383
+ "fontsize" => 25,
384
+ "format" => 26,
385
+ "freeze" => 27,
386
+ "note" => 28,
387
+ "numberformat" => 29,
388
+ "validate" => 30,
389
+ "bold" => 31,
390
+ "italic" => 32,
391
+ "strikethrough" => 33,
392
+ "underline" => 34,
393
+ "left" => 35,
394
+ "center" => 36,
395
+ "right" => 37,
396
+ "top" => 38,
397
+ "bottom" => 39,
398
+ "all" => 40,
399
+ "dashed" => 41,
400
+ "dotted" => 42,
401
+ "double" => 43,
402
+ "solid" => 44,
403
+ "solid_medium" => 45,
404
+ "solid_thick" => 46,
405
+ "currency" => 47,
406
+ "date" => 48,
407
+ "date_time" => 49,
408
+ "number" => 50,
409
+ "percent" => 51,
410
+ "text" => 52,
411
+ "time" => 53,
412
+ "scientific" => 54,
413
+ "blank" => 55,
414
+ "boolean" => 56,
415
+ "custom_formula" => 57,
416
+ "date_after" => 58,
417
+ "date_before" => 59,
418
+ "date_between" => 60,
419
+ "date_eq" => 61,
420
+ "date_is_valid" => 62,
421
+ "date_not_between" => 63,
422
+ "date_not_eq" => 64,
423
+ "date_on_or_after" => 65,
424
+ "date_on_or_before" => 66,
425
+ "not_blank" => 67,
426
+ "number_between" => 68,
427
+ "number_eq" => 69,
428
+ "number_greater" => 70,
429
+ "number_greater_than_eq" => 71,
430
+ "number_less" => 72,
431
+ "number_less_than_eq" => 73,
432
+ "number_not_between" => 74,
433
+ "number_not_eq" => 75,
434
+ "one_of_list" => 76,
435
+ "one_of_range" => 77,
436
+ "text_contains" => 78,
437
+ "text_ends_with" => 79,
438
+ "text_eq" => 80,
439
+ "text_is_email" => 81,
440
+ "text_is_url" => 82,
441
+ "text_not_contains" => 83,
442
+ "text_not_eq" => 84,
443
+ "text_starts_with" => 85,
444
+ "past_year" => 86,
445
+ "past_month" => 87,
446
+ "past_week" => 88,
447
+ "yesterday" => 89,
448
+ "today" => 90,
449
+ "tomorrow" => 91 }
450
+
451
+ racc_nt_base = 92
452
+
453
+ racc_use_result_var = true
454
+
455
+ Racc_arg = [
456
+ racc_action_table,
457
+ racc_action_check,
458
+ racc_action_default,
459
+ racc_action_pointer,
460
+ racc_goto_table,
461
+ racc_goto_check,
462
+ racc_goto_default,
463
+ racc_goto_pointer,
464
+ racc_nt_base,
465
+ racc_reduce_table,
466
+ racc_token_table,
467
+ racc_shift_n,
468
+ racc_reduce_n,
469
+ racc_use_result_var ]
470
+
471
+ Racc_token_to_s_table = [
472
+ "$end",
473
+ "error",
474
+ "\":\"",
475
+ "\"=\"",
476
+ "\"/\"",
477
+ "A1_NOTATION",
478
+ "END_MODIFIERS",
479
+ "EQ",
480
+ "HEX_COLOR",
481
+ "NUMBER",
482
+ "MODIFIER_ID",
483
+ "MODIFIER_SEPARATOR",
484
+ "START_CELL_MODIFIERS",
485
+ "START_ROW_MODIFIERS",
486
+ "STRING",
487
+ "URL",
488
+ "\"align\"",
489
+ "\"border\"",
490
+ "\"bordercolor\"",
491
+ "\"borderstyle\"",
492
+ "\"color\"",
493
+ "\"expand\"",
494
+ "\"font\"",
495
+ "\"fontcolor\"",
496
+ "\"fontfamily\"",
497
+ "\"fontsize\"",
498
+ "\"format\"",
499
+ "\"freeze\"",
500
+ "\"note\"",
501
+ "\"numberformat\"",
502
+ "\"validate\"",
503
+ "\"bold\"",
504
+ "\"italic\"",
505
+ "\"strikethrough\"",
506
+ "\"underline\"",
507
+ "\"left\"",
508
+ "\"center\"",
509
+ "\"right\"",
510
+ "\"top\"",
511
+ "\"bottom\"",
512
+ "\"all\"",
513
+ "\"dashed\"",
514
+ "\"dotted\"",
515
+ "\"double\"",
516
+ "\"solid\"",
517
+ "\"solid_medium\"",
518
+ "\"solid_thick\"",
519
+ "\"currency\"",
520
+ "\"date\"",
521
+ "\"date_time\"",
522
+ "\"number\"",
523
+ "\"percent\"",
524
+ "\"text\"",
525
+ "\"time\"",
526
+ "\"scientific\"",
527
+ "\"blank\"",
528
+ "\"boolean\"",
529
+ "\"custom_formula\"",
530
+ "\"date_after\"",
531
+ "\"date_before\"",
532
+ "\"date_between\"",
533
+ "\"date_eq\"",
534
+ "\"date_is_valid\"",
535
+ "\"date_not_between\"",
536
+ "\"date_not_eq\"",
537
+ "\"date_on_or_after\"",
538
+ "\"date_on_or_before\"",
539
+ "\"not_blank\"",
540
+ "\"number_between\"",
541
+ "\"number_eq\"",
542
+ "\"number_greater\"",
543
+ "\"number_greater_than_eq\"",
544
+ "\"number_less\"",
545
+ "\"number_less_than_eq\"",
546
+ "\"number_not_between\"",
547
+ "\"number_not_eq\"",
548
+ "\"one_of_list\"",
549
+ "\"one_of_range\"",
550
+ "\"text_contains\"",
551
+ "\"text_ends_with\"",
552
+ "\"text_eq\"",
553
+ "\"text_is_email\"",
554
+ "\"text_is_url\"",
555
+ "\"text_not_contains\"",
556
+ "\"text_not_eq\"",
557
+ "\"text_starts_with\"",
558
+ "\"past_year\"",
559
+ "\"past_month\"",
560
+ "\"past_week\"",
561
+ "\"yesterday\"",
562
+ "\"today\"",
563
+ "\"tomorrow\"",
564
+ "$start",
565
+ "modifiers_definition",
566
+ "row_modifiers",
567
+ "cell_modifiers",
568
+ "modifiers",
569
+ "@1",
570
+ "@2",
571
+ "modifier",
572
+ "align_options",
573
+ "border_options",
574
+ "borderstyle_option",
575
+ "format_options",
576
+ "numberformat_option",
577
+ "condition",
578
+ "format_option",
579
+ "halign_option",
580
+ "valign_option",
581
+ "border_option",
582
+ "condition_value",
583
+ "relative_date",
584
+ "condition_values" ]
585
+
586
+ Racc_debug_parser = false
587
+
588
+ ##### State transition tables end #####
589
+
590
+ # reduce 0 omitted
591
+
592
+ # reduce 1 omitted
593
+
594
+ # reduce 2 omitted
595
+
596
+ # reduce 3 omitted
597
+
598
+ module_eval(<<'.,.,', 'modifier.y', 24)
599
+ def _reduce_4(val, _values, result)
600
+ parsing_row!
601
+ result
602
+ end
603
+ .,.,
604
+
605
+ module_eval(<<'.,.,', 'modifier.y', 26)
606
+ def _reduce_5(val, _values, result)
607
+ finished_row!
608
+ result
609
+ end
610
+ .,.,
611
+
612
+ module_eval(<<'.,.,', 'modifier.y', 28)
613
+ def _reduce_6(val, _values, result)
614
+ parsing_cell!
615
+ result
616
+ end
617
+ .,.,
618
+
619
+ # reduce 7 omitted
620
+
621
+ # reduce 8 omitted
622
+
623
+ # reduce 9 omitted
624
+
625
+ # reduce 10 omitted
626
+
627
+ # reduce 11 omitted
628
+
629
+ module_eval(<<'.,.,', 'modifier.y', 36)
630
+ def _reduce_12(val, _values, result)
631
+ s!(:bordercolor, val[2])
632
+ result
633
+ end
634
+ .,.,
635
+
636
+ module_eval(<<'.,.,', 'modifier.y', 37)
637
+ def _reduce_13(val, _values, result)
638
+ s!(:borderstyle, val[2])
639
+ result
640
+ end
641
+ .,.,
642
+
643
+ module_eval(<<'.,.,', 'modifier.y', 38)
644
+ def _reduce_14(val, _values, result)
645
+ s!(:color, val[2])
646
+ result
647
+ end
648
+ .,.,
649
+
650
+ module_eval(<<'.,.,', 'modifier.y', 39)
651
+ def _reduce_15(val, _values, result)
652
+ s!(:expand, Expand.new(val[2].to_i))
653
+ result
654
+ end
655
+ .,.,
656
+
657
+ module_eval(<<'.,.,', 'modifier.y', 40)
658
+ def _reduce_16(val, _values, result)
659
+ s!(:expand, Expand.new)
660
+ result
661
+ end
662
+ .,.,
663
+
664
+ module_eval(<<'.,.,', 'modifier.y', 41)
665
+ def _reduce_17(val, _values, result)
666
+ s!(:fontfamily, val[2])
667
+ result
668
+ end
669
+ .,.,
670
+
671
+ module_eval(<<'.,.,', 'modifier.y', 42)
672
+ def _reduce_18(val, _values, result)
673
+ s!(:fontcolor, val[2])
674
+ result
675
+ end
676
+ .,.,
677
+
678
+ module_eval(<<'.,.,', 'modifier.y', 43)
679
+ def _reduce_19(val, _values, result)
680
+ s!(:fontfamily, val[2])
681
+ result
682
+ end
683
+ .,.,
684
+
685
+ module_eval(<<'.,.,', 'modifier.y', 44)
686
+ def _reduce_20(val, _values, result)
687
+ s!(:fontsize, val[2].to_f)
688
+ result
689
+ end
690
+ .,.,
691
+
692
+ # reduce 21 omitted
693
+
694
+ module_eval(<<'.,.,', 'modifier.y', 46)
695
+ def _reduce_22(val, _values, result)
696
+ freeze!
697
+ result
698
+ end
699
+ .,.,
700
+
701
+ module_eval(<<'.,.,', 'modifier.y', 47)
702
+ def _reduce_23(val, _values, result)
703
+ s!(:note, val[2])
704
+ result
705
+ end
706
+ .,.,
707
+
708
+ module_eval(<<'.,.,', 'modifier.y', 48)
709
+ def _reduce_24(val, _values, result)
710
+ s!(:numberformat, val[2])
711
+ result
712
+ end
713
+ .,.,
714
+
715
+ module_eval(<<'.,.,', 'modifier.y', 49)
716
+ def _reduce_25(val, _values, result)
717
+ s!(:validation, val[2])
718
+ result
719
+ end
720
+ .,.,
721
+
722
+ # reduce 26 omitted
723
+
724
+ module_eval(<<'.,.,', 'modifier.y', 51)
725
+ def _reduce_27(val, _values, result)
726
+ s!(:format, val[0])
727
+ result
728
+ end
729
+ .,.,
730
+
731
+ # reduce 28 omitted
732
+
733
+ # reduce 29 omitted
734
+
735
+ # reduce 30 omitted
736
+
737
+ # reduce 31 omitted
738
+
739
+ module_eval(<<'.,.,', 'modifier.y', 54)
740
+ def _reduce_32(val, _values, result)
741
+ s!(:align, val[0]); s!(:align, val[1])
742
+ result
743
+ end
744
+ .,.,
745
+
746
+ module_eval(<<'.,.,', 'modifier.y', 55)
747
+ def _reduce_33(val, _values, result)
748
+ s!(:align, val[0]); s!(:align, val[1])
749
+ result
750
+ end
751
+ .,.,
752
+
753
+ module_eval(<<'.,.,', 'modifier.y', 56)
754
+ def _reduce_34(val, _values, result)
755
+ s!(:align, val[0])
756
+ result
757
+ end
758
+ .,.,
759
+
760
+ module_eval(<<'.,.,', 'modifier.y', 57)
761
+ def _reduce_35(val, _values, result)
762
+ s!(:align, val[0])
763
+ result
764
+ end
765
+ .,.,
766
+
767
+ # reduce 36 omitted
768
+
769
+ # reduce 37 omitted
770
+
771
+ # reduce 38 omitted
772
+
773
+ # reduce 39 omitted
774
+
775
+ # reduce 40 omitted
776
+
777
+ # reduce 41 omitted
778
+
779
+ # reduce 42 omitted
780
+
781
+ module_eval(<<'.,.,', 'modifier.y', 62)
782
+ def _reduce_43(val, _values, result)
783
+ s!(:border, val[0])
784
+ result
785
+ end
786
+ .,.,
787
+
788
+ # reduce 44 omitted
789
+
790
+ # reduce 45 omitted
791
+
792
+ # reduce 46 omitted
793
+
794
+ # reduce 47 omitted
795
+
796
+ # reduce 48 omitted
797
+
798
+ # reduce 49 omitted
799
+
800
+ # reduce 50 omitted
801
+
802
+ # reduce 51 omitted
803
+
804
+ # reduce 52 omitted
805
+
806
+ # reduce 53 omitted
807
+
808
+ # reduce 54 omitted
809
+
810
+ # reduce 55 omitted
811
+
812
+ # reduce 56 omitted
813
+
814
+ # reduce 57 omitted
815
+
816
+ # reduce 58 omitted
817
+
818
+ # reduce 59 omitted
819
+
820
+ # reduce 60 omitted
821
+
822
+ # reduce 61 omitted
823
+
824
+ # reduce 62 omitted
825
+
826
+ # reduce 63 omitted
827
+
828
+ # reduce 64 omitted
829
+
830
+ # reduce 65 omitted
831
+
832
+ # reduce 66 omitted
833
+
834
+ # reduce 67 omitted
835
+
836
+ # reduce 68 omitted
837
+
838
+ # reduce 69 omitted
839
+
840
+ # reduce 70 omitted
841
+
842
+ # reduce 71 omitted
843
+
844
+ # reduce 72 omitted
845
+
846
+ # reduce 73 omitted
847
+
848
+ # reduce 74 omitted
849
+
850
+ # reduce 75 omitted
851
+
852
+ # reduce 76 omitted
853
+
854
+ # reduce 77 omitted
855
+
856
+ # reduce 78 omitted
857
+
858
+ # reduce 79 omitted
859
+
860
+ # reduce 80 omitted
861
+
862
+ # reduce 81 omitted
863
+
864
+ # reduce 82 omitted
865
+
866
+ # reduce 83 omitted
867
+
868
+ # reduce 84 omitted
869
+
870
+ # reduce 85 omitted
871
+
872
+ # reduce 86 omitted
873
+
874
+ # reduce 87 omitted
875
+
876
+ # reduce 88 omitted
877
+
878
+ # reduce 89 omitted
879
+
880
+ # reduce 90 omitted
881
+
882
+ # reduce 91 omitted
883
+
884
+ # reduce 92 omitted
885
+
886
+ # reduce 93 omitted
887
+
888
+ # reduce 94 omitted
889
+
890
+ # reduce 95 omitted
891
+
892
+ # reduce 96 omitted
893
+
894
+ # reduce 97 omitted
895
+
896
+ # reduce 98 omitted
897
+
898
+ # reduce 99 omitted
899
+
900
+ # reduce 100 omitted
901
+
902
+ # reduce 101 omitted
903
+
904
+ # reduce 102 omitted
905
+
906
+ # reduce 103 omitted
907
+
908
+ # reduce 104 omitted
909
+
910
+ # reduce 105 omitted
911
+
912
+ # reduce 106 omitted
913
+
914
+ # reduce 107 omitted
915
+
916
+ def _reduce_none(val, _values, result)
917
+ val[0]
918
+ end
919
+
920
+ end # class ModifierParser
921
+ end # module CSVPlusPlus