Example #1
0
    def noViableAlt(self, s, input):
        if self.recognizer._state.backtracking > 0:
            raise BacktrackingFailed

        nvae = NoViableAltException(self.getDescription(), self.decisionNumber,
                                    s, input)

        self.error(nvae)
        raise nvae
Example #2
0
    def noViableAlt(self, s, input):
        if self.recognizer.backtracking > 0:
            self.recognizer.failed = True
            return

        nvae = NoViableAltException(self.getDescription(), self.decisionNumber,
                                    s, input)

        self.error(nvae)
        raise nvae