File tree Expand file tree Collapse file tree 5 files changed +66
-1
lines changed
Expand file tree Collapse file tree 5 files changed +66
-1
lines changed Original file line number Diff line number Diff line change 105105 'Vector' :'[]' ,
106106 'boolean' :'False' ,
107107 'str' :'""' ,
108+ '[' :'None' ,
108109}
109110
110111## method name mapping. user-defined configuration modules can
111112## replace and/or augment this with their own.
112113renameMethodMap = {
113114 'equals' :'__eq__' ,
115+ 'and' :'and_' ,
116+ 'del' :'del_' ,
117+ 'elif' :'elif_' ,
118+ 'in' :'in_' ,
114119 'is' :'is_' ,
120+ 'not' :'not_' ,
121+ 'or' :'or_' ,
122+ 'print' :'print_' ,
115123}
116124
117125## generic name mapping. user-defined configuration modules can
121129 'null' :'None' ,
122130 'false' :'False' ,
123131 'true' :'True' ,
132+ 'and' :'and_' ,
133+ 'del' :'del_' ,
134+ 'elif' :'elif_' ,
135+ 'in' :'in_' ,
124136 'is' :'is_' ,
137+ 'not' :'not_' ,
138+ 'or' :'or_' ,
139+ 'print' :'print_' ,
125140 'str' :'strval' ,
126141}
127142
152167
153168variableNameMapping = {
154169 'str' :'strval' ,
170+ 'and' :'and_' ,
171+ 'del' :'del_' ,
172+ 'elif' :'elif_' ,
173+ 'in' :'in_' ,
155174 'is' :'is_' ,
175+ 'not' :'not_' ,
176+ 'or' :'or_' ,
177+ 'print' :'print_' ,
156178 }
157179
158180
Original file line number Diff line number Diff line change @@ -810,7 +810,7 @@ returns [value]
810810 : i0: NUM_INT { value = i0.getText()}
811811 | c0: CHAR_LITERAL { value = c0.getText()}
812812 | s0: STRING_LITERAL { value = s0.getText()}
813- | f0: NUM_FLOAT { value = f0.getText()}
813+ | f0: NUM_FLOAT { value = f0.getText().rstrip( " fF " ) }
814814 | d0: NUM_DOUBLE { value = d0.getText()}
815815 | l0: NUM_LONG { value = l0.getText()}
816816 ;
Original file line number Diff line number Diff line change 1+ class EmptyArray {
2+ int [] b ;
3+ public static void main (String [] args ) {
4+ }
5+
6+ }
Original file line number Diff line number Diff line change 1+ class FloatFix {
2+ public static void main (String [] args ) {
3+ float b = 1.2f ;
4+ System .out .println (b );
5+ }
6+ }
Original file line number Diff line number Diff line change 1+ class Keywords {
2+ public static void main (String [] args ) {
3+ String and = "this is and" ;
4+ System .out .println (and );
5+
6+ String del = "this is del" ;
7+ System .out .println (del );
8+
9+ String elif = "this is elif" ;
10+ System .out .println (elif );
11+
12+ String in = "this is in" ;
13+ System .out .println (in );
14+
15+ String is = "this is is" ;
16+ System .out .println (is );
17+
18+ String not = "this is not" ;
19+ System .out .println (not );
20+
21+ String or = "this is or" ;
22+ System .out .println (or );
23+
24+ String print = "this is print" ;
25+ System .out .println (print );
26+
27+ String str = "this is str" ;
28+ System .out .println (str );
29+
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments