More forgiving flowcharts, space at the end of the line allowed

This commit is contained in:
knsv
2015-02-25 07:57:26 +01:00
parent 0955c4c428
commit 8598a7d712
7 changed files with 35 additions and 32 deletions

View File

@@ -121,7 +121,7 @@
return 'ALPHA';
"|" return 'PIPE';
"(" return 'PS';
")" return 'PE';
")" return 'PE';
"[" return 'SQS';
"]" return 'SQE';
"{" return 'DIAMOND_START'
@@ -229,31 +229,31 @@ verticeStatement:
vertex: alphaNum SQS text SQE
{$$ = $1;yy.addVertex($1,$3,'square');}
| alphaNum SQS text SQE SPACE
| alphaNum SQS text SQE spaceList
{$$ = $1;yy.addVertex($1,$3,'square');}
| alphaNum PS PS text PE PE
{$$ = $1;yy.addVertex($1,$4,'circle');}
| alphaNum PS PS text PE PE SPACE
| alphaNum PS PS text PE PE spaceList
{$$ = $1;yy.addVertex($1,$4,'circle');}
| alphaNum PS text PE
{$$ = $1;yy.addVertex($1,$3,'round');}
| alphaNum PS text PE SPACE
| alphaNum PS text PE spaceList
{$$ = $1;yy.addVertex($1,$3,'round');}
| alphaNum DIAMOND_START text DIAMOND_STOP
{$$ = $1;yy.addVertex($1,$3,'diamond');}
| alphaNum DIAMOND_START text DIAMOND_STOP SPACE
| alphaNum DIAMOND_START text DIAMOND_STOP spaceList
{$$ = $1;yy.addVertex($1,$3,'diamond');}
| alphaNum TAGEND text SQE
{$$ = $1;yy.addVertex($1,$3,'odd');}
| alphaNum TAGEND text SQE SPACE
| alphaNum TAGEND text SQE spaceList
{$$ = $1;yy.addVertex($1,$3,'odd');}
/* | alphaNum SQS text TAGSTART
{$$ = $1;yy.addVertex($1,$3,'odd_right');}
| alphaNum SQS text TAGSTART SPACE
| alphaNum SQS text TAGSTART spaceList
{$$ = $1;yy.addVertex($1,$3,'odd_right');} */
| alphaNum
{$$ = $1;yy.addVertex($1);}
| alphaNum SPACE
| alphaNum spaceList
{$$ = $1;yy.addVertex($1);}
;

File diff suppressed because one or more lines are too long

View File

@@ -316,12 +316,13 @@ module.exports.draw = function (text, id) {
function drawToday(theSidePad, theTopPad, w, h) {
var todayG = svg.append('g')
.attr('class', 'today')
.attr('class', 'today');
var today = new Date();
var todayLine = todayG.append("line")
.attr("x1", timeScale(new Date('2014-01-13')) + theSidePad)
.attr("x2", timeScale(new Date('2014-01-13')) + theSidePad)
.attr("x1", timeScale(today) + theSidePad)
.attr("x2", timeScale(today) + theSidePad)
.attr("y1", conf.titleTopMargin)
.attr("y2", h-conf.titleTopMargin)
.attr('class', 'today')