diff --git a/src/diagrams/git/parser/gitGraph.jison b/src/diagrams/git/parser/gitGraph.jison index e675a56e4..d14069b6c 100644 --- a/src/diagrams/git/parser/gitGraph.jison +++ b/src/diagrams/git/parser/gitGraph.jison @@ -1,10 +1,9 @@ - /* * Parse following * gitGraph: * commit * commit - * branch + * branch */ %lex @@ -14,28 +13,28 @@ %% -(\r?\n)+ return 'NL'; -\s+ /* skip all whitespace */ -\#[^\n]* /* skip comments */ -\%%[^\n]* /* skip comments */ -"gitGraph" return 'GG'; -"commit" return 'COMMIT'; -"branch" return 'BRANCH'; -"merge" return 'MERGE'; -"reset" return 'RESET'; -"checkout" return 'CHECKOUT'; -"LR" return 'DIR'; -"BT" return 'DIR'; -":" return ':'; -"^" return 'CARET' -"options"\r?\n this.begin("options"); -"end"\r?\n this.popState(); -[^\n]+\r?\n return 'OPT'; -["] this.begin("string"); -["] this.popState(); -[^"]* return 'STR'; -[a-zA-Z][a-zA-Z0-9_]+ return 'ID'; -<> return 'EOF'; +(\r?\n)+ return 'NL'; +\s+ /* skip all whitespace */ +\#[^\n]* /* skip comments */ +\%%[^\n]* /* skip comments */ +"gitGraph" return 'GG'; +"commit" return 'COMMIT'; +"branch" return 'BRANCH'; +"merge" return 'MERGE'; +"reset" return 'RESET'; +"checkout" return 'CHECKOUT'; +"LR" return 'DIR'; +"BT" return 'DIR'; +":" return ':'; +"^" return 'CARET' +"options"\r?\n this.begin("options"); +"end"\r?\n this.popState(); +[^\n]+\r?\n return 'OPT'; +["] this.begin("string"); +["] this.popState(); +[^"]* return 'STR'; +[a-zA-Z][-_\.a-zA-Z0-9]*[-_a-zA-Z0-9] return 'ID'; +<> return 'EOF'; /lex