Commit c802d0ab authored by Kateřina Sloupová's avatar Kateřina Sloupová
Browse files

init could be empty plus first exception messages in fja_checker

parent eebcc1bc
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -4,7 +4,7 @@ grammar DFA_grammar;


start:       init production* final;
start:       init production* final;


init:        INIT EQUALS statename;
init:        (INIT EQUALS statename | );


production:  LEFT_PARENTHESIS statename COMMA statename RIGHT_PARENTHESIS EQUALS statename;
production:  LEFT_PARENTHESIS statename COMMA statename RIGHT_PARENTHESIS EQUALS statename;


+1 −1
Original line number Original line Diff line number Diff line
@@ -33,4 +33,4 @@ statename




atn:
atn:
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 12, 52, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 3, 2, 3, 2, 7, 2, 15, 10, 2, 12, 2, 14, 2, 18, 11, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 7, 5, 40, 10, 5, 12, 5, 14, 5, 43, 11, 5, 3, 5, 5, 5, 46, 10, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 2, 2, 7, 2, 4, 6, 8, 10, 2, 2, 2, 49, 2, 12, 3, 2, 2, 2, 4, 21, 3, 2, 2, 2, 6, 25, 3, 2, 2, 2, 8, 33, 3, 2, 2, 2, 10, 49, 3, 2, 2, 2, 12, 16, 5, 4, 3, 2, 13, 15, 5, 6, 4, 2, 14, 13, 3, 2, 2, 2, 15, 18, 3, 2, 2, 2, 16, 14, 3, 2, 2, 2, 16, 17, 3, 2, 2, 2, 17, 19, 3, 2, 2, 2, 18, 16, 3, 2, 2, 2, 19, 20, 5, 8, 5, 2, 20, 3, 3, 2, 2, 2, 21, 22, 7, 3, 2, 2, 22, 23, 7, 4, 2, 2, 23, 24, 5, 10, 6, 2, 24, 5, 3, 2, 2, 2, 25, 26, 7, 5, 2, 2, 26, 27, 5, 10, 6, 2, 27, 28, 7, 9, 2, 2, 28, 29, 5, 10, 6, 2, 29, 30, 7, 6, 2, 2, 30, 31, 7, 4, 2, 2, 31, 32, 5, 10, 6, 2, 32, 7, 3, 2, 2, 2, 33, 34, 7, 10, 2, 2, 34, 35, 7, 4, 2, 2, 35, 45, 7, 7, 2, 2, 36, 41, 5, 10, 6, 2, 37, 38, 7, 9, 2, 2, 38, 40, 5, 10, 6, 2, 39, 37, 3, 2, 2, 2, 40, 43, 3, 2, 2, 2, 41, 39, 3, 2, 2, 2, 41, 42, 3, 2, 2, 2, 42, 46, 3, 2, 2, 2, 43, 41, 3, 2, 2, 2, 44, 46, 3, 2, 2, 2, 45, 36, 3, 2, 2, 2, 45, 44, 3, 2, 2, 2, 46, 47, 3, 2, 2, 2, 47, 48, 7, 8, 2, 2, 48, 9, 3, 2, 2, 2, 49, 50, 7, 11, 2, 2, 50, 11, 3, 2, 2, 2, 5, 16, 41, 45]
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 12, 54, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 3, 2, 3, 2, 7, 2, 15, 10, 2, 12, 2, 14, 2, 18, 11, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 26, 10, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 7, 5, 42, 10, 5, 12, 5, 14, 5, 45, 11, 5, 3, 5, 5, 5, 48, 10, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 2, 2, 7, 2, 4, 6, 8, 10, 2, 2, 2, 52, 2, 12, 3, 2, 2, 2, 4, 25, 3, 2, 2, 2, 6, 27, 3, 2, 2, 2, 8, 35, 3, 2, 2, 2, 10, 51, 3, 2, 2, 2, 12, 16, 5, 4, 3, 2, 13, 15, 5, 6, 4, 2, 14, 13, 3, 2, 2, 2, 15, 18, 3, 2, 2, 2, 16, 14, 3, 2, 2, 2, 16, 17, 3, 2, 2, 2, 17, 19, 3, 2, 2, 2, 18, 16, 3, 2, 2, 2, 19, 20, 5, 8, 5, 2, 20, 3, 3, 2, 2, 2, 21, 22, 7, 3, 2, 2, 22, 23, 7, 4, 2, 2, 23, 26, 5, 10, 6, 2, 24, 26, 3, 2, 2, 2, 25, 21, 3, 2, 2, 2, 25, 24, 3, 2, 2, 2, 26, 5, 3, 2, 2, 2, 27, 28, 7, 5, 2, 2, 28, 29, 5, 10, 6, 2, 29, 30, 7, 9, 2, 2, 30, 31, 5, 10, 6, 2, 31, 32, 7, 6, 2, 2, 32, 33, 7, 4, 2, 2, 33, 34, 5, 10, 6, 2, 34, 7, 3, 2, 2, 2, 35, 36, 7, 10, 2, 2, 36, 37, 7, 4, 2, 2, 37, 47, 7, 7, 2, 2, 38, 43, 5, 10, 6, 2, 39, 40, 7, 9, 2, 2, 40, 42, 5, 10, 6, 2, 41, 39, 3, 2, 2, 2, 42, 45, 3, 2, 2, 2, 43, 41, 3, 2, 2, 2, 43, 44, 3, 2, 2, 2, 44, 48, 3, 2, 2, 2, 45, 43, 3, 2, 2, 2, 46, 48, 3, 2, 2, 2, 47, 38, 3, 2, 2, 2, 47, 46, 3, 2, 2, 2, 48, 49, 3, 2, 2, 2, 49, 50, 7, 8, 2, 2, 50, 9, 3, 2, 2, 2, 51, 52, 7, 11, 2, 2, 52, 11, 3, 2, 2, 2, 6, 16, 25, 43, 47]
 No newline at end of file
 No newline at end of file
