class_docstr: Parser for Fortran format strings. The parse method returns a *Format
  instance.
  
  Notes
  -----
  Only ExpFormat (exponential format for floating values) and IntFormat
  (integer format) for now.
class_docstr_tok: ["Parser","for","Fortran","format","strings",".","The","parse","method","returns","a","*","Format","instance",".","Notes","--","--","-","Only","ExpFormat","(","exponential","format","for","floating","values",")","and","IntFormat","(","integer","format",")","for","now","."]
code: def _parse_format(self, tokens):
      if not tokens[0].type == "LPAR":
          raise SyntaxError(
              "Expected left parenthesis at position "
              "%d (got '%s')" % (0, tokens[0].value)
          )
      elif not tokens[-1].type == "RPAR":
          raise SyntaxError(
              "Expected right parenthesis at position "
              "%d (got '%s')" % (len(tokens), tokens[-1].value)
          )
  
      tokens = tokens[1:-1]
      types = [t.type for t in tokens]
      if types[0] == "INT":
          repeat = int(tokens.pop(0).value)
      else:
          repeat = None
  
      next = tokens.pop(0)
      if next.type == "INT_ID":
          next = self._next(tokens, "INT")
          width = int(next.value)
          if tokens:
              min = int(self._get_min(tokens))
          else:
              min = None
          return IntFormat(width, min, repeat)
      elif next.type == "EXP_ID":
          next = self._next(tokens, "INT")
          width = int(next.value)
  
          next = self._next(tokens, "DOT")
  
          next = self._next(tokens, "INT")
          significand = int(next.value)
  
          if tokens:
              next = self._next(tokens, "EXP_ID")
  
              next = self._next(tokens, "INT")
              min = int(next.value)
          else:
              min = None
          return ExpFormat(width, significand, min, repeat)
      else:
          raise SyntaxError("Invalid formatter type %s" % next.value)
  
imports: import re
  import numpy
label_desc: Use image node_id 5 for calling the FortranFormatParser obj's underlying member method code with example usage: obj._parse_format(tokens) and returns: IntFormat, ExpFormat