commit
message
[dist] clean dist
author
Ben Vogt <[email protected]>
date
2017-09-29 23:31:04
stats
10 file(s) changed,
1591 insertions(+),
3928 deletions(-)
files
dist/Errors.js
dist/Formulas/AllFormulas.js
dist/Formulas/Info.js
dist/Formulas/Math.js
dist/Formulas/Text.js
dist/NewParser.js
dist/Parser/Parser.js
dist/Parser/ParserConstants.js
dist/Utilities/ObjectFromPairs.js
dist/parser.js
1diff --git a/dist/Errors.js b/dist/Errors.js
2index cb943c8..b6bc269 100644
3--- a/dist/Errors.js
4+++ b/dist/Errors.js
5@@ -106,3 +106,32 @@ var ParseError = (function (_super) {
6 return ParseError;
7 }(Error));
8 exports.ParseError = ParseError;
9+/**
10+ * Constructs an error by error name.
11+ * @param {string} name - Name of error. If not one of DIV_ZERO_ERROR, NULL_ERROR, VALUE_ERROR, REF_ERROR, NAME_ERROR,
12+ * NUM_ERROR,NA_ERROR, or PARSE_ERROR, will default to ParseError.
13+ * @param {string} msg - Message for error, will default to empty string.
14+ * @returns {Error}
15+ */
16+function constructErrorByName(name, msg) {
17+ msg = msg || "";
18+ switch (name) {
19+ case DIV_ZERO_ERROR:
20+ return new DivZeroError(msg);
21+ case NULL_ERROR:
22+ return new NullError(msg);
23+ case VALUE_ERROR:
24+ return new ValueError(msg);
25+ case REF_ERROR:
26+ return new RefError(msg);
27+ case NAME_ERROR:
28+ return new NameError(msg);
29+ case NA_ERROR:
30+ return new NAError(msg);
31+ case NUM_ERROR:
32+ return new NumError(msg);
33+ default:
34+ return new ParseError(msg);
35+ }
36+}
37+exports.constructErrorByName = constructErrorByName;
38diff --git a/dist/Formulas/AllFormulas.js b/dist/Formulas/AllFormulas.js
39index 84104b2..62311d9 100644
40--- a/dist/Formulas/AllFormulas.js
41+++ b/dist/Formulas/AllFormulas.js
42@@ -75,6 +75,7 @@ exports.MROUND = Math_1.MROUND;
43 exports.FACTDOUBLE = Math_1.FACTDOUBLE;
44 exports.UNARY_PERCENT = Math_1.UNARY_PERCENT;
45 exports.MULTINOMIAL = Math_1.MULTINOMIAL;
46+exports.SERIESSUM = Math_1.SERIESSUM;
47 var Range_1 = require("./Range");
48 exports.FREQUENCY = Range_1.FREQUENCY;
49 exports.GROWTH = Range_1.GROWTH;
50@@ -218,6 +219,7 @@ exports.TRIM = Text_1.TRIM;
51 exports.LOWER = Text_1.LOWER;
52 exports.UPPER = Text_1.UPPER;
53 exports.T = Text_1.T;
54+exports.ROMAN = Text_1.ROMAN;
55 var Date_1 = require("./Date");
56 exports.DATE = Date_1.DATE;
57 exports.DATEVALUE = Date_1.DATEVALUE;
58diff --git a/dist/Formulas/Info.js b/dist/Formulas/Info.js
59index 4f9fceb..cf39d6c 100644
60--- a/dist/Formulas/Info.js
61+++ b/dist/Formulas/Info.js
62@@ -281,17 +281,18 @@ exports.ISNA = ISNA;
63 * @constructor
64 */
65 var IFERROR = function (value, valueIfError) {
66+ valueIfError = valueIfError || null;
67 ArgsChecker_1.ArgsChecker.checkLengthWithin(arguments, 1, 2, "IFERROR");
68 if (value instanceof Cell_1.Cell) {
69 if (value.hasError()) {
70- return null;
71+ return valueIfError;
72 }
73 return value;
74 }
75- if (!ISERROR(value)) {
76- return value;
77+ if (ISERROR(value)) {
78+ return valueIfError;
79 }
80- return null;
81+ return value;
82 };
83 exports.IFERROR = IFERROR;
84 /**
85diff --git a/dist/Formulas/Math.js b/dist/Formulas/Math.js
86index 95be5ab..4846561 100644
87--- a/dist/Formulas/Math.js
88+++ b/dist/Formulas/Math.js
89@@ -1378,3 +1378,26 @@ var MULTINOMIAL = function () {
90 return _fact(sum) / divisor;
91 };
92 exports.MULTINOMIAL = MULTINOMIAL;
93+/**
94+ * Returns a sum of powers of the number x in accordance with the following formula.
95+ * @param x - The number as an independent variable.
96+ * @param n - The starting power.
97+ * @param m - The number to increment by
98+ * @param coefficients - A series of coefficients. For each coefficient the series sum is extended by one section. You
99+ * can only enter coefficients using cell references.
100+ * @returns {number}
101+ * @constructor
102+ */
103+var SERIESSUM = function (x, n, m, coefficients) {
104+ ArgsChecker_1.ArgsChecker.checkLength(arguments, 4, "SERIESSUM");
105+ x = TypeConverter_1.TypeConverter.firstValueAsNumber(x);
106+ n = TypeConverter_1.TypeConverter.firstValueAsNumber(n);
107+ m = TypeConverter_1.TypeConverter.firstValueAsNumber(m);
108+ coefficients = Filter_1.Filter.flattenAndThrow(coefficients).map(TypeConverter_1.TypeConverter.valueToNumber);
109+ var result = coefficients[0] * Math.pow(x, n);
110+ for (var i = 1; i < coefficients.length; i++) {
111+ result += coefficients[i] * Math.pow(x, n + i * m);
112+ }
113+ return result;
114+};
115+exports.SERIESSUM = SERIESSUM;
116diff --git a/dist/Formulas/Text.js b/dist/Formulas/Text.js
117index 17cd668..428c66d 100644
118--- a/dist/Formulas/Text.js
119+++ b/dist/Formulas/Text.js
120@@ -456,3 +456,58 @@ var T = function (value) {
121 return "";
122 };
123 exports.T = T;
124+/**
125+ * Converts a number into a Roman numeral.
126+ * @param value - The value to convert. Must be between 0 and 3999.
127+ * @constructor
128+ * TODO: Second parameter should be 'rule_relaxation'
129+ */
130+var ROMAN = function (value) {
131+ ArgsChecker_1.ArgsChecker.checkLength(arguments, 1, "ROMAN");
132+ value = TypeConverter_1.TypeConverter.firstValueAsNumber(value);
133+ if (value < 1 || value > 3999) {
134+ throw new Errors_1.ValueError("Function ROMAN parameter 1 value is " + value
135+ + ", while valid values are between 1 and 3999 inclusive.");
136+ }
137+ // The MIT License
138+ // Copyright (c) 2008 Steven Levithan
139+ var digits = String(value).split('');
140+ var key = ['',
141+ 'C',
142+ 'CC',
143+ 'CCC',
144+ 'CD',
145+ 'D',
146+ 'DC',
147+ 'DCC',
148+ 'DCCC',
149+ 'CM',
150+ '',
151+ 'X',
152+ 'XX',
153+ 'XXX',
154+ 'XL',
155+ 'L',
156+ 'LX',
157+ 'LXX',
158+ 'LXXX',
159+ 'XC',
160+ '',
161+ 'I',
162+ 'II',
163+ 'III',
164+ 'IV',
165+ 'V',
166+ 'VI',
167+ 'VII',
168+ 'VIII',
169+ 'IX'
170+ ];
171+ var roman = '';
172+ var i = 3;
173+ while (i--) {
174+ roman = (key[+digits.pop() + (i * 10)] || '') + roman;
175+ }
176+ return new Array(+digits.join('') + 1).join('M') + roman;
177+};
178+exports.ROMAN = ROMAN;
179diff --git a/dist/NewParser.js b/dist/NewParser.js
180deleted file mode 100644
181index becf7b6..0000000
182--- a/dist/NewParser.js
183+++ /dev/null
184@@ -1,1425 +0,0 @@
185-"use strict";
186-exports.__esModule = true;
187-/* parser generated by jison 0.4.15 */
188-/*
189- Returns a Parser object of the following structure:
190-
191- Parser: {
192- yy: {}
193- }
194-
195- Parser.prototype: {
196- yy: {},
197- trace: function(),
198- symbols_: {associative list: name ==> number},
199- terminals_: {associative list: number ==> name},
200- productions_: [...],
201- performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
202- table: [...],
203- defaultActions: {...},
204- parseError: function(str, hash),
205- parse: function(input),
206-
207- lexer: {
208- EOF: 1,
209- parseError: function(str, hash),
210- setInput: function(input),
211- input: function(),
212- unput: function(str),
213- more: function(),
214- less: function(n),
215- pastInput: function(),
216- upcomingInput: function(),
217- showPosition: function(),
218- test_match: function(regex_match_array, rule_index),
219- next: function(),
220- lex: function(),
221- begin: function(condition),
222- popState: function(),
223- _currentRules: function(),
224- topState: function(),
225- pushState: function(condition),
226-
227- options: {
228- ranges: boolean (optional: true ==> token location info will include a .range[] member)
229- flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
230- backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
231- },
232-
233- performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
234- rules: [...],
235- conditions: {associative list: name ==> set},
236- }
237- }
238-
239-
240- token location info (@$, _$, etc.): {
241- first_line: n,
242- last_line: n,
243- first_column: n,
244- last_column: n,
245- range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
246- }
247-
248-
249- the parseError function receives a 'hash' object with these members for lexer and parser errors: {
250- text: (matched text)
251- token: (the produced terminal token, if any)
252- line: (yylineno)
253- }
254- while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
255- loc: (yylloc)
256- expected: (string describing the set of expected tokens)
257- recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
258- }
259- */
260-var Parser = (function () {
261- var o = function (k, v, o, l) {
262- for (o = o || {}, l = k.length; l--; o[k[l]] = v) {
263- }
264- return o;
265- }, $V0 = [1, 4], $V1 = [1, 5], $V2 = [1, 7], $V3 = [1, 10], $V4 = [1, 8], $V5 = [1, 9], $V6 = [1, 11], $V7 = [1, 16], $V8 = [1, 17], $V9 = [1, 14], $Va = [1, 15], $Vb = [1, 18], $Vc = [1, 20], $Vd = [1, 21], $Ve = [1, 22], $Vf = [1, 23], $Vg = [1, 24], $Vh = [1, 25], $Vi = [1, 26], $Vj = [1, 27], $Vk = [1, 28], $Vl = [1, 29], $Vm = [5, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 30, 31], $Vn = [5, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 30, 31, 33], $Vo = [1, 38], $Vp = [5, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 30, 31, 35], $Vq = [5, 12, 13, 15, 16, 17, 18, 19, 30, 31], $Vr = [5, 12, 15, 16, 17, 18, 30, 31], $Vs = [5, 12, 13, 15, 16, 17, 18, 19, 20, 21, 30, 31], $Vt = [15, 30, 31], $Vu = [5, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 30, 31, 32, 36];
266- var parser = {
267- lexer: undefined,
268- Parser: undefined,
269- trace: function trace() {
270- },
271- yy: {},
272- symbols_: {
273- "error": 2,
274- "expressions": 3,
275- "expression": 4,
276- "EOF": 5,
277- "variableSequence": 6,
278- "TIME_AMPM": 7,
279- "TIME_24": 8,
280- "number": 9,
281- "STRING": 10,
282- "&": 11,
283- "=": 12,
284- "+": 13,
285- "(": 14,
286- ")": 15,
287- "<": 16,
288- ">": 17,
289- "NOT": 18,
290- "-": 19,
291- "*": 20,
292- "/": 21,
293- "^": 22,
294- "FUNCTION": 23,
295- "expseq": 24,
296- "cell": 25,
297- "FIXEDCELL": 26,
298- ":": 27,
299- "CELL": 28,
300- "ARRAY": 29,
301- ";": 30,
302- ",": 31,
303- "VARIABLE": 32,
304- "DECIMAL": 33,
305- "NUMBER": 34,
306- "%": 35,
307- "#": 36,
308- "!": 37,
309- "$accept": 0,
310- "$end": 1
311- },
312- terminals_: {
313- 5: "EOF",
314- 7: "TIME_AMPM",
315- 8: "TIME_24",
316- 10: "STRING",
317- 11: "&",
318- 12: "=",
319- 13: "+",
320- 14: "(",
321- 15: ")",
322- 16: "<",
323- 17: ">",
324- 18: "NOT",
325- 19: "-",
326- 20: "*",
327- 21: "/",
328- 22: "^",
329- 23: "FUNCTION",
330- 26: "FIXEDCELL",
331- 27: ":",
332- 28: "CELL",
333- 29: "ARRAY",
334- 30: ";",
335- 31: ",",
336- 32: "VARIABLE",
337- 33: "DECIMAL",
338- 34: "NUMBER",
339- 35: "%",
340- 36: "#",
341- 37: "!"
342- },
343- productions_: [0, [3, 2], [4, 1], [4, 1], [4, 1], [4, 1], [4, 1], [4, 3], [4, 3], [4, 3], [4, 3], [4, 4], [4, 4], [4, 4], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 2], [4, 2], [4, 3], [4, 4], [4, 1], [4, 1], [4, 2], [25, 1], [25, 3], [25, 1], [25, 3], [24, 1], [24, 1], [24, 3], [24, 3], [6, 1], [6, 3], [9, 1], [9, 3], [9, 2], [2, 3], [2, 4]],
344- performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
345- /* this == yyval */
346- var $0 = $$.length - 1;
347- switch (yystate) {
348- case 1:
349- return $$[$0 - 1];
350- case 2:
351- this.$ = yy.handler.helper.callVariable.call(this, $$[$0]);
352- break;
353- case 3:
354- this.$ = yy.handler.time.call(yy.obj, $$[$0], true);
355- break;
356- case 4:
357- this.$ = yy.handler.time.call(yy.obj, $$[$0]);
358- break;
359- case 5:
360- this.$ = yy.handler.helper.number($$[$0]);
361- break;
362- case 6:
363- this.$ = yy.handler.helper.string($$[$0]);
364- break;
365- case 7:
366- this.$ = yy.handler.helper.specialMatch('&', $$[$0 - 2], $$[$0]);
367- break;
368- case 8:
369- this.$ = yy.handler.helper.logicMatch('=', $$[$0 - 2], $$[$0]);
370- break;
371- case 9:
372- this.$ = yy.handler.helper.mathMatch('+', $$[$0 - 2], $$[$0]);
373- break;
374- case 10:
375- this.$ = yy.handler.helper.number($$[$0 - 1]);
376- break;
377- case 11:
378- this.$ = yy.handler.helper.logicMatch('<=', $$[$0 - 3], $$[$0]);
379- break;
380- case 12:
381- this.$ = yy.handler.helper.logicMatch('>=', $$[$0 - 3], $$[$0]);
382- break;
383- case 13:
384- this.$ = yy.handler.helper.logicMatch('<>', $$[$0 - 3], $$[$0]);
385- break;
386- case 14:
387- this.$ = yy.handler.helper.logicMatch('NOT', $$[$0 - 2], $$[$0]);
388- break;
389- case 15:
390- this.$ = yy.handler.helper.logicMatch('>', $$[$0 - 2], $$[$0]);
391- break;
392- case 16:
393- this.$ = yy.handler.helper.logicMatch('<', $$[$0 - 2], $$[$0]);
394- break;
395- case 17:
396- this.$ = yy.handler.helper.mathMatch('-', $$[$0 - 2], $$[$0]);
397- break;
398- case 18:
399- this.$ = yy.handler.helper.mathMatch('*', $$[$0 - 2], $$[$0]);
400- break;
401- case 19:
402- this.$ = yy.handler.helper.mathMatch('/', $$[$0 - 2], $$[$0]);
403- break;
404- case 20:
405- this.$ = yy.handler.helper.mathMatch('^', $$[$0 - 2], $$[$0]);
406- break;
407- case 21:
408- var n1 = yy.handler.helper.numberInverted($$[$0]);
409- this.$ = n1;
410- if (isNaN(this.$)) {
411- this.$ = 0;
412- }
413- break;
414- case 22:
415- var n1 = yy.handler.helper.number($$[$0]);
416- this.$ = n1;
417- if (isNaN(this.$)) {
418- this.$ = 0;
419- }
420- break;
421- case 23:
422- this.$ = yy.handler.helper.callFunction.call(this, $$[$0 - 2], '');
423- break;
424- case 24:
425- this.$ = yy.handler.helper.callFunction.call(this, $$[$0 - 3], $$[$0 - 1]);
426- break;
427- case 28:
428- this.$ = yy.handler.helper.fixedCellValue.call(yy.obj, $$[$0]);
429- break;
430- case 29:
431- this.$ = yy.handler.helper.fixedCellRangeValue.call(yy.obj, $$[$0 - 2], $$[$0]);
432- break;
433- case 30:
434- this.$ = yy.handler.helper.cellValue.call(yy.obj, $$[$0]);
435- break;
436- case 31:
437- this.$ = yy.handler.helper.cellRangeValue.call(yy.obj, $$[$0 - 2], $$[$0]);
438- break;
439- case 32:
440- if (yy.handler.utils.isArray($$[$0])) {
441- this.$ = $$[$0];
442- }
443- else {
444- this.$ = [$$[$0]];
445- }
446- break;
447- case 33:
448- var result = [], arr = eval("[" + yytext + "]");
449- arr.forEach(function (item) {
450- result.push(item);
451- });
452- this.$ = result;
453- break;
454- case 34:
455- case 35:
456- $$[$0 - 2].push($$[$0]);
457- this.$ = $$[$0 - 2];
458- break;
459- case 36:
460- this.$ = [$$[$0]];
461- break;
462- case 37:
463- this.$ = (yy.handler.utils.isArray($$[$0 - 2]) ? $$[$0 - 2] : [$$[$0 - 2]]);
464- this.$.push($$[$0]);
465- break;
466- case 38:
467- this.$ = $$[$0];
468- break;
469- case 39:
470- this.$ = parseFloat($$[$0 - 2] + '.' + $$[$0]) * 1;
471- break;
472- case 40:
473- this.$ = $$[$0 - 1] * 0.01;
474- break;
475- case 41:
476- case 42:
477- this.$ = $$[$0 - 2] + $$[$0 - 1] + $$[$0];
478- break;
479- }
480- },
481- table: [{
482- 2: 13,
483- 3: 1,
484- 4: 2,
485- 6: 3,
486- 7: $V0,
487- 8: $V1,
488- 9: 6,
489- 10: $V2,
490- 13: $V3,
491- 14: $V4,
492- 19: $V5,
493- 23: $V6,
494- 25: 12,
495- 26: $V7,
496- 28: $V8,
497- 32: $V9,
498- 34: $Va,
499- 36: $Vb
500- }, { 1: [3] }, {
501- 5: [1, 19],
502- 11: $Vc,
503- 12: $Vd,
504- 13: $Ve,
505- 16: $Vf,
506- 17: $Vg,
507- 18: $Vh,
508- 19: $Vi,
509- 20: $Vj,
510- 21: $Vk,
511- 22: $Vl
512- }, o($Vm, [2, 2], { 33: [1, 30] }), o($Vm, [2, 3]), o($Vm, [2, 4]), o($Vm, [2, 5], { 35: [1, 31] }), o($Vm, [2, 6]), {
513- 2: 13,
514- 4: 32,
515- 6: 3,
516- 7: $V0,
517- 8: $V1,
518- 9: 6,
519- 10: $V2,
520- 13: $V3,
521- 14: $V4,
522- 19: $V5,
523- 23: $V6,
524- 25: 12,
525- 26: $V7,
526- 28: $V8,
527- 32: $V9,
528- 34: $Va,
529- 36: $Vb
530- }, {
531- 2: 13,
532- 4: 33,
533- 6: 3,
534- 7: $V0,
535- 8: $V1,
536- 9: 6,
537- 10: $V2,
538- 13: $V3,
539- 14: $V4,
540- 19: $V5,
541- 23: $V6,
542- 25: 12,
543- 26: $V7,
544- 28: $V8,
545- 32: $V9,
546- 34: $Va,
547- 36: $Vb
548- }, {
549- 2: 13,
550- 4: 34,
551- 6: 3,
552- 7: $V0,
553- 8: $V1,
554- 9: 6,
555- 10: $V2,
556- 13: $V3,
557- 14: $V4,
558- 19: $V5,
559- 23: $V6,
560- 25: 12,
561- 26: $V7,
562- 28: $V8,
563- 32: $V9,
564- 34: $Va,
565- 36: $Vb
566- }, { 14: [1, 35] }, o($Vm, [2, 25]), o($Vm, [2, 26], {
567- 2: 36,
568- 32: [1, 37],
569- 36: $Vb
570- }), o($Vn, [2, 36], { 36: $Vo }), o($Vp, [2, 38], { 33: [1, 39] }), o($Vm, [2, 28], { 27: [1, 40] }), o($Vm, [2, 30], { 27: [1, 41] }), { 32: [1, 42] }, { 1: [2, 1] }, {
571- 2: 13,
572- 4: 43,
573- 6: 3,
574- 7: $V0,
575- 8: $V1,
576- 9: 6,
577- 10: $V2,
578- 13: $V3,
579- 14: $V4,
580- 19: $V5,
581- 23: $V6,
582- 25: 12,
583- 26: $V7,
584- 28: $V8,
585- 32: $V9,
586- 34: $Va,
587- 36: $Vb
588- }, {
589- 2: 13,
590- 4: 44,
591- 6: 3,
592- 7: $V0,
593- 8: $V1,
594- 9: 6,
595- 10: $V2,
596- 13: $V3,
597- 14: $V4,
598- 19: $V5,
599- 23: $V6,
600- 25: 12,
601- 26: $V7,
602- 28: $V8,
603- 32: $V9,
604- 34: $Va,
605- 36: $Vb
606- }, {
607- 2: 13,
608- 4: 45,
609- 6: 3,
610- 7: $V0,
611- 8: $V1,
612- 9: 6,
613- 10: $V2,
614- 13: $V3,
615- 14: $V4,
616- 19: $V5,
617- 23: $V6,
618- 25: 12,
619- 26: $V7,
620- 28: $V8,
621- 32: $V9,
622- 34: $Va,
623- 36: $Vb
624- }, {
625- 2: 13,
626- 4: 48,
627- 6: 3,
628- 7: $V0,
629- 8: $V1,
630- 9: 6,
631- 10: $V2,
632- 12: [1, 46],
633- 13: $V3,
634- 14: $V4,
635- 17: [1, 47],
636- 19: $V5,
637- 23: $V6,
638- 25: 12,
639- 26: $V7,
640- 28: $V8,
641- 32: $V9,
642- 34: $Va,
643- 36: $Vb
644- }, {
645- 2: 13,
646- 4: 50,
647- 6: 3,
648- 7: $V0,
649- 8: $V1,
650- 9: 6,
651- 10: $V2,
652- 12: [1, 49],
653- 13: $V3,
654- 14: $V4,
655- 19: $V5,
656- 23: $V6,
657- 25: 12,
658- 26: $V7,
659- 28: $V8,
660- 32: $V9,
661- 34: $Va,
662- 36: $Vb
663- }, {
664- 2: 13,
665- 4: 51,
666- 6: 3,
667- 7: $V0,
668- 8: $V1,
669- 9: 6,
670- 10: $V2,
671- 13: $V3,
672- 14: $V4,
673- 19: $V5,
674- 23: $V6,
675- 25: 12,
676- 26: $V7,
677- 28: $V8,
678- 32: $V9,
679- 34: $Va,
680- 36: $Vb
681- }, {
682- 2: 13,
683- 4: 52,
684- 6: 3,
685- 7: $V0,
686- 8: $V1,
687- 9: 6,
688- 10: $V2,
689- 13: $V3,
690- 14: $V4,
691- 19: $V5,
692- 23: $V6,
693- 25: 12,
694- 26: $V7,
695- 28: $V8,
696- 32: $V9,
697- 34: $Va,
698- 36: $Vb
699- }, {
700- 2: 13,
701- 4: 53,
702- 6: 3,
703- 7: $V0,
704- 8: $V1,
705- 9: 6,
706- 10: $V2,
707- 13: $V3,
708- 14: $V4,
709- 19: $V5,
710- 23: $V6,
711- 25: 12,
712- 26: $V7,
713- 28: $V8,
714- 32: $V9,
715- 34: $Va,
716- 36: $Vb
717- }, {
718- 2: 13,
719- 4: 54,
720- 6: 3,
721- 7: $V0,
722- 8: $V1,
723- 9: 6,
724- 10: $V2,
725- 13: $V3,
726- 14: $V4,
727- 19: $V5,
728- 23: $V6,
729- 25: 12,
730- 26: $V7,
731- 28: $V8,
732- 32: $V9,
733- 34: $Va,
734- 36: $Vb
735- }, {
736- 2: 13,
737- 4: 55,
738- 6: 3,
739- 7: $V0,
740- 8: $V1,
741- 9: 6,
742- 10: $V2,
743- 13: $V3,
744- 14: $V4,
745- 19: $V5,
746- 23: $V6,
747- 25: 12,
748- 26: $V7,
749- 28: $V8,
750- 32: $V9,
751- 34: $Va,
752- 36: $Vb
753- }, { 32: [1, 56] }, o($Vp, [2, 40]), {
754- 11: $Vc,
755- 12: $Vd,
756- 13: $Ve,
757- 15: [1, 57],
758- 16: $Vf,
759- 17: $Vg,
760- 18: $Vh,
761- 19: $Vi,
762- 20: $Vj,
763- 21: $Vk,
764- 22: $Vl
765- }, o($Vq, [2, 21], { 11: $Vc, 20: $Vj, 21: $Vk, 22: $Vl }), o($Vq, [2, 22], {
766- 11: $Vc,
767- 20: $Vj,
768- 21: $Vk,
769- 22: $Vl
770- }), {
771- 2: 13,
772- 4: 60,
773- 6: 3,
774- 7: $V0,
775- 8: $V1,
776- 9: 6,
777- 10: $V2,
778- 13: $V3,
779- 14: $V4,
780- 15: [1, 58],
781- 19: $V5,
782- 23: $V6,
783- 24: 59,
784- 25: 12,
785- 26: $V7,
786- 28: $V8,
787- 29: [1, 61],
788- 32: $V9,
789- 34: $Va,
790- 36: $Vb
791- }, o($Vm, [2, 27]), { 36: $Vo }, { 32: [1, 62] }, { 34: [1, 63] }, { 26: [1, 64] }, { 28: [1, 65] }, { 37: [1, 66] }, o($Vm, [2, 7]), o([5, 12, 15, 30, 31], [2, 8], {
792- 11: $Vc,
793- 13: $Ve,
794- 16: $Vf,
795- 17: $Vg,
796- 18: $Vh,
797- 19: $Vi,
798- 20: $Vj,
799- 21: $Vk,
800- 22: $Vl
801- }), o($Vq, [2, 9], { 11: $Vc, 20: $Vj, 21: $Vk, 22: $Vl }), {
802- 2: 13,
803- 4: 67,
804- 6: 3,
805- 7: $V0,
806- 8: $V1,
807- 9: 6,
808- 10: $V2,
809- 13: $V3,
810- 14: $V4,
811- 19: $V5,
812- 23: $V6,
813- 25: 12,
814- 26: $V7,
815- 28: $V8,
816- 32: $V9,
817- 34: $Va,
818- 36: $Vb
819- }, {
820- 2: 13,
821- 4: 68,
822- 6: 3,
823- 7: $V0,
824- 8: $V1,
825- 9: 6,
826- 10: $V2,
827- 13: $V3,
828- 14: $V4,
829- 19: $V5,
830- 23: $V6,
831- 25: 12,
832- 26: $V7,
833- 28: $V8,
834- 32: $V9,
835- 34: $Va,
836- 36: $Vb
837- }, o($Vr, [2, 16], { 11: $Vc, 13: $Ve, 19: $Vi, 20: $Vj, 21: $Vk, 22: $Vl }), {
838- 2: 13,
839- 4: 69,
840- 6: 3,
841- 7: $V0,
842- 8: $V1,
843- 9: 6,
844- 10: $V2,
845- 13: $V3,
846- 14: $V4,
847- 19: $V5,
848- 23: $V6,
849- 25: 12,
850- 26: $V7,
851- 28: $V8,
852- 32: $V9,
853- 34: $Va,
854- 36: $Vb
855- }, o($Vr, [2, 15], {
856- 11: $Vc,
857- 13: $Ve,
858- 19: $Vi,
859- 20: $Vj,
860- 21: $Vk,
861- 22: $Vl
862- }), o([5, 12, 15, 18, 30, 31], [2, 14], {
863- 11: $Vc,
864- 13: $Ve,
865- 16: $Vf,
866- 17: $Vg,
867- 19: $Vi,
868- 20: $Vj,
869- 21: $Vk,
870- 22: $Vl
871- }), o($Vq, [2, 17], { 11: $Vc, 20: $Vj, 21: $Vk, 22: $Vl }), o($Vs, [2, 18], {
872- 11: $Vc,
873- 22: $Vl
874- }), o($Vs, [2, 19], {
875- 11: $Vc,
876- 22: $Vl
877- }), o([5, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 30, 31], [2, 20], { 11: $Vc }), o($Vn, [2, 37]), o($Vm, [2, 10]), o($Vm, [2, 23]), {
878- 15: [1, 70],
879- 30: [1, 71],
880- 31: [1, 72]
881- }, o($Vt, [2, 32], {
882- 11: $Vc,
883- 12: $Vd,
884- 13: $Ve,
885- 16: $Vf,
886- 17: $Vg,
887- 18: $Vh,
888- 19: $Vi,
889- 20: $Vj,
890- 21: $Vk,
891- 22: $Vl
892- }), o($Vt, [2, 33]), { 37: [1, 73] }, o($Vp, [2, 39]), o($Vm, [2, 29]), o($Vm, [2, 31]), o($Vu, [2, 41]), o($Vr, [2, 11], {
893- 11: $Vc,
894- 13: $Ve,
895- 19: $Vi,
896- 20: $Vj,
897- 21: $Vk,
898- 22: $Vl
899- }), o($Vr, [2, 13], { 11: $Vc, 13: $Ve, 19: $Vi, 20: $Vj, 21: $Vk, 22: $Vl }), o($Vr, [2, 12], {
900- 11: $Vc,
901- 13: $Ve,
902- 19: $Vi,
903- 20: $Vj,
904- 21: $Vk,
905- 22: $Vl
906- }), o($Vm, [2, 24]), {
907- 2: 13,
908- 4: 74,
909- 6: 3,
910- 7: $V0,
911- 8: $V1,
912- 9: 6,
913- 10: $V2,
914- 13: $V3,
915- 14: $V4,
916- 19: $V5,
917- 23: $V6,
918- 25: 12,
919- 26: $V7,
920- 28: $V8,
921- 32: $V9,
922- 34: $Va,
923- 36: $Vb
924- }, {
925- 2: 13,
926- 4: 75,
927- 6: 3,
928- 7: $V0,
929- 8: $V1,
930- 9: 6,
931- 10: $V2,
932- 13: $V3,
933- 14: $V4,
934- 19: $V5,
935- 23: $V6,
936- 25: 12,
937- 26: $V7,
938- 28: $V8,
939- 32: $V9,
940- 34: $Va,
941- 36: $Vb
942- }, o($Vu, [2, 42]), o($Vt, [2, 34], {
943- 11: $Vc,
944- 12: $Vd,
945- 13: $Ve,
946- 16: $Vf,
947- 17: $Vg,
948- 18: $Vh,
949- 19: $Vi,
950- 20: $Vj,
951- 21: $Vk,
952- 22: $Vl
953- }), o($Vt, [2, 35], { 11: $Vc, 12: $Vd, 13: $Ve, 16: $Vf, 17: $Vg, 18: $Vh, 19: $Vi, 20: $Vj, 21: $Vk, 22: $Vl })],
954- defaultActions: { 19: [2, 1] },
955- parseError: function parseError(str, hash) {
956- if (hash.recoverable) {
957- this.trace(str);
958- }
959- else {
960- throw new Error(str);
961- }
962- },
963- parse: function parse(input) {
964- var self = this, stack = [0], tstack = [], // token stack
965- vstack = [null], // semantic value stack
966- lstack = [], // location stack
967- table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
968- var args = lstack.slice.call(arguments, 1);
969- //this.reductionCount = this.shiftCount = 0;
970- var lexer = Object.create(this.lexer);
971- var sharedState = { yy: { parseError: undefined, lexer: { parseError: undefined }, parser: { parseError: undefined } } };
972- // copy state
973- for (var k in this.yy) {
974- if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
975- sharedState.yy[k] = this.yy[k];
976- }
977- }
978- lexer.setInput(input, sharedState.yy);
979- sharedState.yy.lexer = lexer;
980- sharedState.yy.parser = this;
981- if (typeof lexer.yylloc == 'undefined') {
982- lexer.yylloc = {};
983- }
984- var yyloc = lexer.yylloc;
985- lstack.push(yyloc);
986- var ranges = lexer.options && lexer.options.ranges;
987- if (typeof sharedState.yy.parseError === 'function') {
988- this.parseError = sharedState.yy.parseError;
989- }
990- else {
991- this.parseError = Object.getPrototypeOf(this).parseError;
992- }
993- function popStack(n) {
994- stack.length = stack.length - 2 * n;
995- vstack.length = vstack.length - n;
996- lstack.length = lstack.length - n;
997- }
998- function lex() {
999- var token;
1000- token = lexer.lex() || EOF;
1001- // if token isn't its numeric value, convert
1002- if (typeof token !== 'number') {
1003- token = self.symbols_[token] || token;
1004- }
1005- return token;
1006- }
1007- var symbol, preErrorSymbol, state, action, a, r, yyval = {
1008- $: undefined,
1009- _$: undefined
1010- }, p, len, newState, expected;
1011- while (true) {
1012- // retreive state number from top of stack
1013- state = stack[stack.length - 1];
1014- // use default actions if available
1015- if (this.defaultActions[state]) {
1016- action = this.defaultActions[state];
1017- }
1018- else {
1019- if (symbol === null || typeof symbol == 'undefined') {
1020- symbol = lex();
1021- }
1022- // read action for current state and first input
1023- action = table[state] && table[state][symbol];
1024- }
1025- // handle parse error
1026- if (typeof action === 'undefined' || !action.length || !action[0]) {
1027- var error_rule_depth;
1028- var errStr = '';
1029- // Return the rule stack depth where the nearest error rule can be found.
1030- // Return FALSE when no error recovery rule was found.
1031- this.locateNearestErrorRecoveryRule = function (state) {
1032- var stack_probe = stack.length - 1;
1033- var depth = 0;
1034- // try to recover from error
1035- for (;;) {
1036- // check for error recovery rule in this state
1037- if ((TERROR.toString()) in table[state]) {
1038- return depth;
1039- }
1040- if (state === 0 || stack_probe < 2) {
1041- return false; // No suitable error recovery rule available.
1042- }
1043- stack_probe -= 2; // popStack(1): [symbol, action]
1044- state = stack[stack_probe];
1045- ++depth;
1046- }
1047- };
1048- if (!recovering) {
1049- // first see if there's any chance at hitting an error recovery rule:
1050- error_rule_depth = this.locateNearestErrorRecoveryRule(state);
1051- // Report error
1052- expected = [];
1053- for (p in table[state]) {
1054- if (this.terminals_[p] && p > TERROR) {
1055- expected.push("'" + this.terminals_[p] + "'");
1056- }
1057- }
1058- if (lexer.showPosition) {
1059- errStr = 'Parse error on line ' + (yylineno + 1) + ":\n" + lexer.showPosition() + "\nExpecting " + expected.join(', ') + ", got '" + (this.terminals_[symbol] || symbol) + "'";
1060- }
1061- else {
1062- errStr = 'Parse error on line ' + (yylineno + 1) + ": Unexpected " +
1063- (symbol == EOF ? "end of input" :
1064- ("'" + (this.terminals_[symbol] || symbol) + "'"));
1065- }
1066- this.parseError(errStr, {
1067- text: lexer.match,
1068- token: this.terminals_[symbol] || symbol,
1069- line: lexer.yylineno,
1070- loc: yyloc,
1071- expected: expected,
1072- recoverable: (error_rule_depth !== false)
1073- });
1074- }
1075- else if (preErrorSymbol !== EOF) {
1076- error_rule_depth = this.locateNearestErrorRecoveryRule(state);
1077- }
1078- // just recovered from another error
1079- if (recovering == 3) {
1080- if (symbol === EOF || preErrorSymbol === EOF) {
1081- throw new Error(errStr || 'Parsing halted while starting to recover from another error.');
1082- }
1083- // discard current lookahead and grab another
1084- yyleng = lexer.yyleng;
1085- yytext = lexer.yytext;
1086- yylineno = lexer.yylineno;
1087- yyloc = lexer.yylloc;
1088- symbol = lex();
1089- }
1090- // try to recover from error
1091- if (error_rule_depth === false) {
1092- throw new Error(errStr || 'Parsing halted. No suitable error recovery rule available.');
1093- }
1094- popStack(error_rule_depth);
1095- preErrorSymbol = (symbol == TERROR ? null : symbol); // save the lookahead token
1096- symbol = TERROR; // insert generic error symbol as new lookahead
1097- state = stack[stack.length - 1];
1098- action = table[state] && table[state][TERROR];
1099- recovering = 3; // allow 3 real symbols to be shifted before reporting a new error
1100- }
1101- // this shouldn't happen, unless resolve defaults are off
1102- if (action[0] instanceof Array && action.length > 1) {
1103- throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
1104- }
1105- switch (action[0]) {
1106- case 1:
1107- //this.shiftCount++;
1108- stack.push(symbol);
1109- vstack.push(lexer.yytext);
1110- lstack.push(lexer.yylloc);
1111- stack.push(action[1]); // push state
1112- symbol = null;
1113- if (!preErrorSymbol) {
1114- yyleng = lexer.yyleng;
1115- yytext = lexer.yytext;
1116- yylineno = lexer.yylineno;
1117- yyloc = lexer.yylloc;
1118- if (recovering > 0) {
1119- recovering--;
1120- }
1121- }
1122- else {
1123- // error just occurred, resume old lookahead f/ before error
1124- symbol = preErrorSymbol;
1125- preErrorSymbol = null;
1126- }
1127- break;
1128- case 2:
1129- // reduce
1130- //this.reductionCount++;
1131- len = this.productions_[action[1]][1];
1132- // perform semantic action
1133- yyval.$ = vstack[vstack.length - len]; // default to $$ = $1
1134- // default location, uses first token for firsts, last for lasts
1135- yyval._$ = {
1136- first_line: lstack[lstack.length - (len || 1)].first_line,
1137- last_line: lstack[lstack.length - 1].last_line,
1138- first_column: lstack[lstack.length - (len || 1)].first_column,
1139- last_column: lstack[lstack.length - 1].last_column
1140- };
1141- if (ranges) {
1142- yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
1143- }
1144- r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
1145- if (typeof r !== 'undefined') {
1146- return r;
1147- }
1148- // pop off stack
1149- if (len) {
1150- stack = stack.slice(0, -1 * len * 2);
1151- vstack = vstack.slice(0, -1 * len);
1152- lstack = lstack.slice(0, -1 * len);
1153- }
1154- stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce)
1155- vstack.push(yyval.$);
1156- lstack.push(yyval._$);
1157- // goto new state = table[STATE][NONTERMINAL]
1158- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
1159- stack.push(newState);
1160- break;
1161- case 3:
1162- // accept
1163- return true;
1164- }
1165- }
1166- }
1167- };
1168- /* generated by jison-lex 0.3.4 */
1169- var lexer = (function () {
1170- var lexer = ({
1171- EOF: 1,
1172- parseError: function parseError(str, hash) {
1173- if (this.yy.parser) {
1174- this.yy.parser.parseError(str, hash);
1175- }
1176- else {
1177- throw new Error(str);
1178- }
1179- },
1180- // resets the lexer, sets new input
1181- setInput: function (input, yy) {
1182- this.yy = yy || this.yy || {};
1183- this._input = input;
1184- this._more = this._backtrack = this.done = false;
1185- this.yylineno = this.yyleng = 0;
1186- this.yytext = this.matched = this.match = '';
1187- this.conditionStack = ['INITIAL'];
1188- this.yylloc = {
1189- first_line: 1,
1190- first_column: 0,
1191- last_line: 1,
1192- last_column: 0
1193- };
1194- if (this.options.ranges) {
1195- this.yylloc.range = [0, 0];
1196- }
1197- this.offset = 0;
1198- return this;
1199- },
1200- // consumes and returns one char from the input
1201- input: function () {
1202- var ch = this._input[0];
1203- this.yytext += ch;
1204- this.yyleng++;
1205- this.offset++;
1206- this.match += ch;
1207- this.matched += ch;
1208- var lines = ch.match(/(?:\r\n?|\n).*/g);
1209- if (lines) {
1210- this.yylineno++;
1211- this.yylloc.last_line++;
1212- }
1213- else {
1214- this.yylloc.last_column++;
1215- }
1216- if (this.options.ranges) {
1217- this.yylloc.range[1]++;
1218- }
1219- this._input = this._input.slice(1);
1220- return ch;
1221- },
1222- // unshifts one char (or a string) into the input
1223- unput: function (ch) {
1224- var len = ch.length;
1225- var lines = ch.split(/(?:\r\n?|\n)/g);
1226- this._input = ch + this._input;
1227- this.yytext = this.yytext.substr(0, this.yytext.length - len);
1228- //this.yyleng -= len;
1229- this.offset -= len;
1230- var oldLines = this.match.split(/(?:\r\n?|\n)/g);
1231- this.match = this.match.substr(0, this.match.length - 1);
1232- this.matched = this.matched.substr(0, this.matched.length - 1);
1233- if (lines.length - 1) {
1234- this.yylineno -= lines.length - 1;
1235- }
1236- var r = this.yylloc.range;
1237- this.yylloc = {
1238- first_line: this.yylloc.first_line,
1239- last_line: this.yylineno + 1,
1240- first_column: this.yylloc.first_column,
1241- last_column: lines ?
1242- (lines.length === oldLines.length ? this.yylloc.first_column : 0)
1243- + oldLines[oldLines.length - lines.length].length - lines[0].length :
1244- this.yylloc.first_column - len
1245- };
1246- if (this.options.ranges) {
1247- this.yylloc.range = [r[0], r[0] + this.yyleng - len];
1248- }
1249- this.yyleng = this.yytext.length;
1250- return this;
1251- },
1252- // When called from action, caches matched text and appends it on next action
1253- more: function () {
1254- this._more = true;
1255- return this;
1256- },
1257- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
1258- reject: function () {
1259- if (this.options.backtrack_lexer) {
1260- this._backtrack = true;
1261- }
1262- else {
1263- return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), {
1264- text: "",
1265- token: null,
1266- line: this.yylineno
1267- });
1268- }
1269- return this;
1270- },
1271- // retain first n characters of the match
1272- less: function (n) {
1273- this.unput(this.match.slice(n));
1274- },
1275- // displays already matched input, i.e. for error messages
1276- pastInput: function () {
1277- var past = this.matched.substr(0, this.matched.length - this.match.length);
1278- return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
1279- },
1280- // displays upcoming input, i.e. for error messages
1281- upcomingInput: function () {
1282- var next = this.match;
1283- if (next.length < 20) {
1284- next += this._input.substr(0, 20 - next.length);
1285- }
1286- return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
1287- },
1288- // displays the character position where the lexing error occurred, i.e. for error messages
1289- showPosition: function () {
1290- var pre = this.pastInput();
1291- var c = new Array(pre.length + 1).join("-");
1292- return pre + this.upcomingInput() + "\n" + c + "^";
1293- },
1294- // test the lexed token: return FALSE when not a match, otherwise return token
1295- test_match: function (match, indexed_rule) {
1296- var token, lines, backup;
1297- if (this.options.backtrack_lexer) {
1298- // save context
1299- backup = {
1300- yylineno: this.yylineno,
1301- yylloc: {
1302- first_line: this.yylloc.first_line,
1303- last_line: this.last_line,
1304- first_column: this.yylloc.first_column,
1305- last_column: this.yylloc.last_column
1306- },
1307- yytext: this.yytext,
1308- match: this.match,
1309- matches: this.matches,
1310- matched: this.matched,
1311- yyleng: this.yyleng,
1312- offset: this.offset,
1313- _more: this._more,
1314- _input: this._input,
1315- yy: this.yy,
1316- conditionStack: this.conditionStack.slice(0),
1317- done: this.done
1318- };
1319- if (this.options.ranges) {
1320- backup.yylloc.range = this.yylloc.range.slice(0);
1321- }
1322- }
1323- lines = match[0].match(/(?:\r\n?|\n).*/g);
1324- if (lines) {
1325- this.yylineno += lines.length;
1326- }
1327- this.yylloc = {
1328- first_line: this.yylloc.last_line,
1329- last_line: this.yylineno + 1,
1330- first_column: this.yylloc.last_column,
1331- last_column: lines ?
1332- lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
1333- this.yylloc.last_column + match[0].length
1334- };
1335- this.yytext += match[0];
1336- this.match += match[0];
1337- this.matches = match;
1338- this.yyleng = this.yytext.length;
1339- if (this.options.ranges) {
1340- this.yylloc.range = [this.offset, this.offset += this.yyleng];
1341- }
1342- this._more = false;
1343- this._backtrack = false;
1344- this._input = this._input.slice(match[0].length);
1345- this.matched += match[0];
1346- token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
1347- if (this.done && this._input) {
1348- this.done = false;
1349- }
1350- if (token) {
1351- return token;
1352- }
1353- else if (this._backtrack) {
1354- // recover context
1355- for (var k in backup) {
1356- this[k] = backup[k];
1357- }
1358- return false; // rule action called reject() implying the next rule should be tested instead.
1359- }
1360- return false;
1361- },
1362- // return next match in input
1363- next: function () {
1364- if (this.done) {
1365- return this.EOF;
1366- }
1367- if (!this._input) {
1368- this.done = true;
1369- }
1370- var token, match, tempMatch, index;
1371- if (!this._more) {
1372- this.yytext = '';
1373- this.match = '';
1374- }
1375- var rules = this._currentRules();
1376- for (var i = 0; i < rules.length; i++) {
1377- tempMatch = this._input.match(this.rules[rules[i]]);
1378- if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
1379- match = tempMatch;
1380- index = i;
1381- if (this.options.backtrack_lexer) {
1382- token = this.test_match(tempMatch, rules[i]);
1383- if (token !== false) {
1384- return token;
1385- }
1386- else if (this._backtrack) {
1387- match = false;
1388- continue; // rule action called reject() implying a rule MISmatch.
1389- }
1390- else {
1391- // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
1392- return false;
1393- }
1394- }
1395- else if (!this.options.flex) {
1396- break;
1397- }
1398- }
1399- }
1400- if (match) {
1401- token = this.test_match(match, rules[index]);
1402- if (token !== false) {
1403- return token;
1404- }
1405- // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
1406- return false;
1407- }
1408- if (this._input === "") {
1409- return this.EOF;
1410- }
1411- else {
1412- return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
1413- text: "",
1414- token: null,
1415- line: this.yylineno
1416- });
1417- }
1418- },
1419- // return next match that has a token
1420- lex: function lex() {
1421- var r = this.next();
1422- if (r) {
1423- return r;
1424- }
1425- else {
1426- return this.lex();
1427- }
1428- },
1429- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
1430- begin: function begin(condition) {
1431- this.conditionStack.push(condition);
1432- },
1433- // pop the previously active lexer condition state off the condition stack
1434- popState: function popState() {
1435- var n = this.conditionStack.length - 1;
1436- if (n > 0) {
1437- return this.conditionStack.pop();
1438- }
1439- else {
1440- return this.conditionStack[0];
1441- }
1442- },
1443- // produce the lexer rule set which is active for the currently active lexer condition state
1444- _currentRules: function _currentRules() {
1445- if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
1446- return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
1447- }
1448- else {
1449- return this.conditions["INITIAL"].rules;
1450- }
1451- },
1452- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
1453- topState: function topState(n) {
1454- n = this.conditionStack.length - 1 - Math.abs(n || 0);
1455- if (n >= 0) {
1456- return this.conditionStack[n];
1457- }
1458- else {
1459- return "INITIAL";
1460- }
1461- },
1462- // alias for begin(condition)
1463- pushState: function pushState(condition) {
1464- this.begin(condition);
1465- },
1466- // return the number of states currently on the stack
1467- stateStackSize: function stateStackSize() {
1468- return this.conditionStack.length;
1469- },
1470- options: {},
1471- performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
1472- var YYSTATE = YY_START;
1473- switch ($avoiding_name_collisions) {
1474- case 0:
1475- break;
1476- case 1:
1477- return 10;
1478- case 2:
1479- return 10;
1480- case 3:
1481- return 23;
1482- case 4:
1483- return 7;
1484- case 5:
1485- return 8;
1486- case 6:
1487- //if (yy.obj.type == 'cell') return 26;
1488- //return 32;
1489- return 26;
1490- case 7:
1491- //if (yy.obj.type == 'cell') return 28;
1492- //return 32;
1493- return 28;
1494- case 8:
1495- return 23;
1496- case 9:
1497- return 32;
1498- case 10:
1499- return 32;
1500- case 11:
1501- return 34;
1502- case 12:
1503- return 29;
1504- case 13:
1505- break;
1506- case 14:
1507- return 11;
1508- case 15:
1509- return ' ';
1510- case 16:
1511- return 33;
1512- case 17:
1513- return 27;
1514- case 18:
1515- return 30;
1516- case 19:
1517- return 31;
1518- case 20:
1519- return 20;
1520- case 21:
1521- return 21;
1522- case 22:
1523- return 19;
1524- case 23:
1525- return 13;
1526- case 24:
1527- return 22;
1528- case 25:
1529- return 14;
1530- case 26:
1531- return 15;
1532- case 27:
1533- return 17;
1534- case 28:
1535- return 16;
1536- case 29:
1537- return 18;
1538- case 30:
1539- return '"';
1540- case 31:
1541- return "'";
1542- case 32:
1543- return "!";
1544- case 33:
1545- return 12;
1546- case 34:
1547- return 35;
1548- case 35:
1549- return 36;
1550- case 36:
1551- return 5;
1552- }
1553- },
1554- // NOTE: Alterations made in some regular-expressions to allow for formulas containing dot-notation. Eg: F.INV
1555- rules: [/^(?:\s+)/,
1556- /^(?:"(\\["]|[^"])*")/,
1557- /^(?:'(\\[']|[^'])*')/,
1558- /^(?:[A-Za-z.]{1,}[A-Za-z_0-9]+(?=[(]))/,
1559- /^(?:([0]?[1-9]|1[0-2])[:][0-5][0-9]([:][0-5][0-9])?[ ]?(AM|am|aM|Am|PM|pm|pM|Pm))/,
1560- /^(?:([0]?[0-9]|1[0-9]|2[0-3])[:][0-5][0-9]([:][0-5][0-9])?)/,
1561- /^(?:\$[A-Za-z]+\$[0-9]+)/,
1562- /^(?:[A-Za-z]+[0-9]+)/,
1563- /^(?:[A-Za-z.]+(?=[(]))/,
1564- /^(?:[A-Za-z]{1,}[A-Za-z_0-9]+)/,
1565- /^(?:[A-Za-z_]+)/,
1566- /^(?:[0-9]+)/,
1567- /^(?:\[(.*)?\])/,
1568- /^(?:\$)/,
1569- /^(?:&)/,
1570- /^(?: )/,
1571- /^(?:[.])/,
1572- /^(?::)/,
1573- /^(?:;)/,
1574- /^(?:,)/,
1575- /^(?:\*)/,
1576- /^(?:\/)/,
1577- /^(?:-)/,
1578- /^(?:\+)/,
1579- /^(?:\^)/,
1580- /^(?:\()/,
1581- /^(?:\))/,
1582- /^(?:>)/,
1583- /^(?:<)/,
1584- /^(?:NOT\b)/,
1585- /^(?:")/,
1586- /^(?:')/,
1587- /^(?:!)/,
1588- /^(?:=)/,
1589- /^(?:%)/,
1590- /^(?:[#])/,
1591- /^(?:$)/],
1592- conditions: {
1593- "INITIAL": {
1594- "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36],
1595- "inclusive": true
1596- }
1597- }
1598- });
1599- return lexer;
1600- })();
1601- parser.lexer = lexer;
1602- function Parser() {
1603- this.yy = {};
1604- }
1605- Parser.prototype = parser;
1606- parser.Parser = Parser;
1607- return new Parser;
1608-})();
1609-exports.Parser = Parser;
1610diff --git a/dist/Parser/Parser.js b/dist/Parser/Parser.js
1611index 804cf21..9dce17b 100644
1612--- a/dist/Parser/Parser.js
1613+++ b/dist/Parser/Parser.js
1614@@ -1,389 +1,14 @@
1615 "use strict";
1616 exports.__esModule = true;
1617-var ObjectFromPairs_1 = require("../Utilities/ObjectFromPairs");
1618 var Errors_1 = require("../Errors");
1619 var Formulas_1 = require("../Formulas");
1620-// Rules represent the Regular Expressions that will be used in sequence to match a given input to the Parser.
1621-var WHITE_SPACE_RULE = /^(?:\s+)/; // rule 0
1622-var DOUBLE_QUOTES_RULE = /^(?:"(\\["]|[^"])*")/; // rule 1
1623-var SINGLE_QUOTES_RULE = /^(?:'(\\[']|[^'])*')/; // rule 2
1624-var FORMULA_NAME_RULE = /^(?:[A-Za-z.]{1,}[A-Za-z_0-9]+(?=[(]))/; // Changed from /^(?:[A-Za-z]{1,}[A-Za-z_0-9]+(?=[(]))/ // rule 3
1625-var DATE_RULE = /^(?:([0]?[1-9]|1[0-2])[:][0-5][0-9]([:][0-5][0-9])?[ ]?(AM|am|aM|Am|PM|pm|pM|Pm))/; // rule 4
1626-var TIME_RULE = /^(?:([0]?[0-9]|1[0-9]|2[0-3])[:][0-5][0-9]([:][0-5][0-9])?)/; // rule 5
1627-var $_A1_CELL_RULE = /^(?:\$[A-Za-z]+\$[0-9]+)/; // rule 6
1628-var A1_CELL_RULE = /^(?:[A-Za-z]+[0-9]+)/; // rules 7
1629-var FORMULA_NAME_SIMPLE_RULE = /^(?:[A-Za-z.]+(?=[(]))/; // rule 8
1630-var VARIABLE_RULE = /^(?:[A-Za-z]{1,}[A-Za-z_0-9]+)/; // rule 9
1631-var SIMPLE_VARIABLE_RILE = /^(?:[A-Za-z_]+)/; //rule 10
1632-var INTEGER_RULE = /^(?:[0-9]+(?:(?:[eE])(?:[\+-])?[0-9]+)?)/; // Changed from /^(?:[0-9]+)/ // rule 11
1633-var OPEN_AND_CLOSE_OF_ARRAY_RULE = /^(?:\[(.*)?\])/; // rule 12
1634-var DOLLAR_SIGN_RULE = /^(?:\$)/; // rule 13
1635-var AMPERSAND_SIGN_RULE = /^(?:&)/; //rule 14
1636-var SINGLE_WHITESPACE_RULE = /^(?: )/; // rule 15
1637-var PERIOD_RULE = /^(?:[.])/; // rule 16
1638-var COLON_RULE = /^(?::)/; //rule 17
1639-var SEMI_COLON_RULE = /^(?:;)/; // rule 18
1640-var COMMA_RULE = /^(?:,)/; // rule 19
1641-var ASTERISK_RULE = /^(?:\*)/; //rule 20
1642-var FORWARD_SLASH_RULE = /^(?:\/)/; // rule 21
1643-var MINUS_SIGN_RULE = /^(?:-)/; // rule 22
1644-var PLUS_SIGN_RULE = /^(?:\+)/; // rule 23
1645-var CARET_SIGN_RULE = /^(?:\^)/; //rule 24
1646-var OPEN_PAREN_RULE = /^(?:\()/; // rule 25
1647-var CLOSE_PAREN_RULE = /^(?:\))/; // rule 26
1648-var GREATER_THAN_SIGN_RULE = /^(?:>)/; // rule 27
1649-var LESS_THAN_SIGN_RULE = /^(?:<)/; // rule 28
1650-var NOT_RULE = /^(?:NOT\b)/; // rule 29
1651-var OPEN_DOUBLE_QUOTE = /^(?:")/; // rule 30
1652-var OPEN_SINGLE_QUITE = /^(?:')/; // rule 31
1653-var EXCLAMATION_POINT_RULE = /^(?:!)/; // rule 32
1654-var EQUALS_SIGN_RULE = /^(?:=)/; // rule 33
1655-var PERCENT_SIGN_RULE = /^(?:%)/; // rule 34
1656-var HASH_SIGN_RULE = /^(?:[#])/; // rule 35
1657-var END_OF_STRING_RULE = /^(?:$)/; // rule 36
1658-// Sequential rules to use when parsing a given input.
1659-var RULES = [
1660- WHITE_SPACE_RULE,
1661- DOUBLE_QUOTES_RULE,
1662- SINGLE_QUOTES_RULE,
1663- FORMULA_NAME_RULE,
1664- DATE_RULE,
1665- TIME_RULE,
1666- $_A1_CELL_RULE,
1667- A1_CELL_RULE,
1668- FORMULA_NAME_SIMPLE_RULE,
1669- VARIABLE_RULE,
1670- SIMPLE_VARIABLE_RILE,
1671- INTEGER_RULE,
1672- OPEN_AND_CLOSE_OF_ARRAY_RULE,
1673- DOLLAR_SIGN_RULE,
1674- AMPERSAND_SIGN_RULE,
1675- SINGLE_WHITESPACE_RULE,
1676- PERIOD_RULE,
1677- COLON_RULE,
1678- SEMI_COLON_RULE,
1679- COMMA_RULE,
1680- ASTERISK_RULE,
1681- FORWARD_SLASH_RULE,
1682- MINUS_SIGN_RULE,
1683- PLUS_SIGN_RULE,
1684- CARET_SIGN_RULE,
1685- OPEN_PAREN_RULE,
1686- CLOSE_PAREN_RULE,
1687- GREATER_THAN_SIGN_RULE,
1688- LESS_THAN_SIGN_RULE,
1689- NOT_RULE,
1690- OPEN_DOUBLE_QUOTE,
1691- OPEN_SINGLE_QUITE,
1692- EXCLAMATION_POINT_RULE,
1693- EQUALS_SIGN_RULE,
1694- PERCENT_SIGN_RULE,
1695- HASH_SIGN_RULE,
1696- END_OF_STRING_RULE
1697-];
1698-/**
1699- * Represents the length to reduce the stack by, and the token index value that will replace those tokens in the stack.
1700- */
1701-var ReductionPair = (function () {
1702- function ReductionPair(replacementTokenIndex, length) {
1703- this.lengthToReduceStackBy = length;
1704- this.replacementTokenIndex = replacementTokenIndex;
1705- }
1706- /**
1707- * Get the number representing the length to reduce the stack by.
1708- * @returns {number}
1709- */
1710- ReductionPair.prototype.getLengthToReduceStackBy = function () {
1711- return this.lengthToReduceStackBy;
1712- };
1713- /**
1714- * Get the replacement token index.
1715- * @returns {number}
1716- */
1717- ReductionPair.prototype.getReplacementTokenIndex = function () {
1718- return this.replacementTokenIndex;
1719- };
1720- return ReductionPair;
1721-}());
1722-/**
1723- * Productions is used to look up both the number to use when reducing the stack (productions[x][1]) and the semantic
1724- * value that will replace the tokens in the stack (productions[x][0]).
1725- * @type {Array<ReductionPair>}
1726- */
1727-var productions = [];
1728-productions[0 /* NO_ACTION */] = null;
1729-productions[1 /* RETURN_LAST */] = new ReductionPair(3, 2);
1730-productions[2 /* CALL_VARIABLE */] = new ReductionPair(4, 1);
1731-productions[3 /* TIME_CALL_TRUE */] = new ReductionPair(4, 1);
1732-productions[4 /* TIME_CALL */] = new ReductionPair(4, 1);
1733-productions[5 /* AS_NUMBER */] = new ReductionPair(4, 1);
1734-productions[6 /* AS_STRING */] = new ReductionPair(4, 1);
1735-productions[7 /* AMPERSAND */] = new ReductionPair(4, 3);
1736-productions[8 /* EQUALS */] = new ReductionPair(4, 3);
1737-productions[9 /* PLUS */] = new ReductionPair(4, 3);
1738-productions[10 /* LAST_NUMBER */] = new ReductionPair(4, 3);
1739-productions[11 /* LTE */] = new ReductionPair(4, 4);
1740-productions[12 /* GTE */] = new ReductionPair(4, 4);
1741-productions[13 /* NOT_EQ */] = new ReductionPair(4, 4);
1742-productions[14 /* NOT */] = new ReductionPair(4, 3);
1743-productions[15 /* GT */] = new ReductionPair(4, 3);
1744-productions[16 /* LT */] = new ReductionPair(4, 3);
1745-productions[17 /* MINUS */] = new ReductionPair(4, 3);
1746-productions[18 /* MULTIPLY */] = new ReductionPair(4, 3);
1747-productions[19 /* DIVIDE */] = new ReductionPair(4, 3);
1748-productions[20 /* TO_POWER */] = new ReductionPair(4, 3);
1749-productions[21 /* INVERT_NUM */] = new ReductionPair(4, 2);
1750-productions[22 /* TO_NUMBER_NAN_AS_ZERO */] = new ReductionPair(4, 2);
1751-productions[23 /* CALL_FUNCTION_LAST_BLANK */] = new ReductionPair(4, 3);
1752-productions[24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */] = new ReductionPair(4, 4);
1753-productions[25 /* I25 */] = new ReductionPair(4, 1);
1754-productions[26 /* I26 */] = new ReductionPair(4, 1);
1755-productions[27 /* I27 */] = new ReductionPair(4, 2);
1756-productions[28 /* FIXED_CELL_VAL */] = new ReductionPair(25, 1);
1757-productions[29 /* FIXED_CELL_RANGE_VAL */] = new ReductionPair(25, 3);
1758-productions[30 /* CELL_VALUE */] = new ReductionPair(25, 1);
1759-productions[31 /* CELL_RANGE_VALUE */] = new ReductionPair(25, 3);
1760-productions[32 /* ENSURE_IS_ARRAY */] = new ReductionPair(24, 1);
1761-productions[33 /* ENSURE_YYTEXT_ARRAY */] = new ReductionPair(24, 1);
1762-productions[34 /* REDUCE_INT */] = new ReductionPair(24, 3);
1763-productions[35 /* REDUCE_PERCENT */] = new ReductionPair(24, 3);
1764-productions[36 /* WRAP_CURRENT_INDEX_TOKEN_AS_ARRAY */] = new ReductionPair(6, 1);
1765-productions[37 /* ENSURE_LAST_TWO_IN_ARRAY_AND_PUSH */] = new ReductionPair(6, 3);
1766-productions[38 /* REFLEXIVE_REDUCE */] = new ReductionPair(9, 1);
1767-productions[39 /* REDUCE_FLOAT */] = new ReductionPair(9, 3);
1768-productions[40 /* REDUCE_PREV_AS_PERCENT */] = new ReductionPair(9, 2);
1769-productions[41 /* REDUCE_LAST_THREE_A */] = new ReductionPair(2, 3);
1770-productions[42 /* REDUCE_LAST_THREE_B */] = new ReductionPair(2, 4);
1771-var PRODUCTIONS = productions;
1772-/**
1773- * Parser initially generated by jison 0.4.15, but modified for readability and extensibility.
1774- */
1775+var ParserConstants_1 = require("./ParserConstants");
1776 var Parser = (function () {
1777- /**
1778- * Extend object obj by keys k, and values v for each k.
1779- * @param k - keys to extend object by.
1780- * @param v - value set for each key k.
1781- * @param obj - object to extend.
1782- * @param l
1783- * @returns {Object}
1784- */
1785- var extendRules = function (k, v, obj, l) {
1786- for (obj = obj || {}, l = k.length; l--; obj[k[l]] = v) { }
1787- return obj;
1788- };
1789- var $V0 = [1 /* SHIFT */, 4];
1790- var $V1 = [1 /* SHIFT */, 5];
1791- var $V2 = [1 /* SHIFT */, 7];
1792- var $V3 = [1 /* SHIFT */, 10];
1793- var $V4 = [1 /* SHIFT */, 8];
1794- var $V5 = [1 /* SHIFT */, 9];
1795- var $V6 = [1 /* SHIFT */, 11];
1796- var $V7 = [1 /* SHIFT */, 16];
1797- var $V8 = [1 /* SHIFT */, 17];
1798- var $V9 = [1 /* SHIFT */, 14];
1799- var $Va = [1 /* SHIFT */, 15];
1800- var $Vb = [1 /* SHIFT */, 18];
1801- var $Vc = [1 /* SHIFT */, 20];
1802- var $Vd = [1 /* SHIFT */, 21];
1803- var $Ve = [1 /* SHIFT */, 22];
1804- var $Vf = [1 /* SHIFT */, 23];
1805- var $Vg = [1 /* SHIFT */, 24];
1806- var $Vh = [1 /* SHIFT */, 25];
1807- var $Vi = [1 /* SHIFT */, 26];
1808- var $Vj = [1 /* SHIFT */, 27];
1809- var $Vk = [1 /* SHIFT */, 28];
1810- var $Vl = [1 /* SHIFT */, 29];
1811- var $Vm = [
1812- 5,
1813- 11,
1814- 12,
1815- 13,
1816- 15,
1817- 16,
1818- 17,
1819- 18,
1820- 19,
1821- 20,
1822- 21,
1823- 22,
1824- 30,
1825- 31
1826- ];
1827- var $Vn = [
1828- 5,
1829- 11,
1830- 12,
1831- 13,
1832- 15,
1833- 16,
1834- 17,
1835- 18,
1836- 19,
1837- 20,
1838- 21,
1839- 22,
1840- 30,
1841- 31,
1842- 33
1843- ];
1844- var $Vo = [1 /* SHIFT */, 38];
1845- var $Vp = [
1846- 5,
1847- 11,
1848- 12,
1849- 13,
1850- 15,
1851- 16,
1852- 17,
1853- 18,
1854- 19,
1855- 20,
1856- 21,
1857- 22,
1858- 30,
1859- 31,
1860- 35,
1861- 38
1862- ];
1863- var $Vq = [
1864- 5,
1865- 12,
1866- 13,
1867- 15,
1868- 16,
1869- 17,
1870- 18,
1871- 19,
1872- 30,
1873- 31
1874- ];
1875- var $Vr = [
1876- 5,
1877- 12,
1878- 15,
1879- 16,
1880- 17,
1881- 18,
1882- 30,
1883- 31
1884- ];
1885- var $Vs = [
1886- 5,
1887- 12,
1888- 13,
1889- 15,
1890- 16,
1891- 17,
1892- 18,
1893- 19,
1894- 20,
1895- 21,
1896- 30,
1897- 31
1898- ];
1899- var $Vt = [
1900- 15,
1901- 30,
1902- 31
1903- ];
1904- var $Vu = [
1905- 5,
1906- 11,
1907- 12,
1908- 13,
1909- 15,
1910- 16,
1911- 17,
1912- 18,
1913- 19,
1914- 20,
1915- 21,
1916- 22,
1917- 30,
1918- 31,
1919- 32,
1920- 36
1921- ];
1922 var parser = {
1923 lexer: undefined,
1924 Parser: undefined,
1925 trace: function trace() { },
1926 yy: {},
1927- symbols: {
1928- "error": 2,
1929- "expressions": 3,
1930- "expression": 4,
1931- "EOF": 5,
1932- "variableSequence": 6,
1933- "TIME_AMPM": 7,
1934- "TIME_24": 8,
1935- "number": 9,
1936- "STRING": 10,
1937- "&": 11,
1938- "=": 12,
1939- "+": 13,
1940- "(": 14,
1941- ")": 15,
1942- "<": 16,
1943- ">": 17,
1944- "NOT": 18,
1945- "-": 19,
1946- "*": 20,
1947- "/": 21,
1948- "^": 22,
1949- "FUNCTION": 23,
1950- "expseq": 24,
1951- "cell": 25,
1952- "FIXEDCELL": 26,
1953- ":": 27,
1954- "CELL": 28,
1955- "ARRAY": 29,
1956- ";": 30,
1957- ",": 31,
1958- "VARIABLE": 32,
1959- "DECIMAL": 33,
1960- "NUMBER": 34,
1961- "%": 35,
1962- "#": 36,
1963- "!": 37,
1964- "$accept": 0,
1965- "$end": 1
1966- },
1967- terminals: {
1968- 5: "EOF",
1969- 7: "TIME_AMPM",
1970- 8: "TIME_24",
1971- 10: "STRING",
1972- 11: "&",
1973- 12: "=",
1974- 13: "+",
1975- 14: "(",
1976- 15: ")",
1977- 16: "<",
1978- 17: ">",
1979- 18: "NOT",
1980- 19: "-",
1981- 20: "*",
1982- 21: "/",
1983- 22: "^",
1984- 23: "FUNCTION",
1985- 26: "FIXEDCELL",
1986- 27: ":",
1987- 28: "CELL",
1988- 29: "ARRAY",
1989- 30: ";",
1990- 31: ",",
1991- 32: "VARIABLE",
1992- 33: "DECIMAL",
1993- 34: "NUMBER",
1994- 35: "%",
1995- 36: "#",
1996- 37: "!"
1997- },
1998- /**
1999- * Maps a ProductionRule to the appropriate number of previous tokens to use in a reduction action.
2000- */
2001- productions: PRODUCTIONS,
2002 /**
2003 * Perform a reduce action on the given virtual stack. Basically, fetching, deriving, or calculating a value.
2004 * @param rawValueOfReduceOriginToken - Some actions require the origin token to perform a reduce action. For
2005@@ -530,6 +155,9 @@ var Parser = (function () {
2006 case 42 /* REDUCE_LAST_THREE_B */:
2007 this.$ = virtualStack[vsl - 2] + virtualStack[vsl - 1] + virtualStack[vsl];
2008 break;
2009+ case 43 /* AS_ERROR */:
2010+ this.$ = Errors_1.constructErrorByName(virtualStack[vsl]);
2011+ break;
2012 }
2013 }
2014 catch (e) {
2015@@ -624,603 +252,7 @@ var Parser = (function () {
2016 }
2017 }
2018 },
2019- /**
2020- * The `table` is an array of objects that map {@link RULES} to LexActions and tokens.
2021- */
2022- table: [
2023- ObjectFromPairs_1.ObjectFromPairs.of([
2024- 2, 13,
2025- 3, 1,
2026- 4, 2,
2027- 6, 3,
2028- 7, $V0,
2029- 8, $V1,
2030- 9, 6,
2031- 10, $V2,
2032- 13, $V3,
2033- 14, $V4,
2034- 19, $V5,
2035- 23, $V6,
2036- 25, 12,
2037- 26, $V7,
2038- 28, $V8,
2039- 32, $V9,
2040- 34, $Va,
2041- 36, $Vb
2042- ]),
2043- ObjectFromPairs_1.ObjectFromPairs.of([
2044- 1, [3]
2045- ]),
2046- ObjectFromPairs_1.ObjectFromPairs.of([
2047- 5, [1 /* SHIFT */, 19],
2048- 11, $Vc,
2049- 12, $Vd,
2050- 13, $Ve,
2051- 16, $Vf,
2052- 17, $Vg,
2053- 18, $Vh,
2054- 19, $Vi,
2055- 20, $Vj,
2056- 21, $Vk,
2057- 22, $Vl
2058- ]),
2059- extendRules($Vm, [2 /* REDUCE */, 2], ObjectFromPairs_1.ObjectFromPairs.of([33, [1 /* SHIFT */, 30]])),
2060- extendRules($Vm, [2 /* REDUCE */, 3]),
2061- extendRules($Vm, [2 /* REDUCE */, 4]),
2062- extendRules($Vm, [2 /* REDUCE */, 5], ObjectFromPairs_1.ObjectFromPairs.of([35, [1 /* SHIFT */, 31]])),
2063- extendRules($Vm, [2 /* REDUCE */, 6]),
2064- ObjectFromPairs_1.ObjectFromPairs.of([
2065- 2, 13,
2066- 4, 32,
2067- 6, 3,
2068- 7, $V0,
2069- 8, $V1,
2070- 9, 6,
2071- 10, $V2,
2072- 13, $V3,
2073- 14, $V4,
2074- 19, $V5,
2075- 23, $V6,
2076- 25, 12,
2077- 26, $V7,
2078- 28, $V8,
2079- 32, $V9,
2080- 34, $Va,
2081- 36, $Vb
2082- ]),
2083- ObjectFromPairs_1.ObjectFromPairs.of([
2084- 2, 13,
2085- 4, 33,
2086- 6, 3,
2087- 7, $V0,
2088- 8, $V1,
2089- 9, 6,
2090- 10, $V2,
2091- 13, $V3,
2092- 14, $V4,
2093- 19, $V5,
2094- 23, $V6,
2095- 25, 12,
2096- 26, $V7,
2097- 28, $V8,
2098- 32, $V9,
2099- 34, $Va,
2100- 36, $Vb
2101- ]),
2102- ObjectFromPairs_1.ObjectFromPairs.of([
2103- 2, 13,
2104- 4, 34,
2105- 6, 3,
2106- 7, $V0,
2107- 8, $V1,
2108- 9, 6,
2109- 10, $V2,
2110- 13, $V3,
2111- 14, $V4,
2112- 19, $V5,
2113- 23, $V6,
2114- 25, 12,
2115- 26, $V7,
2116- 28, $V8,
2117- 32, $V9,
2118- 34, $Va,
2119- 36, $Vb
2120- ]),
2121- ObjectFromPairs_1.ObjectFromPairs.of([
2122- 14, [1 /* SHIFT */, 35]
2123- ]),
2124- extendRules($Vm, [2 /* REDUCE */, 25]),
2125- extendRules($Vm, [2 /* REDUCE */, 26], ObjectFromPairs_1.ObjectFromPairs.of([2 /* REDUCE */, 36, 32, [1 /* SHIFT */, 37], 36, $Vb])),
2126- extendRules($Vn, [2 /* REDUCE */, 36], ObjectFromPairs_1.ObjectFromPairs.of([36, $Vo])),
2127- extendRules($Vp, [2 /* REDUCE */, 38], ObjectFromPairs_1.ObjectFromPairs.of([33, [1 /* SHIFT */, 39]])),
2128- extendRules($Vm, [2 /* REDUCE */, 28], ObjectFromPairs_1.ObjectFromPairs.of([27, [1 /* SHIFT */, 40]])),
2129- extendRules($Vm, [2 /* REDUCE */, 30], ObjectFromPairs_1.ObjectFromPairs.of([27, [1 /* SHIFT */, 41]])),
2130- ObjectFromPairs_1.ObjectFromPairs.of([32, [1 /* SHIFT */, 42]]),
2131- ObjectFromPairs_1.ObjectFromPairs.of([1, [3 /* ACCEPT */, 1]]),
2132- ObjectFromPairs_1.ObjectFromPairs.of([
2133- 2, 13,
2134- 4, 43,
2135- 6, 3,
2136- 7, $V0,
2137- 8, $V1,
2138- 9, 6,
2139- 10, $V2,
2140- 13, $V3,
2141- 14, $V4,
2142- 19, $V5,
2143- 23, $V6,
2144- 25, 12,
2145- 26, $V7,
2146- 28, $V8,
2147- 32, $V9,
2148- 34, $Va,
2149- 36, $Vb
2150- ]),
2151- ObjectFromPairs_1.ObjectFromPairs.of([
2152- 2, 13,
2153- 4, 44,
2154- 6, 3,
2155- 7, $V0,
2156- 8, $V1,
2157- 9, 6,
2158- 10, $V2,
2159- 13, $V3,
2160- 14, $V4,
2161- 19, $V5,
2162- 23, $V6,
2163- 25, 12,
2164- 26, $V7,
2165- 28, $V8,
2166- 32, $V9,
2167- 34, $Va,
2168- 36, $Vb
2169- ]),
2170- ObjectFromPairs_1.ObjectFromPairs.of([
2171- 2, 13,
2172- 4, 45,
2173- 6, 3,
2174- 7, $V0,
2175- 8, $V1,
2176- 9, 6,
2177- 10, $V2,
2178- 13, $V3,
2179- 14, $V4,
2180- 19, $V5,
2181- 23, $V6,
2182- 25, 12,
2183- 26, $V7,
2184- 28, $V8,
2185- 32, $V9,
2186- 34, $Va,
2187- 36, $Vb
2188- ]),
2189- ObjectFromPairs_1.ObjectFromPairs.of([
2190- 2, 13,
2191- 4, 48,
2192- 6, 3,
2193- 7, $V0,
2194- 8, $V1,
2195- 9, 6,
2196- 10, $V2,
2197- 12, [1, 46],
2198- 13, $V3,
2199- 14, $V4,
2200- 17, [1, 47],
2201- 19, $V5,
2202- 23, $V6,
2203- 25, 12,
2204- 26, $V7,
2205- 28, $V8,
2206- 32, $V9,
2207- 34, $Va,
2208- 36, $Vb
2209- ]),
2210- ObjectFromPairs_1.ObjectFromPairs.of([
2211- 2, 13,
2212- 4, 50,
2213- 6, 3,
2214- 7, $V0,
2215- 8, $V1,
2216- 9, 6,
2217- 10, $V2,
2218- 12, [1, 49],
2219- 13, $V3,
2220- 14, $V4,
2221- 19, $V5,
2222- 23, $V6,
2223- 25, 12,
2224- 26, $V7,
2225- 28, $V8,
2226- 32, $V9,
2227- 34, $Va,
2228- 36, $Vb
2229- ]),
2230- ObjectFromPairs_1.ObjectFromPairs.of([
2231- 2, 13,
2232- 4, 51,
2233- 6, 3,
2234- 7, $V0,
2235- 8, $V1,
2236- 9, 6,
2237- 10, $V2,
2238- 13, $V3,
2239- 14, $V4,
2240- 19, $V5,
2241- 23, $V6,
2242- 25, 12,
2243- 26, $V7,
2244- 28, $V8,
2245- 32, $V9,
2246- 34, $Va,
2247- 36, $Vb
2248- ]),
2249- ObjectFromPairs_1.ObjectFromPairs.of([
2250- 2, 13,
2251- 4, 52,
2252- 6, 3,
2253- 7, $V0,
2254- 8, $V1,
2255- 9, 6,
2256- 10, $V2,
2257- 13, $V3,
2258- 14, $V4,
2259- 19, $V5,
2260- 23, $V6,
2261- 25, 12,
2262- 26, $V7,
2263- 28, $V8,
2264- 32, $V9,
2265- 34, $Va,
2266- 36, $Vb
2267- ]),
2268- ObjectFromPairs_1.ObjectFromPairs.of([
2269- 2, 13,
2270- 4, 53,
2271- 6, 3,
2272- 7, $V0,
2273- 8, $V1,
2274- 9, 6,
2275- 10, $V2,
2276- 13, $V3,
2277- 14, $V4,
2278- 19, $V5,
2279- 23, $V6,
2280- 25, 12,
2281- 26, $V7,
2282- 28, $V8,
2283- 32, $V9,
2284- 34, $Va,
2285- 36, $Vb
2286- ]),
2287- ObjectFromPairs_1.ObjectFromPairs.of([
2288- 2, 13,
2289- 4, 54,
2290- 6, 3,
2291- 7, $V0,
2292- 8, $V1,
2293- 9, 6,
2294- 10, $V2,
2295- 13, $V3,
2296- 14, $V4,
2297- 19, $V5,
2298- 23, $V6,
2299- 25, 12,
2300- 26, $V7,
2301- 28, $V8,
2302- 32, $V9,
2303- 34, $Va,
2304- 36, $Vb
2305- ]),
2306- ObjectFromPairs_1.ObjectFromPairs.of([
2307- 2, 13,
2308- 4, 55,
2309- 6, 3,
2310- 7, $V0,
2311- 8, $V1,
2312- 9, 6,
2313- 10, $V2,
2314- 13, $V3,
2315- 14, $V4,
2316- 19, $V5,
2317- 23, $V6,
2318- 25, 12,
2319- 26, $V7,
2320- 28, $V8,
2321- 32, $V9,
2322- 34, $Va,
2323- 36, $Vb
2324- ]),
2325- ObjectFromPairs_1.ObjectFromPairs.of([[1 /* SHIFT */, 56]]),
2326- extendRules($Vp, [2 /* REDUCE */, 40]),
2327- ObjectFromPairs_1.ObjectFromPairs.of([
2328- 11, $Vc,
2329- 12, $Vd,
2330- 13, $Ve,
2331- 15, [1 /* SHIFT */, 57],
2332- 16, $Vf,
2333- 17, $Vg,
2334- 18, $Vh,
2335- 19, $Vi,
2336- 20, $Vj,
2337- 21, $Vk,
2338- 22, $Vl
2339- ]),
2340- extendRules($Vq, [2 /* REDUCE */, 21], ObjectFromPairs_1.ObjectFromPairs.of([
2341- 11, $Vc,
2342- 20, $Vj,
2343- 21, $Vk,
2344- 22, $Vl
2345- ])),
2346- extendRules($Vq, [2 /* REDUCE */, 22], ObjectFromPairs_1.ObjectFromPairs.of([
2347- 11, $Vc,
2348- 20, $Vj,
2349- 21, $Vk,
2350- 22, $Vl
2351- ])),
2352- ObjectFromPairs_1.ObjectFromPairs.of([
2353- 2, 13,
2354- 4, 60,
2355- 6, 3,
2356- 7, $V0,
2357- 8, $V1,
2358- 9, 6,
2359- 10, $V2,
2360- 13, $V3,
2361- 14, $V4,
2362- 15, [1 /* SHIFT */, 58],
2363- 19, $V5,
2364- 23, $V6,
2365- 24, 59,
2366- 25, 12,
2367- 26, $V7,
2368- 28, $V8,
2369- 29, [1 /* SHIFT */, 61],
2370- 32, $V9,
2371- 34, $Va,
2372- 36, $Vb
2373- ]),
2374- extendRules($Vm, [2 /* REDUCE */, 27]),
2375- ObjectFromPairs_1.ObjectFromPairs.of([36, $Vo]),
2376- ObjectFromPairs_1.ObjectFromPairs.of([32, [1 /* SHIFT */, 62]]),
2377- ObjectFromPairs_1.ObjectFromPairs.of([34, [1 /* SHIFT */, 63]]),
2378- ObjectFromPairs_1.ObjectFromPairs.of([26, [1 /* SHIFT */, 64]]),
2379- ObjectFromPairs_1.ObjectFromPairs.of([28, [1 /* SHIFT */, 65]]),
2380- ObjectFromPairs_1.ObjectFromPairs.of([37, [1 /* SHIFT */, 66]]),
2381- extendRules($Vm, [2 /* REDUCE */, 7]),
2382- extendRules([5, 12, 15, 30, 31], [2 /* REDUCE */, 8], ObjectFromPairs_1.ObjectFromPairs.of([
2383- 11, $Vc,
2384- 13, $Ve,
2385- 16, $Vf,
2386- 17, $Vg,
2387- 18, $Vh,
2388- 19, $Vi,
2389- 20, $Vj,
2390- 21, $Vk,
2391- 22, $Vl
2392- ])),
2393- extendRules($Vq, [2 /* REDUCE */, 9], ObjectFromPairs_1.ObjectFromPairs.of([
2394- 11, $Vc,
2395- 20, $Vj,
2396- 21, $Vk,
2397- 22, $Vl
2398- ])),
2399- ObjectFromPairs_1.ObjectFromPairs.of([
2400- 2, 13,
2401- 4, 67,
2402- 6, 3,
2403- 7, $V0,
2404- 8, $V1,
2405- 9, 6,
2406- 10, $V2,
2407- 13, $V3,
2408- 14, $V4,
2409- 19, $V5,
2410- 23, $V6,
2411- 25, 12,
2412- 26, $V7,
2413- 28, $V8,
2414- 32, $V9,
2415- 34, $Va,
2416- 36, $Vb
2417- ]),
2418- ObjectFromPairs_1.ObjectFromPairs.of([
2419- 2, 13,
2420- 4, 68,
2421- 6, 3,
2422- 7, $V0,
2423- 8, $V1,
2424- 9, 6,
2425- 10, $V2,
2426- 13, $V3,
2427- 14, $V4,
2428- 19, $V5,
2429- 23, $V6,
2430- 25, 12,
2431- 26, $V7,
2432- 28, $V8,
2433- 32, $V9,
2434- 34, $Va,
2435- 36, $Vb
2436- ]),
2437- extendRules($Vr, [2 /* REDUCE */, 16], ObjectFromPairs_1.ObjectFromPairs.of([
2438- 11, $Vc,
2439- 13, $Ve,
2440- 19, $Vi,
2441- 20, $Vj,
2442- 21, $Vk,
2443- 22, $Vl
2444- ])),
2445- ObjectFromPairs_1.ObjectFromPairs.of([
2446- 2, 13,
2447- 4, 69,
2448- 6, 3,
2449- 7, $V0,
2450- 8, $V1,
2451- 9, 6,
2452- 10, $V2,
2453- 13, $V3,
2454- 14, $V4,
2455- 19, $V5,
2456- 23, $V6,
2457- 25, 12,
2458- 26, $V7,
2459- 28, $V8,
2460- 32, $V9,
2461- 34, $Va,
2462- 36, $Vb
2463- ]),
2464- extendRules($Vr, [2 /* REDUCE */, 15], ObjectFromPairs_1.ObjectFromPairs.of([
2465- 11, $Vc,
2466- 13, $Ve,
2467- 19, $Vi,
2468- 20, $Vj,
2469- 21, $Vk,
2470- 22, $Vl
2471- ])),
2472- extendRules([5, 12, 15, 18, 30, 31], [2 /* REDUCE */, 14], ObjectFromPairs_1.ObjectFromPairs.of([
2473- 11, $Vc,
2474- 13, $Ve,
2475- 16, $Vf,
2476- 17, $Vg,
2477- 19, $Vi,
2478- 20, $Vj,
2479- 21, $Vk,
2480- 22, $Vl
2481- ])),
2482- extendRules($Vq, [2 /* REDUCE */, 17], ObjectFromPairs_1.ObjectFromPairs.of([
2483- 11, $Vc,
2484- 20, $Vj,
2485- 21, $Vk,
2486- 22, $Vl
2487- ])),
2488- extendRules($Vs, [2 /* REDUCE */, 18], ObjectFromPairs_1.ObjectFromPairs.of([
2489- 11, $Vc,
2490- 22, $Vl
2491- ])),
2492- extendRules($Vs, [2 /* REDUCE */, 19], ObjectFromPairs_1.ObjectFromPairs.of([
2493- 11, $Vc,
2494- 22, $Vl
2495- ])),
2496- extendRules([5, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 30, 31], [2 /* REDUCE */, 20], ObjectFromPairs_1.ObjectFromPairs.of([11, $Vc])),
2497- extendRules($Vn, [2 /* REDUCE */, 37]),
2498- extendRules($Vm, [2 /* REDUCE */, 10]),
2499- extendRules($Vm, [2 /* REDUCE */, 23]),
2500- ObjectFromPairs_1.ObjectFromPairs.of([
2501- 15, [1 /* SHIFT */, 70],
2502- 30, [1 /* SHIFT */, 71],
2503- 31, [1 /* SHIFT */, 72]
2504- ]),
2505- extendRules($Vt, [2 /* REDUCE */, 32], ObjectFromPairs_1.ObjectFromPairs.of([
2506- 11, $Vc,
2507- 12, $Vd,
2508- 13, $Ve,
2509- 16, $Vf,
2510- 17, $Vg,
2511- 18, $Vh,
2512- 19, $Vi,
2513- 20, $Vj,
2514- 21, $Vk,
2515- 22, $Vl
2516- ])),
2517- extendRules($Vt, [2 /* REDUCE */, 33]), ObjectFromPairs_1.ObjectFromPairs.of([
2518- 37, [1 /* SHIFT */, 73]
2519- ]),
2520- extendRules($Vp, [2 /* REDUCE */, 39]),
2521- extendRules($Vm, [2 /* REDUCE */, 29]),
2522- extendRules($Vm, [2 /* REDUCE */, 31]),
2523- extendRules($Vu, [2 /* REDUCE */, 41]),
2524- extendRules($Vr, [2 /* REDUCE */, 11], ObjectFromPairs_1.ObjectFromPairs.of([
2525- 11, $Vc,
2526- 13, $Ve,
2527- 19, $Vi,
2528- 20, $Vj,
2529- 21, $Vk,
2530- 22, $Vl
2531- ])),
2532- extendRules($Vr, [2 /* REDUCE */, 13], ObjectFromPairs_1.ObjectFromPairs.of([
2533- 11, $Vc,
2534- 13, $Ve,
2535- 19, $Vi,
2536- 20, $Vj,
2537- 21, $Vk,
2538- 22, $Vl
2539- ])),
2540- extendRules($Vr, [2 /* REDUCE */, 12], ObjectFromPairs_1.ObjectFromPairs.of([
2541- 11, $Vc,
2542- 13, $Ve,
2543- 19, $Vi,
2544- 20, $Vj,
2545- 21, $Vk,
2546- 22, $Vl
2547- ])),
2548- extendRules($Vm, [2 /* REDUCE */, 24]),
2549- ObjectFromPairs_1.ObjectFromPairs.of([
2550- 2, 13,
2551- 4, 74,
2552- 6, 3,
2553- 7, $V0,
2554- 8, $V1,
2555- 9, 6,
2556- 10, $V2,
2557- 13, $V3,
2558- 14, $V4,
2559- 19, $V5,
2560- 23, $V6,
2561- 25, 12,
2562- 26, $V7,
2563- 28, $V8,
2564- 32, $V9,
2565- 34, $Va,
2566- 36, $Vb,
2567- 12, $Vd,
2568- ]),
2569- ObjectFromPairs_1.ObjectFromPairs.of([
2570- 2, 13,
2571- 4, 75,
2572- 6, 3,
2573- 7, $V0,
2574- 8, $V1,
2575- 9, 6,
2576- 10, $V2,
2577- 13, $V3,
2578- 14, $V4,
2579- 19, $V5,
2580- 23, $V6,
2581- 25, 12,
2582- 26, $V7,
2583- 28, $V8,
2584- 32, $V9,
2585- 34, $Va,
2586- 36, $Vb,
2587- 12, $Vd,
2588- ]),
2589- extendRules($Vu, [2 /* REDUCE */, 42]),
2590- extendRules($Vt, [2 /* REDUCE */, 34], ObjectFromPairs_1.ObjectFromPairs.of([
2591- 11, $Vc,
2592- 12, $Vd,
2593- 13, $Ve,
2594- 16, $Vf,
2595- 17, $Vg,
2596- 18, $Vh,
2597- 19, $Vi,
2598- 20, $Vj,
2599- 21, $Vk,
2600- 22, $Vl
2601- ])),
2602- extendRules($Vt, [2 /* REDUCE */, 35], ObjectFromPairs_1.ObjectFromPairs.of([
2603- 11, $Vc,
2604- 12, $Vd,
2605- 13, $Ve,
2606- 16, $Vf,
2607- 17, $Vg,
2608- 18, $Vh,
2609- 19, $Vi,
2610- 20, $Vj,
2611- 21, $Vk,
2612- 22, $Vl
2613- ]))
2614- ],
2615- defaultActions: ObjectFromPairs_1.ObjectFromPairs.of([19, [2 /* REDUCE */, 1]]),
2616+ defaultActions: { 19: [ParserConstants_1.REDUCE, 1] },
2617 parseError: function parseError(str, hash) {
2618 if (hash.recoverable) {
2619 this.trace(str);
2620@@ -1230,7 +262,7 @@ var Parser = (function () {
2621 }
2622 },
2623 parse: function parse(input) {
2624- var self = this, stack = [0], semanticValueStack = [null], locationStack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
2625+ var stack = [0], semanticValueStack = [null], locationStack = [], yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
2626 var args = locationStack.slice.call(arguments, 1);
2627 var lexer = Object.create(this.lexer);
2628 var sharedState = {
2629@@ -1274,7 +306,7 @@ var Parser = (function () {
2630 var token = lexer.lex() || EOF;
2631 // if token isn't its numeric value, convert
2632 if (typeof token !== 'number') {
2633- token = self.symbols[token] || token;
2634+ token = ParserConstants_1.SYMBOL_NAME_TO_INDEX[token] || token;
2635 }
2636 return token;
2637 }
2638@@ -1294,7 +326,7 @@ var Parser = (function () {
2639 symbol = lex();
2640 }
2641 // read action for current state and first input
2642- action = table[state] && table[state][symbol];
2643+ action = ParserConstants_1.ACTION_TABLE[state] && ParserConstants_1.ACTION_TABLE[state][symbol];
2644 }
2645 // handle parse error
2646 if (typeof action === 'undefined' || !action.length || !action[0]) {
2647@@ -1308,7 +340,7 @@ var Parser = (function () {
2648 // try to recover from error
2649 for (;;) {
2650 // check for error recovery rule in this state
2651- if ((TERROR.toString()) in table[state]) {
2652+ if ((TERROR.toString()) in ParserConstants_1.ACTION_TABLE[state]) {
2653 return depth;
2654 }
2655 if (state === 0 || stack_probe < 2) {
2656@@ -1325,30 +357,33 @@ var Parser = (function () {
2657 // Report error
2658 expected = [];
2659 var expectedIndexes = [];
2660- var tableState = table[state];
2661- for (p in table[state]) {
2662- if (this.terminals[p] && p > TERROR) {
2663- expected.push(this.terminals[p]);
2664+ var tableState = ParserConstants_1.ACTION_TABLE[state];
2665+ for (p in ParserConstants_1.ACTION_TABLE[state]) {
2666+ if (ParserConstants_1.SYMBOL_INDEX_TO_NAME[p] && p > TERROR) {
2667+ expected.push(ParserConstants_1.SYMBOL_INDEX_TO_NAME[p]);
2668 expectedIndexes.push(p);
2669 }
2670 }
2671 if (lexer.showPosition) {
2672- errStr = 'Parse error on line ' + (yylineno + 1) + ":\n" + lexer.showPosition() + "\nExpecting " + expected.join(', ') + ", got '" + (this.terminals[symbol] || symbol) + "'";
2673+ errStr = 'Parse error on line ' + (yylineno + 1) + ": " + lexer.showPosition() + " Expecting " + expected.join(', ') + ", got '" + (ParserConstants_1.SYMBOL_INDEX_TO_NAME[symbol] || symbol) + "'";
2674 }
2675 else {
2676 errStr = 'Parse error on line ' + (yylineno + 1) + ": Unexpected " +
2677 (symbol == EOF ? "end of input" :
2678- ("'" + (this.terminals[symbol] || symbol) + "'"));
2679+ ("'" + (ParserConstants_1.SYMBOL_INDEX_TO_NAME[symbol] || symbol) + "'"));
2680 }
2681 this.parseError(errStr, {
2682 text: lexer.match,
2683- token: this.terminals[symbol] || symbol,
2684+ token: ParserConstants_1.SYMBOL_INDEX_TO_NAME[symbol] || symbol,
2685+ tokenIndex: symbol,
2686 line: lexer.yylineno,
2687 loc: yyloc,
2688 expected: expected,
2689 expectedIndexes: expectedIndexes,
2690 state: state,
2691 tableState: tableState,
2692+ stack: stack,
2693+ semanticValueStack: semanticValueStack,
2694 recoverable: (error_rule_depth !== false)
2695 });
2696 }
2697@@ -1375,23 +410,25 @@ var Parser = (function () {
2698 preErrorSymbol = (symbol == TERROR ? null : symbol); // save the lookahead token
2699 symbol = TERROR; // insert generic error symbol as new lookahead
2700 state = stack[stack.length - 1];
2701- action = table[state] && table[state][TERROR];
2702+ action = ParserConstants_1.ACTION_TABLE[state] && ParserConstants_1.ACTION_TABLE[state][TERROR];
2703 recovering = 3; // allow 3 real symbols to be shifted before reporting a new error
2704 }
2705 // this shouldn't happen, unless resolve defaults are off
2706 if (action[0] instanceof Array && action.length > 1) {
2707 throw new Errors_1.ParseError('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
2708 }
2709- // LexActions are always:
2710+ // Available actions:
2711 // Shift: continue to process tokens.
2712 // Reduce: enough tokens have been gathered to reduce input through evaluation.
2713 // Accept: return.
2714 switch (action[0]) {
2715- case 1 /* SHIFT */:
2716+ case ParserConstants_1.SHIFT:
2717 stack.push(symbol);
2718 semanticValueStack.push(lexer.yytext);
2719 locationStack.push(lexer.yylloc);
2720 stack.push(action[1]); // push state
2721+ // console.log("SHIFT", "literal", lexer.yytext, " symbol", symbol, " symbol name", SYMBOL_INDEX_TO_NAME[symbol], " action", action,
2722+ // " stack", stack, " semanticValueStack", semanticValueStack);
2723 symbol = null;
2724 if (Formulas_1.Formulas.isTryCatchFormula(lexer.yytext)) {
2725 catchFailuresOn = true;
2726@@ -1411,8 +448,10 @@ var Parser = (function () {
2727 preErrorSymbol = null;
2728 }
2729 break;
2730- case 2 /* REDUCE */:
2731- var currentProduction = this.productions[action[1]];
2732+ case ParserConstants_1.REDUCE:
2733+ // console.log("REDUCE", "literal", lexer.yytext, " symbol", symbol, " symbol name", SYMBOL_INDEX_TO_NAME[symbol], " action", action,
2734+ // " stack", stack, " semanticValueStack", semanticValueStack);
2735+ var currentProduction = ParserConstants_1.PRODUCTIONS[action[1]];
2736 var lengthToReduceStackBy = currentProduction.getLengthToReduceStackBy();
2737 // perform semantic action
2738 yyval.$ = semanticValueStack[semanticValueStack.length - lengthToReduceStackBy]; // default to $$ = $1
2739@@ -1441,10 +480,10 @@ var Parser = (function () {
2740 stack.push(currentProduction.getReplacementTokenIndex());
2741 semanticValueStack.push(yyval.$);
2742 locationStack.push(yyval._$);
2743- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
2744+ newState = ParserConstants_1.ACTION_TABLE[stack[stack.length - 2]][stack[stack.length - 1]];
2745 stack.push(newState);
2746 break;
2747- case 3 /* ACCEPT */:
2748+ case ParserConstants_1.ACCEPT:
2749 // Accept
2750 return true;
2751 }
2752@@ -1659,7 +698,7 @@ var Parser = (function () {
2753 }
2754 var rules = this._currentRules();
2755 for (var i = 0; i < rules.length; i++) {
2756- tempMatch = this._input.match(this.rules[rules[i]]);
2757+ tempMatch = this._input.match(ParserConstants_1.RULES[rules[i]]);
2758 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
2759 match = tempMatch;
2760 index = i;
2761@@ -1712,27 +751,13 @@ var Parser = (function () {
2762 return this.lex();
2763 }
2764 },
2765- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
2766- begin: function begin(condition) {
2767- this.conditionStack.push(condition);
2768- },
2769- // pop the previously active lexer condition state off the condition stack
2770- popState: function popState() {
2771- var n = this.conditionStack.length - 1;
2772- if (n > 0) {
2773- return this.conditionStack.pop();
2774- }
2775- else {
2776- return this.conditionStack[0];
2777- }
2778- },
2779 // produce the lexer rule set which is active for the currently active lexer condition state
2780 _currentRules: function _currentRules() {
2781 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
2782 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
2783 }
2784 else {
2785- return this.conditions["INITIAL"].rules;
2786+ return this.conditions.INITIAL.rules;
2787 }
2788 },
2789 options: {},
2790@@ -1816,10 +841,9 @@ var Parser = (function () {
2791 return 5 /* AS_NUMBER */;
2792 }
2793 },
2794- rules: RULES,
2795 conditions: {
2796- "INITIAL": {
2797- "rules": [
2798+ INITIAL: {
2799+ rules: [
2800 0,
2801 1,
2802 2,
2803diff --git a/dist/Parser/ParserConstants.js b/dist/Parser/ParserConstants.js
2804new file mode 100644
2805index 0000000..cc324d9
2806--- /dev/null
2807+++ b/dist/Parser/ParserConstants.js
2808@@ -0,0 +1,1437 @@
2809+"use strict";
2810+exports.__esModule = true;
2811+// Rules represent the Regular Expressions that will be used in sequence to match a given input to the Parser.
2812+var WHITE_SPACE_RULE = /^(?:\s+)/; // rule 0
2813+var DOUBLE_QUOTES_RULE = /^(?:"(\\["]|[^"])*")/; // rule 1
2814+var SINGLE_QUOTES_RULE = /^(?:'(\\[']|[^'])*')/; // rule 2
2815+var FORMULA_NAME_RULE = /^(?:[A-Za-z.]{1,}[A-Za-z_0-9]+(?=[(]))/; // Changed from /^(?:[A-Za-z]{1,}[A-Za-z_0-9]+(?=[(]))/ // rule 3
2816+var DATE_RULE = /^(?:([0]?[1-9]|1[0-2])[:][0-5][0-9]([:][0-5][0-9])?[ ]?(AM|am|aM|Am|PM|pm|pM|Pm))/; // rule 4
2817+var TIME_RULE = /^(?:([0]?[0-9]|1[0-9]|2[0-3])[:][0-5][0-9]([:][0-5][0-9])?)/; // rule 5
2818+var $_A1_CELL_RULE = /^(?:\$[A-Za-z]+\$[0-9]+)/; // rule 6
2819+var A1_CELL_RULE = /^(?:[A-Za-z]+[0-9]+)/; // rules 7
2820+var FORMULA_NAME_SIMPLE_RULE = /^(?:[A-Za-z.]+(?=[(]))/; // rule 8
2821+var VARIABLE_RULE = /^(?:[A-Za-z]{1,}[A-Za-z_0-9]+)/; // rule 9
2822+var SIMPLE_VARIABLE_RILE = /^(?:[A-Za-z_]+)/; //rule 10
2823+var INTEGER_RULE = /^(?:[0-9]+(?:(?:[eE])(?:[\+-])?[0-9]+)?)/; // Changed from /^(?:[0-9]+)/ // rule 11
2824+var OPEN_AND_CLOSE_OF_ARRAY_RULE = /^(?:\[(.*)?\])/; // rule 12
2825+var DOLLAR_SIGN_RULE = /^(?:\$)/; // rule 13
2826+var AMPERSAND_SIGN_RULE = /^(?:&)/; //rule 14
2827+var SINGLE_WHITESPACE_RULE = /^(?: )/; // rule 15
2828+var PERIOD_RULE = /^(?:[.])/; // rule 16
2829+var COLON_RULE = /^(?::)/; //rule 17
2830+var SEMI_COLON_RULE = /^(?:;)/; // rule 18
2831+var COMMA_RULE = /^(?:,)/; // rule 19
2832+var ASTERISK_RULE = /^(?:\*)/; //rule 20
2833+var FORWARD_SLASH_RULE = /^(?:\/)/; // rule 21
2834+var MINUS_SIGN_RULE = /^(?:-)/; // rule 22
2835+var PLUS_SIGN_RULE = /^(?:\+)/; // rule 23
2836+var CARET_SIGN_RULE = /^(?:\^)/; //rule 24
2837+var OPEN_PAREN_RULE = /^(?:\()/; // rule 25
2838+var CLOSE_PAREN_RULE = /^(?:\))/; // rule 26
2839+var GREATER_THAN_SIGN_RULE = /^(?:>)/; // rule 27
2840+var LESS_THAN_SIGN_RULE = /^(?:<)/; // rule 28
2841+var NOT_RULE = /^(?:NOT\b)/; // rule 29
2842+var OPEN_DOUBLE_QUOTE = /^(?:")/; // rule 30
2843+var OPEN_SINGLE_QUITE = /^(?:')/; // rule 31
2844+var EXCLAMATION_POINT_RULE = /^(?:!)/; // rule 32
2845+var EQUALS_SIGN_RULE = /^(?:=)/; // rule 33
2846+var PERCENT_SIGN_RULE = /^(?:%)/; // rule 34
2847+// TODO: POUND_SIGN_RULE Modified from /^(?:[#])/, which matches pound sign exclusively. Now specific to errors.
2848+// TODO: Should be renamed.
2849+var POUND_SIGN_RULE = /^(?:#N\/A|#NUM\!|#NULL\!|#DIV\/0\!|#VALUE\!|#REF\!|#ERROR)/; // rule 35
2850+var END_OF_STRING_RULE = /^(?:$)/; // rule 36
2851+// Sequential rules to use when parsing a given input.
2852+var RULES = [
2853+ WHITE_SPACE_RULE,
2854+ DOUBLE_QUOTES_RULE,
2855+ SINGLE_QUOTES_RULE,
2856+ FORMULA_NAME_RULE,
2857+ DATE_RULE,
2858+ TIME_RULE,
2859+ $_A1_CELL_RULE,
2860+ A1_CELL_RULE,
2861+ FORMULA_NAME_SIMPLE_RULE,
2862+ VARIABLE_RULE,
2863+ SIMPLE_VARIABLE_RILE,
2864+ INTEGER_RULE,
2865+ OPEN_AND_CLOSE_OF_ARRAY_RULE,
2866+ DOLLAR_SIGN_RULE,
2867+ AMPERSAND_SIGN_RULE,
2868+ SINGLE_WHITESPACE_RULE,
2869+ PERIOD_RULE,
2870+ COLON_RULE,
2871+ SEMI_COLON_RULE,
2872+ COMMA_RULE,
2873+ ASTERISK_RULE,
2874+ FORWARD_SLASH_RULE,
2875+ MINUS_SIGN_RULE,
2876+ PLUS_SIGN_RULE,
2877+ CARET_SIGN_RULE,
2878+ OPEN_PAREN_RULE,
2879+ CLOSE_PAREN_RULE,
2880+ GREATER_THAN_SIGN_RULE,
2881+ LESS_THAN_SIGN_RULE,
2882+ NOT_RULE,
2883+ OPEN_DOUBLE_QUOTE,
2884+ OPEN_SINGLE_QUITE,
2885+ EXCLAMATION_POINT_RULE,
2886+ EQUALS_SIGN_RULE,
2887+ PERCENT_SIGN_RULE,
2888+ POUND_SIGN_RULE,
2889+ END_OF_STRING_RULE
2890+];
2891+exports.RULES = RULES;
2892+/**
2893+ * Actions to take when processing tokens one by one. We're always either taking the next token, reducing our current
2894+ * tokens, or accepting and returning.
2895+ */
2896+var SHIFT = 1;
2897+exports.SHIFT = SHIFT;
2898+var REDUCE = 2;
2899+exports.REDUCE = REDUCE;
2900+var ACCEPT = 3;
2901+exports.ACCEPT = ACCEPT;
2902+/**
2903+ * Represents the length to reduce the stack by, and the token index value that will replace those tokens in the stack.
2904+ */
2905+var ReductionPair = (function () {
2906+ function ReductionPair(replacementTokenIndex, length) {
2907+ this.lengthToReduceStackBy = length;
2908+ this.replacementTokenIndex = replacementTokenIndex;
2909+ }
2910+ /**
2911+ * Get the number representing the length to reduce the stack by.
2912+ * @returns {number}
2913+ */
2914+ ReductionPair.prototype.getLengthToReduceStackBy = function () {
2915+ return this.lengthToReduceStackBy;
2916+ };
2917+ /**
2918+ * Get the replacement token index.
2919+ * @returns {number}
2920+ */
2921+ ReductionPair.prototype.getReplacementTokenIndex = function () {
2922+ return this.replacementTokenIndex;
2923+ };
2924+ return ReductionPair;
2925+}());
2926+exports.ReductionPair = ReductionPair;
2927+/**
2928+ * Productions is used to look up both the number to use when reducing the stack (productions[x][1]) and the semantic
2929+ * value that will replace the tokens in the stack (productions[x][0]).
2930+ * @type {Array<ReductionPair>}
2931+ *
2932+ * Maps a ProductionRule to the appropriate number of previous tokens to use in a reduction action.
2933+ */
2934+var productions = [];
2935+productions[0 /* NO_ACTION */] = null;
2936+productions[1 /* RETURN_LAST */] = new ReductionPair(3, 2);
2937+productions[2 /* CALL_VARIABLE */] = new ReductionPair(4, 1);
2938+productions[3 /* TIME_CALL_TRUE */] = new ReductionPair(4, 1);
2939+productions[4 /* TIME_CALL */] = new ReductionPair(4, 1);
2940+productions[5 /* AS_NUMBER */] = new ReductionPair(4, 1);
2941+productions[6 /* AS_STRING */] = new ReductionPair(4, 1);
2942+productions[7 /* AMPERSAND */] = new ReductionPair(4, 3);
2943+productions[8 /* EQUALS */] = new ReductionPair(4, 3);
2944+productions[9 /* PLUS */] = new ReductionPair(4, 3);
2945+productions[10 /* LAST_NUMBER */] = new ReductionPair(4, 3);
2946+productions[11 /* LTE */] = new ReductionPair(4, 4);
2947+productions[12 /* GTE */] = new ReductionPair(4, 4);
2948+productions[13 /* NOT_EQ */] = new ReductionPair(4, 4);
2949+productions[14 /* NOT */] = new ReductionPair(4, 3);
2950+productions[15 /* GT */] = new ReductionPair(4, 3);
2951+productions[16 /* LT */] = new ReductionPair(4, 3);
2952+productions[17 /* MINUS */] = new ReductionPair(4, 3);
2953+productions[18 /* MULTIPLY */] = new ReductionPair(4, 3);
2954+productions[19 /* DIVIDE */] = new ReductionPair(4, 3);
2955+productions[20 /* TO_POWER */] = new ReductionPair(4, 3);
2956+productions[21 /* INVERT_NUM */] = new ReductionPair(4, 2);
2957+productions[22 /* TO_NUMBER_NAN_AS_ZERO */] = new ReductionPair(4, 2);
2958+productions[23 /* CALL_FUNCTION_LAST_BLANK */] = new ReductionPair(4, 3);
2959+productions[24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */] = new ReductionPair(4, 4);
2960+productions[25 /* I25 */] = new ReductionPair(4, 1);
2961+productions[26 /* I26 */] = new ReductionPair(4, 1);
2962+productions[27 /* I27 */] = new ReductionPair(4, 2);
2963+productions[28 /* FIXED_CELL_VAL */] = new ReductionPair(25, 1);
2964+productions[29 /* FIXED_CELL_RANGE_VAL */] = new ReductionPair(25, 3);
2965+productions[30 /* CELL_VALUE */] = new ReductionPair(25, 1);
2966+productions[31 /* CELL_RANGE_VALUE */] = new ReductionPair(25, 3);
2967+productions[32 /* ENSURE_IS_ARRAY */] = new ReductionPair(24, 1);
2968+productions[33 /* ENSURE_YYTEXT_ARRAY */] = new ReductionPair(24, 1);
2969+productions[34 /* REDUCE_INT */] = new ReductionPair(24, 3);
2970+productions[35 /* REDUCE_PERCENT */] = new ReductionPair(24, 3);
2971+productions[36 /* WRAP_CURRENT_INDEX_TOKEN_AS_ARRAY */] = new ReductionPair(6, 1);
2972+productions[37 /* ENSURE_LAST_TWO_IN_ARRAY_AND_PUSH */] = new ReductionPair(6, 3);
2973+productions[38 /* REFLEXIVE_REDUCE */] = new ReductionPair(9, 1);
2974+productions[39 /* REDUCE_FLOAT */] = new ReductionPair(9, 3);
2975+productions[40 /* REDUCE_PREV_AS_PERCENT */] = new ReductionPair(9, 2);
2976+productions[41 /* REDUCE_LAST_THREE_A */] = new ReductionPair(2, 3);
2977+productions[42 /* REDUCE_LAST_THREE_B */] = new ReductionPair(2, 4);
2978+productions[43 /* AS_ERROR */] = new ReductionPair(4, 1);
2979+var PRODUCTIONS = productions;
2980+exports.PRODUCTIONS = PRODUCTIONS;
2981+var Symbol;
2982+(function (Symbol) {
2983+ Symbol[Symbol["ACCEPT"] = 0] = "ACCEPT";
2984+ Symbol[Symbol["END"] = 1] = "END";
2985+ Symbol[Symbol["ERROR"] = 2] = "ERROR";
2986+ Symbol[Symbol["EXPRESSIONS"] = 3] = "EXPRESSIONS";
2987+ Symbol[Symbol["EXPRESSION"] = 4] = "EXPRESSION";
2988+ Symbol[Symbol["EOF"] = 5] = "EOF";
2989+ Symbol[Symbol["VARIABLE_SEQUENCE"] = 6] = "VARIABLE_SEQUENCE";
2990+ Symbol[Symbol["TIME_AMPM"] = 7] = "TIME_AMPM";
2991+ Symbol[Symbol["TIME_24"] = 8] = "TIME_24";
2992+ Symbol[Symbol["NUMBER"] = 9] = "NUMBER";
2993+ Symbol[Symbol["STRING"] = 10] = "STRING";
2994+ Symbol[Symbol["AMPERSAND"] = 11] = "AMPERSAND";
2995+ Symbol[Symbol["EQUALS"] = 12] = "EQUALS";
2996+ Symbol[Symbol["PLUS"] = 13] = "PLUS";
2997+ Symbol[Symbol["LEFT_PAREN"] = 14] = "LEFT_PAREN";
2998+ Symbol[Symbol["RIGHT_PAREN"] = 15] = "RIGHT_PAREN";
2999+ Symbol[Symbol["LESS_THAN"] = 16] = "LESS_THAN";
3000+ Symbol[Symbol["GREATER_THAN"] = 17] = "GREATER_THAN";
3001+ Symbol[Symbol["NOT"] = 18] = "NOT";
3002+ Symbol[Symbol["MINUS"] = 19] = "MINUS";
3003+ Symbol[Symbol["ASTERISK"] = 20] = "ASTERISK";
3004+ Symbol[Symbol["DIVIDE"] = 21] = "DIVIDE";
3005+ Symbol[Symbol["CARROT"] = 22] = "CARROT";
3006+ Symbol[Symbol["FUNCTION"] = 23] = "FUNCTION";
3007+ Symbol[Symbol["EXP_SEQ"] = 24] = "EXP_SEQ";
3008+ Symbol[Symbol["CELL"] = 25] = "CELL";
3009+ Symbol[Symbol["FIXEDCELL"] = 26] = "FIXEDCELL";
3010+ Symbol[Symbol["COLON"] = 27] = "COLON";
3011+ Symbol[Symbol["CELL_UPPER"] = 28] = "CELL_UPPER";
3012+ Symbol[Symbol["ARRAY"] = 29] = "ARRAY";
3013+ Symbol[Symbol["SEMI_COLON"] = 30] = "SEMI_COLON";
3014+ Symbol[Symbol["COMMA"] = 31] = "COMMA";
3015+ Symbol[Symbol["VARIABLE"] = 32] = "VARIABLE";
3016+ Symbol[Symbol["DECIMAL"] = 33] = "DECIMAL";
3017+ Symbol[Symbol["NUMBER_UPPER"] = 34] = "NUMBER_UPPER";
3018+ Symbol[Symbol["PERCENT"] = 35] = "PERCENT";
3019+ Symbol[Symbol["POUND"] = 36] = "POUND";
3020+ Symbol[Symbol["EXCLAMATION_POINT"] = 37] = "EXCLAMATION_POINT";
3021+})(Symbol || (Symbol = {}));
3022+exports.Symbol = Symbol;
3023+var SYMBOL_NAME_TO_INDEX = {
3024+ "$accept": Symbol.ACCEPT,
3025+ "$end": Symbol.END,
3026+ "error": Symbol.ERROR,
3027+ "expressions": Symbol.EXPRESSIONS,
3028+ "expression": Symbol.EXPRESSION,
3029+ "EOF": Symbol.EOF,
3030+ "variableSequence": Symbol.VARIABLE_SEQUENCE,
3031+ "TIME_AMPM": Symbol.TIME_AMPM,
3032+ "TIME_24": Symbol.TIME_24,
3033+ "number": Symbol.NUMBER,
3034+ "STRING": Symbol.STRING,
3035+ "&": Symbol.AMPERSAND,
3036+ "=": Symbol.EQUALS,
3037+ "+": Symbol.PLUS,
3038+ "(": Symbol.LEFT_PAREN,
3039+ ")": Symbol.RIGHT_PAREN,
3040+ "<": Symbol.LESS_THAN,
3041+ ">": Symbol.GREATER_THAN,
3042+ "NOT": Symbol.NOT,
3043+ "-": Symbol.MINUS,
3044+ "*": Symbol.ASTERISK,
3045+ "/": Symbol.DIVIDE,
3046+ "^": Symbol.CARROT,
3047+ "FUNCTION": Symbol.FUNCTION,
3048+ "expseq": Symbol.EXP_SEQ,
3049+ "cell": Symbol.CELL,
3050+ "FIXEDCELL": Symbol.FIXEDCELL,
3051+ ":": Symbol.COLON,
3052+ "CELL": Symbol.CELL_UPPER,
3053+ "ARRAY": Symbol.ARRAY,
3054+ ";": Symbol.SEMI_COLON,
3055+ ",": Symbol.COMMA,
3056+ "VARIABLE": Symbol.VARIABLE,
3057+ "DECIMAL": Symbol.DECIMAL,
3058+ "NUMBER": Symbol.NUMBER_UPPER,
3059+ "%": Symbol.PERCENT,
3060+ "#": Symbol.POUND,
3061+ "!": Symbol.EXCLAMATION_POINT
3062+};
3063+exports.SYMBOL_NAME_TO_INDEX = SYMBOL_NAME_TO_INDEX;
3064+var symbolIndexToName = {};
3065+symbolIndexToName[Symbol.EOF] = "EOF";
3066+symbolIndexToName[Symbol.TIME_AMPM] = "TIME_AMPM";
3067+symbolIndexToName[Symbol.TIME_24] = "TIME_24";
3068+symbolIndexToName[Symbol.STRING] = "STRING";
3069+symbolIndexToName[Symbol.AMPERSAND] = "&";
3070+symbolIndexToName[Symbol.EQUALS] = "=";
3071+symbolIndexToName[Symbol.PLUS] = "+";
3072+symbolIndexToName[Symbol.LEFT_PAREN] = "(";
3073+symbolIndexToName[Symbol.RIGHT_PAREN] = ")";
3074+symbolIndexToName[Symbol.LESS_THAN] = "<";
3075+symbolIndexToName[Symbol.GREATER_THAN] = ">";
3076+symbolIndexToName[Symbol.NOT] = "NOTE";
3077+symbolIndexToName[Symbol.MINUS] = "-";
3078+symbolIndexToName[Symbol.ASTERISK] = "*";
3079+symbolIndexToName[Symbol.DIVIDE] = "/";
3080+symbolIndexToName[Symbol.CARROT] = "^";
3081+symbolIndexToName[Symbol.FUNCTION] = "FUNCTION";
3082+symbolIndexToName[Symbol.FIXEDCELL] = "FIXEDCELL";
3083+symbolIndexToName[Symbol.COLON] = ";";
3084+symbolIndexToName[Symbol.COMMA] = ",";
3085+symbolIndexToName[Symbol.VARIABLE] = "VARIABLE";
3086+symbolIndexToName[Symbol.DECIMAL] = "DECIMAL";
3087+symbolIndexToName[Symbol.NUMBER_UPPER] = "NUMBER";
3088+symbolIndexToName[Symbol.PERCENT] = "%";
3089+symbolIndexToName[Symbol.POUND] = "#";
3090+symbolIndexToName[Symbol.EXCLAMATION_POINT] = "!";
3091+var SYMBOL_INDEX_TO_NAME = symbolIndexToName;
3092+exports.SYMBOL_INDEX_TO_NAME = SYMBOL_INDEX_TO_NAME;
3093+var ObjectBuilder = (function () {
3094+ function ObjectBuilder() {
3095+ this.o = {};
3096+ }
3097+ ObjectBuilder.add = function (k, v) {
3098+ var m = new ObjectBuilder();
3099+ m.o[k.toString()] = v;
3100+ return m;
3101+ };
3102+ ObjectBuilder.prototype.add = function (k, v) {
3103+ this.o[k.toString()] = v;
3104+ return this;
3105+ };
3106+ ObjectBuilder.prototype.build = function () {
3107+ return this.o;
3108+ };
3109+ return ObjectBuilder;
3110+}());
3111+/**
3112+ * Array of to map rules to to LexActions and other rules. A single index in the object (e.g. `{2: 13}`) indicates the
3113+ * rule object to follow for the next token, while an array (e.g. `{23: [1, ReduceActions.LTE]}`) indicates the action to be taken,
3114+ * and the rule object to follow after the action.
3115+ */
3116+var table = [];
3117+// All functions in the spreadsheet start with a 0-token.
3118+table[0] = ObjectBuilder
3119+ .add(Symbol.ERROR, 13)
3120+ .add(Symbol.EXPRESSIONS, 1)
3121+ .add(Symbol.EXPRESSION, 2)
3122+ .add(Symbol.VARIABLE_SEQUENCE, 3)
3123+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
3124+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
3125+ .add(Symbol.NUMBER, 6)
3126+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
3127+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
3128+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
3129+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
3130+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
3131+ .add(Symbol.CELL, 12)
3132+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
3133+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
3134+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
3135+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
3136+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */])
3137+ .build();
3138+table[1] = ObjectBuilder
3139+ .add(Symbol.END, [3])
3140+ .build();
3141+table[2] = ObjectBuilder
3142+ .add(Symbol.EOF, [SHIFT, 19 /* DIVIDE */])
3143+ .add(Symbol.AMPERSAND, [SHIFT, 20 /* TO_POWER */])
3144+ .add(Symbol.EQUALS, [SHIFT, 21 /* INVERT_NUM */])
3145+ .add(Symbol.PLUS, [SHIFT, 22 /* TO_NUMBER_NAN_AS_ZERO */])
3146+ .add(Symbol.LESS_THAN, [SHIFT, 23 /* CALL_FUNCTION_LAST_BLANK */])
3147+ .add(Symbol.GREATER_THAN, [SHIFT, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
3148+ .add(Symbol.NOT, [SHIFT, 25 /* I25 */])
3149+ .add(Symbol.MINUS, [SHIFT, 26 /* I26 */])
3150+ .add(Symbol.ASTERISK, [SHIFT, 27 /* I27 */])
3151+ .add(Symbol.DIVIDE, [SHIFT, 28 /* FIXED_CELL_VAL */])
3152+ .add(Symbol.CARROT, [SHIFT, 29 /* FIXED_CELL_RANGE_VAL */])
3153+ .build();
3154+table[3] = ObjectBuilder
3155+ .add(Symbol.EOF, [REDUCE, 2 /* CALL_VARIABLE */])
3156+ .add(Symbol.AMPERSAND, [REDUCE, 2 /* CALL_VARIABLE */])
3157+ .add(Symbol.EQUALS, [REDUCE, 2 /* CALL_VARIABLE */])
3158+ .add(Symbol.PLUS, [REDUCE, 2 /* CALL_VARIABLE */])
3159+ .add(Symbol.RIGHT_PAREN, [REDUCE, 2 /* CALL_VARIABLE */])
3160+ .add(Symbol.LESS_THAN, [REDUCE, 2 /* CALL_VARIABLE */])
3161+ .add(Symbol.GREATER_THAN, [REDUCE, 2 /* CALL_VARIABLE */])
3162+ .add(Symbol.NOT, [REDUCE, 2 /* CALL_VARIABLE */])
3163+ .add(Symbol.MINUS, [REDUCE, 2 /* CALL_VARIABLE */])
3164+ .add(Symbol.ASTERISK, [REDUCE, 2 /* CALL_VARIABLE */])
3165+ .add(Symbol.DIVIDE, [REDUCE, 2 /* CALL_VARIABLE */])
3166+ .add(Symbol.CARROT, [REDUCE, 2 /* CALL_VARIABLE */])
3167+ .add(Symbol.SEMI_COLON, [REDUCE, 2 /* CALL_VARIABLE */])
3168+ .add(Symbol.COMMA, [REDUCE, 2 /* CALL_VARIABLE */])
3169+ .add(33, [SHIFT, 30 /* CELL_VALUE */])
3170+ .build();
3171+table[3] = ObjectBuilder
3172+ .add(Symbol.EOF, [REDUCE, 2 /* CALL_VARIABLE */])
3173+ .add(Symbol.AMPERSAND, [REDUCE, 2 /* CALL_VARIABLE */])
3174+ .add(Symbol.EQUALS, [REDUCE, 2 /* CALL_VARIABLE */])
3175+ .add(Symbol.PLUS, [REDUCE, 2 /* CALL_VARIABLE */])
3176+ .add(Symbol.RIGHT_PAREN, [REDUCE, 2 /* CALL_VARIABLE */])
3177+ .add(Symbol.LESS_THAN, [REDUCE, 2 /* CALL_VARIABLE */])
3178+ .add(Symbol.GREATER_THAN, [REDUCE, 2 /* CALL_VARIABLE */])
3179+ .add(Symbol.NOT, [REDUCE, 2 /* CALL_VARIABLE */])
3180+ .add(Symbol.MINUS, [REDUCE, 2 /* CALL_VARIABLE */])
3181+ .add(Symbol.ASTERISK, [REDUCE, 2 /* CALL_VARIABLE */])
3182+ .add(Symbol.DIVIDE, [REDUCE, 2 /* CALL_VARIABLE */])
3183+ .add(Symbol.CARROT, [REDUCE, 2 /* CALL_VARIABLE */])
3184+ .add(Symbol.SEMI_COLON, [REDUCE, 2 /* CALL_VARIABLE */])
3185+ .add(Symbol.COMMA, [REDUCE, 2 /* CALL_VARIABLE */])
3186+ .add(33, [SHIFT, 30 /* CELL_VALUE */])
3187+ .build();
3188+table[4] = ObjectBuilder
3189+ .add(Symbol.EOF, [REDUCE, 3 /* TIME_CALL_TRUE */])
3190+ .add(Symbol.AMPERSAND, [REDUCE, 3 /* TIME_CALL_TRUE */])
3191+ .add(Symbol.EQUALS, [REDUCE, 3 /* TIME_CALL_TRUE */])
3192+ .add(Symbol.PLUS, [REDUCE, 3 /* TIME_CALL_TRUE */])
3193+ .add(Symbol.RIGHT_PAREN, [REDUCE, 3 /* TIME_CALL_TRUE */])
3194+ .add(Symbol.LESS_THAN, [REDUCE, 3 /* TIME_CALL_TRUE */])
3195+ .add(Symbol.GREATER_THAN, [REDUCE, 3 /* TIME_CALL_TRUE */])
3196+ .add(Symbol.NOT, [REDUCE, 3 /* TIME_CALL_TRUE */])
3197+ .add(Symbol.MINUS, [REDUCE, 3 /* TIME_CALL_TRUE */])
3198+ .add(Symbol.ASTERISK, [REDUCE, 3 /* TIME_CALL_TRUE */])
3199+ .add(Symbol.DIVIDE, [REDUCE, 3 /* TIME_CALL_TRUE */])
3200+ .add(Symbol.CARROT, [REDUCE, 3 /* TIME_CALL_TRUE */])
3201+ .add(Symbol.SEMI_COLON, [REDUCE, 3 /* TIME_CALL_TRUE */])
3202+ .add(Symbol.COMMA, [REDUCE, 3 /* TIME_CALL_TRUE */])
3203+ .build();
3204+table[5] = ObjectBuilder
3205+ .add(Symbol.EOF, [REDUCE, 4 /* TIME_CALL */])
3206+ .add(Symbol.AMPERSAND, [REDUCE, 4 /* TIME_CALL */])
3207+ .add(Symbol.EQUALS, [REDUCE, 4 /* TIME_CALL */])
3208+ .add(Symbol.PLUS, [REDUCE, 4 /* TIME_CALL */])
3209+ .add(Symbol.RIGHT_PAREN, [REDUCE, 4 /* TIME_CALL */])
3210+ .add(Symbol.LESS_THAN, [REDUCE, 4 /* TIME_CALL */])
3211+ .add(Symbol.GREATER_THAN, [REDUCE, 4 /* TIME_CALL */])
3212+ .add(Symbol.NOT, [REDUCE, 4 /* TIME_CALL */])
3213+ .add(Symbol.MINUS, [REDUCE, 4 /* TIME_CALL */])
3214+ .add(Symbol.ASTERISK, [REDUCE, 4 /* TIME_CALL */])
3215+ .add(Symbol.DIVIDE, [REDUCE, 4 /* TIME_CALL */])
3216+ .add(Symbol.CARROT, [REDUCE, 4 /* TIME_CALL */])
3217+ .add(Symbol.SEMI_COLON, [REDUCE, 4 /* TIME_CALL */])
3218+ .add(Symbol.COMMA, [REDUCE, 4 /* TIME_CALL */])
3219+ .build();
3220+table[6] = ObjectBuilder
3221+ .add(Symbol.EOF, [REDUCE, 5 /* AS_NUMBER */])
3222+ .add(Symbol.AMPERSAND, [REDUCE, 5 /* AS_NUMBER */])
3223+ .add(Symbol.EQUALS, [REDUCE, 5 /* AS_NUMBER */])
3224+ .add(Symbol.PLUS, [REDUCE, 5 /* AS_NUMBER */])
3225+ .add(Symbol.RIGHT_PAREN, [REDUCE, 5 /* AS_NUMBER */])
3226+ .add(Symbol.LESS_THAN, [REDUCE, 5 /* AS_NUMBER */])
3227+ .add(Symbol.GREATER_THAN, [REDUCE, 5 /* AS_NUMBER */])
3228+ .add(Symbol.NOT, [REDUCE, 5 /* AS_NUMBER */])
3229+ .add(Symbol.MINUS, [REDUCE, 5 /* AS_NUMBER */])
3230+ .add(Symbol.ASTERISK, [REDUCE, 5 /* AS_NUMBER */])
3231+ .add(Symbol.DIVIDE, [REDUCE, 5 /* AS_NUMBER */])
3232+ .add(Symbol.CARROT, [REDUCE, 5 /* AS_NUMBER */])
3233+ .add(Symbol.SEMI_COLON, [REDUCE, 5 /* AS_NUMBER */])
3234+ .add(Symbol.COMMA, [REDUCE, 5 /* AS_NUMBER */])
3235+ .add(Symbol.PERCENT, [SHIFT, 31 /* CELL_RANGE_VALUE */])
3236+ .build();
3237+table[7] = ObjectBuilder
3238+ .add(Symbol.EOF, [REDUCE, 6 /* AS_STRING */])
3239+ .add(Symbol.AMPERSAND, [REDUCE, 6 /* AS_STRING */])
3240+ .add(Symbol.EQUALS, [REDUCE, 6 /* AS_STRING */])
3241+ .add(Symbol.PLUS, [REDUCE, 6 /* AS_STRING */])
3242+ .add(Symbol.RIGHT_PAREN, [REDUCE, 6 /* AS_STRING */])
3243+ .add(Symbol.LESS_THAN, [REDUCE, 6 /* AS_STRING */])
3244+ .add(Symbol.GREATER_THAN, [REDUCE, 6 /* AS_STRING */])
3245+ .add(Symbol.NOT, [REDUCE, 6 /* AS_STRING */])
3246+ .add(Symbol.MINUS, [REDUCE, 6 /* AS_STRING */])
3247+ .add(Symbol.ASTERISK, [REDUCE, 6 /* AS_STRING */])
3248+ .add(Symbol.DIVIDE, [REDUCE, 6 /* AS_STRING */])
3249+ .add(Symbol.CARROT, [REDUCE, 6 /* AS_STRING */])
3250+ .add(Symbol.SEMI_COLON, [REDUCE, 6 /* AS_STRING */])
3251+ .add(Symbol.COMMA, [REDUCE, 6 /* AS_STRING */])
3252+ .build();
3253+table[8] = ObjectBuilder
3254+ .add(Symbol.ERROR, 13)
3255+ .add(Symbol.EXPRESSION, 32)
3256+ .add(Symbol.VARIABLE_SEQUENCE, 3)
3257+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
3258+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
3259+ .add(Symbol.NUMBER, 6)
3260+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
3261+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
3262+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
3263+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
3264+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
3265+ .add(Symbol.CELL, 12)
3266+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
3267+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
3268+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
3269+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
3270+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */])
3271+ .build();
3272+table[9] = ObjectBuilder
3273+ .add(Symbol.ERROR, 13)
3274+ .add(Symbol.EXPRESSION, 33)
3275+ .add(Symbol.VARIABLE_SEQUENCE, 3)
3276+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
3277+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
3278+ .add(Symbol.NUMBER, 6)
3279+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
3280+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
3281+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
3282+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
3283+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
3284+ .add(Symbol.CELL, 12)
3285+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
3286+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
3287+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
3288+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
3289+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */])
3290+ .build();
3291+table[10] = ObjectBuilder
3292+ .add(Symbol.ERROR, 13)
3293+ .add(Symbol.EXPRESSION, 34)
3294+ .add(Symbol.VARIABLE_SEQUENCE, 3)
3295+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
3296+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
3297+ .add(Symbol.NUMBER, 6)
3298+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
3299+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
3300+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
3301+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
3302+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
3303+ .add(Symbol.CELL, 12)
3304+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
3305+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
3306+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
3307+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
3308+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */])
3309+ .build();
3310+table[11] = ObjectBuilder
3311+ .add(Symbol.LEFT_PAREN, [SHIFT, 35 /* REDUCE_PERCENT */])
3312+ .build();
3313+table[12] = ObjectBuilder
3314+ .add(Symbol.EOF, [REDUCE, 25 /* I25 */])
3315+ .add(Symbol.AMPERSAND, [REDUCE, 25 /* I25 */])
3316+ .add(Symbol.EQUALS, [REDUCE, 25 /* I25 */])
3317+ .add(Symbol.PLUS, [REDUCE, 25 /* I25 */])
3318+ .add(Symbol.RIGHT_PAREN, [REDUCE, 25 /* I25 */])
3319+ .add(Symbol.LESS_THAN, [REDUCE, 25 /* I25 */])
3320+ .add(Symbol.GREATER_THAN, [REDUCE, 25 /* I25 */])
3321+ .add(Symbol.NOT, [REDUCE, 25 /* I25 */])
3322+ .add(Symbol.MINUS, [REDUCE, 25 /* I25 */])
3323+ .add(Symbol.ASTERISK, [REDUCE, 25 /* I25 */])
3324+ .add(Symbol.DIVIDE, [REDUCE, 25 /* I25 */])
3325+ .add(Symbol.CARROT, [REDUCE, 25 /* I25 */])
3326+ .add(Symbol.SEMI_COLON, [REDUCE, 25 /* I25 */])
3327+ .add(Symbol.COMMA, [REDUCE, 25 /* I25 */])
3328+ .build();
3329+table[13] = ObjectBuilder
3330+ .add(Symbol.ERROR, 36)
3331+ .add(Symbol.EOF, [REDUCE, 26 /* I26 */])
3332+ .add(Symbol.AMPERSAND, [REDUCE, 26 /* I26 */])
3333+ .add(Symbol.EQUALS, [REDUCE, 26 /* I26 */])
3334+ .add(Symbol.PLUS, [REDUCE, 26 /* I26 */])
3335+ .add(Symbol.RIGHT_PAREN, [REDUCE, 26 /* I26 */])
3336+ .add(Symbol.LESS_THAN, [REDUCE, 26 /* I26 */])
3337+ .add(Symbol.GREATER_THAN, [REDUCE, 26 /* I26 */])
3338+ .add(Symbol.NOT, [REDUCE, 26 /* I26 */])
3339+ .add(Symbol.MINUS, [REDUCE, 26 /* I26 */])
3340+ .add(Symbol.ASTERISK, [REDUCE, 26 /* I26 */])
3341+ .add(Symbol.DIVIDE, [REDUCE, 26 /* I26 */])
3342+ .add(Symbol.CARROT, [REDUCE, 26 /* I26 */])
3343+ .add(Symbol.SEMI_COLON, [REDUCE, 26 /* I26 */])
3344+ .add(Symbol.COMMA, [REDUCE, 26 /* I26 */])
3345+ .add(Symbol.VARIABLE, [SHIFT, 37 /* ENSURE_LAST_TWO_IN_ARRAY_AND_PUSH */])
3346+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */])
3347+ .build();
3348+table[14] = ObjectBuilder
3349+ .add(Symbol.EOF, [REDUCE, 36 /* WRAP_CURRENT_INDEX_TOKEN_AS_ARRAY */])
3350+ .add(Symbol.AMPERSAND, [REDUCE, 36 /* WRAP_CURRENT_INDEX_TOKEN_AS_ARRAY */])
3351+ .add(Symbol.EQUALS, [REDUCE, 36 /* WRAP_CURRENT_INDEX_TOKEN_AS_ARRAY */])
3352+ .add(Symbol.PLUS, [REDUCE, 36 /* WRAP_CURRENT_INDEX_TOKEN_AS_ARRAY */])
3353+ .add(Symbol.RIGHT_PAREN, [REDUCE, 36 /* WRAP_CURRENT_INDEX_TOKEN_AS_ARRAY */])
3354+ .add(Symbol.LESS_THAN, [REDUCE, 36 /* WRAP_CURRENT_INDEX_TOKEN_AS_ARRAY */])
3355+ .add(Symbol.GREATER_THAN, [REDUCE, 36 /* WRAP_CURRENT_INDEX_TOKEN_AS_ARRAY */])
3356+ .add(Symbol.NOT, [REDUCE, 36 /* WRAP_CURRENT_INDEX_TOKEN_AS_ARRAY */])
3357+ .add(Symbol.MINUS, [REDUCE, 36 /* WRAP_CURRENT_INDEX_TOKEN_AS_ARRAY */])
3358+ .add(Symbol.ASTERISK, [REDUCE, 36 /* WRAP_CURRENT_INDEX_TOKEN_AS_ARRAY */])
3359+ .add(Symbol.DIVIDE, [REDUCE, 36 /* WRAP_CURRENT_INDEX_TOKEN_AS_ARRAY */])
3360+ .add(Symbol.CARROT, [REDUCE, 36 /* WRAP_CURRENT_INDEX_TOKEN_AS_ARRAY */])
3361+ .add(Symbol.SEMI_COLON, [REDUCE, 36 /* WRAP_CURRENT_INDEX_TOKEN_AS_ARRAY */])
3362+ .add(Symbol.COMMA, [REDUCE, 36 /* WRAP_CURRENT_INDEX_TOKEN_AS_ARRAY */])
3363+ .add(33, [REDUCE, 36 /* WRAP_CURRENT_INDEX_TOKEN_AS_ARRAY */])
3364+ .add(Symbol.POUND, [SHIFT, 38 /* REFLEXIVE_REDUCE */])
3365+ .build();
3366+table[15] = ObjectBuilder
3367+ .add(Symbol.EOF, [REDUCE, 38 /* REFLEXIVE_REDUCE */])
3368+ .add(Symbol.AMPERSAND, [REDUCE, 38 /* REFLEXIVE_REDUCE */])
3369+ .add(Symbol.EQUALS, [REDUCE, 38 /* REFLEXIVE_REDUCE */])
3370+ .add(Symbol.PLUS, [REDUCE, 38 /* REFLEXIVE_REDUCE */])
3371+ .add(Symbol.RIGHT_PAREN, [REDUCE, 38 /* REFLEXIVE_REDUCE */])
3372+ .add(Symbol.LESS_THAN, [REDUCE, 38 /* REFLEXIVE_REDUCE */])
3373+ .add(Symbol.GREATER_THAN, [REDUCE, 38 /* REFLEXIVE_REDUCE */])
3374+ .add(Symbol.NOT, [REDUCE, 38 /* REFLEXIVE_REDUCE */])
3375+ .add(Symbol.MINUS, [REDUCE, 38 /* REFLEXIVE_REDUCE */])
3376+ .add(Symbol.ASTERISK, [REDUCE, 38 /* REFLEXIVE_REDUCE */])
3377+ .add(Symbol.DIVIDE, [REDUCE, 38 /* REFLEXIVE_REDUCE */])
3378+ .add(Symbol.CARROT, [REDUCE, 38 /* REFLEXIVE_REDUCE */])
3379+ .add(Symbol.SEMI_COLON, [REDUCE, 38 /* REFLEXIVE_REDUCE */])
3380+ .add(Symbol.COMMA, [REDUCE, 38 /* REFLEXIVE_REDUCE */])
3381+ .add(33, [SHIFT, 39 /* REDUCE_FLOAT */])
3382+ .add(Symbol.PERCENT, [REDUCE, 38 /* REFLEXIVE_REDUCE */])
3383+ .add(38, [REDUCE, 38 /* REFLEXIVE_REDUCE */])
3384+ .build();
3385+table[16] = ObjectBuilder
3386+ .add(Symbol.EOF, [REDUCE, 28 /* FIXED_CELL_VAL */])
3387+ .add(Symbol.AMPERSAND, [REDUCE, 28 /* FIXED_CELL_VAL */])
3388+ .add(Symbol.EQUALS, [REDUCE, 28 /* FIXED_CELL_VAL */])
3389+ .add(Symbol.PLUS, [REDUCE, 28 /* FIXED_CELL_VAL */])
3390+ .add(Symbol.RIGHT_PAREN, [REDUCE, 28 /* FIXED_CELL_VAL */])
3391+ .add(Symbol.LESS_THAN, [REDUCE, 28 /* FIXED_CELL_VAL */])
3392+ .add(Symbol.GREATER_THAN, [REDUCE, 28 /* FIXED_CELL_VAL */])
3393+ .add(Symbol.NOT, [REDUCE, 28 /* FIXED_CELL_VAL */])
3394+ .add(Symbol.MINUS, [REDUCE, 28 /* FIXED_CELL_VAL */])
3395+ .add(Symbol.ASTERISK, [REDUCE, 28 /* FIXED_CELL_VAL */])
3396+ .add(Symbol.DIVIDE, [REDUCE, 28 /* FIXED_CELL_VAL */])
3397+ .add(Symbol.CARROT, [REDUCE, 28 /* FIXED_CELL_VAL */])
3398+ .add(Symbol.COLON, [SHIFT, 40 /* REDUCE_PREV_AS_PERCENT */])
3399+ .add(Symbol.SEMI_COLON, [REDUCE, 28 /* FIXED_CELL_VAL */])
3400+ .add(Symbol.COMMA, [REDUCE, 28 /* FIXED_CELL_VAL */])
3401+ .build();
3402+table[17] = ObjectBuilder
3403+ .add(Symbol.EOF, [REDUCE, 30 /* CELL_VALUE */])
3404+ .add(Symbol.AMPERSAND, [REDUCE, 30 /* CELL_VALUE */])
3405+ .add(Symbol.EQUALS, [REDUCE, 30 /* CELL_VALUE */])
3406+ .add(Symbol.PLUS, [REDUCE, 30 /* CELL_VALUE */])
3407+ .add(Symbol.RIGHT_PAREN, [REDUCE, 30 /* CELL_VALUE */])
3408+ .add(Symbol.LESS_THAN, [REDUCE, 30 /* CELL_VALUE */])
3409+ .add(Symbol.GREATER_THAN, [REDUCE, 30 /* CELL_VALUE */])
3410+ .add(Symbol.NOT, [REDUCE, 30 /* CELL_VALUE */])
3411+ .add(Symbol.MINUS, [REDUCE, 30 /* CELL_VALUE */])
3412+ .add(Symbol.ASTERISK, [REDUCE, 30 /* CELL_VALUE */])
3413+ .add(Symbol.DIVIDE, [REDUCE, 30 /* CELL_VALUE */])
3414+ .add(Symbol.CARROT, [REDUCE, 30 /* CELL_VALUE */])
3415+ .add(Symbol.COLON, [SHIFT, 41 /* REDUCE_LAST_THREE_A */])
3416+ .add(Symbol.SEMI_COLON, [REDUCE, 30 /* CELL_VALUE */])
3417+ .add(Symbol.COMMA, [REDUCE, 30 /* CELL_VALUE */])
3418+ .build();
3419+table[18] = ObjectBuilder
3420+ .add(Symbol.VARIABLE, [SHIFT, 42 /* REDUCE_LAST_THREE_B */])
3421+ .add(Symbol.EOF, [REDUCE, 43 /* AS_ERROR */])
3422+ .add(Symbol.RIGHT_PAREN, [REDUCE, 43 /* AS_ERROR */])
3423+ .add(Symbol.COMMA, [REDUCE, 43 /* AS_ERROR */])
3424+ .build();
3425+table[19] = ObjectBuilder
3426+ .add(Symbol.END, [ACCEPT, 1 /* RETURN_LAST */])
3427+ .build();
3428+table[20] = ObjectBuilder
3429+ .add(Symbol.ERROR, 13)
3430+ .add(Symbol.EXPRESSION, 43)
3431+ .add(Symbol.VARIABLE_SEQUENCE, 3)
3432+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
3433+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
3434+ .add(Symbol.NUMBER, 6)
3435+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
3436+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
3437+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
3438+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
3439+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
3440+ .add(Symbol.CELL, 12)
3441+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
3442+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
3443+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
3444+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
3445+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */])
3446+ .build();
3447+table[21] = ObjectBuilder
3448+ .add(Symbol.ERROR, 13)
3449+ .add(Symbol.EXPRESSION, 44)
3450+ .add(Symbol.VARIABLE_SEQUENCE, 3)
3451+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
3452+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
3453+ .add(Symbol.NUMBER, 6)
3454+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
3455+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
3456+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
3457+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
3458+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
3459+ .add(Symbol.CELL, 12)
3460+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
3461+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
3462+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
3463+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
3464+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */])
3465+ .build();
3466+table[22] = ObjectBuilder
3467+ .add(Symbol.ERROR, 13)
3468+ .add(Symbol.EXPRESSION, 45)
3469+ .add(Symbol.VARIABLE_SEQUENCE, 3)
3470+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
3471+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
3472+ .add(Symbol.NUMBER, 6)
3473+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
3474+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
3475+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
3476+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
3477+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
3478+ .add(Symbol.CELL, 12)
3479+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
3480+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
3481+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
3482+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
3483+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */])
3484+ .build();
3485+table[23] = ObjectBuilder
3486+ .add(Symbol.ERROR, 13)
3487+ .add(Symbol.EXPRESSION, 48)
3488+ .add(Symbol.VARIABLE_SEQUENCE, 3)
3489+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
3490+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
3491+ .add(Symbol.NUMBER, 6)
3492+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
3493+ .add(Symbol.EQUALS, [SHIFT, 46])
3494+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
3495+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
3496+ .add(Symbol.GREATER_THAN, [SHIFT, 47])
3497+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
3498+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
3499+ .add(Symbol.CELL, 12)
3500+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
3501+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
3502+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
3503+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
3504+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */])
3505+ .build();
3506+table[24] = ObjectBuilder
3507+ .add(Symbol.ERROR, 13)
3508+ .add(Symbol.EXPRESSION, 50)
3509+ .add(Symbol.VARIABLE_SEQUENCE, 3)
3510+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
3511+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
3512+ .add(Symbol.NUMBER, 6)
3513+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
3514+ .add(Symbol.EQUALS, [SHIFT, 49])
3515+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
3516+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
3517+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
3518+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
3519+ .add(Symbol.CELL, 12)
3520+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
3521+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
3522+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
3523+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
3524+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */])
3525+ .build();
3526+table[25] = ObjectBuilder
3527+ .add(Symbol.ERROR, 13)
3528+ .add(Symbol.EXPRESSION, 51)
3529+ .add(Symbol.VARIABLE_SEQUENCE, 3)
3530+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
3531+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
3532+ .add(Symbol.NUMBER, 6)
3533+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
3534+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
3535+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
3536+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
3537+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
3538+ .add(Symbol.CELL, 12)
3539+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
3540+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
3541+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
3542+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
3543+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */])
3544+ .build();
3545+table[26] = ObjectBuilder
3546+ .add(Symbol.ERROR, 13)
3547+ .add(Symbol.EXPRESSION, 52)
3548+ .add(Symbol.VARIABLE_SEQUENCE, 3)
3549+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
3550+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
3551+ .add(Symbol.NUMBER, 6)
3552+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
3553+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
3554+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
3555+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
3556+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
3557+ .add(Symbol.CELL, 12)
3558+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
3559+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
3560+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
3561+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
3562+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */])
3563+ .build();
3564+table[27] = ObjectBuilder
3565+ .add(Symbol.ERROR, 13)
3566+ .add(Symbol.EXPRESSION, 53)
3567+ .add(Symbol.VARIABLE_SEQUENCE, 3)
3568+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
3569+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
3570+ .add(Symbol.NUMBER, 6)
3571+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
3572+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
3573+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
3574+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
3575+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
3576+ .add(Symbol.CELL, 12)
3577+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
3578+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
3579+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
3580+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
3581+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */])
3582+ .build();
3583+table[28] = ObjectBuilder
3584+ .add(Symbol.ERROR, 13)
3585+ .add(Symbol.EXPRESSION, 54)
3586+ .add(Symbol.VARIABLE_SEQUENCE, 3)
3587+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
3588+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
3589+ .add(Symbol.NUMBER, 6)
3590+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
3591+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
3592+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
3593+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
3594+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
3595+ .add(Symbol.CELL, 12)
3596+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
3597+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
3598+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
3599+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
3600+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */])
3601+ .build();
3602+table[29] = ObjectBuilder
3603+ .add(Symbol.ERROR, 13)
3604+ .add(Symbol.EXPRESSION, 55)
3605+ .add(Symbol.VARIABLE_SEQUENCE, 3)
3606+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
3607+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
3608+ .add(Symbol.NUMBER, 6)
3609+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
3610+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
3611+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
3612+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
3613+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
3614+ .add(Symbol.CELL, 12)
3615+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
3616+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
3617+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
3618+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
3619+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */])
3620+ .build();
3621+table[30 /* CELL_VALUE */] = ObjectBuilder
3622+ .add(Symbol.VARIABLE, [SHIFT, 56])
3623+ .build();
3624+table[31] = ObjectBuilder
3625+ .add(Symbol.EOF, [REDUCE, 40 /* REDUCE_PREV_AS_PERCENT */])
3626+ .add(Symbol.AMPERSAND, [REDUCE, 40 /* REDUCE_PREV_AS_PERCENT */])
3627+ .add(Symbol.EQUALS, [REDUCE, 40 /* REDUCE_PREV_AS_PERCENT */])
3628+ .add(Symbol.PLUS, [REDUCE, 40 /* REDUCE_PREV_AS_PERCENT */])
3629+ .add(Symbol.RIGHT_PAREN, [REDUCE, 40 /* REDUCE_PREV_AS_PERCENT */])
3630+ .add(Symbol.LESS_THAN, [REDUCE, 40 /* REDUCE_PREV_AS_PERCENT */])
3631+ .add(Symbol.GREATER_THAN, [REDUCE, 40 /* REDUCE_PREV_AS_PERCENT */])
3632+ .add(Symbol.NOT, [REDUCE, 40 /* REDUCE_PREV_AS_PERCENT */])
3633+ .add(Symbol.MINUS, [REDUCE, 40 /* REDUCE_PREV_AS_PERCENT */])
3634+ .add(Symbol.ASTERISK, [REDUCE, 40 /* REDUCE_PREV_AS_PERCENT */])
3635+ .add(Symbol.DIVIDE, [REDUCE, 40 /* REDUCE_PREV_AS_PERCENT */])
3636+ .add(Symbol.CARROT, [REDUCE, 40 /* REDUCE_PREV_AS_PERCENT */])
3637+ .add(Symbol.SEMI_COLON, [REDUCE, 40 /* REDUCE_PREV_AS_PERCENT */])
3638+ .add(Symbol.COMMA, [REDUCE, 40 /* REDUCE_PREV_AS_PERCENT */])
3639+ .add(Symbol.PERCENT, [REDUCE, 40 /* REDUCE_PREV_AS_PERCENT */])
3640+ .add(38, [REDUCE, 40 /* REDUCE_PREV_AS_PERCENT */])
3641+ .build();
3642+table[32] = ObjectBuilder
3643+ .add(Symbol.AMPERSAND, [SHIFT, 20 /* TO_POWER */])
3644+ .add(Symbol.EQUALS, [SHIFT, 21 /* INVERT_NUM */])
3645+ .add(Symbol.PLUS, [SHIFT, 22 /* TO_NUMBER_NAN_AS_ZERO */])
3646+ .add(Symbol.RIGHT_PAREN, [SHIFT, 57])
3647+ .add(Symbol.LESS_THAN, [SHIFT, 23 /* CALL_FUNCTION_LAST_BLANK */])
3648+ .add(Symbol.GREATER_THAN, [SHIFT, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
3649+ .add(Symbol.NOT, [SHIFT, 25 /* I25 */])
3650+ .add(Symbol.MINUS, [SHIFT, 26 /* I26 */])
3651+ .add(Symbol.ASTERISK, [SHIFT, 27 /* I27 */])
3652+ .add(Symbol.DIVIDE, [SHIFT, 28 /* FIXED_CELL_VAL */])
3653+ .add(Symbol.CARROT, [SHIFT, 29 /* FIXED_CELL_RANGE_VAL */])
3654+ .build();
3655+table[33] = ObjectBuilder
3656+ .add(Symbol.EOF, [REDUCE, 21 /* INVERT_NUM */])
3657+ .add(Symbol.AMPERSAND, [SHIFT, 20 /* TO_POWER */])
3658+ .add(Symbol.EQUALS, [REDUCE, 21 /* INVERT_NUM */])
3659+ .add(Symbol.PLUS, [REDUCE, 21 /* INVERT_NUM */])
3660+ .add(Symbol.RIGHT_PAREN, [REDUCE, 21 /* INVERT_NUM */])
3661+ .add(Symbol.LESS_THAN, [REDUCE, 21 /* INVERT_NUM */])
3662+ .add(Symbol.GREATER_THAN, [REDUCE, 21 /* INVERT_NUM */])
3663+ .add(Symbol.NOT, [REDUCE, 21 /* INVERT_NUM */])
3664+ .add(Symbol.MINUS, [REDUCE, 21 /* INVERT_NUM */])
3665+ .add(Symbol.ASTERISK, [SHIFT, 27 /* I27 */])
3666+ .add(Symbol.DIVIDE, [SHIFT, 28 /* FIXED_CELL_VAL */])
3667+ .add(Symbol.CARROT, [SHIFT, 29 /* FIXED_CELL_RANGE_VAL */])
3668+ .add(Symbol.SEMI_COLON, [REDUCE, 21 /* INVERT_NUM */])
3669+ .add(Symbol.COMMA, [REDUCE, 21 /* INVERT_NUM */])
3670+ .build();
3671+table[34] = ObjectBuilder
3672+ .add(Symbol.EOF, [REDUCE, 22 /* TO_NUMBER_NAN_AS_ZERO */])
3673+ .add(Symbol.AMPERSAND, [SHIFT, 20 /* TO_POWER */])
3674+ .add(Symbol.EQUALS, [REDUCE, 22 /* TO_NUMBER_NAN_AS_ZERO */])
3675+ .add(Symbol.PLUS, [REDUCE, 22 /* TO_NUMBER_NAN_AS_ZERO */])
3676+ .add(Symbol.RIGHT_PAREN, [REDUCE, 22 /* TO_NUMBER_NAN_AS_ZERO */])
3677+ .add(Symbol.LESS_THAN, [REDUCE, 22 /* TO_NUMBER_NAN_AS_ZERO */])
3678+ .add(Symbol.GREATER_THAN, [REDUCE, 22 /* TO_NUMBER_NAN_AS_ZERO */])
3679+ .add(Symbol.NOT, [REDUCE, 22 /* TO_NUMBER_NAN_AS_ZERO */])
3680+ .add(Symbol.MINUS, [REDUCE, 22 /* TO_NUMBER_NAN_AS_ZERO */])
3681+ .add(Symbol.ASTERISK, [SHIFT, 27 /* I27 */])
3682+ .add(Symbol.DIVIDE, [SHIFT, 28 /* FIXED_CELL_VAL */])
3683+ .add(Symbol.CARROT, [SHIFT, 29 /* FIXED_CELL_RANGE_VAL */])
3684+ .add(Symbol.SEMI_COLON, [REDUCE, 22 /* TO_NUMBER_NAN_AS_ZERO */])
3685+ .add(Symbol.COMMA, [REDUCE, 22 /* TO_NUMBER_NAN_AS_ZERO */])
3686+ .build();
3687+table[35] = ObjectBuilder
3688+ .add(Symbol.ERROR, 13)
3689+ .add(Symbol.EXPRESSION, 60)
3690+ .add(Symbol.VARIABLE_SEQUENCE, 3)
3691+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
3692+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
3693+ .add(Symbol.NUMBER, 6)
3694+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
3695+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
3696+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
3697+ .add(Symbol.RIGHT_PAREN, [SHIFT, 58])
3698+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
3699+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
3700+ .add(Symbol.EXP_SEQ, 59)
3701+ .add(Symbol.CELL, 12)
3702+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
3703+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
3704+ .add(Symbol.ARRAY, [SHIFT, 61])
3705+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
3706+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
3707+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */])
3708+ .build();
3709+table[36] = ObjectBuilder
3710+ .add(Symbol.EOF, [REDUCE, 27 /* I27 */])
3711+ .add(Symbol.AMPERSAND, [REDUCE, 27 /* I27 */])
3712+ .add(Symbol.EQUALS, [REDUCE, 27 /* I27 */])
3713+ .add(Symbol.PLUS, [REDUCE, 27 /* I27 */])
3714+ .add(Symbol.RIGHT_PAREN, [REDUCE, 27 /* I27 */])
3715+ .add(Symbol.LESS_THAN, [REDUCE, 27 /* I27 */])
3716+ .add(Symbol.GREATER_THAN, [REDUCE, 27 /* I27 */])
3717+ .add(Symbol.NOT, [REDUCE, 27 /* I27 */])
3718+ .add(Symbol.MINUS, [REDUCE, 27 /* I27 */])
3719+ .add(Symbol.ASTERISK, [REDUCE, 27 /* I27 */])
3720+ .add(Symbol.DIVIDE, [REDUCE, 27 /* I27 */])
3721+ .add(Symbol.CARROT, [REDUCE, 27 /* I27 */])
3722+ .add(Symbol.SEMI_COLON, [REDUCE, 27 /* I27 */])
3723+ .add(Symbol.COMMA, [REDUCE, 27 /* I27 */])
3724+ .build();
3725+table[37] = ObjectBuilder
3726+ .add(Symbol.POUND, [REDUCE, 43 /* AS_ERROR */])
3727+ .build();
3728+table[38] = ObjectBuilder
3729+ .add(Symbol.VARIABLE, [SHIFT, 62])
3730+ .build();
3731+table[39] = ObjectBuilder
3732+ .add(Symbol.NUMBER_UPPER, [SHIFT, 63])
3733+ .build();
3734+table[40] = ObjectBuilder
3735+ .add(Symbol.FIXEDCELL, [SHIFT, 64])
3736+ .build();
3737+table[41] = ObjectBuilder
3738+ .add(Symbol.CELL_UPPER, [SHIFT, 65])
3739+ .build();
3740+table[42] = ObjectBuilder
3741+ .add(Symbol.EXCLAMATION_POINT, [SHIFT, 66])
3742+ .build();
3743+table[43] = ObjectBuilder
3744+ .add(Symbol.EOF, [REDUCE, 7 /* AMPERSAND */])
3745+ .add(Symbol.AMPERSAND, [REDUCE, 7 /* AMPERSAND */])
3746+ .add(Symbol.EQUALS, [REDUCE, 7 /* AMPERSAND */])
3747+ .add(Symbol.PLUS, [REDUCE, 7 /* AMPERSAND */])
3748+ .add(Symbol.RIGHT_PAREN, [REDUCE, 7 /* AMPERSAND */])
3749+ .add(Symbol.LESS_THAN, [REDUCE, 7 /* AMPERSAND */])
3750+ .add(Symbol.GREATER_THAN, [REDUCE, 7 /* AMPERSAND */])
3751+ .add(Symbol.NOT, [REDUCE, 7 /* AMPERSAND */])
3752+ .add(Symbol.MINUS, [REDUCE, 7 /* AMPERSAND */])
3753+ .add(Symbol.ASTERISK, [REDUCE, 7 /* AMPERSAND */])
3754+ .add(Symbol.DIVIDE, [REDUCE, 7 /* AMPERSAND */])
3755+ .add(Symbol.CARROT, [REDUCE, 7 /* AMPERSAND */])
3756+ .add(Symbol.SEMI_COLON, [REDUCE, 7 /* AMPERSAND */])
3757+ .add(Symbol.COMMA, [REDUCE, 7 /* AMPERSAND */])
3758+ .build();
3759+table[44] = ObjectBuilder
3760+ .add(Symbol.EOF, [REDUCE, 8 /* EQUALS */])
3761+ .add(Symbol.AMPERSAND, [SHIFT, 20 /* TO_POWER */])
3762+ .add(Symbol.EQUALS, [REDUCE, 8 /* EQUALS */])
3763+ .add(Symbol.PLUS, [SHIFT, 22 /* TO_NUMBER_NAN_AS_ZERO */])
3764+ .add(Symbol.RIGHT_PAREN, [REDUCE, 8 /* EQUALS */])
3765+ .add(Symbol.LESS_THAN, [SHIFT, 23 /* CALL_FUNCTION_LAST_BLANK */])
3766+ .add(Symbol.GREATER_THAN, [SHIFT, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
3767+ .add(Symbol.NOT, [SHIFT, 25 /* I25 */])
3768+ .add(Symbol.MINUS, [SHIFT, 26 /* I26 */])
3769+ .add(Symbol.ASTERISK, [SHIFT, 27 /* I27 */])
3770+ .add(Symbol.DIVIDE, [SHIFT, 28 /* FIXED_CELL_VAL */])
3771+ .add(Symbol.CARROT, [SHIFT, 29 /* FIXED_CELL_RANGE_VAL */])
3772+ .add(Symbol.SEMI_COLON, [REDUCE, 8 /* EQUALS */])
3773+ .add(Symbol.COMMA, [REDUCE, 8 /* EQUALS */])
3774+ .build();
3775+table[45] = ObjectBuilder
3776+ .add(Symbol.EOF, [REDUCE, 9 /* PLUS */])
3777+ .add(Symbol.AMPERSAND, [SHIFT, 20 /* TO_POWER */])
3778+ .add(Symbol.EQUALS, [REDUCE, 9 /* PLUS */])
3779+ .add(Symbol.PLUS, [REDUCE, 9 /* PLUS */])
3780+ .add(Symbol.RIGHT_PAREN, [REDUCE, 9 /* PLUS */])
3781+ .add(Symbol.LESS_THAN, [REDUCE, 9 /* PLUS */])
3782+ .add(Symbol.GREATER_THAN, [REDUCE, 9 /* PLUS */])
3783+ .add(Symbol.NOT, [REDUCE, 9 /* PLUS */])
3784+ .add(Symbol.MINUS, [REDUCE, 9 /* PLUS */])
3785+ .add(Symbol.ASTERISK, [SHIFT, 27 /* I27 */])
3786+ .add(Symbol.DIVIDE, [SHIFT, 28 /* FIXED_CELL_VAL */])
3787+ .add(Symbol.CARROT, [SHIFT, 29 /* FIXED_CELL_RANGE_VAL */])
3788+ .add(Symbol.SEMI_COLON, [REDUCE, 9 /* PLUS */])
3789+ .add(Symbol.COMMA, [REDUCE, 9 /* PLUS */])
3790+ .build();
3791+table[46] = ObjectBuilder
3792+ .add(Symbol.ERROR, 13)
3793+ .add(Symbol.EXPRESSION, 67)
3794+ .add(Symbol.VARIABLE_SEQUENCE, 3)
3795+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
3796+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
3797+ .add(Symbol.NUMBER, 6)
3798+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
3799+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
3800+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
3801+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
3802+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
3803+ .add(Symbol.CELL, 12)
3804+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
3805+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
3806+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
3807+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
3808+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */])
3809+ .build();
3810+table[47] = ObjectBuilder
3811+ .add(Symbol.ERROR, 13)
3812+ .add(Symbol.EXPRESSION, 68)
3813+ .add(Symbol.VARIABLE_SEQUENCE, 3)
3814+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
3815+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
3816+ .add(Symbol.NUMBER, 6)
3817+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
3818+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
3819+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
3820+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
3821+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
3822+ .add(Symbol.CELL, 12)
3823+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
3824+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
3825+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
3826+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
3827+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */])
3828+ .build();
3829+table[48] = ObjectBuilder
3830+ .add(Symbol.EOF, [REDUCE, 16 /* LT */])
3831+ .add(Symbol.AMPERSAND, [SHIFT, 20 /* TO_POWER */])
3832+ .add(Symbol.EQUALS, [REDUCE, 16 /* LT */])
3833+ .add(Symbol.PLUS, [SHIFT, 22 /* TO_NUMBER_NAN_AS_ZERO */])
3834+ .add(Symbol.RIGHT_PAREN, [REDUCE, 16 /* LT */])
3835+ .add(Symbol.LESS_THAN, [REDUCE, 16 /* LT */])
3836+ .add(Symbol.GREATER_THAN, [REDUCE, 16 /* LT */])
3837+ .add(Symbol.NOT, [REDUCE, 16 /* LT */])
3838+ .add(Symbol.MINUS, [SHIFT, 26 /* I26 */])
3839+ .add(Symbol.ASTERISK, [SHIFT, 27 /* I27 */])
3840+ .add(Symbol.DIVIDE, [SHIFT, 28 /* FIXED_CELL_VAL */])
3841+ .add(Symbol.CARROT, [SHIFT, 29 /* FIXED_CELL_RANGE_VAL */])
3842+ .add(Symbol.SEMI_COLON, [REDUCE, 16 /* LT */])
3843+ .add(Symbol.COMMA, [REDUCE, 16 /* LT */])
3844+ .build();
3845+table[49] = ObjectBuilder
3846+ .add(Symbol.ERROR, 13)
3847+ .add(Symbol.EXPRESSION, 69)
3848+ .add(Symbol.VARIABLE_SEQUENCE, 3)
3849+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
3850+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
3851+ .add(Symbol.NUMBER, 6)
3852+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
3853+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
3854+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
3855+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
3856+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
3857+ .add(Symbol.CELL, 12)
3858+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
3859+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
3860+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
3861+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
3862+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */])
3863+ .build();
3864+table[50] = ObjectBuilder
3865+ .add(Symbol.EOF, [REDUCE, 15 /* GT */])
3866+ .add(Symbol.AMPERSAND, [SHIFT, 20 /* TO_POWER */])
3867+ .add(Symbol.EQUALS, [REDUCE, 15 /* GT */])
3868+ .add(Symbol.PLUS, [SHIFT, 22 /* TO_NUMBER_NAN_AS_ZERO */])
3869+ .add(Symbol.RIGHT_PAREN, [REDUCE, 15 /* GT */])
3870+ .add(Symbol.LESS_THAN, [REDUCE, 15 /* GT */])
3871+ .add(Symbol.GREATER_THAN, [REDUCE, 15 /* GT */])
3872+ .add(Symbol.NOT, [REDUCE, 15 /* GT */])
3873+ .add(Symbol.MINUS, [SHIFT, 26 /* I26 */])
3874+ .add(Symbol.ASTERISK, [SHIFT, 27 /* I27 */])
3875+ .add(Symbol.DIVIDE, [SHIFT, 28 /* FIXED_CELL_VAL */])
3876+ .add(Symbol.CARROT, [SHIFT, 29 /* FIXED_CELL_RANGE_VAL */])
3877+ .add(Symbol.SEMI_COLON, [REDUCE, 15 /* GT */])
3878+ .add(Symbol.COMMA, [REDUCE, 15 /* GT */])
3879+ .build();
3880+table[51] = ObjectBuilder
3881+ .add(Symbol.EOF, [REDUCE, 14 /* NOT */])
3882+ .add(Symbol.AMPERSAND, [SHIFT, 20 /* TO_POWER */])
3883+ .add(Symbol.EQUALS, [REDUCE, 14 /* NOT */])
3884+ .add(Symbol.PLUS, [SHIFT, 22 /* TO_NUMBER_NAN_AS_ZERO */])
3885+ .add(Symbol.RIGHT_PAREN, [REDUCE, 14 /* NOT */])
3886+ .add(Symbol.LESS_THAN, [SHIFT, 23 /* CALL_FUNCTION_LAST_BLANK */])
3887+ .add(Symbol.GREATER_THAN, [SHIFT, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
3888+ .add(Symbol.NOT, [REDUCE, 14 /* NOT */])
3889+ .add(Symbol.MINUS, [SHIFT, 26 /* I26 */])
3890+ .add(Symbol.ASTERISK, [SHIFT, 27 /* I27 */])
3891+ .add(Symbol.DIVIDE, [SHIFT, 28 /* FIXED_CELL_VAL */])
3892+ .add(Symbol.CARROT, [SHIFT, 29 /* FIXED_CELL_RANGE_VAL */])
3893+ .add(Symbol.SEMI_COLON, [REDUCE, 14 /* NOT */])
3894+ .add(Symbol.COMMA, [REDUCE, 14 /* NOT */])
3895+ .build();
3896+table[52] = ObjectBuilder
3897+ .add(Symbol.EOF, [REDUCE, 17 /* MINUS */])
3898+ .add(Symbol.AMPERSAND, [SHIFT, 20 /* TO_POWER */])
3899+ .add(Symbol.EQUALS, [REDUCE, 17 /* MINUS */])
3900+ .add(Symbol.PLUS, [REDUCE, 17 /* MINUS */])
3901+ .add(Symbol.RIGHT_PAREN, [REDUCE, 17 /* MINUS */])
3902+ .add(Symbol.LESS_THAN, [REDUCE, 17 /* MINUS */])
3903+ .add(Symbol.GREATER_THAN, [REDUCE, 17 /* MINUS */])
3904+ .add(Symbol.NOT, [REDUCE, 17 /* MINUS */])
3905+ .add(Symbol.MINUS, [REDUCE, 17 /* MINUS */])
3906+ .add(Symbol.ASTERISK, [SHIFT, 27 /* I27 */])
3907+ .add(Symbol.DIVIDE, [SHIFT, 28 /* FIXED_CELL_VAL */])
3908+ .add(Symbol.CARROT, [SHIFT, 29 /* FIXED_CELL_RANGE_VAL */])
3909+ .add(Symbol.SEMI_COLON, [REDUCE, 17 /* MINUS */])
3910+ .add(Symbol.COMMA, [REDUCE, 17 /* MINUS */])
3911+ .build();
3912+table[53] = ObjectBuilder
3913+ .add(Symbol.EOF, [REDUCE, 18 /* MULTIPLY */])
3914+ .add(Symbol.AMPERSAND, [SHIFT, 20 /* TO_POWER */])
3915+ .add(Symbol.EQUALS, [REDUCE, 18 /* MULTIPLY */])
3916+ .add(Symbol.PLUS, [REDUCE, 18 /* MULTIPLY */])
3917+ .add(Symbol.RIGHT_PAREN, [REDUCE, 18 /* MULTIPLY */])
3918+ .add(Symbol.LESS_THAN, [REDUCE, 18 /* MULTIPLY */])
3919+ .add(Symbol.GREATER_THAN, [REDUCE, 18 /* MULTIPLY */])
3920+ .add(Symbol.NOT, [REDUCE, 18 /* MULTIPLY */])
3921+ .add(Symbol.MINUS, [REDUCE, 18 /* MULTIPLY */])
3922+ .add(Symbol.ASTERISK, [REDUCE, 18 /* MULTIPLY */])
3923+ .add(Symbol.DIVIDE, [REDUCE, 18 /* MULTIPLY */])
3924+ .add(Symbol.CARROT, [SHIFT, 29 /* FIXED_CELL_RANGE_VAL */])
3925+ .add(Symbol.SEMI_COLON, [REDUCE, 18 /* MULTIPLY */])
3926+ .add(Symbol.COMMA, [REDUCE, 18 /* MULTIPLY */])
3927+ .build();
3928+table[54] = ObjectBuilder
3929+ .add(Symbol.EOF, [REDUCE, 19 /* DIVIDE */])
3930+ .add(Symbol.AMPERSAND, [SHIFT, 20 /* TO_POWER */])
3931+ .add(Symbol.EQUALS, [REDUCE, 19 /* DIVIDE */])
3932+ .add(Symbol.PLUS, [REDUCE, 19 /* DIVIDE */])
3933+ .add(Symbol.RIGHT_PAREN, [REDUCE, 19 /* DIVIDE */])
3934+ .add(Symbol.LESS_THAN, [REDUCE, 19 /* DIVIDE */])
3935+ .add(Symbol.GREATER_THAN, [REDUCE, 19 /* DIVIDE */])
3936+ .add(Symbol.NOT, [REDUCE, 19 /* DIVIDE */])
3937+ .add(Symbol.MINUS, [REDUCE, 19 /* DIVIDE */])
3938+ .add(Symbol.ASTERISK, [REDUCE, 19 /* DIVIDE */])
3939+ .add(Symbol.DIVIDE, [REDUCE, 19 /* DIVIDE */])
3940+ .add(Symbol.CARROT, [SHIFT, 29 /* FIXED_CELL_RANGE_VAL */])
3941+ .add(Symbol.SEMI_COLON, [REDUCE, 19 /* DIVIDE */])
3942+ .add(Symbol.COMMA, [REDUCE, 19 /* DIVIDE */])
3943+ .build();
3944+table[55] = ObjectBuilder
3945+ .add(Symbol.EOF, [REDUCE, 20 /* TO_POWER */])
3946+ .add(Symbol.AMPERSAND, [SHIFT, 20 /* TO_POWER */])
3947+ .add(Symbol.EQUALS, [REDUCE, 20 /* TO_POWER */])
3948+ .add(Symbol.PLUS, [REDUCE, 20 /* TO_POWER */])
3949+ .add(Symbol.RIGHT_PAREN, [REDUCE, 20 /* TO_POWER */])
3950+ .add(Symbol.LESS_THAN, [REDUCE, 20 /* TO_POWER */])
3951+ .add(Symbol.GREATER_THAN, [REDUCE, 20 /* TO_POWER */])
3952+ .add(Symbol.NOT, [REDUCE, 20 /* TO_POWER */])
3953+ .add(Symbol.MINUS, [REDUCE, 20 /* TO_POWER */])
3954+ .add(Symbol.ASTERISK, [REDUCE, 20 /* TO_POWER */])
3955+ .add(Symbol.DIVIDE, [REDUCE, 20 /* TO_POWER */])
3956+ .add(Symbol.CARROT, [REDUCE, 20 /* TO_POWER */])
3957+ .add(Symbol.SEMI_COLON, [REDUCE, 20 /* TO_POWER */])
3958+ .add(Symbol.COMMA, [REDUCE, 20 /* TO_POWER */])
3959+ .build();
3960+table[56] = ObjectBuilder
3961+ .add(Symbol.EOF, [REDUCE, 37 /* ENSURE_LAST_TWO_IN_ARRAY_AND_PUSH */])
3962+ .add(Symbol.AMPERSAND, [REDUCE, 37 /* ENSURE_LAST_TWO_IN_ARRAY_AND_PUSH */])
3963+ .add(Symbol.EQUALS, [REDUCE, 37 /* ENSURE_LAST_TWO_IN_ARRAY_AND_PUSH */])
3964+ .add(Symbol.PLUS, [REDUCE, 37 /* ENSURE_LAST_TWO_IN_ARRAY_AND_PUSH */])
3965+ .add(Symbol.RIGHT_PAREN, [REDUCE, 37 /* ENSURE_LAST_TWO_IN_ARRAY_AND_PUSH */])
3966+ .add(Symbol.LESS_THAN, [REDUCE, 37 /* ENSURE_LAST_TWO_IN_ARRAY_AND_PUSH */])
3967+ .add(Symbol.GREATER_THAN, [REDUCE, 37 /* ENSURE_LAST_TWO_IN_ARRAY_AND_PUSH */])
3968+ .add(Symbol.NOT, [REDUCE, 37 /* ENSURE_LAST_TWO_IN_ARRAY_AND_PUSH */])
3969+ .add(Symbol.MINUS, [REDUCE, 37 /* ENSURE_LAST_TWO_IN_ARRAY_AND_PUSH */])
3970+ .add(Symbol.ASTERISK, [REDUCE, 37 /* ENSURE_LAST_TWO_IN_ARRAY_AND_PUSH */])
3971+ .add(Symbol.DIVIDE, [REDUCE, 37 /* ENSURE_LAST_TWO_IN_ARRAY_AND_PUSH */])
3972+ .add(Symbol.CARROT, [REDUCE, 37 /* ENSURE_LAST_TWO_IN_ARRAY_AND_PUSH */])
3973+ .add(Symbol.SEMI_COLON, [REDUCE, 37 /* ENSURE_LAST_TWO_IN_ARRAY_AND_PUSH */])
3974+ .add(Symbol.COMMA, [REDUCE, 37 /* ENSURE_LAST_TWO_IN_ARRAY_AND_PUSH */])
3975+ .add(33, [REDUCE, 37 /* ENSURE_LAST_TWO_IN_ARRAY_AND_PUSH */])
3976+ .build();
3977+table[57] = ObjectBuilder
3978+ .add(Symbol.EOF, [REDUCE, 10 /* LAST_NUMBER */])
3979+ .add(Symbol.AMPERSAND, [REDUCE, 10 /* LAST_NUMBER */])
3980+ .add(Symbol.EQUALS, [REDUCE, 10 /* LAST_NUMBER */])
3981+ .add(Symbol.PLUS, [REDUCE, 10 /* LAST_NUMBER */])
3982+ .add(Symbol.RIGHT_PAREN, [REDUCE, 10 /* LAST_NUMBER */])
3983+ .add(Symbol.LESS_THAN, [REDUCE, 10 /* LAST_NUMBER */])
3984+ .add(Symbol.GREATER_THAN, [REDUCE, 10 /* LAST_NUMBER */])
3985+ .add(Symbol.NOT, [REDUCE, 10 /* LAST_NUMBER */])
3986+ .add(Symbol.MINUS, [REDUCE, 10 /* LAST_NUMBER */])
3987+ .add(Symbol.ASTERISK, [REDUCE, 10 /* LAST_NUMBER */])
3988+ .add(Symbol.DIVIDE, [REDUCE, 10 /* LAST_NUMBER */])
3989+ .add(Symbol.CARROT, [REDUCE, 10 /* LAST_NUMBER */])
3990+ .add(Symbol.SEMI_COLON, [REDUCE, 10 /* LAST_NUMBER */])
3991+ .add(Symbol.COMMA, [REDUCE, 10 /* LAST_NUMBER */])
3992+ .build();
3993+table[58] = ObjectBuilder
3994+ .add(Symbol.EOF, [REDUCE, 23 /* CALL_FUNCTION_LAST_BLANK */])
3995+ .add(Symbol.AMPERSAND, [REDUCE, 23 /* CALL_FUNCTION_LAST_BLANK */])
3996+ .add(Symbol.EQUALS, [REDUCE, 23 /* CALL_FUNCTION_LAST_BLANK */])
3997+ .add(Symbol.PLUS, [REDUCE, 23 /* CALL_FUNCTION_LAST_BLANK */])
3998+ .add(Symbol.RIGHT_PAREN, [REDUCE, 23 /* CALL_FUNCTION_LAST_BLANK */])
3999+ .add(Symbol.LESS_THAN, [REDUCE, 23 /* CALL_FUNCTION_LAST_BLANK */])
4000+ .add(Symbol.GREATER_THAN, [REDUCE, 23 /* CALL_FUNCTION_LAST_BLANK */])
4001+ .add(Symbol.NOT, [REDUCE, 23 /* CALL_FUNCTION_LAST_BLANK */])
4002+ .add(Symbol.MINUS, [REDUCE, 23 /* CALL_FUNCTION_LAST_BLANK */])
4003+ .add(Symbol.ASTERISK, [REDUCE, 23 /* CALL_FUNCTION_LAST_BLANK */])
4004+ .add(Symbol.DIVIDE, [REDUCE, 23 /* CALL_FUNCTION_LAST_BLANK */])
4005+ .add(Symbol.CARROT, [REDUCE, 23 /* CALL_FUNCTION_LAST_BLANK */])
4006+ .add(Symbol.SEMI_COLON, [REDUCE, 23 /* CALL_FUNCTION_LAST_BLANK */])
4007+ .add(Symbol.COMMA, [REDUCE, 23 /* CALL_FUNCTION_LAST_BLANK */])
4008+ .build();
4009+table[59] = ObjectBuilder
4010+ .add(Symbol.RIGHT_PAREN, [SHIFT, 70])
4011+ .add(Symbol.SEMI_COLON, [SHIFT, 71])
4012+ .add(Symbol.COMMA, [SHIFT, 72])
4013+ .build();
4014+table[60] = ObjectBuilder
4015+ .add(Symbol.AMPERSAND, [SHIFT, 20 /* TO_POWER */])
4016+ .add(Symbol.EQUALS, [SHIFT, 21 /* INVERT_NUM */])
4017+ .add(Symbol.PLUS, [SHIFT, 22 /* TO_NUMBER_NAN_AS_ZERO */])
4018+ .add(Symbol.RIGHT_PAREN, [REDUCE, 32 /* ENSURE_IS_ARRAY */])
4019+ .add(Symbol.LESS_THAN, [SHIFT, 23 /* CALL_FUNCTION_LAST_BLANK */])
4020+ .add(Symbol.GREATER_THAN, [SHIFT, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
4021+ .add(Symbol.NOT, [SHIFT, 25 /* I25 */])
4022+ .add(Symbol.MINUS, [SHIFT, 26 /* I26 */])
4023+ .add(Symbol.ASTERISK, [SHIFT, 27 /* I27 */])
4024+ .add(Symbol.DIVIDE, [SHIFT, 28 /* FIXED_CELL_VAL */])
4025+ .add(Symbol.CARROT, [SHIFT, 29 /* FIXED_CELL_RANGE_VAL */])
4026+ .add(Symbol.SEMI_COLON, [REDUCE, 32 /* ENSURE_IS_ARRAY */])
4027+ .add(Symbol.COMMA, [REDUCE, 32 /* ENSURE_IS_ARRAY */])
4028+ .build();
4029+table[61] = ObjectBuilder
4030+ .add(Symbol.RIGHT_PAREN, [REDUCE, 33 /* ENSURE_YYTEXT_ARRAY */])
4031+ .add(Symbol.SEMI_COLON, [REDUCE, 33 /* ENSURE_YYTEXT_ARRAY */])
4032+ .add(Symbol.COMMA, [REDUCE, 33 /* ENSURE_YYTEXT_ARRAY */])
4033+ .build();
4034+table[62] = ObjectBuilder
4035+ .add(Symbol.EXCLAMATION_POINT, [SHIFT, 73])
4036+ .build();
4037+table[63] = ObjectBuilder
4038+ .add(Symbol.EOF, [REDUCE, 39 /* REDUCE_FLOAT */])
4039+ .add(Symbol.AMPERSAND, [REDUCE, 39 /* REDUCE_FLOAT */])
4040+ .add(Symbol.EQUALS, [REDUCE, 39 /* REDUCE_FLOAT */])
4041+ .add(Symbol.PLUS, [REDUCE, 39 /* REDUCE_FLOAT */])
4042+ .add(Symbol.RIGHT_PAREN, [REDUCE, 39 /* REDUCE_FLOAT */])
4043+ .add(Symbol.LESS_THAN, [REDUCE, 39 /* REDUCE_FLOAT */])
4044+ .add(Symbol.GREATER_THAN, [REDUCE, 39 /* REDUCE_FLOAT */])
4045+ .add(Symbol.NOT, [REDUCE, 39 /* REDUCE_FLOAT */])
4046+ .add(Symbol.MINUS, [REDUCE, 39 /* REDUCE_FLOAT */])
4047+ .add(Symbol.ASTERISK, [REDUCE, 39 /* REDUCE_FLOAT */])
4048+ .add(Symbol.DIVIDE, [REDUCE, 39 /* REDUCE_FLOAT */])
4049+ .add(Symbol.CARROT, [REDUCE, 39 /* REDUCE_FLOAT */])
4050+ .add(Symbol.SEMI_COLON, [REDUCE, 39 /* REDUCE_FLOAT */])
4051+ .add(Symbol.COMMA, [REDUCE, 39 /* REDUCE_FLOAT */])
4052+ .add(Symbol.PERCENT, [REDUCE, 39 /* REDUCE_FLOAT */])
4053+ .add(38, [REDUCE, 39 /* REDUCE_FLOAT */]).build();
4054+table[64] = ObjectBuilder
4055+ .add(Symbol.EOF, [REDUCE, 29 /* FIXED_CELL_RANGE_VAL */])
4056+ .add(Symbol.AMPERSAND, [REDUCE, 29 /* FIXED_CELL_RANGE_VAL */])
4057+ .add(Symbol.EQUALS, [REDUCE, 29 /* FIXED_CELL_RANGE_VAL */])
4058+ .add(Symbol.PLUS, [REDUCE, 29 /* FIXED_CELL_RANGE_VAL */])
4059+ .add(Symbol.RIGHT_PAREN, [REDUCE, 29 /* FIXED_CELL_RANGE_VAL */])
4060+ .add(Symbol.LESS_THAN, [REDUCE, 29 /* FIXED_CELL_RANGE_VAL */])
4061+ .add(Symbol.GREATER_THAN, [REDUCE, 29 /* FIXED_CELL_RANGE_VAL */])
4062+ .add(Symbol.NOT, [REDUCE, 29 /* FIXED_CELL_RANGE_VAL */])
4063+ .add(Symbol.MINUS, [REDUCE, 29 /* FIXED_CELL_RANGE_VAL */])
4064+ .add(Symbol.ASTERISK, [REDUCE, 29 /* FIXED_CELL_RANGE_VAL */])
4065+ .add(Symbol.DIVIDE, [REDUCE, 29 /* FIXED_CELL_RANGE_VAL */])
4066+ .add(Symbol.CARROT, [REDUCE, 29 /* FIXED_CELL_RANGE_VAL */])
4067+ .add(Symbol.SEMI_COLON, [REDUCE, 29 /* FIXED_CELL_RANGE_VAL */])
4068+ .add(Symbol.COMMA, [REDUCE, 29 /* FIXED_CELL_RANGE_VAL */]).build();
4069+table[65] = ObjectBuilder
4070+ .add(Symbol.EOF, [REDUCE, 31 /* CELL_RANGE_VALUE */])
4071+ .add(Symbol.AMPERSAND, [REDUCE, 31 /* CELL_RANGE_VALUE */])
4072+ .add(Symbol.EQUALS, [REDUCE, 31 /* CELL_RANGE_VALUE */])
4073+ .add(Symbol.PLUS, [REDUCE, 31 /* CELL_RANGE_VALUE */])
4074+ .add(Symbol.RIGHT_PAREN, [REDUCE, 31 /* CELL_RANGE_VALUE */])
4075+ .add(Symbol.LESS_THAN, [REDUCE, 31 /* CELL_RANGE_VALUE */])
4076+ .add(Symbol.GREATER_THAN, [REDUCE, 31 /* CELL_RANGE_VALUE */])
4077+ .add(Symbol.NOT, [REDUCE, 31 /* CELL_RANGE_VALUE */])
4078+ .add(Symbol.MINUS, [REDUCE, 31 /* CELL_RANGE_VALUE */])
4079+ .add(Symbol.ASTERISK, [REDUCE, 31 /* CELL_RANGE_VALUE */])
4080+ .add(Symbol.DIVIDE, [REDUCE, 31 /* CELL_RANGE_VALUE */])
4081+ .add(Symbol.CARROT, [REDUCE, 31 /* CELL_RANGE_VALUE */])
4082+ .add(Symbol.SEMI_COLON, [REDUCE, 31 /* CELL_RANGE_VALUE */])
4083+ .add(Symbol.COMMA, [REDUCE, 31 /* CELL_RANGE_VALUE */]).build();
4084+table[66] = ObjectBuilder
4085+ .add(Symbol.EOF, [REDUCE, 41 /* REDUCE_LAST_THREE_A */])
4086+ .add(Symbol.AMPERSAND, [REDUCE, 41 /* REDUCE_LAST_THREE_A */])
4087+ .add(Symbol.EQUALS, [REDUCE, 41 /* REDUCE_LAST_THREE_A */])
4088+ .add(Symbol.PLUS, [REDUCE, 41 /* REDUCE_LAST_THREE_A */])
4089+ .add(Symbol.RIGHT_PAREN, [REDUCE, 41 /* REDUCE_LAST_THREE_A */])
4090+ .add(Symbol.LESS_THAN, [REDUCE, 41 /* REDUCE_LAST_THREE_A */])
4091+ .add(Symbol.GREATER_THAN, [REDUCE, 41 /* REDUCE_LAST_THREE_A */])
4092+ .add(Symbol.NOT, [REDUCE, 41 /* REDUCE_LAST_THREE_A */])
4093+ .add(Symbol.MINUS, [REDUCE, 41 /* REDUCE_LAST_THREE_A */])
4094+ .add(Symbol.ASTERISK, [REDUCE, 41 /* REDUCE_LAST_THREE_A */])
4095+ .add(Symbol.DIVIDE, [REDUCE, 41 /* REDUCE_LAST_THREE_A */])
4096+ .add(Symbol.CARROT, [REDUCE, 41 /* REDUCE_LAST_THREE_A */])
4097+ .add(Symbol.SEMI_COLON, [REDUCE, 41 /* REDUCE_LAST_THREE_A */])
4098+ .add(Symbol.COMMA, [REDUCE, 41 /* REDUCE_LAST_THREE_A */])
4099+ .add(Symbol.VARIABLE, [REDUCE, 41 /* REDUCE_LAST_THREE_A */])
4100+ .add(Symbol.POUND, [REDUCE, 41 /* REDUCE_LAST_THREE_A */]).build();
4101+table[67] = ObjectBuilder
4102+ .add(Symbol.EOF, [REDUCE, 11 /* LTE */])
4103+ .add(Symbol.AMPERSAND, [SHIFT, 20 /* TO_POWER */])
4104+ .add(Symbol.EQUALS, [REDUCE, 11 /* LTE */])
4105+ .add(Symbol.PLUS, [SHIFT, 22 /* TO_NUMBER_NAN_AS_ZERO */])
4106+ .add(Symbol.RIGHT_PAREN, [REDUCE, 11 /* LTE */])
4107+ .add(Symbol.LESS_THAN, [REDUCE, 11 /* LTE */])
4108+ .add(Symbol.GREATER_THAN, [REDUCE, 11 /* LTE */])
4109+ .add(Symbol.NOT, [REDUCE, 11 /* LTE */])
4110+ .add(Symbol.MINUS, [SHIFT, 26 /* I26 */])
4111+ .add(Symbol.ASTERISK, [SHIFT, 27 /* I27 */])
4112+ .add(Symbol.DIVIDE, [SHIFT, 28 /* FIXED_CELL_VAL */])
4113+ .add(Symbol.CARROT, [SHIFT, 29 /* FIXED_CELL_RANGE_VAL */])
4114+ .add(Symbol.SEMI_COLON, [REDUCE, 11 /* LTE */])
4115+ .add(Symbol.COMMA, [REDUCE, 11 /* LTE */]).build();
4116+table[68] = ObjectBuilder
4117+ .add(Symbol.EOF, [REDUCE, 13 /* NOT_EQ */])
4118+ .add(Symbol.AMPERSAND, [SHIFT, 20 /* TO_POWER */])
4119+ .add(Symbol.EQUALS, [REDUCE, 13 /* NOT_EQ */])
4120+ .add(Symbol.PLUS, [SHIFT, 22 /* TO_NUMBER_NAN_AS_ZERO */])
4121+ .add(Symbol.RIGHT_PAREN, [REDUCE, 13 /* NOT_EQ */])
4122+ .add(Symbol.LESS_THAN, [REDUCE, 13 /* NOT_EQ */])
4123+ .add(Symbol.GREATER_THAN, [REDUCE, 13 /* NOT_EQ */])
4124+ .add(Symbol.NOT, [REDUCE, 13 /* NOT_EQ */])
4125+ .add(Symbol.MINUS, [SHIFT, 26 /* I26 */])
4126+ .add(Symbol.ASTERISK, [SHIFT, 27 /* I27 */])
4127+ .add(Symbol.DIVIDE, [SHIFT, 28 /* FIXED_CELL_VAL */])
4128+ .add(Symbol.CARROT, [SHIFT, 29 /* FIXED_CELL_RANGE_VAL */])
4129+ .add(Symbol.SEMI_COLON, [REDUCE, 13 /* NOT_EQ */])
4130+ .add(Symbol.COMMA, [REDUCE, 13 /* NOT_EQ */]).build();
4131+table[69] = ObjectBuilder
4132+ .add(Symbol.EOF, [REDUCE, 12 /* GTE */])
4133+ .add(Symbol.AMPERSAND, [SHIFT, 20 /* TO_POWER */])
4134+ .add(Symbol.EQUALS, [REDUCE, 12 /* GTE */])
4135+ .add(Symbol.PLUS, [SHIFT, 22 /* TO_NUMBER_NAN_AS_ZERO */])
4136+ .add(Symbol.RIGHT_PAREN, [REDUCE, 12 /* GTE */])
4137+ .add(Symbol.LESS_THAN, [REDUCE, 12 /* GTE */])
4138+ .add(Symbol.GREATER_THAN, [REDUCE, 12 /* GTE */])
4139+ .add(Symbol.NOT, [REDUCE, 12 /* GTE */])
4140+ .add(Symbol.MINUS, [SHIFT, 26 /* I26 */])
4141+ .add(Symbol.ASTERISK, [SHIFT, 27 /* I27 */])
4142+ .add(Symbol.DIVIDE, [SHIFT, 28 /* FIXED_CELL_VAL */])
4143+ .add(Symbol.CARROT, [SHIFT, 29 /* FIXED_CELL_RANGE_VAL */])
4144+ .add(Symbol.SEMI_COLON, [REDUCE, 12 /* GTE */])
4145+ .add(Symbol.COMMA, [REDUCE, 12 /* GTE */]).build();
4146+table[70] = ObjectBuilder
4147+ .add(Symbol.EOF, [REDUCE, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
4148+ .add(Symbol.AMPERSAND, [REDUCE, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
4149+ .add(Symbol.EQUALS, [REDUCE, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
4150+ .add(Symbol.PLUS, [REDUCE, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
4151+ .add(Symbol.RIGHT_PAREN, [REDUCE, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
4152+ .add(Symbol.LESS_THAN, [REDUCE, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
4153+ .add(Symbol.GREATER_THAN, [REDUCE, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
4154+ .add(Symbol.NOT, [REDUCE, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
4155+ .add(Symbol.MINUS, [REDUCE, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
4156+ .add(Symbol.ASTERISK, [REDUCE, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
4157+ .add(Symbol.DIVIDE, [REDUCE, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
4158+ .add(Symbol.CARROT, [REDUCE, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
4159+ .add(Symbol.SEMI_COLON, [REDUCE, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
4160+ .add(Symbol.COMMA, [REDUCE, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */]).build();
4161+table[71] = ObjectBuilder
4162+ .add(Symbol.ERROR, 13)
4163+ .add(Symbol.EXPRESSION, 74)
4164+ .add(Symbol.VARIABLE_SEQUENCE, 3)
4165+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
4166+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
4167+ .add(Symbol.NUMBER, 6)
4168+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
4169+ .add(Symbol.EQUALS, [SHIFT, 21 /* INVERT_NUM */])
4170+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
4171+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
4172+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
4173+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
4174+ .add(Symbol.CELL, 12)
4175+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
4176+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
4177+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
4178+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
4179+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */]).build();
4180+table[72] = ObjectBuilder
4181+ .add(Symbol.ERROR, 13)
4182+ .add(Symbol.EXPRESSION, 75)
4183+ .add(Symbol.VARIABLE_SEQUENCE, 3)
4184+ .add(Symbol.TIME_AMPM, [SHIFT, 4 /* TIME_CALL */])
4185+ .add(Symbol.TIME_24, [SHIFT, 5 /* AS_NUMBER */])
4186+ .add(Symbol.NUMBER, 6)
4187+ .add(Symbol.STRING, [SHIFT, 7 /* AMPERSAND */])
4188+ .add(Symbol.EQUALS, [SHIFT, 21 /* INVERT_NUM */])
4189+ .add(Symbol.PLUS, [SHIFT, 10 /* LAST_NUMBER */])
4190+ .add(Symbol.LEFT_PAREN, [SHIFT, 8 /* EQUALS */])
4191+ .add(Symbol.MINUS, [SHIFT, 9 /* PLUS */])
4192+ .add(Symbol.FUNCTION, [SHIFT, 11 /* LTE */])
4193+ .add(Symbol.CELL, 12)
4194+ .add(Symbol.FIXEDCELL, [SHIFT, 16 /* LT */])
4195+ .add(Symbol.CELL_UPPER, [SHIFT, 17 /* MINUS */])
4196+ .add(Symbol.VARIABLE, [SHIFT, 14 /* NOT */])
4197+ .add(Symbol.NUMBER_UPPER, [SHIFT, 15 /* GT */])
4198+ .add(Symbol.POUND, [SHIFT, 18 /* MULTIPLY */]).build();
4199+table[73] = ObjectBuilder
4200+ .add(Symbol.EOF, [REDUCE, 42 /* REDUCE_LAST_THREE_B */])
4201+ .add(Symbol.AMPERSAND, [REDUCE, 42 /* REDUCE_LAST_THREE_B */])
4202+ .add(Symbol.EQUALS, [REDUCE, 42 /* REDUCE_LAST_THREE_B */])
4203+ .add(Symbol.PLUS, [REDUCE, 42 /* REDUCE_LAST_THREE_B */])
4204+ .add(Symbol.RIGHT_PAREN, [REDUCE, 42 /* REDUCE_LAST_THREE_B */])
4205+ .add(Symbol.LESS_THAN, [REDUCE, 42 /* REDUCE_LAST_THREE_B */])
4206+ .add(Symbol.GREATER_THAN, [REDUCE, 42 /* REDUCE_LAST_THREE_B */])
4207+ .add(Symbol.NOT, [REDUCE, 42 /* REDUCE_LAST_THREE_B */])
4208+ .add(Symbol.MINUS, [REDUCE, 42 /* REDUCE_LAST_THREE_B */])
4209+ .add(Symbol.ASTERISK, [REDUCE, 42 /* REDUCE_LAST_THREE_B */])
4210+ .add(Symbol.DIVIDE, [REDUCE, 42 /* REDUCE_LAST_THREE_B */])
4211+ .add(Symbol.CARROT, [REDUCE, 42 /* REDUCE_LAST_THREE_B */])
4212+ .add(Symbol.SEMI_COLON, [REDUCE, 42 /* REDUCE_LAST_THREE_B */])
4213+ .add(Symbol.COMMA, [REDUCE, 42 /* REDUCE_LAST_THREE_B */])
4214+ .add(Symbol.VARIABLE, [REDUCE, 42 /* REDUCE_LAST_THREE_B */])
4215+ .add(Symbol.POUND, [REDUCE, 42 /* REDUCE_LAST_THREE_B */]).build();
4216+table[74] = ObjectBuilder
4217+ .add(Symbol.AMPERSAND, [SHIFT, 20 /* TO_POWER */])
4218+ .add(Symbol.EQUALS, [SHIFT, 21 /* INVERT_NUM */])
4219+ .add(Symbol.PLUS, [SHIFT, 22 /* TO_NUMBER_NAN_AS_ZERO */])
4220+ .add(Symbol.RIGHT_PAREN, [REDUCE, 34 /* REDUCE_INT */])
4221+ .add(Symbol.LESS_THAN, [SHIFT, 23 /* CALL_FUNCTION_LAST_BLANK */])
4222+ .add(Symbol.GREATER_THAN, [SHIFT, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
4223+ .add(Symbol.NOT, [SHIFT, 25 /* I25 */])
4224+ .add(Symbol.MINUS, [SHIFT, 26 /* I26 */])
4225+ .add(Symbol.ASTERISK, [SHIFT, 27 /* I27 */])
4226+ .add(Symbol.DIVIDE, [SHIFT, 28 /* FIXED_CELL_VAL */])
4227+ .add(Symbol.CARROT, [SHIFT, 29 /* FIXED_CELL_RANGE_VAL */])
4228+ .add(Symbol.SEMI_COLON, [REDUCE, 34 /* REDUCE_INT */])
4229+ .add(Symbol.COMMA, [REDUCE, 34 /* REDUCE_INT */]).build();
4230+table[75] = ObjectBuilder
4231+ .add(Symbol.AMPERSAND, [SHIFT, 20 /* TO_POWER */])
4232+ .add(Symbol.EQUALS, [SHIFT, 21 /* INVERT_NUM */])
4233+ .add(Symbol.PLUS, [SHIFT, 22 /* TO_NUMBER_NAN_AS_ZERO */])
4234+ .add(Symbol.RIGHT_PAREN, [REDUCE, 35 /* REDUCE_PERCENT */])
4235+ .add(Symbol.LESS_THAN, [SHIFT, 23 /* CALL_FUNCTION_LAST_BLANK */])
4236+ .add(Symbol.GREATER_THAN, [SHIFT, 24 /* CALL_FUNCTION_LAST_TWO_IN_STACK */])
4237+ .add(Symbol.NOT, [SHIFT, 25 /* I25 */])
4238+ .add(Symbol.MINUS, [SHIFT, 26 /* I26 */])
4239+ .add(Symbol.ASTERISK, [SHIFT, 27 /* I27 */])
4240+ .add(Symbol.DIVIDE, [SHIFT, 28 /* FIXED_CELL_VAL */])
4241+ .add(Symbol.CARROT, [SHIFT, 29 /* FIXED_CELL_RANGE_VAL */])
4242+ .add(Symbol.SEMI_COLON, [REDUCE, 35 /* REDUCE_PERCENT */])
4243+ .add(Symbol.COMMA, [REDUCE, 35 /* REDUCE_PERCENT */]).build();
4244+var ACTION_TABLE = table;
4245+exports.ACTION_TABLE = ACTION_TABLE;
4246diff --git a/dist/Utilities/ObjectFromPairs.js b/dist/Utilities/ObjectFromPairs.js
4247deleted file mode 100644
4248index 0960b63..0000000
4249--- a/dist/Utilities/ObjectFromPairs.js
4250+++ /dev/null
4251@@ -1,40 +0,0 @@
4252-"use strict";
4253-exports.__esModule = true;
4254-/**
4255- * Static class for building objects using variables as keys. Mostly used in situations where we want to build objects
4256- * with similar key structures inside of arrays.
4257- * ```
4258- * let m = "key";
4259- * let n = "another"
4260- * let x = [
4261- * ObjectFromPairs.of([
4262- * m, 1,
4263- * n, 2
4264- * ]);
4265- * ]
4266- * ```
4267- * The example above would result in: `{"key": 1, "another": 2}`.
4268- * NOTE: This code does not perform well, and should be used sparingly.
4269- */
4270-var ObjectFromPairs = (function () {
4271- function ObjectFromPairs() {
4272- }
4273- /**
4274- * Creates an object from pairs.
4275- * @param values - Even number of values, where odd-indexed values will be used as keys, and even-indexed values will
4276- * be used as values in the object. If function is given odd number of values the last value will still be used as a
4277- * key for which the value will be undefined. Use at your own risk.
4278- * @returns {{}}
4279- */
4280- ObjectFromPairs.of = function (values) {
4281- var o = {};
4282- for (var i = 0; i < values.length - 1; i = i + 2) {
4283- if (i % 2 === 0) {
4284- o[values[i]] = values[i + 1];
4285- }
4286- }
4287- return o;
4288- };
4289- return ObjectFromPairs;
4290-}());
4291-exports.ObjectFromPairs = ObjectFromPairs;
4292diff --git a/dist/parser.js b/dist/parser.js
4293deleted file mode 100644
4294index 58653eb..0000000
4295--- a/dist/parser.js
4296+++ /dev/null
4297@@ -1,1429 +0,0 @@
4298-"use strict";
4299-exports.__esModule = true;
4300-/* parser generated by jison 0.4.15 */
4301-/*
4302- Returns a Parser object of the following structure:
4303-
4304- Parser: {
4305- yy: {}
4306- }
4307-
4308- Parser.prototype: {
4309- yy: {},
4310- trace: function(),
4311- symbols_: {associative list: name ==> number},
4312- terminals_: {associative list: number ==> name},
4313- productions_: [...],
4314- performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
4315- table: [...],
4316- defaultActions: {...},
4317- parseError: function(str, hash),
4318- parse: function(input),
4319-
4320- lexer: {
4321- EOF: 1,
4322- parseError: function(str, hash),
4323- setInput: function(input),
4324- input: function(),
4325- unput: function(str),
4326- more: function(),
4327- less: function(n),
4328- pastInput: function(),
4329- upcomingInput: function(),
4330- showPosition: function(),
4331- test_match: function(regex_match_array, rule_index),
4332- next: function(),
4333- lex: function(),
4334- begin: function(condition),
4335- popState: function(),
4336- _currentRules: function(),
4337- topState: function(),
4338- pushState: function(condition),
4339-
4340- options: {
4341- ranges: boolean (optional: true ==> token location info will include a .range[] member)
4342- flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
4343- backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
4344- },
4345-
4346- performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
4347- rules: [...],
4348- conditions: {associative list: name ==> set},
4349- }
4350- }
4351-
4352-
4353- token location info (@$, _$, etc.): {
4354- first_line: n,
4355- last_line: n,
4356- first_column: n,
4357- last_column: n,
4358- range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
4359- }
4360-
4361-
4362- the parseError function receives a 'hash' object with these members for lexer and parser errors: {
4363- text: (matched text)
4364- token: (the produced terminal token, if any)
4365- line: (yylineno)
4366- }
4367- while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
4368- loc: (yylloc)
4369- expected: (string describing the set of expected tokens)
4370- recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
4371- }
4372- */
4373-var Parser = (function () {
4374- var o = function (k, v, o, l) {
4375- for (o = o || {}, l = k.length; l--; o[k[l]] = v) {
4376- }
4377- return o;
4378- }, $V0 = [1, 4], $V1 = [1, 5], $V2 = [1, 7], $V3 = [1, 10], $V4 = [1, 8], $V5 = [1, 9], $V6 = [1, 11], $V7 = [1, 16], $V8 = [1, 17], $V9 = [1, 14], $Va = [1, 15], $Vb = [1, 18], $Vc = [1, 20], $Vd = [1, 21], $Ve = [1, 22], $Vf = [1, 23], $Vg = [1, 24], $Vh = [1, 25], $Vi = [1, 26], $Vj = [1, 27], $Vk = [1, 28], $Vl = [1, 29], $Vm = [5, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 30, 31], $Vn = [5, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 30, 31, 33], $Vo = [1, 38], $Vp = [5, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 30, 31, 35], $Vq = [5, 12, 13, 15, 16, 17, 18, 19, 30, 31], $Vr = [5, 12, 15, 16, 17, 18, 30, 31], $Vs = [5, 12, 13, 15, 16, 17, 18, 19, 20, 21, 30, 31], $Vt = [15, 30, 31], $Vu = [5, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 30, 31, 32, 36];
4379- var parser = {
4380- lexer: undefined,
4381- Parser: undefined,
4382- trace: function trace() {
4383- },
4384- yy: {},
4385- symbols_: {
4386- "error": 2,
4387- "expressions": 3,
4388- "expression": 4,
4389- "EOF": 5,
4390- "variableSequence": 6,
4391- "TIME_AMPM": 7,
4392- "TIME_24": 8,
4393- "number": 9,
4394- "STRING": 10,
4395- "&": 11,
4396- "=": 12,
4397- "+": 13,
4398- "(": 14,
4399- ")": 15,
4400- "<": 16,
4401- ">": 17,
4402- "NOT": 18,
4403- "-": 19,
4404- "*": 20,
4405- "/": 21,
4406- "^": 22,
4407- "FUNCTION": 23,
4408- "expseq": 24,
4409- "cell": 25,
4410- "FIXEDCELL": 26,
4411- ":": 27,
4412- "CELL": 28,
4413- "ARRAY": 29,
4414- ";": 30,
4415- ",": 31,
4416- "VARIABLE": 32,
4417- "DECIMAL": 33,
4418- "NUMBER": 34,
4419- "%": 35,
4420- "#": 36,
4421- "!": 37,
4422- "$accept": 0,
4423- "$end": 1
4424- },
4425- terminals_: {
4426- 5: "EOF",
4427- 7: "TIME_AMPM",
4428- 8: "TIME_24",
4429- 10: "STRING",
4430- 11: "&",
4431- 12: "=",
4432- 13: "+",
4433- 14: "(",
4434- 15: ")",
4435- 16: "<",
4436- 17: ">",
4437- 18: "NOT",
4438- 19: "-",
4439- 20: "*",
4440- 21: "/",
4441- 22: "^",
4442- 23: "FUNCTION",
4443- 26: "FIXEDCELL",
4444- 27: ":",
4445- 28: "CELL",
4446- 29: "ARRAY",
4447- 30: ";",
4448- 31: ",",
4449- 32: "VARIABLE",
4450- 33: "DECIMAL",
4451- 34: "NUMBER",
4452- 35: "%",
4453- 36: "#",
4454- 37: "!"
4455- },
4456- productions_: [0, [3, 2], [4, 1], [4, 1], [4, 1], [4, 1], [4, 1], [4, 3], [4, 3], [4, 3], [4, 3], [4, 4], [4, 4], [4, 4], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 2], [4, 2], [4, 3], [4, 4], [4, 1], [4, 1], [4, 2], [25, 1], [25, 3], [25, 1], [25, 3], [24, 1], [24, 1], [24, 3], [24, 3], [6, 1], [6, 3], [9, 1], [9, 3], [9, 2], [2, 3], [2, 4]],
4457- performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
4458- /* this == yyval */
4459- var $0 = $$.length - 1;
4460- switch (yystate) {
4461- case 1:
4462- return $$[$0 - 1];
4463- case 2:
4464- this.$ = yy.handler.helper.callVariable.call(this, $$[$0]);
4465- break;
4466- case 3:
4467- this.$ = yy.handler.time.call(yy.obj, $$[$0], true);
4468- break;
4469- case 4:
4470- this.$ = yy.handler.time.call(yy.obj, $$[$0]);
4471- break;
4472- case 5:
4473- this.$ = yy.handler.helper.number($$[$0]);
4474- break;
4475- case 6:
4476- this.$ = yy.handler.helper.string($$[$0]);
4477- break;
4478- case 7:
4479- this.$ = yy.handler.helper.specialMatch('&', $$[$0 - 2], $$[$0]);
4480- break;
4481- case 8:
4482- this.$ = yy.handler.helper.logicMatch('=', $$[$0 - 2], $$[$0]);
4483- break;
4484- case 9:
4485- this.$ = yy.handler.helper.mathMatch('+', $$[$0 - 2], $$[$0]);
4486- break;
4487- case 10:
4488- this.$ = yy.handler.helper.number($$[$0 - 1]);
4489- break;
4490- case 11:
4491- this.$ = yy.handler.helper.logicMatch('<=', $$[$0 - 3], $$[$0]);
4492- break;
4493- case 12:
4494- this.$ = yy.handler.helper.logicMatch('>=', $$[$0 - 3], $$[$0]);
4495- break;
4496- case 13:
4497- this.$ = yy.handler.helper.logicMatch('<>', $$[$0 - 3], $$[$0]);
4498- break;
4499- case 14:
4500- this.$ = yy.handler.helper.logicMatch('NOT', $$[$0 - 2], $$[$0]);
4501- break;
4502- case 15:
4503- this.$ = yy.handler.helper.logicMatch('>', $$[$0 - 2], $$[$0]);
4504- break;
4505- case 16:
4506- this.$ = yy.handler.helper.logicMatch('<', $$[$0 - 2], $$[$0]);
4507- break;
4508- case 17:
4509- this.$ = yy.handler.helper.mathMatch('-', $$[$0 - 2], $$[$0]);
4510- break;
4511- case 18:
4512- this.$ = yy.handler.helper.mathMatch('*', $$[$0 - 2], $$[$0]);
4513- break;
4514- case 19:
4515- this.$ = yy.handler.helper.mathMatch('/', $$[$0 - 2], $$[$0]);
4516- break;
4517- case 20:
4518- this.$ = yy.handler.helper.mathMatch('^', $$[$0 - 2], $$[$0]);
4519- break;
4520- case 21:
4521- var n1 = yy.handler.helper.numberInverted($$[$0]);
4522- this.$ = n1;
4523- if (isNaN(this.$)) {
4524- this.$ = 0;
4525- }
4526- break;
4527- case 22:
4528- var n1 = yy.handler.helper.number($$[$0]);
4529- this.$ = n1;
4530- if (isNaN(this.$)) {
4531- this.$ = 0;
4532- }
4533- break;
4534- case 23:
4535- // console.log("message from parser: 'calling function with no args': ", $$[$0 - 2]);
4536- this.$ = yy.handler.helper.callFunction.call(this, $$[$0 - 2], '');
4537- break;
4538- case 24:
4539- // console.log("message from parser: 'calling function w/ args': ", $$[$0 - 3], $$[$0 - 1]);
4540- this.$ = yy.handler.helper.callFunction.call(this, $$[$0 - 3], $$[$0 - 1]);
4541- break;
4542- case 28:
4543- this.$ = yy.handler.helper.fixedCellValue.call(yy.obj, $$[$0]);
4544- break;
4545- case 29:
4546- this.$ = yy.handler.helper.fixedCellRangeValue.call(yy.obj, $$[$0 - 2], $$[$0]);
4547- break;
4548- case 30:
4549- this.$ = yy.handler.helper.cellValue.call(yy.obj, $$[$0]);
4550- break;
4551- case 31:
4552- this.$ = yy.handler.helper.cellRangeValue.call(yy.obj, $$[$0 - 2], $$[$0]);
4553- break;
4554- case 32:
4555- if (yy.handler.utils.isArray($$[$0])) {
4556- this.$ = $$[$0];
4557- }
4558- else {
4559- this.$ = [$$[$0]];
4560- }
4561- break;
4562- case 33:
4563- var result = [], arr = eval("[" + yytext + "]");
4564- arr.forEach(function (item) {
4565- result.push(item);
4566- });
4567- this.$ = result;
4568- break;
4569- case 34:
4570- case 35:
4571- $$[$0 - 2].push($$[$0]);
4572- this.$ = $$[$0 - 2];
4573- break;
4574- case 36:
4575- this.$ = [$$[$0]];
4576- break;
4577- case 37:
4578- this.$ = (yy.handler.utils.isArray($$[$0 - 2]) ? $$[$0 - 2] : [$$[$0 - 2]]);
4579- this.$.push($$[$0]);
4580- break;
4581- case 38:
4582- this.$ = $$[$0];
4583- break;
4584- case 39:
4585- this.$ = parseFloat($$[$0 - 2] + '.' + $$[$0]) * 1;
4586- break;
4587- case 40:
4588- this.$ = $$[$0 - 1] * 0.01;
4589- break;
4590- case 41:
4591- case 42:
4592- this.$ = $$[$0 - 2] + $$[$0 - 1] + $$[$0];
4593- break;
4594- }
4595- },
4596- table: [{
4597- 2: 13,
4598- 3: 1,
4599- 4: 2,
4600- 6: 3,
4601- 7: $V0,
4602- 8: $V1,
4603- 9: 6,
4604- 10: $V2,
4605- 13: $V3,
4606- 14: $V4,
4607- 19: $V5,
4608- 23: $V6,
4609- 25: 12,
4610- 26: $V7,
4611- 28: $V8,
4612- 32: $V9,
4613- 34: $Va,
4614- 36: $Vb
4615- }, { 1: [3] }, {
4616- 5: [1, 19],
4617- 11: $Vc,
4618- 12: $Vd,
4619- 13: $Ve,
4620- 16: $Vf,
4621- 17: $Vg,
4622- 18: $Vh,
4623- 19: $Vi,
4624- 20: $Vj,
4625- 21: $Vk,
4626- 22: $Vl
4627- }, o($Vm, [2, 2], { 33: [1, 30] }), o($Vm, [2, 3]), o($Vm, [2, 4]), o($Vm, [2, 5], { 35: [1, 31] }), o($Vm, [2, 6]), {
4628- 2: 13,
4629- 4: 32,
4630- 6: 3,
4631- 7: $V0,
4632- 8: $V1,
4633- 9: 6,
4634- 10: $V2,
4635- 13: $V3,
4636- 14: $V4,
4637- 19: $V5,
4638- 23: $V6,
4639- 25: 12,
4640- 26: $V7,
4641- 28: $V8,
4642- 32: $V9,
4643- 34: $Va,
4644- 36: $Vb
4645- }, {
4646- 2: 13,
4647- 4: 33,
4648- 6: 3,
4649- 7: $V0,
4650- 8: $V1,
4651- 9: 6,
4652- 10: $V2,
4653- 13: $V3,
4654- 14: $V4,
4655- 19: $V5,
4656- 23: $V6,
4657- 25: 12,
4658- 26: $V7,
4659- 28: $V8,
4660- 32: $V9,
4661- 34: $Va,
4662- 36: $Vb
4663- }, {
4664- 2: 13,
4665- 4: 34,
4666- 6: 3,
4667- 7: $V0,
4668- 8: $V1,
4669- 9: 6,
4670- 10: $V2,
4671- 13: $V3,
4672- 14: $V4,
4673- 19: $V5,
4674- 23: $V6,
4675- 25: 12,
4676- 26: $V7,
4677- 28: $V8,
4678- 32: $V9,
4679- 34: $Va,
4680- 36: $Vb
4681- }, { 14: [1, 35] }, o($Vm, [2, 25]), o($Vm, [2, 26], {
4682- 2: 36,
4683- 32: [1, 37],
4684- 36: $Vb
4685- }), o($Vn, [2, 36], { 36: $Vo }), o($Vp, [2, 38], { 33: [1, 39] }), o($Vm, [2, 28], { 27: [1, 40] }), o($Vm, [2, 30], { 27: [1, 41] }), { 32: [1, 42] }, { 1: [2, 1] }, {
4686- 2: 13,
4687- 4: 43,
4688- 6: 3,
4689- 7: $V0,
4690- 8: $V1,
4691- 9: 6,
4692- 10: $V2,
4693- 13: $V3,
4694- 14: $V4,
4695- 19: $V5,
4696- 23: $V6,
4697- 25: 12,
4698- 26: $V7,
4699- 28: $V8,
4700- 32: $V9,
4701- 34: $Va,
4702- 36: $Vb
4703- }, {
4704- 2: 13,
4705- 4: 44,
4706- 6: 3,
4707- 7: $V0,
4708- 8: $V1,
4709- 9: 6,
4710- 10: $V2,
4711- 13: $V3,
4712- 14: $V4,
4713- 19: $V5,
4714- 23: $V6,
4715- 25: 12,
4716- 26: $V7,
4717- 28: $V8,
4718- 32: $V9,
4719- 34: $Va,
4720- 36: $Vb
4721- }, {
4722- 2: 13,
4723- 4: 45,
4724- 6: 3,
4725- 7: $V0,
4726- 8: $V1,
4727- 9: 6,
4728- 10: $V2,
4729- 13: $V3,
4730- 14: $V4,
4731- 19: $V5,
4732- 23: $V6,
4733- 25: 12,
4734- 26: $V7,
4735- 28: $V8,
4736- 32: $V9,
4737- 34: $Va,
4738- 36: $Vb
4739- }, {
4740- 2: 13,
4741- 4: 48,
4742- 6: 3,
4743- 7: $V0,
4744- 8: $V1,
4745- 9: 6,
4746- 10: $V2,
4747- 12: [1, 46],
4748- 13: $V3,
4749- 14: $V4,
4750- 17: [1, 47],
4751- 19: $V5,
4752- 23: $V6,
4753- 25: 12,
4754- 26: $V7,
4755- 28: $V8,
4756- 32: $V9,
4757- 34: $Va,
4758- 36: $Vb
4759- }, {
4760- 2: 13,
4761- 4: 50,
4762- 6: 3,
4763- 7: $V0,
4764- 8: $V1,
4765- 9: 6,
4766- 10: $V2,
4767- 12: [1, 49],
4768- 13: $V3,
4769- 14: $V4,
4770- 19: $V5,
4771- 23: $V6,
4772- 25: 12,
4773- 26: $V7,
4774- 28: $V8,
4775- 32: $V9,
4776- 34: $Va,
4777- 36: $Vb
4778- }, {
4779- 2: 13,
4780- 4: 51,
4781- 6: 3,
4782- 7: $V0,
4783- 8: $V1,
4784- 9: 6,
4785- 10: $V2,
4786- 13: $V3,
4787- 14: $V4,
4788- 19: $V5,
4789- 23: $V6,
4790- 25: 12,
4791- 26: $V7,
4792- 28: $V8,
4793- 32: $V9,
4794- 34: $Va,
4795- 36: $Vb
4796- }, {
4797- 2: 13,
4798- 4: 52,
4799- 6: 3,
4800- 7: $V0,
4801- 8: $V1,
4802- 9: 6,
4803- 10: $V2,
4804- 13: $V3,
4805- 14: $V4,
4806- 19: $V5,
4807- 23: $V6,
4808- 25: 12,
4809- 26: $V7,
4810- 28: $V8,
4811- 32: $V9,
4812- 34: $Va,
4813- 36: $Vb
4814- }, {
4815- 2: 13,
4816- 4: 53,
4817- 6: 3,
4818- 7: $V0,
4819- 8: $V1,
4820- 9: 6,
4821- 10: $V2,
4822- 13: $V3,
4823- 14: $V4,
4824- 19: $V5,
4825- 23: $V6,
4826- 25: 12,
4827- 26: $V7,
4828- 28: $V8,
4829- 32: $V9,
4830- 34: $Va,
4831- 36: $Vb
4832- }, {
4833- 2: 13,
4834- 4: 54,
4835- 6: 3,
4836- 7: $V0,
4837- 8: $V1,
4838- 9: 6,
4839- 10: $V2,
4840- 13: $V3,
4841- 14: $V4,
4842- 19: $V5,
4843- 23: $V6,
4844- 25: 12,
4845- 26: $V7,
4846- 28: $V8,
4847- 32: $V9,
4848- 34: $Va,
4849- 36: $Vb
4850- }, {
4851- 2: 13,
4852- 4: 55,
4853- 6: 3,
4854- 7: $V0,
4855- 8: $V1,
4856- 9: 6,
4857- 10: $V2,
4858- 13: $V3,
4859- 14: $V4,
4860- 19: $V5,
4861- 23: $V6,
4862- 25: 12,
4863- 26: $V7,
4864- 28: $V8,
4865- 32: $V9,
4866- 34: $Va,
4867- 36: $Vb
4868- }, { 32: [1, 56] }, o($Vp, [2, 40]), {
4869- 11: $Vc,
4870- 12: $Vd,
4871- 13: $Ve,
4872- 15: [1, 57],
4873- 16: $Vf,
4874- 17: $Vg,
4875- 18: $Vh,
4876- 19: $Vi,
4877- 20: $Vj,
4878- 21: $Vk,
4879- 22: $Vl
4880- }, o($Vq, [2, 21], { 11: $Vc, 20: $Vj, 21: $Vk, 22: $Vl }), o($Vq, [2, 22], {
4881- 11: $Vc,
4882- 20: $Vj,
4883- 21: $Vk,
4884- 22: $Vl
4885- }), {
4886- 2: 13,
4887- 4: 60,
4888- 6: 3,
4889- 7: $V0,
4890- 8: $V1,
4891- 9: 6,
4892- 10: $V2,
4893- 13: $V3,
4894- 14: $V4,
4895- 15: [1, 58],
4896- 19: $V5,
4897- 23: $V6,
4898- 24: 59,
4899- 25: 12,
4900- 26: $V7,
4901- 28: $V8,
4902- 29: [1, 61],
4903- 32: $V9,
4904- 34: $Va,
4905- 36: $Vb
4906- }, o($Vm, [2, 27]), { 36: $Vo }, { 32: [1, 62] }, { 34: [1, 63] }, { 26: [1, 64] }, { 28: [1, 65] }, { 37: [1, 66] }, o($Vm, [2, 7]), o([5, 12, 15, 30, 31], [2, 8], {
4907- 11: $Vc,
4908- 13: $Ve,
4909- 16: $Vf,
4910- 17: $Vg,
4911- 18: $Vh,
4912- 19: $Vi,
4913- 20: $Vj,
4914- 21: $Vk,
4915- 22: $Vl
4916- }), o($Vq, [2, 9], { 11: $Vc, 20: $Vj, 21: $Vk, 22: $Vl }), {
4917- 2: 13,
4918- 4: 67,
4919- 6: 3,
4920- 7: $V0,
4921- 8: $V1,
4922- 9: 6,
4923- 10: $V2,
4924- 13: $V3,
4925- 14: $V4,
4926- 19: $V5,
4927- 23: $V6,
4928- 25: 12,
4929- 26: $V7,
4930- 28: $V8,
4931- 32: $V9,
4932- 34: $Va,
4933- 36: $Vb
4934- }, {
4935- 2: 13,
4936- 4: 68,
4937- 6: 3,
4938- 7: $V0,
4939- 8: $V1,
4940- 9: 6,
4941- 10: $V2,
4942- 13: $V3,
4943- 14: $V4,
4944- 19: $V5,
4945- 23: $V6,
4946- 25: 12,
4947- 26: $V7,
4948- 28: $V8,
4949- 32: $V9,
4950- 34: $Va,
4951- 36: $Vb
4952- }, o($Vr, [2, 16], { 11: $Vc, 13: $Ve, 19: $Vi, 20: $Vj, 21: $Vk, 22: $Vl }), {
4953- 2: 13,
4954- 4: 69,
4955- 6: 3,
4956- 7: $V0,
4957- 8: $V1,
4958- 9: 6,
4959- 10: $V2,
4960- 13: $V3,
4961- 14: $V4,
4962- 19: $V5,
4963- 23: $V6,
4964- 25: 12,
4965- 26: $V7,
4966- 28: $V8,
4967- 32: $V9,
4968- 34: $Va,
4969- 36: $Vb
4970- }, o($Vr, [2, 15], {
4971- 11: $Vc,
4972- 13: $Ve,
4973- 19: $Vi,
4974- 20: $Vj,
4975- 21: $Vk,
4976- 22: $Vl
4977- }), o([5, 12, 15, 18, 30, 31], [2, 14], {
4978- 11: $Vc,
4979- 13: $Ve,
4980- 16: $Vf,
4981- 17: $Vg,
4982- 19: $Vi,
4983- 20: $Vj,
4984- 21: $Vk,
4985- 22: $Vl
4986- }), o($Vq, [2, 17], { 11: $Vc, 20: $Vj, 21: $Vk, 22: $Vl }), o($Vs, [2, 18], {
4987- 11: $Vc,
4988- 22: $Vl
4989- }), o($Vs, [2, 19], {
4990- 11: $Vc,
4991- 22: $Vl
4992- }), o([5, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 30, 31], [2, 20], { 11: $Vc }), o($Vn, [2, 37]), o($Vm, [2, 10]), o($Vm, [2, 23]), {
4993- 15: [1, 70],
4994- 30: [1, 71],
4995- 31: [1, 72]
4996- }, o($Vt, [2, 32], {
4997- 11: $Vc,
4998- 12: $Vd,
4999- 13: $Ve,
5000- 16: $Vf,
5001- 17: $Vg,
5002- 18: $Vh,
5003- 19: $Vi,
5004- 20: $Vj,
5005- 21: $Vk,
5006- 22: $Vl
5007- }), o($Vt, [2, 33]), { 37: [1, 73] }, o($Vp, [2, 39]), o($Vm, [2, 29]), o($Vm, [2, 31]), o($Vu, [2, 41]), o($Vr, [2, 11], {
5008- 11: $Vc,
5009- 13: $Ve,
5010- 19: $Vi,
5011- 20: $Vj,
5012- 21: $Vk,
5013- 22: $Vl
5014- }), o($Vr, [2, 13], { 11: $Vc, 13: $Ve, 19: $Vi, 20: $Vj, 21: $Vk, 22: $Vl }), o($Vr, [2, 12], {
5015- 11: $Vc,
5016- 13: $Ve,
5017- 19: $Vi,
5018- 20: $Vj,
5019- 21: $Vk,
5020- 22: $Vl
5021- }), o($Vm, [2, 24]), {
5022- 2: 13,
5023- 4: 74,
5024- 6: 3,
5025- 7: $V0,
5026- 8: $V1,
5027- 9: 6,
5028- 10: $V2,
5029- 13: $V3,
5030- 14: $V4,
5031- 19: $V5,
5032- 23: $V6,
5033- 25: 12,
5034- 26: $V7,
5035- 28: $V8,
5036- 32: $V9,
5037- 34: $Va,
5038- 36: $Vb
5039- }, {
5040- 2: 13,
5041- 4: 75,
5042- 6: 3,
5043- 7: $V0,
5044- 8: $V1,
5045- 9: 6,
5046- 10: $V2,
5047- 13: $V3,
5048- 14: $V4,
5049- 19: $V5,
5050- 23: $V6,
5051- 25: 12,
5052- 26: $V7,
5053- 28: $V8,
5054- 32: $V9,
5055- 34: $Va,
5056- 36: $Vb
5057- }, o($Vu, [2, 42]), o($Vt, [2, 34], {
5058- 11: $Vc,
5059- 12: $Vd,
5060- 13: $Ve,
5061- 16: $Vf,
5062- 17: $Vg,
5063- 18: $Vh,
5064- 19: $Vi,
5065- 20: $Vj,
5066- 21: $Vk,
5067- 22: $Vl
5068- }), o($Vt, [2, 35], { 11: $Vc, 12: $Vd, 13: $Ve, 16: $Vf, 17: $Vg, 18: $Vh, 19: $Vi, 20: $Vj, 21: $Vk, 22: $Vl })],
5069- defaultActions: { 19: [2, 1] },
5070- parseError: function parseError(str, hash) {
5071- if (hash.recoverable) {
5072- this.trace(str);
5073- }
5074- else {
5075- throw new Error(str);
5076- }
5077- },
5078- parse: function parse(input) {
5079- var self = this, stack = [0], tstack = [], // token stack
5080- vstack = [null], // semantic value stack
5081- lstack = [], // location stack
5082- table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
5083- var args = lstack.slice.call(arguments, 1);
5084- //this.reductionCount = this.shiftCount = 0;
5085- var lexer = Object.create(this.lexer);
5086- var sharedState = { yy: { parseError: undefined, lexer: { parseError: undefined }, parser: { parseError: undefined } } };
5087- // copy state
5088- for (var k in this.yy) {
5089- if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
5090- sharedState.yy[k] = this.yy[k];
5091- }
5092- }
5093- lexer.setInput(input, sharedState.yy);
5094- sharedState.yy.lexer = lexer;
5095- sharedState.yy.parser = this;
5096- if (typeof lexer.yylloc == 'undefined') {
5097- lexer.yylloc = {};
5098- }
5099- var yyloc = lexer.yylloc;
5100- lstack.push(yyloc);
5101- var ranges = lexer.options && lexer.options.ranges;
5102- if (typeof sharedState.yy.parseError === 'function') {
5103- this.parseError = sharedState.yy.parseError;
5104- }
5105- else {
5106- this.parseError = Object.getPrototypeOf(this).parseError;
5107- }
5108- function popStack(n) {
5109- stack.length = stack.length - 2 * n;
5110- vstack.length = vstack.length - n;
5111- lstack.length = lstack.length - n;
5112- }
5113- function lex() {
5114- var token;
5115- token = lexer.lex() || EOF;
5116- // if token isn't its numeric value, convert
5117- if (typeof token !== 'number') {
5118- token = self.symbols_[token] || token;
5119- }
5120- return token;
5121- }
5122- var symbol, preErrorSymbol, state, action, a, r, yyval = {
5123- $: undefined,
5124- _$: undefined
5125- }, p, len, newState, expected;
5126- while (true) {
5127- // retreive state number from top of stack
5128- state = stack[stack.length - 1];
5129- // use default actions if available
5130- if (this.defaultActions[state]) {
5131- action = this.defaultActions[state];
5132- }
5133- else {
5134- if (symbol === null || typeof symbol == 'undefined') {
5135- symbol = lex();
5136- }
5137- // read action for current state and first input
5138- action = table[state] && table[state][symbol];
5139- }
5140- // handle parse error
5141- if (typeof action === 'undefined' || !action.length || !action[0]) {
5142- var error_rule_depth;
5143- var errStr = '';
5144- // Return the rule stack depth where the nearest error rule can be found.
5145- // Return FALSE when no error recovery rule was found.
5146- this.locateNearestErrorRecoveryRule = function (state) {
5147- var stack_probe = stack.length - 1;
5148- var depth = 0;
5149- // try to recover from error
5150- for (;;) {
5151- // check for error recovery rule in this state
5152- if ((TERROR.toString()) in table[state]) {
5153- return depth;
5154- }
5155- if (state === 0 || stack_probe < 2) {
5156- return false; // No suitable error recovery rule available.
5157- }
5158- stack_probe -= 2; // popStack(1): [symbol, action]
5159- state = stack[stack_probe];
5160- ++depth;
5161- }
5162- };
5163- if (!recovering) {
5164- // first see if there's any chance at hitting an error recovery rule:
5165- error_rule_depth = this.locateNearestErrorRecoveryRule(state);
5166- // Report error
5167- expected = [];
5168- for (p in table[state]) {
5169- if (this.terminals_[p] && p > TERROR) {
5170- expected.push("'" + this.terminals_[p] + "'");
5171- }
5172- }
5173- if (lexer.showPosition) {
5174- errStr = 'Parse error on line ' + (yylineno + 1) + ":\n" + lexer.showPosition() + "\nExpecting " + expected.join(', ') + ", got '" + (this.terminals_[symbol] || symbol) + "'";
5175- }
5176- else {
5177- errStr = 'Parse error on line ' + (yylineno + 1) + ": Unexpected " +
5178- (symbol == EOF ? "end of input" :
5179- ("'" + (this.terminals_[symbol] || symbol) + "'"));
5180- }
5181- this.parseError(errStr, {
5182- text: lexer.match,
5183- token: this.terminals_[symbol] || symbol,
5184- line: lexer.yylineno,
5185- loc: yyloc,
5186- expected: expected,
5187- recoverable: (error_rule_depth !== false)
5188- });
5189- }
5190- else if (preErrorSymbol !== EOF) {
5191- error_rule_depth = this.locateNearestErrorRecoveryRule(state);
5192- }
5193- // just recovered from another error
5194- if (recovering == 3) {
5195- if (symbol === EOF || preErrorSymbol === EOF) {
5196- throw new Error(errStr || 'Parsing halted while starting to recover from another error.');
5197- }
5198- // discard current lookahead and grab another
5199- yyleng = lexer.yyleng;
5200- yytext = lexer.yytext;
5201- yylineno = lexer.yylineno;
5202- yyloc = lexer.yylloc;
5203- symbol = lex();
5204- }
5205- // try to recover from error
5206- if (error_rule_depth === false) {
5207- throw new Error(errStr || 'Parsing halted. No suitable error recovery rule available.');
5208- }
5209- popStack(error_rule_depth);
5210- preErrorSymbol = (symbol == TERROR ? null : symbol); // save the lookahead token
5211- symbol = TERROR; // insert generic error symbol as new lookahead
5212- state = stack[stack.length - 1];
5213- action = table[state] && table[state][TERROR];
5214- recovering = 3; // allow 3 real symbols to be shifted before reporting a new error
5215- }
5216- // this shouldn't happen, unless resolve defaults are off
5217- if (action[0] instanceof Array && action.length > 1) {
5218- throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
5219- }
5220- switch (action[0]) {
5221- case 1:
5222- //this.shiftCount++;
5223- stack.push(symbol);
5224- vstack.push(lexer.yytext);
5225- lstack.push(lexer.yylloc);
5226- stack.push(action[1]); // push state
5227- symbol = null;
5228- if (!preErrorSymbol) {
5229- yyleng = lexer.yyleng;
5230- yytext = lexer.yytext;
5231- yylineno = lexer.yylineno;
5232- yyloc = lexer.yylloc;
5233- if (recovering > 0) {
5234- recovering--;
5235- }
5236- }
5237- else {
5238- // error just occurred, resume old lookahead f/ before error
5239- symbol = preErrorSymbol;
5240- preErrorSymbol = null;
5241- }
5242- break;
5243- case 2:
5244- // reduce
5245- //this.reductionCount++;
5246- len = this.productions_[action[1]][1];
5247- // perform semantic action
5248- yyval.$ = vstack[vstack.length - len]; // default to $$ = $1
5249- // default location, uses first token for firsts, last for lasts
5250- yyval._$ = {
5251- first_line: lstack[lstack.length - (len || 1)].first_line,
5252- last_line: lstack[lstack.length - 1].last_line,
5253- first_column: lstack[lstack.length - (len || 1)].first_column,
5254- last_column: lstack[lstack.length - 1].last_column
5255- };
5256- if (ranges) {
5257- yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
5258- }
5259- r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
5260- if (typeof r !== 'undefined') {
5261- return r;
5262- }
5263- // pop off stack
5264- if (len) {
5265- stack = stack.slice(0, -1 * len * 2);
5266- vstack = vstack.slice(0, -1 * len);
5267- lstack = lstack.slice(0, -1 * len);
5268- }
5269- stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce)
5270- vstack.push(yyval.$);
5271- lstack.push(yyval._$);
5272- // goto new state = table[STATE][NONTERMINAL]
5273- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
5274- stack.push(newState);
5275- break;
5276- case 3:
5277- // accept
5278- return true;
5279- }
5280- }
5281- }
5282- };
5283- /* generated by jison-lex 0.3.4 */
5284- var lexer = (function () {
5285- var lexer = ({
5286- EOF: 1,
5287- parseError: function parseError(str, hash) {
5288- if (this.yy.parser) {
5289- this.yy.parser.parseError(str, hash);
5290- }
5291- else {
5292- throw new Error(str);
5293- }
5294- },
5295- // resets the lexer, sets new input
5296- setInput: function (input, yy) {
5297- this.yy = yy || this.yy || {};
5298- this._input = input;
5299- this._more = this._backtrack = this.done = false;
5300- this.yylineno = this.yyleng = 0;
5301- this.yytext = this.matched = this.match = '';
5302- this.conditionStack = ['INITIAL'];
5303- this.yylloc = {
5304- first_line: 1,
5305- first_column: 0,
5306- last_line: 1,
5307- last_column: 0
5308- };
5309- if (this.options.ranges) {
5310- this.yylloc.range = [0, 0];
5311- }
5312- this.offset = 0;
5313- return this;
5314- },
5315- // consumes and returns one char from the input
5316- input: function () {
5317- var ch = this._input[0];
5318- this.yytext += ch;
5319- this.yyleng++;
5320- this.offset++;
5321- this.match += ch;
5322- this.matched += ch;
5323- var lines = ch.match(/(?:\r\n?|\n).*/g);
5324- if (lines) {
5325- this.yylineno++;
5326- this.yylloc.last_line++;
5327- }
5328- else {
5329- this.yylloc.last_column++;
5330- }
5331- if (this.options.ranges) {
5332- this.yylloc.range[1]++;
5333- }
5334- this._input = this._input.slice(1);
5335- return ch;
5336- },
5337- // unshifts one char (or a string) into the input
5338- unput: function (ch) {
5339- var len = ch.length;
5340- var lines = ch.split(/(?:\r\n?|\n)/g);
5341- this._input = ch + this._input;
5342- this.yytext = this.yytext.substr(0, this.yytext.length - len);
5343- //this.yyleng -= len;
5344- this.offset -= len;
5345- var oldLines = this.match.split(/(?:\r\n?|\n)/g);
5346- this.match = this.match.substr(0, this.match.length - 1);
5347- this.matched = this.matched.substr(0, this.matched.length - 1);
5348- if (lines.length - 1) {
5349- this.yylineno -= lines.length - 1;
5350- }
5351- var r = this.yylloc.range;
5352- this.yylloc = {
5353- first_line: this.yylloc.first_line,
5354- last_line: this.yylineno + 1,
5355- first_column: this.yylloc.first_column,
5356- last_column: lines ?
5357- (lines.length === oldLines.length ? this.yylloc.first_column : 0)
5358- + oldLines[oldLines.length - lines.length].length - lines[0].length :
5359- this.yylloc.first_column - len
5360- };
5361- if (this.options.ranges) {
5362- this.yylloc.range = [r[0], r[0] + this.yyleng - len];
5363- }
5364- this.yyleng = this.yytext.length;
5365- return this;
5366- },
5367- // When called from action, caches matched text and appends it on next action
5368- more: function () {
5369- this._more = true;
5370- return this;
5371- },
5372- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
5373- reject: function () {
5374- if (this.options.backtrack_lexer) {
5375- this._backtrack = true;
5376- }
5377- else {
5378- return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), {
5379- text: "",
5380- token: null,
5381- line: this.yylineno
5382- });
5383- }
5384- return this;
5385- },
5386- // retain first n characters of the match
5387- less: function (n) {
5388- this.unput(this.match.slice(n));
5389- },
5390- // displays already matched input, i.e. for error messages
5391- pastInput: function () {
5392- var past = this.matched.substr(0, this.matched.length - this.match.length);
5393- return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
5394- },
5395- // displays upcoming input, i.e. for error messages
5396- upcomingInput: function () {
5397- var next = this.match;
5398- if (next.length < 20) {
5399- next += this._input.substr(0, 20 - next.length);
5400- }
5401- return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
5402- },
5403- // displays the character position where the lexing error occurred, i.e. for error messages
5404- showPosition: function () {
5405- var pre = this.pastInput();
5406- var c = new Array(pre.length + 1).join("-");
5407- return pre + this.upcomingInput() + "\n" + c + "^";
5408- },
5409- // test the lexed token: return FALSE when not a match, otherwise return token
5410- test_match: function (match, indexed_rule) {
5411- var token, lines, backup;
5412- if (this.options.backtrack_lexer) {
5413- // save context
5414- backup = {
5415- yylineno: this.yylineno,
5416- yylloc: {
5417- first_line: this.yylloc.first_line,
5418- last_line: this.last_line,
5419- first_column: this.yylloc.first_column,
5420- last_column: this.yylloc.last_column
5421- },
5422- yytext: this.yytext,
5423- match: this.match,
5424- matches: this.matches,
5425- matched: this.matched,
5426- yyleng: this.yyleng,
5427- offset: this.offset,
5428- _more: this._more,
5429- _input: this._input,
5430- yy: this.yy,
5431- conditionStack: this.conditionStack.slice(0),
5432- done: this.done
5433- };
5434- if (this.options.ranges) {
5435- backup.yylloc.range = this.yylloc.range.slice(0);
5436- }
5437- }
5438- lines = match[0].match(/(?:\r\n?|\n).*/g);
5439- if (lines) {
5440- this.yylineno += lines.length;
5441- }
5442- this.yylloc = {
5443- first_line: this.yylloc.last_line,
5444- last_line: this.yylineno + 1,
5445- first_column: this.yylloc.last_column,
5446- last_column: lines ?
5447- lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
5448- this.yylloc.last_column + match[0].length
5449- };
5450- this.yytext += match[0];
5451- this.match += match[0];
5452- this.matches = match;
5453- this.yyleng = this.yytext.length;
5454- if (this.options.ranges) {
5455- this.yylloc.range = [this.offset, this.offset += this.yyleng];
5456- }
5457- this._more = false;
5458- this._backtrack = false;
5459- this._input = this._input.slice(match[0].length);
5460- this.matched += match[0];
5461- token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
5462- if (this.done && this._input) {
5463- this.done = false;
5464- }
5465- if (token) {
5466- return token;
5467- }
5468- else if (this._backtrack) {
5469- // recover context
5470- for (var k in backup) {
5471- this[k] = backup[k];
5472- }
5473- return false; // rule action called reject() implying the next rule should be tested instead.
5474- }
5475- return false;
5476- },
5477- // return next match in input
5478- next: function () {
5479- if (this.done) {
5480- return this.EOF;
5481- }
5482- if (!this._input) {
5483- this.done = true;
5484- }
5485- var token, match, tempMatch, index;
5486- if (!this._more) {
5487- this.yytext = '';
5488- this.match = '';
5489- }
5490- var rules = this._currentRules();
5491- for (var i = 0; i < rules.length; i++) {
5492- tempMatch = this._input.match(this.rules[rules[i]]);
5493- if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
5494- match = tempMatch;
5495- index = i;
5496- if (this.options.backtrack_lexer) {
5497- token = this.test_match(tempMatch, rules[i]);
5498- if (token !== false) {
5499- return token;
5500- }
5501- else if (this._backtrack) {
5502- match = false;
5503- continue; // rule action called reject() implying a rule mis-match.
5504- }
5505- else {
5506- // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
5507- return false;
5508- }
5509- }
5510- else if (!this.options.flex) {
5511- break;
5512- }
5513- }
5514- }
5515- if (match) {
5516- token = this.test_match(match, rules[index]);
5517- if (token !== false) {
5518- return token;
5519- }
5520- // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
5521- return false;
5522- }
5523- if (this._input === "") {
5524- return this.EOF;
5525- }
5526- else {
5527- return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
5528- text: "",
5529- token: null,
5530- line: this.yylineno
5531- });
5532- }
5533- },
5534- // return next match that has a token
5535- lex: function lex() {
5536- var r = this.next();
5537- if (r) {
5538- return r;
5539- }
5540- else {
5541- return this.lex();
5542- }
5543- },
5544- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
5545- begin: function begin(condition) {
5546- this.conditionStack.push(condition);
5547- },
5548- // pop the previously active lexer condition state off the condition stack
5549- popState: function popState() {
5550- var n = this.conditionStack.length - 1;
5551- if (n > 0) {
5552- return this.conditionStack.pop();
5553- }
5554- else {
5555- return this.conditionStack[0];
5556- }
5557- },
5558- // produce the lexer rule set which is active for the currently active lexer condition state
5559- _currentRules: function _currentRules() {
5560- if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
5561- return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
5562- }
5563- else {
5564- return this.conditions["INITIAL"].rules;
5565- }
5566- },
5567- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
5568- topState: function topState(n) {
5569- n = this.conditionStack.length - 1 - Math.abs(n || 0);
5570- if (n >= 0) {
5571- return this.conditionStack[n];
5572- }
5573- else {
5574- return "INITIAL";
5575- }
5576- },
5577- // alias for begin(condition)
5578- pushState: function pushState(condition) {
5579- this.begin(condition);
5580- },
5581- // return the number of states currently on the stack
5582- stateStackSize: function stateStackSize() {
5583- return this.conditionStack.length;
5584- },
5585- options: {},
5586- performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
5587- var YYSTATE = YY_START;
5588- switch ($avoiding_name_collisions) {
5589- case 0:
5590- break;
5591- case 1:
5592- return 10;
5593- case 2:
5594- return 10;
5595- case 3:
5596- return 23;
5597- case 4:
5598- return 7;
5599- case 5:
5600- return 8;
5601- case 6:
5602- //if (yy.obj.type == 'cell') return 26;
5603- //return 32;
5604- return 26;
5605- case 7:
5606- //if (yy.obj.type == 'cell') return 28;
5607- //return 32;
5608- return 28;
5609- case 8:
5610- return 23;
5611- case 9:
5612- return 32;
5613- case 10:
5614- return 32;
5615- case 11:
5616- return 34;
5617- case 12:
5618- return 29;
5619- case 13:
5620- break;
5621- case 14:
5622- return 11;
5623- case 15:
5624- return ' ';
5625- case 16:
5626- return 33;
5627- case 17:
5628- return 27;
5629- case 18:
5630- return 30;
5631- case 19:
5632- return 31;
5633- case 20:
5634- return 20;
5635- case 21:
5636- return 21;
5637- case 22:
5638- return 19;
5639- case 23:
5640- return 13;
5641- case 24:
5642- return 22;
5643- case 25:
5644- return 14;
5645- case 26:
5646- return 15;
5647- case 27:
5648- return 17;
5649- case 28:
5650- return 16;
5651- case 29:
5652- return 18;
5653- case 30:
5654- return '"';
5655- case 31:
5656- return "'";
5657- case 32:
5658- return "!";
5659- case 33:
5660- return 12;
5661- case 34:
5662- return 35;
5663- case 35:
5664- return 36;
5665- case 36:
5666- return 5;
5667- }
5668- },
5669- // NOTE: Alterations made in some regular-expressions to allow for formulas containing dot-notation. Eg: F.INV
5670- rules: [/^(?:\s+)/,
5671- /^(?:"(\\["]|[^"])*")/,
5672- /^(?:'(\\[']|[^'])*')/,
5673- // Changed from /^(?:[A-Za-z]{1,}[A-Za-z_0-9]+(?=[(]))/
5674- /^(?:[A-Za-z.]{1,}[A-Za-z_0-9]+(?=[(]))/,
5675- /^(?:([0]?[1-9]|1[0-2])[:][0-5][0-9]([:][0-5][0-9])?[ ]?(AM|am|aM|Am|PM|pm|pM|Pm))/,
5676- /^(?:([0]?[0-9]|1[0-9]|2[0-3])[:][0-5][0-9]([:][0-5][0-9])?)/,
5677- /^(?:\$[A-Za-z]+\$[0-9]+)/,
5678- /^(?:[A-Za-z]+[0-9]+)/,
5679- // Changed from /^(?:[A-Za-z.]+(?=[(]))/
5680- /^(?:[A-Za-z.]+(?=[(]))/,
5681- /^(?:[A-Za-z]{1,}[A-Za-z_0-9]+)/,
5682- /^(?:[A-Za-z_]+)/,
5683- /^(?:[0-9]+)/,
5684- /^(?:\[(.*)?\])/,
5685- /^(?:\$)/,
5686- /^(?:&)/,
5687- /^(?: )/,
5688- /^(?:[.])/,
5689- /^(?::)/,
5690- /^(?:;)/,
5691- /^(?:,)/,
5692- /^(?:\*)/,
5693- /^(?:\/)/,
5694- /^(?:-)/,
5695- /^(?:\+)/,
5696- /^(?:\^)/,
5697- /^(?:\()/,
5698- /^(?:\))/,
5699- /^(?:>)/,
5700- /^(?:<)/,
5701- /^(?:NOT\b)/,
5702- /^(?:")/,
5703- /^(?:')/,
5704- /^(?:!)/,
5705- /^(?:=)/,
5706- /^(?:%)/,
5707- /^(?:[#])/,
5708- /^(?:$)/],
5709- conditions: {
5710- "INITIAL": {
5711- "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36],
5712- "inclusive": true
5713- }
5714- }
5715- });
5716- return lexer;
5717- })();
5718- parser.lexer = lexer;
5719- function Parser() {
5720- this.yy = {};
5721- }
5722- Parser.prototype = parser;
5723- parser.Parser = Parser;
5724- return new Parser;
5725-})();
5726-exports.Parser = Parser;