Skip to content

Commit 486de41

Browse files
committed
fix: error in call for opened in python
1 parent 3a062f6 commit 486de41

4 files changed

Lines changed: 21 additions & 9 deletions

File tree

python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="uvlparser",
8-
version="2.0.0",
8+
version="2.0.1",
99
description="This module provides a get_tree function to obtain an ANTLR parse-tree from a UVL-defined feature model",
1010
long_description=long_description,
1111
long_description_content_type="text/markdown",

uvl/UVLBase.g4

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,6 @@ BOOLEAN_KEY : 'Boolean';
143143

144144
COMMA: ',';
145145

146-
OPEN_PAREN : '(' {this.opened += 1;};
147-
CLOSE_PAREN : ')' {this.opened -= 1;};
148-
OPEN_BRACK : '[' {this.opened += 1;};
149-
CLOSE_BRACK : ']' {this.opened -= 1;};
150-
OPEN_BRACE : '{' {this.opened += 1;};
151-
CLOSE_BRACE : '}' {this.opened -= 1;};
152-
OPEN_COMMENT: '/*' {this.opened += 1;};
153-
CLOSE_COMMENT: '*/' {this.opened -= 1;};
154146

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

uvl/UVLJava.g4

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,17 @@ package uvl;
9393
}
9494

9595
}
96+
97+
OPEN_PAREN : '(' {this.opened += 1;};
98+
CLOSE_PAREN : ')' {this.opened -= 1;};
99+
OPEN_BRACK : '[' {this.opened += 1;};
100+
CLOSE_BRACK : ']' {this.opened -= 1;};
101+
OPEN_BRACE : '{' {this.opened += 1;};
102+
CLOSE_BRACE : '}' {this.opened -= 1;};
103+
OPEN_COMMENT: '/*' {this.opened += 1;};
104+
CLOSE_COMMENT: '*/' {this.opened -= 1;};
105+
106+
96107
//This is here because the way python manage tabs and new lines
97108
NEWLINE
98109
: ( {atStartOfInput()}? SPACES

uvl/UVLPython.g4

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
grammar UVLPython;
22
import UVLBase;
33

4+
OPEN_PAREN : '(' {self.opened += 1;};
5+
CLOSE_PAREN : ')' {self.opened -= 1;};
6+
OPEN_BRACK : '[' {self.opened += 1;};
7+
CLOSE_BRACK : ']' {self.opened -= 1;};
8+
OPEN_BRACE : '{' {self.opened += 1;};
9+
CLOSE_BRACE : '}' {self.opened -= 1;};
10+
OPEN_COMMENT: '/*' {self.opened += 1;};
11+
CLOSE_COMMENT: '*/' {self.opened -= 1;};
12+
413
//This is here because the way python manage tabs and new lines
514
NEWLINE
615
: ( {self.atStartOfInput()}? SPACES

0 commit comments

Comments
 (0)