Generate a ParseException with the specified message, pointing to the current token. The auto-generated Parser.generateParseException() method does not provide line number info, therefore we do this.
( String message, Exception e )
| 122 | provide line number info, therefore we do this. |
| 123 | */ |
| 124 | ParseException createParseException( String message, Exception e ) |
| 125 | { |
| 126 | Token errortok = token; |
| 127 | int line = errortok.beginLine, column = errortok.beginColumn; |
| 128 | String mess = (errortok.kind == 0) ? tokenImage[0] : errortok.image; |
| 129 | return new ParseException( "Parse error at line " + line |
| 130 | + ", column " + column + " : " + message, e ); |
| 131 | } |
| 132 | |
| 133 | int parseInt(String s) throws NumberFormatException { |
| 134 | int radix; |