+51 −40
Original line number Original line Diff line number Diff line
@@ -12,22 +12,23 @@ else:
def serializedATN():
def serializedATN():
    with StringIO() as buf:
    with StringIO() as buf:
        buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\f")
        buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\f")
        buf.write("\64\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\3\2\3\2\7")
        buf.write("\66\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\3\2\3\2\7")
        buf.write("\2\17\n\2\f\2\16\2\22\13\2\3\2\3\2\3\3\3\3\3\3\3\3\3\4")
        buf.write("\2\17\n\2\f\2\16\2\22\13\2\3\2\3\2\3\3\3\3\3\3\3\3\5\3")
        buf.write("\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\7")
        buf.write("\32\n\3\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3")
        buf.write("\5(\n\5\f\5\16\5+\13\5\3\5\5\5.\n\5\3\5\3\5\3\6\3\6\3")
        buf.write("\5\3\5\3\5\7\5*\n\5\f\5\16\5-\13\5\3\5\5\5\60\n\5\3\5")
        buf.write("\6\2\2\7\2\4\6\b\n\2\2\2\61\2\f\3\2\2\2\4\25\3\2\2\2\6")
        buf.write("\3\5\3\6\3\6\3\6\2\2\7\2\4\6\b\n\2\2\2\64\2\f\3\2\2\2")
        buf.write("\31\3\2\2\2\b!\3\2\2\2\n\61\3\2\2\2\f\20\5\4\3\2\r\17")
        buf.write("\4\31\3\2\2\2\6\33\3\2\2\2\b#\3\2\2\2\n\63\3\2\2\2\f\20")
        buf.write("\5\6\4\2\16\r\3\2\2\2\17\22\3\2\2\2\20\16\3\2\2\2\20\21")
        buf.write("\5\4\3\2\r\17\5\6\4\2\16\r\3\2\2\2\17\22\3\2\2\2\20\16")
        buf.write("\3\2\2\2\21\23\3\2\2\2\22\20\3\2\2\2\23\24\5\b\5\2\24")
        buf.write("\3\2\2\2\20\21\3\2\2\2\21\23\3\2\2\2\22\20\3\2\2\2\23")
        buf.write("\3\3\2\2\2\25\26\7\3\2\2\26\27\7\4\2\2\27\30\5\n\6\2\30")
        buf.write("\24\5\b\5\2\24\3\3\2\2\2\25\26\7\3\2\2\26\27\7\4\2\2\27")
        buf.write("\5\3\2\2\2\31\32\7\5\2\2\32\33\5\n\6\2\33\34\7\t\2\2\34")
        buf.write("\32\5\n\6\2\30\32\3\2\2\2\31\25\3\2\2\2\31\30\3\2\2\2")
        buf.write("\35\5\n\6\2\35\36\7\6\2\2\36\37\7\4\2\2\37 \5\n\6\2 \7")
        buf.write("\32\5\3\2\2\2\33\34\7\5\2\2\34\35\5\n\6\2\35\36\7\t\2")
        buf.write("\3\2\2\2!\"\7\n\2\2\"#\7\4\2\2#-\7\7\2\2$)\5\n\6\2%&\7")
        buf.write("\2\36\37\5\n\6\2\37 \7\6\2\2 !\7\4\2\2!\"\5\n\6\2\"\7")
        buf.write("\t\2\2&(\5\n\6\2\'%\3\2\2\2(+\3\2\2\2)\'\3\2\2\2)*\3\2")
        buf.write("\3\2\2\2#$\7\n\2\2$%\7\4\2\2%/\7\7\2\2&+\5\n\6\2\'(\7")
        buf.write("\2\2*.\3\2\2\2+)\3\2\2\2,.\3\2\2\2-$\3\2\2\2-,\3\2\2\2")
        buf.write("\t\2\2(*\5\n\6\2)\'\3\2\2\2*-\3\2\2\2+)\3\2\2\2+,\3\2")
        buf.write("./\3\2\2\2/\60\7\b\2\2\60\t\3\2\2\2\61\62\7\13\2\2\62")
        buf.write("\2\2,\60\3\2\2\2-+\3\2\2\2.\60\3\2\2\2/&\3\2\2\2/.\3\2")
        buf.write("\13\3\2\2\2\5\20)-")
        buf.write("\2\2\60\61\3\2\2\2\61\62\7\b\2\2\62\t\3\2\2\2\63\64\7")
        buf.write("\13\2\2\64\13\3\2\2\2\6\20\31+/")
        return buf.getvalue()
        return buf.getvalue()




