Skip to content

Commit 8d5bb33

Browse files
committed
[GR-21717] Our ANTLR build produces warnings
PullRequest: graalpython/1001
2 parents e623945 + 809f5b2 commit 8d5bb33

File tree

5 files changed

+1734
-1754
lines changed

5 files changed

+1734
-1754
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/parser/antlr/Python3.g4

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -432,15 +432,14 @@ typedargslist [ArgDefListBuilder args]
432432
:
433433
(
434434
defparameter[args] ( ',' defparameter[args] )* ',' '/' {args.markPositionalOnlyIndex();}
435-
((',' defparameter[args] ( ',' defparameter[args] )*)?
435+
(',' defparameter[args] ( ',' defparameter[args] )*)?
436436
( ','
437437
( splatparameter[args]
438438
( ',' defparameter[args])*
439439
( ',' ( kwargsparameter[args] ','? )? )?
440440
| kwargsparameter[args] ','?
441441
)?
442442
)?
443-
)?
444443
| defparameter[args] ( ',' defparameter[args] )*
445444
( ','
446445
( splatparameter[args]
@@ -498,15 +497,14 @@ varargslist returns [ArgDefListBuilder result]
498497
{ ArgDefListBuilder args = new ArgDefListBuilder(factory.getScopeEnvironment()); }
499498
(
500499
vdefparameter[args] ( ',' vdefparameter[args] )* ',' '/' {args.markPositionalOnlyIndex();}
501-
((',' vdefparameter[args] (',' vdefparameter[args])* )?
500+
(',' vdefparameter[args] (',' vdefparameter[args])* )?
502501
( ','
503502
( vsplatparameter[args]
504503
( ',' vdefparameter[args])*
505504
( ',' (vkwargsparameter[args] ','? )? )?
506505
| vkwargsparameter[args] ','?
507506
)?
508507
)?
509-
)?
510508
| vdefparameter[args] (',' vdefparameter[args])*
511509
( ','
512510
( vsplatparameter[args]
@@ -1739,23 +1737,23 @@ BYTES_LITERAL
17391737

17401738
/// decimalinteger
17411739
DECIMAL_INTEGER
1742-
: NON_ZERO_DIGIT DIGIT* (['_'] DIGIT+)*
1743-
| '0'+ (['_']'0'+)*
1740+
: NON_ZERO_DIGIT DIGIT* ('_' DIGIT+)*
1741+
| '0'+ ('_''0'+)*
17441742
;
17451743

17461744
/// octinteger
17471745
OCT_INTEGER
1748-
: '0' [oO] (OCT_DIGIT | (['_'] OCT_DIGIT+))+
1746+
: '0' [oO] (OCT_DIGIT | ('_' OCT_DIGIT+))+
17491747
;
17501748

17511749
/// hexinteger
17521750
HEX_INTEGER
1753-
: '0' [xX] (HEX_DIGIT | (['_'] HEX_DIGIT+))+
1751+
: '0' [xX] (HEX_DIGIT | ('_' HEX_DIGIT+))+
17541752
;
17551753

17561754
/// bininteger
17571755
BIN_INTEGER
1758-
: '0' [bB] (BIN_DIGIT | (['_'] BIN_DIGIT+))+
1756+
: '0' [bB] (BIN_DIGIT | ('_' BIN_DIGIT+))+
17591757
;
17601758

17611759
/// floatnumber ::= pointfloat | exponentfloat
@@ -1899,7 +1897,7 @@ fragment EXPONENT_FLOAT
18991897

19001898
/// intpart
19011899
fragment INT_PART
1902-
: DIGIT+ (['_'] DIGIT+)*
1900+
: DIGIT+ ('_' DIGIT+)*
19031901
;
19041902

19051903
/// fraction

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/parser/antlr/Python3.interp

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/parser/antlr/Python3Lexer.interp

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)