⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 validationlexer.java

📁 EclipseIM是一个Eclipse插件, 其可以与Java开发人员即时聊天, 当在聊天中, 可以发送Eclipse中的java源码.
💻 JAVA
字号:
// $ANTLR 3.0.1 antlr/Validation.g 2007-10-15 00:18:54
package com.asterix.validation.antlr;
import org.antlr.runtime.*;import java.util.Stack;import java.util.List;import java.util.ArrayList;public class ValidationLexer extends Lexer {    public static final int CLASS=6;    public static final int RULE=5;    public static final int ID=10;    public static final int Tokens=21;    public static final int EOF=-1;    public static final int BREAK=9;    public static final int T20=20;    public static final int GROUP=4;    public static final int IMPORT=8;    public static final int WS=11;    public static final int ITERATOR=7;    public static final int T12=12;    public static final int T13=13;    public static final int T14=14;    public static final int T15=15;    public static final int T16=16;    public static final int T17=17;    public static final int T18=18;    public static final int T19=19;    public ValidationLexer() {;}     public ValidationLexer(CharStream input) {        super(input);    }    public String getGrammarFileName() { return "antlr/Validation.g"; }    // $ANTLR start T12    public final void mT12() throws RecognitionException {        try {            int _type = T12;            // antlr/Validation.g:6:5: ( '->' )            // antlr/Validation.g:6:7: '->'            {            match("->");             }            this.type = _type;        }        finally {        }    }    // $ANTLR end T12    // $ANTLR start T13    public final void mT13() throws RecognitionException {        try {            int _type = T13;            // antlr/Validation.g:7:5: ( ';' )            // antlr/Validation.g:7:7: ';'            {            match(';');             }            this.type = _type;        }        finally {        }    }    // $ANTLR end T13    // $ANTLR start T14    public final void mT14() throws RecognitionException {        try {            int _type = T14;            // antlr/Validation.g:8:5: ( ',' )            // antlr/Validation.g:8:7: ','            {            match(',');             }            this.type = _type;        }        finally {        }    }    // $ANTLR end T14    // $ANTLR start T15    public final void mT15() throws RecognitionException {        try {            int _type = T15;            // antlr/Validation.g:9:5: ( '!' )            // antlr/Validation.g:9:7: '!'            {            match('!');             }            this.type = _type;        }        finally {        }    }    // $ANTLR end T15    // $ANTLR start T16    public final void mT16() throws RecognitionException {        try {            int _type = T16;            // antlr/Validation.g:10:5: ( '#' )            // antlr/Validation.g:10:7: '#'            {            match('#');             }            this.type = _type;        }        finally {        }    }    // $ANTLR end T16    // $ANTLR start T17    public final void mT17() throws RecognitionException {        try {            int _type = T17;            // antlr/Validation.g:11:5: ( 'import' )            // antlr/Validation.g:11:7: 'import'            {            match("import");             }            this.type = _type;        }        finally {        }    }    // $ANTLR end T17    // $ANTLR start T18    public final void mT18() throws RecognitionException {        try {            int _type = T18;            // antlr/Validation.g:12:5: ( '.' )            // antlr/Validation.g:12:7: '.'            {            match('.');             }            this.type = _type;        }        finally {        }    }    // $ANTLR end T18    // $ANTLR start T19    public final void mT19() throws RecognitionException {        try {            int _type = T19;            // antlr/Validation.g:13:5: ( '/**' )            // antlr/Validation.g:13:7: '/**'            {            match("/**");             }            this.type = _type;        }        finally {        }    }    // $ANTLR end T19    // $ANTLR start T20    public final void mT20() throws RecognitionException {        try {            int _type = T20;            // antlr/Validation.g:14:5: ( '*/' )            // antlr/Validation.g:14:7: '*/'            {            match("*/");             }            this.type = _type;        }        finally {        }    }    // $ANTLR end T20    // $ANTLR start ID    public final void mID() throws RecognitionException {        try {            int _type = ID;            // antlr/Validation.g:53:5: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )+ )            // antlr/Validation.g:53:9: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )+            {            // antlr/Validation.g:53:9: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )+            int cnt1=0;            loop1:            do {                int alt1=2;                int LA1_0 = input.LA(1);                if ( ((LA1_0>='0' && LA1_0<='9')||(LA1_0>='A' && LA1_0<='Z')||LA1_0=='_'||(LA1_0>='a' && LA1_0<='z')) ) {                    alt1=1;                }                switch (alt1) {            	case 1 :            	    // antlr/Validation.g:            	    {            	    if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {            	        input.consume();            	    }            	    else {            	        MismatchedSetException mse =            	            new MismatchedSetException(null,input);            	        recover(mse);    throw mse;            	    }            	    }            	    break;            	default :            	    if ( cnt1 >= 1 ) break loop1;                        EarlyExitException eee =                            new EarlyExitException(1, input);                        throw eee;                }                cnt1++;            } while (true);            }            this.type = _type;        }        finally {        }    }    // $ANTLR end ID    // $ANTLR start WS    public final void mWS() throws RecognitionException {        try {            int _type = WS;            // antlr/Validation.g:54:5: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )            // antlr/Validation.g:54:9: ( ' ' | '\\t' | '\\r' | '\\n' )+            {            // antlr/Validation.g:54:9: ( ' ' | '\\t' | '\\r' | '\\n' )+            int cnt2=0;            loop2:            do {                int alt2=2;                int LA2_0 = input.LA(1);                if ( ((LA2_0>='\t' && LA2_0<='\n')||LA2_0=='\r'||LA2_0==' ') ) {                    alt2=1;                }                switch (alt2) {            	case 1 :            	    // antlr/Validation.g:            	    {            	    if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {            	        input.consume();            	    }            	    else {            	        MismatchedSetException mse =            	            new MismatchedSetException(null,input);            	        recover(mse);    throw mse;            	    }            	    }            	    break;            	default :            	    if ( cnt2 >= 1 ) break loop2;                        EarlyExitException eee =                            new EarlyExitException(2, input);                        throw eee;                }                cnt2++;            } while (true);            skip();            }            this.type = _type;        }        finally {        }    }    // $ANTLR end WS    public void mTokens() throws RecognitionException {        // antlr/Validation.g:1:8: ( T12 | T13 | T14 | T15 | T16 | T17 | T18 | T19 | T20 | ID | WS )        int alt3=11;        switch ( input.LA(1) ) {        case '-':            {            alt3=1;            }            break;        case ';':            {            alt3=2;            }            break;        case ',':            {            alt3=3;            }            break;        case '!':            {            alt3=4;            }            break;        case '#':            {            alt3=5;            }            break;        case 'i':            {            int LA3_6 = input.LA(2);            if ( (LA3_6=='m') ) {                int LA3_12 = input.LA(3);                if ( (LA3_12=='p') ) {                    int LA3_13 = input.LA(4);                    if ( (LA3_13=='o') ) {                        int LA3_14 = input.LA(5);                        if ( (LA3_14=='r') ) {                            int LA3_15 = input.LA(6);                            if ( (LA3_15=='t') ) {                                int LA3_16 = input.LA(7);                                if ( ((LA3_16>='0' && LA3_16<='9')||(LA3_16>='A' && LA3_16<='Z')||LA3_16=='_'||(LA3_16>='a' && LA3_16<='z')) ) {                                    alt3=10;                                }                                else {                                    alt3=6;}                            }                            else {                                alt3=10;}                        }                        else {                            alt3=10;}                    }                    else {                        alt3=10;}                }                else {                    alt3=10;}            }            else {                alt3=10;}            }            break;        case '.':            {            alt3=7;            }            break;        case '/':            {            alt3=8;            }            break;        case '*':            {            alt3=9;            }            break;        case '0':        case '1':        case '2':        case '3':        case '4':        case '5':        case '6':        case '7':        case '8':        case '9':        case 'A':        case 'B':        case 'C':        case 'D':        case 'E':        case 'F':        case 'G':        case 'H':        case 'I':        case 'J':        case 'K':        case 'L':        case 'M':        case 'N':        case 'O':        case 'P':        case 'Q':        case 'R':        case 'S':        case 'T':        case 'U':        case 'V':        case 'W':        case 'X':        case 'Y':        case 'Z':        case '_':        case 'a':        case 'b':        case 'c':        case 'd':        case 'e':        case 'f':        case 'g':        case 'h':        case 'j':        case 'k':        case 'l':        case 'm':        case 'n':        case 'o':        case 'p':        case 'q':        case 'r':        case 's':        case 't':        case 'u':        case 'v':        case 'w':        case 'x':        case 'y':        case 'z':            {            alt3=10;            }            break;        case '\t':        case '\n':        case '\r':        case ' ':            {            alt3=11;            }            break;        default:            NoViableAltException nvae =                new NoViableAltException("1:1: Tokens : ( T12 | T13 | T14 | T15 | T16 | T17 | T18 | T19 | T20 | ID | WS );", 3, 0, input);            throw nvae;        }        switch (alt3) {            case 1 :                // antlr/Validation.g:1:10: T12                {                mT12();                 }                break;            case 2 :                // antlr/Validation.g:1:14: T13                {                mT13();                 }                break;            case 3 :                // antlr/Validation.g:1:18: T14                {                mT14();                 }                break;            case 4 :                // antlr/Validation.g:1:22: T15                {                mT15();                 }                break;            case 5 :                // antlr/Validation.g:1:26: T16                {                mT16();                 }                break;            case 6 :                // antlr/Validation.g:1:30: T17                {                mT17();                 }                break;            case 7 :                // antlr/Validation.g:1:34: T18                {                mT18();                 }                break;            case 8 :                // antlr/Validation.g:1:38: T19                {                mT19();                 }                break;            case 9 :                // antlr/Validation.g:1:42: T20                {                mT20();                 }                break;            case 10 :                // antlr/Validation.g:1:46: ID                {                mID();                 }                break;            case 11 :                // antlr/Validation.g:1:49: WS                {                mWS();                 }                break;        }    } }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -