First steps on work with sequence diagrams.

This commit is contained in:
knsv
2014-11-19 19:29:55 +01:00
parent 170a6640b2
commit 4c26ec7414
5 changed files with 821 additions and 16 deletions

View File

@@ -87,13 +87,13 @@ case 2:
this.$=$$[$0-3];
break;
case 3:
console.log('In graph config');yy.setDirection($$[$0-1]);this.$ = $$[$0-1];
yy.setDirection($$[$0-1]);this.$ = $$[$0-1];
break;
case 11:
console.log('In vertexStatement');yy.addLink($$[$0-2],$$[$0],$$[$0-1]);this.$ = 'oy'
yy.addLink($$[$0-2],$$[$0],$$[$0-1]);this.$ = 'oy'
break;
case 12:
console.log('In vertexStatement ... ');this.$ = 'yo';
this.$ = 'yo';
break;
case 13:
this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'square');
@@ -105,17 +105,14 @@ case 15:
this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'diamond');
break;
case 16:
console.log('In vertex:'+$$[$0]); this.$ = $$[$0];yy.addVertex($$[$0]);
this.$ = $$[$0];yy.addVertex($$[$0]);
break;
case 17: case 21: case 22: case 37:
case 17: case 19: case 21: case 22: case 37:
this.$=$$[$0];
break;
case 18:
this.$=$$[$0-1]+''+$$[$0];
break;
case 19:
console.log('Found token (statement): '+$$[$0]);this.$=$$[$0];
break;
case 20:
this.$=$$[$0-2]+'-'+$$[$0];
break;
@@ -138,7 +135,7 @@ case 28:
this.$ = {"type":"arrow_open"};
break;
case 29:
console.log('Nice link text here: '+$$[$0-1]);this.$ = $$[$0-1];
this.$ = $$[$0-1];
break;
case 30:
this.$ = $$[$0-2] + ' ' +$$[$0];
@@ -150,7 +147,7 @@ case 33:
this.$ = $$[$0-4];yy.addVertex($$[$0-2],undefined,undefined,$$[$0]);
break;
case 34:
console.log('In parser - style: '+$$[$0]);this.$ = $$[$0-4];yy.updateLink($$[$0-2],$$[$0]);
this.$ = $$[$0-4];yy.updateLink($$[$0-2],$$[$0]);
break;
case 35:
this.$ = [$$[$0]]
@@ -312,10 +309,7 @@ parse: function parse(input) {
}
return true;
}};
/*define('parser/mermaid',function(){
return parser;
});*//* generated by jison-lex 0.3.4 */
/* generated by jison-lex 0.3.4 */
var lexer = (function(){
var lexer = ({