@x-cmd/draw 0.2.5 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -166
- package/dist/lib.d.ts +27 -1
- package/dist/lib.js +39 -1
- package/dist/node/cli.js +109 -11
- package/dist/render/anno.d.ts +50 -0
- package/dist/render/anno.js +589 -0
- package/dist/render/arch.d.ts +106 -0
- package/dist/render/arch.js +1011 -0
- package/dist/render/archmap.d.ts +157 -0
- package/dist/render/archmap.js +683 -0
- package/dist/render/area.js +20 -14
- package/dist/render/bar-grouped.js +8 -5
- package/dist/render/bar-stacked.js +11 -7
- package/dist/render/bar.js +8 -3
- package/dist/render/butterfly.d.ts +3 -0
- package/dist/render/butterfly.js +355 -0
- package/dist/render/calendar.d.ts +6 -0
- package/dist/render/calendar.js +448 -0
- package/dist/render/combo.js +16 -8
- package/dist/render/compass.d.ts +6 -0
- package/dist/render/compass.js +77 -0
- package/dist/render/dispatch.js +26 -1
- package/dist/render/echarts-ssr.d.ts +51 -0
- package/dist/render/echarts-ssr.js +511 -0
- package/dist/render/gantt.d.ts +46 -0
- package/dist/render/gantt.js +415 -0
- package/dist/render/gantt2.d.ts +24 -0
- package/dist/render/gantt2.js +198 -0
- package/dist/render/hbar.js +8 -4
- package/dist/render/icons.d.ts +3 -0
- package/dist/render/icons.js +78 -0
- package/dist/render/kinds.d.ts +11 -0
- package/dist/render/kinds.js +176 -0
- package/dist/render/ladder.d.ts +21 -0
- package/dist/render/ladder.js +230 -0
- package/dist/render/layout.d.ts +46 -0
- package/dist/render/layout.js +57 -0
- package/dist/render/line-multi.js +7 -5
- package/dist/render/line.js +9 -5
- package/dist/render/maps.d.ts +46 -0
- package/dist/render/maps.js +237 -0
- package/dist/render/measure.d.ts +0 -1
- package/dist/render/measure.js +0 -1
- package/dist/render/mermaid.d.ts +30 -0
- package/dist/render/mermaid.js +277 -0
- package/dist/render/mindmap.d.ts +10 -0
- package/dist/render/mindmap.js +388 -0
- package/dist/render/orgicon.d.ts +12 -0
- package/dist/render/orgicon.js +31 -0
- package/dist/render/pie.js +1 -1
- package/dist/render/png.d.ts +21 -0
- package/dist/render/png.js +109 -0
- package/dist/render/quadrant.d.ts +6 -0
- package/dist/render/quadrant.js +201 -0
- package/dist/render/query.d.ts +2 -0
- package/dist/render/query.js +108 -1
- package/dist/render/route.d.ts +86 -0
- package/dist/render/route.js +1077 -0
- package/dist/render/scatter.js +87 -12
- package/dist/render/seq.d.ts +41 -0
- package/dist/render/seq.js +248 -0
- package/dist/render/svg.d.ts +34 -2
- package/dist/render/svg.js +159 -20
- package/dist/render/table.d.ts +30 -0
- package/dist/render/table.js +134 -0
- package/dist/render/tokei.d.ts +18 -0
- package/dist/render/tokei.js +230 -0
- package/dist/render/uc.d.ts +58 -0
- package/dist/render/uc.js +319 -0
- package/dist/render/units.d.ts +32 -0
- package/dist/render/units.js +84 -0
- package/dist/render/vendor/au.js +10 -0
- package/dist/render/vendor/br.js +10 -0
- package/dist/render/vendor/china.js +11 -0
- package/dist/render/vendor/de.js +10 -0
- package/dist/render/vendor/eu.js +10 -0
- package/dist/render/vendor/japan.js +10 -0
- package/dist/render/vendor/kr.js +10 -0
- package/dist/render/vendor/mermaid-flow-parser.js +1164 -0
- package/dist/render/vendor/mermaid-gantt-parser.js +810 -0
- package/dist/render/vendor/us-states.js +11 -0
- package/dist/render/vendor/world-geo.d.ts +22 -0
- package/dist/render/vendor/world-geo.js +9 -0
- package/dist/render/vendor/world.d.ts +13 -0
- package/dist/render/vendor/world.js +12 -0
- package/dist/specs/base.d.ts +16 -0
- package/dist/specs/base.js +34 -1
- package/dist/specs/butterfly.d.ts +46 -0
- package/dist/specs/butterfly.js +241 -0
- package/dist/specs/calendar.d.ts +90 -0
- package/dist/specs/calendar.js +296 -0
- package/dist/specs/compass.d.ts +27 -0
- package/dist/specs/compass.js +111 -0
- package/dist/specs/index.d.ts +5 -0
- package/dist/specs/index.js +5 -0
- package/dist/specs/ladder.d.ts +43 -0
- package/dist/specs/ladder.js +261 -0
- package/dist/specs/quadrant.d.ts +41 -0
- package/dist/specs/quadrant.js +200 -0
- package/dist/specs/scatter.d.ts +14 -8
- package/dist/specs/scatter.js +54 -5
- package/dist/specs/table.d.ts +24 -0
- package/dist/specs/table.js +154 -0
- package/dist/store.d.ts +1 -1
- package/dist/store.js +1 -1
- package/dist/styles/butterfly.d.ts +2 -0
- package/dist/styles/butterfly.js +74 -0
- package/dist/styles/calendar.d.ts +2 -0
- package/dist/styles/calendar.js +51 -0
- package/dist/styles/compass.d.ts +2 -0
- package/dist/styles/compass.js +19 -0
- package/dist/styles/fonts-banner.d.ts +5 -0
- package/dist/styles/fonts-banner.js +9 -0
- package/dist/styles/fonts-cjk.d.ts +2 -0
- package/dist/styles/fonts-cjk.js +6 -0
- package/dist/styles/fonts-ttf.d.ts +2 -0
- package/dist/styles/fonts-ttf.js +6 -0
- package/dist/styles/index.js +13 -0
- package/dist/styles/ladder.d.ts +3 -0
- package/dist/styles/ladder.js +66 -0
- package/dist/styles/quadrant.d.ts +2 -0
- package/dist/styles/quadrant.js +19 -0
- package/dist/styles/table.d.ts +2 -0
- package/dist/styles/table.js +12 -0
- package/dist/styles/types.d.ts +1 -0
- package/dist/styles/types.js +1 -0
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +3 -4
- package/dist/types/dagre.d.ts +39 -0
- package/dist/types/dagre.js +3 -0
- package/package.json +28 -3
|
@@ -0,0 +1,810 @@
|
|
|
1
|
+
/* eslint-disable *//**
|
|
2
|
+
* mermaid gantt 解析器(jison 编译产物,vendored)。
|
|
3
|
+
* 源语法: mermaid-js/mermaid packages/mermaid/src/diagrams/gantt/parser/gantt.jison
|
|
4
|
+
* 工具链: jison@0.4.18: npx jison gantt.jison --module js
|
|
5
|
+
* 纯 JS/无 DOM/无依赖。yy 收集器见 render/gantt.ts。
|
|
6
|
+
*/
|
|
7
|
+
/* parser generated by jison 0.4.18 */
|
|
8
|
+
/*
|
|
9
|
+
Returns a Parser object of the following structure:
|
|
10
|
+
|
|
11
|
+
Parser: {
|
|
12
|
+
yy: {}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
Parser.prototype: {
|
|
16
|
+
yy: {},
|
|
17
|
+
trace: function(),
|
|
18
|
+
symbols_: {associative list: name ==> number},
|
|
19
|
+
terminals_: {associative list: number ==> name},
|
|
20
|
+
productions_: [...],
|
|
21
|
+
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
|
|
22
|
+
table: [...],
|
|
23
|
+
defaultActions: {...},
|
|
24
|
+
parseError: function(str, hash),
|
|
25
|
+
parse: function(input),
|
|
26
|
+
|
|
27
|
+
lexer: {
|
|
28
|
+
EOF: 1,
|
|
29
|
+
parseError: function(str, hash),
|
|
30
|
+
setInput: function(input),
|
|
31
|
+
input: function(),
|
|
32
|
+
unput: function(str),
|
|
33
|
+
more: function(),
|
|
34
|
+
less: function(n),
|
|
35
|
+
pastInput: function(),
|
|
36
|
+
upcomingInput: function(),
|
|
37
|
+
showPosition: function(),
|
|
38
|
+
test_match: function(regex_match_array, rule_index),
|
|
39
|
+
next: function(),
|
|
40
|
+
lex: function(),
|
|
41
|
+
begin: function(condition),
|
|
42
|
+
popState: function(),
|
|
43
|
+
_currentRules: function(),
|
|
44
|
+
topState: function(),
|
|
45
|
+
pushState: function(condition),
|
|
46
|
+
|
|
47
|
+
options: {
|
|
48
|
+
ranges: boolean (optional: true ==> token location info will include a .range[] member)
|
|
49
|
+
flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
|
|
50
|
+
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)
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
|
|
54
|
+
rules: [...],
|
|
55
|
+
conditions: {associative list: name ==> set},
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
token location info (@$, _$, etc.): {
|
|
61
|
+
first_line: n,
|
|
62
|
+
last_line: n,
|
|
63
|
+
first_column: n,
|
|
64
|
+
last_column: n,
|
|
65
|
+
range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
the parseError function receives a 'hash' object with these members for lexer and parser errors: {
|
|
70
|
+
text: (matched text)
|
|
71
|
+
token: (the produced terminal token, if any)
|
|
72
|
+
line: (yylineno)
|
|
73
|
+
}
|
|
74
|
+
while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
|
|
75
|
+
loc: (yylloc)
|
|
76
|
+
expected: (string describing the set of expected tokens)
|
|
77
|
+
recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
|
|
78
|
+
}
|
|
79
|
+
*/
|
|
80
|
+
var ganttParser = (function(){
|
|
81
|
+
var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],$V1=[1,26],$V2=[1,27],$V3=[1,28],$V4=[1,29],$V5=[1,30],$V6=[1,31],$V7=[1,32],$V8=[1,33],$V9=[1,34],$Va=[1,9],$Vb=[1,10],$Vc=[1,11],$Vd=[1,12],$Ve=[1,13],$Vf=[1,14],$Vg=[1,15],$Vh=[1,16],$Vi=[1,19],$Vj=[1,20],$Vk=[1,21],$Vl=[1,22],$Vm=[1,23],$Vn=[1,25],$Vo=[1,35];
|
|
82
|
+
var parser = {trace: function trace () { },
|
|
83
|
+
yy: {},
|
|
84
|
+
symbols_: {"error":2,"start":3,"gantt":4,"document":5,"EOF":6,"line":7,"SPACE":8,"statement":9,"NL":10,"weekday":11,"weekday_monday":12,"weekday_tuesday":13,"weekday_wednesday":14,"weekday_thursday":15,"weekday_friday":16,"weekday_saturday":17,"weekday_sunday":18,"weekend":19,"weekend_friday":20,"weekend_saturday":21,"dateFormat":22,"inclusiveEndDates":23,"topAxis":24,"axisFormat":25,"tickInterval":26,"excludes":27,"includes":28,"todayMarker":29,"title":30,"acc_title":31,"acc_title_value":32,"acc_descr":33,"acc_descr_value":34,"acc_descr_multiline_value":35,"section":36,"clickStatement":37,"taskTxt":38,"taskData":39,"click":40,"callbackname":41,"callbackargs":42,"href":43,"clickStatementDebug":44,"$accept":0,"$end":1},
|
|
85
|
+
terminals_: {2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},
|
|
86
|
+
productions_: [0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],
|
|
87
|
+
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
|
|
88
|
+
/* this == yyval */
|
|
89
|
+
|
|
90
|
+
var $0 = $$.length - 1;
|
|
91
|
+
switch (yystate) {
|
|
92
|
+
case 1:
|
|
93
|
+
return $$[$0-1];
|
|
94
|
+
break;
|
|
95
|
+
case 2:
|
|
96
|
+
this.$ = []
|
|
97
|
+
break;
|
|
98
|
+
case 3:
|
|
99
|
+
$$[$0-1].push($$[$0]);this.$ = $$[$0-1]
|
|
100
|
+
break;
|
|
101
|
+
case 4: case 5:
|
|
102
|
+
this.$ = $$[$0]
|
|
103
|
+
break;
|
|
104
|
+
case 6: case 7:
|
|
105
|
+
this.$=[];
|
|
106
|
+
break;
|
|
107
|
+
case 8:
|
|
108
|
+
yy.setWeekday("monday");
|
|
109
|
+
break;
|
|
110
|
+
case 9:
|
|
111
|
+
yy.setWeekday("tuesday");
|
|
112
|
+
break;
|
|
113
|
+
case 10:
|
|
114
|
+
yy.setWeekday("wednesday");
|
|
115
|
+
break;
|
|
116
|
+
case 11:
|
|
117
|
+
yy.setWeekday("thursday");
|
|
118
|
+
break;
|
|
119
|
+
case 12:
|
|
120
|
+
yy.setWeekday("friday");
|
|
121
|
+
break;
|
|
122
|
+
case 13:
|
|
123
|
+
yy.setWeekday("saturday");
|
|
124
|
+
break;
|
|
125
|
+
case 14:
|
|
126
|
+
yy.setWeekday("sunday");
|
|
127
|
+
break;
|
|
128
|
+
case 15:
|
|
129
|
+
yy.setWeekend("friday");
|
|
130
|
+
break;
|
|
131
|
+
case 16:
|
|
132
|
+
yy.setWeekend("saturday");
|
|
133
|
+
break;
|
|
134
|
+
case 17:
|
|
135
|
+
yy.setDateFormat($$[$0].substr(11));this.$=$$[$0].substr(11);
|
|
136
|
+
break;
|
|
137
|
+
case 18:
|
|
138
|
+
yy.enableInclusiveEndDates();this.$=$$[$0].substr(18);
|
|
139
|
+
break;
|
|
140
|
+
case 19:
|
|
141
|
+
yy.TopAxis();this.$=$$[$0].substr(8);
|
|
142
|
+
break;
|
|
143
|
+
case 20:
|
|
144
|
+
yy.setAxisFormat($$[$0].substr(11));this.$=$$[$0].substr(11);
|
|
145
|
+
break;
|
|
146
|
+
case 21:
|
|
147
|
+
yy.setTickInterval($$[$0].substr(13));this.$=$$[$0].substr(13);
|
|
148
|
+
break;
|
|
149
|
+
case 22:
|
|
150
|
+
yy.setExcludes($$[$0].substr(9));this.$=$$[$0].substr(9);
|
|
151
|
+
break;
|
|
152
|
+
case 23:
|
|
153
|
+
yy.setIncludes($$[$0].substr(9));this.$=$$[$0].substr(9);
|
|
154
|
+
break;
|
|
155
|
+
case 24:
|
|
156
|
+
yy.setTodayMarker($$[$0].substr(12));this.$=$$[$0].substr(12);
|
|
157
|
+
break;
|
|
158
|
+
case 27:
|
|
159
|
+
yy.setDiagramTitle($$[$0].substr(6));this.$=$$[$0].substr(6);
|
|
160
|
+
break;
|
|
161
|
+
case 28:
|
|
162
|
+
this.$=$$[$0].trim();yy.setAccTitle(this.$);
|
|
163
|
+
break;
|
|
164
|
+
case 29: case 30:
|
|
165
|
+
this.$=$$[$0].trim();yy.setAccDescription(this.$);
|
|
166
|
+
break;
|
|
167
|
+
case 31:
|
|
168
|
+
yy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8);
|
|
169
|
+
break;
|
|
170
|
+
case 33:
|
|
171
|
+
yy.addTask($$[$0-1],$$[$0]);this.$='task';
|
|
172
|
+
break;
|
|
173
|
+
case 34:
|
|
174
|
+
this.$ = $$[$0-1];yy.setClickEvent($$[$0-1], $$[$0], null);
|
|
175
|
+
break;
|
|
176
|
+
case 35:
|
|
177
|
+
this.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]);
|
|
178
|
+
break;
|
|
179
|
+
case 36:
|
|
180
|
+
this.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], null);yy.setLink($$[$0-2],$$[$0]);
|
|
181
|
+
break;
|
|
182
|
+
case 37:
|
|
183
|
+
this.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-2], $$[$0-1]);yy.setLink($$[$0-3],$$[$0]);
|
|
184
|
+
break;
|
|
185
|
+
case 38:
|
|
186
|
+
this.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0], null);yy.setLink($$[$0-2],$$[$0-1]);
|
|
187
|
+
break;
|
|
188
|
+
case 39:
|
|
189
|
+
this.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-1], $$[$0]);yy.setLink($$[$0-3],$$[$0-2]);
|
|
190
|
+
break;
|
|
191
|
+
case 40:
|
|
192
|
+
this.$ = $$[$0-1];yy.setLink($$[$0-1], $$[$0]);
|
|
193
|
+
break;
|
|
194
|
+
case 41: case 47:
|
|
195
|
+
this.$=$$[$0-1] + ' ' + $$[$0];
|
|
196
|
+
break;
|
|
197
|
+
case 42: case 43: case 45:
|
|
198
|
+
this.$=$$[$0-2] + ' ' + $$[$0-1] + ' ' + $$[$0];
|
|
199
|
+
break;
|
|
200
|
+
case 44: case 46:
|
|
201
|
+
this.$=$$[$0-3] + ' ' + $$[$0-2] + ' ' + $$[$0-1] + ' ' + $$[$0];
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
table: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:$V1,13:$V2,14:$V3,15:$V4,16:$V5,17:$V6,18:$V7,19:18,20:$V8,21:$V9,22:$Va,23:$Vb,24:$Vc,25:$Vd,26:$Ve,27:$Vf,28:$Vg,29:$Vh,30:$Vi,31:$Vj,33:$Vk,35:$Vl,36:$Vm,37:24,38:$Vn,40:$Vo},o($V0,[2,7],{1:[2,1]}),o($V0,[2,3]),{9:36,11:17,12:$V1,13:$V2,14:$V3,15:$V4,16:$V5,17:$V6,18:$V7,19:18,20:$V8,21:$V9,22:$Va,23:$Vb,24:$Vc,25:$Vd,26:$Ve,27:$Vf,28:$Vg,29:$Vh,30:$Vi,31:$Vj,33:$Vk,35:$Vl,36:$Vm,37:24,38:$Vn,40:$Vo},o($V0,[2,5]),o($V0,[2,6]),o($V0,[2,17]),o($V0,[2,18]),o($V0,[2,19]),o($V0,[2,20]),o($V0,[2,21]),o($V0,[2,22]),o($V0,[2,23]),o($V0,[2,24]),o($V0,[2,25]),o($V0,[2,26]),o($V0,[2,27]),{32:[1,37]},{34:[1,38]},o($V0,[2,30]),o($V0,[2,31]),o($V0,[2,32]),{39:[1,39]},o($V0,[2,8]),o($V0,[2,9]),o($V0,[2,10]),o($V0,[2,11]),o($V0,[2,12]),o($V0,[2,13]),o($V0,[2,14]),o($V0,[2,15]),o($V0,[2,16]),{41:[1,40],43:[1,41]},o($V0,[2,4]),o($V0,[2,28]),o($V0,[2,29]),o($V0,[2,33]),o($V0,[2,34],{42:[1,42],43:[1,43]}),o($V0,[2,40],{41:[1,44]}),o($V0,[2,35],{43:[1,45]}),o($V0,[2,36]),o($V0,[2,38],{42:[1,46]}),o($V0,[2,37]),o($V0,[2,39])],
|
|
206
|
+
defaultActions: {},
|
|
207
|
+
parseError: function parseError (str, hash) {
|
|
208
|
+
if (hash.recoverable) {
|
|
209
|
+
this.trace(str);
|
|
210
|
+
} else {
|
|
211
|
+
var error = new Error(str);
|
|
212
|
+
error.hash = hash;
|
|
213
|
+
throw error;
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
parse: function parse(input) {
|
|
217
|
+
var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
|
|
218
|
+
var args = lstack.slice.call(arguments, 1);
|
|
219
|
+
var lexer = Object.create(this.lexer);
|
|
220
|
+
var sharedState = { yy: {} };
|
|
221
|
+
for (var k in this.yy) {
|
|
222
|
+
if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
|
223
|
+
sharedState.yy[k] = this.yy[k];
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
lexer.setInput(input, sharedState.yy);
|
|
227
|
+
sharedState.yy.lexer = lexer;
|
|
228
|
+
sharedState.yy.parser = this;
|
|
229
|
+
if (typeof lexer.yylloc == 'undefined') {
|
|
230
|
+
lexer.yylloc = {};
|
|
231
|
+
}
|
|
232
|
+
var yyloc = lexer.yylloc;
|
|
233
|
+
lstack.push(yyloc);
|
|
234
|
+
var ranges = lexer.options && lexer.options.ranges;
|
|
235
|
+
if (typeof sharedState.yy.parseError === 'function') {
|
|
236
|
+
this.parseError = sharedState.yy.parseError;
|
|
237
|
+
} else {
|
|
238
|
+
this.parseError = Object.getPrototypeOf(this).parseError;
|
|
239
|
+
}
|
|
240
|
+
function popStack(n) {
|
|
241
|
+
stack.length = stack.length - 2 * n;
|
|
242
|
+
vstack.length = vstack.length - n;
|
|
243
|
+
lstack.length = lstack.length - n;
|
|
244
|
+
}
|
|
245
|
+
var lex = function () {
|
|
246
|
+
var token;
|
|
247
|
+
token = lexer.lex() || EOF;
|
|
248
|
+
if (typeof token !== 'number') {
|
|
249
|
+
token = self.symbols_[token] || token;
|
|
250
|
+
}
|
|
251
|
+
return token;
|
|
252
|
+
};
|
|
253
|
+
var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
|
|
254
|
+
while (true) {
|
|
255
|
+
state = stack[stack.length - 1];
|
|
256
|
+
if (this.defaultActions[state]) {
|
|
257
|
+
action = this.defaultActions[state];
|
|
258
|
+
} else {
|
|
259
|
+
if (symbol === null || typeof symbol == 'undefined') {
|
|
260
|
+
symbol = lex();
|
|
261
|
+
}
|
|
262
|
+
action = table[state] && table[state][symbol];
|
|
263
|
+
}
|
|
264
|
+
if (typeof action === 'undefined' || !action.length || !action[0]) {
|
|
265
|
+
var errStr = '';
|
|
266
|
+
expected = [];
|
|
267
|
+
for (p in table[state]) {
|
|
268
|
+
if (this.terminals_[p] && p > TERROR) {
|
|
269
|
+
expected.push('\'' + this.terminals_[p] + '\'');
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
if (lexer.showPosition) {
|
|
273
|
+
errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
|
|
274
|
+
} else {
|
|
275
|
+
errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
|
|
276
|
+
}
|
|
277
|
+
this.parseError(errStr, {
|
|
278
|
+
text: lexer.match,
|
|
279
|
+
token: this.terminals_[symbol] || symbol,
|
|
280
|
+
line: lexer.yylineno,
|
|
281
|
+
loc: yyloc,
|
|
282
|
+
expected: expected
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
if (action[0] instanceof Array && action.length > 1) {
|
|
286
|
+
throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
|
|
287
|
+
}
|
|
288
|
+
switch (action[0]) {
|
|
289
|
+
case 1:
|
|
290
|
+
stack.push(symbol);
|
|
291
|
+
vstack.push(lexer.yytext);
|
|
292
|
+
lstack.push(lexer.yylloc);
|
|
293
|
+
stack.push(action[1]);
|
|
294
|
+
symbol = null;
|
|
295
|
+
if (!preErrorSymbol) {
|
|
296
|
+
yyleng = lexer.yyleng;
|
|
297
|
+
yytext = lexer.yytext;
|
|
298
|
+
yylineno = lexer.yylineno;
|
|
299
|
+
yyloc = lexer.yylloc;
|
|
300
|
+
if (recovering > 0) {
|
|
301
|
+
recovering--;
|
|
302
|
+
}
|
|
303
|
+
} else {
|
|
304
|
+
symbol = preErrorSymbol;
|
|
305
|
+
preErrorSymbol = null;
|
|
306
|
+
}
|
|
307
|
+
break;
|
|
308
|
+
case 2:
|
|
309
|
+
len = this.productions_[action[1]][1];
|
|
310
|
+
yyval.$ = vstack[vstack.length - len];
|
|
311
|
+
yyval._$ = {
|
|
312
|
+
first_line: lstack[lstack.length - (len || 1)].first_line,
|
|
313
|
+
last_line: lstack[lstack.length - 1].last_line,
|
|
314
|
+
first_column: lstack[lstack.length - (len || 1)].first_column,
|
|
315
|
+
last_column: lstack[lstack.length - 1].last_column
|
|
316
|
+
};
|
|
317
|
+
if (ranges) {
|
|
318
|
+
yyval._$.range = [
|
|
319
|
+
lstack[lstack.length - (len || 1)].range[0],
|
|
320
|
+
lstack[lstack.length - 1].range[1]
|
|
321
|
+
];
|
|
322
|
+
}
|
|
323
|
+
r = this.performAction.apply(yyval, [
|
|
324
|
+
yytext,
|
|
325
|
+
yyleng,
|
|
326
|
+
yylineno,
|
|
327
|
+
sharedState.yy,
|
|
328
|
+
action[1],
|
|
329
|
+
vstack,
|
|
330
|
+
lstack
|
|
331
|
+
].concat(args));
|
|
332
|
+
if (typeof r !== 'undefined') {
|
|
333
|
+
return r;
|
|
334
|
+
}
|
|
335
|
+
if (len) {
|
|
336
|
+
stack = stack.slice(0, -1 * len * 2);
|
|
337
|
+
vstack = vstack.slice(0, -1 * len);
|
|
338
|
+
lstack = lstack.slice(0, -1 * len);
|
|
339
|
+
}
|
|
340
|
+
stack.push(this.productions_[action[1]][0]);
|
|
341
|
+
vstack.push(yyval.$);
|
|
342
|
+
lstack.push(yyval._$);
|
|
343
|
+
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
|
344
|
+
stack.push(newState);
|
|
345
|
+
break;
|
|
346
|
+
case 3:
|
|
347
|
+
return true;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
return true;
|
|
351
|
+
}};
|
|
352
|
+
|
|
353
|
+
/* generated by jison-lex 0.3.4 */
|
|
354
|
+
var lexer = (function(){
|
|
355
|
+
var lexer = ({
|
|
356
|
+
|
|
357
|
+
EOF:1,
|
|
358
|
+
|
|
359
|
+
parseError:function parseError(str, hash) {
|
|
360
|
+
if (this.yy.parser) {
|
|
361
|
+
this.yy.parser.parseError(str, hash);
|
|
362
|
+
} else {
|
|
363
|
+
throw new Error(str);
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
|
|
367
|
+
// resets the lexer, sets new input
|
|
368
|
+
setInput:function (input, yy) {
|
|
369
|
+
this.yy = yy || this.yy || {};
|
|
370
|
+
this._input = input;
|
|
371
|
+
this._more = this._backtrack = this.done = false;
|
|
372
|
+
this.yylineno = this.yyleng = 0;
|
|
373
|
+
this.yytext = this.matched = this.match = '';
|
|
374
|
+
this.conditionStack = ['INITIAL'];
|
|
375
|
+
this.yylloc = {
|
|
376
|
+
first_line: 1,
|
|
377
|
+
first_column: 0,
|
|
378
|
+
last_line: 1,
|
|
379
|
+
last_column: 0
|
|
380
|
+
};
|
|
381
|
+
if (this.options.ranges) {
|
|
382
|
+
this.yylloc.range = [0,0];
|
|
383
|
+
}
|
|
384
|
+
this.offset = 0;
|
|
385
|
+
return this;
|
|
386
|
+
},
|
|
387
|
+
|
|
388
|
+
// consumes and returns one char from the input
|
|
389
|
+
input:function () {
|
|
390
|
+
var ch = this._input[0];
|
|
391
|
+
this.yytext += ch;
|
|
392
|
+
this.yyleng++;
|
|
393
|
+
this.offset++;
|
|
394
|
+
this.match += ch;
|
|
395
|
+
this.matched += ch;
|
|
396
|
+
var lines = ch.match(/(?:\r\n?|\n).*/g);
|
|
397
|
+
if (lines) {
|
|
398
|
+
this.yylineno++;
|
|
399
|
+
this.yylloc.last_line++;
|
|
400
|
+
} else {
|
|
401
|
+
this.yylloc.last_column++;
|
|
402
|
+
}
|
|
403
|
+
if (this.options.ranges) {
|
|
404
|
+
this.yylloc.range[1]++;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
this._input = this._input.slice(1);
|
|
408
|
+
return ch;
|
|
409
|
+
},
|
|
410
|
+
|
|
411
|
+
// unshifts one char (or a string) into the input
|
|
412
|
+
unput:function (ch) {
|
|
413
|
+
var len = ch.length;
|
|
414
|
+
var lines = ch.split(/(?:\r\n?|\n)/g);
|
|
415
|
+
|
|
416
|
+
this._input = ch + this._input;
|
|
417
|
+
this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
|
418
|
+
//this.yyleng -= len;
|
|
419
|
+
this.offset -= len;
|
|
420
|
+
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
|
421
|
+
this.match = this.match.substr(0, this.match.length - 1);
|
|
422
|
+
this.matched = this.matched.substr(0, this.matched.length - 1);
|
|
423
|
+
|
|
424
|
+
if (lines.length - 1) {
|
|
425
|
+
this.yylineno -= lines.length - 1;
|
|
426
|
+
}
|
|
427
|
+
var r = this.yylloc.range;
|
|
428
|
+
|
|
429
|
+
this.yylloc = {
|
|
430
|
+
first_line: this.yylloc.first_line,
|
|
431
|
+
last_line: this.yylineno + 1,
|
|
432
|
+
first_column: this.yylloc.first_column,
|
|
433
|
+
last_column: lines ?
|
|
434
|
+
(lines.length === oldLines.length ? this.yylloc.first_column : 0)
|
|
435
|
+
+ oldLines[oldLines.length - lines.length].length - lines[0].length :
|
|
436
|
+
this.yylloc.first_column - len
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
if (this.options.ranges) {
|
|
440
|
+
this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
|
441
|
+
}
|
|
442
|
+
this.yyleng = this.yytext.length;
|
|
443
|
+
return this;
|
|
444
|
+
},
|
|
445
|
+
|
|
446
|
+
// When called from action, caches matched text and appends it on next action
|
|
447
|
+
more:function () {
|
|
448
|
+
this._more = true;
|
|
449
|
+
return this;
|
|
450
|
+
},
|
|
451
|
+
|
|
452
|
+
// 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.
|
|
453
|
+
reject:function () {
|
|
454
|
+
if (this.options.backtrack_lexer) {
|
|
455
|
+
this._backtrack = true;
|
|
456
|
+
} else {
|
|
457
|
+
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(), {
|
|
458
|
+
text: "",
|
|
459
|
+
token: null,
|
|
460
|
+
line: this.yylineno
|
|
461
|
+
});
|
|
462
|
+
|
|
463
|
+
}
|
|
464
|
+
return this;
|
|
465
|
+
},
|
|
466
|
+
|
|
467
|
+
// retain first n characters of the match
|
|
468
|
+
less:function (n) {
|
|
469
|
+
this.unput(this.match.slice(n));
|
|
470
|
+
},
|
|
471
|
+
|
|
472
|
+
// displays already matched input, i.e. for error messages
|
|
473
|
+
pastInput:function () {
|
|
474
|
+
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
|
475
|
+
return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
|
|
476
|
+
},
|
|
477
|
+
|
|
478
|
+
// displays upcoming input, i.e. for error messages
|
|
479
|
+
upcomingInput:function () {
|
|
480
|
+
var next = this.match;
|
|
481
|
+
if (next.length < 20) {
|
|
482
|
+
next += this._input.substr(0, 20-next.length);
|
|
483
|
+
}
|
|
484
|
+
return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
|
|
485
|
+
},
|
|
486
|
+
|
|
487
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
488
|
+
showPosition:function () {
|
|
489
|
+
var pre = this.pastInput();
|
|
490
|
+
var c = new Array(pre.length + 1).join("-");
|
|
491
|
+
return pre + this.upcomingInput() + "\n" + c + "^";
|
|
492
|
+
},
|
|
493
|
+
|
|
494
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
495
|
+
test_match:function(match, indexed_rule) {
|
|
496
|
+
var token,
|
|
497
|
+
lines,
|
|
498
|
+
backup;
|
|
499
|
+
|
|
500
|
+
if (this.options.backtrack_lexer) {
|
|
501
|
+
// save context
|
|
502
|
+
backup = {
|
|
503
|
+
yylineno: this.yylineno,
|
|
504
|
+
yylloc: {
|
|
505
|
+
first_line: this.yylloc.first_line,
|
|
506
|
+
last_line: this.last_line,
|
|
507
|
+
first_column: this.yylloc.first_column,
|
|
508
|
+
last_column: this.yylloc.last_column
|
|
509
|
+
},
|
|
510
|
+
yytext: this.yytext,
|
|
511
|
+
match: this.match,
|
|
512
|
+
matches: this.matches,
|
|
513
|
+
matched: this.matched,
|
|
514
|
+
yyleng: this.yyleng,
|
|
515
|
+
offset: this.offset,
|
|
516
|
+
_more: this._more,
|
|
517
|
+
_input: this._input,
|
|
518
|
+
yy: this.yy,
|
|
519
|
+
conditionStack: this.conditionStack.slice(0),
|
|
520
|
+
done: this.done
|
|
521
|
+
};
|
|
522
|
+
if (this.options.ranges) {
|
|
523
|
+
backup.yylloc.range = this.yylloc.range.slice(0);
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
lines = match[0].match(/(?:\r\n?|\n).*/g);
|
|
528
|
+
if (lines) {
|
|
529
|
+
this.yylineno += lines.length;
|
|
530
|
+
}
|
|
531
|
+
this.yylloc = {
|
|
532
|
+
first_line: this.yylloc.last_line,
|
|
533
|
+
last_line: this.yylineno + 1,
|
|
534
|
+
first_column: this.yylloc.last_column,
|
|
535
|
+
last_column: lines ?
|
|
536
|
+
lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
|
|
537
|
+
this.yylloc.last_column + match[0].length
|
|
538
|
+
};
|
|
539
|
+
this.yytext += match[0];
|
|
540
|
+
this.match += match[0];
|
|
541
|
+
this.matches = match;
|
|
542
|
+
this.yyleng = this.yytext.length;
|
|
543
|
+
if (this.options.ranges) {
|
|
544
|
+
this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
|
545
|
+
}
|
|
546
|
+
this._more = false;
|
|
547
|
+
this._backtrack = false;
|
|
548
|
+
this._input = this._input.slice(match[0].length);
|
|
549
|
+
this.matched += match[0];
|
|
550
|
+
token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
|
551
|
+
if (this.done && this._input) {
|
|
552
|
+
this.done = false;
|
|
553
|
+
}
|
|
554
|
+
if (token) {
|
|
555
|
+
return token;
|
|
556
|
+
} else if (this._backtrack) {
|
|
557
|
+
// recover context
|
|
558
|
+
for (var k in backup) {
|
|
559
|
+
this[k] = backup[k];
|
|
560
|
+
}
|
|
561
|
+
return false; // rule action called reject() implying the next rule should be tested instead.
|
|
562
|
+
}
|
|
563
|
+
return false;
|
|
564
|
+
},
|
|
565
|
+
|
|
566
|
+
// return next match in input
|
|
567
|
+
next:function () {
|
|
568
|
+
if (this.done) {
|
|
569
|
+
return this.EOF;
|
|
570
|
+
}
|
|
571
|
+
if (!this._input) {
|
|
572
|
+
this.done = true;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
var token,
|
|
576
|
+
match,
|
|
577
|
+
tempMatch,
|
|
578
|
+
index;
|
|
579
|
+
if (!this._more) {
|
|
580
|
+
this.yytext = '';
|
|
581
|
+
this.match = '';
|
|
582
|
+
}
|
|
583
|
+
var rules = this._currentRules();
|
|
584
|
+
for (var i = 0; i < rules.length; i++) {
|
|
585
|
+
tempMatch = this._input.match(this.rules[rules[i]]);
|
|
586
|
+
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
|
587
|
+
match = tempMatch;
|
|
588
|
+
index = i;
|
|
589
|
+
if (this.options.backtrack_lexer) {
|
|
590
|
+
token = this.test_match(tempMatch, rules[i]);
|
|
591
|
+
if (token !== false) {
|
|
592
|
+
return token;
|
|
593
|
+
} else if (this._backtrack) {
|
|
594
|
+
match = false;
|
|
595
|
+
continue; // rule action called reject() implying a rule MISmatch.
|
|
596
|
+
} else {
|
|
597
|
+
// else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
|
|
598
|
+
return false;
|
|
599
|
+
}
|
|
600
|
+
} else if (!this.options.flex) {
|
|
601
|
+
break;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
if (match) {
|
|
606
|
+
token = this.test_match(match, rules[index]);
|
|
607
|
+
if (token !== false) {
|
|
608
|
+
return token;
|
|
609
|
+
}
|
|
610
|
+
// else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
|
|
611
|
+
return false;
|
|
612
|
+
}
|
|
613
|
+
if (this._input === "") {
|
|
614
|
+
return this.EOF;
|
|
615
|
+
} else {
|
|
616
|
+
return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
|
|
617
|
+
text: "",
|
|
618
|
+
token: null,
|
|
619
|
+
line: this.yylineno
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
},
|
|
623
|
+
|
|
624
|
+
// return next match that has a token
|
|
625
|
+
lex:function lex () {
|
|
626
|
+
var r = this.next();
|
|
627
|
+
if (r) {
|
|
628
|
+
return r;
|
|
629
|
+
} else {
|
|
630
|
+
return this.lex();
|
|
631
|
+
}
|
|
632
|
+
},
|
|
633
|
+
|
|
634
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
635
|
+
begin:function begin (condition) {
|
|
636
|
+
this.conditionStack.push(condition);
|
|
637
|
+
},
|
|
638
|
+
|
|
639
|
+
// pop the previously active lexer condition state off the condition stack
|
|
640
|
+
popState:function popState () {
|
|
641
|
+
var n = this.conditionStack.length - 1;
|
|
642
|
+
if (n > 0) {
|
|
643
|
+
return this.conditionStack.pop();
|
|
644
|
+
} else {
|
|
645
|
+
return this.conditionStack[0];
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
|
|
649
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
650
|
+
_currentRules:function _currentRules () {
|
|
651
|
+
if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
|
652
|
+
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
|
653
|
+
} else {
|
|
654
|
+
return this.conditions["INITIAL"].rules;
|
|
655
|
+
}
|
|
656
|
+
},
|
|
657
|
+
|
|
658
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
659
|
+
topState:function topState (n) {
|
|
660
|
+
n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
|
661
|
+
if (n >= 0) {
|
|
662
|
+
return this.conditionStack[n];
|
|
663
|
+
} else {
|
|
664
|
+
return "INITIAL";
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
|
|
668
|
+
// alias for begin(condition)
|
|
669
|
+
pushState:function pushState (condition) {
|
|
670
|
+
this.begin(condition);
|
|
671
|
+
},
|
|
672
|
+
|
|
673
|
+
// return the number of states currently on the stack
|
|
674
|
+
stateStackSize:function stateStackSize() {
|
|
675
|
+
return this.conditionStack.length;
|
|
676
|
+
},
|
|
677
|
+
options: {"case-insensitive":true},
|
|
678
|
+
performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
|
|
679
|
+
var YYSTATE=YY_START;
|
|
680
|
+
switch($avoiding_name_collisions) {
|
|
681
|
+
case 0: this.begin('open_directive'); return 'open_directive';
|
|
682
|
+
break;
|
|
683
|
+
case 1: this.begin("acc_title");return 31;
|
|
684
|
+
break;
|
|
685
|
+
case 2: this.popState(); return "acc_title_value";
|
|
686
|
+
break;
|
|
687
|
+
case 3: this.begin("acc_descr");return 33;
|
|
688
|
+
break;
|
|
689
|
+
case 4: this.popState(); return "acc_descr_value";
|
|
690
|
+
break;
|
|
691
|
+
case 5: this.begin("acc_descr_multiline");
|
|
692
|
+
break;
|
|
693
|
+
case 6: this.popState();
|
|
694
|
+
break;
|
|
695
|
+
case 7:return "acc_descr_multiline_value";
|
|
696
|
+
break;
|
|
697
|
+
case 8:/* skip comments */
|
|
698
|
+
break;
|
|
699
|
+
case 9:/* skip comments */
|
|
700
|
+
break;
|
|
701
|
+
case 10:/* do nothing */
|
|
702
|
+
break;
|
|
703
|
+
case 11:return 10;
|
|
704
|
+
break;
|
|
705
|
+
case 12:/* skip whitespace */
|
|
706
|
+
break;
|
|
707
|
+
case 13:/* skip comments */
|
|
708
|
+
break;
|
|
709
|
+
case 14:this.begin("href");
|
|
710
|
+
break;
|
|
711
|
+
case 15:this.popState();
|
|
712
|
+
break;
|
|
713
|
+
case 16:return 43;
|
|
714
|
+
break;
|
|
715
|
+
case 17:this.begin("callbackname");
|
|
716
|
+
break;
|
|
717
|
+
case 18:this.popState();
|
|
718
|
+
break;
|
|
719
|
+
case 19:this.popState(); this.begin("callbackargs");
|
|
720
|
+
break;
|
|
721
|
+
case 20:return 41;
|
|
722
|
+
break;
|
|
723
|
+
case 21:this.popState();
|
|
724
|
+
break;
|
|
725
|
+
case 22:return 42;
|
|
726
|
+
break;
|
|
727
|
+
case 23:this.begin("click");
|
|
728
|
+
break;
|
|
729
|
+
case 24:this.popState();
|
|
730
|
+
break;
|
|
731
|
+
case 25:return 40;
|
|
732
|
+
break;
|
|
733
|
+
case 26:return 4;
|
|
734
|
+
break;
|
|
735
|
+
case 27:return 22;
|
|
736
|
+
break;
|
|
737
|
+
case 28:return 23;
|
|
738
|
+
break;
|
|
739
|
+
case 29:return 24;
|
|
740
|
+
break;
|
|
741
|
+
case 30:return 25;
|
|
742
|
+
break;
|
|
743
|
+
case 31:return 26;
|
|
744
|
+
break;
|
|
745
|
+
case 32:return 28;
|
|
746
|
+
break;
|
|
747
|
+
case 33:return 27;
|
|
748
|
+
break;
|
|
749
|
+
case 34:return 29;
|
|
750
|
+
break;
|
|
751
|
+
case 35:return 12
|
|
752
|
+
break;
|
|
753
|
+
case 36:return 13
|
|
754
|
+
break;
|
|
755
|
+
case 37:return 14
|
|
756
|
+
break;
|
|
757
|
+
case 38:return 15
|
|
758
|
+
break;
|
|
759
|
+
case 39:return 16
|
|
760
|
+
break;
|
|
761
|
+
case 40:return 17
|
|
762
|
+
break;
|
|
763
|
+
case 41:return 18
|
|
764
|
+
break;
|
|
765
|
+
case 42:return 20
|
|
766
|
+
break;
|
|
767
|
+
case 43:return 21
|
|
768
|
+
break;
|
|
769
|
+
case 44:return 'date';
|
|
770
|
+
break;
|
|
771
|
+
case 45:return 30;
|
|
772
|
+
break;
|
|
773
|
+
case 46:return 'accDescription'
|
|
774
|
+
break;
|
|
775
|
+
case 47:return 36;
|
|
776
|
+
break;
|
|
777
|
+
case 48:return 38;
|
|
778
|
+
break;
|
|
779
|
+
case 49:return 39;
|
|
780
|
+
break;
|
|
781
|
+
case 50:return ':';
|
|
782
|
+
break;
|
|
783
|
+
case 51:return 6;
|
|
784
|
+
break;
|
|
785
|
+
case 52:return 'INVALID';
|
|
786
|
+
break;
|
|
787
|
+
}
|
|
788
|
+
},
|
|
789
|
+
rules: [/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],
|
|
790
|
+
conditions: {"acc_descr_multiline":{"rules":[6,7],"inclusive":false},"acc_descr":{"rules":[4],"inclusive":false},"acc_title":{"rules":[2],"inclusive":false},"callbackargs":{"rules":[21,22],"inclusive":false},"callbackname":{"rules":[18,19,20],"inclusive":false},"href":{"rules":[15,16],"inclusive":false},"click":{"rules":[24,25],"inclusive":false},"INITIAL":{"rules":[0,1,3,5,8,9,10,11,12,13,14,17,23,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],"inclusive":true}}
|
|
791
|
+
});
|
|
792
|
+
return lexer;
|
|
793
|
+
})();
|
|
794
|
+
parser.lexer = lexer;
|
|
795
|
+
function Parser () {
|
|
796
|
+
this.yy = {};
|
|
797
|
+
}
|
|
798
|
+
Parser.prototype = parser;parser.Parser = Parser;
|
|
799
|
+
return new Parser;
|
|
800
|
+
})();
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
if (typeof require !== 'undefined' && typeof exports !== 'undefined') {
|
|
804
|
+
exports.parser = ganttParser;
|
|
805
|
+
exports.Parser = ganttParser.Parser;
|
|
806
|
+
exports.parse = function () { return ganttParser.parse.apply(ganttParser, arguments); };
|
|
807
|
+
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
export const mermaidGanttParser = ganttParser;
|