vendor: 4,049 bytes, lines 1-79
1/* parser generated by jison 0.4.15 */ 2/* 3 Returns a Parser object of the following structure: 4 5 Parser: { 6 yy: {} 7 } 8 9 Parser.prototype: { 10 yy: {}, 11 trace: function(), 12 symbols_: {associative list: name ==> number}, 13 terminals_: {associative list: number ==> name}, 14 productions_: [...], 15 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), 16 table: [...], 17 defaultActions: {...}, 18 parseError: function(str, hash), 19 parse: function(input), 20 21 lexer: { 22 EOF: 1, 23 parseError: function(str, hash), 24 setInput: function(input), 25 input: function(), 26 unput: function(str), 27 more: function(), 28 less: function(n), 29 pastInput: function(), 30 upcomingInput: function(), 31 showPosition: function(), 32 test_match: function(regex_match_array, rule_index), 33 next: function(), 34 lex: function(), 35 begin: function(condition), 36 popState: function(), 37 _currentRules: function(), 38 topState: function(), 39 pushState: function(condition), 40 41 options: { 42 ranges: boolean (optional: true ==> token location info will include a .range[] member) 43 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) 44 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) 45 }, 46 47 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), 48 rules: [...], 49 conditions: {associative list: name ==> set}, 50 } 51 } 52 53 54 token location info (@$, _$, etc.): { 55 first_line: n, 56 last_line: n, 57 first_column: n, 58 last_column: n, 59 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) 60 } 61 62 63 the parseError function receives a 'hash' object with these members for lexer and parser errors: { 64 text: (matched text) 65 token: (the produced terminal token, if any) 66 line: (yylineno) 67 } 68 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { 69 loc: (yylloc) 70 expected: (string describing the set of expected tokens) 71 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) 72 } 73*/ 74var Parser = (function(){ 75var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$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,29,30,38],$Vn=[5,11,12,13,15,16,17,18,19,20,21,22,29,30,33,38],$Vo=[1,38],$Vp=[5,11,12,13,15,16,17,18,19,20,21,22,29,30,35,38],$Vq=[5,12,13,15,16,17,18,19,29,30,38],$Vr=[5,12,15,16,17,18,29,30,38],$Vs=[5,12,13,15,16,17,18,19,20,21,29,30,38],$Vt=[15,29,30],$Vu=[5,11,12,13,15,16,17,18,19,20,21,22,29,30,32,38,39],$Vv=[30,38]; 76var parser = {trace: function trace() { }, 77yy: {}, 78symbols_: {"error":2,"expressions":3,"expression":4,"EOF":5,"variableSequence":6,"TIME_AMPM":7,"TIME_24":8,"number":9,"STRING":10,"&":11,"=":12,"+":13,"(":14,")":15,"@LESS@":16,"@MORE@":17,"NOT":18,"-":19,"*":20,"/":21,"^":22,"FUNCTION":23,"expseq":24,"cell":25,"FIXEDCELL":26,":":27,"CELL":28,";":29,",":30,"array":31,"VARIABLE":32,"DECIMAL":33,"NUMBER":34,"%":35,"{":36,"arrayElement":37,"}":38,"#":39,"!":40,"$accept":0,"$end":1}, 79terminals_: {5:"EOF",7:"TIME_AMPM",8:"TIME_24",10:"STRING",11:"&",12:"=",13:"+",14:"(",15:")",16:"@LESS@",17:"@MORE@",18:"NOT",19:"-",20:"*",21:"/",22:"^",23:"FUNCTION",26:"FIXEDCELL",27:":",28:"CELL",29:";
79",30:",",32:"VARIABLE",33:"DECIMAL",34:"NUMBER",35:"%",36:"{",38:"}",39:"#",40:"!"}, 80productions_: [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,3],[24,3],[24,1],[6,1],[6,3],[9,1],[9,3],[9,2],[31,3],[37,3],[37,1],[2,3],[2,4]], 81performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { 82/* this == yyval */ 83 84var $0 = $$.length - 1; 85switch (yystate) { 86case 1: 87 88 return $$[$0-1]; 89 90break; 91case 2: 92 93 this.$ = yy.handler.helper.callVariable.call(this, $$[$0]); 94 95break; 96case 3: 97 98 this.$ = yy.handler.time.call(yy.obj, $$[$0], true); 99 100break; 101case 4: 102 103 this.$ = yy.handler.time.call(yy.obj, $$[$0]); 104 105break; 106case 5: 107 108 this.$ = yy.handler.helper.number($$[$0]); 109 110break; 111case 6: 112 113 this.$ = yy.handler.helper.string($$[$0]); 114 115break; 116case 7: 117 118 this.$ = yy.handler.helper.specialMatch('&', $$[$0-2], $$[$0]); 119 120break; 121case 8: 122 123 this.$ = yy.handler.helper.logicMatch('=', $$[$0-2], $$[$0]); 124 125break; 126case 9: 127 128 this.$ = yy.handler.helper.mathMatch('+', $$[$0-2], $$[$0]); 129 130break; 131case 10: 132 133 this.$ = yy.handler.helper.number($$[$0-1]); 134 135break; 136case 11: 137 138 this.$ = yy.handler.helper.logicMatch('@LESS@=', $$[$0-3], $$[$0]); 139 140break; 141case 12: 142 143 this.$ = yy.handler.helper.logicMatch('@MORE@=', $$[$0-3], $$[$0]); 144 145break; 146case 13: 147 148 this.$ = yy.handler.helper.logicMatch('@LESS@@MORE@', $$[$0-3], $$[$0]); 149 150break; 151case 14: 152 153 this.$ = yy.handler.helper.logicMatch('NOT', $$[$0-2], $$[$0]); 154 155break; 156case 15: 157 158 this.$ = yy.handler.helper.logicMatch('@MORE@', $$[$0-2], $$[$0]); //> 159 160break; 161case 16: 162 163 this.$ = yy.handler.helper.logicMatch('@LESS@', $$[$0-2], $$[$0]); //< 164 165break; 166case 17: 167 168 this.$ = yy.handler.helper.mathMatch('-', $$[$0-2], $$[$0]); 169 170break; 171case 18: 172 173 this.$ = yy.handler.helper.mathMatch('*', $$[$0-2], $$[$0]); 174 175break; 176case 19: 177 178 this.$ = yy.handler.helper.mathMatch('/', $$[$0-2], $$[$0]); 179 180break; 181case 20: 182 183 this.$ = yy.handler.helper.mathMatch('^', $$[$0-2], $$[$0]); 184 185break; 186case 21: 187 188 var n1 = yy.handler.helper.numberInverted($$[$0]); 189 this.$ = n1; 190 if (isNaN(this.$)) { 191 this.$ = 0; 192 } 193 194break; 195case 22: 196 197 var n1 = yy.handler.helper.number($$[$0]); 198 this.$ = n1; 199 if (isNaN(this.$)) { 200 this.$ = 0; 201 } 202 203break; 204case 23: 205 206 this.$ = yy.handler.helper.callFunction.call(this, $$[$0-2], ''); 207 208break; 209case 24: 210 211 this.$ = yy.handler.helper.callFunction.call(this, $$[$0-3], $$[$0-1]); 212 213break; 214case 28: 215 216 this.$ = yy.handler.helper.fixedCellValue.call(yy.obj, $$[$0]); 217 218break; 219case 29: 220 221 this.$ = yy.handler.helper.fixedCellRangeValue.call(yy.obj, $$[$0-2], $$[$0]); 222 223break; 224case 30: 225 226 this.$ = yy.handler.helper.cellValue.call(yy.obj, $$[$0]); 227 228break; 229case 31: 230 231 this.$ = yy.handler.helper.cellRangeValue.call(yy.obj, $$[$0-2], $$[$0]); 232 233break; 234case 32: 235 236 if (yy.handler.utils.isArray($$[$0])) { 237 this.$ = $$[$0]; 238 } else { 239 this.$ = [$$[$0]]; 240 } 241 242break; 243case 33: case 34: 244 245 $$[$0-2].push($$[$0]); 246 this.$ = $$[$0-2]; 247 248break; 249case 36: 250 251 this.$ = [$$[$0]]; 252 253break; 254case 37: 255 256 this.$ = (yy.handler.utils.isArray($$[$0-2]) ? $$[$0-2] : [$$[$0-2]]); 257 this.$.push($$[$0]); 258 259break; 260case 38: 261 262 this.$ = $$[$0]; 263 264break; 265case 39: 266 267 this.$ = ($$[$0-2] + '.' + $$[$0]) * 1; 268 269break; 270case 40: 271 272 this.$ = $$[$0-1] * 0.01; 273 274break; 275case 41: 276 277 this.$ = [$$[$0-1].split(',')]; 278 279break; 280case 42: 281 282 this.$ = $$[$0-2] + ',' + $$[$0]; 283 284break; 285case 43: 286 287 this.$ = $$[$0]; 288 289break; 290case 44: case 45: 291 292 this.$ = $$[$0-2] + $$[$0-1] + $$[$0]; 293 294break; 295} 296}, 297table: [{2:13,3:1,4:2,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},{1:[3]},{5:[1,19],11:$Vc,12:$Vd,13:$Ve,16:$Vf,17:$Vg,18:$Vh,19:$Vi,20:$Vj,21:$Vk,22:$Vl},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]),{2:13,4:32,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},{2:13,4:33,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},{2:13,4:34,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},{14:[1,35]},o($Vm,[2,25]),o($Vm,[2,26],{2:36,32:[1,37],39:$Vb}),o($Vn,[2,36],{39:$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]}
vendor: 8,978 bytes, lines 297-443
297,{1:[2,1]},{2:13,4:43,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},{2:13,4:44,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},{2:13,4:45,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},{2:13,4:48,6:3,7:$V0,8:$V1,9:6,10:$V2,12:[1,46],13:$V3,14:$V4,17:[1,47],19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},{2:13,4:50,6:3,7:$V0,8:$V1,9:6,10:$V2,12:[1,49],13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},{2:13,4:51,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},{2:13,4:52,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},{2:13,4:53,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},{2:13,4:54,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},{2:13,4:55,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},{32:[1,56]},o($Vp,[2,40]),{11:$Vc,12:$Vd,13:$Ve,15:[1,57],16:$Vf,17:$Vg,18:$Vh,19:$Vi,20:$Vj,21:$Vk,22:$Vl},o($Vq,[2,21],{11:$Vc,20:$Vj,21:$Vk,22:$Vl}),o($Vq,[2,22],{11:$Vc,20:$Vj,21:$Vk,22:$Vl}),{2:13,4:60,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,15:[1,58],19:$V5,23:$V6,24:59,25:12,26:$V7,28:$V8,31:61,32:$V9,34:$Va,36:[1,62],39:$Vb},o($Vm,[2,27]),{39:$Vo},{32:[1,63]},{34:[1,64]},{26:[1,65]},{28:[1,66]},{40:[1,67]},o($Vm,[2,7]),o([5,12,15,29,30,38],[2,8],{11:$Vc,13:$Ve,16:$Vf,17:$Vg,18:$Vh,19:$Vi,20:$Vj,21:$Vk,22:$Vl}),o($Vq,[2,9],{11:$Vc,20:$Vj,21:$Vk,22:$Vl}),{2:13,4:68,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},{2:13,4:69,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},o($Vr,[2,16],{11:$Vc,13:$Ve,19:$Vi,20:$Vj,21:$Vk,22:$Vl}),{2:13,4:70,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},o($Vr,[2,15],{11:$Vc,13:$Ve,19:$Vi,20:$Vj,21:$Vk,22:$Vl}),o([5,12,15,18,29,30,38],[2,14],{11:$Vc,13:$Ve,16:$Vf,17:$Vg,19:$Vi,20:$Vj,21:$Vk,22:$Vl}),o($Vq,[2,17],{11:$Vc,20:$Vj,21:$Vk,22:$Vl}),o($Vs,[2,18],{11:$Vc,22:$Vl}),o($Vs,[2,19],{11:$Vc,22:$Vl}),o([5,12,13,15,16,17,18,19,20,21,22,29,30,38],[2,20],{11:$Vc}),o($Vn,[2,37]),o($Vm,[2,10]),o($Vm,[2,23]),{15:[1,71],29:[1,72],30:[1,73]},o($Vt,[2,32],{11:$Vc,12:$Vd,13:$Ve,16:$Vf,17:$Vg,18:$Vh,19:$Vi,20:$Vj,21:$Vk,22:$Vl}),o($Vt,[2,35]),{2:13,4:75,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,37:74,39:$Vb},{40:[1,76]},o($Vp,[2,39]),o($Vm,[2,29]),o($Vm,[2,31]),o($Vu,[2,44]),o($Vr,[2,11],{11:$Vc,13:$Ve,19:$Vi,20:$Vj,21:$Vk,22:$Vl}),o($Vr,[2,13],{11:$Vc,13:$Ve,19:$Vi,20:$Vj,21:$Vk,22:$Vl}),o($Vr,[2,12],{11:$Vc,13:$Ve,19:$Vi,20:$Vj,21:$Vk,22:$Vl}),o($Vm,[2,24]),{2:13,4:77,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},{2:13,4:78,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},{30:[1,80],38:[1,79]},o($Vv,[2,43],{11:$Vc,12:$Vd,13:$Ve,16:$Vf,17:$Vg,18:$Vh,19:$Vi,20:$Vj,21:$Vk,22:$Vl}),o($Vu,[2,45]),o($Vt,[2,33],{11:$Vc,12:$Vd,13:$Ve,16:$Vf,17:$Vg,18:$Vh,19:$Vi,20:$Vj,21:$Vk,22:$Vl}),o($Vt,[2,34],{11:$Vc,12:$Vd,13:$Ve,16:$Vf,17:$Vg,18:$Vh,19:$Vi,20:$Vj,21:$Vk,22:$Vl}),o($Vt,[2,41]),{2:13,4:81,6:3,7:$V0,8:$V1,9:6,10:$V2,13:$V3,14:$V4,19:$V5,23:$V6,25:12,26:$V7,28:$V8,32:$V9,34:$Va,39:$Vb},o($Vv,[2,42],{11:$Vc,12:$Vd,13:$Ve,16:$Vf,17:$Vg,18:$Vh,19:$Vi,20:$Vj,21:$Vk,22:$Vl})], 298defaultActions: {19:[2,1]}, 299parseError: function parseError(str, hash) { 300 if (hash.recoverable) { 301 this.trace(str); 302 } else { 303 throw new Error(str); 304 } 305}, 306parse: function parse(input) { 307 var self = this, 308 stack = [0], 309 tstack = [], // token stack 310 vstack = [null], // semantic value stack 311 lstack = [], // location stack 312 table = this.table, 313 yytext = '', 314 yylineno = 0, 315 yyleng = 0, 316 recovering = 0, 317 TERROR = 2, 318 EOF = 1; 319 320 var args = lstack.slice.call(arguments, 1); 321 322 //this.reductionCount = this.shiftCount = 0; 323 324 var lexer = Object.create(this.lexer); 325 var sharedState = { yy: {} }; 326 // copy state 327 for (var k in this.yy) { 328 if (Object.prototype.hasOwnProperty.call(this.yy, k)) { 329 sharedState.yy[k] = this.yy[k]; 330 } 331 } 332 333 lexer.setInput(input, sharedState.yy); 334 sharedState.yy.lexer = lexer; 335 sharedState.yy.parser = this; 336 if (typeof lexer.yylloc == 'undefined') { 337 lexer.yylloc = {}; 338 } 339 var yyloc = lexer.yylloc; 340 lstack.push(yyloc); 341 342 var ranges = lexer.options && lexer.options.ranges; 343 344 if (typeof sharedState.yy.parseError === 'function') { 345 this.parseError = sharedState.yy.parseError; 346 } else { 347 this.parseError = Object.getPrototypeOf(this).parseError; 348 } 349 350 function popStack (n) { 351 stack.length = stack.length - 2 * n; 352 vstack.length = vstack.length - n; 353 lstack.length = lstack.length - n; 354 } 355 356_token_stack: 357 function lex() { 358 var token; 359 token = lexer.lex() || EOF; 360 // if token isn't its numeric value, convert 361 if (typeof token !== 'number') { 362 token = self.symbols_[token] || token; 363 } 364 return token; 365 } 366 367 var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; 368 while (true) { 369 // retreive state number from top of stack 370 state = stack[stack.length - 1]; 371 372 // use default actions if available 373 if (this.defaultActions[state]) { 374 action = this.defaultActions[state]; 375 } else { 376 if (symbol === null || typeof symbol == 'undefined') { 377 symbol = lex(); 378 } 379 // read action for current state and first input 380 action = table[state] && table[state][symbol]; 381 } 382 383_handle_error: 384 // handle parse error 385 if (typeof action === 'undefined' || !action.length || !action[0]) { 386 var error_rule_depth; 387 var errStr = ''; 388 389 // Return the rule stack depth where the nearest error rule can be found. 390 // Return FALSE when no error recovery rule was found. 391 function locateNearestErrorRecoveryRule(state) { 392 var stack_probe = stack.length - 1; 393 var depth = 0; 394 395 // try to recover from error 396 for(;;) { 397 // check for error recovery rule in this state 398 if ((TERROR.toString()) in table[state]) { 399 return depth; 400 } 401 if (state === 0 || stack_probe < 2) { 402 return false; // No suitable error recovery rule available. 403 } 404 stack_probe -= 2; // popStack(1): [symbol, action] 405 state = stack[stack_probe]; 406 ++depth; 407 } 408 } 409 410 if (!recovering) { 411 // first see if there's any chance at hitting an error recovery rule: 412 error_rule_depth = locateNearestErrorRecoveryRule(state); 413 414 // Report error 415 expected = []; 416 for (p in table[state]) { 417 if (this.terminals_[p] && p > TERROR) { 418 expected.push("'"+this.terminals_[p]+"'"); 419 } 420 } 421 if (lexer.showPosition) { 422 errStr = 'Parse error on line '+(yylineno+1)+":\n"+lexer.showPosition()+"\nExpecting "+expected.join(', ') + ", got '" + (this.terminals_[symbol] || symbol)+ "'"; 423 } else { 424 errStr = 'Parse error on line '+(yylineno+1)+": Unexpected " + 425 (symbol == EOF ? "end of input" : 426 ("'"+(this.terminals_[symbol] || symbol)+"'")); 427 } 428 this.parseError(errStr, { 429 text: lexer.match, 430 token: this.terminals_[symbol] || symbol, 431 line: lexer.yylineno, 432 loc: yyloc, 433 expected: expected, 434 recoverable: (error_rule_depth !== false) 435 }); 436 } else if (preErrorSymbol !== EOF) { 437 error_rule_depth = locateNearestErrorRecoveryRule(state); 438 } 439 440 // just recovered from another error 441 if (recovering == 3) { 442 if (symbol === EOF || preErrorSymbol === EOF) { 443 throw new Error(errStr || 'Parsing halted while starting to re
vendor: 7,741 bytes, lines 443-663
443cover from another error.'); 444 } 445 446 // discard current lookahead and grab another 447 yyleng = lexer.yyleng; 448 yytext = lexer.yytext; 449 yylineno = lexer.yylineno; 450 yyloc = lexer.yylloc; 451 symbol = lex(); 452 } 453 454 // try to recover from error 455 if (error_rule_depth === false) { 456 throw new Error(errStr || 'Parsing halted. No suitable error recovery rule available.'); 457 } 458 popStack(error_rule_depth); 459 460 preErrorSymbol = (symbol == TERROR ? null : symbol); // save the lookahead token 461 symbol = TERROR; // insert generic error symbol as new lookahead 462 state = stack[stack.length-1]; 463 action = table[state] && table[state][TERROR]; 464 recovering = 3; // allow 3 real symbols to be shifted before reporting a new error 465 } 466 467 // this shouldn't happen, unless resolve defaults are off 468 if (action[0] instanceof Array && action.length > 1) { 469 throw new Error('Parse Error: multiple actions possible at state: '+state+', token: '+symbol); 470 } 471 472 switch (action[0]) { 473 case 1: // shift 474 //this.shiftCount++; 475 476 stack.push(symbol); 477 vstack.push(lexer.yytext); 478 lstack.push(lexer.yylloc); 479 stack.push(action[1]); // push state 480 symbol = null; 481 if (!preErrorSymbol) { // normal execution/no error 482 yyleng = lexer.yyleng; 483 yytext = lexer.yytext; 484 yylineno = lexer.yylineno; 485 yyloc = lexer.yylloc; 486 if (recovering > 0) { 487 recovering--; 488 } 489 } else { 490 // error just occurred, resume old lookahead f/ before error 491 symbol = preErrorSymbol; 492 preErrorSymbol = null; 493 } 494 break; 495 496 case 2: 497 // reduce 498 //this.reductionCount++; 499 500 len = this.productions_[action[1]][1]; 501 502 // perform semantic action 503 yyval.$ = vstack[vstack.length-len]; // default to $$ = $1 504 // default location, uses first token for firsts, last for lasts 505 yyval._$ = { 506 first_line: lstack[lstack.length-(len||1)].first_line, 507 last_line: lstack[lstack.length-1].last_line, 508 first_column: lstack[lstack.length-(len||1)].first_column, 509 last_column: lstack[lstack.length-1].last_column 510 }; 511 if (ranges) { 512 yyval._$.range = [lstack[lstack.length-(len||1)].range[0], lstack[lstack.length-1].range[1]]; 513 } 514 r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args)); 515 516 if (typeof r !== 'undefined') { 517 return r; 518 } 519 520 // pop off stack 521 if (len) { 522 stack = stack.slice(0,-1*len*2); 523 vstack = vstack.slice(0, -1*len); 524 lstack = lstack.slice(0, -1*len); 525 } 526 527 stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce) 528 vstack.push(yyval.$); 529 lstack.push(yyval._$); 530 // goto new state = table[STATE][NONTERMINAL] 531 newState = table[stack[stack.length-2]][stack[stack.length-1]]; 532 stack.push(newState); 533 break; 534 535 case 3: 536 // accept 537 return true; 538 } 539 540 } 541 542 return true; 543}}; 544 545/* generated by jison-lex 0.3.4 */ 546var lexer = (function(){ 547var lexer = ({ 548 549EOF:1, 550 551parseError:function parseError(str, hash) { 552 if (this.yy.parser) { 553 this.yy.parser.parseError(str, hash); 554 } else { 555 throw new Error(str); 556 } 557 }, 558 559// resets the lexer, sets new input 560setInput:function (input, yy) { 561 this.yy = yy || this.yy || {}; 562 this._input = input; 563 this._more = this._backtrack = this.done = false; 564 this.yylineno = this.yyleng = 0; 565 this.yytext = this.matched = this.match = ''; 566 this.conditionStack = ['INITIAL']; 567 this.yylloc = { 568 first_line: 1, 569 first_column: 0, 570 last_line: 1, 571 last_column: 0 572 }; 573 if (this.options.ranges) { 574 this.yylloc.range = [0,0]; 575 } 576 this.offset = 0; 577 return this; 578 }, 579 580// consumes and returns one char from the input 581input:function () { 582 var ch = this._input[0]; 583 this.yytext += ch; 584 this.yyleng++; 585 this.offset++; 586 this.match += ch; 587 this.matched += ch; 588 var lines = ch.match(/(?:\r\n?|\n).*/g); 589 if (lines) { 590 this.yylineno++; 591 this.yylloc.last_line++; 592 } else { 593 this.yylloc.last_column++; 594 } 595 if (this.options.ranges) { 596 this.yylloc.range[1]++; 597 } 598 599 this._input = this._input.slice(1); 600 return ch; 601 }, 602 603// unshifts one char (or a string) into the input 604unput:function (ch) { 605 var len = ch.length; 606 var lines = ch.split(/(?:\r\n?|\n)/g); 607 608 this._input = ch + this._input; 609 this.yytext = this.yytext.substr(0, this.yytext.length - len); 610 //this.yyleng -= len; 611 this.offset -= len; 612 var oldLines = this.match.split(/(?:\r\n?|\n)/g); 613 this.match = this.match.substr(0, this.match.length - 1); 614 this.matched = this.matched.substr(0, this.matched.length - 1); 615 616 if (lines.length - 1) { 617 this.yylineno -= lines.length - 1; 618 } 619 var r = this.yylloc.range; 620 621 this.yylloc = { 622 first_line: this.yylloc.first_line, 623 last_line: this.yylineno + 1, 624 first_column: this.yylloc.first_column, 625 last_column: lines ? 626 (lines.length === oldLines.length ? this.yylloc.first_column : 0) 627 + oldLines[oldLines.length - lines.length].length - lines[0].length : 628 this.yylloc.first_column - len 629 }; 630 631 if (this.options.ranges) { 632 this.yylloc.range = [r[0], r[0] + this.yyleng - len]; 633 } 634 this.yyleng = this.yytext.length; 635 return this; 636 }, 637 638// When called from action, caches matched text and appends it on next action 639more:function () { 640 this._more = true; 641 return this; 642 }, 643 644// 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. 645reject:function () { 646 if (this.options.backtrack_lexer) { 647 this._backtrack = true; 648 } else { 649 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(), { 650 text: "", 651 token: null, 652 line: this.yylineno 653 }); 654 655 } 656 return this; 657 }, 658 659// retain first n characters of the match 660less:function (n) { 661 this.unput(this.match.slice(n)); 662 }, 663
vendor: 6,664 bytes, lines 664-844
664// displays already matched input, i.e. for error messages 665pastInput:function () { 666 var past = this.matched.substr(0, this.matched.length - this.match.length); 667 return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); 668 }, 669 670// displays upcoming input, i.e. for error messages 671upcomingInput:function () { 672 var next = this.match; 673 if (next.length < 20) { 674 next += this._input.substr(0, 20-next.length); 675 } 676 return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); 677 }, 678 679// displays the character position where the lexing error occurred, i.e. for error messages 680showPosition:function () { 681 var pre = this.pastInput(); 682 var c = new Array(pre.length + 1).join("-"); 683 return pre + this.upcomingInput() + "\n" + c + "^"; 684 }, 685 686// test the lexed token: return FALSE when not a match, otherwise return token 687test_match:function (match, indexed_rule) { 688 var token, 689 lines, 690 backup; 691 692 if (this.options.backtrack_lexer) { 693 // save context 694 backup = { 695 yylineno: this.yylineno, 696 yylloc: { 697 first_line: this.yylloc.first_line, 698 last_line: this.last_line, 699 first_column: this.yylloc.first_column, 700 last_column: this.yylloc.last_column 701 }, 702 yytext: this.yytext, 703 match: this.match, 704 matches: this.matches, 705 matched: this.matched, 706 yyleng: this.yyleng, 707 offset: this.offset, 708 _more: this._more, 709 _input: this._input, 710 yy: this.yy, 711 conditionStack: this.conditionStack.slice(0), 712 done: this.done 713 }; 714 if (this.options.ranges) { 715 backup.yylloc.range = this.yylloc.range.slice(0); 716 } 717 } 718 719 lines = match[0].match(/(?:\r\n?|\n).*/g); 720 if (lines) { 721 this.yylineno += lines.length; 722 } 723 this.yylloc = { 724 first_line: this.yylloc.last_line, 725 last_line: this.yylineno + 1, 726 first_column: this.yylloc.last_column, 727 last_column: lines ? 728 lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : 729 this.yylloc.last_column + match[0].length 730 }; 731 this.yytext += match[0]; 732 this.match += match[0]; 733 this.matches = match; 734 this.yyleng = this.yytext.length; 735 if (this.options.ranges) { 736 this.yylloc.range = [this.offset, this.offset += this.yyleng]; 737 } 738 this._more = false; 739 this._backtrack = false; 740 this._input = this._input.slice(match[0].length); 741 this.matched += match[0]; 742 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); 743 if (this.done && this._input) { 744 this.done = false; 745 } 746 if (token) { 747 return token; 748 } else if (this._backtrack) { 749 // recover context 750 for (var k in backup) { 751 this[k] = backup[k]; 752 } 753 return false; // rule action called reject() implying the next rule should be tested instead. 754 } 755 return false; 756 }, 757 758// return next match in input 759next:function () { 760 if (this.done) { 761 return this.EOF; 762 } 763 if (!this._input) { 764 this.done = true; 765 } 766 767 var token, 768 match, 769 tempMatch, 770 index; 771 if (!this._more) { 772 this.yytext = ''; 773 this.match = ''; 774 } 775 var rules = this._currentRules(); 776 for (var i = 0; i < rules.length; i++) { 777 tempMatch = this._input.match(this.rules[rules[i]]); 778 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { 779 match = tempMatch; 780 index = i; 781 if (this.options.backtrack_lexer) { 782 token = this.test_match(tempMatch, rules[i]); 783 if (token !== false) { 784 return token; 785 } else if (this._backtrack) { 786 match = false; 787 continue; // rule action called reject() implying a rule MISmatch. 788 } else { 789 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) 790 return false; 791 } 792 } else if (!this.options.flex) { 793 break; 794 } 795 } 796 } 797 if (match) { 798 token = this.test_match(match, rules[index]); 799 if (token !== false) { 800 return token; 801 } 802 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) 803 return false; 804 } 805 if (this._input === "") { 806 return this.EOF; 807 } else { 808 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { 809 text: "", 810 token: null, 811 line: this.yylineno 812 }); 813 } 814 }, 815 816// return next match that has a token 817lex:function lex() { 818 var r = this.next(); 819 if (r) { 820 return r; 821 } else { 822 return this.lex(); 823 } 824 }, 825 826// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) 827begin:function begin(condition) { 828 this.conditionStack.push(condition); 829 }, 830 831// pop the previously active lexer condition state off the condition stack 832popState:function popState() { 833 var n = this.conditionStack.length - 1; 834 if (n > 0) { 835 return this.conditionStack.pop(); 836 } else { 837 return this.conditionStack[0]; 838 } 839 }, 840 841// produce the lexer rule set which is active for the currently active lexer condition state 842_currentRules:function _currentRules() { 843 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { 844 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
845 } else { 846 return this.conditions["INITIAL"].rules; 847 } 848 }, 849 850// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available 851topState:function topState(n) { 852 n = this.conditionStack.length - 1 - Math.abs(n || 0); 853 if (n >= 0) { 854 return this.conditionStack[n]; 855 } else { 856 return "INITIAL"; 857 } 858 }, 859 860// alias for begin(condition) 861pushState:function pushState(condition) { 862 this.begin(condition); 863 }, 864 865// return the number of states currently on the stack 866stateStackSize:function stateStackSize() { 867 return this.conditionStack.length; 868 }, 869options: {}, 870performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { 871var YYSTATE=YY_START; 872switch($avoiding_name_collisions) { 873case 0:/* skip whitespace */ 874break; 875case 1:return 10; 876break; 877case 2:return 10; 878break; 879case 3:return 23; 880break; 881case 4:return 7; 882break; 883case 5:return 8; 884break; 885case 6:return 26; 886break; 887case 7:return 26; 888break; 889case 8:return 26; 890break; 891case 9:return 28; 892break; 893case 10:return 23; 894break; 895case 11:return 32; 896break; 897case 12:return 32; 898break; 899case 13:return 34; 900break; 901case 14:/* skip whitespace */ 902break; 903case 15:return 11; 904break; 905case 16:return ' '; 906break; 907case 17:return 33; 908break; 909case 18:return 27; 910break; 911case 19:return 29; 912break; 913case 20:return 30; 914break; 915case 21:return 20; 916break; 917case 22:return 21; 918break; 919case 23:return 19; 920break; 921case 24:return 13; 922break; 923case 25:return 22; 924break; 925case 26:return 14; 926break; 927case 27:return 15; 928break; 929case 28:return 36; 930break; 931case 29:return 38; 932break; 933case 30:return 17; 934break; 935case 31:return 16; 936break; 937case 32:return 18; 938break; 939case 33:return '"'; 940break; 941case 34:return "'"; 942break; 943case 35:return "!"; 944break; 945case 36:return 12; 946break; 947case 37:return 35; 948break; 949case 38:return 39; 950break; 951case 39:return 5; 952break; 953} 954}, 955rules: [/^(?:\s+)/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:[A-Za-z]{1,}[A-Za-z_0-9]+(?=[(]))/,/^(?:([0]?[1-9]|1[0-2])[:][0-5][0-9]([:][0-5][0-9])?[ ]?(AM|am|aM|Am|PM|pm|pM|Pm))/,/^(?:([0]?[0-9]|1[0-9]|2[0-3])[:][0-5][0-9]([:][0-5][0-9])?)/,/^(?:\$[A-Za-z]+\$[0-9]+)/,/^(?:\$[A-Za-z]+[0-9]+)/,/^(?:[A-Za-z]+\$[0-9]+)/,/^(?:[A-Za-z]+[0-9]+)/,/^(?:[A-Za-z]+(?=[(]))/,/^(?:[A-Za-z]{1,}[A-Za-z_0-9]+)/,/^(?:[A-Za-z_]+)/,/^(?:[0-9]+)/,/^(?:\$)/,/^(?:&)/,/^(?: )/,/^(?:[.])/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\/)/,/^(?:-)/,/^(?:\+)/,/^(?:\^)/,/^(?:\()/,/^(?:\))/,/^(?:\{)/,/^(?:\})/,/^(?:\s*@MORE@)/,/^(?:\s*@LESS@)/,/^(?:NOT\b)/,/^(?:")/,/^(?:')/,/^(?:!)/,/^(?:=)/,/^(?:%)/,/^(?:[#])/,/^(?:$)/], 956conditions: {"INITIAL":{"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,37,38,39],"inclusive":true}} 957}); 958return lexer; 959})(); 960parser.lexer = lexer; 961function Parser () { 962 this.yy = {}; 963} 964Parser.prototype = parser;parser.Parser = Parser; 965return new Parser; 966})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.