if pattern string contains more then 500 items it fails with RecursionError if hasattr(listener, "enterObservationExpressionOr"): RecursionError: maximum recursion depth exceeded while calling a Python object