Closed DavidPiringer closed 2 years ago
Please add unit tests. Please change '#' symbol to mark beginning of comment until the end of the line.
Reviewed changes, tested existing unit tests that are affected as well as new unit tests. Tested parser in GUI. The only minor issue is that the synchronization between the CheckedItemList of constraints and the string representation now drops disabled / commented constraints when the string representation is parsed again.
Due to the usage of complex regular expressions, I decided to refactor the shape constraint parser component using the recursive descent technique. The grammar for shape constraints changed slightly, new keywords for regions ('where') and weight ('with') are introduced as shown in the following EBNF.
Working Examples:
For error handling, the parser throws exceptions containing an error message with the next expected symbol and the location of the error with line/column information.