groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <>
Subject Re: making parser modules for antlr2 and antlr4
Date Wed, 26 Oct 2016 23:47:19 GMT

and found a new problem... org.codehaus.groovy.syntax.Numbers has a 
parseInteger method which takes an AST class from antlr as first 
parameter. The method is used from the parser and I think it is for the 
parser mainly. Of course the new parser uses this method as well. The 
purpose is to parse things like "109G" and "0x1234".

The reason it has a AST parameter is for error reporting. You can use it 
with a null value, then there will be no error reporting. The reporting 
is done using ASTRuntimeException, which is one of our classes in the 
antlr package. For the parser only the error reporting version is 
interesting...but the new parser does not do that.

First of we see that as public API? Because if not, I can 
change it freely... and I would like to change ASTRuntimeException. 
instead of using the AST I would like to use only line and column as 

bye Jochen

View raw message