Package net.sf.jcontracts.antlr

Examples of net.sf.jcontracts.antlr.NoViableAltException


                    case JavaTokenTypes.BSR:
                        match(JavaTokenTypes.BSR);
                        break;

                    default:
                        throw new NoViableAltException(LT(1));
                }
                additiveExpression();
            }
        }
        catch (ParserException ex)
View Full Code Here


                    {
                        match(JavaTokenTypes.SEMI);
                    }
                    else
                    {
                        throw new NoViableAltException(LT(1));
                    }
                    if (TOKEN_SET_36.member(la_1))
                    {
                        expression();
                    }
                    match(JavaTokenTypes.SEMI);
                    if (TOKEN_SET_36.member(la_1))
                    {
                        expression();
                    }
                    while (la_1 == JavaTokenTypes.COMMA)
                    {
                        match(JavaTokenTypes.COMMA);
                        expression();
                    }
                    match(JavaTokenTypes.RPAREN);
                    statement();
                    break;

                case JavaTokenTypes.LITERAL_while:
                    match(JavaTokenTypes.LITERAL_while);
                    match(JavaTokenTypes.LPAREN);
                    expression();
                    match(JavaTokenTypes.RPAREN);
                    statement();
                    break;

                case JavaTokenTypes.LITERAL_do:
                    match(JavaTokenTypes.LITERAL_do);
                    statement();
                    match(JavaTokenTypes.LITERAL_while);
                    match(JavaTokenTypes.LPAREN);
                    expression();
                    match(JavaTokenTypes.RPAREN);
                    match(JavaTokenTypes.SEMI);
                    break;

                case 51:
                    match(JavaTokenTypes.LITERAL_break);
                    if (la_1 == JavaTokenTypes.IDENT)
                    {
                        match(JavaTokenTypes.IDENT);
                    }
                    match(JavaTokenTypes.SEMI);
                    break;

                case JavaTokenTypes.LITERAL_continue:
                    match(JavaTokenTypes.LITERAL_continue);
                    if (la_1 == JavaTokenTypes.IDENT)
                    {
                        match(JavaTokenTypes.IDENT);
                    }
                    match(JavaTokenTypes.SEMI);
                    break;

                case JavaTokenTypes.LITERAL_return:
                    match(JavaTokenTypes.LITERAL_return);
                    if (TOKEN_SET_36.member(la_1))
                    {
                        expression();
                    }
                    match(JavaTokenTypes.SEMI);
                    break;

                case JavaTokenTypes.LITERAL_switch:
                    match(JavaTokenTypes.LITERAL_switch);
                    match(JavaTokenTypes.LPAREN);
                    expression();
                    match(JavaTokenTypes.RPAREN);
                    match(JavaTokenTypes.LCURLY);
                    do
                    {
                        switch (la_1)
                        {
                            case JavaTokenTypes.LITERAL_case:
                                int _cnt = 0;
                                do
                                {
                                    if (la_1 == JavaTokenTypes.LITERAL_case && TOKEN_SET_36.member(la_2))
                                    {
                                        match(JavaTokenTypes.LITERAL_case);
                                        expression();
                                        match(JavaTokenTypes.COLON);
                                    }
                                    else
                                    {
                                        if (_cnt < 1)
                                        {
                                            throw new NoViableAltException(LT(1));
                                        }
                                        break;
                                    }
                                    _cnt++;
                                }
                                while (true);
                                while (TOKEN_SET_26.member(la_1))
                                {
                                    statement();
                                }
                                break;

                            case JavaTokenTypes.LITERAL_default:
                                match(JavaTokenTypes.LITERAL_default);
                                match(JavaTokenTypes.COLON);
                                while (TOKEN_SET_26.member(la_1))
                                {
                                    statement();
                                }
                                break;

                            default:
                                match(JavaTokenTypes.RCURLY);
                                break label0;
                        }
                    }
                    while (true);

                case JavaTokenTypes.LITERAL_try:
                    tryBlock();
                    break;

                case JavaTokenTypes.LITERAL_throw:
                    match(JavaTokenTypes.LITERAL_throw);
                    expression();
                    match(JavaTokenTypes.SEMI);
                    break;

                case JavaTokenTypes.LITERAL_goto:
                    match(JavaTokenTypes.LITERAL_goto);
                    match(JavaTokenTypes.IDENT);
                    match(JavaTokenTypes.SEMI);
                    break;

                case JavaTokenTypes.SEMI:
                    match(JavaTokenTypes.SEMI);
                    break;

                default:
                    boolean synPredMatched122 = false;
                    if (TOKEN_SET_34.member(la_1) && TOKEN_SET_35.member(la_2))
                    {
                        int _m122 = mark();
                        synPredMatched122 = true;
                        guessing++;
                        try
                        {
                            declaration();
                        }
                        catch (ParserException _ex)
                        {
                            synPredMatched122 = false;
                        }
                        rewind(_m122);
                        guessing--;
                    }
                    if (synPredMatched122)
                    {
                        declaration();
                        break;
                    }
                    if (la_1 == JavaTokenTypes.IDENT && la_2 == JavaTokenTypes.COLON)
                    {
                        match(JavaTokenTypes.IDENT);
                        match(JavaTokenTypes.COLON);
                        statement();
                        break;
                    }
                    if (TOKEN_SET_36.member(la_1) && TOKEN_SET_38.member(la_2))
                    {
                        expression();
                        match(JavaTokenTypes.SEMI);
                        break;
                    }
                    if (la_1 == 32 && la_2 == JavaTokenTypes.LPAREN)
                    {
                        match(JavaTokenTypes.LITERAL_synchronized);
                        match(JavaTokenTypes.LPAREN);
                        expression();
                        match(JavaTokenTypes.RPAREN);
                        statement();
                    }
                    else
                    {
                        throw new NoViableAltException(LT(1));
                    }
                    break;
            }
        }
        catch (ParserException ex)
View Full Code Here

                    }
                    while (true);
                    break;

                default:
                    throw new NoViableAltException(LT(1));

                case JavaTokenTypes.SEMI:
                case JavaTokenTypes.LCURLY:
                    break;
            }
View Full Code Here

                        result = bt;
                    }
                    break;

                default:
                    throw new NoViableAltException(LT(1));
            }
        }
        catch (ParserException ex)
        {
            if (guessing == 0)
View Full Code Here

                                ifa.setCodeComment((CodeComment) ((ExtendedToken) cc).getData());
                            }
                            break;

                        default:
                            throw new NoViableAltException(LT(1));
                    }
                    break;

                case JavaTokenTypes.SEMI:
                    match(JavaTokenTypes.SEMI);
                    break;

                default:
                    throw new NoViableAltException(LT(1));
            }
        }
        catch (ParserException ex)
        {
            if (guessing == 0)
View Full Code Here

                        typeSpec();
                    }
                    break;

                default:
                    throw new NoViableAltException(LT(1));
            }
        }
        catch (ParserException ex)
        {
            if (guessing == 0)
View Full Code Here

TOP

Related Classes of net.sf.jcontracts.antlr.NoViableAltException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.