Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New grammar will allow statements ending without semicolon as disccused in Issue #38 #63

Merged
merged 1 commit into from
Dec 15, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/diagrams/flowchart/parser/flow.jison
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,20 @@

expressions
: graphConfig statements EOF
| graphConfig statements
| graphConfig spaceListNewline statements EOF
{$$=$1;}
| graphConfig spaceListNewline statements
{$$=$1;}
;

graphConfig
: GRAPH SPACE DIR SEMI
{ yy.setDirection($3);$$ = $3;}
| GRAPH SPACE DIR NEWLINE
{ yy.setDirection($3);$$ = $3;}
| GRAPH SPACE DIR spaceList NEWLINE
{ yy.setDirection($3);$$ = $3;}
;

statements
Expand All @@ -152,11 +159,23 @@ statement
: commentStatement NEWLINE
{$$='Comment';}
| verticeStatement SEMI
| verticeStatement NEWLINE
| verticeStatement EOF
| styleStatement SEMI
| styleStatement NEWLINE
| styleStatement EOF
| linkStyleStatement SEMI
| linkStyleStatement NEWLINE
| linkStyleStatement EOF
| classDefStatement SEMI
| classDefStatement NEWLINE
| classDefStatement EOF
| classStatement SEMI
| classStatement NEWLINE
| classStatement EOF
| clickStatement SEMI
| clickStatement NEWLINE
| clickStatement EOF
;

verticeStatement:
Expand Down
Loading