@@ -178,12 +179,22 @@ class DFA_grammarParser ( Parser ):
        self.enterRule(localctx, 2, self.RULE_init)
        self.enterRule(localctx, 2, self.RULE_init)
        try:
        try:
            self.enterOuterAlt(localctx, 1)
            self.enterOuterAlt(localctx, 1)
            self.state = 23
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [DFA_grammarParser.INIT]:
                self.state = 19
                self.state = 19
                self.match(DFA_grammarParser.INIT)
                self.match(DFA_grammarParser.INIT)
                self.state = 20
                self.state = 20
                self.match(DFA_grammarParser.EQUALS)
                self.match(DFA_grammarParser.EQUALS)
                self.state = 21
                self.state = 21
                self.statename()
                self.statename()
                pass
            elif token in [DFA_grammarParser.LEFT_PARENTHESIS, DFA_grammarParser.FINAL]:
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
        except RecognitionException as re:
            localctx.exception = re
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.reportError(self, re)
@@ -238,19 +249,19 @@ class DFA_grammarParser ( Parser ):
        self.enterRule(localctx, 4, self.RULE_production)
        self.enterRule(localctx, 4, self.RULE_production)
        try:
        try:
            self.enterOuterAlt(localctx, 1)
            self.enterOuterAlt(localctx, 1)
            self.state = 23
            self.match(DFA_grammarParser.LEFT_PARENTHESIS)
            self.state = 24
            self.statename()
            self.state = 25
            self.state = 25
            self.match(DFA_grammarParser.COMMA)
            self.match(DFA_grammarParser.LEFT_PARENTHESIS)
            self.state = 26
            self.state = 26
            self.statename()
            self.statename()
            self.state = 27
            self.state = 27
            self.match(DFA_grammarParser.RIGHT_PARENTHESIS)
            self.match(DFA_grammarParser.COMMA)
            self.state = 28
            self.state = 28
            self.match(DFA_grammarParser.EQUALS)
            self.statename()
            self.state = 29
            self.state = 29
            self.match(DFA_grammarParser.RIGHT_PARENTHESIS)
            self.state = 30
            self.match(DFA_grammarParser.EQUALS)
            self.state = 31
            self.statename()
            self.statename()
        except RecognitionException as re:
        except RecognitionException as re:
            localctx.exception = re
            localctx.exception = re
@@ -313,27 +324,27 @@ class DFA_grammarParser ( Parser ):
        self._la = 0 # Token type
        self._la = 0 # Token type
        try:
        try:
            self.enterOuterAlt(localctx, 1)
            self.enterOuterAlt(localctx, 1)
            self.state = 31
            self.state = 33
            self.match(DFA_grammarParser.FINAL)
            self.match(DFA_grammarParser.FINAL)
            self.state = 32
            self.state = 34
            self.match(DFA_grammarParser.EQUALS)
            self.match(DFA_grammarParser.EQUALS)
            self.state = 33
            self.state = 35
            self.match(DFA_grammarParser.LEFT_BRACKET)
            self.match(DFA_grammarParser.LEFT_BRACKET)
            self.state = 43
            self.state = 45
            self._errHandler.sync(self)
            self._errHandler.sync(self)
            token = self._input.LA(1)
            token = self._input.LA(1)
            if token in [DFA_grammarParser.STATE]:
            if token in [DFA_grammarParser.STATE]:
                self.state = 34
                self.state = 36
                self.statename()
                self.statename()
                self.state = 39
                self.state = 41
                self._errHandler.sync(self)
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                _la = self._input.LA(1)
                while _la==DFA_grammarParser.COMMA:
                while _la==DFA_grammarParser.COMMA:
                    self.state = 35
                    self.state = 37
                    self.match(DFA_grammarParser.COMMA)
                    self.match(DFA_grammarParser.COMMA)
                    self.state = 36
                    self.state = 38
                    self.statename()
                    self.statename()
                    self.state = 41
                    self.state = 43
                    self._errHandler.sync(self)
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    _la = self._input.LA(1)


@@ -343,7 +354,7 @@ class DFA_grammarParser ( Parser ):
            else:
            else:
                raise NoViableAltException(self)
                raise NoViableAltException(self)


            self.state = 45
            self.state = 47
            self.match(DFA_grammarParser.RIGHT_BRACKET)
            self.match(DFA_grammarParser.RIGHT_BRACKET)
        except RecognitionException as re:
        except RecognitionException as re:
            localctx.exception = re
            localctx.exception = re
@@ -383,7 +394,7 @@ class DFA_grammarParser ( Parser ):
        self.enterRule(localctx, 8, self.RULE_statename)
        self.enterRule(localctx, 8, self.RULE_statename)
        try:
        try:
            self.enterOuterAlt(localctx, 1)
            self.enterOuterAlt(localctx, 1)
            self.state = 47
            self.state = 49
            self.match(DFA_grammarParser.STATE)
            self.match(DFA_grammarParser.STATE)
        except RecognitionException as re:
        except RecognitionException as re:
            localctx.exception = re
            localctx.exception = re
+1 −1
Original line number Original line Diff line number Diff line
@@ -4,7 +4,7 @@ grammar NFA_grammar;


start:       init production* final;
start:       init production* final;


init:        INIT EQUALS statename;
init:        (INIT EQUALS statename | );


production:  LEFT_PARENTHESIS statename COMMA statename RIGHT_PARENTHESIS EQUALS stateset;
production:  LEFT_PARENTHESIS statename COMMA statename RIGHT_PARENTHESIS EQUALS stateset;


+1 −1
Original line number Original line Diff line number Diff line
@@ -34,4 +34,4 @@ statename




