File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66setup (
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" ,
Original file line number Diff line number Diff line change @@ -143,14 +143,6 @@ BOOLEAN_KEY : 'Boolean';
143143
144144COMMA : ' ,' ;
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
155147ID_NOT_STRICT : ' "' ~[\r\n" .]+'" ' ;
156148ID_STRICT: [a-zA-Z]([a-zA-Z0-9_] | ' #' | ' §' | ' %' | ' ?' | ' \\' | ' \' ' | ' ä' | ' ü' | ' ö' | ' ß' | ' ;' )*;
Original file line number Diff line number Diff 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
97108NEWLINE
98109 : ( {atStartOfInput()} ? SPACES
Original file line number Diff line number Diff line change 11grammar UVLPython;
22import 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
514NEWLINE
615 : ( {self.atStartOfInput()} ? SPACES
You can’t perform that action at this time.
0 commit comments