Fix to only discard recognizer return values if they are None.
The previous behavior was to discard return values if they evaluated as False.
@@ -536,7 +536,7 @@ class Parser(object):
break
last_prior = symbol.prior
tok = symbol.recognizer(input_str, position)
- if tok:
+ if tok is not None:
tokens.append(Token(symbol, tok))
if finish_flags[idx]:
break
