public Term intLiteral() throws SourceCodeException
    {
        Token valToken = consumeToken(INTEGER_LITERAL);

        NumericType result = new IntLiteral(Integer.parseInt(valToken.image));

        // Set the position that the literal was parsed from.
        SourceCodePosition position =
            new SourceCodePositionImpl(valToken.beginLine, valToken.beginColumn, valToken.endLine, valToken.endColumn);
        result.setSourceCodePosition(position);

        return result;
    }
public Term intLiteral ( ) throws SourceCodeException { Token valToken = consumeToken ( INTEGER_LITERAL ) ; NumericType result = new IntLiteral ( Integer . parseInt ( valToken . image ) ) ; SourceCodePosition position = new SourceCodePositionImpl ( valToken . beginLine , valToken . beginColumn , valToken . endLine , valToken . endColumn ) ; result . setSourceCodePosition ( position ) ; return result ; }
Parses an integer literal.

@return An integer literal.

@throws SourceCodeException If the next token in the sequence is not an integer literal.