1 /* parser generated by jison 0.4.17 */
3 Returns a Parser object of the following structure:
12 symbols_: {associative list: name ==> number},
13 terminals_: {associative list: number ==> name},
15 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
17 defaultActions: {...},
18 parseError: function(str, hash),
19 parse: function(input),
23 parseError: function(str, hash),
24 setInput: function(input),
29 pastInput: function(),
30 upcomingInput: function(),
31 showPosition: function(),
32 test_match: function(regex_match_array, rule_index),
35 begin: function(condition),
37 _currentRules: function(),
39 pushState: function(condition),
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)
47 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
49 conditions: {associative list: name ==> set},
54 token location info (@$, _$, etc.): {
59 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
63 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
65 token: (the produced terminal token, if any)
68 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
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)
74 var spdxparse = (function(){
75 var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,5],$V1=[1,6],$V2=[1,7],$V3=[1,4],$V4=[1,9],$V5=[1,10],$V6=[5,14,15,17],$V7=[5,12,14,15,17];
76 var parser = {trace: function trace() { },
78 symbols_: {"error":2,"start":3,"expression":4,"EOS":5,"simpleExpression":6,"LICENSE":7,"PLUS":8,"LICENSEREF":9,"DOCUMENTREF":10,"COLON":11,"WITH":12,"EXCEPTION":13,"AND":14,"OR":15,"OPEN":16,"CLOSE":17,"$accept":0,"$end":1},
79 terminals_: {2:"error",5:"EOS",7:"LICENSE",8:"PLUS",9:"LICENSEREF",10:"DOCUMENTREF",11:"COLON",12:"WITH",13:"EXCEPTION",14:"AND",15:"OR",16:"OPEN",17:"CLOSE"},
80 productions_: [0,[3,2],[6,1],[6,2],[6,1],[6,3],[4,1],[4,3],[4,3],[4,3],[4,3]],
81 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
84 var $0 = $$.length - 1;
87 return this.$ = $$[$0-1]
89 case 2: case 4: case 5:
90 this.$ = {license: yytext}
93 this.$ = {license: $$[$0-1], plus: true}
99 this.$ = {exception: $$[$0]}
100 this.$.license = $$[$0-2].license
101 if ($$[$0-2].hasOwnProperty('plus')) {
102 this.$.plus = $$[$0-2].plus
106 this.$ = {conjunction: 'and', left: $$[$0-2], right: $$[$0]}
109 this.$ = {conjunction: 'or', left: $$[$0-2], right: $$[$0]}
116 table: [{3:1,4:2,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{1:[3]},{5:[1,8],14:$V4,15:$V5},o($V6,[2,6],{12:[1,11]}),{4:12,6:3,7:$V0,9:$V1,10:$V2,16:$V3},o($V7,[2,2],{8:[1,13]}),o($V7,[2,4]),{11:[1,14]},{1:[2,1]},{4:15,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{4:16,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{13:[1,17]},{14:$V4,15:$V5,17:[1,18]},o($V7,[2,3]),{9:[1,19]},o($V6,[2,8]),o([5,15,17],[2,9],{14:$V4}),o($V6,[2,7]),o($V6,[2,10]),o($V7,[2,5])],
117 defaultActions: {8:[2,1]},
118 parseError: function parseError(str, hash) {
119 if (hash.recoverable) {
122 function _parseError (msg, hash) {
126 _parseError.prototype = Error;
128 throw new _parseError(str, hash);
131 parse: function parse(input) {
132 var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
133 var args = lstack.slice.call(arguments, 1);
134 var lexer = Object.create(this.lexer);
135 var sharedState = { yy: {} };
136 for (var k in this.yy) {
137 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
138 sharedState.yy[k] = this.yy[k];
141 lexer.setInput(input, sharedState.yy);
142 sharedState.yy.lexer = lexer;
143 sharedState.yy.parser = this;
144 if (typeof lexer.yylloc == 'undefined') {
147 var yyloc = lexer.yylloc;
149 var ranges = lexer.options && lexer.options.ranges;
150 if (typeof sharedState.yy.parseError === 'function') {
151 this.parseError = sharedState.yy.parseError;
153 this.parseError = Object.getPrototypeOf(this).parseError;
155 function popStack(n) {
156 stack.length = stack.length - 2 * n;
157 vstack.length = vstack.length - n;
158 lstack.length = lstack.length - n;
161 var lex = function () {
163 token = lexer.lex() || EOF;
164 if (typeof token !== 'number') {
165 token = self.symbols_[token] || token;
169 var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
171 state = stack[stack.length - 1];
172 if (this.defaultActions[state]) {
173 action = this.defaultActions[state];
175 if (symbol === null || typeof symbol == 'undefined') {
178 action = table[state] && table[state][symbol];
180 if (typeof action === 'undefined' || !action.length || !action[0]) {
183 for (p in table[state]) {
184 if (this.terminals_[p] && p > TERROR) {
185 expected.push('\'' + this.terminals_[p] + '\'');
188 if (lexer.showPosition) {
189 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
191 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
193 this.parseError(errStr, {
195 token: this.terminals_[symbol] || symbol,
196 line: lexer.yylineno,
201 if (action[0] instanceof Array && action.length > 1) {
202 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
207 vstack.push(lexer.yytext);
208 lstack.push(lexer.yylloc);
209 stack.push(action[1]);
211 if (!preErrorSymbol) {
212 yyleng = lexer.yyleng;
213 yytext = lexer.yytext;
214 yylineno = lexer.yylineno;
215 yyloc = lexer.yylloc;
216 if (recovering > 0) {
220 symbol = preErrorSymbol;
221 preErrorSymbol = null;
225 len = this.productions_[action[1]][1];
226 yyval.$ = vstack[vstack.length - len];
228 first_line: lstack[lstack.length - (len || 1)].first_line,
229 last_line: lstack[lstack.length - 1].last_line,
230 first_column: lstack[lstack.length - (len || 1)].first_column,
231 last_column: lstack[lstack.length - 1].last_column
235 lstack[lstack.length - (len || 1)].range[0],
236 lstack[lstack.length - 1].range[1]
239 r = this.performAction.apply(yyval, [
248 if (typeof r !== 'undefined') {
252 stack = stack.slice(0, -1 * len * 2);
253 vstack = vstack.slice(0, -1 * len);
254 lstack = lstack.slice(0, -1 * len);
256 stack.push(this.productions_[action[1]][0]);
257 vstack.push(yyval.$);
258 lstack.push(yyval._$);
259 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
260 stack.push(newState);
268 /* generated by jison-lex 0.3.4 */
269 var lexer = (function(){
274 parseError:function parseError(str, hash) {
275 if (this.yy.parser) {
276 this.yy.parser.parseError(str, hash);
278 throw new Error(str);
282 // resets the lexer, sets new input
283 setInput:function (input, yy) {
284 this.yy = yy || this.yy || {};
286 this._more = this._backtrack = this.done = false;
287 this.yylineno = this.yyleng = 0;
288 this.yytext = this.matched = this.match = '';
289 this.conditionStack = ['INITIAL'];
296 if (this.options.ranges) {
297 this.yylloc.range = [0,0];
303 // consumes and returns one char from the input
305 var ch = this._input[0];
311 var lines = ch.match(/(?:\r\n?|\n).*/g);
314 this.yylloc.last_line++;
316 this.yylloc.last_column++;
318 if (this.options.ranges) {
319 this.yylloc.range[1]++;
322 this._input = this._input.slice(1);
326 // unshifts one char (or a string) into the input
327 unput:function (ch) {
329 var lines = ch.split(/(?:\r\n?|\n)/g);
331 this._input = ch + this._input;
332 this.yytext = this.yytext.substr(0, this.yytext.length - len);
333 //this.yyleng -= len;
335 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
336 this.match = this.match.substr(0, this.match.length - 1);
337 this.matched = this.matched.substr(0, this.matched.length - 1);
339 if (lines.length - 1) {
340 this.yylineno -= lines.length - 1;
342 var r = this.yylloc.range;
345 first_line: this.yylloc.first_line,
346 last_line: this.yylineno + 1,
347 first_column: this.yylloc.first_column,
349 (lines.length === oldLines.length ? this.yylloc.first_column : 0)
350 + oldLines[oldLines.length - lines.length].length - lines[0].length :
351 this.yylloc.first_column - len
354 if (this.options.ranges) {
355 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
357 this.yyleng = this.yytext.length;
361 // When called from action, caches matched text and appends it on next action
367 // 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.
369 if (this.options.backtrack_lexer) {
370 this._backtrack = true;
372 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(), {
382 // retain first n characters of the match
384 this.unput(this.match.slice(n));
387 // displays already matched input, i.e. for error messages
388 pastInput:function () {
389 var past = this.matched.substr(0, this.matched.length - this.match.length);
390 return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
393 // displays upcoming input, i.e. for error messages
394 upcomingInput:function () {
395 var next = this.match;
396 if (next.length < 20) {
397 next += this._input.substr(0, 20-next.length);
399 return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
402 // displays the character position where the lexing error occurred, i.e. for error messages
403 showPosition:function () {
404 var pre = this.pastInput();
405 var c = new Array(pre.length + 1).join("-");
406 return pre + this.upcomingInput() + "\n" + c + "^";
409 // test the lexed token: return FALSE when not a match, otherwise return token
410 test_match:function (match, indexed_rule) {
415 if (this.options.backtrack_lexer) {
418 yylineno: this.yylineno,
420 first_line: this.yylloc.first_line,
421 last_line: this.last_line,
422 first_column: this.yylloc.first_column,
423 last_column: this.yylloc.last_column
427 matches: this.matches,
428 matched: this.matched,
434 conditionStack: this.conditionStack.slice(0),
437 if (this.options.ranges) {
438 backup.yylloc.range = this.yylloc.range.slice(0);
442 lines = match[0].match(/(?:\r\n?|\n).*/g);
444 this.yylineno += lines.length;
447 first_line: this.yylloc.last_line,
448 last_line: this.yylineno + 1,
449 first_column: this.yylloc.last_column,
451 lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
452 this.yylloc.last_column + match[0].length
454 this.yytext += match[0];
455 this.match += match[0];
456 this.matches = match;
457 this.yyleng = this.yytext.length;
458 if (this.options.ranges) {
459 this.yylloc.range = [this.offset, this.offset += this.yyleng];
462 this._backtrack = false;
463 this._input = this._input.slice(match[0].length);
464 this.matched += match[0];
465 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
466 if (this.done && this._input) {
471 } else if (this._backtrack) {
473 for (var k in backup) {
476 return false; // rule action called reject() implying the next rule should be tested instead.
481 // return next match in input
498 var rules = this._currentRules();
499 for (var i = 0; i < rules.length; i++) {
500 tempMatch = this._input.match(this.rules[rules[i]]);
501 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
504 if (this.options.backtrack_lexer) {
505 token = this.test_match(tempMatch, rules[i]);
506 if (token !== false) {
508 } else if (this._backtrack) {
510 continue; // rule action called reject() implying a rule MISmatch.
512 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
515 } else if (!this.options.flex) {
521 token = this.test_match(match, rules[index]);
522 if (token !== false) {
525 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
528 if (this._input === "") {
531 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
539 // return next match that has a token
549 // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
550 begin:function begin(condition) {
551 this.conditionStack.push(condition);
554 // pop the previously active lexer condition state off the condition stack
555 popState:function popState() {
556 var n = this.conditionStack.length - 1;
558 return this.conditionStack.pop();
560 return this.conditionStack[0];
564 // produce the lexer rule set which is active for the currently active lexer condition state
565 _currentRules:function _currentRules() {
566 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
567 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
569 return this.conditions["INITIAL"].rules;
573 // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
574 topState:function topState(n) {
575 n = this.conditionStack.length - 1 - Math.abs(n || 0);
577 return this.conditionStack[n];
583 // alias for begin(condition)
584 pushState:function pushState(condition) {
585 this.begin(condition);
588 // return the number of states currently on the stack
589 stateStackSize:function stateStackSize() {
590 return this.conditionStack.length;
593 performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
594 var YYSTATE=YY_START;
595 switch($avoiding_name_collisions) {
598 case 1:/* skip whitespace */
1328 rules: [/^(?:$)/,/^(?:\s+)/,/^(?:\+)/,/^(?:\()/,/^(?:\))/,/^(?::)/,/^(?:DocumentRef-([0-9A-Za-z-+.]+))/,/^(?:LicenseRef-([0-9A-Za-z-+.]+))/,/^(?:AND)/,/^(?:OR)/,/^(?:WITH)/,/^(?:BSD-3-Clause-No-Nuclear-License-2014)/,/^(?:BSD-3-Clause-No-Nuclear-Warranty)/,/^(?:GPL-2\.0-with-classpath-exception)/,/^(?:GPL-3\.0-with-autoconf-exception)/,/^(?:GPL-2\.0-with-autoconf-exception)/,/^(?:BSD-3-Clause-No-Nuclear-License)/,/^(?:MPL-2\.0-no-copyleft-exception)/,/^(?:GPL-2\.0-with-bison-exception)/,/^(?:GPL-2\.0-with-font-exception)/,/^(?:GPL-2\.0-with-GCC-exception)/,/^(?:CNRI-Python-GPL-Compatible)/,/^(?:GPL-3\.0-with-GCC-exception)/,/^(?:BSD-3-Clause-Attribution)/,/^(?:Classpath-exception-2\.0)/,/^(?:WxWindows-exception-3\.1)/,/^(?:freertos-exception-2\.0)/,/^(?:Autoconf-exception-3\.0)/,/^(?:i2p-gpl-java-exception)/,/^(?:gnu-javamail-exception)/,/^(?:Nokia-Qt-exception-1\.1)/,/^(?:Autoconf-exception-2\.0)/,/^(?:BSD-2-Clause-FreeBSD)/,/^(?:u-boot-exception-2\.0)/,/^(?:zlib-acknowledgement)/,/^(?:Bison-exception-2\.2)/,/^(?:BSD-2-Clause-NetBSD)/,/^(?:CLISP-exception-2\.0)/,/^(?:eCos-exception-2\.0)/,/^(?:BSD-3-Clause-Clear)/,/^(?:Font-exception-2\.0)/,/^(?:FLTK-exception-2\.0)/,/^(?:GCC-exception-2\.0)/,/^(?:Qwt-exception-1\.0)/,/^(?:Libtool-exception)/,/^(?:BSD-3-Clause-LBNL)/,/^(?:GCC-exception-3\.1)/,/^(?:Artistic-1\.0-Perl)/,/^(?:Artistic-1\.0-cl8)/,/^(?:CC-BY-NC-SA-2\.5)/,/^(?:MIT-advertising)/,/^(?:BSD-Source-Code)/,/^(?:CC-BY-NC-SA-4\.0)/,/^(?:LiLiQ-Rplus-1\.1)/,/^(?:CC-BY-NC-SA-3\.0)/,/^(?:BSD-4-Clause-UC)/,/^(?:CC-BY-NC-SA-2\.0)/,/^(?:CC-BY-NC-SA-1\.0)/,/^(?:CC-BY-NC-ND-4\.0)/,/^(?:CC-BY-NC-ND-3\.0)/,/^(?:CC-BY-NC-ND-2\.5)/,/^(?:CC-BY-NC-ND-2\.0)/,/^(?:CC-BY-NC-ND-1\.0)/,/^(?:LZMA-exception)/,/^(?:BitTorrent-1\.1)/,/^(?:CrystalStacker)/,/^(?:FLTK-exception)/,/^(?:SugarCRM-1\.1\.3)/,/^(?:BSD-Protection)/,/^(?:BitTorrent-1\.0)/,/^(?:HaskellReport)/,/^(?:Interbase-1\.0)/,/^(?:StandardML-NJ)/,/^(?:mif-exception)/,/^(?:Frameworx-1\.0)/,/^(?:389-exception)/,/^(?:CC-BY-NC-2\.0)/,/^(?:CC-BY-NC-2\.5)/,/^(?:CC-BY-NC-3\.0)/,/^(?:CC-BY-NC-4\.0)/,/^(?:W3C-19980720)/,/^(?:CC-BY-SA-1\.0)/,/^(?:CC-BY-SA-2\.0)/,/^(?:CC-BY-SA-2\.5)/,/^(?:CC-BY-ND-2\.0)/,/^(?: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TP)/,/^(?:IPA)/,/^(?:ISC)/,/^(?:X11)/,/^(?:AAL)/,/^(?:AML)/,/^(?:xpp)/,/^(?:Zed)/,/^(?:MIT)/,/^(?:Mup)/],
1329 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,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364],"inclusive":true}}
1333 parser.lexer = lexer;
1334 function Parser () {
1337 Parser.prototype = parser;parser.Parser = Parser;
1342 if (typeof require !== 'undefined' && typeof exports !== 'undefined') {
1343 exports.parser = spdxparse;
1344 exports.Parser = spdxparse.Parser;
1345 exports.parse = function () { return spdxparse.parse.apply(spdxparse, arguments); };
1346 exports.main = function commonjsMain(args) {
1348 console.log('Usage: '+args[0]+' FILE');
1351 var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
1352 return exports.parser.parse(source);
1354 if (typeof module !== 'undefined' && require.main === module) {
1355 exports.main(process.argv.slice(1));