Search in sources :

Example 11 with MismatchedSetException

use of org.antlr.runtime.MismatchedSetException in project binnavi by google.

the class MemoryExpressionLexer method mWS.

// $ANTLR start "WS"
public final void mWS() throws RecognitionException {
    try {
        final int _type = WS;
        int _channel = DEFAULT_TOKEN_CHANNEL;
        // C:\\Dokumente und
        // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g:23:6:
        // ( ( ' ' | '\\r' | '\\t' | '\ ' | '\\n' ) )
        // C:\\Dokumente und
        // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g:23:9:
        // ( ' ' | '\\r' | '\\t' | '\ ' | '\\n' )
        {
            if ((input.LA(1) >= '\t' && input.LA(1) <= '\n') || (input.LA(1) >= '\f' && input.LA(1) <= '\r') || input.LA(1) == ' ') {
                input.consume();
            } else {
                final MismatchedSetException mse = new MismatchedSetException(null, input);
                recover(mse);
                throw mse;
            }
            _channel = HIDDEN;
        }
        state.type = _type;
        state.channel = _channel;
    } finally {
    }
}
Also used : MismatchedSetException(org.antlr.runtime.MismatchedSetException)

Example 12 with MismatchedSetException

use of org.antlr.runtime.MismatchedSetException in project binnavi by google.

the class MemoryExpressionLexer method mREGISTER.

// $ANTLR end "OPERAND_PLUS"
// $ANTLR start "REGISTER"
public final void mREGISTER() throws RecognitionException {
    try {
        final int _type = REGISTER;
        final int _channel = DEFAULT_TOKEN_CHANNEL;
        // C:\\Dokumente und
        // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g:27:10:
        // ( CHARACTER ( CHARACTER | DIGIT )+ )
        // C:\\Dokumente und
        // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g:27:12:
        // CHARACTER ( CHARACTER | DIGIT )+
        {
            mCHARACTER();
            // C:\\Dokumente und
            // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g:27:22:
            // ( CHARACTER | DIGIT )+
            int cnt3 = 0;
            loop3: do {
                int alt3 = 2;
                final int LA3_0 = input.LA(1);
                if (((LA3_0 >= '0' && LA3_0 <= '9') || (LA3_0 >= 'A' && LA3_0 <= 'Z') || (LA3_0 >= 'a' && LA3_0 <= 'z'))) {
                    alt3 = 1;
                }
                switch(alt3) {
                    case 1:
                        // C:\\Dokumente und
                        // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g:
                        {
                            if ((input.LA(1) >= '0' && input.LA(1) <= '9') || (input.LA(1) >= 'A' && input.LA(1) <= 'Z') || (input.LA(1) >= 'a' && input.LA(1) <= 'z')) {
                                input.consume();
                            } else {
                                final MismatchedSetException mse = new MismatchedSetException(null, input);
                                recover(mse);
                                throw mse;
                            }
                        }
                        break;
                    default:
                        if (cnt3 >= 1) {
                            break loop3;
                        }
                        final EarlyExitException eee = new EarlyExitException(3, input);
                        throw eee;
                }
                cnt3++;
            } while (true);
        }
        state.type = _type;
        state.channel = _channel;
    } finally {
    }
}
Also used : MismatchedSetException(org.antlr.runtime.MismatchedSetException) EarlyExitException(org.antlr.runtime.EarlyExitException)

Example 13 with MismatchedSetException

use of org.antlr.runtime.MismatchedSetException in project binnavi by google.

the class MemoryExpressionLexer method mHEX_NUMBER.