atn:
atn:
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 12, 56, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 3, 2, 3, 2, 7, 2, 17, 10, 2, 12, 2, 14, 2, 20, 11, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 7, 5, 40, 10, 5, 12, 5, 14, 5, 43, 11, 5, 3, 5, 5, 5, 46, 10, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 2, 2, 8, 2, 4, 6, 8, 10, 12, 2, 2, 2, 52, 2, 14, 3, 2, 2, 2, 4, 23, 3, 2, 2, 2, 6, 27, 3, 2, 2, 2, 8, 35, 3, 2, 2, 2, 10, 49, 3, 2, 2, 2, 12, 53, 3, 2, 2, 2, 14, 18, 5, 4, 3, 2, 15, 17, 5, 6, 4, 2, 16, 15, 3, 2, 2, 2, 17, 20, 3, 2, 2, 2, 18, 16, 3, 2, 2, 2, 18, 19, 3, 2, 2, 2, 19, 21, 3, 2, 2, 2, 20, 18, 3, 2, 2, 2, 21, 22, 5, 10, 6, 2, 22, 3, 3, 2, 2, 2, 23, 24, 7, 3, 2, 2, 24, 25, 7, 4, 2, 2, 25, 26, 5, 12, 7, 2, 26, 5, 3, 2, 2, 2, 27, 28, 7, 5, 2, 2, 28, 29, 5, 12, 7, 2, 29, 30, 7, 9, 2, 2, 30, 31, 5, 12, 7, 2, 31, 32, 7, 6, 2, 2, 32, 33, 7, 4, 2, 2, 33, 34, 5, 8, 5, 2, 34, 7, 3, 2, 2, 2, 35, 45, 7, 7, 2, 2, 36, 41, 5, 12, 7, 2, 37, 38, 7, 9, 2, 2, 38, 40, 5, 12, 7, 2, 39, 37, 3, 2, 2, 2, 40, 43, 3, 2, 2, 2, 41, 39, 3, 2, 2, 2, 41, 42, 3, 2, 2, 2, 42, 46, 3, 2, 2, 2, 43, 41, 3, 2, 2, 2, 44, 46, 3, 2, 2, 2, 45, 36, 3, 2, 2, 2, 45, 44, 3, 2, 2, 2, 46, 47, 3, 2, 2, 2, 47, 48, 7, 8, 2, 2, 48, 9, 3, 2, 2, 2, 49, 50, 7, 10, 2, 2, 50, 51, 7, 4, 2, 2, 51, 52, 5, 8, 5, 2, 52, 11, 3, 2, 2, 2, 53, 54, 7, 11, 2, 2, 54, 13, 3, 2, 2, 2, 5, 18, 41, 45]
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 12, 58, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 3, 2, 3, 2, 7, 2, 17, 10, 2, 12, 2, 14, 2, 20, 11, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 28, 10, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 7, 5, 42, 10, 5, 12, 5, 14, 5, 45, 11, 5, 3, 5, 5, 5, 48, 10, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 2, 2, 8, 2, 4, 6, 8, 10, 12, 2, 2, 2, 55, 2, 14, 3, 2, 2, 2, 4, 27, 3, 2, 2, 2, 6, 29, 3, 2, 2, 2, 8, 37, 3, 2, 2, 2, 10, 51, 3, 2, 2, 2, 12, 55, 3, 2, 2, 2, 14, 18, 5, 4, 3, 2, 15, 17, 5, 6, 4, 2, 16, 15, 3, 2, 2, 2, 17, 20, 3, 2, 2, 2, 18, 16, 3, 2, 2, 2, 18, 19, 3, 2, 2, 2, 19, 21, 3, 2, 2, 2, 20, 18, 3, 2, 2, 2, 21, 22, 5, 10, 6, 2, 22, 3, 3, 2, 2, 2, 23, 24, 7, 3, 2, 2, 24, 25, 7, 4, 2, 2, 25, 28, 5, 12, 7, 2, 26, 28, 3, 2, 2, 2, 27, 23, 3, 2, 2, 2, 27, 26, 3, 2, 2, 2, 28, 5, 3, 2, 2, 2, 29, 30, 7, 5, 2, 2, 30, 31, 5, 12, 7, 2, 31, 32, 7, 9, 2, 2, 32, 33, 5, 12, 7, 2, 33, 34, 7, 6, 2, 2, 34, 35, 7, 4, 2, 2, 35, 36, 5, 8, 5, 2, 36, 7, 3, 2, 2, 2, 37, 47, 7, 7, 2, 2, 38, 43, 5, 12, 7, 2, 39, 40, 7, 9, 2, 2, 40, 42, 5, 12, 7, 2, 41, 39, 3, 2, 2, 2, 42, 45, 3, 2, 2, 2, 43, 41, 3, 2, 2, 2, 43, 44, 3, 2, 2, 2, 44, 48, 3, 2, 2, 2, 45, 43, 3, 2, 2, 2, 46, 48, 3, 2, 2, 2, 47, 38, 3, 2, 2, 2, 47, 46, 3, 2, 2, 2, 48, 49, 3, 2, 2, 2, 49, 50, 7, 8, 2, 2, 50, 9, 3, 2, 2, 2, 51, 52, 7, 10, 2, 2, 52, 53, 7, 4, 2, 2, 53, 54, 5, 8, 5, 2, 54, 11, 3, 2, 2, 2, 55, 56, 7, 11, 2, 2, 56, 13, 3, 2, 2, 2, 6, 18, 27, 43, 47]
 No newline at end of file
 No newline at end of file
Loading