1 line
66 KiB
Plaintext
1 line
66 KiB
Plaintext
|
{"version":3,"file":"timeline-definition-24ebf147.js","sources":["../src/diagrams/timeline/parser/timeline.jison","../src/diagrams/timeline/timelineDb.js","../src/diagrams/timeline/svgDraw.js","../src/diagrams/timeline/timelineRenderer.ts","../src/diagrams/timeline/styles.js","../src/diagrams/timeline/timeline-definition.ts"],"sourcesContent":["/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2023 Knut Sveidqvist\n * MIT license.\n */\n%lex\n%options case-insensitive\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n\n// Directive states\n%x open_directive type_directive arg_directive\n\n\n%%\n\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n<open_directive>((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n<type_directive>\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n<type_directive,arg_directive>\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n<arg_directive>((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\\%%(?!\\{)[^\\n]* /* skip comments */\n[^\\}]\\%\\%[^\\n]* /* skip comments */\n[\\n]+ return 'NEWLINE';\n\\s+ /* skip whitespace */\n\\#[^\\n]* /* skip comments */\n\n\"timeline\" return 'timeline';\n\"title\"\\s[^#\\n;]+ return 'title';\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n<acc_title>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n<acc_descr>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n<acc_descr_multiline>[\\}] { this.popState(); }\n<acc_descr_multiline>[^\\}]* return \"acc_descr_multiline_value\";\n\"section\"\\s[^#:\\n;]+ return 'section';\n\n// event starting with \"==>\" keyword\n\":\"\\s[^#:\\n;]+ return 'event';\n[^#:\\n;]+ return 'period';\n\n\n<<EOF>> return 'EOF';\n. return 'INVALID';\n\n/lex\n\n%left '^'\n\n%start start\n\n%% /* language grammar */\n\nstart\n\t: timeline document 'EOF' { return $2; }\n\t| directive start\n\t;\n\ndocument\n\t: /* empty */ { $$ = [] }\n\t| document line {$1.push($2);$$ = $1}\n\t;\n\nline\n\t: SPACE statement { $$ = $2 }\n\t| statement { $$ = $1 }\n\t| NEWLINE { $$=[];}\n\t| EOF { $$=[];}\n\t;\n\ndirective\n : openDirective typeDirective closeDirective 'NEWLINE'\n | openDirective typeDirective ':' argDirective closeDirective 'NEWLINE'\n ;\n\nstatement\n : title {yy.getCommonDb().setDiagramTitle($1.substr(6));$$=$1.substr(6);}\n | acc_title acc_title_value { $$=$2.trim();yy.getCommonDb().setAccTitle($$); }\n | acc_descr acc_descr_value { $$=$2.trim();yy.getCommonDb().setAccDescription($$); }\n | acc_descr_multiline_value { $$=$1.trim();yy.getCommonDb().setAccDescription($$); }\n | section {yy.addSection($1.substr(8));$$=$1.substr(8);}\n | period_statement\n | event_statement\n | directive\n ;\nperiod_statement\n : period {yy.addTask($1,0,'');$$=$1;}\n;\nevent_statement\n : event {yy.addEvent($1.substr(2));$$=$1;}\n;\n\n\nopenDirective\n : open_directive { yy.parseDirective('%%{', 'open_directive'); }\n ;\n\ntypeDirective\n : type_directive { yy.parseDirective($1, 'type_directive'); }\n ;\n\nargDirective\n : arg_directive { $1 = $1.trim().replace(/'/g, '\"'); yy.parseDirective($1, 'arg_directive'); }\n ;\n\ncloseDirective\n : close_directive { yy.parseDirective('}%%', 'close_directive'
|