def xpath_tokenizer(p):
 out = []
 for (op, tag) in ElementPath.xpath_tokenizer(p):
  out.append((op or tag))
 return out

def xpath_tokenizer ( p ) : out = [ ] for ( op , tag ) in ElementPath . xpath_tokenizer ( p ) : out . append ( ( op or tag ) ) return out
test the xpath tokenizer .