1 /* parser generated by jison 0.4.6 */
  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 */
 74 var parser = (function(){
 75 var parser = {trace: function (){},
 76 yy: {},
 77 symbols_: {"error":2,"Program":3,"NexcelProgram":4,"ExcelProgram":5,"Clause":6,"OR":7,"EOF":8,"ConstrOp":9,"NexcelRTProgram":10,"Fact":11,"IF":12,"Body":13,"NOT":14,"AND":15,"ConstrRel":16,"Variables":17,"Variable":18,"STRING_CONST":19,"RANGE_NAME":20,"(":21,")":22,">":23,"<":24,"<=":25,">=":26,"=":27,"!=":28,"+":29,"-":30,"*":31,"/":32,"^":33,"NUMBER":34,"FLOAT":35,"CELL":36,"ABS_CELL":37,"SHEET_CELL":38,"RANGE_CELL":39,"Exps":40,"[":41,"]":42,"$accept":0,"$end":1},
 78 terminals_: {2:"error",7:"OR",8:"EOF",12:"IF",14:"NOT",15:"AND",18:"Variable",19:"STRING_CONST",20:"RANGE_NAME",21:"(",22:")",23:">",24:"<",25:"<=",26:">=",27:"=",28:"!=",29:"+",30:"-",31:"*",32:"/",33:"^",34:"NUMBER",35:"FLOAT",36:"CELL",37:"ABS_CELL",38:"SHEET_CELL",39:"RANGE_CELL",41:"[",42:"]"},
 79 productions_: [0,[3,1],[3,1],[4,3],[4,3],[5,3],[10,2],[10,3],[6,1],[6,3],[13,1],[13,2],[13,4],[13,3],[13,3],[13,1],[17,3],[17,1],[17,1],[11,4],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[9,3],[9,3],[9,3],[9,3],[9,3],[9,2],[9,3],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,4],[9,1],[9,3],[40,1],[40,3]],
 80 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */
 81 /**/) {
 82 /* this == yyval */
 83 
 84 var $0 = $$.length - 1;
 85 switch (yystate) {
 86 case 3: programs = appendProgramToArray($$[$0-2], ProgramType.NEXCEL, programs);  	console.log('<--------Nexcel Program Clause OR Program --------------->\n'+programs); 
 87 break;
 88 case 4: programs = appendProgramToArray($$[$0-2], ProgramType.NEXCEL, programs);  	console.log('<--------Nexcel Program Clause OR EOF --------------->\n'+programs); 
 89 break;
 90 case 5: programs = appendProgramToArray($$[$0-2],ProgramType.EXCEL, programs);		console.log('<--------Excel Program ConstrOp OR EOF --------------->\n'+programs); 
 91 break;
 92 case 6: this.$ = appendProgramToArray($$[$0-1], ProgramType.NEXCEL, []);		  		console.log('<--------Nexcel RT Program [ Clause OR ] --------------->\n'+$$[$0-1].toString()); 
 93 break;
 94 case 7: this.$ = appendProgramToArray($$[$0-2], ProgramType.NEXCEL, $$[$0]);				console.log('<--------Nexcel RT Program [ Clause OR NexcelRTProgram ] --------------->\n'+([$$[$0-2]].concat($$[$0])).join('.\n')); 
 95 break;
 96 case 8: this.$ = clauseNoBody($$[$0]);		console.log('Clause - Fact' +$$[$0]); 	
 97 break;
 98 case 9: this.$ = clauseWithBody($$[$0-2], $$[$0]);	console.log('Clause FACT IF BODY '+ $$[$0-2] + 'IF '+$$[$0]); 	
 99 break;
100 case 10: this.$ = [$$[$0]];			console.log('Body FACT '); 				
101 break;
102 case 11: $$[$0].negate(); this.$ = [$$[$0]];				console.log('Body NOT FACT '+$$[$0].toString()); 				
103 break;
104 case 12: $$[$0-2].negate(); this.$ = [$$[$0-2]].concat($$[$0]);	console.log('Body NOT FACT......'+$$[$0-2].toString()+'--COMMA--'+$$[$0].toString());	
105 break;
106 case 13: this.$ = [$$[$0-2]].concat($$[$0]);	console.log('Body FACT AND Body :'+$$[$0-2].toString()+'--COMMA--'+$$[$0].toString()); 		
107 break;
108 case 14: this.$ = [$$[$0-2]].concat($$[$0]);	console.log('Body Constr AND BODY :'+$$[$0-2].toString()+'--COMMA--'+$$[$0].toString()); 	
109 break;
110 case 15: this.$ = [$$[$0]];			console.log('Body Constr' +$$[$0].toString()); 			
111 break;
112 case 16: this.$ = [$$[$0-2]].concat($$[$0]); 	console.log('Variables:- Variable AND Variables'); 		
113 break;
114 case 17: this.$ = [$$[$0]]; 				console.log('Variables:- Variable '); 					
115 break;
116 case 18: this.$ = [$$[$0]]; 				console.log('Variables:- Variable '); 					
117 break;
118 case 19: this.$ = createFact($$[$0-3],$$[$0-1]);	console.log('Fact  = RANGE_NAME( Variables )'+this.$.toString()); 	
119 break;
120 case 20:  this.$ = setBinRelDetails($$[$0-1],$$[$0-2],$$[$0]); 	console.log('ConstrRel :- ConstrOp-Exp BIN_REL > ConstrOp-Exp '); 
121 break;
122 case 21:  this.$ = setBinRelDetails($$[$0-1],$$[$0-2],$$[$0]); 	console.log('ConstrRel :- ConstrOp-Exp BIN_REL < ConstrOp-Exp '); 
123 break;
124 case 22:  this.$ = setBinRelDetails($$[$0-1],$$[$0-2],$$[$0]); 	console.log('ConstrRel :- ConstrOp-Exp BIN_REL <= ConstrOp-Exp '); 
125 break;
126 case 23:  this.$ = setBinRelDetails($$[$0-1],$$[$0-2],$$[$0]); 	console.log('ConstrRel :- ConstrOp-Exp BIN_REL >= ConstrOp-Exp '); 
127 break;
128 case 24:  this.$ = setBinRelDetails($$[$0-1],$$[$0-2],$$[$0]); 	console.log('ConstrRel :- ConstrOp-Exp BIN_REL = ConstrOp-Exp '); 
129 break;
130 case 25:  this.$ = setBinRelDetails($$[$0-1],$$[$0-2],$$[$0]); 	console.log('ConstrRel :- ConstrOp-Exp BIN_REL != ConstrOp-Exp '); 
131 break;
132 case 26: this.$ = createBinOpDetails($$[$0-1],$$[$0-2],$$[$0]);
133 break;
134 case 27: this.$ = createBinOpDetails($$[$0-1],$$[$0-2],$$[$0]);
135 break;
136 case 28: this.$ = createBinOpDetails($$[$0-1],$$[$0-2],$$[$0]);
137 break;
138 case 29: this.$ = createBinOpDetails($$[$0-1],$$[$0-2],$$[$0]);
139 break;
140 case 30: this.$ = createBinOpDetails($$[$0-1],$$[$0-2],$$[$0]);
141 break;
142 case 31: this.$ = createUnaryMinus($$[$0]);
143 break;
144 case 32: this.$ = $$[$0-1].setBracket();
145 break;
146 case 33: this.$ = new TREEObjects.CONSTANT(ObjectType.CONSTANT_VAL, $$[$0]);	console.log('CONSTR-OP - Constant:- NUMBER	'); 	
147 break;
148 case 34: this.$ = new TREEObjects.CONSTANT(ObjectType.CONSTANT_VAL, $$[$0]);	console.log('CONSTR-OP - Constant:- FLOAT	'); 	
149 break;
150 case 35: this.$ = new TREEObjects.CONSTANT(ObjectType.CONSTANT_NAM, $$[$0].split('\"')[1]);	console.log('CONSTR-OP:- Constant:- STRING	'); 	
151 break;
152 case 36: this.$ = new TREEObjects.EXPRESSION(ObjectType.EXP_CELL, $$[$0]);				console.log('CONSTR-OP:-	CELL '+$$[$0]); 		
153 break;
154 case 37: this.$ = new TREEObjects.EXPRESSION(ObjectType.EXP_ABS_CELL, $$[$0]);				console.log('CONSTR-OP:-	ABS_CELL '+$$[$0]); 		
155 break;
156 case 38: this.$ = new TREEObjects.EXPRESSION(ObjectType.EXP_SHEET_CELL, $$[$0]);		console.log('CONSTR-OP:-	SHEET_CELL '+$$[$0]); 		
157 break;
158 case 39: this.$ = new TREEObjects.EXPRESSION(ObjectType.EXP_RANGE_NAME, $$[$0]);	console.log('CONSTR-OP:-	Range '+$$[$0]); 		
159 break;
160 case 40: this.$ = new TREEObjects.EXPRESSION(ObjectType.EXP_RANGE_CELL, $$[$0]);	console.log('CONSTR-OP:-	Range '+$$[$0]); 		
161 break;
162 case 41: this.$ = new TREEObjects.EXPRESSION(ObjectType.EXP_OP, $$[$0-3], $$[$0-1]);	console.log('CONSTR-OP:- [FUNTION CALL]	Variable ( Exps ) '+$$[$0-3]+'('+$$[$0-1]+')'); 		
163 break;
164 case 42: this.$ = new TREEObjects.EXPRESSION(ObjectType.EXP_VAR, $$[$0]);		console.log('CONSTR-OP:-	Variable '+$$[$0]); 	
165 break;
166 case 43: this.$ = new TREEObjects.NEXCEL_RT_PROGRAM($$[$0-1]);					console.log('New Runtime Programs :'+$$[$0-1].join());
167 break;
168 case 44: this.$ = [$$[$0]];						console.log('Exps:-	Exp		'); 			
169 break;
170 case 45: this.$ = [$$[$0-2]].concat($$[$0]);				console.log('Exps:-	Exp	AND Exps	'); 	
171 break;
172 }
173 },
174 table: [{3:1,4:2,5:3,6:4,9:5,11:6,18:[1,17],19:[1,11],20:[1,15],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],41:[1,18]},{1:[3]},{1:[2,1]},{1:[2,2]},{7:[1,19]},{7:[1,20],29:[1,21],30:[1,22],31:[1,23],32:[1,24],33:[1,25]},{7:[2,8],12:[1,26]},{9:27,18:[1,17],19:[1,11],20:[1,28],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],41:[1,18]},{9:29,18:[1,17],19:[1,11],20:[1,28],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],41:[1,18]},{7:[2,33],15:[2,33],22:[2,33],23:[2,33],24:[2,33],25:[2,33],26:[2,33],27:[2,33],28:[2,33],29:[2,33],30:[2,33],31:[2,33],32:[2,33],33:[2,33]},{7:[2,34],15:[2,34],22:[2,34],23:[2,34],24:[2,34],25:[2,34],26:[2,34],27:[2,34],28:[2,34],29:[2,34],30:[2,34],31:[2,34],32:[2,34],33:[2,34]},{7:[2,35],15:[2,35],22:[2,35],23:[2,35],24:[2,35],25:[2,35],26:[2,35],27:[2,35],28:[2,35],29:[2,35],30:[2,35],31:[2,35],32:[2,35],33:[2,35]},{7:[2,36],15:[2,36],22:[2,36],23:[2,36],24:[2,36],25:[2,36],26:[2,36],27:[2,36],28:[2,36],29:[2,36],30:[2,36],31:[2,36],32:[2,36],33:[2,36]},{7:[2,37],15:[2,37],22:[2,37],23:[2,37],24:[2,37],25:[2,37],26:[2,37],27:[2,37],28:[2,37],29:[2,37],30:[2,37],31:[2,37],32:[2,37],33:[2,37]},{7:[2,38],15:[2,38],22:[2,38],23:[2,38],24:[2,38],25:[2,38],26:[2,38],27:[2,38],28:[2,38],29:[2,38],30:[2,38],31:[2,38],32:[2,38],33:[2,38]},{7:[2,39],21:[1,30],23:[2,39],24:[2,39],25:[2,39],26:[2,39],27:[2,39],28:[2,39],29:[2,39],30:[2,39],31:[2,39],32:[2,39],33:[2,39]},{7:[2,40],15:[2,40],22:[2,40],23:[2,40],24:[2,40],25:[2,40],26:[2,40],27:[2,40],28:[2,40],29:[2,40],30:[2,40],31:[2,40],32:[2,40],33:[2,40]},{7:[2,42],15:[2,42],21:[1,31],22:[2,42],23:[2,42],24:[2,42],25:[2,42],26:[2,42],27:[2,42],28:[2,42],29:[2,42],30:[2,42],31:[2,42],32:[2,42],33:[2,42]},{6:33,10:32,11:6,20:[1,34]},{4:35,6:4,8:[1,36],11:6,20:[1,34]},{8:[1,37]},{9:38,18:[1,17],19:[1,11],20:[1,28],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],41:[1,18]},{9:39,18:[1,17],19:[1,11],20:[1,28],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],41:[1,18]},{9:40,18:[1,17],19:[1,11],20:[1,28],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],41:[1,18]},{9:41,18:[1,17],19:[1,11],20:[1,28],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],41:[1,18]},{9:42,18:[1,17],19:[1,11],20:[1,28],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],41:[1,18]},{9:47,11:44,13:43,14:[1,45],16:46,18:[1,17],19:[1,11],20:[1,15],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],41:[1,18]},{7:[2,31],15:[2,31],22:[2,31],23:[2,31],24:[2,31],25:[2,31],26:[2,31],27:[2,31],28:[2,31],29:[2,31],30:[2,31],31:[2,31],32:[2,31],33:[2,31]},{7:[2,39],15:[2,39],22:[2,39],23:[2,39],24:[2,39],25:[2,39],26:[2,39],27:[2,39],28:[2,39],29:[2,39],30:[2,39],31:[2,39],32:[2,39],33:[2,39]},{22:[1,48],29:[1,21],30:[1,22],31:[1,23],32:[1,24],33:[1,25]},{17:49,18:[1,50],19:[1,51]},{9:53,18:[1,17],19:[1,11],20:[1,28],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],40:52,41:[1,18]},{42:[1,54]},{7:[1,55]},{21:[1,30]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{7:[2,26],15:[2,26],22:[2,26],23:[2,26],24:[2,26],25:[2,26],26:[2,26],27:[2,26],28:[2,26],29:[2,26],30:[2,26],31:[1,23],32:[1,24],33:[1,25]},{7:[2,27],15:[2,27],22:[2,27],23:[2,27],24:[2,27],25:[2,27],26:[2,27],27:[2,27],28:[2,27],29:[2,27],30:[2,27],31:[1,23],32:[1,24],33:[1,25]},{7:[2,28],15:[2,28],22:[2,28],23:[2,28],24:[2,28],25:[2,28],26:[2,28],27:[2,28],28:[2,28],29:[2,28],30:[2,28],31:[2,28],32:[2,28],33:[1,25]},{7:[2,29],15:[2,29],22:[2,29],23:[2,29],24:[2,29],25:[2,29],26:[2,29],27:[2,29],28:[2,29],29:[2,29],30:[2,29],31:[2,29],32:[2,29],33:[1,25]},{7:[2,30],15:[2,30],22:[2,30],23:[2,30],24:[2,30],25:[2,30],26:[2,30],27:[2,30],28:[2,30],29:[2,30],30:[2,30],31:[2,30],32:[2,30],33:[2,30]},{7:[2,9]},{7:[2,10],15:[1,56]},{11:57,20:[1,34]},{7:[2,15],15:[1,58]},{23:[1,59],24:[1,60],25:[1,61],26:[1,62],27:[1,63],28:[1,64],29:[1,21],30:[1,22],31:[1,23],32:[1,24],33:[1,25]},{7:[2,32],15:[2,32],22:[2,32],23:[2,32],24:[2,32],25:[2,32],26:[2,32],27:[2,32],28:[2,32],29:[2,32],30:[2,32],31:[2,32],32:[2,32],33:[2,32]},{22:[1,65]},{15:[1,66],22:[2,17]},{22:[2,18]},{22:[1,67]},{15:[1,68],22:[2,44],29:[1,21],30:[1,22],31:[1,23],32:[1,24],33:[1,25]},{7:[2,43],15:[2,43],22:[2,43],23:[2,43],24:[2,43],25:[2,43],26:[2,43],27:[2,43],28:[2,43],29:[2,43],30:[2,43],31:[2,43],32:[2,43],33:[2,43]},{6:33,10:69,11:6,20:[1,34],42:[2,6]},{9:47,11:44,13:70,14:[1,45],16:46,18:[1,17],19:[1,11],20:[1,15],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],41:[1,18]},{7:[2,11],15:[1,71]},{9:47,11:44,13:72,14:[1,45],16:46,18:[1,17],19:[1,11],20:[1,15],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],41:[1,18]},{9:73,18:[1,17],19:[1,11],20:[1,28],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],41:[1,18]},{9:74,18:[1,17],19:[1,11],20:[1,28],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],41:[1,18]},{9:75,18:[1,17],19:[1,11],20:[1,28],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],41:[1,18]},{9:76,18:[1,17],19:[1,11],20:[1,28],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],41:[1,18]},{9:77,18:[1,17],19:[1,11],20:[1,28],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],41:[1,18]},{9:78,18:[1,17],19:[1,11],20:[1,28],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],41:[1,18]},{7:[2,19],12:[2,19],15:[2,19]},{17:79,18:[1,50],19:[1,51]},{7:[2,41],15:[2,41],22:[2,41],23:[2,41],24:[2,41],25:[2,41],26:[2,41],27:[2,41],28:[2,41],29:[2,41],30:[2,41],31:[2,41],32:[2,41],33:[2,41]},{9:53,18:[1,17],19:[1,11],20:[1,28],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],40:80,41:[1,18]},{42:[2,7]},{7:[2,13]},{9:47,11:44,13:81,14:[1,45],16:46,18:[1,17],19:[1,11],20:[1,15],21:[1,8],30:[1,7],34:[1,9],35:[1,10],36:[1,12],37:[1,13],38:[1,14],39:[1,16],41:[1,18]},{7:[2,14]},{7:[2,20],15:[2,20],29:[1,21],30:[1,22],31:[1,23],32:[1,24],33:[1,25]},{7:[2,21],15:[2,21],29:[1,21],30:[1,22],31:[1,23],32:[1,24],33:[1,25]},{7:[2,22],15:[2,22],29:[1,21],30:[1,22],31:[1,23],32:[1,24],33:[1,25]},{7:[2,23],15:[2,23],29:[1,21],30:[1,22],31:[1,23],32:[1,24],33:[1,25]},{7:[2,24],15:[2,24],29:[1,21],30:[1,22],31:[1,23],32:[1,24],33:[1,25]},{7:[2,25],15:[2,25],29:[1,21],30:[1,22],31:[1,23],32:[1,24],33:[1,25]},{22:[2,16]},{22:[2,45]},{7:[2,12]}],
175 defaultActions: {2:[2,1],3:[2,2],35:[2,3],36:[2,4],37:[2,5],43:[2,9],51:[2,18],69:[2,7],70:[2,13],72:[2,14],79:[2,16],80:[2,45],81:[2,12]},
176 parseError: function O(e,t){if(!t.recoverable)throw new Error(e);this.trace(e)},
177 parse: function (t){function v(e){r.length=r.length-2*e,i.length=i.length-e,s.length=s.length-e}function m(){var e;return e=n.lexer.lex()||h,typeof e!="number"&&(e=n.symbols_[e]||e),e}var n=this,r=[0],i=[null],s=[],o=this.table,u="",a=0,f=0,l=0,c=2,h=1;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={});var p=this.lexer.yylloc;s.push(p);var d=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"?this.parseError=this.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;var g,y,b,w,E,S,x={},T,N,C,k;for(;;){b=r[r.length-1];if(this.defaultActions[b])w=this.defaultActions[b];else{if(g===null||typeof g=="undefined")g=m();w=o[b]&&o[b][g]}if(typeof w=="undefined"||!w.length||!w[0]){var L,A="";function O(e){var t=r.length-1,n=0;for(;;){if(c.toString()in o[e])return n;if(e===0||t<2)return!1;t-=2,e=r[t],++n}}if(!l){L=O(b),k=[];for(T in o[b])this.terminals_[T]&&T>c&&k.push("'"+this.terminals_[T]+"'");this.lexer.showPosition?A="Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[g]||g)+"'":A="Parse error on line "+(a+1)+": Unexpected "+(g==h?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(A,{text:this.lexer.match,token:this.terminals_[g]||g,line:this.lexer.yylineno,loc:p,expected:k,recoverable:L!==!1})}else y!==h&&(L=O(b));if(l==3){if(g===h||y===h)throw new Error(A||"Parsing halted while starting to recover from another error.");f=this.lexer.yyleng,u=this.lexer.yytext,a=this.lexer.yylineno,p=this.lexer.yylloc,g=m()}if(L===!1)throw new Error(A||"Parsing halted. No suitable error recovery rule available.");v(L),y=g==c?null:g,g=c,b=r[r.length-1],w=o[b]&&o[b][c],l=3}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+g);switch(w[0]){case 1:r.push(g),i.push(this.lexer.yytext),s.push(this.lexer.yylloc),r.push(w[1]),g=null,y?(g=y,y=null):(f=this.lexer.yyleng,u=this.lexer.yytext,a=this.lexer.yylineno,p=this.lexer.yylloc,l>0&&l--);break;case 2:N=this.productions_[w[1]][1],x.$=i[i.length-N],x._$={first_line:s[s.length-(N||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(N||1)].first_column,last_column:s[s.length-1].last_column},d&&(x._$.range=[s[s.length-(N||1)].range[0],s[s.length-1].range[1]]),S=this.performAction.call(x,u,f,a,this.yy,w[1],i,s);if(typeof S!="undefined")return S;N&&(r=r.slice(0,-1*N*2),i=i.slice(0,-1*N),s=s.slice(0,-1*N)),r.push(this.productions_[w[1]][0]),i.push(x.$),s.push(x._$),C=o[r[r.length-2]][r[r.length-1]],r.push(C);break;case 3:return!0}}return!0}};
178 
179 
180 define(function(){
181 	/**
182 	 * @description The parser class, It parses the entire expression
183 	 * @name Jison_Parser
184 	 * @class Jison_Parser
185 	 * @example require('Jison_Parser') or it is available with a parser variable Globally 
186 	 * @exports parser
187 	 * @version 1.0
188 	 * @module Parser
189 	 **/
190 	parsingStack=require('Collections').Stack();
191 return parser;
192 });/* generated by jison-lex 0.2.0 */
193 var lexer = (function(){
194 var lexer = {
195 
196 EOF:1,
197 
198 parseError:function (t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},
199 
200 // resets the lexer, sets new input
201 setInput:function (e){return this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},
202 
203 // consumes and returns one char from the input
204 input:function (){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var t=e.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},
205 
206 // unshifts one char (or a string) into the input
207 unput:function (e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},
208 
209 // When called from action, caches matched text and appends it on next action
210 more:function (){return this._more=!0,this},
211 
212 // 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.
213 reject:function (){return this.options.backtrack_lexer?(this._backtrack=!0,this):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(),{text:"",token:null,line:this.yylineno})},
214 
215 // retain first n characters of the match
216 less:function (e){this.unput(this.match.slice(e))},
217 
218 // displays already matched input, i.e. for error messages
219 pastInput:function (){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},
220 
221 // displays upcoming input, i.e. for error messages
222 upcomingInput:function (){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},
223 
224 // displays the character position where the lexing error occurred, i.e. for error messages
225 showPosition:function (){var e=this.pastInput(),t=(new Array(e.length+1)).join("-");return e+this.upcomingInput()+"\n"+t+"^"},
226 
227 // test the lexed token: return FALSE when not a match, otherwise return token
228 test_match:function (e,t){var n,r,i;this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1);if(n)return this.options.backtrack_lexer&&delete i,n;if(this._backtrack){for(var s in i)this[s]=i[s];return!1}return this.options.backtrack_lexer&&delete i,!1},
229 
230 // return next match in input
231 next:function (){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext="",this.match="");var i=this._currentRules();for(var s=0;s<i.length;s++){n=this._input.match(this.rules[i[s]]);if(n&&(!t||n[0].length>t[0].length)){t=n,r=s;if(this.options.backtrack_lexer){e=this.test_match(n,i[s]);if(e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}}return t?(e=this.test_match(t,i[r]),e!==!1?e:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},
232 
233 // return next match that has a token
234 lex:function (){var t=this.next();return t?t:this.lex()},
235 
236 // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
237 begin:function (t){this.conditionStack.push(t)},
238 
239 // pop the previously active lexer condition state off the condition stack
240 popState:function (){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},
241 
242 // produce the lexer rule set which is active for the currently active lexer condition state
243 _currentRules:function (){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},
244 
245 // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
246 topState:function (t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},
247 
248 // alias for begin(condition)
249 pushState:function (t){this.begin(t)},
250 
251 // return the number of states currently on the stack
252 stateStackSize:function (){return this.conditionStack.length},
253 options: {},
254 performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START
255 /**/) {
256 
257 var YYSTATE=YY_START;
258 switch($avoiding_name_collisions) {
259 case 0:/* skip whitespace */
260 break;
261 case 1: console.log('Found IF '); 		parsingStack.push(":-"); 	return "IF"; 	
262 break;
263 case 2: console.log('Found COMMA '); 		parsingStack.push(","); 	return "AND"; 	
264 break;
265 case 3: console.log('Found LPAREN '); 	parsingStack.push("(");		return "("; 	
266 break;
267 case 4: console.log('Found RPAREN '); 	parsingStack.push(")"); 	return ")"; 	
268 break;
269 case 5: console.log('Found L-SQUARE '); 	parsingStack.push("[");		return "["; 	
270 break;
271 case 6: console.log('Found R-SQUARE '); 	parsingStack.push("]");		return "]"; 	
272 break;
273 case 7: console.log('Found DOT----');		parsingStack.push(".");		return "OR";	
274 break;
275 case 8: console.log('Found RANGE ---1--- CELL:CELL '); parsingStack.push(yy_.yytext);		return "RANGE_CELL";	
276 break;
277 case 9: console.log('Found RANGE ---2--- CELL:CELL '); parsingStack.push(yy_.yytext);		return "RANGE_CELL";	
278 break;
279 case 10: console.log('Found RANGE ---3--- CELL:CELL '); parsingStack.push(yy_.yytext);	 	return "RANGE_CELL";	
280 break;
281 case 11: console.log('Found RANGE ---4--- CELL:CELL '); parsingStack.push(yy_.yytext);		return "RANGE_CELL";	
282 break;
283 case 12: console.log('Found RANGE ---5--- CELL:CELL '); parsingStack.push(yy_.yytext);		return "RANGE_CELL";	
284 break;
285 case 13: console.log('Found RANGE ---6--- CELL:CELL '); parsingStack.push(yy_.yytext);		return "RANGE_CELL";	
286 break;
287 case 14: console.log('Found RANGE ---7--- CELL:CELL '); parsingStack.push(yy_.yytext);		return "RANGE_CELL";	
288 break;
289 case 15: console.log('Found RANGE ---8--- CELL:CELL '); parsingStack.push(yy_.yytext);		return "RANGE_CELL";	
290 break;
291 case 16: console.log('Found RANGE ---9--- CELL:CELL '); parsingStack.push(yy_.yytext);		return "RANGE_CELL";	
292 break;
293 case 17: console.log('Found RANGE ---10-- CELL:CELL '); parsingStack.push(yy_.yytext);		return "RANGE_CELL";	
294 break;
295 case 18: console.log('Found RANGE ---11-- CELL:CELL '); parsingStack.push(yy_.yytext);		return "RANGE_CELL";	
296 break;
297 case 19: console.log('Found RANGE ---12-- CELL:CELL '); parsingStack.push(yy_.yytext);		return "RANGE_CELL";	
298 break;
299 case 20: console.log('Found RANGE ---13-- CELL:CELL '); parsingStack.push(yy_.yytext);		return "RANGE_CELL";	
300 break;
301 case 21: console.log('Found RANGE ---14-- CELL:CELL '); parsingStack.push(yy_.yytext);		return "RANGE_CELL";	
302 break;
303 case 22: console.log('Found RANGE ---15-- CELL:CELL '); parsingStack.push(yy_.yytext);		return "RANGE_CELL";	
304 break;
305 case 23: console.log('Found RANGE ---16-- CELL:CELL '); parsingStack.push(yy_.yytext);		return "RANGE_CELL";	
306 break;
307 case 24: console.log('Found SHEET CELL Ex:SHEET1!A10  :'+yy_.yytext); 		parsingStack.push(yy_.yytext);		return "SHEET_CELL";	
308 break;
309 case 25: console.log('Found SHEET CELL Ex:<SHEET1!A10>  :'+yy_.yytext); 	parsingStack.push(yy_.yytext);		return "SHEET_CELL";	
310 break;
311 case 26: console.log('Found SHEET CELL Ex:<SHEET1!A10>  :'+yy_.yytext); 	parsingStack.push(yy_.yytext);		return "SHEET_CELL";	
312 break;
313 case 27: console.log('Found SHEET CELL Ex:<SHEET1!A10>  :'+yy_.yytext); 	parsingStack.push(yy_.yytext);		return "SHEET_CELL";	
314 break;
315 case 28: console.log('Found SHEET CELL Ex:<SHEET1!A10>  :'+yy_.yytext); 	parsingStack.push(yy_.yytext);		return "SHEET_CELL";	
316 break;
317 case 29: console.log('Found NOT'); 						parsingStack.push(yy_.yytext);	return "NOT"				
318 break;
319 case 30: console.log('Found RANGE_NAME :'+yy_.yytext); 		parsingStack.push(yy_.yytext);	return "RANGE_NAME";	
320 break;
321 case 31: console.log('Found CELL Ex:A10  :'+yy_.yytext); 		parsingStack.push(yy_.yytext);	return "CELL";	
322 break;
323 case 32: console.log('Found CELL Ex:$A$10  :'+yy_.yytext); 	parsingStack.push(yy_.yytext);	return "ABS_CELL";	
324 break;
325 case 33: console.log('Found Variable :'+yy_.yytext);			parsingStack.push(yy_.yytext);	return "Variable";	
326 break;
327 case 34: console.log('Found FLOAT  :'+yy_.yytext); 			parsingStack.push(yy_.yytext);	return "FLOAT";	
328 break;
329 case 35: console.log('Found NUMBER  :'+yy_.yytext); 			parsingStack.push(yy_.yytext);	return "NUMBER";	
330 break;
331 case 36: console.log('Found STRING CONSTANT :'+yy_.yytext); 	parsingStack.push(yy_.yytext);	return "STRING_CONST";	
332 break;
333 case 37:parsingStack.push(yy_.yytext);	return 31
334 break;
335 case 38:parsingStack.push(yy_.yytext);	return 32
336 break;
337 case 39:parsingStack.push(yy_.yytext);	return 30
338 break;
339 case 40:parsingStack.push(yy_.yytext);	return 29
340 break;
341 case 41:parsingStack.push(yy_.yytext);	return 33
342 break;
343 case 42: parsingStack.push(yy_.yytext);	console.log('Found EQUAL == '); return "==";	
344 break;
345 case 43: parsingStack.push(yy_.yytext);	console.log('Found LESS_THAN_EQUAL '); return "<="; 
346 break;
347 case 44: parsingStack.push(yy_.yytext);	console.log('Found GREATER_THAN_EQUAL '); return ">="; 
348 break;
349 case 45: parsingStack.push(yy_.yytext);	console.log('Found GREATER_THAN '); return ">"; 
350 break;
351 case 46: parsingStack.push(yy_.yytext);	debugger;console.log('Found LESS_THAN '); return "<"; 
352 break;
353 case 47: parsingStack.push(yy_.yytext);	console.log('Found EQUAL '); return "="; 
354 break;
355 case 48: parsingStack.push(yy_.yytext);	console.log('Found NOT EQUAL '); return "!="; 
356 break;
357 case 49:return 8
358 break;
359 }
360 },
361 rules: [/^(?:\s+)/,/^(?::-)/,/^(?:,)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\.)/,/^(?:([A-Za-z0-9 ]+!)?( )*\$?[A-Z]+\$?[1-9][0-9]*(:\$?[A-Z]+\$?[1-9][0-9]*){1}?)/,/^(?:([A-Za-z0-9 ]+!)?( )*\$?[A-Z]+\$?[1-9][0-9]*(:\$?_\$?[1-9][0-9]*){1}?)/,/^(?:([A-Za-z0-9 ]+!)?( )*\$?[A-Z]+\$?[1-9][0-9]*(:\$?[A-Z]+\$?_){1}?)/,/^(?:([A-Za-z0-9 ]+!)?( )*\$?[A-Z]+\$?[1-9][0-9]*(:\$?_\$?_){1}?)/,/^(?:([A-Za-z0-9 ]+!)?( )*\$?_\$?[1-9][0-9]*(:\$?[A-Z]+\$?[1-9][0-9]*){1}?)/,/^(?:([A-Za-z0-9 ]+!)?( )*\$?_\$?[1-9][0-9]*(:\$?_\$?[1-9][0-9]*){1}?)/,/^(?:([A-Za-z0-9 ]+!)?( )*\$?_\$?[1-9][0-9]*(:\$?[A-Z]+\$?_){1}?)/,/^(?:([A-Za-z0-9 ]+!)?( )*\$?_\$?[1-9][0-9]*(:\$?_\$?_){1}?)/,/^(?:([A-Za-z0-9 ]+!)?( )*\$?[A-Z]+(\$?_:\$?[A-Z]+\$?[1-9][0-9]*){1}?)/,/^(?:([A-Za-z0-9 ]+!)?( )*\$?[A-Z]+(\$?_:\$?_\$?[1-9][0-9]*){1}?)/,/^(?:([A-Za-z0-9 ]+!)?( )*\$?[A-Z]+(\$?_:\$?[A-Z]+\$?_){1}?)/,/^(?:([A-Za-z0-9 ]+!)?( )*\$?[A-Z]+(\$?_:\$?_\$?_){1}?)/,/^(?:([A-Za-z0-9 ]+!)?( )*(\$?_\$?_:\$?[A-Z]+\$?[1-9][0-9]*){1}?)/,/^(?:([A-Za-z0-9 ]+!)?( )*(\$?_\$?_:\$?_\$?[1-9][0-9]*){1}?)/,/^(?:([A-Za-z0-9 ]+!)?( )*(\$?_\$?_:\$?[A-Z]+\$?_){1}?)/,/^(?:([A-Za-z0-9 ]+!)?( )*(\$?_\$?_:\$?_\$?_){1}?)/,/^(?:(([A-Za-z0-9 ]+!){1}?[A-Z]+[1-9][0-9]*){1}?)/,/^(?:(<([A-Za-z0-9 ]+!)?( )*\$?_\$?[1-9][0-9]*( )*>){1}?)/,/^(?:(<([A-Za-z0-9 ]+!)?( )*\$?[A-Z]+\$?_( )*>){1}?)/,/^(?:(<([A-Za-z0-9 ]+!)?( )*\$?_\$?_( )*>){1}?)/,/^(?:(<([A-Za-z0-9 ]+!)?( )*\$?[A-Z]+\$?[1-9][0-9]*( )*>){1}?)/,/^(?:NOT\b)/,/^(?:[a-z][a-zA-Z0-9_\']*)/,/^(?:[A-Z]+[1-9][0-9]*)/,/^(?:\$?[A-Z]+\$?[1-9][0-9]*)/,/^(?:[A-Z_][a-zA-Z0-9\'_]*)/,/^(?:[0-9]+(\.[0-9]+)?\b)/,/^(?:[0-9]+)/,/^(?:("[a-zA-Z0-9_ ]*"){1}?)/,/^(?:\*)/,/^(?:\/)/,/^(?:-)/,/^(?:\+)/,/^(?:\^)/,/^(?:==)/,/^(?:<=)/,/^(?:>=)/,/^(?:>)/,/^(?:<)/,/^(?:=)/,/^(?:!=)/,/^(?:$)/],
362 conditions: {"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,40,41,42,43,44,45,46,47,48,49],"inclusive":true}}
363 };
364 return lexer;
365 })();
366 parser.lexer = lexer;
367 function Parser () {
368   this.yy = {};
369 }
370 Parser.prototype = parser;parser.Parser = Parser;
371 return new Parser;
372 })();
373 
374 
375 if (typeof require !== 'undefined' && typeof exports !== 'undefined') {
376 exports.parser = parser;
377 exports.Parser = parser.Parser;
378 exports.parse = function () { return parser.parse.apply(parser, arguments); };
379 exports.main = function N(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=e("fs").readFileSync(e("path").normalize(r[1]),"utf8");return n.parser.parse(i)};
380 if (typeof module !== 'undefined' && require.main === module) {
381   exports.main(process.argv.slice(1));
382 }
383 }