Revision 9a2b736416bc4dc0727c9c517c242fc3669afcc1 authored by Eric Prud'hommeaux on 04 January 2018, 21:35:30 UTC, committed by Eric Prud'hommeaux on 04 January 2018, 21:35:30 UTC
1 parent 679a517
ShExJison.js
/* parser generated by jison 0.4.16 */
/*
Returns a Parser object of the following structure:
Parser: {
yy: {}
}
Parser.prototype: {
yy: {},
trace: function(),
symbols_: {associative list: name ==> number},
terminals_: {associative list: number ==> name},
productions_: [...],
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
table: [...],
defaultActions: {...},
parseError: function(str, hash),
parse: function(input),
lexer: {
EOF: 1,
parseError: function(str, hash),
setInput: function(input),
input: function(),
unput: function(str),
more: function(),
less: function(n),
pastInput: function(),
upcomingInput: function(),
showPosition: function(),
test_match: function(regex_match_array, rule_index),
next: function(),
lex: function(),
begin: function(condition),
popState: function(),
_currentRules: function(),
topState: function(),
pushState: function(condition),
options: {
ranges: boolean (optional: true ==> token location info will include a .range[] member)
flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
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)
},
performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
rules: [...],
conditions: {associative list: name ==> set},
}
}
token location info (@$, _$, etc.): {
first_line: n,
last_line: n,
first_column: n,
last_column: n,
range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
}
the parseError function receives a 'hash' object with these members for lexer and parser errors: {
text: (matched text)
token: (the produced terminal token, if any)
line: (yylineno)
}
while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
loc: (yylloc)
expected: (string describing the set of expected tokens)
recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
}
*/
var ShExJison = (function(){
var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[7,18,19,20,21,23,26,181,190,191],$V1=[1,11],$V2=[1,25],$V3=[1,12],$V4=[1,27],$V5=[1,13],$V6=[1,19],$V7=[1,24],$V8=[1,26],$V9=[1,28],$Va=[7,18,19,20,21,23,26,190,191],$Vb=[19,21,63,65,73,84,85,86,89,90,91,92,100,101,102,103,104,105,107,115,118,150,177,190],$Vc=[2,32],$Vd=[1,40],$Ve=[1,42],$Vf=[1,43],$Vg=[1,44],$Vh=[7,18,19,20,21,23,26,34,38,46,49,63,64,65,70,71,72,73,84,85,86,89,90,91,92,100,101,102,103,104,105,107,109,115,118,126,131,132,145,146,147,148,150,177,178,181,190,191],$Vi=[7,18,19,20,21,23,26,34,38,46,49,63,64,65,70,71,72,73,84,85,86,88,89,90,91,92,96,97,98,100,101,102,103,104,105,107,109,115,118,126,131,132,145,146,147,148,149,150,152,164,165,176,177,178,181,182,183,186,187,188,190,191],$Vj=[107,115,118,177],$Vk=[2,132],$Vl=[1,55],$Vm=[1,59],$Vn=[1,60],$Vo=[1,63],$Vp=[1,69],$Vq=[1,70],$Vr=[1,71],$Vs=[1,78],$Vt=[1,81],$Vu=[1,82],$Vv=[1,83],$Vw=[1,84],$Vx=[1,85],$Vy=[1,86],$Vz=[1,87],$VA=[1,88],$VB=[1,89],$VC=[1,74],$VD=[1,103],$VE=[1,104],$VF=[7,18,19,20,21,23,26,46,49,64,84,85,86,89,90,91,92,109,126,131,132,145,146,147,148,178,181,190,191],$VG=[7,18,19,20,21,23,26,64,109,126,131,132,145,146,147,148,178,181,190,191],$VH=[7,18,19,20,21,23,26,46,64,109,126,131,132,145,146,147,148,178,181,190,191],$VI=[7,18,19,20,21,23,26,46,49,64,109,126,131,132,145,146,147,148,178,181,190,191],$VJ=[7,18,19,20,21,23,26,46,49,64,70,71,72,107,109,115,118,126,131,132,145,146,147,148,177,178,181,190,191],$VK=[7,18,19,20,21,23,26,46,49,64,89,90,91,92,100,101,102,103,104,105,109,126,131,132,145,146,147,148,178,181,190,191],$VL=[2,95],$VM=[7,18,19,20,21,23,26,46,49,64,70,71,72,89,90,91,92,107,109,115,118,126,131,132,145,146,147,148,177,178,181,190,191],$VN=[19,21,65,88,96,97,98,152,176,183,186,187,190],$VO=[7,18,19,20,21,23,26,46,49,64,100,101,102,103,104,105,109,126,131,132,145,146,147,148,178,181,190,191],$VP=[1,126],$VQ=[1,128],$VR=[1,127],$VS=[7,18,19,20,21,23,26,46,49,64,70,71,72,89,90,91,92,100,101,102,103,104,105,107,109,115,118,126,131,132,145,146,147,148,177,178,181,190,191],$VT=[88,96,97,98],$VU=[7,18,19,20,21,23,26,64,190,191],$VV=[2,34],$VW=[7,18,19,20,21,23,26,46,49,64,190,191],$VX=[7,18,19,20,21,23,26,46,64,190,191],$VY=[1,151],$VZ=[1,155],$V_=[1,156],$V$=[7,18,19,20,21,23,26,46,49,64,84,85,86,89,90,91,92,109,126,131,132,181,190,191],$V01=[1,181],$V11=[1,182],$V21=[1,183],$V31=[1,176],$V41=[1,180],$V51=[1,175],$V61=[1,178],$V71=[1,179],$V81=[1,197],$V91=[2,134],$Va1=[1,190],$Vb1=[1,193],$Vc1=[1,201],$Vd1=[1,198],$Ve1=[1,200],$Vf1=[7,18,19,20,21,23,26,46,49,64,84,85,86,89,90,91,92,190,191],$Vg1=[7,18,19,20,21,23,26,46,49,64,65,84,85,86,88,89,90,91,92,96,97,98,109,126,131,132,152,164,165,176,178,181,183,186,187,190,191],$Vh1=[1,238],$Vi1=[64,109,126],$Vj1=[2,152],$Vk1=[1,240],$Vl1=[1,241],$Vm1=[64,109,126,131,132],$Vn1=[19,21,38,63,65,70,71,72,73,84,85,86,88,89,90,91,92,96,97,98,100,101,102,103,104,105,107,115,118,150,177,183,186,187,188,190],$Vo1=[19,21,107,115,118,177,190,191],$Vp1=[19,21,107,115,118,177,188,190],$Vq1=[1,262],$Vr1=[1,264],$Vs1=[1,266],$Vt1=[19,21,65,88,96,97,98,152,165,176,183,186,187,190],$Vu1=[2,156],$Vv1=[1,280],$Vw1=[1,281],$Vx1=[19,21,63,64,109,126,131,132,149,188,190],$Vy1=[64,109,126,131,132,178,181],$Vz1=[2,171],$VA1=[1,286],$VB1=[1,287],$VC1=[1,288],$VD1=[1,289],$VE1=[2,136],$VF1=[2,155],$VG1=[2,225],$VH1=[1,307],$VI1=[64,109,126,131,132,181],$VJ1=[7,18,19,20,21,23,26,46,49,64,84,85,86,89,90,91,92,109,126,131,132,178,181,190,191];
var parser = {trace: function trace() { },
yy: {},
symbols_: {"error":2,"shexDoc":3,"initParser":4,"Qdirective_E_Star":5,"Q_O_QnotStartAction_E_Or_QstartActions_E_S_Qstatement_E_Star_C_E_Opt":6,"EOF":7,"directive":8,"O_QnotStartAction_E_Or_QstartActions_E_C":9,"notStartAction":10,"startActions":11,"Qstatement_E_Star":12,"statement":13,"O_QnotStartAction_E_Or_QstartActions_E_S_Qstatement_E_Star_C":14,"baseDecl":15,"prefixDecl":16,"importDecl":17,"IT_BASE":18,"IRIREF":19,"IT_PREFIX":20,"PNAME_NS":21,"iri":22,"IT_IMPORT":23,"start":24,"shapeExprDecl":25,"IT_start":26,"=":27,"inlineShapeExpression":28,"QcodeDecl_E_Plus":29,"codeDecl":30,"shapeExprLabel":31,"O_QshapeExpression_E_Or_QIT_EXTERNAL_E_C":32,"shapeExpression":33,"IT_EXTERNAL":34,"QIT_NOT_E_Opt":35,"shapeAtomNoRef":36,"QshapeOr_E_Opt":37,"IT_NOT":38,"shapeRef":39,"shapeOr":40,"inlineShapeOr":41,"Q_O_QIT_OR_E_S_QshapeAnd_E_C_E_Plus":42,"Q_O_QIT_AND_E_S_QshapeNot_E_C_E_Plus":43,"Q_O_QIT_OR_E_S_QshapeAnd_E_C_E_Star":44,"O_QIT_OR_E_S_QshapeAnd_E_C":45,"IT_OR":46,"shapeAnd":47,"O_QIT_AND_E_S_QshapeNot_E_C":48,"IT_AND":49,"shapeNot":50,"inlineShapeAnd":51,"Q_O_QIT_OR_E_S_QinlineShapeAnd_E_C_E_Star":52,"O_QIT_OR_E_S_QinlineShapeAnd_E_C":53,"Q_O_QIT_AND_E_S_QshapeNot_E_C_E_Star":54,"inlineShapeNot":55,"Q_O_QIT_AND_E_S_QinlineShapeNot_E_C_E_Star":56,"O_QIT_AND_E_S_QinlineShapeNot_E_C":57,"shapeAtom":58,"inlineShapeAtom":59,"nonLitNodeConstraint":60,"shapeOrRef":61,"litNodeConstraint":62,"(":63,")":64,".":65,"QnonLitNodeConstraint_E_Opt":66,"shapeDefinition":67,"inlineShapeOrRef":68,"inlineShapeDefinition":69,"ATPNAME_LN":70,"ATPNAME_NS":71,"@":72,"IT_LITERAL":73,"QxsFacet_E_Star":74,"datatype":75,"valueSet":76,"QnumericFacet_E_Plus":77,"xsFacet":78,"nonLiteralKind":79,"QstringFacet_E_Plus":80,"numericFacet":81,"QstringFacet_E_Star":82,"stringFacet":83,"IT_IRI":84,"IT_BNODE":85,"IT_NONLITERAL":86,"stringLength":87,"INTEGER":88,"REGEXP":89,"IT_LENGTH":90,"IT_MINLENGTH":91,"IT_MAXLENGTH":92,"numericRange":93,"rawNumeric":94,"numericLength":95,"DECIMAL":96,"DOUBLE":97,"STRING":98,"^^":99,"IT_MININCLUSIVE":100,"IT_MINEXCLUSIVE":101,"IT_MAXINCLUSIVE":102,"IT_MAXEXCLUSIVE":103,"IT_TOTALDIGITS":104,"IT_FRACTIONDIGITS":105,"Q_O_QincludeSet_E_Or_QextraPropertySet_E_Or_QIT_CLOSED_E_C_E_Star":106,"{":107,"QtripleExpression_E_Opt":108,"}":109,"Qannotation_E_Star":110,"semanticActions":111,"O_QincludeSet_E_Or_QextraPropertySet_E_Or_QIT_CLOSED_E_C":112,"includeSet":113,"extraPropertySet":114,"IT_CLOSED":115,"tripleExpression":116,"annotation":117,"IT_EXTRA":118,"Qpredicate_E_Plus":119,"predicate":120,"oneOfTripleExpr":121,"groupTripleExpr":122,"multiElementOneOf":123,"Q_O_QGT_PIPE_E_S_QgroupTripleExpr_E_C_E_Plus":124,"O_QGT_PIPE_E_S_QgroupTripleExpr_E_C":125,"|":126,"innerTripleExpr":127,"multiElementGroup":128,"unaryTripleExpr":129,"groupTripleExpr_right":130,",":131,";":132,"Q_O_QGT_COMMA_E_S_QunaryTripleExpr_E_C_E_Plus":133,"QGT_COMMA_E_Opt":134,"O_QGT_COMMA_E_S_QunaryTripleExpr_E_C":135,"$":136,"tripleExprLabel":137,"tripleConstraint":138,"bracketedTripleExpr":139,"valueConstraint":140,"include":141,"Qcardinality_E_Opt":142,"cardinality":143,"senseFlags":144,"*":145,"+":146,"?":147,"REPEAT_RANGE":148,"^":149,"[":150,"QvalueSetValue_E_Star":151,"]":152,"valueSetValue":153,"iriRange":154,"literalRange":155,"languageRange":156,"QiriExclusion_E_Plus":157,"QliteralExclusion_E_Plus":158,"QlanguageExclusion_E_Plus":159,"Q_O_Q_TILDE_E_S_QiriExclusion_E_Star_C_E_Opt":160,"QiriExclusion_E_Star":161,"iriExclusion":162,"O_Q_TILDE_E_S_QiriExclusion_E_Star_C":163,"~":164,"-":165,"literal":166,"Q_O_Q_TILDE_E_S_QliteralExclusion_E_Star_C_E_Opt":167,"QliteralExclusion_E_Star":168,"literalExclusion":169,"O_Q_TILDE_E_S_QliteralExclusion_E_Star_C":170,"language":171,"Q_O_Q_TILDE_E_S_QlanguageExclusion_E_Star_C_E_Opt":172,"QlanguageExclusion_E_Star":173,"languageExclusion":174,"O_Q_TILDE_E_S_QlanguageExclusion_E_Star_C":175,"LANGTAG":176,"&":177,"//":178,"O_Qiri_E_Or_Qliteral_E_C":179,"QcodeDecl_E_Star":180,"%":181,"CODE":182,"LANG_STRING":183,"optDT":184,"numericLiteral":185,"IT_true":186,"IT_false":187,"a":188,"blankNode":189,"PNAME_LN":190,"BLANK_NODE_LABEL":191,"QshapeExprLabel_E_Plus":192,"$accept":0,"$end":1},
terminals_: {2:"error",7:"EOF",18:"IT_BASE",19:"IRIREF",20:"IT_PREFIX",21:"PNAME_NS",23:"IT_IMPORT",26:"IT_start",27:"=",34:"IT_EXTERNAL",38:"IT_NOT",46:"IT_OR",49:"IT_AND",63:"(",64:")",65:".",70:"ATPNAME_LN",71:"ATPNAME_NS",72:"@",73:"IT_LITERAL",84:"IT_IRI",85:"IT_BNODE",86:"IT_NONLITERAL",88:"INTEGER",89:"REGEXP",90:"IT_LENGTH",91:"IT_MINLENGTH",92:"IT_MAXLENGTH",96:"DECIMAL",97:"DOUBLE",98:"STRING",99:"^^",100:"IT_MININCLUSIVE",101:"IT_MINEXCLUSIVE",102:"IT_MAXINCLUSIVE",103:"IT_MAXEXCLUSIVE",104:"IT_TOTALDIGITS",105:"IT_FRACTIONDIGITS",107:"{",109:"}",115:"IT_CLOSED",118:"IT_EXTRA",126:"|",131:",",132:";",136:"$",140:"valueConstraint",145:"*",146:"+",147:"?",148:"REPEAT_RANGE",149:"^",150:"[",152:"]",164:"~",165:"-",176:"LANGTAG",177:"&",178:"//",181:"%",182:"CODE",183:"LANG_STRING",186:"IT_true",187:"IT_false",188:"a",190:"PNAME_LN",191:"BLANK_NODE_LABEL"},
productions_: [0,[3,4],[4,0],[5,0],[5,2],[9,1],[9,1],[12,0],[12,2],[14,2],[6,0],[6,1],[8,1],[8,1],[8,1],[15,2],[16,3],[17,2],[10,1],[10,1],[24,3],[11,1],[29,1],[29,2],[13,1],[13,1],[25,2],[32,1],[32,1],[33,3],[33,3],[33,2],[35,0],[35,1],[37,0],[37,1],[28,1],[40,1],[40,2],[45,2],[42,1],[42,2],[48,2],[43,1],[43,2],[44,0],[44,2],[41,2],[53,2],[52,0],[52,2],[47,2],[54,0],[54,2],[51,2],[57,2],[56,0],[56,2],[50,1],[50,2],[55,1],[55,2],[58,1],[58,2],[58,1],[58,1],[58,2],[58,3],[58,1],[66,0],[66,1],[36,1],[36,2],[36,1],[36,1],[36,2],[36,3],[36,1],[59,1],[59,2],[59,1],[59,2],[59,3],[59,1],[61,1],[61,1],[68,1],[68,1],[39,1],[39,1],[39,2],[62,2],[62,2],[62,2],[62,1],[74,0],[74,2],[60,1],[60,2],[60,1],[77,1],[77,2],[82,0],[82,2],[80,1],[80,2],[79,1],[79,1],[79,1],[78,1],[78,1],[83,2],[83,1],[87,1],[87,1],[87,1],[81,2],[81,2],[94,1],[94,1],[94,1],[94,3],[93,1],[93,1],[93,1],[93,1],[95,1],[95,1],[67,6],[112,1],[112,1],[112,1],[106,0],[106,2],[108,0],[108,1],[110,0],[110,2],[69,4],[114,2],[119,1],[119,2],[116,1],[121,1],[121,1],[123,2],[125,2],[124,1],[124,2],[127,1],[127,1],[122,2],[130,0],[130,1],[130,1],[130,2],[134,0],[134,1],[134,1],[128,3],[135,2],[135,2],[133,1],[133,2],[129,3],[129,1],[129,3],[129,1],[129,1],[129,1],[139,6],[142,0],[142,1],[138,5],[138,6],[143,1],[143,1],[143,1],[143,1],[144,1],[76,3],[151,0],[151,2],[153,1],[153,1],[153,1],[153,2],[153,2],[153,2],[154,2],[161,0],[161,2],[163,2],[160,0],[160,1],[157,1],[157,2],[162,2],[162,3],[155,2],[168,0],[168,2],[170,2],[167,0],[167,1],[158,1],[158,2],[169,2],[169,3],[156,2],[173,0],[173,2],[175,2],[172,0],[172,1],[159,1],[159,2],[174,2],[174,3],[171,1],[141,2],[117,3],[179,1],[179,1],[111,1],[180,0],[180,2],[30,3],[30,3],[166,1],[166,2],[166,1],[166,1],[166,1],[184,0],[184,2],[120,1],[120,1],[75,1],[31,1],[31,1],[137,1],[137,1],[185,1],[185,1],[185,1],[22,1],[22,1],[22,1],[189,1],[113,2],[192,1],[192,2]],
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
/* this == yyval */
var $0 = $$.length - 1;
switch (yystate) {
case 1:
var valueExprDefns = Parser.valueExprDefns ? { valueExprDefns: Parser.valueExprDefns } : {};
var startObj = Parser.start ? { start: Parser.start } : {};
var startActs = Parser.startActs ? { startActs: Parser.startActs } : {};
var ret = extend({ type: "Schema"},
Object.keys(Parser._prefixes).length ? { prefixes: Parser._prefixes } : {}, // Properties ordered here to
Object.keys(Parser._imports).length ? { imports: Parser._imports } : {}, // build return object from
valueExprDefns, startActs, startObj, // components in parser state
Parser.shapes ? {shapes: Parser.shapes} : {}, // maintaining intuitve order.
Parser.productions ? {productions: Parser.productions} : {});
if (Parser._base !== null)
ret.base = Parser._base;
Parser.reset();
//console.log(JSON.stringify(ret));
return ret;
break;
case 2:
yy.parser.yy = { lexer: yy.lexer} ;
break;
case 15:
// t: @@
Parser._setBase(Parser._base === null ||
absoluteIRI.test($$[$0].slice(1, -1)) ? $$[$0].slice(1, -1) : _resolveIRI($$[$0].slice(1, -1)));
break;
case 16:
// t: ShExParser-test.js/with pre-defined prefixes
Parser._prefixes[$$[$0-1].slice(0, -1)] = $$[$0];
break;
case 17:
// t: @@
Parser._imports.push($$[$0]);
break;
case 20:
if (Parser.start)
error("Parse error: start already defined");
Parser.start = $$[$0]; // t: startInline
break;
case 21:
Parser.startActs = $$[$0]; // t: startCode1
break;
case 22:
this.$ = [$$[$0]] // t: startCode1;
break;
case 23:
this.$ = appendTo($$[$0-1], $$[$0]) // t: startCode3;
break;
case 26:
// t: 1dot 1val1vsMinusiri3??
addShape($$[$0-1], $$[$0]);
break;
case 27:
this.$ = $$[$0];
break;
case 28:
this.$ = { type: "ShapeExternal" };
break;
case 29:
if ($$[$0-2])
$$[$0-1] = { type: "ShapeNot", "shapeExpr": $$[$0-1] };
if ($$[$0]) {
$$[$0].shapeExprs.unshift($$[$0-1]);
this.$ = $$[$0];
} else {
// console.log("shapeAtomNoRef:", $$[$0-1]);
this.$ = $$[$0-1];
}
break;
case 30:
this.$ = { type: "ShapeNot", "shapeExpr": $$[$0-1] };
break;
case 31:
// console.log("shapeRef_shapeOr:", $$[$0-1], $$[$0]);
$$[$0].shapeExprs.unshift($$[$0-1]);
this.$ = $$[$0]; // { type: "ShapeOr", "shapeExprs": [$$[$0-1]].concat($$[$0]) };
break;
case 32:
this.$ = false;
break;
case 33:
this.$ = true;
break;
case 34: case 152: case 153: case 154: case 234:
this.$ = null;
break;
case 35: case 39: case 42: case 48: case 55: case 235:
this.$ = $$[$0];
break;
case 37:
this.$ = { type: "ShapeOr", shapeExprs: $$[$0] };
// console.log("shapeOr_1:", this.$);
break;
case 38:
this.$ = $$[$0].length > 0 ? shapeJunction("ShapeAnd", $$[$0-1], $$[$0]) : { type: "ShapeAnd", shapeExprs:$$[$0-1] };
// console.log("shapeOr_2:", this.$);
break;
case 40: case 43:
this.$ = [$$[$0]];
break;
case 41: case 44: case 46: case 50: case 53: case 57:
this.$ = $$[$0-1].concat($$[$0]);
break;
case 45: case 49: case 52: case 56:
this.$ = [];
break;
case 47:
this.$ = shapeJunction("ShapeOr", $$[$0-1], $$[$0]);
break;
case 51: case 54:
this.$ = shapeJunction("ShapeAnd", $$[$0-1], $$[$0]);
break;
case 59: case 61:
this.$ = { type: "ShapeNot", "shapeExpr": $$[$0] };
break;
case 63: case 72: case 79:
this.$ = { type: "ShapeAnd", shapeExprs: [ extend({ type: "NodeConstraint" }, $$[$0-1]), $$[$0] ] };
break;
case 66: case 75:
this.$ = shapeJunction("ShapeAnd", $$[$0-1], [$$[$0]]) // t:@@;
break;
case 67: case 76: case 82:
this.$ = $$[$0-1] // t: 1val1vsMinusiri3;
break;
case 68: case 77: case 83:
this.$ = EmptyShape // t: 1dot;
break;
case 81:
this.$ = $$[$0] ? { type: "ShapeAnd", shapeExprs: [ extend({ type: "NodeConstraint" }, $$[$0-1]), $$[$0] ] } : $$[$0-1] // t: !! look to 1dotRef1;
break;
case 88:
// t: 1dotRefLNex@@
$$[$0] = $$[$0].substr(1, $$[$0].length-1);
var namePos = $$[$0].indexOf(':');
this.$ = { type: "ShapeRef", reference: expandPrefix($$[$0].substr(0, namePos)) + $$[$0].substr(namePos + 1) };
break;
case 89:
// t: 1dotRefNS1@@
$$[$0] = $$[$0].substr(1, $$[$0].length-1);
this.$ = { type: "ShapeRef", reference: expandPrefix($$[$0].substr(0, $$[$0].length - 1)) };
break;
case 90:
this.$ = { type: "ShapeRef", reference: $$[$0] } // t: 1dotRef1, 1dotRefSpaceLNex, 1dotRefSpaceNS1;
break;
case 91:
this.$ = extend({ type: "NodeConstraint", nodeKind: "literal" }, $$[$0]) // t: 1literalPattern;
break;
case 92:
if (numericDatatypes.indexOf($$[$0-1]) === -1)
numericFacets.forEach(function (facet) {
if (facet in $$[$0])
error("Parse error: facet " + facet + " not allowed for unknown datatype " + $$[$0-1]);
});
this.$ = extend({ type: "NodeConstraint", datatype: $$[$0-1] }, $$[$0]) // t: 1datatype
break;
case 93:
this.$ = { type: "NodeConstraint", values: $$[$0-1] } // t: 1val1IRIREF;
break;
case 94:
this.$ = extend({ type: "NodeConstraint"}, $$[$0]);
break;
case 95:
this.$ = {} // t: 1literalPattern;
break;
case 96:
if (Object.keys($$[$0-1]).indexOf(Object.keys($$[$0])[0]) !== -1) {
error("Parse error: facet "+Object.keys($$[$0])[0]+" defined multiple times");
}
this.$ = extend($$[$0-1], $$[$0]) // t: 1literalLength
break;
case 97:
this.$ = extend({ type: "NodeConstraint" }, $$[$0]) // t: 1iriPattern;
break;
case 98:
this.$ = extend({ type: "NodeConstraint"}, $$[$0-1], $$[$0]) // t: 1iriPattern;
break;
case 99:
this.$ = extend({ type: "NodeConstraint"}, $$[$0]) // t: @@;
break;
case 101: case 105:
if (Object.keys($$[$0-1]).indexOf(Object.keys($$[$0])[0]) !== -1) {
error("Parse error: facet "+Object.keys($$[$0])[0]+" defined multiple times");
}
this.$ = extend($$[$0-1], $$[$0]) // t: !! look to 1literalLength
break;
case 102:
this.$ = {};
break;
case 103:
if (Object.keys($$[$0-1]).indexOf(Object.keys($$[$0])[0]) !== -1) {
error("Parse error: facet "+Object.keys($$[$0])[0]+" defined multiple times");
}
this.$ = extend($$[$0-1], $$[$0])
break;
case 106:
this.$ = { nodeKind: "iri" } // t: 1iriPattern;
break;
case 107:
this.$ = { nodeKind: "bnode" } // t: 1bnodeLength;
break;
case 108:
this.$ = { nodeKind: "nonliteral" } // t: 1nonliteralLength;
break;
case 111:
this.$ = keyValObject($$[$0-1], parseInt($$[$0], 10)) // t: 1literalLength;
break;
case 112:
this.$ = unescapeRegexp($$[$0]) // t: 1literalPattern;
break;
case 113:
this.$ = "length" // t: 1literalLength;
break;
case 114:
this.$ = "minlength" // t: 1literalMinlength;
break;
case 115:
this.$ = "maxlength" // t: 1literalMaxlength;
break;
case 116:
this.$ = keyValObject($$[$0-1], $$[$0]) // t: 1literalMininclusive;
break;
case 117:
this.$ = keyValObject($$[$0-1], parseInt($$[$0], 10)) // t: 1literalTotaldigits;
break;
case 118:
this.$ = parseInt($$[$0], 10);;
break;
case 119: case 120:
this.$ = parseFloat($$[$0]);;
break;
case 121:
if ($$[$0] === XSD_DECIMAL || $$[$0] === XSD_FLOAT || $$[$0] === XSD_DOUBLE)
this.$ = parseFloat($$[$0-2].value);
else if (numericDatatypes.indexOf($$[$0]) !== -1)
this.$ = parseInt($$[$0-2].value)
else
error("Parse error: numeric range facet expected numeric datatype instead of " + $$[$0]);
break;
case 122:
this.$ = "mininclusive" // t: 1literalMininclusive;
break;
case 123:
this.$ = "minexclusive" // t: 1literalMinexclusive;
break;
case 124:
this.$ = "maxinclusive" // t: 1literalMaxinclusive;
break;
case 125:
this.$ = "maxexclusive" // t: 1literalMaxexclusive;
break;
case 126:
this.$ = "totaldigits" // t: 1literalTotaldigits;
break;
case 127:
this.$ = "fractiondigits" // t: 1literalFractiondigits;
break;
case 128:
// t: 1dotInherit3
var exprObj = $$[$0-3] ? { expression: $$[$0-3] } : EmptyObject; // t: 0, 0Inherit1
this.$ = (exprObj === EmptyObject && $$[$0-5] === EmptyObject) ?
EmptyShape :
extend({ type: "Shape" }, exprObj, $$[$0-5]);
if ($$[$0-1].length) { this.$.annotations = $$[$0-1]; } // t: !! look to open3groupdotcloseAnnot3, open3groupdotclosecard23Annot3Code2
if ($$[$0]) { this.$.semActs = $$[$0].semActs; } // t: !! look to open3groupdotcloseCode1, !open1dotOr1dot
break;
case 129:
this.$ = [ "inherit", $$[$0] ] // t: 1dotInherit1;
break;
case 130:
this.$ = [ "extra", $$[$0] ] // t: 1dotExtra1, 3groupdot3Extra, 3groupdotExtra3;
break;
case 131:
this.$ = [ "closed", true ] // t: 1dotClosed;
break;
case 132:
this.$ = EmptyObject;
break;
case 133:
if ($$[$0-1] === EmptyObject)
$$[$0-1] = {};
if ($$[$0][0] === "closed")
$$[$0-1]["closed"] = true; // t: 1dotClosed
else if ($$[$0][0] in $$[$0-1])
$$[$0-1][$$[$0][0]] = unionAll($$[$0-1][$$[$0][0]], $$[$0][1]); // t: 1dotInherit3, 3groupdot3Extra, 3groupdotExtra3
else
$$[$0-1][$$[$0][0]] = $$[$0][1]; // t: 1dotInherit1
this.$ = $$[$0-1];
break;
case 136:
this.$ = [] // t: 1dot, 1dotAnnot3;
break;
case 137:
this.$ = appendTo($$[$0-1], $$[$0]) // t: 1dotAnnot3;
break;
case 138:
// t: 1dotInherit3
var exprObj = $$[$0-1] ? { expression: $$[$0-1] } : EmptyObject; // t: 0, 0Inherit1
this.$ = (exprObj === EmptyObject && $$[$0-3] === EmptyObject) ?
EmptyShape :
extend({ type: "Shape" }, exprObj, $$[$0-3]);
break;
case 139:
this.$ = $$[$0] // t: 1dotExtra1, 3groupdot3Extra;
break;
case 140:
this.$ = [$$[$0]] // t: 1dotExtra1, 3groupdot3Extra, 3groupdotExtra3;
break;
case 141:
this.$ = appendTo($$[$0-1], $$[$0]) // t: 3groupdotExtra3;
break;
case 145:
this.$ = { type: "OneOf", expressions: unionAll([$$[$0-1]], $$[$0]) } // t: 2oneOfdot;
break;
case 146:
this.$ = $$[$0] // t: 2oneOfdot;
break;
case 147:
this.$ = [$$[$0]] // t: 2oneOfdot;
break;
case 148:
this.$ = appendTo($$[$0-1], $$[$0]) // t: 2oneOfdot;
break;
case 151:
this.$ = $$[$0] ? { type: "EachOf", expressions: unionAll([$$[$0-1]], $$[$0]) } : $$[$0-1] // t: 2groupOfdot;
break;
case 155:
this.$ = $$[$0-1];
break;
case 159:
this.$ = { type: "EachOf", expressions: unionAll([$$[$0-2]], $$[$0-1]) } // t: 2groupOfdot;
break;
case 160: case 161:
this.$ = $$[$0] // t: 2groupOfdot;
break;
case 162:
this.$ = [$$[$0]] // t: 2groupOfdot;
break;
case 163:
this.$ = appendTo($$[$0-1], $$[$0]) // t: 2groupOfdot;
break;
case 164: case 166:
this.$ = extend({ id: $$[$0-1] }, $$[$0]);
addProduction($$[$0-1], this.$);
break;
case 170:
// t: open1dotOr1dot, !openopen1dotcloseCode1closeCode2
this.$ = $$[$0-4];
// Copy all of the new attributes into the encapsulated shape.
if ("min" in $$[$0-2]) { this.$.min = $$[$0-2].min; } // t: open3groupdotclosecard23Annot3Code2
if ("max" in $$[$0-2]) { this.$.max = $$[$0-2].max; } // t: open3groupdotclosecard23Annot3Code2
if ($$[$0-1].length) { this.$.annotations = $$[$0-1]; } // t: open3groupdotcloseAnnot3, open3groupdotclosecard23Annot3Code2
if ($$[$0]) { this.$.semActs = "semActs" in $$[$0-4] ? $$[$0-4].semActs.concat($$[$0].semActs) : $$[$0].semActs; } // t: open3groupdotcloseCode1, !open1dotOr1dot
break;
case 171:
this.$ = {} // t: 1dot;
break;
case 173:
// $$[$0]: t: 1dotCode1
if ($$[$0-3] !== EmptyShape && false) {
var t = blank();
addShape(t, $$[$0-3]);
$$[$0-3] = { type: "ShapeRef", reference: t };
}
this.$ = extend({ type: "TripleConstraint", predicate: $$[$0-4]}, ($$[$0-3] === EmptyShape ? {} : { valueExpr: $$[$0-3] }), $$[$0-2], $$[$0]); // t: 1dot
if ($$[$0-1].length)
this.$["annotations"] = $$[$0-1]; // t: 1dotAnnot3
break;
case 174:
// %6: t: 1inversedotCode1
this.$ = extend({ type: "TripleConstraint" }, $$[$0-5], { predicate: $$[$0-4] }, ($$[$0-3] === EmptyShape ? {} : { valueExpr: $$[$0-3] }), $$[$0-2], $$[$0]); // t: 1inversedot
if ($$[$0-1].length)
this.$["annotations"] = $$[$0-1]; // t: 1inversedotAnnot3
break;
case 175:
this.$ = { min:0, max:UNBOUNDED } // t: 1cardStar;
break;
case 176:
this.$ = { min:1, max:UNBOUNDED } // t: 1cardPlus;
break;
case 177:
this.$ = { min:0, max:1 } // t: 1cardOpt;
break;
case 178:
$$[$0] = $$[$0].substr(1, $$[$0].length-2);
var nums = $$[$0].match(/(\d+)/g);
this.$ = { min: parseInt(nums[0], 10) }; // t: 1card2blank, 1card2Star
if (nums.length === 2)
this.$["max"] = parseInt(nums[1], 10); // t: 1card23
else if ($$[$0].indexOf(',') === -1) // t: 1card2
this.$["max"] = parseInt(nums[0], 10);
else
this.$["max"] = UNBOUNDED;
break;
case 179:
this.$ = { inverse: true } // t: 1inversedot;
break;
case 180:
this.$ = $$[$0-1] // t: 1val1IRIREF;
break;
case 181:
this.$ = [] // t: 1val1IRIREF;
break;
case 182:
this.$ = appendTo($$[$0-1], $$[$0]) // t: 1val1IRIREF;
break;
case 186:
this.$ = { type: "IriStemRange", stem: { type: "Wildcard" }, exclusions: $$[$0] } // t:1val1dotMinusiri3, 1val1dotMinusiriStem3;
break;
case 187:
this.$ = { type: "LiteralStemRange", stem: { type: "Wildcard" }, exclusions: $$[$0] } // t:1val1dotMinusliteral3, 1val1dotMinusliteralStem3;
break;
case 188:
this.$ = { type: "LanguageStemRange", stem: { type: "Wildcard" }, exclusions: $$[$0] } // t:1val1dotMinuslanguage3, 1val1dotMinuslanguageStem3;
break;
case 189:
if ($$[$0]) {
this.$ = { // t: 1val1iriStem, 1val1iriStemMinusiri3
type: $$[$0].length ? "IriStemRange" : "IriStem",
stem: $$[$0-1]
};
if ($$[$0].length)
this.$["exclusions"] = $$[$0]; // t: 1val1iriStemMinusiri3
} else {
this.$ = $$[$0-1]; // t: 1val1IRIREF, 1AvalA
}
break;
case 190:
this.$ = [] // t: 1val1iriStem, 1val1iriStemMinusiri3;
break;
case 191:
this.$ = appendTo($$[$0-1], $$[$0]) // t: 1val1iriStemMinusiri3;
break;
case 192: case 197:
this.$ = $$[$0] // t: 1val1iriStemMinusiri3;
break;
case 195:
this.$ = [$$[$0]] // t:1val1dotMinusiri3, 1val1dotMinusiriStem3;
break;
case 196:
this.$ = appendTo($$[$0-1], $$[$0]) // t:1val1dotMinusiri3, 1val1dotMinusiriStem3;
break;
case 198:
this.$ = { type: "IriStem", stem: $$[$0-1] } // t: 1val1iriStemMinusiriStem3;
break;
case 199:
if ($$[$0]) {
this.$ = { // t: 1val1literalStemMinusliteralStem3, 1val1literalStem
type: $$[$0].length ? "LiteralStemRange" : "LiteralStem",
stem: $$[$0-1].value
};
if ($$[$0].length)
this.$["exclusions"] = $$[$0]; // t: 1val1literalStemMinusliteral3
} else {
this.$ = $$[$0-1]; // t: 1val1LITERAL
}
break;
case 200:
this.$ = [] // t: 1val1literalStem, 1val1literalStemMinusliteral3;
break;
case 201:
this.$ = appendTo($$[$0-1], $$[$0]) // t: 1val1literalStemMinusliteral3;
break;
case 202:
this.$ = $$[$0] // t: 1val1literalStemMinusliteral3;
break;
case 205:
this.$ = [$$[$0]] // t:1val1dotMinusliteral3, 1val1dotMinusliteralStem3;
break;
case 206:
this.$ = appendTo($$[$0-1], $$[$0]) // t:1val1dotMinusliteral3, 1val1dotMinusliteralStem3;
break;
case 207:
this.$ = $$[$0].value // t: 1val1literalStemMinusliteral3;
break;
case 208:
this.$ = { type: "LiteralStem", stem: $$[$0-1].value } // t: 1val1literalStemMinusliteralStem3;
break;
case 209:
if ($$[$0]) {
this.$ = { // t: 1val1languageStemMinuslanguage3 1val1languageStemMinuslanguageStem3 : 1val1languageStem
type: $$[$0].length ? "LanguageStemRange" : "LanguageStem",
stem: $$[$0-1]
};
if ($$[$0].length)
this.$["exclusions"] = $$[$0]; // t: 1val1languageStemMinuslanguage3, 1val1languageStemMinuslanguageStem3
} else {
this.$ = { type: "Language", languageTag: $$[$0-1] }; // t: 1val1language
}
break;
case 210:
this.$ = [] // t: 1val1languageStem, 1val1languageStemMinuslanguage3;
break;
case 211:
this.$ = appendTo($$[$0-1], $$[$0]) // t: 1val1languageStemMinuslanguage3;
break;
case 212: case 217:
this.$ = $$[$0] // t: 1val1languageStemMinuslanguage3;
break;
case 215:
this.$ = [$$[$0]] // t:1val1dotMinuslanguage3, 1val1dotMinuslanguageStem3;
break;
case 216:
this.$ = appendTo($$[$0-1], $$[$0]) // t:1val1dotMinuslanguage3, 1val1dotMinuslanguageStem3;
break;
case 218:
this.$ = { type: "LanguageStem", stem: $$[$0-1] } // t: 1val1languageStemMinuslanguageStem3;
break;
case 219:
this.$ = $$[$0].substr(1);
break;
case 220:
this.$ = { type: "Inclusion", "include": $$[$0] } // t: 2groupInclude1;
break;
case 221:
this.$ = { type: "Annotation", predicate: $$[$0-1], object: $$[$0] } // t: 1dotAnnotIRIREF;
break;
case 224:
this.$ = $$[$0].length ? { semActs: $$[$0] } : null; // t: 1dotCode1/2oneOfDot;
break;
case 225:
this.$ = [] // t: 1dot, 1dotCode1;
break;
case 226:
this.$ = appendTo($$[$0-1], $$[$0]) // t: 1dotCode1;
break;
case 227:
this.$ = unescapeSemanticAction($$[$0-1], $$[$0]) // t: 1dotCode1;
break;
case 228:
this.$ = { type: "SemAct", name: $$[$0-1] } // t: 1dotNoCode1;
break;
case 230:
this.$ = $$[$0] ? extend($$[$0-1], { type: $$[$0] }) : $$[$0-1]; // t: 1val1Datatype;
break;
case 232:
this.$ = { value: "true", type: XSD_BOOLEAN } // t: 1val1true;
break;
case 233:
this.$ = { value: "false", type: XSD_BOOLEAN } // t: 1val1false;
break;
case 237:
this.$ = RDF_TYPE // t: 1AvalA;
break;
case 243:
this.$ = createLiteral($$[$0], XSD_INTEGER) // t: 1val1INTEGER;
break;
case 244:
this.$ = createLiteral($$[$0], XSD_DECIMAL) // t: 1val1DECIMAL;
break;
case 245:
this.$ = createLiteral($$[$0], XSD_DOUBLE) // t: 1val1DOUBLE;
break;
case 246:
// t: 1dot
var unesc = ShExUtil.unescapeText($$[$0].slice(1,-1), {});
this.$ = Parser._base === null || absoluteIRI.test(unesc) ? unesc : _resolveIRI(unesc)
break;
case 247:
// t:1dotPNex, 1dotPNdefault, ShExParser-test.js/with pre-defined prefixes
var namePos = $$[$0].indexOf(':');
this.$ = expandPrefix($$[$0].substr(0, namePos)) + ShExUtil.unescapeText($$[$0].substr(namePos + 1), pnameEscapeReplacements);
break;
case 248:
// t: 1dotNS2, 1dotNSdefault, ShExParser-test.js/PNAME_NS with pre-defined prefixes
this.$ = expandPrefix($$[$0].substr(0, $$[$0].length - 1));
break;
case 250:
this.$ = $$[$0] // t: 1dotInherit1, 1dot3Inherit, 1dotInherit3;
break;
case 251:
this.$ = [$$[$0]] // t: 1dotInherit1, 1dot3Inherit, 1dotInherit3;
break;
case 252:
this.$ = appendTo($$[$0-1], $$[$0]) // t: 1dotInherit3;
break;
}
},
table: [o($V0,[2,2],{3:1,4:2}),{1:[3]},o($V0,[2,3],{5:3}),{6:4,7:[2,10],8:5,9:10,10:14,11:15,14:6,15:7,16:8,17:9,18:$V1,19:$V2,20:$V3,21:$V4,22:22,23:$V5,24:16,25:17,26:$V6,29:18,30:21,31:20,181:$V7,189:23,190:$V8,191:$V9},{7:[1,29]},o($V0,[2,4]),{7:[2,11]},o($V0,[2,12]),o($V0,[2,13]),o($V0,[2,14]),o($Va,[2,7],{12:30}),{19:[1,31]},{21:[1,32]},{19:$V2,21:$V4,22:33,190:$V8},o($Va,[2,5]),o($Va,[2,6]),o($Va,[2,18]),o($Va,[2,19]),o($Va,[2,21],{30:34,181:$V7}),{27:[1,35]},o($Vb,$Vc,{32:36,33:37,35:39,39:41,34:[1,38],38:$Vd,70:$Ve,71:$Vf,72:$Vg}),o($V0,[2,22]),o($Vh,[2,239]),o($Vh,[2,240]),{19:$V2,21:$V4,22:45,190:$V8},o($Vi,[2,246]),o($Vi,[2,247]),o($Vi,[2,248]),o([7,18,19,20,21,23,26,34,38,46,49,63,64,65,70,71,72,73,84,85,86,89,90,91,92,100,101,102,103,104,105,107,109,115,118,126,131,132,145,146,147,148,149,150,177,178,181,188,190,191],[2,249]),{1:[2,1]},{7:[2,9],8:47,10:48,13:46,15:7,16:8,17:9,18:$V1,19:$V2,20:$V3,21:$V4,22:22,23:$V5,24:16,25:17,26:$V6,31:20,189:23,190:$V8,191:$V9},o($V0,[2,15]),{19:$V2,21:$V4,22:49,190:$V8},o($V0,[2,17]),o($V0,[2,23]),o($Vj,$Vk,{28:50,41:51,51:52,55:53,59:54,60:56,62:57,68:58,79:61,80:62,75:64,76:65,77:66,69:67,39:68,83:72,22:73,81:75,106:76,87:77,93:79,95:80,19:$V2,21:$V4,38:$Vl,63:$Vm,65:$Vn,70:$Ve,71:$Vf,72:$Vg,73:$Vo,84:$Vp,85:$Vq,86:$Vr,89:$Vs,90:$Vt,91:$Vu,92:$Vv,100:$Vw,101:$Vx,102:$Vy,103:$Vz,104:$VA,105:$VB,150:$VC,190:$V8}),o($Va,[2,26]),o($Va,[2,27]),o($Va,[2,28]),o($Vj,$Vk,{79:61,80:62,75:64,76:65,77:66,83:72,22:73,81:75,87:77,93:79,95:80,36:90,60:91,62:92,67:93,106:96,19:$V2,21:$V4,63:[1,94],65:[1,95],73:$Vo,84:$Vp,85:$Vq,86:$Vr,89:$Vs,90:$Vt,91:$Vu,92:$Vv,100:$Vw,101:$Vx,102:$Vy,103:$Vz,104:$VA,105:$VB,150:$VC,190:$V8}),o($Vb,[2,33],{39:97,70:$Ve,71:$Vf,72:$Vg}),{40:98,42:99,43:100,45:101,46:$VD,48:102,49:$VE},o($VF,[2,88]),o($VF,[2,89]),{19:$V2,21:$V4,22:22,31:105,189:23,190:$V8,191:$V9},{181:[1,107],182:[1,106]},o($Va,[2,8]),o($Va,[2,24]),o($Va,[2,25]),o($V0,[2,16]),o($Va,[2,20]),o($VG,[2,36]),o($VH,[2,49],{52:108}),o($VI,[2,56],{56:109}),o($VI,[2,60]),o($Vj,$Vk,{60:56,62:57,68:58,79:61,80:62,75:64,76:65,77:66,69:67,39:68,83:72,22:73,81:75,106:76,87:77,93:79,95:80,59:110,19:$V2,21:$V4,63:$Vm,65:$Vn,70:$Ve,71:$Vf,72:$Vg,73:$Vo,84:$Vp,85:$Vq,86:$Vr,89:$Vs,90:$Vt,91:$Vu,92:$Vv,100:$Vw,101:$Vx,102:$Vy,103:$Vz,104:$VA,105:$VB,150:$VC,190:$V8}),o($VI,[2,78],{69:67,39:68,106:76,68:111,70:$Ve,71:$Vf,72:$Vg,107:$Vk,115:$Vk,118:$Vk,177:$Vk}),o($VI,[2,80]),o($VI,[2,69],{79:61,80:62,83:72,87:77,66:112,60:113,84:$Vp,85:$Vq,86:$Vr,89:$Vs,90:$Vt,91:$Vu,92:$Vv}),o($Vb,$Vc,{35:39,39:41,33:114,38:$Vd,70:$Ve,71:$Vf,72:$Vg}),o($VI,[2,83]),o($VJ,[2,97],{83:72,87:77,80:115,89:$Vs,90:$Vt,91:$Vu,92:$Vv}),o($VJ,[2,99],{87:77,83:116,89:$Vs,90:$Vt,91:$Vu,92:$Vv}),o($VK,$VL,{74:117}),o($VK,$VL,{74:118}),o($VK,$VL,{74:119}),o($VI,[2,94],{93:79,95:80,81:120,100:$Vw,101:$Vx,102:$Vy,103:$Vz,104:$VA,105:$VB}),o($VF,[2,86]),o($VF,[2,87]),o($VM,[2,106]),o($VM,[2,107]),o($VM,[2,108]),o($VM,[2,104]),o([7,18,19,20,21,23,26,46,49,64,65,84,85,86,88,89,90,91,92,96,97,98,100,101,102,103,104,105,109,126,131,132,145,146,147,148,152,164,165,176,178,181,183,186,187,190,191],[2,238]),o($VN,[2,181],{151:121}),o($VO,[2,100]),{107:[1,122],112:123,113:124,114:125,115:$VP,118:$VQ,177:$VR},{88:[1,129]},o($VS,[2,112]),{88:[1,131],94:130,96:[1,132],97:[1,133],98:[1,134]},{88:[1,135]},{88:[2,113]},{88:[2,114]},{88:[2,115]},o($VT,[2,122]),o($VT,[2,123]),o($VT,[2,124]),o($VT,[2,125]),{88:[2,126]},{88:[2,127]},o($VU,$VV,{42:99,43:100,45:101,48:102,37:136,40:137,46:$VD,49:$VE}),o($VW,[2,71],{106:96,61:138,67:139,39:140,70:$Ve,71:$Vf,72:$Vg,107:$Vk,115:$Vk,118:$Vk,177:$Vk}),o($VW,[2,73]),o($VW,[2,74],{79:61,80:62,83:72,87:77,60:141,84:$Vp,85:$Vq,86:$Vr,89:$Vs,90:$Vt,91:$Vu,92:$Vv}),o($Vb,$Vc,{35:39,39:41,33:142,38:$Vd,70:$Ve,71:$Vf,72:$Vg}),o($VW,[2,77]),{107:[1,143],112:123,113:124,114:125,115:$VP,118:$VQ,177:$VR},o($VU,$VV,{42:99,43:100,45:101,48:102,40:137,37:144,46:$VD,49:$VE}),o($VU,[2,31]),o($VU,[2,37],{45:145,46:$VD}),o($VX,[2,45],{44:146,48:147,49:$VE}),o($VX,[2,40]),o($VW,[2,43]),o($Vj,$Vk,{79:61,80:62,75:64,76:65,77:66,83:72,22:73,81:75,87:77,93:79,95:80,106:96,67:139,39:140,47:148,50:149,58:150,60:152,62:153,61:154,19:$V2,21:$V4,38:$VY,63:$VZ,65:$V_,70:$Ve,71:$Vf,72:$Vg,73:$Vo,84:$Vp,85:$Vq,86:$Vr,89:$Vs,90:$Vt,91:$Vu,92:$Vv,100:$Vw,101:$Vx,102:$Vy,103:$Vz,104:$VA,105:$VB,150:$VC,190:$V8}),o($Vj,$Vk,{79:61,80:62,75:64,76:65,77:66,83:72,22:73,81:75,87:77,93:79,95:80,106:96,67:139,39:140,58:150,60:152,62:153,61:154,50:157,19:$V2,21:$V4,38:$VY,63:$VZ,65:$V_,70:$Ve,71:$Vf,72:$Vg,73:$Vo,84:$Vp,85:$Vq,86:$Vr,89:$Vs,90:$Vt,91:$Vu,92:$Vv,100:$Vw,101:$Vx,102:$Vy,103:$Vz,104:$VA,105:$VB,150:$VC,190:$V8}),o($VF,[2,90]),o($V$,[2,227]),o($V$,[2,228]),o($VG,[2,47],{53:158,46:[1,159]}),o($VH,[2,54],{57:160,49:[1,161]}),o($VI,[2,61]),o($VI,[2,79]),o($VI,[2,81]),o($VI,[2,70]),{64:[1,162]},o($VJ,[2,98],{87:77,83:116,89:$Vs,90:$Vt,91:$Vu,92:$Vv}),o($VM,[2,105]),o($VI,[2,91],{87:77,93:79,95:80,78:163,83:164,81:165,89:$Vs,90:$Vt,91:$Vu,92:$Vv,100:$Vw,101:$Vx,102:$Vy,103:$Vz,104:$VA,105:$VB}),o($VI,[2,92],{87:77,93:79,95:80,78:163,83:164,81:165,89:$Vs,90:$Vt,91:$Vu,92:$Vv,100:$Vw,101:$Vx,102:$Vy,103:$Vz,104:$VA,105:$VB}),o($VI,[2,93],{87:77,93:79,95:80,78:163,83:164,81:165,89:$Vs,90:$Vt,91:$Vu,92:$Vv,100:$Vw,101:$Vx,102:$Vy,103:$Vz,104:$VA,105:$VB}),o($VO,[2,101]),{19:$V2,21:$V4,22:172,65:[1,171],88:$V01,96:$V11,97:$V21,98:$V31,152:[1,166],153:167,154:168,155:169,156:170,166:173,171:174,176:$V41,183:$V51,185:177,186:$V61,187:$V71,190:$V8},{19:$V2,21:$V4,22:199,63:$V81,108:184,109:$V91,116:185,120:195,121:186,122:187,123:188,129:189,136:$Va1,138:191,139:192,140:$Vb1,141:194,144:196,149:$Vc1,177:$Vd1,188:$Ve1,190:$V8},o($Vj,[2,133]),o($Vj,[2,129]),o($Vj,[2,130]),o($Vj,[2,131]),{19:$V2,21:$V4,22:22,31:203,189:23,190:$V8,191:$V9,192:202},{19:$V2,21:$V4,22:199,119:204,120:205,188:$Ve1,190:$V8},o($VS,[2,111]),o($VK,[2,116]),o($VK,[2,118]),o($VK,[2,119]),o($VK,[2,120]),{99:[1,206]},o($VK,[2,117]),o($VU,[2,29]),o($VU,[2,35]),o($VW,[2,72]),o($Vf1,[2,84]),o($Vf1,[2,85]),o($VW,[2,75]),{64:[1,207]},{19:$V2,21:$V4,22:199,63:$V81,108:208,109:$V91,116:185,120:195,121:186,122:187,123:188,129:189,136:$Va1,138:191,139:192,140:$Vb1,141:194,144:196,149:$Vc1,177:$Vd1,188:$Ve1,190:$V8},o($VU,[2,30]),o($VX,[2,41]),o($VU,[2,38],{45:209,46:$VD}),o($VW,[2,44]),o($VX,[2,39]),o($VW,[2,52],{54:210}),o($VW,[2,58]),o($Vj,$Vk,{79:61,80:62,75:64,76:65,77:66,83:72,22:73,81:75,87:77,93:79,95:80,106:96,67:139,39:140,60:152,62:153,61:154,58:211,19:$V2,21:$V4,63:$VZ,65:$V_,70:$Ve,71:$Vf,72:$Vg,73:$Vo,84:$Vp,85:$Vq,86:$Vr,89:$Vs,90:$Vt,91:$Vu,92:$Vv,100:$Vw,101:$Vx,102:$Vy,103:$Vz,104:$VA,105:$VB,150:$VC,190:$V8}),o($VW,[2,62],{106:96,67:139,39:140,61:212,70:$Ve,71:$Vf,72:$Vg,107:$Vk,115:$Vk,118:$Vk,177:$Vk}),o($VW,[2,64]),o($VW,[2,65],{79:61,80:62,83:72,87:77,60:213,84:$Vp,85:$Vq,86:$Vr,89:$Vs,90:$Vt,91:$Vu,92:$Vv}),o($Vb,$Vc,{35:39,39:41,33:214,38:$Vd,70:$Ve,71:$Vf,72:$Vg}),o($VW,[2,68]),o($VW,[2,42]),o($VH,[2,50]),o($Vj,$Vk,{55:53,59:54,60:56,62:57,68:58,79:61,80:62,75:64,76:65,77:66,69:67,39:68,83:72,22:73,81:75,106:76,87:77,93:79,95:80,51:215,19:$V2,21:$V4,38:$Vl,63:$Vm,65:$Vn,70:$Ve,71:$Vf,72:$Vg,73:$Vo,84:$Vp,85:$Vq,86:$Vr,89:$Vs,90:$Vt,91:$Vu,92:$Vv,100:$Vw,101:$Vx,102:$Vy,103:$Vz,104:$VA,105:$VB,150:$VC,190:$V8}),o($VI,[2,57]),o($Vj,$Vk,{59:54,60:56,62:57,68:58,79:61,80:62,75:64,76:65,77:66,69:67,39:68,83:72,22:73,81:75,106:76,87:77,93:79,95:80,55:216,19:$V2,21:$V4,38:$Vl,63:$Vm,65:$Vn,70:$Ve,71:$Vf,72:$Vg,73:$Vo,84:$Vp,85:$Vq,86:$Vr,89:$Vs,90:$Vt,91:$Vu,92:$Vv,100:$Vw,101:$Vx,102:$Vy,103:$Vz,104:$VA,105:$VB,150:$VC,190:$V8}),o($VI,[2,82]),o($VK,[2,96]),o($VK,[2,109]),o($VK,[2,110]),o($VK,[2,180]),o($VN,[2,182]),o($VN,[2,183]),o($VN,[2,184]),o($VN,[2,185]),{157:217,158:218,159:219,162:220,165:[1,223],169:221,174:222},o($VN,[2,193],{160:224,163:225,164:[1,226]}),o($VN,[2,203],{167:227,170:228,164:[1,229]}),o($VN,[2,213],{172:230,175:231,164:[1,232]}),o($Vg1,[2,229]),o($Vg1,[2,234],{184:233,99:[1,234]}),o($Vg1,[2,231]),o($Vg1,[2,232]),o($Vg1,[2,233]),o([19,21,65,88,96,97,98,152,164,165,176,183,186,187,190],[2,219]),o($Vg1,[2,243]),o($Vg1,[2,244]),o($Vg1,[2,245]),{109:[1,235]},{109:[2,135]},{109:[2,142]},{109:[2,143],124:236,125:237,126:$Vh1},{109:[2,144]},o($Vi1,$Vj1,{130:239,133:242,135:243,131:$Vk1,132:$Vl1}),{19:$V2,21:$V4,22:245,137:244,189:246,190:$V8,191:$V9},o($Vm1,[2,165]),o($Vm1,[2,167]),o($Vm1,[2,168]),o($Vm1,[2,169]),o($Vj,$Vk,{41:51,51:52,55:53,59:54,60:56,62:57,68:58,79:61,80:62,75:64,76:65,77:66,69:67,39:68,83:72,22:73,81:75,106:76,87:77,93:79,95:80,28:247,19:$V2,21:$V4,38:$Vl,63:$Vm,65:$Vn,70:$Ve,71:$Vf,72:$Vg,73:$Vo,84:$Vp,85:$Vq,86:$Vr,89:$Vs,90:$Vt,91:$Vu,92:$Vv,100:$Vw,101:$Vx,102:$Vy,103:$Vz,104:$VA,105:$VB,150:$VC,190:$V8}),{19:$V2,21:$V4,22:199,120:248,188:$Ve1,190:$V8},{19:$V2,21:$V4,22:199,63:$V81,120:195,122:253,123:251,127:249,128:250,129:252,136:$Va1,138:191,139:192,140:$Vb1,141:194,144:196,149:$Vc1,177:$Vd1,188:$Ve1,190:$V8},{19:$V2,21:$V4,22:245,137:254,189:246,190:$V8,191:$V9},o($Vn1,[2,236]),o($Vn1,[2,237]),o([19,21,188,190],[2,179]),o($Vj,[2,250],{22:22,189:23,31:255,19:$V2,21:$V4,190:$V8,191:$V9}),o($Vo1,[2,251]),o($Vj,[2,139],{22:199,120:256,19:$V2,21:$V4,188:$Ve1,190:$V8}),o($Vp1,[2,140]),{19:$V2,21:$V4,22:73,75:257,190:$V8},o($VW,[2,76]),{109:[1,258]},o($VX,[2,46]),o($VX,[2,51],{48:259,49:$VE}),o($VW,[2,59]),o($VW,[2,63]),o($VW,[2,66]),{64:[1,260]},o($VH,[2,48]),o($VI,[2,55]),o($VN,[2,186],{162:261,165:$Vq1}),o($VN,[2,187],{169:263,165:$Vr1}),o($VN,[2,188],{174:265,165:$Vs1}),o($Vt1,[2,195]),o($Vt1,[2,205]),o($Vt1,[2,215]),{19:$V2,21:$V4,22:267,88:$V01,96:$V11,97:$V21,98:$V31,166:268,171:269,176:$V41,183:$V51,185:177,186:$V61,187:$V71,190:$V8},o($VN,[2,189]),o($VN,[2,194]),o($Vt1,[2,190],{161:270}),o($VN,[2,199]),o($VN,[2,204]),o($Vt1,[2,200],{168:271}),o($VN,[2,209]),o($VN,[2,214]),o($Vt1,[2,210],{173:272}),o($Vg1,[2,230]),{19:$V2,21:$V4,22:73,75:273,190:$V8},o($VF,[2,138]),o([64,109],[2,145],{125:274,126:$Vh1}),o($Vi1,[2,147]),{19:$V2,21:$V4,22:199,63:$V81,120:195,122:275,129:189,136:$Va1,138:191,139:192,140:$Vb1,141:194,144:196,149:$Vc1,177:$Vd1,188:$Ve1,190:$V8},o($Vi1,[2,151]),o($Vi1,[2,153],{138:191,139:192,141:194,120:195,144:196,22:199,129:276,19:$V2,21:$V4,63:$V81,136:$Va1,140:$Vb1,149:$Vc1,177:$Vd1,188:$Ve1,190:$V8}),o($Vi1,[2,154],{138:191,139:192,141:194,120:195,144:196,22:199,129:277,19:$V2,21:$V4,63:$V81,136:$Va1,140:$Vb1,149:$Vc1,177:$Vd1,188:$Ve1,190:$V8}),o($Vi1,$Vu1,{134:278,135:279,131:$Vv1,132:$Vw1}),o($Vm1,[2,162]),{19:$V2,21:$V4,22:199,63:$V81,120:195,138:282,139:283,144:196,149:$Vc1,188:$Ve1,190:$V8},o($Vx1,[2,241]),o($Vx1,[2,242]),o($Vy1,$Vz1,{142:284,143:285,145:$VA1,146:$VB1,147:$VC1,148:$VD1}),o($Vj,$Vk,{41:51,51:52,55:53,59:54,60:56,62:57,68:58,79:61,80:62,75:64,76:65,77:66,69:67,39:68,83:72,22:73,81:75,106:76,87:77,93:79,95:80,28:290,19:$V2,21:$V4,38:$Vl,63:$Vm,65:$Vn,70:$Ve,71:$Vf,72:$Vg,73:$Vo,84:$Vp,85:$Vq,86:$Vr,89:$Vs,90:$Vt,91:$Vu,92:$Vv,100:$Vw,101:$Vx,102:$Vy,103:$Vz,104:$VA,105:$VB,150:$VC,190:$V8}),{64:[1,291]},{64:[2,149]},{64:[2,150]},{126:$Vj1,130:239,131:$Vk1,132:$Vl1,133:292,135:243},{124:236,125:237,126:$Vh1},o($Vm1,[2,220]),o($Vo1,[2,252]),o($Vp1,[2,141]),o($VK,[2,121]),o([7,18,19,20,21,23,26,46,49,64,84,85,86,89,90,91,92,178,181,190,191],$VE1,{110:293}),o($VW,[2,53]),o($VW,[2,67]),o($Vt1,[2,196]),{19:$V2,21:$V4,22:267,190:$V8},o($Vt1,[2,206]),{88:$V01,96:$V11,97:$V21,98:$V31,166:268,183:$V51,185:177,186:$V61,187:$V71},o($Vt1,[2,216]),{171:269,176:$V41},o($Vt1,[2,197],{164:[1,294]}),o($Vt1,[2,207],{164:[1,295]}),o($Vt1,[2,217],{164:[1,296]}),o($VN,[2,192],{162:297,165:$Vq1}),o($VN,[2,202],{169:298,165:$Vr1}),o($VN,[2,212],{174:299,165:$Vs1}),o($Vg1,[2,235]),o($Vi1,[2,148]),o($Vi1,[2,146]),o($Vm1,[2,160]),o($Vm1,[2,161]),o($Vi1,$VF1),o($Vm1,[2,163]),o($Vi1,[2,157],{138:191,139:192,141:194,120:195,144:196,22:199,129:276,19:$V2,21:$V4,63:$V81,136:$Va1,140:$Vb1,149:$Vc1,177:$Vd1,188:$Ve1,190:$V8}),o($Vi1,[2,158],{138:191,139:192,141:194,120:195,144:196,22:199,129:277,19:$V2,21:$V4,63:$V81,136:$Va1,140:$Vb1,149:$Vc1,177:$Vd1,188:$Ve1,190:$V8}),o($Vm1,[2,164]),o($Vm1,[2,166]),o($Vy1,$VE1,{110:300}),o($Vy1,[2,172]),o($Vy1,[2,175]),o($Vy1,[2,176]),o($Vy1,[2,177]),o($Vy1,[2,178]),o($Vy1,$Vz1,{143:285,142:301,145:$VA1,146:$VB1,147:$VC1,148:$VD1}),o($Vy1,$Vz1,{143:285,142:302,145:$VA1,146:$VB1,147:$VC1,148:$VD1}),o([64,126],$Vu1,{135:279,134:303,131:$Vv1,132:$Vw1}),o([7,18,19,20,21,23,26,46,49,64,84,85,86,89,90,91,92,181,190,191],$VG1,{111:304,117:305,180:306,178:$VH1}),o($Vt1,[2,198]),o($Vt1,[2,208]),o($Vt1,[2,218]),o($Vt1,[2,191]),o($Vt1,[2,201]),o($Vt1,[2,211]),o($VI1,$VG1,{117:305,180:306,111:308,178:$VH1}),o($Vy1,$VE1,{110:309}),o($Vy1,$VE1,{110:310}),{64:[2,159],126:$VF1},o($Vf1,[2,128]),o($VJ1,[2,137]),o([7,18,19,20,21,23,26,46,49,64,84,85,86,89,90,91,92,109,126,131,132,190,191],[2,224],{30:311,181:$V7}),{19:$V2,21:$V4,22:199,120:312,188:$Ve1,190:$V8},o($Vm1,[2,173]),o($VI1,$VG1,{117:305,180:306,111:313,178:$VH1}),o($VI1,$VG1,{117:305,180:306,111:314,178:$VH1}),o($V$,[2,226]),{19:$V2,21:$V4,22:316,88:$V01,96:$V11,97:$V21,98:$V31,166:317,179:315,183:$V51,185:177,186:$V61,187:$V71,190:$V8},o($Vm1,[2,174]),o($Vm1,[2,170]),o($VJ1,[2,221]),o($VJ1,[2,222]),o($VJ1,[2,223])],
defaultActions: {6:[2,11],29:[2,1],81:[2,113],82:[2,114],83:[2,115],88:[2,126],89:[2,127],185:[2,135],186:[2,142],188:[2,144],250:[2,149],251:[2,150]},
parseError: function parseError(str, hash) {
if (hash.recoverable) {
this.trace(str);
} else {
function _parseError (msg, hash) {
this.message = msg;
this.hash = hash;
}
_parseError.prototype = new Error();
throw new _parseError(str, hash);
}
},
parse: function parse(input) {
var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
var args = lstack.slice.call(arguments, 1);
var lexer = Object.create(this.lexer);
var sharedState = { yy: {} };
for (var k in this.yy) {
if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
sharedState.yy[k] = this.yy[k];
}
}
lexer.setInput(input, sharedState.yy);
sharedState.yy.lexer = lexer;
sharedState.yy.parser = this;
if (typeof lexer.yylloc == 'undefined') {
lexer.yylloc = {};
}
var yyloc = lexer.yylloc;
lstack.push(yyloc);
var ranges = lexer.options && lexer.options.ranges;
if (typeof sharedState.yy.parseError === 'function') {
this.parseError = sharedState.yy.parseError;
} else {
this.parseError = Object.getPrototypeOf(this).parseError;
}
function popStack(n) {
stack.length = stack.length - 2 * n;
vstack.length = vstack.length - n;
lstack.length = lstack.length - n;
}
_token_stack:
var lex = function () {
var token;
token = lexer.lex() || EOF;
if (typeof token !== 'number') {
token = self.symbols_[token] || token;
}
return token;
};
var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
while (true) {
state = stack[stack.length - 1];
if (this.defaultActions[state]) {
action = this.defaultActions[state];
} else {
if (symbol === null || typeof symbol == 'undefined') {
symbol = lex();
}
action = table[state] && table[state][symbol];
}
if (typeof action === 'undefined' || !action.length || !action[0]) {
var errStr = '';
expected = [];
for (p in table[state]) {
if (this.terminals_[p] && p > TERROR) {
expected.push('\'' + this.terminals_[p] + '\'');
}
}
if (lexer.showPosition) {
errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
} else {
errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
}
this.parseError(errStr, {
text: lexer.match,
token: this.terminals_[symbol] || symbol,
line: lexer.yylineno,
loc: yyloc,
expected: expected
});
}
if (action[0] instanceof Array && action.length > 1) {
throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
}
switch (action[0]) {
case 1:
stack.push(symbol);
vstack.push(lexer.yytext);
lstack.push(lexer.yylloc);
stack.push(action[1]);
symbol = null;
if (!preErrorSymbol) {
yyleng = lexer.yyleng;
yytext = lexer.yytext;
yylineno = lexer.yylineno;
yyloc = lexer.yylloc;
if (recovering > 0) {
recovering--;
}
} else {
symbol = preErrorSymbol;
preErrorSymbol = null;
}
break;
case 2:
len = this.productions_[action[1]][1];
yyval.$ = vstack[vstack.length - len];
yyval._$ = {
first_line: lstack[lstack.length - (len || 1)].first_line,
last_line: lstack[lstack.length - 1].last_line,
first_column: lstack[lstack.length - (len || 1)].first_column,
last_column: lstack[lstack.length - 1].last_column
};
if (ranges) {
yyval._$.range = [
lstack[lstack.length - (len || 1)].range[0],
lstack[lstack.length - 1].range[1]
];
}
r = this.performAction.apply(yyval, [
yytext,
yyleng,
yylineno,
sharedState.yy,
action[1],
vstack,
lstack
].concat(args));
if (typeof r !== 'undefined') {
return r;
}
if (len) {
stack = stack.slice(0, -1 * len * 2);
vstack = vstack.slice(0, -1 * len);
lstack = lstack.slice(0, -1 * len);
}
stack.push(this.productions_[action[1]][0]);
vstack.push(yyval.$);
lstack.push(yyval._$);
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
stack.push(newState);
break;
case 3:
return true;
}
}
return true;
}};
/*
ShEx parser in the Jison parser generator format.
*/
var UNBOUNDED = -1;
var ShExUtil = require("./ShExUtil");
// Common namespaces and entities
var RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
RDF_TYPE = RDF + 'type',
RDF_FIRST = RDF + 'first',
RDF_REST = RDF + 'rest',
RDF_NIL = RDF + 'nil',
XSD = 'http://www.w3.org/2001/XMLSchema#',
XSD_INTEGER = XSD + 'integer',
XSD_DECIMAL = XSD + 'decimal',
XSD_FLOAT = XSD + 'float',
XSD_DOUBLE = XSD + 'double',
XSD_BOOLEAN = XSD + 'boolean',
XSD_TRUE = '"true"^^' + XSD_BOOLEAN,
XSD_FALSE = '"false"^^' + XSD_BOOLEAN,
XSD_PATTERN = XSD + 'pattern',
XSD_MININCLUSIVE = XSD + 'minInclusive',
XSD_MINEXCLUSIVE = XSD + 'minExclusive',
XSD_MAXINCLUSIVE = XSD + 'maxInclusive',
XSD_MAXEXCLUSIVE = XSD + 'maxExclusive',
XSD_LENGTH = XSD + 'length',
XSD_MINLENGTH = XSD + 'minLength',
XSD_MAXLENGTH = XSD + 'maxLength',
XSD_TOTALDIGITS = XSD + 'totalDigits',
XSD_FRACTIONDIGITS = XSD + 'fractionDigits';
var numericDatatypes = [
XSD + "integer",
XSD + "decimal",
XSD + "float",
XSD + "double",
XSD + "string",
XSD + "boolean",
XSD + "dateTime",
XSD + "nonPositiveInteger",
XSD + "negativeInteger",
XSD + "long",
XSD + "int",
XSD + "short",
XSD + "byte",
XSD + "nonNegativeInteger",
XSD + "unsignedLong",
XSD + "unsignedInt",
XSD + "unsignedShort",
XSD + "unsignedByte",
XSD + "positiveInteger"
];
var absoluteIRI = /^[a-z][a-z0-9+.-]*:/i,
schemeAuthority = /^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i,
dotSegments = /(?:^|\/)\.\.?(?:$|[\/#?])/;
var numericFacets = ["mininclusive", "minexclusive",
"maxinclusive", "maxexclusive"];
// Returns a lowercase version of the given string
function lowercase(string) {
return string.toLowerCase();
}
// Appends the item to the array and returns the array
function appendTo(array, item) {
return array.push(item), array;
}
// Appends the items to the array and returns the array
function appendAllTo(array, items) {
return array.push.apply(array, items), array;
}
// Extends a base object with properties of other objects
function extend(base) {
if (!base) base = {};
for (var i = 1, l = arguments.length, arg; i < l && (arg = arguments[i] || {}); i++)
for (var name in arg)
base[name] = arg[name];
return base;
}
// Creates an array that contains all items of the given arrays
function unionAll() {
var union = [];
for (var i = 0, l = arguments.length; i < l; i++)
union = union.concat.apply(union, arguments[i]);
return union;
}
// N3.js:lib/N3Parser.js<0.4.5>:58 with
// s/this\./Parser./g
// ### `_setBase` sets the base IRI to resolve relative IRIs.
Parser._setBase = function (baseIRI) {
if (!baseIRI)
baseIRI = null;
// baseIRI '#' check disabled to allow -x 'data:text/shex,...#'
// else if (baseIRI.indexOf('#') >= 0)
// throw new Error('Invalid base IRI ' + baseIRI);
// Set base IRI and its components
if (Parser._base = baseIRI) {
Parser._basePath = baseIRI.replace(/[^\/?]*(?:\?.*)?$/, '');
baseIRI = baseIRI.match(schemeAuthority);
Parser._baseRoot = baseIRI[0];
Parser._baseScheme = baseIRI[1];
}
}
// N3.js:lib/N3Parser.js<0.4.5>:576 with
// s/this\./Parser./g
// s/token/iri/
// ### `_resolveIRI` resolves a relative IRI token against the base path,
// assuming that a base path has been set and that the IRI is indeed relative.
function _resolveIRI (iri) {
switch (iri[0]) {
// An empty relative IRI indicates the base IRI
case undefined: return Parser._base;
// Resolve relative fragment IRIs against the base IRI
case '#': return Parser._base + iri;
// Resolve relative query string IRIs by replacing the query string
case '?': return Parser._base.replace(/(?:\?.*)?$/, iri);
// Resolve root-relative IRIs at the root of the base IRI
case '/':
// Resolve scheme-relative IRIs to the scheme
return (iri[1] === '/' ? Parser._baseScheme : Parser._baseRoot) + _removeDotSegments(iri);
// Resolve all other IRIs at the base IRI's path
default: {
return _removeDotSegments(Parser._basePath + iri);
}
}
}
// ### `_removeDotSegments` resolves './' and '../' path segments in an IRI as per RFC3986.
function _removeDotSegments (iri) {
// Don't modify the IRI if it does not contain any dot segments
if (!dotSegments.test(iri))
return iri;
// Start with an imaginary slash before the IRI in order to resolve trailing './' and '../'
var result = '', length = iri.length, i = -1, pathStart = -1, segmentStart = 0, next = '/';
while (i < length) {
switch (next) {
// The path starts with the first slash after the authority
case ':':
if (pathStart < 0) {
// Skip two slashes before the authority
if (iri[++i] === '/' && iri[++i] === '/')
// Skip to slash after the authority
while ((pathStart = i + 1) < length && iri[pathStart] !== '/')
i = pathStart;
}
break;
// Don't modify a query string or fragment
case '?':
case '#':
i = length;
break;
// Handle '/.' or '/..' path segments
case '/':
if (iri[i + 1] === '.') {
next = iri[++i + 1];
switch (next) {
// Remove a '/.' segment
case '/':
result += iri.substring(segmentStart, i - 1);
segmentStart = i + 1;
break;
// Remove a trailing '/.' segment
case undefined:
case '?':
case '#':
return result + iri.substring(segmentStart, i) + iri.substr(i + 1);
// Remove a '/..' segment
case '.':
next = iri[++i + 1];
if (next === undefined || next === '/' || next === '?' || next === '#') {
result += iri.substring(segmentStart, i - 2);
// Try to remove the parent path from result
if ((segmentStart = result.lastIndexOf('/')) >= pathStart)
result = result.substr(0, segmentStart);
// Remove a trailing '/..' segment
if (next !== '/')
return result + '/' + iri.substr(i + 1);
segmentStart = i + 1;
}
}
}
}
next = iri[++i];
}
return result + iri.substring(segmentStart);
}
// Creates an expression with the given type and attributes
function expression(expr, attr) {
var expression = { expression: expr };
if (attr)
for (var a in attr)
expression[a] = attr[a];
return expression;
}
// Creates a path with the given type and items
function path(type, items) {
return { type: 'path', pathType: type, items: items };
}
// Creates a literal with the given value and type
function createLiteral(value, type) {
return { value: value, type: type };
}
// Creates a new blank node identifier
function blank() {
return '_:b' + blankId++;
};
var blankId = 0;
Parser._resetBlanks = function () { blankId = 0; }
Parser.reset = function () {
Parser._prefixes = Parser._imports = Parser.valueExprDefns = Parser.shapes = Parser.productions = Parser.start = Parser.startActs = null; // Reset state.
Parser._base = Parser._baseIRI = Parser._baseIRIPath = Parser._baseIRIRoot = null;
}
var _fileName; // for debugging
Parser._setFileName = function (fn) { _fileName = fn; }
// Regular expression and replacement strings to escape strings
var stringEscapeReplacements = { '\\': '\\', "'": "'", '"': '"',
't': '\t', 'b': '\b', 'n': '\n', 'r': '\r', 'f': '\f' },
semactEscapeReplacements = { '\\': '\\', '%': '%' },
pnameEscapeReplacements = {
'\\': '\\', "'": "'", '"': '"',
'n': '\n', 'r': '\r', 't': '\t', 'f': '\f', 'b': '\b',
'_': '_', '~': '~', '.': '.', '-': '-', '!': '!', '$': '$', '&': '&',
'(': '(', ')': ')', '*': '*', '+': '+', ',': ',', ';': ';', '=': '=',
'/': '/', '?': '?', '#': '#', '@': '@', '%': '%',
};
// Translates string escape codes in the string into their textual equivalent
function unescapeString(string, trimLength) {
string = string.substring(trimLength, string.length - trimLength);
return { value: ShExUtil.unescapeText(string, stringEscapeReplacements) };
}
function unescapeLangString(string, trimLength) {
var at = string.lastIndexOf("@");
var lang = string.substr(at);
string = string.substr(0, at);
var u = unescapeString(string, trimLength);
return extend(u, { language: lowercase(lang.substr(1)) });
}
// Translates regular expression escape codes in the string into their textual equivalent
function unescapeRegexp (regexp) {
var end = regexp.lastIndexOf("/");
var s = regexp.substr(1, end-1);
var regexpEscapeReplacements = {
'.': "\\.", '\\': "\\\\", '?': "\\?", '*': "\\*", '+': "\\+",
'{': "\\{", '}': "\\}", '(': "\\(", ')': "\\)", '|': "\\|",
'^': "\\^", '$': "\\$", '[': "\\[", ']': "\\]", '/': "\\/",
't': '\\t', 'n': '\\n', 'r': '\\r', '-': "\\-", '/': '/'
};
s = ShExUtil.unescapeText(s, regexpEscapeReplacements)
var ret = {
pattern: s
};
if (regexp.length > end+1)
ret.flags = regexp.substr(end+1);
return ret;
}
// Convenience function to return object with p1 key, value p2
function keyValObject(key, val) {
var ret = {};
ret[key] = val;
return ret;
}
// Return object with p1 key, p2 string value
function unescapeSemanticAction(key, string) {
string = string.substring(1, string.length - 2);
return {
type: "SemAct",
name: key,
code: ShExUtil.unescapeText(string, semactEscapeReplacements)
};
}
function error (msg) {
Parser.reset();
throw new Error(msg);
}
// Expand declared prefix or throw Error
function expandPrefix (prefix) {
if (!(prefix in Parser._prefixes))
error('Parse error; unknown prefix: ' + prefix);
return Parser._prefixes[prefix];
}
// Add a shape to the map
function addShape (label, shape) {
if (Parser.productions && label in Parser.productions)
error("Structural error: "+label+" is a shape");
if (!Parser.shapes)
Parser.shapes = {};
if (label in Parser.shapes) {
if (Parser.options.duplicateShape === "replace")
Parser.shapes[label] = shape;
else if (Parser.options.duplicateShape !== "ignore")
error("Parse error: "+label+" already defined");
} else
Parser.shapes[label] = shape;
}
// Add a production to the map
function addProduction (label, production) {
if (Parser.shapes && label in Parser.shapes)
error("Structural error: "+label+" is a shape");
if (!Parser.productions)
Parser.productions = {};
if (label in Parser.productions) {
if (Parser.options.duplicateShape === "replace")
Parser.productions[label] = production;
else if (Parser.options.duplicateShape !== "ignore")
error("Parse error: "+label+" already defined");
} else
Parser.productions[label] = production;
}
function shapeJunction (type, container, elts) {
if (elts.length === 0) {
return container;
} else if (container.type === type) {
container.shapeExprs = container.shapeExprs.concat(elts);
return container;
} else {
return { type: type, shapeExprs: [container].concat(elts) };
}
}
var EmptyObject = { };
var EmptyShape = { type: "Shape" };
/* generated by jison-lex 0.3.4 */
var lexer = (function(){
var lexer = ({
EOF:1,
parseError:function parseError(str, hash) {
if (this.yy.parser) {
this.yy.parser.parseError(str, hash);
} else {
throw new Error(str);
}
},
// resets the lexer, sets new input
setInput:function (input, yy) {
this.yy = yy || this.yy || {};
this._input = input;
this._more = this._backtrack = this.done = false;
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
};
if (this.options.ranges) {
this.yylloc.range = [0,0];
}
this.offset = 0;
return this;
},
// consumes and returns one char from the input
input:function () {
var ch = this._input[0];
this.yytext += ch;
this.yyleng++;
this.offset++;
this.match += ch;
this.matched += ch;
var lines = ch.match(/(?:\r\n?|\n).*/g);
if (lines) {
this.yylineno++;
this.yylloc.last_line++;
} else {
this.yylloc.last_column++;
}
if (this.options.ranges) {
this.yylloc.range[1]++;
}
this._input = this._input.slice(1);
return ch;
},
// unshifts one char (or a string) into the input
unput:function (ch) {
var len = ch.length;
var lines = ch.split(/(?:\r\n?|\n)/g);
this._input = ch + this._input;
this.yytext = this.yytext.substr(0, this.yytext.length - len);
//this.yyleng -= len;
this.offset -= len;
var oldLines = 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);
if (lines.length - 1) {
this.yylineno -= lines.length - 1;
}
var r = this.yylloc.range;
this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: lines ?
(lines.length === oldLines.length ? this.yylloc.first_column : 0)
+ oldLines[oldLines.length - lines.length].length - lines[0].length :
this.yylloc.first_column - len
};
if (this.options.ranges) {
this.yylloc.range = [r[0], r[0] + this.yyleng - len];
}
this.yyleng = this.yytext.length;
return this;
},
// When called from action, caches matched text and appends it on next action
more:function () {
this._more = true;
return this;
},
// 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.
reject:function () {
if (this.options.backtrack_lexer) {
this._backtrack = true;
} else {
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(), {
text: "",
token: null,
line: this.yylineno
});
}
return this;
},
// retain first n characters of the match
less:function (n) {
this.unput(this.match.slice(n));
},
// displays already matched input, i.e. for error messages
pastInput:function () {
var past = this.matched.substr(0, this.matched.length - this.match.length);
return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
},
// displays upcoming input, i.e. for error messages
upcomingInput:function () {
var next = this.match;
if (next.length < 20) {
next += this._input.substr(0, 20-next.length);
}
return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
},
// displays the character position where the lexing error occurred, i.e. for error messages
showPosition:function () {
var pre = this.pastInput();
var c = new Array(pre.length + 1).join("-");
return pre + this.upcomingInput() + "\n" + c + "^";
},
// test the lexed token: return FALSE when not a match, otherwise return token
test_match:function (match, indexed_rule) {
var token,
lines,
backup;
if (this.options.backtrack_lexer) {
// save context
backup = {
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
};
if (this.options.ranges) {
backup.yylloc.range = this.yylloc.range.slice(0);
}
}
lines = match[0].match(/(?:\r\n?|\n).*/g);
if (lines) {
this.yylineno += lines.length;
}
this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: lines ?
lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
this.yylloc.last_column + match[0].length
};
this.yytext += match[0];
this.match += match[0];
this.matches = match;
this.yyleng = this.yytext.length;
if (this.options.ranges) {
this.yylloc.range = [this.offset, this.offset += this.yyleng];
}
this._more = false;
this._backtrack = false;
this._input = this._input.slice(match[0].length);
this.matched += match[0];
token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
if (this.done && this._input) {
this.done = false;
}
if (token) {
return token;
} else if (this._backtrack) {
// recover context
for (var k in backup) {
this[k] = backup[k];
}
return false; // rule action called reject() implying the next rule should be tested instead.
}
return false;
},
// return next match in input
next:function () {
if (this.done) {
return this.EOF;
}
if (!this._input) {
this.done = true;
}
var token,
match,
tempMatch,
index;
if (!this._more) {
this.yytext = '';
this.match = '';
}
var rules = this._currentRules();
for (var i = 0; i < rules.length; i++) {
tempMatch = this._input.match(this.rules[rules[i]]);
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
match = tempMatch;
index = i;
if (this.options.backtrack_lexer) {
token = this.test_match(tempMatch, rules[i]);
if (token !== false) {
return token;
} else if (this._backtrack) {
match = false;
continue; // rule action called reject() implying a rule MISmatch.
} else {
// else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
return false;
}
} else if (!this.options.flex) {
break;
}
}
}
if (match) {
token = this.test_match(match, rules[index]);
if (token !== false) {
return token;
}
// else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
return false;
}
if (this._input === "") {
return this.EOF;
} else {
return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
}
},
// return next match that has a token
lex:function lex() {
var r = this.next();
if (r) {
return r;
} else {
return this.lex();
}
},
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
begin:function begin(condition) {
this.conditionStack.push(condition);
},
// pop the previously active lexer condition state off the condition stack
popState:function popState() {
var n = this.conditionStack.length - 1;
if (n > 0) {
return this.conditionStack.pop();
} else {
return this.conditionStack[0];
}
},
// produce the lexer rule set which is active for the currently active lexer condition state
_currentRules:function _currentRules() {
if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
} else {
return this.conditions["INITIAL"].rules;
}
},
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
topState:function topState(n) {
n = this.conditionStack.length - 1 - Math.abs(n || 0);
if (n >= 0) {
return this.conditionStack[n];
} else {
return "INITIAL";
}
},
// alias for begin(condition)
pushState:function pushState(condition) {
this.begin(condition);
},
// return the number of states currently on the stack
stateStackSize:function stateStackSize() {
return this.conditionStack.length;
},
options: {},
performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
var YYSTATE=YY_START;
switch($avoiding_name_collisions) {
case 0:/**/
break;
case 1:return 70;
break;
case 2:return 71;
break;
case 3:return 176;
break;
case 4:return 72;
break;
case 5:return 190;
break;
case 6:return 148;
break;
case 7:return 97;
break;
case 8:return 96;
break;
case 9:return 88;
break;
case 10:return 'ANON';
break;
case 11:return 19;
break;
case 12:return 21;
break;
case 13:return 188;
break;
case 14:return 89;
break;
case 15:return 191;
break;
case 16:return 182;
break;
case 17: yy_.yytext = unescapeLangString(yy_.yytext, 3); return 183;
break;
case 18: yy_.yytext = unescapeLangString(yy_.yytext, 3); return 183;
break;
case 19: yy_.yytext = unescapeLangString(yy_.yytext, 1); return 183;
break;
case 20: yy_.yytext = unescapeLangString(yy_.yytext, 1); return 183;
break;
case 21: yy_.yytext = unescapeString(yy_.yytext, 3); return 98;
break;
case 22: yy_.yytext = unescapeString(yy_.yytext, 3); return 98;
break;
case 23: yy_.yytext = unescapeString(yy_.yytext, 1); return 98;
break;
case 24: yy_.yytext = unescapeString(yy_.yytext, 1); return 98;
break;
case 25:return 18;
break;
case 26:return 20;
break;
case 27:return 23;
break;
case 28:return 26;
break;
case 29:return 34;
break;
case 30:return 'IT_VIRTUAL';
break;
case 31:return 115;
break;
case 32:return 118;
break;
case 33:return 73;
break;
case 34:return 85;
break;
case 35:return 84;
break;
case 36:return 86;
break;
case 37:return 49;
break;
case 38:return 46;
break;
case 39:return 38;
break;
case 40:return 100;
break;
case 41:return 101;
break;
case 42:return 102;
break;
case 43:return 103;
break;
case 44:return 90;
break;
case 45:return 91;
break;
case 46:return 92;
break;
case 47:return 104;
break;
case 48:return 105;
break;
case 49:return 27;
break;
case 50:return 178;
break;
case 51:return 107;
break;
case 52:return 109;
break;
case 53:return 177;
break;
case 54:return '||';
break;
case 55:return 126;
break;
case 56:return 131;
break;
case 57:return 63;
break;
case 58:return 64;
break;
case 59:return 150;
break;
case 60:return 152;
break;
case 61:return 136;
break;
case 62:return '!';
break;
case 63:return 99;
break;
case 64:return 149;
break;
case 65:return 65;
break;
case 66:return 164;
break;
case 67:return 132;
break;
case 68:return 145;
break;
case 69:return 146;
break;
case 70:return 147;
break;
case 71:return 165;
break;
case 72:return 181;
break;
case 73:return 186;
break;
case 74:return 187;
break;
case 75:return 7;
break;
case 76:return 'unexpected word "'+yy_.yytext+'"';
break;
case 77:return 'invalid character '+yy_.yytext;
break;
}
},
rules: [/^(?:\s+|(#[^\u000a\u000d]*))/,/^(?:(@(((([A-Z]|[a-z]|[\u00c0-\u00d6]|[\u00d8-\u00f6]|[\u00f8-\u02ff]|[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|[\u2c00-\u2fef]|[\u3001-\ud7ff]|[\uf900-\ufdcf]|[\ufdf0-\ufffd]|[\uD800-\uDB7F][\uDC00-\uDFFF])((((([A-Z]|[a-z]|[\u00c0-\u00d6]|[\u00d8-\u00f6]|[\u00f8-\u02ff]|[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|[\u2c00-\u2fef]|[\u3001-\ud7ff]|[\uf900-\ufdcf]|[\ufdf0-\ufffd]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_|_\b)|-|[0-9]|[\u00b7]|[\u0300-\u036f]|[\u203f-\u2040])|\.)*((([A-Z]|[a-z]|[\u00c0-\u00d6]|[\u00d8-\u00f6]|[\u00f8-\u02ff]|[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|[\u2c00-\u2fef]|[\u3001-\ud7ff]|[\uf900-\ufdcf]|[\ufdf0-\ufffd]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_|_\b)|-|[0-9]|[\u00b7]|[\u0300-\u036f]|[\u203f-\u2040]))?)?:)(((([A-Z]|[a-z]|[\u00c0-\u00d6]|[\u00d8-\u00f6]|[\u00f8-\u02ff]|[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|[\u2c00-\u2fef]|[\u3001-\ud7ff]|[\uf900-\ufdcf]|[\ufdf0-\ufffd]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_|_\b)|:|[0-9]|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))(((([A-Z]|[a-z]|[\u00c0-\u00d6]|[\u00d8-\u00f6]|[\u00f8-\u02ff]|[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|[\u2c00-\u2fef]|[\u3001-\ud7ff]|[\uf900-\ufdcf]|[\ufdf0-\ufffd]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_|_\b)|-|[0-9]|[\u00b7]|[\u0300-\u036f]|[\u203f-\u2040])|\.|:|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))*))))/,/^(?:(@((([A-Z]|[a-z]|[\u00c0-\u00d6]|[\u00d8-\u00f6]|[\u00f8-\u02ff]|[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|[\u2c00-\u2fef]|[\u3001-\ud7ff]|[\uf900-\ufdcf]|[\ufdf0-\ufffd]|[\uD800-\uDB7F][\uDC00-\uDFFF])((((([A-Z]|[a-z]|[\u00c0-\u00d6]|[\u00d8-\u00f6]|[\u00f8-\u02ff]|[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|[\u2c00-\u2fef]|[\u3001-\ud7ff]|[\uf900-\ufdcf]|[\ufdf0-\ufffd]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_|_\b)|-|[0-9]|[\u00b7]|[\u0300-\u036f]|[\u203f-\u2040])|\.)*((([A-Z]|[a-z]|[\u00c0-\u00d6]|[\u00d8-\u00f6]|[\u00f8-\u02ff]|[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|[\u2c00-\u2fef]|[\u3001-\ud7ff]|[\uf900-\ufdcf]|[\ufdf0-\ufffd]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_|_\b)|-|[0-9]|[\u00b7]|[\u0300-\u036f]|[\u203f-\u2040]))?)?:)))/,/^(?:(@([A-Za-z])+((-([0-9A-Za-z])+))*))/,/^(?:@)/,/^(?:(((([A-Z]|[a-z]|[\u00c0-\u00d6]|[\u00d8-\u00f6]|[\u00f8-\u02ff]|[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|[\u2c00-\u2fef]|[\u3001-\ud7ff]|[\uf900-\ufdcf]|[\ufdf0-\ufffd]|[\uD800-\uDB7F][\uDC00-\uDFFF])((((([A-Z]|[a-z]|[\u00c0-\u00d6]|[\u00d8-\u00f6]|[\u00f8-\u02ff]|[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|[\u2c00-\u2fef]|[\u3001-\ud7ff]|[\uf900-\ufdcf]|[\ufdf0-\ufffd]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_|_\b)|-|[0-9]|[\u00b7]|[\u0300-\u036f]|[\u203f-\u2040])|\.)*((([A-Z]|[a-z]|[\u00c0-\u00d6]|[\u00d8-\u00f6]|[\u00f8-\u02ff]|[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|[\u2c00-\u2fef]|[\u3001-\ud7ff]|[\uf900-\ufdcf]|[\ufdf0-\ufffd]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_|_\b)|-|[0-9]|[\u00b7]|[\u0300-\u036f]|[\u203f-\u2040]))?)?:)(((([A-Z]|[a-z]|[\u00c0-\u00d6]|[\u00d8-\u00f6]|[\u00f8-\u02ff]|[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|[\u2c00-\u2fef]|[\u3001-\ud7ff]|[\uf900-\ufdcf]|[\ufdf0-\ufffd]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_|_\b)|:|[0-9]|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))(((([A-Z]|[a-z]|[\u00c0-\u00d6]|[\u00d8-\u00f6]|[\u00f8-\u02ff]|[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|[\u2c00-\u2fef]|[\u3001-\ud7ff]|[\uf900-\ufdcf]|[\ufdf0-\ufffd]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_|_\b)|-|[0-9]|[\u00b7]|[\u0300-\u036f]|[\u203f-\u2040])|\.|:|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))*)))/,/^(?:(\{((([+-])?([0-9])+))((,(((([+-])?([0-9])+))|\*)?))?\}))/,/^(?:(([+-])?((([0-9])+\.([0-9])*(([Ee]([+-])?([0-9])+)))|((\.)?([0-9])+(([Ee]([+-])?([0-9])+))))))/,/^(?:(([+-])?([0-9])*\.([0-9])+))/,/^(?:(([+-])?([0-9])+))/,/^(?:{ANON})/,/^(?:(<([^\u0000-\u0020<>\"{}|^`\\]|(\\u([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])|\\U([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])))*>))/,/^(?:((([A-Z]|[a-z]|[\u00c0-\u00d6]|[\u00d8-\u00f6]|[\u00f8-\u02ff]|[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|[\u2c00-\u2fef]|[\u3001-\ud7ff]|[\uf900-\ufdcf]|[\ufdf0-\ufffd]|[\uD800-\uDB7F][\uDC00-\uDFFF])((((([A-Z]|[a-z]|[\u00c0-\u00d6]|[\u00d8-\u00f6]|[\u00f8-\u02ff]|[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|[\u2c00-\u2fef]|[\u3001-\ud7ff]|[\uf900-\ufdcf]|[\ufdf0-\ufffd]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_|_\b)|-|[0-9]|[\u00b7]|[\u0300-\u036f]|[\u203f-\u2040])|\.)*((([A-Z]|[a-z]|[\u00c0-\u00d6]|[\u00d8-\u00f6]|[\u00f8-\u02ff]|[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|[\u2c00-\u2fef]|[\u3001-\ud7ff]|[\uf900-\ufdcf]|[\ufdf0-\ufffd]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_|_\b)|-|[0-9]|[\u00b7]|[\u0300-\u036f]|[\u203f-\u2040]))?)?:))/,/^(?:a\b)/,/^(?:(\/([^\u002f\u005C\u000A\u000D]|\\[nrt\\|.?*+(){}$\u002D\u005B\u005D\u005E\/]|(\\u([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])|\\U([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])))+\/[smix]*))/,/^(?:(_:((([A-Z]|[a-z]|[\u00c0-\u00d6]|[\u00d8-\u00f6]|[\u00f8-\u02ff]|[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|[\u2c00-\u2fef]|[\u3001-\ud7ff]|[\uf900-\ufdcf]|[\ufdf0-\ufffd]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_|_\b)|[0-9])((((([A-Z]|[a-z]|[\u00c0-\u00d6]|[\u00d8-\u00f6]|[\u00f8-\u02ff]|[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|[\u2c00-\u2fef]|[\u3001-\ud7ff]|[\uf900-\ufdcf]|[\ufdf0-\ufffd]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_|_\b)|-|[0-9]|[\u00b7]|[\u0300-\u036f]|[\u203f-\u2040])|\.)*((([A-Z]|[a-z]|[\u00c0-\u00d6]|[\u00d8-\u00f6]|[\u00f8-\u02ff]|[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|[\u2c00-\u2fef]|[\u3001-\ud7ff]|[\uf900-\ufdcf]|[\ufdf0-\ufffd]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_|_\b)|-|[0-9]|[\u00b7]|[\u0300-\u036f]|[\u203f-\u2040]))?))/,/^(?:(\{([^%\\]|\\[%\\]|(\\u([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])|\\U([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])))*%\}))/,/^(?:('''(('|'')?([^\'\\]|(\\[\"\'\\bfnrt])|(\\u([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])|\\U([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))))*'''(@([A-Za-z])+((-([0-9A-Za-z])+))*)))/,/^(?:("""(("|"")?([^\"\\]|(\\[\"\'\\bfnrt])|(\\u([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])|\\U([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))))*"""(@([A-Za-z])+((-([0-9A-Za-z])+))*)))/,/^(?:('([^\u0027\u005c\u000a\u000d]|(\\[\"\'\\bfnrt])|(\\u([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])|\\U([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])))*'(@([A-Za-z])+((-([0-9A-Za-z])+))*)))/,/^(?:("([^\u0022\u005c\u000a\u000d]|(\\[\"\'\\bfnrt])|(\\u([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])|\\U([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])))*"(@([A-Za-z])+((-([0-9A-Za-z])+))*)))/,/^(?:('''(('|'')?([^\'\\]|(\\[\"\'\\bfnrt])|(\\u([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])|\\U([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))))*'''))/,/^(?:("""(("|"")?([^\"\\]|(\\[\"\'\\bfnrt])|(\\u([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])|\\U([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))))*"""))/,/^(?:('([^\u0027\u005c\u000a\u000d]|(\\[\"\'\\bfnrt])|(\\u([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])|\\U([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])))*'))/,/^(?:("([^\u0022\u005c\u000a\u000d]|(\\[\"\'\\bfnrt])|(\\u([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])|\\U([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])))*"))/,/^(?:([Bb][Aa][Ss][Ee]))/,/^(?:([Pp][Rr][Ee][Ff][Ii][Xx]))/,/^(?:([iI][mM][pP][oO][rR][tT]))/,/^(?:([sS][tT][aA][rR][tT]))/,/^(?:([eE][xX][tT][eE][rR][nN][aA][lL]))/,/^(?:([Vv][Ii][Rr][Tt][Uu][Aa][Ll]))/,/^(?:([Cc][Ll][Oo][Ss][Ee][Dd]))/,/^(?:([Ee][Xx][Tt][Rr][Aa]))/,/^(?:([Ll][Ii][Tt][Ee][Rr][Aa][Ll]))/,/^(?:([Bb][Nn][Oo][Dd][Ee]))/,/^(?:([Ii][Rr][Ii]))/,/^(?:([Nn][Oo][Nn][Ll][Ii][Tt][Ee][Rr][Aa][Ll]))/,/^(?:([Aa][Nn][Dd]))/,/^(?:([Oo][Rr]))/,/^(?:([No][Oo][Tt]))/,/^(?:([Mm][Ii][Nn][Ii][Nn][Cc][Ll][Uu][Ss][Ii][Vv][Ee]))/,/^(?:([Mm][Ii][Nn][Ee][Xx][Cc][Ll][Uu][Ss][Ii][Vv][Ee]))/,/^(?:([Mm][Aa][Xx][Ii][Nn][Cc][Ll][Uu][Ss][Ii][Vv][Ee]))/,/^(?:([Mm][Aa][Xx][Ee][Xx][Cc][Ll][Uu][Ss][Ii][Vv][Ee]))/,/^(?:([Ll][Ee][Nn][Gg][Tt][Hh]))/,/^(?:([Mm][Ii][Nn][Ll][Ee][Nn][Gg][Tt][Hh]))/,/^(?:([Mm][Aa][Xx][Ll][Ee][Nn][Gg][Tt][Hh]))/,/^(?:([Tt][Oo][Tt][Aa][Ll][Dd][Ii][Gg][Ii][Tt][Ss]))/,/^(?:([Ff][Rr][Aa][Cc][Tt][Ii][Oo][Nn][Dd][Ii][Gg][Ii][Tt][Ss]))/,/^(?:=)/,/^(?:\/\/)/,/^(?:\{)/,/^(?:\})/,/^(?:&)/,/^(?:\|\|)/,/^(?:\|)/,/^(?:,)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\$)/,/^(?:!)/,/^(?:\^\^)/,/^(?:\^)/,/^(?:\.)/,/^(?:~)/,/^(?:;)/,/^(?:\*)/,/^(?:\+)/,/^(?:\?)/,/^(?:-)/,/^(?:%)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:$)/,/^(?:[a-zA-Z0-9_-]+)/,/^(?:.)/],
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],"inclusive":true}}
});
return lexer;
})();
parser.lexer = lexer;
function Parser () {
this.yy = {};
}
Parser.prototype = parser;parser.Parser = Parser;
return new Parser;
})();
if (typeof require !== 'undefined' && typeof exports !== 'undefined') {
exports.parser = ShExJison;
exports.Parser = ShExJison.Parser;
exports.parse = function () { return ShExJison.parse.apply(ShExJison, arguments); };
exports.main = function commonjsMain(args) {
if (!args[1]) {
console.log('Usage: '+args[0]+' FILE');
process.exit(1);
}
var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
return exports.parser.parse(source);
};
if (typeof module !== 'undefined' && require.main === module) {
exports.main(process.argv.slice(1));
}
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...