--- antlr_python_runtime-3.1.2/antlr3/recognizers.py.orig 2010-05-01 13:30:01.000000000 +0200 +++ antlr_python_runtime-3.1.2/antlr3/recognizers.py 2010-05-01 13:36:00.000000000 +0200 @@ -164,24 +164,20 @@ self._state = state if self.antlr_version > runtime_version: - raise RuntimeError( - "ANTLR version mismatch: " - "The recognizer has been generated by V%s, but this runtime " - "is V%s. Please use the V%s runtime or higher." - % (self.antlr_version_str, - runtime_version_str, - self.antlr_version_str)) + print >> sys.stderr, """ + WARNING: ANTLR version mismatch: + The recognizer has been generated by V%s, but this runtime + is V%s, this may not work correctly. Please use the V%s runtime or higher.""" % ( + self.antlr_version_str, runtime_version_str, self.antlr_version_str) elif (self.antlr_version < (3, 1, 0, 0) and self.antlr_version != runtime_version): # FIXME: make the runtime compatible with 3.0.1 codegen # and remove this block. - raise RuntimeError( - "ANTLR version mismatch: " - "The recognizer has been generated by V%s, but this runtime " - "is V%s. Please use the V%s runtime." - % (self.antlr_version_str, - runtime_version_str, - self.antlr_version_str)) + print >> sys.stderr, """ + WARNING ANTLR version mismatch: + The recognizer has been generated by V%s, but this runtime + is V%s, this may not work correctly. Please use the V%s runtime.""" % ( + self.antlr_version_str, runtime_version_str, self.antlr_version_str) # this one only exists to shut up pylint :( def setInput(self, input):