code: def extract_alphabet(alphabet, inputdata, fixed_start = False):
      
      if not inputdata:
          return []
      base_alphabet = alphabet.alphabet
  
      lexer = lexer_factory(alphabet, base_alphabet)
      totallen = len(inputdata)
      maxl = totallen
      minl = 1
      if fixed_start:
          max_start = 1
      else:
          max_start = totallen
      result = []
      for i in range(max_start):
          for j in range(i+minl, min(i+maxl, totallen) + 1):
              try:
                  lexed = lexer(inputdata[i:j])
                  if lexed and len(lexed) == 1:
                      result.append((i,j, inputdata[i:j], lexed[0].gd))
                  elif lexed:
                      raise Exception
              except:
                  continue
      result = filter_subsets(result)
      return [PositionToken(content, gd, left, right) for (left, right, content, gd) in result]
docs: Receives a sequence and an alphabet, 
      returns a list of PositionTokens with all of the parts of the sequence that 
      are a subset of the alphabet