Skip to main content
Glama
sequenceDiagram.js41.6 kB
// Generated from sequence/sequenceDiagram.jison // Do not edit manually module.exports = /* parser generated by jison 0.4.18 */ /* 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 parser = (function(){ var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,3],$V2=[1,4],$V3=[2,4],$V4=[1,9],$V5=[1,11],$V6=[1,13],$V7=[1,14],$V8=[1,16],$V9=[1,17],$Va=[1,18],$Vb=[1,24],$Vc=[1,25],$Vd=[1,26],$Ve=[1,27],$Vf=[1,28],$Vg=[1,29],$Vh=[1,30],$Vi=[1,31],$Vj=[1,32],$Vk=[1,33],$Vl=[1,34],$Vm=[1,35],$Vn=[1,36],$Vo=[1,37],$Vp=[1,38],$Vq=[1,39],$Vr=[1,41],$Vs=[1,42],$Vt=[1,43],$Vu=[1,44],$Vv=[1,45],$Vw=[1,46],$Vx=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,55,60,61,62,63,71],$Vy=[2,71],$Vz=[4,5,16,50,52,53],$VA=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],$VB=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,55,60,61,62,63,71],$VC=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,55,60,61,62,63,71],$VD=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,55,60,61,62,63,71],$VE=[69,70,71],$VF=[1,127]; var parser = {trace: function trace () { }, yy: {}, symbols_: {"error":2,"start":3,"SPACE":4,"NEWLINE":5,"SD":6,"document":7,"line":8,"statement":9,"box_section":10,"box_line":11,"participant_statement":12,"create":13,"box":14,"restOfLine":15,"end":16,"signal":17,"autonumber":18,"NUM":19,"off":20,"activate":21,"actor":22,"deactivate":23,"note_statement":24,"links_statement":25,"link_statement":26,"properties_statement":27,"details_statement":28,"title":29,"legacy_title":30,"acc_title":31,"acc_title_value":32,"acc_descr":33,"acc_descr_value":34,"acc_descr_multiline_value":35,"loop":36,"rect":37,"opt":38,"alt":39,"else_sections":40,"par":41,"par_sections":42,"par_over":43,"critical":44,"option_sections":45,"break":46,"option":47,"and":48,"else":49,"participant":50,"AS":51,"participant_actor":52,"destroy":53,"actor_with_config":54,"note":55,"placement":56,"text2":57,"over":58,"actor_pair":59,"links":60,"link":61,"properties":62,"details":63,"spaceList":64,",":65,"left_of":66,"right_of":67,"signaltype":68,"+":69,"-":70,"ACTOR":71,"config_object":72,"CONFIG_START":73,"CONFIG_CONTENT":74,"CONFIG_END":75,"SOLID_OPEN_ARROW":76,"DOTTED_OPEN_ARROW":77,"SOLID_ARROW":78,"BIDIRECTIONAL_SOLID_ARROW":79,"DOTTED_ARROW":80,"BIDIRECTIONAL_DOTTED_ARROW":81,"SOLID_CROSS":82,"DOTTED_CROSS":83,"SOLID_POINT":84,"DOTTED_POINT":85,"TXT":86,"$accept":0,"$end":1}, terminals_: {2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",55:"note",58:"over",60:"links",61:"link",62:"properties",63:"details",65:",",66:"left_of",67:"right_of",69:"+",70:"-",71:"ACTOR",73:"CONFIG_START",74:"CONFIG_CONTENT",75:"CONFIG_END",76:"SOLID_OPEN_ARROW",77:"DOTTED_OPEN_ARROW",78:"SOLID_ARROW",79:"BIDIRECTIONAL_SOLID_ARROW",80:"DOTTED_ARROW",81:"BIDIRECTIONAL_DOTTED_ARROW",82:"SOLID_CROSS",83:"DOTTED_CROSS",84:"SOLID_POINT",85:"DOTTED_POINT",86:"TXT"}, productions_: [0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]], performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { /* this == yyval */ var $0 = $$.length - 1; switch (yystate) { case 3: yy.apply($$[$0]);return $$[$0]; break; case 4: case 9: this.$ = [] break; case 5: case 10: $$[$0-1].push($$[$0]);this.$ = $$[$0-1] break; case 6: case 7: case 11: case 12: this.$ = $$[$0] break; case 8: case 13: this.$=[]; break; case 15: $$[$0].type='createParticipant'; this.$=$$[$0]; break; case 16: $$[$0-1].unshift({type: 'boxStart', boxData:yy.parseBoxData($$[$0-2]) }); $$[$0-1].push({type: 'boxEnd', boxText:$$[$0-2]}); this.$=$$[$0-1]; break; case 18: this.$= {type:'sequenceIndex',sequenceIndex: Number($$[$0-2]), sequenceIndexStep:Number($$[$0-1]), sequenceVisible:true, signalType:yy.LINETYPE.AUTONUMBER}; break; case 19: this.$ = {type:'sequenceIndex',sequenceIndex: Number($$[$0-1]), sequenceIndexStep:1, sequenceVisible:true, signalType:yy.LINETYPE.AUTONUMBER}; break; case 20: this.$ = {type:'sequenceIndex', sequenceVisible:false, signalType:yy.LINETYPE.AUTONUMBER}; break; case 21: this.$ = {type:'sequenceIndex', sequenceVisible:true, signalType:yy.LINETYPE.AUTONUMBER}; break; case 22: this.$={type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1].actor}; break; case 23: this.$={type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-1].actor}; break; case 29: yy.setDiagramTitle($$[$0].substring(6));this.$=$$[$0].substring(6); break; case 30: yy.setDiagramTitle($$[$0].substring(7));this.$=$$[$0].substring(7); break; case 31: this.$=$$[$0].trim();yy.setAccTitle(this.$); break; case 32: case 33: this.$=$$[$0].trim();yy.setAccDescription(this.$); break; case 34: $$[$0-1].unshift({type: 'loopStart', loopText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.LOOP_START}); $$[$0-1].push({type: 'loopEnd', loopText:$$[$0-2], signalType: yy.LINETYPE.LOOP_END}); this.$=$$[$0-1]; break; case 35: $$[$0-1].unshift({type: 'rectStart', color:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.RECT_START }); $$[$0-1].push({type: 'rectEnd', color:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.RECT_END }); this.$=$$[$0-1]; break; case 36: $$[$0-1].unshift({type: 'optStart', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.OPT_START}); $$[$0-1].push({type: 'optEnd', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.OPT_END}); this.$=$$[$0-1]; break; case 37: // Alt start $$[$0-1].unshift({type: 'altStart', altText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.ALT_START}); // Content in alt is already in $$[$0-1] // End $$[$0-1].push({type: 'altEnd', signalType: yy.LINETYPE.ALT_END}); this.$=$$[$0-1]; break; case 38: // Parallel start $$[$0-1].unshift({type: 'parStart', parText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.PAR_START}); // Content in par is already in $$[$0-1] // End $$[$0-1].push({type: 'parEnd', signalType: yy.LINETYPE.PAR_END}); this.$=$$[$0-1]; break; case 39: // Parallel (overlapped) start $$[$0-1].unshift({type: 'parStart', parText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.PAR_OVER_START}); // Content in par is already in $$[$0-1] // End $$[$0-1].push({type: 'parEnd', signalType: yy.LINETYPE.PAR_END}); this.$=$$[$0-1]; break; case 40: // critical start $$[$0-1].unshift({type: 'criticalStart', criticalText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.CRITICAL_START}); // Content in critical is already in $$[$0-1] // critical end $$[$0-1].push({type: 'criticalEnd', signalType: yy.LINETYPE.CRITICAL_END}); this.$=$$[$0-1]; break; case 41: $$[$0-1].unshift({type: 'breakStart', breakText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.BREAK_START}); $$[$0-1].push({type: 'breakEnd', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.BREAK_END}); this.$=$$[$0-1]; break; case 43: this.$ = $$[$0-3].concat([{type: 'option', optionText:yy.parseMessage($$[$0-1]), signalType: yy.LINETYPE.CRITICAL_OPTION}, $$[$0]]); break; case 45: this.$ = $$[$0-3].concat([{type: 'and', parText:yy.parseMessage($$[$0-1]), signalType: yy.LINETYPE.PAR_AND}, $$[$0]]); break; case 47: this.$ = $$[$0-3].concat([{type: 'else', altText:yy.parseMessage($$[$0-1]), signalType: yy.LINETYPE.ALT_ELSE}, $$[$0]]); break; case 48: $$[$0-3].draw='participant'; $$[$0-3].type='addParticipant';$$[$0-3].description=yy.parseMessage($$[$0-1]); this.$=$$[$0-3]; break; case 49: $$[$0-1].draw='participant'; $$[$0-1].type='addParticipant';this.$=$$[$0-1]; break; case 50: $$[$0-3].draw='actor'; $$[$0-3].type='addParticipant';$$[$0-3].description=yy.parseMessage($$[$0-1]); this.$=$$[$0-3]; break; case 51: $$[$0-1].draw='actor'; $$[$0-1].type='addParticipant'; this.$=$$[$0-1]; break; case 52: $$[$0-1].type='destroyParticipant'; this.$=$$[$0-1]; break; case 53: $$[$0-1].draw='participant'; $$[$0-1].type='addParticipant'; this.$=$$[$0-1]; break; case 54: this.$ = [$$[$0-1], {type:'addNote', placement:$$[$0-2], actor:$$[$0-1].actor, text:$$[$0]}]; break; case 55: // Coerce actor_pair into a [to, from, ...] array $$[$0-2] = [].concat($$[$0-1], $$[$0-1]).slice(0, 2); $$[$0-2][0] = $$[$0-2][0].actor; $$[$0-2][1] = $$[$0-2][1].actor; this.$ = [$$[$0-1], {type:'addNote', placement:yy.PLACEMENT.OVER, actor:$$[$0-2].slice(0, 2), text:$$[$0]}]; break; case 56: this.$ = [$$[$0-1], {type:'addLinks', actor:$$[$0-1].actor, text:$$[$0]}]; break; case 57: this.$ = [$$[$0-1], {type:'addALink', actor:$$[$0-1].actor, text:$$[$0]}]; break; case 58: this.$ = [$$[$0-1], {type:'addProperties', actor:$$[$0-1].actor, text:$$[$0]}]; break; case 59: this.$ = [$$[$0-1], {type:'addDetails', actor:$$[$0-1].actor, text:$$[$0]}]; break; case 62: this.$ = [$$[$0-2], $$[$0]]; break; case 63: this.$ = $$[$0]; break; case 64: this.$ = yy.PLACEMENT.LEFTOF; break; case 65: this.$ = yy.PLACEMENT.RIGHTOF; break; case 66: this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0], activate: true}, {type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1].actor} ] break; case 67: this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]}, {type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-4].actor} ] break; case 68: this.$ = [$$[$0-3],$$[$0-1],{type: 'addMessage', from:$$[$0-3].actor, to:$$[$0-1].actor, signalType:$$[$0-2], msg:$$[$0]}] break; case 69: this.$ = { type: 'addParticipant', actor: $$[$0-1], config: $$[$0] }; break; case 70: this.$ = $$[$0-1].trim(); break; case 71: this.$={ type: 'addParticipant', actor:$$[$0]} break; case 72: this.$ = yy.LINETYPE.SOLID_OPEN; break; case 73: this.$ = yy.LINETYPE.DOTTED_OPEN; break; case 74: this.$ = yy.LINETYPE.SOLID; break; case 75: this.$ = yy.LINETYPE.BIDIRECTIONAL_SOLID; break; case 76: this.$ = yy.LINETYPE.DOTTED; break; case 77: this.$ = yy.LINETYPE.BIDIRECTIONAL_DOTTED; break; case 78: this.$ = yy.LINETYPE.SOLID_CROSS; break; case 79: this.$ = yy.LINETYPE.DOTTED_CROSS; break; case 80: this.$ = yy.LINETYPE.SOLID_POINT; break; case 81: this.$ = yy.LINETYPE.DOTTED_POINT; break; case 82: this.$ = yy.parseMessage($$[$0].trim().substring(1)) break; } }, table: [{3:1,4:$V0,5:$V1,6:$V2},{1:[3]},{3:5,4:$V0,5:$V1,6:$V2},{3:6,4:$V0,5:$V1,6:$V2},o([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],$V3,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,50:$Vo,52:$Vp,53:$Vq,55:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,71:$Vw},o($Vx,[2,5]),{9:47,12:12,13:$V6,14:$V7,17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,50:$Vo,52:$Vp,53:$Vq,55:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,71:$Vw},o($Vx,[2,7]),o($Vx,[2,8]),o($Vx,[2,14]),{12:48,50:$Vo,52:$Vp,53:$Vq},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:$Vw},{22:55,71:$Vw},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},o($Vx,[2,29]),o($Vx,[2,30]),{32:[1,61]},{34:[1,62]},o($Vx,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,54:72,71:[1,73]},{22:74,71:$Vw},{22:75,71:$Vw},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:$Vw},{22:92,71:$Vw},{22:93,71:$Vw},{22:94,71:$Vw},o([5,51,65,76,77,78,79,80,81,82,83,84,85,86],$Vy),o($Vx,[2,6]),o($Vx,[2,15]),o($Vz,[2,9],{10:95}),o($Vx,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},o($Vx,[2,21]),{5:[1,99]},{5:[1,100]},o($Vx,[2,24]),o($Vx,[2,25]),o($Vx,[2,26]),o($Vx,[2,27]),o($Vx,[2,28]),o($Vx,[2,31]),o($Vx,[2,32]),o($VA,$V3,{7:101}),o($VA,$V3,{7:102}),o($VA,$V3,{7:103}),o($VB,$V3,{40:104,7:105}),o($VC,$V3,{42:106,7:107}),o($VC,$V3,{7:107,42:108}),o($VD,$V3,{45:109,7:110}),o($VA,$V3,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},o([5,51],$Vy,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:$Vw},o($VE,[2,72]),o($VE,[2,73]),o($VE,[2,74]),o($VE,[2,75]),o($VE,[2,76]),o($VE,[2,77]),o($VE,[2,78]),o($VE,[2,79]),o($VE,[2,80]),o($VE,[2,81]),{22:123,71:$Vw},{22:125,59:124,71:$Vw},{71:[2,64]},{71:[2,65]},{57:126,86:$VF},{57:128,86:$VF},{57:129,86:$VF},{57:130,86:$VF},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:$Vo,52:$Vp,53:$Vq},{5:[1,136]},o($Vx,[2,19]),o($Vx,[2,20]),o($Vx,[2,22]),o($Vx,[2,23]),{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[1,137],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,50:$Vo,52:$Vp,53:$Vq,55:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,71:$Vw},{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[1,138],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,50:$Vo,52:$Vp,53:$Vq,55:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,71:$Vw},{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[1,139],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,50:$Vo,52:$Vp,53:$Vq,55:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,71:$Vw},{16:[1,140]},{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[2,46],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,49:[1,141],50:$Vo,52:$Vp,53:$Vq,55:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,71:$Vw},{16:[1,142]},{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[2,44],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,48:[1,143],50:$Vo,52:$Vp,53:$Vq,55:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,71:$Vw},{16:[1,144]},{16:[1,145]},{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[2,42],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,47:[1,146],50:$Vo,52:$Vp,53:$Vq,55:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,71:$Vw},{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[1,147],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,50:$Vo,52:$Vp,53:$Vq,55:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,71:$Vw},{15:[1,148]},o($Vx,[2,49]),o($Vx,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},o($Vx,[2,51]),o($Vx,[2,52]),{22:151,71:$Vw},{22:152,71:$Vw},{57:153,86:$VF},{57:154,86:$VF},{57:155,86:$VF},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},o($Vx,[2,16]),o($Vz,[2,10]),{12:157,50:$Vo,52:$Vp,53:$Vq},o($Vz,[2,12]),o($Vz,[2,13]),o($Vx,[2,18]),o($Vx,[2,34]),o($Vx,[2,35]),o($Vx,[2,36]),o($Vx,[2,37]),{15:[1,158]},o($Vx,[2,38]),{15:[1,159]},o($Vx,[2,39]),o($Vx,[2,40]),{15:[1,160]},o($Vx,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:$VF},{57:165,86:$VF},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:$Vw},o($Vz,[2,11]),o($VB,$V3,{7:105,40:167}),o($VC,$V3,{7:107,42:168}),o($VD,$V3,{7:110,45:169}),o($Vx,[2,48]),{5:[2,70]},o($Vx,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}], defaultActions: {5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]}, parseError: function parseError (str, hash) { if (hash.recoverable) { this.trace(str); } else { var error = new Error(str); error.hash = hash; throw error; } }, 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; }}; /* 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: {"case-insensitive":true}, performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { var YYSTATE=YY_START; switch($avoiding_name_collisions) { case 0:return 5; break; case 1:/* skip all whitespace */ break; case 2:/* skip same-line whitespace */ break; case 3:/* skip comments */ break; case 4:/* skip comments */ break; case 5:/* skip comments */ break; case 6:return 19; break; case 7: this.begin('CONFIG'); return 73; break; case 8: return 74; break; case 9: this.popState(); this.popState(); return 75; break; case 10: yy_.yytext = yy_.yytext.trim(); return 71; break; case 11: yy_.yytext = yy_.yytext.trim(); this.begin('ALIAS'); return 71; break; case 12: this.begin('LINE'); return 14; break; case 13: this.begin('ID'); return 50; break; case 14: this.begin('ID'); return 52; break; case 15:return 13; break; case 16: this.begin('ID'); return 53; break; case 17: yy_.yytext = yy_.yytext.trim(); this.begin('ALIAS'); return 71; break; case 18: this.popState(); this.popState(); this.begin('LINE'); return 51; break; case 19: this.popState(); this.popState(); return 5; break; case 20: this.begin('LINE'); return 36; break; case 21: this.begin('LINE'); return 37; break; case 22: this.begin('LINE'); return 38; break; case 23: this.begin('LINE'); return 39; break; case 24: this.begin('LINE'); return 49; break; case 25: this.begin('LINE'); return 41; break; case 26: this.begin('LINE'); return 43; break; case 27: this.begin('LINE'); return 48; break; case 28: this.begin('LINE'); return 44; break; case 29: this.begin('LINE'); return 47; break; case 30: this.begin('LINE'); return 46; break; case 31: this.popState(); return 15; break; case 32:return 16; break; case 33:return 66; break; case 34:return 67; break; case 35:return 60; break; case 36:return 61; break; case 37:return 62; break; case 38:return 63; break; case 39:return 58; break; case 40:return 55; break; case 41: this.begin('ID'); return 21; break; case 42: this.begin('ID'); return 23; break; case 43:return 29; break; case 44:return 30; break; case 45: this.begin("acc_title");return 31; break; case 46: this.popState(); return "acc_title_value"; break; case 47: this.begin("acc_descr");return 33; break; case 48: this.popState(); return "acc_descr_value"; break; case 49: this.begin("acc_descr_multiline"); break; case 50: this.popState(); break; case 51:return "acc_descr_multiline_value"; break; case 52:return 6; break; case 53:return 18; break; case 54:return 20; break; case 55:return 65; break; case 56:return 5; break; case 57: yy_.yytext = yy_.yytext.trim(); return 71; break; case 58:return 78; break; case 59:return 79; break; case 60:return 80; break; case 61:return 81; break; case 62:return 76; break; case 63:return 77; break; case 64:return 82; break; case 65:return 83; break; case 66:return 84; break; case 67:return 85; break; case 68:return 86; break; case 69:return 86; break; case 70:return 69; break; case 71:return 70; break; case 72:return 5; break; case 73:return 'INVALID'; break; } }, rules: [/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^\<->\->:\n,;@]+?([\-]*[^\<->\->:\n,;@]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^<\->\->:\n,;]+?([\-]*[^<\->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i], conditions: {"acc_descr_multiline":{"rules":[50,51],"inclusive":false},"acc_descr":{"rules":[48],"inclusive":false},"acc_title":{"rules":[46],"inclusive":false},"ID":{"rules":[2,3,7,10,11,17],"inclusive":false},"ALIAS":{"rules":[2,3,18,19],"inclusive":false},"LINE":{"rules":[2,3,31],"inclusive":false},"CONFIG":{"rules":[8,9],"inclusive":false},"CONFIG_DATA":{"rules":[],"inclusive":false},"INITIAL":{"rules":[0,1,3,4,5,6,12,13,14,15,16,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,49,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73],"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 = parser; exports.Parser = parser.Parser; exports.parse = function () { return parser.parse.apply(parser, 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)); } };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ai-of-mine/fast-mermaid-validator-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server