code: def tokenize_asdl(buf):
      """Tokenize the given buffer. Yield Token objects."""
      for lineno, line in enumerate(buf.splitlines(), 1):
          for m in re.finditer(r"\s*(\w+|--.*|.)", line.strip()):
              c = m.group(1)
              if c[0].isalpha():
                  # Some kind of identifier
                  if c[0].isupper():
                      yield Token(TokenKind.ConstructorId, c, lineno)
                  else:
                      yield Token(TokenKind.TypeId, c, lineno)
              elif c[:2] == "--":
                  # Comment
                  break
              else:
                  # Operators
                  try:
                      op_kind = TokenKind.operator_table[c]
                  except KeyError:
                      raise ASDLSyntaxError(
                          "Invalid operator %s" % c, lineno
                      )
                  yield Token(op_kind, c, lineno)
  
imports: from collections import namedtuple
  import re
label_desc: Use image node_id 3 for calling a global function with example usage: tokenize_asdl(buf) without return types