Closed furesoft closed 5 years ago
when i have the rule: expression = keyword, ";";
it does not parse true, but it should be true
Thanks for pointing this out.
This is caused by statements being split by semi-colon, regardless of whether this semi-colon is inside a literal.
See https://github.com/ed-cooper/Ebnf.Compiler/blob/master/EBNF.Compiler/Compiler.cs#L67
As a temporary solution, please try this alternative statement and if you could feedback to me whether it works as expected that would be helpful:
expression = keyword, "\u003B";
solution:
make custom split method, if char to split is in quotes then not split it. i have implemented this function, but i must search in my archive
In the latest commit, I've added a method called SanitiseStatement which contains functionality to only remove spaces when they are outside literals.
This can be abstracted to also work for this situation.
Hi, please clarify what you mean here or I'll have to close the issue.