Closed slurmulon closed 3 years ago
Hi Erik, The BNF rule for "string" has to explicitly express that it starts and ends with the same character - either single or double quote. Something along this line:
modified resources/grammar.bnf
@@ -20,7 +20,7 @@ meta = [<empty>] <'@'> #'(Audio|Instrument|Time|Tempo|Key|Delay|Link|Title
keyword = [<empty>] #'(`|~|Note|Scale|Chord|Mode|Triad)' [<empty>]
play = [<empty>] <'!Play'> [<empty>] elem
meter = [<empty>] number <'|'> number [<empty>]
-string = #'[\'|\"](.*?)[\"|\']'
+string = #'(?:\'([^\']*?)\'|\"([^\"]*?)\")'
word = #'[a-zA-Z]+'
number = #'[0-9]+'
color = #'#[a-fA-F0-9xX]{6}'
Cheers
@slava92 Oh awesome, thanks for the tip/fix!
Also sorry for the extreme delay, I'm terrible with Github notifications sometimes :face_with_head_bandage:
Users should be able to nest single quotes inside of double quotes (or vice-versa). Right now this causes a syntax error during parsing