@@ -204,7 +204,8 @@ def parse(self, expr, simplify=False):
204204 if TRACE_PARSE :
205205 tokenized = list (tokenized )
206206 print ('tokens:' )
207- map (print , tokenized )
207+ for t in tokenized :
208+ print (t )
208209 tokenized = iter (tokenized )
209210
210211 # the abstract syntax tree for this expression that will be build as we
@@ -262,16 +263,16 @@ def is_operator(_t):
262263 if TRACE_PARSE : print (' ast: token_type is TOKEN_NOT:' , repr (ast ))
263264
264265 elif token_type == TOKEN_AND :
265- # if not prev_token or not is_sym(prev_token_type):
266- # raise ParseError(token_type, token_string, token_position, PARSE_INVALID_OPERATOR_SEQUENCE)
266+ # if not prev_token or not is_sym(prev_token_type):
267+ # raise ParseError(token_type, token_string, token_position, PARSE_INVALID_OPERATOR_SEQUENCE)
267268
268269 ast = self ._start_operation (ast , self .AND , precedence )
269270 if TRACE_PARSE :
270271 print (' ast:token_type is TOKEN_AND: start_operation' , ast )
271272
272273 elif token_type == TOKEN_OR :
273- # if not prev_token or not is_sym(prev_token_type):
274- # raise ParseError(token_type, token_string, token_position, PARSE_INVALID_OPERATOR_SEQUENCE)
274+ # if not prev_token or not is_sym(prev_token_type):
275+ # raise ParseError(token_type, token_string, token_position, PARSE_INVALID_OPERATOR_SEQUENCE)
275276
276277 ast = self ._start_operation (ast , self .OR , precedence )
277278 if TRACE_PARSE :
0 commit comments