class_docstr: Parser for ASDL files.
  
  Create, then call the parse method on a buffer containing ASDL.
  This is a simple recursive descent parser that uses tokenize_asdl for the
  lexing.
class_docstr_tok: ["Parser","for","ASDL","files",".","Create",",","then","call","the","parse","method","on","a","buffer","containing","ASDL",".","This","is","a","simple","recursive","descent","parser","that","uses","tokenize_asdl","for","the","lexing","."]
code: def _parse_type(self):
      if self.cur_token.kind == TokenKind.LParen:
          # If we see a (, it's a product
          return self._parse_product()
      else:
          # Otherwise it's a sum. Look for ConstructorId
          sumlist = [
              Constructor(
                  self._match(TokenKind.ConstructorId),
                  self._parse_optional_fields(),
              )
          ]
          while self.cur_token.kind == TokenKind.Pipe:
              # More constructors
              self._advance()
              sumlist.append(
                  Constructor(
                      self._match(TokenKind.ConstructorId),
                      self._parse_optional_fields(),
                  )
              )
          return Sum(sumlist, self._parse_optional_attributes())
  
imports: from collections import namedtuple
  import re
label_desc: Use image node_id 5 for calling the ASDLParser obj's underlying member method code with example usage: obj._parse_type() and returns: self, Sum