Skip to content

Commit aab7181

Browse files
authored
Revert "fix: correct constraint usage in parser and lexer definitions (#65)"
This reverts commit 68c1ed6.
1 parent 68c1ed6 commit aab7181

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

uvl/UVLLexer.g4

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ FEATURES_KEY: 'features';
88
IMPORTS_KEY: 'imports';
99
NAMESPACE_KEY: 'namespace';
1010
AS_KEY: 'as';
11-
CONSTRAINT_KEY: 'constraint';
1211
CONSTRAINTS_KEY: 'constraints';
1312
CARDINALITY_KEY: 'cardinality';
1413
STRING_KEY: 'String';
@@ -61,17 +60,17 @@ CLOSE_BRACE: '}';
6160
OPEN_COMMENT: '/*';
6261
CLOSE_COMMENT: '*/';
6362

64-
FLOAT: '-'?[0-9]*[.][0-9]+;
65-
INTEGER: '0' | '-'?[1-9][0-9]*;
63+
FLOAT: '-'? [0-9]* [.][0-9]+;
64+
INTEGER: '0' | '-'? [1-9][0-9]*;
6665
BOOLEAN: 'true' | 'false';
6766

6867
COMMA: ',';
6968
DOT: '.';
7069

71-
ID_NOT_STRICT: '"'~[\r\n".]+'"';
70+
ID_NOT_STRICT: '"' ~[\r\n".]+ '"';
7271
ID_STRICT: [a-zA-Z]([a-zA-Z0-9_#§%?\\'äüöß;])*;
7372

74-
STRING: '\''~[\r\n'.]+'\'';
73+
STRING: '\'' ~[\r\n']+ '\'';
7574

7675
SKIP_: ( SPACES | COMMENT) -> skip;
7776

uvl/UVLParser.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ value: BOOLEAN | FLOAT | INTEGER | STRING | attributes | vector;
4444
vector: OPEN_BRACK (value (COMMA value)*)? CLOSE_BRACK;
4545

4646
constraintAttribute:
47-
CONSTRAINT_KEY constraint # SingleConstraintAttribute
47+
CONSTRAINTS_KEY constraint # SingleConstraintAttribute
4848
| CONSTRAINTS_KEY constraintList # ListConstraintAttribute;
4949
constraintList:
5050
OPEN_BRACK (constraint (COMMA constraint)*)? CLOSE_BRACK;

0 commit comments

Comments
 (0)