parameters: (self, text, is_signed=False, is_long=False)
return_statement: return result
docstring: Parses an integer.
  
      Args:
        text: The text to parse.
        is_signed: True if a signed integer must be parsed.
        is_long: True if a long integer must be parsed.
  
      Returns:
        The integer value.
  
      Raises:
        ValueError: Thrown Iff the text is not a valid integer.
docstring_summary: Parses an integer.
docstring_tokens: Parses an integer .
function: def _ParseInteger(self, text, is_signed=False, is_long=False):
      """Parses an integer.
  
      Args:
        text: The text to parse.
        is_signed: True if a signed integer must be parsed.
        is_long: True if a long integer must be parsed.
  
      Returns:
        The integer value.
  
      Raises:
        ValueError: Thrown Iff the text is not a valid integer.
      """
      pos = 0
      if text.startswith('-'):
        pos += 1
  
      base = 10
      if text.startswith('0x', pos) or text.startswith('0X', pos):
        base = 16
      elif text.startswith('0', pos):
        base = 8
  
      # Do the actual parsing. Exception handling is propagated to caller.
      result = int(text, base)
  
      # Check if the integer is sane. Exceptions handled by callers.
      checker = self._INTEGER_CHECKERS[2 * int(is_long) + int(is_signed)]
      checker.CheckValue(result)
      return result
function_tokens: def _ParseInteger ( self , text , is_signed = False , is_long = False ) : pos = 0 if text . startswith ( '-' ) : pos += 1 base = 10 if text . startswith ( '0x' , pos ) or text . startswith ( '0X' , pos ) : base = 16 elif text . startswith ( '0' , pos ) : base = 8 # Do the actual parsing. Exception handling is propagated to caller. result = int ( text , base ) # Check if the integer is sane. Exceptions handled by callers. checker = self . _INTEGER_CHECKERS [ 2 * int ( is_long ) + int ( is_signed ) ] checker . CheckValue ( result ) return result