diff --git a/src/diagrams/state/parser/stateDiagram.jison b/src/diagrams/state/parser/stateDiagram.jison index 23a2c8c12..ad2897657 100644 --- a/src/diagrams/state/parser/stateDiagram.jison +++ b/src/diagrams/state/parser/stateDiagram.jison @@ -38,8 +38,8 @@ "state"\s+ { this.pushState('STATE'); } ["] this.begin("STATE_STRING"); -"as"\s* {this.popState('STATE_ID');return "AS";} -[^\n] {this.popState('STATE_ID');return "ID";} +"as"\s* {this.popState();this.pushState('STATE_ID');return "AS";} +[^\n]* {this.popState();console.log('ID');return "ID";} ["] this.popState(); [^"]* { console.log('Long description:', yytext);return "STATE_DESCR";} [^\n\s\{]+ {console.log('COMPOSIT_STATE', yytext);return 'COMPOSIT_STATE';}