// $ANTLR end "DIGIT"
// $ANTLR start "HEX_NUMBER"
public final void mHEX_NUMBER() throws RecognitionException {
    try {
        final int _type = HEX_NUMBER;
        final int _channel = DEFAULT_TOKEN_CHANNEL;
        // C:\\Dokumente und
        // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g:26:12:
        // ( '0x' ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )+ )
        // C:\\Dokumente und
        // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g:26:14:
        // '0x' ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )+
        {
            match("0x");
            // C:\\Dokumente und
            // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g:26:19:
            // ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )+
            int cnt2 = 0;
            loop2: do {
                int alt2 = 2;
                final int LA2_0 = input.LA(1);
                if (((LA2_0 >= '0' && LA2_0 <= '9') || (LA2_0 >= 'A' && LA2_0 <= 'F') || (LA2_0 >= 'a' && LA2_0 <= 'f'))) {
                    alt2 = 1;
                }
                switch(alt2) {
                    case 1:
                        // C:\\Dokumente und
                        // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g:
                        {
                            if ((input.LA(1) >= '0' && input.LA(1) <= '9') || (input.LA(1) >= 'A' && input.LA(1) <= 'F') || (input.LA(1) >= 'a' && input.LA(1) <= 'f')) {
                                input.consume();
                            } else {
                                final MismatchedSetException mse = new MismatchedSetException(null, input);
                                recover(mse);
                                throw mse;
                            }
                        }
                        break;
                    default:
                        if (cnt2 >= 1) {
                            break loop2;
                        }
                        final EarlyExitException eee = new EarlyExitException(2, input);
                        throw eee;
                }
                cnt2++;
            } while (true);
        }
        state.type = _type;
        state.channel = _channel;
    } finally {
    }
}
Also used : MismatchedSetException(org.antlr.runtime.MismatchedSetException) EarlyExitException(org.antlr.runtime.EarlyExitException)

Example 14 with MismatchedSetException

use of org.antlr.runtime.MismatchedSetException in project binnavi by google.

the class MemoryExpressionLexer method mCHARACTER.

// $ANTLR start "CHARACTER"
public final void mCHARACTER() throws RecognitionException {
    try {
        final int _type = CHARACTER;
        final int _channel = DEFAULT_TOKEN_CHANNEL;
        // C:\\Dokumente und
        // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g:24:11:
        // ( ( 'a' .. 'z' | 'A' .. 'Z' ) )
        // C:\\Dokumente und
        // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g:24:14:
        // ( 'a' .. 'z' | 'A' .. 'Z' )
        {
            if ((input.LA(1) >= 'A' && input.LA(1) <= 'Z') || (input.LA(1) >= 'a' && input.LA(1) <= 'z')) {
                input.consume();
            } else {
                final MismatchedSetException mse = new MismatchedSetException(null, input);
                recover(mse);
                throw mse;
            }
        }
        state.type = _type;
        state.channel = _channel;
    } finally {
    }
}
Also used : MismatchedSetException(org.antlr.runtime.MismatchedSetException)

Example 15 with MismatchedSetException

use of org.antlr.runtime.MismatchedSetException in project binnavi by google.

the class ConditionLexer method mWS.

public final void mWS() throws RecognitionException {
    try {
        final int _type = WS;
        int _channel = DEFAULT_TOKEN_CHANNEL;
        // C:\\Dokumente und
        // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:30:5:
        // ( ( ' ' | '\\r' | '\\t' | '\ ' | '\\n' ) )
        // C:\\Dokumente und
        // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:30:8:
        // ( ' ' | '\\r' | '\\t' | '\ ' | '\\n' )
        {
            if ((input.LA(1) >= '\t' && input.LA(1) <= '\n') || (input.LA(1) >= '\f' && input.LA(1) <= '\r') || input.LA(1) == ' ') {
                input.consume();
            } else {
                final MismatchedSetException mse = new MismatchedSetException(null, input);
                recover(mse);
                throw mse;
            }
            _channel = HIDDEN;
        }
        state.type = _type;
        state.channel = _channel;
    } finally {
    }
}
Also used : MismatchedSetException(org.antlr.runtime.MismatchedSetException)

Aggregations

MismatchedSetException (org.antlr.runtime.MismatchedSetException)28 RecognitionException (org.antlr.runtime.RecognitionException)8 Token (org.antlr.runtime.Token)8 EarlyExitException (org.antlr.runtime.EarlyExitException)7 NoViableAltException (org.antlr.runtime.NoViableAltException)4 CommonTree (org.antlr.runtime.tree.CommonTree)4