1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-03-25 12:55:57 +01:00

Trying desperately to get the Windows build working.

This commit is contained in:
David A. Mellis 2005-10-06 17:18:26 +00:00
parent 9e8cc277ea
commit 21fe7f0a83
30 changed files with 31826 additions and 32800 deletions

View File

@ -1,149 +1,149 @@
// $ANTLR 2.7.2: "StdCParser.g" -> "StdCLexer.java"$
// $ANTLR 2.7.2: "StdCParser.g" -> "StdCLexer.java"$
package processing.app.preproc;
import java.io.*;
import antlr.CommonAST;
import antlr.DumpASTVisitor;
public interface STDCTokenTypes {
int EOF = 1;
int NULL_TREE_LOOKAHEAD = 3;
int LITERAL_typedef = 4;
int LITERAL_asm = 5;
int LITERAL_volatile = 6;
int LCURLY = 7;
int RCURLY = 8;
int SEMI = 9;
int LITERAL_struct = 10;
int LITERAL_union = 11;
int LITERAL_enum = 12;
int LITERAL_auto = 13;
int LITERAL_register = 14;
int LITERAL_extern = 15;
int LITERAL_static = 16;
int LITERAL_const = 17;
int LITERAL_void = 18;
int LITERAL_char = 19;
int LITERAL_short = 20;
int LITERAL_int = 21;
int LITERAL_long = 22;
int LITERAL_float = 23;
int LITERAL_double = 24;
int LITERAL_signed = 25;
int LITERAL_unsigned = 26;
int ID = 27;
int COMMA = 28;
int COLON = 29;
int ASSIGN = 30;
int STAR = 31;
int LPAREN = 32;
int RPAREN = 33;
int LBRACKET = 34;
int RBRACKET = 35;
int VARARGS = 36;
int LITERAL_while = 37;
int LITERAL_do = 38;
int LITERAL_for = 39;
int LITERAL_goto = 40;
int LITERAL_continue = 41;
int LITERAL_break = 42;
int LITERAL_return = 43;
int LITERAL_case = 44;
int LITERAL_default = 45;
int LITERAL_if = 46;
int LITERAL_else = 47;
int LITERAL_switch = 48;
int DIV_ASSIGN = 49;
int PLUS_ASSIGN = 50;
int MINUS_ASSIGN = 51;
int STAR_ASSIGN = 52;
int MOD_ASSIGN = 53;
int RSHIFT_ASSIGN = 54;
int LSHIFT_ASSIGN = 55;
int BAND_ASSIGN = 56;
int BOR_ASSIGN = 57;
int BXOR_ASSIGN = 58;
int QUESTION = 59;
int LOR = 60;
int LAND = 61;
int BOR = 62;
int BXOR = 63;
int BAND = 64;
int EQUAL = 65;
int NOT_EQUAL = 66;
int LT = 67;
int LTE = 68;
int GT = 69;
int GTE = 70;
int LSHIFT = 71;
int RSHIFT = 72;
int PLUS = 73;
int MINUS = 74;
int DIV = 75;
int MOD = 76;
int INC = 77;
int DEC = 78;
int LITERAL_sizeof = 79;
int BNOT = 80;
int LNOT = 81;
int PTR = 82;
int DOT = 83;
int CharLiteral = 84;
int StringLiteral = 85;
int IntOctalConst = 86;
int LongOctalConst = 87;
int UnsignedOctalConst = 88;
int IntIntConst = 89;
int LongIntConst = 90;
int UnsignedIntConst = 91;
int IntHexConst = 92;
int LongHexConst = 93;
int UnsignedHexConst = 94;
int FloatDoubleConst = 95;
int DoubleDoubleConst = 96;
int LongDoubleConst = 97;
int NTypedefName = 98;
int NInitDecl = 99;
int NDeclarator = 100;
int NStructDeclarator = 101;
int NDeclaration = 102;
int NCast = 103;
int NPointerGroup = 104;
int NExpressionGroup = 105;
int NFunctionCallArgs = 106;
int NNonemptyAbstractDeclarator = 107;
int NInitializer = 108;
int NStatementExpr = 109;
int NEmptyExpression = 110;
int NParameterTypeList = 111;
int NFunctionDef = 112;
int NCompoundStatement = 113;
int NParameterDeclaration = 114;
int NCommaExpr = 115;
int NUnaryExpr = 116;
int NLabel = 117;
int NPostfixExpr = 118;
int NRangeExpr = 119;
int NStringSeq = 120;
int NInitializerElementLabel = 121;
int NLcurlyInitializer = 122;
int NAsmAttribute = 123;
int NGnuAsmExpr = 124;
int NTypeMissing = 125;
int Vocabulary = 126;
int Whitespace = 127;
int Comment = 128;
int CPPComment = 129;
int PREPROC_DIRECTIVE = 130;
int Space = 131;
int LineDirective = 132;
int BadStringLiteral = 133;
int Escape = 134;
int Digit = 135;
int LongSuffix = 136;
int UnsignedSuffix = 137;
int FloatSuffix = 138;
int Exponent = 139;
int Number = 140;
}
public interface STDCTokenTypes {
int EOF = 1;
int NULL_TREE_LOOKAHEAD = 3;
int LITERAL_typedef = 4;
int LITERAL_asm = 5;
int LITERAL_volatile = 6;
int LCURLY = 7;
int RCURLY = 8;
int SEMI = 9;
int LITERAL_struct = 10;
int LITERAL_union = 11;
int LITERAL_enum = 12;
int LITERAL_auto = 13;
int LITERAL_register = 14;
int LITERAL_extern = 15;
int LITERAL_static = 16;
int LITERAL_const = 17;
int LITERAL_void = 18;
int LITERAL_char = 19;
int LITERAL_short = 20;
int LITERAL_int = 21;
int LITERAL_long = 22;
int LITERAL_float = 23;
int LITERAL_double = 24;
int LITERAL_signed = 25;
int LITERAL_unsigned = 26;
int ID = 27;
int COMMA = 28;
int COLON = 29;
int ASSIGN = 30;
int STAR = 31;
int LPAREN = 32;
int RPAREN = 33;
int LBRACKET = 34;
int RBRACKET = 35;
int VARARGS = 36;
int LITERAL_while = 37;
int LITERAL_do = 38;
int LITERAL_for = 39;
int LITERAL_goto = 40;
int LITERAL_continue = 41;
int LITERAL_break = 42;
int LITERAL_return = 43;
int LITERAL_case = 44;
int LITERAL_default = 45;
int LITERAL_if = 46;
int LITERAL_else = 47;
int LITERAL_switch = 48;
int DIV_ASSIGN = 49;
int PLUS_ASSIGN = 50;
int MINUS_ASSIGN = 51;
int STAR_ASSIGN = 52;
int MOD_ASSIGN = 53;
int RSHIFT_ASSIGN = 54;
int LSHIFT_ASSIGN = 55;
int BAND_ASSIGN = 56;
int BOR_ASSIGN = 57;
int BXOR_ASSIGN = 58;
int QUESTION = 59;
int LOR = 60;
int LAND = 61;
int BOR = 62;
int BXOR = 63;
int BAND = 64;
int EQUAL = 65;
int NOT_EQUAL = 66;
int LT = 67;
int LTE = 68;
int GT = 69;
int GTE = 70;
int LSHIFT = 71;
int RSHIFT = 72;
int PLUS = 73;
int MINUS = 74;
int DIV = 75;
int MOD = 76;
int INC = 77;
int DEC = 78;
int LITERAL_sizeof = 79;
int BNOT = 80;
int LNOT = 81;
int PTR = 82;
int DOT = 83;
int CharLiteral = 84;
int StringLiteral = 85;
int IntOctalConst = 86;
int LongOctalConst = 87;
int UnsignedOctalConst = 88;
int IntIntConst = 89;
int LongIntConst = 90;
int UnsignedIntConst = 91;
int IntHexConst = 92;
int LongHexConst = 93;
int UnsignedHexConst = 94;
int FloatDoubleConst = 95;
int DoubleDoubleConst = 96;
int LongDoubleConst = 97;
int NTypedefName = 98;
int NInitDecl = 99;
int NDeclarator = 100;
int NStructDeclarator = 101;
int NDeclaration = 102;
int NCast = 103;
int NPointerGroup = 104;
int NExpressionGroup = 105;
int NFunctionCallArgs = 106;
int NNonemptyAbstractDeclarator = 107;
int NInitializer = 108;
int NStatementExpr = 109;
int NEmptyExpression = 110;
int NParameterTypeList = 111;
int NFunctionDef = 112;
int NCompoundStatement = 113;
int NParameterDeclaration = 114;
int NCommaExpr = 115;
int NUnaryExpr = 116;
int NLabel = 117;
int NPostfixExpr = 118;
int NRangeExpr = 119;
int NStringSeq = 120;
int NInitializerElementLabel = 121;
int NLcurlyInitializer = 122;
int NAsmAttribute = 123;
int NGnuAsmExpr = 124;
int NTypeMissing = 125;
int Vocabulary = 126;
int Whitespace = 127;
int Comment = 128;
int CPPComment = 129;
int PREPROC_DIRECTIVE = 130;
int Space = 131;
int LineDirective = 132;
int BadStringLiteral = 133;
int Escape = 134;
int Digit = 135;
int LongSuffix = 136;
int UnsignedSuffix = 137;
int FloatSuffix = 138;
int Exponent = 139;
int Number = 140;
}

View File

@ -1,139 +1,139 @@
// $ANTLR 2.7.2: StdCParser.g -> STDCTokenTypes.txt$
STDC // output token vocab name
LITERAL_typedef="typedef"=4
LITERAL_asm="asm"=5
LITERAL_volatile="volatile"=6
LCURLY=7
RCURLY=8
SEMI=9
LITERAL_struct="struct"=10
LITERAL_union="union"=11
LITERAL_enum="enum"=12
LITERAL_auto="auto"=13
LITERAL_register="register"=14
LITERAL_extern="extern"=15
LITERAL_static="static"=16
LITERAL_const="const"=17
LITERAL_void="void"=18
LITERAL_char="char"=19
LITERAL_short="short"=20
LITERAL_int="int"=21
LITERAL_long="long"=22
LITERAL_float="float"=23
LITERAL_double="double"=24
LITERAL_signed="signed"=25
LITERAL_unsigned="unsigned"=26
ID=27
COMMA=28
COLON=29
ASSIGN=30
STAR=31
LPAREN=32
RPAREN=33
LBRACKET=34
RBRACKET=35
VARARGS=36
LITERAL_while="while"=37
LITERAL_do="do"=38
LITERAL_for="for"=39
LITERAL_goto="goto"=40
LITERAL_continue="continue"=41
LITERAL_break="break"=42
LITERAL_return="return"=43
LITERAL_case="case"=44
LITERAL_default="default"=45
LITERAL_if="if"=46
LITERAL_else="else"=47
LITERAL_switch="switch"=48
DIV_ASSIGN=49
PLUS_ASSIGN=50
MINUS_ASSIGN=51
STAR_ASSIGN=52
MOD_ASSIGN=53
RSHIFT_ASSIGN=54
LSHIFT_ASSIGN=55
BAND_ASSIGN=56
BOR_ASSIGN=57
BXOR_ASSIGN=58
QUESTION=59
LOR=60
LAND=61
BOR=62
BXOR=63
BAND=64
EQUAL=65
NOT_EQUAL=66
LT=67
LTE=68
GT=69
GTE=70
LSHIFT=71
RSHIFT=72
PLUS=73
MINUS=74
DIV=75
MOD=76
INC=77
DEC=78
LITERAL_sizeof="sizeof"=79
BNOT=80
LNOT=81
PTR=82
DOT=83
CharLiteral=84
StringLiteral=85
IntOctalConst=86
LongOctalConst=87
UnsignedOctalConst=88
IntIntConst=89
LongIntConst=90
UnsignedIntConst=91
IntHexConst=92
LongHexConst=93
UnsignedHexConst=94
FloatDoubleConst=95
DoubleDoubleConst=96
LongDoubleConst=97
NTypedefName=98
NInitDecl=99
NDeclarator=100
NStructDeclarator=101
NDeclaration=102
NCast=103
NPointerGroup=104
NExpressionGroup=105
NFunctionCallArgs=106
NNonemptyAbstractDeclarator=107
NInitializer=108
NStatementExpr=109
NEmptyExpression=110
NParameterTypeList=111
NFunctionDef=112
NCompoundStatement=113
NParameterDeclaration=114
NCommaExpr=115
NUnaryExpr=116
NLabel=117
NPostfixExpr=118
NRangeExpr=119
NStringSeq=120
NInitializerElementLabel=121
NLcurlyInitializer=122
NAsmAttribute=123
NGnuAsmExpr=124
NTypeMissing=125
Vocabulary=126
Whitespace=127
Comment=128
CPPComment=129
PREPROC_DIRECTIVE("a line directive")=130
Space=131
LineDirective=132
BadStringLiteral=133
Escape=134
Digit=135
LongSuffix=136
UnsignedSuffix=137
FloatSuffix=138
Exponent=139
Number=140
// $ANTLR 2.7.2: StdCParser.g -> STDCTokenTypes.txt$
STDC // output token vocab name
LITERAL_typedef="typedef"=4
LITERAL_asm="asm"=5
LITERAL_volatile="volatile"=6
LCURLY=7
RCURLY=8
SEMI=9
LITERAL_struct="struct"=10
LITERAL_union="union"=11
LITERAL_enum="enum"=12
LITERAL_auto="auto"=13
LITERAL_register="register"=14
LITERAL_extern="extern"=15
LITERAL_static="static"=16
LITERAL_const="const"=17
LITERAL_void="void"=18
LITERAL_char="char"=19
LITERAL_short="short"=20
LITERAL_int="int"=21
LITERAL_long="long"=22
LITERAL_float="float"=23
LITERAL_double="double"=24
LITERAL_signed="signed"=25
LITERAL_unsigned="unsigned"=26
ID=27
COMMA=28
COLON=29
ASSIGN=30
STAR=31
LPAREN=32
RPAREN=33
LBRACKET=34
RBRACKET=35
VARARGS=36
LITERAL_while="while"=37
LITERAL_do="do"=38
LITERAL_for="for"=39
LITERAL_goto="goto"=40
LITERAL_continue="continue"=41
LITERAL_break="break"=42
LITERAL_return="return"=43
LITERAL_case="case"=44
LITERAL_default="default"=45
LITERAL_if="if"=46
LITERAL_else="else"=47
LITERAL_switch="switch"=48
DIV_ASSIGN=49
PLUS_ASSIGN=50
MINUS_ASSIGN=51
STAR_ASSIGN=52
MOD_ASSIGN=53
RSHIFT_ASSIGN=54
LSHIFT_ASSIGN=55
BAND_ASSIGN=56
BOR_ASSIGN=57
BXOR_ASSIGN=58
QUESTION=59
LOR=60
LAND=61
BOR=62
BXOR=63
BAND=64
EQUAL=65
NOT_EQUAL=66
LT=67
LTE=68
GT=69
GTE=70
LSHIFT=71
RSHIFT=72
PLUS=73
MINUS=74
DIV=75
MOD=76
INC=77
DEC=78
LITERAL_sizeof="sizeof"=79
BNOT=80
LNOT=81
PTR=82
DOT=83
CharLiteral=84
StringLiteral=85
IntOctalConst=86
LongOctalConst=87
UnsignedOctalConst=88
IntIntConst=89
LongIntConst=90
UnsignedIntConst=91
IntHexConst=92
LongHexConst=93
UnsignedHexConst=94
FloatDoubleConst=95
DoubleDoubleConst=96
LongDoubleConst=97
NTypedefName=98
NInitDecl=99
NDeclarator=100
NStructDeclarator=101
NDeclaration=102
NCast=103
NPointerGroup=104
NExpressionGroup=105
NFunctionCallArgs=106
NNonemptyAbstractDeclarator=107
NInitializer=108
NStatementExpr=109
NEmptyExpression=110
NParameterTypeList=111
NFunctionDef=112
NCompoundStatement=113
NParameterDeclaration=114
NCommaExpr=115
NUnaryExpr=116
NLabel=117
NPostfixExpr=118
NRangeExpr=119
NStringSeq=120
NInitializerElementLabel=121
NLcurlyInitializer=122
NAsmAttribute=123
NGnuAsmExpr=124
NTypeMissing=125
Vocabulary=126
Whitespace=127
Comment=128
CPPComment=129
PREPROC_DIRECTIVE("a line directive")=130
Space=131
LineDirective=132
BadStringLiteral=133
Escape=134
Digit=135
LongSuffix=136
UnsignedSuffix=137
FloatSuffix=138
Exponent=139
Number=140

View File

@ -1,42 +1,42 @@
// $ANTLR 2.7.2: "StdCParser.g" -> "StdCLexer.java"$
// $ANTLR 2.7.2: "StdCParser.g" -> "StdCLexer.java"$
package processing.app.preproc;
import java.io.*;
import antlr.CommonAST;
import antlr.DumpASTVisitor;
import java.io.InputStream;
import antlr.TokenStreamException;
import antlr.TokenStreamIOException;
import antlr.TokenStreamRecognitionException;
import antlr.CharStreamException;
import antlr.CharStreamIOException;
import antlr.ANTLRException;
import java.io.Reader;
import java.util.Hashtable;
import antlr.CharScanner;
import antlr.InputBuffer;
import antlr.ByteBuffer;
import antlr.CharBuffer;
import antlr.Token;
import antlr.CommonToken;
import antlr.RecognitionException;
import antlr.NoViableAltForCharException;
import antlr.MismatchedCharException;
import antlr.TokenStream;
import antlr.ANTLRHashString;
import antlr.LexerSharedInputState;
import antlr.collections.impl.BitSet;
import antlr.SemanticException;
import java.io.InputStream;
import antlr.TokenStreamException;
import antlr.TokenStreamIOException;
import antlr.TokenStreamRecognitionException;
import antlr.CharStreamException;
import antlr.CharStreamIOException;
import antlr.ANTLRException;
import java.io.Reader;
import java.util.Hashtable;
import antlr.CharScanner;
import antlr.InputBuffer;
import antlr.ByteBuffer;
import antlr.CharBuffer;
import antlr.Token;
import antlr.CommonToken;
import antlr.RecognitionException;
import antlr.NoViableAltForCharException;
import antlr.MismatchedCharException;
import antlr.TokenStream;
import antlr.ANTLRHashString;
import antlr.LexerSharedInputState;
import antlr.collections.impl.BitSet;
import antlr.SemanticException;
// import CToken;
import java.io.*;
// import LineObject;
import antlr.*;
public class StdCLexer extends antlr.CharScanner implements STDCTokenTypes, TokenStream
{
public class StdCLexer extends antlr.CharScanner implements STDCTokenTypes, TokenStream
{
LineObject lineObject = new LineObject();
String originalSource = "";
@ -104,2642 +104,2642 @@ public class StdCLexer extends antlr.CharScanner implements STDCTokenTypes, Toke
public StdCLexer(InputStream in) {
this(new ByteBuffer(in));
}
public StdCLexer(Reader in) {
this(new CharBuffer(in));
}
public StdCLexer(InputBuffer ib) {
this(new LexerSharedInputState(ib));
}
public StdCLexer(LexerSharedInputState state) {
super(state);
caseSensitiveLiterals = true;
setCaseSensitive(true);
literals = new Hashtable();
literals.put(new ANTLRHashString("switch", this), new Integer(48));
literals.put(new ANTLRHashString("case", this), new Integer(44));
literals.put(new ANTLRHashString("for", this), new Integer(39));
literals.put(new ANTLRHashString("register", this), new Integer(14));
literals.put(new ANTLRHashString("sizeof", this), new Integer(79));
literals.put(new ANTLRHashString("auto", this), new Integer(13));
literals.put(new ANTLRHashString("void", this), new Integer(18));
literals.put(new ANTLRHashString("float", this), new Integer(23));
literals.put(new ANTLRHashString("continue", this), new Integer(41));
literals.put(new ANTLRHashString("long", this), new Integer(22));
literals.put(new ANTLRHashString("do", this), new Integer(38));
literals.put(new ANTLRHashString("typedef", this), new Integer(4));
literals.put(new ANTLRHashString("short", this), new Integer(20));
literals.put(new ANTLRHashString("signed", this), new Integer(25));
literals.put(new ANTLRHashString("enum", this), new Integer(12));
literals.put(new ANTLRHashString("asm", this), new Integer(5));
literals.put(new ANTLRHashString("static", this), new Integer(16));
literals.put(new ANTLRHashString("char", this), new Integer(19));
literals.put(new ANTLRHashString("union", this), new Integer(11));
literals.put(new ANTLRHashString("while", this), new Integer(37));
literals.put(new ANTLRHashString("const", this), new Integer(17));
literals.put(new ANTLRHashString("break", this), new Integer(42));
literals.put(new ANTLRHashString("extern", this), new Integer(15));
literals.put(new ANTLRHashString("return", this), new Integer(43));
literals.put(new ANTLRHashString("if", this), new Integer(46));
literals.put(new ANTLRHashString("int", this), new Integer(21));
literals.put(new ANTLRHashString("double", this), new Integer(24));
literals.put(new ANTLRHashString("volatile", this), new Integer(6));
literals.put(new ANTLRHashString("default", this), new Integer(45));
literals.put(new ANTLRHashString("unsigned", this), new Integer(26));
literals.put(new ANTLRHashString("struct", this), new Integer(10));
literals.put(new ANTLRHashString("else", this), new Integer(47));
literals.put(new ANTLRHashString("goto", this), new Integer(40));
}
public Token nextToken() throws TokenStreamException {
Token theRetToken=null;
tryAgain:
for (;;) {
Token _token = null;
int _ttype = Token.INVALID_TYPE;
resetText();
try { // for char stream error handling
try { // for lexical error handling
switch ( LA(1)) {
case ':':
{
mCOLON(true);
theRetToken=_returnToken;
break;
}
case ',':
{
mCOMMA(true);
theRetToken=_returnToken;
break;
}
case '?':
{
mQUESTION(true);
theRetToken=_returnToken;
break;
}
case ';':
{
mSEMI(true);
theRetToken=_returnToken;
break;
}
case '(':
{
mLPAREN(true);
theRetToken=_returnToken;
break;
}
case ')':
{
mRPAREN(true);
theRetToken=_returnToken;
break;
}
case '[':
{
mLBRACKET(true);
theRetToken=_returnToken;
break;
}
case ']':
{
mRBRACKET(true);
theRetToken=_returnToken;
break;
}
case '{':
{
mLCURLY(true);
theRetToken=_returnToken;
break;
}
case '}':
{
mRCURLY(true);
theRetToken=_returnToken;
break;
}
case '~':
{
mBNOT(true);
theRetToken=_returnToken;
break;
}
case '#':
{
mPREPROC_DIRECTIVE(true);
theRetToken=_returnToken;
break;
}
case '.': case '0': case '1': case '2':
case '3': case '4': case '5': case '6':
case '7': case '8': case '9':
{
mNumber(true);
theRetToken=_returnToken;
break;
}
case '"':
{
mStringLiteral(true);
theRetToken=_returnToken;
break;
}
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 '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':
{
mID(true);
theRetToken=_returnToken;
break;
}
case '\'':
{
mCharLiteral(true);
theRetToken=_returnToken;
break;
}
default:
if ((LA(1)=='>') && (LA(2)=='>') && (LA(3)=='=')) {
mRSHIFT_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='<') && (LA(2)=='<') && (LA(3)=='=')) {
mLSHIFT_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='-') && (LA(2)=='>')) {
mPTR(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='=') && (LA(2)=='=')) {
mEQUAL(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='!') && (LA(2)=='=')) {
mNOT_EQUAL(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='<') && (LA(2)=='=')) {
mLTE(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='>') && (LA(2)=='=')) {
mGTE(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='/') && (LA(2)=='=')) {
mDIV_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='+') && (LA(2)=='=')) {
mPLUS_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='+') && (LA(2)=='+')) {
mINC(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='-') && (LA(2)=='=')) {
mMINUS_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='-') && (LA(2)=='-')) {
mDEC(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='*') && (LA(2)=='=')) {
mSTAR_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='%') && (LA(2)=='=')) {
mMOD_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='>') && (LA(2)=='>') && (true)) {
mRSHIFT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='<') && (LA(2)=='<') && (true)) {
mLSHIFT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='&') && (LA(2)=='&')) {
mLAND(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='|') && (LA(2)=='|')) {
mLOR(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='&') && (LA(2)=='=')) {
mBAND_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='|') && (LA(2)=='=')) {
mBOR_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='^') && (LA(2)=='=')) {
mBXOR_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='/') && (LA(2)=='*')) {
mComment(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='/') && (LA(2)=='/')) {
mCPPComment(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='=') && (true)) {
mASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='<') && (true)) {
mLT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='>') && (true)) {
mGT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='/') && (true)) {
mDIV(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='+') && (true)) {
mPLUS(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='-') && (true)) {
mMINUS(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='*') && (true)) {
mSTAR(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='%') && (true)) {
mMOD(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='!') && (true)) {
mLNOT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='&') && (true)) {
mBAND(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='|') && (true)) {
mBOR(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='^') && (true)) {
mBXOR(true);
theRetToken=_returnToken;
}
else if ((_tokenSet_0.member(LA(1)))) {
mWhitespace(true);
theRetToken=_returnToken;
}
else {
if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
}
if ( _returnToken==null ) continue tryAgain; // found SKIP token
_ttype = _returnToken.getType();
_returnToken.setType(_ttype);
return _returnToken;
}
catch (RecognitionException e) {
throw new TokenStreamRecognitionException(e);
}
}
catch (CharStreamException cse) {
if ( cse instanceof CharStreamIOException ) {
throw new TokenStreamIOException(((CharStreamIOException)cse).io);
}
else {
throw new TokenStreamException(cse.getMessage());
}
}
}
}
protected final void mVocabulary(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Vocabulary;
int _saveIndex;
matchRange('\3','\377');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = ASSIGN;
int _saveIndex;
match('=');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mCOLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = COLON;
int _saveIndex;
match(':');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mCOMMA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = COMMA;
int _saveIndex;
match(',');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mQUESTION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = QUESTION;
int _saveIndex;
match('?');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mSEMI(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = SEMI;
int _saveIndex;
match(';');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mPTR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = PTR;
int _saveIndex;
match("->");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mDOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DOT;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mVARARGS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = VARARGS;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LPAREN;
int _saveIndex;
match('(');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RPAREN;
int _saveIndex;
match(')');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLBRACKET(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LBRACKET;
int _saveIndex;
match('[');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRBRACKET(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RBRACKET;
int _saveIndex;
match(']');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LCURLY;
int _saveIndex;
match('{');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RCURLY;
int _saveIndex;
match('}');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mEQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = EQUAL;
int _saveIndex;
match("==");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mNOT_EQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = NOT_EQUAL;
int _saveIndex;
match("!=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLTE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LTE;
int _saveIndex;
match("<=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LT;
int _saveIndex;
match("<");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mGTE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = GTE;
int _saveIndex;
match(">=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mGT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = GT;
int _saveIndex;
match(">");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mDIV(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DIV;
int _saveIndex;
match('/');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mDIV_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DIV_ASSIGN;
int _saveIndex;
match("/=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mPLUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = PLUS;
int _saveIndex;
match('+');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mPLUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = PLUS_ASSIGN;
int _saveIndex;
match("+=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mINC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = INC;
int _saveIndex;
match("++");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mMINUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = MINUS;
int _saveIndex;
match('-');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mMINUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = MINUS_ASSIGN;
int _saveIndex;
match("-=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mDEC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DEC;
int _saveIndex;
match("--");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mSTAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = STAR;
int _saveIndex;
match('*');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mSTAR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = STAR_ASSIGN;
int _saveIndex;
match("*=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mMOD(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = MOD;
int _saveIndex;
match('%');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mMOD_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = MOD_ASSIGN;
int _saveIndex;
match("%=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRSHIFT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RSHIFT;
int _saveIndex;
match(">>");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRSHIFT_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RSHIFT_ASSIGN;
int _saveIndex;
match(">>=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLSHIFT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LSHIFT;
int _saveIndex;
match("<<");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLSHIFT_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LSHIFT_ASSIGN;
int _saveIndex;
match("<<=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LAND;
int _saveIndex;
match("&&");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LNOT;
int _saveIndex;
match('!');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LOR;
int _saveIndex;
match("||");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BAND;
int _saveIndex;
match('&');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBAND_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BAND_ASSIGN;
int _saveIndex;
match("&=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BNOT;
int _saveIndex;
match('~');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BOR;
int _saveIndex;
match('|');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BOR_ASSIGN;
int _saveIndex;
match("|=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBXOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BXOR;
int _saveIndex;
match('^');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBXOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BXOR_ASSIGN;
int _saveIndex;
match("^=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mWhitespace(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Whitespace;
int _saveIndex;
{
if ((LA(1)=='\r') && (LA(2)=='\n')) {
match("\r\n");
if ( inputState.guessing==0 ) {
newline();
}
}
else if ((_tokenSet_1.member(LA(1)))) {
{
switch ( LA(1)) {
case '\u0003': case '\u0004': case '\u0005': case '\u0006':
case '\u0007': case '\u0008':
{
matchRange('\003','\010');
break;
}
case '\t':
{
match('\t');
break;
}
case '\u000b':
{
match('\013');
break;
}
case '\u000c':
{
match('\f');
break;
}
case '\u000e': case '\u000f': case '\u0010': case '\u0011':
case '\u0012': case '\u0013': case '\u0014': case '\u0015':
case '\u0016': case '\u0017': case '\u0018': case '\u0019':
case '\u001a': case '\u001b': case '\u001c': case '\u001d':
case '\u001e': case '\u001f':
{
matchRange('\016','\037');
break;
}
case ' ':
{
match(' ');
break;
}
default:
if (((LA(1) >= '\u007f' && LA(1) <= '\u00ff'))) {
matchRange('\177','\377');
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
}
else if ((LA(1)=='\n'||LA(1)=='\r') && (true)) {
{
switch ( LA(1)) {
case '\n':
{
match('\n');
break;
}
case '\r':
{
match('\r');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( inputState.guessing==0 ) {
newline();
}
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( inputState.guessing==0 ) {
_ttype = Token.SKIP;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mComment(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Comment;
int _saveIndex;
match("/*");
{
_loop269:
do {
if (((LA(1)=='*') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff')))&&( LA(2) != '/' )) {
match('*');
}
else if ((LA(1)=='\r') && (LA(2)=='\n') && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
match("\r\n");
if ( inputState.guessing==0 ) {
deferredNewline();
}
}
else if ((LA(1)=='\n'||LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
{
switch ( LA(1)) {
case '\r':
{
match('\r');
break;
}
case '\n':
{
match('\n');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( inputState.guessing==0 ) {
deferredNewline();
}
}
else if ((_tokenSet_2.member(LA(1)))) {
{
match(_tokenSet_2);
}
}
else {
break _loop269;
}
} while (true);
}
match("*/");
if ( inputState.guessing==0 ) {
_ttype = Token.SKIP;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mCPPComment(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = CPPComment;
int _saveIndex;
match("//");
{
_loop273:
do {
if ((_tokenSet_3.member(LA(1)))) {
{
match(_tokenSet_3);
}
}
else {
break _loop273;
}
} while (true);
}
if ( inputState.guessing==0 ) {
_ttype = Token.SKIP;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mPREPROC_DIRECTIVE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = PREPROC_DIRECTIVE;
int _saveIndex;
match('#');
{
boolean synPredMatched280 = false;
if (((_tokenSet_4.member(LA(1))) && (_tokenSet_5.member(LA(2))) && (_tokenSet_6.member(LA(3))))) {
int _m280 = mark();
synPredMatched280 = true;
inputState.guessing++;
try {
{
switch ( LA(1)) {
case 'l':
{
match("line");
break;
}
case '\t': case '\u000c': case ' ':
{
{
{
int _cnt279=0;
_loop279:
do {
switch ( LA(1)) {
case ' ':
{
match(' ');
break;
}
case '\t':
{
match('\t');
break;
}
case '\u000c':
{
match('\014');
break;
}
default:
{
if ( _cnt279>=1 ) { break _loop279; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
}
_cnt279++;
} while (true);
}
matchRange('0','9');
}
break;
}
default:
{
}
}
}
}
catch (RecognitionException pe) {
synPredMatched280 = false;
}
rewind(_m280);
inputState.guessing--;
}
if ( synPredMatched280 ) {
mLineDirective(false);
}
else {
{
_loop282:
do {
if ((_tokenSet_3.member(LA(1)))) {
matchNot('\n');
}
else {
break _loop282;
}
} while (true);
}
if ( inputState.guessing==0 ) {
setPreprocessingDirective(getText());
}
}
}
if ( inputState.guessing==0 ) {
_ttype = Token.SKIP;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLineDirective(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LineDirective;
int _saveIndex;
Token n=null;
Token fn=null;
Token fi=null;
boolean oldCountingTokens = countingTokens;
countingTokens = false;
if ( inputState.guessing==0 ) {
lineObject = new LineObject();
deferredLineCount = 0;
}
{
switch ( LA(1)) {
case 'l':
{
match("line");
break;
}
case '\t': case '\u000c': case ' ':
{
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
int _cnt288=0;
_loop288:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ')) {
mSpace(false);
}
else {
if ( _cnt288>=1 ) { break _loop288; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt288++;
} while (true);
}
mNumber(true);
n=_returnToken;
if ( inputState.guessing==0 ) {
lineObject.setLine(Integer.parseInt(n.getText()));
}
{
int _cnt290=0;
_loop290:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
if ( _cnt290>=1 ) { break _loop290; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt290++;
} while (true);
}
{
if ((LA(1)=='"') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
mStringLiteral(true);
fn=_returnToken;
if ( inputState.guessing==0 ) {
try {
lineObject.setSource(fn.getText().substring(1,fn.getText().length()-1));
}
catch (StringIndexOutOfBoundsException e) { /*not possible*/ }
}
}
else if ((_tokenSet_7.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mID(true);
fi=_returnToken;
if ( inputState.guessing==0 ) {
lineObject.setSource(fi.getText());
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop293:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
break _loop293;
}
} while (true);
}
{
if ((LA(1)=='1') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
match("1");
if ( inputState.guessing==0 ) {
lineObject.setEnteringFile(true);
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop296:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
break _loop296;
}
} while (true);
}
{
if ((LA(1)=='2') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
match("2");
if ( inputState.guessing==0 ) {
lineObject.setReturningToFile(true);
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop299:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
break _loop299;
}
} while (true);
}
{
if ((LA(1)=='3') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
match("3");
if ( inputState.guessing==0 ) {
lineObject.setSystemHeader(true);
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop302:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
break _loop302;
}
} while (true);
}
{
if ((LA(1)=='4') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
match("4");
if ( inputState.guessing==0 ) {
lineObject.setTreatAsC(true);
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop306:
do {
if ((_tokenSet_8.member(LA(1)))) {
{
match(_tokenSet_8);
}
}
else {
break _loop306;
}
} while (true);
}
{
if ((LA(1)=='\r') && (LA(2)=='\n')) {
match("\r\n");
}
else if ((LA(1)=='\r') && (true)) {
match("\r");
}
else if ((LA(1)=='\n')) {
match("\n");
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( inputState.guessing==0 ) {
preprocessorInfoChannel.addLineForTokenNumber(new LineObject(lineObject), new Integer(tokenNumber));
countingTokens = oldCountingTokens;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mSpace(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Space;
int _saveIndex;
{
switch ( LA(1)) {
case ' ':
{
match(' ');
break;
}
case '\t':
{
match('\t');
break;
}
case '\u000c':
{
match('\014');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mNumber(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Number;
int _saveIndex;
boolean synPredMatched352 = false;
if ((((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_9.member(LA(2))) && (true))) {
int _m352 = mark();
synPredMatched352 = true;
inputState.guessing++;
try {
{
{
int _cnt350=0;
_loop350:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
if ( _cnt350>=1 ) { break _loop350; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt350++;
} while (true);
}
{
switch ( LA(1)) {
case '.':
{
match('.');
break;
}
case 'e':
{
match('e');
break;
}
case 'E':
{
match('E');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
}
}
catch (RecognitionException pe) {
synPredMatched352 = false;
}
rewind(_m352);
inputState.guessing--;
}
if ( synPredMatched352 ) {
{
int _cnt354=0;
_loop354:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
if ( _cnt354>=1 ) { break _loop354; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt354++;
} while (true);
}
{
switch ( LA(1)) {
case '.':
{
match('.');
{
_loop357:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
break _loop357;
}
} while (true);
}
{
if ((LA(1)=='E'||LA(1)=='e')) {
mExponent(false);
}
else {
}
}
break;
}
case 'E': case 'e':
{
mExponent(false);
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( inputState.guessing==0 ) {
_ttype = DoubleDoubleConst;
}
{
switch ( LA(1)) {
case 'F': case 'f':
{
mFloatSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = FloatDoubleConst;
}
break;
}
case 'L': case 'l':
{
mLongSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = LongDoubleConst;
}
break;
}
default:
{
}
}
}
}
else {
boolean synPredMatched361 = false;
if (((LA(1)=='.') && (LA(2)=='.'))) {
int _m361 = mark();
synPredMatched361 = true;
inputState.guessing++;
try {
{
match("...");
}
}
catch (RecognitionException pe) {
synPredMatched361 = false;
}
rewind(_m361);
inputState.guessing--;
}
if ( synPredMatched361 ) {
match("...");
if ( inputState.guessing==0 ) {
_ttype = VARARGS;
}
}
else if ((LA(1)=='0') && (LA(2)=='X'||LA(2)=='x')) {
match('0');
{
switch ( LA(1)) {
case 'x':
{
match('x');
break;
}
case 'X':
{
match('X');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
int _cnt375=0;
_loop375:
do {
switch ( LA(1)) {
case 'a': case 'b': case 'c': case 'd':
case 'e': case 'f':
{
matchRange('a','f');
break;
}
case 'A': case 'B': case 'C': case 'D':
case 'E': case 'F':
{
matchRange('A','F');
break;
}
case '0': case '1': case '2': case '3':
case '4': case '5': case '6': case '7':
case '8': case '9':
{
mDigit(false);
break;
}
default:
{
if ( _cnt375>=1 ) { break _loop375; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
}
_cnt375++;
} while (true);
}
if ( inputState.guessing==0 ) {
_ttype = IntHexConst;
}
{
switch ( LA(1)) {
case 'L': case 'l':
{
mLongSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = LongHexConst;
}
break;
}
case 'U': case 'u':
{
mUnsignedSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = UnsignedHexConst;
}
break;
}
default:
{
}
}
}
}
else if ((LA(1)=='.') && (true)) {
match('.');
if ( inputState.guessing==0 ) {
_ttype = DOT;
}
{
if (((LA(1) >= '0' && LA(1) <= '9'))) {
{
int _cnt364=0;
_loop364:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
if ( _cnt364>=1 ) { break _loop364; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt364++;
} while (true);
}
{
if ((LA(1)=='E'||LA(1)=='e')) {
mExponent(false);
}
else {
}
}
if ( inputState.guessing==0 ) {
_ttype = DoubleDoubleConst;
}
{
switch ( LA(1)) {
case 'F': case 'f':
{
mFloatSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = FloatDoubleConst;
}
break;
}
case 'L': case 'l':
{
mLongSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = LongDoubleConst;
}
break;
}
default:
{
}
}
}
}
else {
}
}
}
else if ((LA(1)=='0') && (true) && (true)) {
match('0');
{
_loop368:
do {
if (((LA(1) >= '0' && LA(1) <= '7'))) {
matchRange('0','7');
}
else {
break _loop368;
}
} while (true);
}
if ( inputState.guessing==0 ) {
_ttype = IntOctalConst;
}
{
switch ( LA(1)) {
case 'L': case 'l':
{
mLongSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = LongOctalConst;
}
break;
}
case 'U': case 'u':
{
mUnsignedSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = UnsignedOctalConst;
}
break;
}
default:
{
}
}
}
}
else if (((LA(1) >= '1' && LA(1) <= '9')) && (true) && (true)) {
matchRange('1','9');
{
_loop371:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
break _loop371;
}
} while (true);
}
if ( inputState.guessing==0 ) {
_ttype = IntIntConst;
}
{
switch ( LA(1)) {
case 'L': case 'l':
{
mLongSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = LongIntConst;
}
break;
}
case 'U': case 'u':
{
mUnsignedSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = UnsignedIntConst;
}
break;
}
default:
{
}
}
}
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mStringLiteral(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = StringLiteral;
int _saveIndex;
match('"');
{
_loop315:
do {
if ((LA(1)=='\\') && (_tokenSet_10.member(LA(2))) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
mEscape(false);
}
else if ((LA(1)=='\n'||LA(1)=='\r'||LA(1)=='\\') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
{
switch ( LA(1)) {
case '\r':
{
match('\r');
if ( inputState.guessing==0 ) {
deferredNewline();
}
break;
}
case '\n':
{
match('\n');
if ( inputState.guessing==0 ) {
deferredNewline();
_ttype = BadStringLiteral;
}
break;
}
case '\\':
{
match('\\');
match('\n');
if ( inputState.guessing==0 ) {
deferredNewline();
}
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
}
else if ((_tokenSet_11.member(LA(1)))) {
{
match(_tokenSet_11);
}
}
else {
break _loop315;
}
} while (true);
}
match('"');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mID(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = ID;
int _saveIndex;
{
switch ( LA(1)) {
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':
{
matchRange('a','z');
break;
}
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':
{
matchRange('A','Z');
break;
}
case '_':
{
match('_');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
_loop380:
do {
if (((LA(1) >= 'a' && LA(1) <= 'z')) && (true) && (true)) {
matchRange('a','z');
}
else if (((LA(1) >= 'A' && LA(1) <= 'Z')) && (true) && (true)) {
matchRange('A','Z');
}
else if ((LA(1)=='_') && (true) && (true)) {
match('_');
}
else if (((LA(1) >= '0' && LA(1) <= '9')) && (true) && (true)) {
matchRange('0','9');
}
else {
break _loop380;
}
} while (true);
}
_ttype = testLiteralsTable(_ttype);
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mCharLiteral(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = CharLiteral;
int _saveIndex;
match('\'');
{
if ((LA(1)=='\\') && (_tokenSet_10.member(LA(2))) && (_tokenSet_12.member(LA(3)))) {
mEscape(false);
}
else if ((_tokenSet_13.member(LA(1))) && (LA(2)=='\'') && (true)) {
{
match(_tokenSet_13);
}
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
match('\'');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mEscape(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Escape;
int _saveIndex;
match('\\');
{
switch ( LA(1)) {
case 'a':
{
match('a');
break;
}
case 'b':
{
match('b');
break;
}
case 'f':
{
match('f');
break;
}
case 'n':
{
match('n');
break;
}
case 'r':
{
match('r');
break;
}
case 't':
{
match('t');
break;
}
case 'v':
{
match('v');
break;
}
case '"':
{
match('"');
break;
}
case '\'':
{
match('\'');
break;
}
case '\\':
{
match('\\');
break;
}
case '?':
{
match('?');
break;
}
case '0': case '1': case '2': case '3':
{
{
matchRange('0','3');
}
{
if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mDigit(false);
{
if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mDigit(false);
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
break;
}
case '4': case '5': case '6': case '7':
{
{
matchRange('4','7');
}
{
if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mDigit(false);
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
break;
}
case 'x':
{
match('x');
{
int _cnt325=0;
_loop325:
do {
if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mDigit(false);
}
else if (((LA(1) >= 'a' && LA(1) <= 'f')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
matchRange('a','f');
}
else if (((LA(1) >= 'A' && LA(1) <= 'F')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
matchRange('A','F');
}
else {
if ( _cnt325>=1 ) { break _loop325; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt325++;
} while (true);
}
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mBadStringLiteral(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BadStringLiteral;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mDigit(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Digit;
int _saveIndex;
matchRange('0','9');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongSuffix(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongSuffix;
int _saveIndex;
switch ( LA(1)) {
case 'l':
{
match('l');
break;
}
case 'L':
{
match('L');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mUnsignedSuffix(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = UnsignedSuffix;
int _saveIndex;
switch ( LA(1)) {
case 'u':
{
match('u');
break;
}
case 'U':
{
match('U');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mFloatSuffix(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = FloatSuffix;
int _saveIndex;
switch ( LA(1)) {
case 'f':
{
match('f');
break;
}
case 'F':
{
match('F');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mExponent(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Exponent;
int _saveIndex;
{
switch ( LA(1)) {
case 'e':
{
match('e');
break;
}
case 'E':
{
match('E');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
switch ( LA(1)) {
case '+':
{
match('+');
break;
}
case '-':
{
match('-');
break;
}
case '0': case '1': case '2': case '3':
case '4': case '5': case '6': case '7':
case '8': case '9':
{
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
int _cnt334=0;
_loop334:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
if ( _cnt334>=1 ) { break _loop334; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt334++;
} while (true);
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mDoubleDoubleConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DoubleDoubleConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mFloatDoubleConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = FloatDoubleConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongDoubleConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongDoubleConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mIntOctalConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = IntOctalConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongOctalConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongOctalConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mUnsignedOctalConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = UnsignedOctalConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mIntIntConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = IntIntConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongIntConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongIntConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mUnsignedIntConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = UnsignedIntConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mIntHexConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = IntHexConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongHexConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongHexConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mUnsignedHexConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = UnsignedHexConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
private static final long[] mk_tokenSet_0() {
long[] data = new long[8];
data[0]=8589934584L;
data[1]=-9223372036854775808L;
for (int i = 2; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
private static final long[] mk_tokenSet_1() {
long[] data = new long[8];
data[0]=8589925368L;
data[1]=-9223372036854775808L;
for (int i = 2; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
private static final long[] mk_tokenSet_2() {
long[] data = new long[8];
data[0]=-4398046520328L;
for (int i = 1; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
private static final long[] mk_tokenSet_3() {
long[] data = new long[8];
data[0]=-1032L;
for (int i = 1; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
private static final long[] mk_tokenSet_4() {
long[] data = { 4294971904L, 17592186044416L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
private static final long[] mk_tokenSet_5() {
long[] data = { 288019274214150656L, 2199023255552L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
private static final long[] mk_tokenSet_6() {
long[] data = { 288019274214150656L, 81152891680722976L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
private static final long[] mk_tokenSet_7() {
long[] data = { 0L, 576460745995190270L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
private static final long[] mk_tokenSet_8() {
long[] data = new long[8];
data[0]=-9224L;
for (int i = 1; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
private static final long[] mk_tokenSet_9() {
long[] data = { 288019269919178752L, 137438953504L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
private static final long[] mk_tokenSet_10() {
long[] data = { -9151595350857875456L, 95772161741946880L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());
private static final long[] mk_tokenSet_11() {
long[] data = new long[8];
data[0]=-17179878408L;
data[1]=-268435457L;
for (int i = 2; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11());
private static final long[] mk_tokenSet_12() {
long[] data = { 287949450930814976L, 541165879422L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_12 = new BitSet(mk_tokenSet_12());
private static final long[] mk_tokenSet_13() {
long[] data = new long[8];
data[0]=-549755813896L;
for (int i = 1; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_13 = new BitSet(mk_tokenSet_13());
}
public StdCLexer(InputStream in) {
this(new ByteBuffer(in));
}
public StdCLexer(Reader in) {
this(new CharBuffer(in));
}
public StdCLexer(InputBuffer ib) {
this(new LexerSharedInputState(ib));
}
public StdCLexer(LexerSharedInputState state) {
super(state);
caseSensitiveLiterals = true;
setCaseSensitive(true);
literals = new Hashtable();
literals.put(new ANTLRHashString("switch", this), new Integer(48));
literals.put(new ANTLRHashString("case", this), new Integer(44));
literals.put(new ANTLRHashString("for", this), new Integer(39));
literals.put(new ANTLRHashString("register", this), new Integer(14));
literals.put(new ANTLRHashString("sizeof", this), new Integer(79));
literals.put(new ANTLRHashString("auto", this), new Integer(13));
literals.put(new ANTLRHashString("void", this), new Integer(18));
literals.put(new ANTLRHashString("float", this), new Integer(23));
literals.put(new ANTLRHashString("continue", this), new Integer(41));
literals.put(new ANTLRHashString("long", this), new Integer(22));
literals.put(new ANTLRHashString("do", this), new Integer(38));
literals.put(new ANTLRHashString("typedef", this), new Integer(4));
literals.put(new ANTLRHashString("short", this), new Integer(20));
literals.put(new ANTLRHashString("signed", this), new Integer(25));
literals.put(new ANTLRHashString("enum", this), new Integer(12));
literals.put(new ANTLRHashString("asm", this), new Integer(5));
literals.put(new ANTLRHashString("static", this), new Integer(16));
literals.put(new ANTLRHashString("char", this), new Integer(19));
literals.put(new ANTLRHashString("union", this), new Integer(11));
literals.put(new ANTLRHashString("while", this), new Integer(37));
literals.put(new ANTLRHashString("const", this), new Integer(17));
literals.put(new ANTLRHashString("break", this), new Integer(42));
literals.put(new ANTLRHashString("extern", this), new Integer(15));
literals.put(new ANTLRHashString("return", this), new Integer(43));
literals.put(new ANTLRHashString("if", this), new Integer(46));
literals.put(new ANTLRHashString("int", this), new Integer(21));
literals.put(new ANTLRHashString("double", this), new Integer(24));
literals.put(new ANTLRHashString("volatile", this), new Integer(6));
literals.put(new ANTLRHashString("default", this), new Integer(45));
literals.put(new ANTLRHashString("unsigned", this), new Integer(26));
literals.put(new ANTLRHashString("struct", this), new Integer(10));
literals.put(new ANTLRHashString("else", this), new Integer(47));
literals.put(new ANTLRHashString("goto", this), new Integer(40));
}
public Token nextToken() throws TokenStreamException {
Token theRetToken=null;
tryAgain:
for (;;) {
Token _token = null;
int _ttype = Token.INVALID_TYPE;
resetText();
try { // for char stream error handling
try { // for lexical error handling
switch ( LA(1)) {
case ':':
{
mCOLON(true);
theRetToken=_returnToken;
break;
}
case ',':
{
mCOMMA(true);
theRetToken=_returnToken;
break;
}
case '?':
{
mQUESTION(true);
theRetToken=_returnToken;
break;
}
case ';':
{
mSEMI(true);
theRetToken=_returnToken;
break;
}
case '(':
{
mLPAREN(true);
theRetToken=_returnToken;
break;
}
case ')':
{
mRPAREN(true);
theRetToken=_returnToken;
break;
}
case '[':
{
mLBRACKET(true);
theRetToken=_returnToken;
break;
}
case ']':
{
mRBRACKET(true);
theRetToken=_returnToken;
break;
}
case '{':
{
mLCURLY(true);
theRetToken=_returnToken;
break;
}
case '}':
{
mRCURLY(true);
theRetToken=_returnToken;
break;
}
case '~':
{
mBNOT(true);
theRetToken=_returnToken;
break;
}
case '#':
{
mPREPROC_DIRECTIVE(true);
theRetToken=_returnToken;
break;
}
case '.': case '0': case '1': case '2':
case '3': case '4': case '5': case '6':
case '7': case '8': case '9':
{
mNumber(true);
theRetToken=_returnToken;
break;
}
case '"':
{
mStringLiteral(true);
theRetToken=_returnToken;
break;
}
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 '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':
{
mID(true);
theRetToken=_returnToken;
break;
}
case '\'':
{
mCharLiteral(true);
theRetToken=_returnToken;
break;
}
default:
if ((LA(1)=='>') && (LA(2)=='>') && (LA(3)=='=')) {
mRSHIFT_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='<') && (LA(2)=='<') && (LA(3)=='=')) {
mLSHIFT_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='-') && (LA(2)=='>')) {
mPTR(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='=') && (LA(2)=='=')) {
mEQUAL(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='!') && (LA(2)=='=')) {
mNOT_EQUAL(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='<') && (LA(2)=='=')) {
mLTE(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='>') && (LA(2)=='=')) {
mGTE(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='/') && (LA(2)=='=')) {
mDIV_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='+') && (LA(2)=='=')) {
mPLUS_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='+') && (LA(2)=='+')) {
mINC(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='-') && (LA(2)=='=')) {
mMINUS_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='-') && (LA(2)=='-')) {
mDEC(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='*') && (LA(2)=='=')) {
mSTAR_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='%') && (LA(2)=='=')) {
mMOD_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='>') && (LA(2)=='>') && (true)) {
mRSHIFT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='<') && (LA(2)=='<') && (true)) {
mLSHIFT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='&') && (LA(2)=='&')) {
mLAND(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='|') && (LA(2)=='|')) {
mLOR(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='&') && (LA(2)=='=')) {
mBAND_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='|') && (LA(2)=='=')) {
mBOR_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='^') && (LA(2)=='=')) {
mBXOR_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='/') && (LA(2)=='*')) {
mComment(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='/') && (LA(2)=='/')) {
mCPPComment(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='=') && (true)) {
mASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='<') && (true)) {
mLT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='>') && (true)) {
mGT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='/') && (true)) {
mDIV(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='+') && (true)) {
mPLUS(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='-') && (true)) {
mMINUS(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='*') && (true)) {
mSTAR(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='%') && (true)) {
mMOD(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='!') && (true)) {
mLNOT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='&') && (true)) {
mBAND(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='|') && (true)) {
mBOR(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='^') && (true)) {
mBXOR(true);
theRetToken=_returnToken;
}
else if ((_tokenSet_0.member(LA(1)))) {
mWhitespace(true);
theRetToken=_returnToken;
}
else {
if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
}
if ( _returnToken==null ) continue tryAgain; // found SKIP token
_ttype = _returnToken.getType();
_returnToken.setType(_ttype);
return _returnToken;
}
catch (RecognitionException e) {
throw new TokenStreamRecognitionException(e);
}
}
catch (CharStreamException cse) {
if ( cse instanceof CharStreamIOException ) {
throw new TokenStreamIOException(((CharStreamIOException)cse).io);
}
else {
throw new TokenStreamException(cse.getMessage());
}
}
}
}
protected final void mVocabulary(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Vocabulary;
int _saveIndex;
matchRange('\3','\377');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = ASSIGN;
int _saveIndex;
match('=');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mCOLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = COLON;
int _saveIndex;
match(':');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mCOMMA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = COMMA;
int _saveIndex;
match(',');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mQUESTION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = QUESTION;
int _saveIndex;
match('?');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mSEMI(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = SEMI;
int _saveIndex;
match(';');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mPTR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = PTR;
int _saveIndex;
match("->");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mDOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DOT;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mVARARGS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = VARARGS;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LPAREN;
int _saveIndex;
match('(');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RPAREN;
int _saveIndex;
match(')');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLBRACKET(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LBRACKET;
int _saveIndex;
match('[');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRBRACKET(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RBRACKET;
int _saveIndex;
match(']');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LCURLY;
int _saveIndex;
match('{');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RCURLY;
int _saveIndex;
match('}');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mEQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = EQUAL;
int _saveIndex;
match("==");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mNOT_EQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = NOT_EQUAL;
int _saveIndex;
match("!=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLTE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LTE;
int _saveIndex;
match("<=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LT;
int _saveIndex;
match("<");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mGTE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = GTE;
int _saveIndex;
match(">=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mGT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = GT;
int _saveIndex;
match(">");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mDIV(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DIV;
int _saveIndex;
match('/');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mDIV_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DIV_ASSIGN;
int _saveIndex;
match("/=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mPLUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = PLUS;
int _saveIndex;
match('+');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mPLUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = PLUS_ASSIGN;
int _saveIndex;
match("+=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mINC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = INC;
int _saveIndex;
match("++");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mMINUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = MINUS;
int _saveIndex;
match('-');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mMINUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = MINUS_ASSIGN;
int _saveIndex;
match("-=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mDEC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DEC;
int _saveIndex;
match("--");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mSTAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = STAR;
int _saveIndex;
match('*');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mSTAR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = STAR_ASSIGN;
int _saveIndex;
match("*=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mMOD(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = MOD;
int _saveIndex;
match('%');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mMOD_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = MOD_ASSIGN;
int _saveIndex;
match("%=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRSHIFT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RSHIFT;
int _saveIndex;
match(">>");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRSHIFT_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RSHIFT_ASSIGN;
int _saveIndex;
match(">>=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLSHIFT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LSHIFT;
int _saveIndex;
match("<<");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLSHIFT_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LSHIFT_ASSIGN;
int _saveIndex;
match("<<=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LAND;
int _saveIndex;
match("&&");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LNOT;
int _saveIndex;
match('!');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LOR;
int _saveIndex;
match("||");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BAND;
int _saveIndex;
match('&');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBAND_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BAND_ASSIGN;
int _saveIndex;
match("&=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BNOT;
int _saveIndex;
match('~');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BOR;
int _saveIndex;
match('|');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BOR_ASSIGN;
int _saveIndex;
match("|=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBXOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BXOR;
int _saveIndex;
match('^');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBXOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BXOR_ASSIGN;
int _saveIndex;
match("^=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mWhitespace(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Whitespace;
int _saveIndex;
{
if ((LA(1)=='\r') && (LA(2)=='\n')) {
match("\r\n");
if ( inputState.guessing==0 ) {
newline();
}
}
else if ((_tokenSet_1.member(LA(1)))) {
{
switch ( LA(1)) {
case '\u0003': case '\u0004': case '\u0005': case '\u0006':
case '\u0007': case '\u0008':
{
matchRange('\003','\010');
break;
}
case '\t':
{
match('\t');
break;
}
case '\u000b':
{
match('\013');
break;
}
case '\u000c':
{
match('\f');
break;
}
case '\u000e': case '\u000f': case '\u0010': case '\u0011':
case '\u0012': case '\u0013': case '\u0014': case '\u0015':
case '\u0016': case '\u0017': case '\u0018': case '\u0019':
case '\u001a': case '\u001b': case '\u001c': case '\u001d':
case '\u001e': case '\u001f':
{
matchRange('\016','\037');
break;
}
case ' ':
{
match(' ');
break;
}
default:
if (((LA(1) >= '\u007f' && LA(1) <= '\u00ff'))) {
matchRange('\177','\377');
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
}
else if ((LA(1)=='\n'||LA(1)=='\r') && (true)) {
{
switch ( LA(1)) {
case '\n':
{
match('\n');
break;
}
case '\r':
{
match('\r');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( inputState.guessing==0 ) {
newline();
}
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( inputState.guessing==0 ) {
_ttype = Token.SKIP;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mComment(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Comment;
int _saveIndex;
match("/*");
{
_loop269:
do {
if (((LA(1)=='*') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff')))&&( LA(2) != '/' )) {
match('*');
}
else if ((LA(1)=='\r') && (LA(2)=='\n') && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
match("\r\n");
if ( inputState.guessing==0 ) {
deferredNewline();
}
}
else if ((LA(1)=='\n'||LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
{
switch ( LA(1)) {
case '\r':
{
match('\r');
break;
}
case '\n':
{
match('\n');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( inputState.guessing==0 ) {
deferredNewline();
}
}
else if ((_tokenSet_2.member(LA(1)))) {
{
match(_tokenSet_2);
}
}
else {
break _loop269;
}
} while (true);
}
match("*/");
if ( inputState.guessing==0 ) {
_ttype = Token.SKIP;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mCPPComment(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = CPPComment;
int _saveIndex;
match("//");
{
_loop273:
do {
if ((_tokenSet_3.member(LA(1)))) {
{
match(_tokenSet_3);
}
}
else {
break _loop273;
}
} while (true);
}
if ( inputState.guessing==0 ) {
_ttype = Token.SKIP;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mPREPROC_DIRECTIVE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = PREPROC_DIRECTIVE;
int _saveIndex;
match('#');
{
boolean synPredMatched280 = false;
if (((_tokenSet_4.member(LA(1))) && (_tokenSet_5.member(LA(2))) && (_tokenSet_6.member(LA(3))))) {
int _m280 = mark();
synPredMatched280 = true;
inputState.guessing++;
try {
{
switch ( LA(1)) {
case 'l':
{
match("line");
break;
}
case '\t': case '\u000c': case ' ':
{
{
{
int _cnt279=0;
_loop279:
do {
switch ( LA(1)) {
case ' ':
{
match(' ');
break;
}
case '\t':
{
match('\t');
break;
}
case '\u000c':
{
match('\014');
break;
}
default:
{
if ( _cnt279>=1 ) { break _loop279; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
}
_cnt279++;
} while (true);
}
matchRange('0','9');
}
break;
}
default:
{
}
}
}
}
catch (RecognitionException pe) {
synPredMatched280 = false;
}
rewind(_m280);
inputState.guessing--;
}
if ( synPredMatched280 ) {
mLineDirective(false);
}
else {
{
_loop282:
do {
if ((_tokenSet_3.member(LA(1)))) {
matchNot('\n');
}
else {
break _loop282;
}
} while (true);
}
if ( inputState.guessing==0 ) {
setPreprocessingDirective(getText());
}
}
}
if ( inputState.guessing==0 ) {
_ttype = Token.SKIP;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLineDirective(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LineDirective;
int _saveIndex;
Token n=null;
Token fn=null;
Token fi=null;
boolean oldCountingTokens = countingTokens;
countingTokens = false;
if ( inputState.guessing==0 ) {
lineObject = new LineObject();
deferredLineCount = 0;
}
{
switch ( LA(1)) {
case 'l':
{
match("line");
break;
}
case '\t': case '\u000c': case ' ':
{
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
int _cnt288=0;
_loop288:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ')) {
mSpace(false);
}
else {
if ( _cnt288>=1 ) { break _loop288; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt288++;
} while (true);
}
mNumber(true);
n=_returnToken;
if ( inputState.guessing==0 ) {
lineObject.setLine(Integer.parseInt(n.getText()));
}
{
int _cnt290=0;
_loop290:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
if ( _cnt290>=1 ) { break _loop290; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt290++;
} while (true);
}
{
if ((LA(1)=='"') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
mStringLiteral(true);
fn=_returnToken;
if ( inputState.guessing==0 ) {
try {
lineObject.setSource(fn.getText().substring(1,fn.getText().length()-1));
}
catch (StringIndexOutOfBoundsException e) { /*not possible*/ }
}
}
else if ((_tokenSet_7.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mID(true);
fi=_returnToken;
if ( inputState.guessing==0 ) {
lineObject.setSource(fi.getText());
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop293:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
break _loop293;
}
} while (true);
}
{
if ((LA(1)=='1') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
match("1");
if ( inputState.guessing==0 ) {
lineObject.setEnteringFile(true);
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop296:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
break _loop296;
}
} while (true);
}
{
if ((LA(1)=='2') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
match("2");
if ( inputState.guessing==0 ) {
lineObject.setReturningToFile(true);
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop299:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
break _loop299;
}
} while (true);
}
{
if ((LA(1)=='3') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
match("3");
if ( inputState.guessing==0 ) {
lineObject.setSystemHeader(true);
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop302:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
break _loop302;
}
} while (true);
}
{
if ((LA(1)=='4') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
match("4");
if ( inputState.guessing==0 ) {
lineObject.setTreatAsC(true);
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop306:
do {
if ((_tokenSet_8.member(LA(1)))) {
{
match(_tokenSet_8);
}
}
else {
break _loop306;
}
} while (true);
}
{
if ((LA(1)=='\r') && (LA(2)=='\n')) {
match("\r\n");
}
else if ((LA(1)=='\r') && (true)) {
match("\r");
}
else if ((LA(1)=='\n')) {
match("\n");
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( inputState.guessing==0 ) {
preprocessorInfoChannel.addLineForTokenNumber(new LineObject(lineObject), new Integer(tokenNumber));
countingTokens = oldCountingTokens;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mSpace(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Space;
int _saveIndex;
{
switch ( LA(1)) {
case ' ':
{
match(' ');
break;
}
case '\t':
{
match('\t');
break;
}
case '\u000c':
{
match('\014');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mNumber(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Number;
int _saveIndex;
boolean synPredMatched352 = false;
if ((((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_9.member(LA(2))) && (true))) {
int _m352 = mark();
synPredMatched352 = true;
inputState.guessing++;
try {
{
{
int _cnt350=0;
_loop350:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
if ( _cnt350>=1 ) { break _loop350; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt350++;
} while (true);
}
{
switch ( LA(1)) {
case '.':
{
match('.');
break;
}
case 'e':
{
match('e');
break;
}
case 'E':
{
match('E');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
}
}
catch (RecognitionException pe) {
synPredMatched352 = false;
}
rewind(_m352);
inputState.guessing--;
}
if ( synPredMatched352 ) {
{
int _cnt354=0;
_loop354:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
if ( _cnt354>=1 ) { break _loop354; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt354++;
} while (true);
}
{
switch ( LA(1)) {
case '.':
{
match('.');
{
_loop357:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
break _loop357;
}
} while (true);
}
{
if ((LA(1)=='E'||LA(1)=='e')) {
mExponent(false);
}
else {
}
}
break;
}
case 'E': case 'e':
{
mExponent(false);
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( inputState.guessing==0 ) {
_ttype = DoubleDoubleConst;
}
{
switch ( LA(1)) {
case 'F': case 'f':
{
mFloatSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = FloatDoubleConst;
}
break;
}
case 'L': case 'l':
{
mLongSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = LongDoubleConst;
}
break;
}
default:
{
}
}
}
}
else {
boolean synPredMatched361 = false;
if (((LA(1)=='.') && (LA(2)=='.'))) {
int _m361 = mark();
synPredMatched361 = true;
inputState.guessing++;
try {
{
match("...");
}
}
catch (RecognitionException pe) {
synPredMatched361 = false;
}
rewind(_m361);
inputState.guessing--;
}
if ( synPredMatched361 ) {
match("...");
if ( inputState.guessing==0 ) {
_ttype = VARARGS;
}
}
else if ((LA(1)=='0') && (LA(2)=='X'||LA(2)=='x')) {
match('0');
{
switch ( LA(1)) {
case 'x':
{
match('x');
break;
}
case 'X':
{
match('X');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
int _cnt375=0;
_loop375:
do {
switch ( LA(1)) {
case 'a': case 'b': case 'c': case 'd':
case 'e': case 'f':
{
matchRange('a','f');
break;
}
case 'A': case 'B': case 'C': case 'D':
case 'E': case 'F':
{
matchRange('A','F');
break;
}
case '0': case '1': case '2': case '3':
case '4': case '5': case '6': case '7':
case '8': case '9':
{
mDigit(false);
break;
}
default:
{
if ( _cnt375>=1 ) { break _loop375; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
}
_cnt375++;
} while (true);
}
if ( inputState.guessing==0 ) {
_ttype = IntHexConst;
}
{
switch ( LA(1)) {
case 'L': case 'l':
{
mLongSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = LongHexConst;
}
break;
}
case 'U': case 'u':
{
mUnsignedSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = UnsignedHexConst;
}
break;
}
default:
{
}
}
}
}
else if ((LA(1)=='.') && (true)) {
match('.');
if ( inputState.guessing==0 ) {
_ttype = DOT;
}
{
if (((LA(1) >= '0' && LA(1) <= '9'))) {
{
int _cnt364=0;
_loop364:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
if ( _cnt364>=1 ) { break _loop364; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt364++;
} while (true);
}
{
if ((LA(1)=='E'||LA(1)=='e')) {
mExponent(false);
}
else {
}
}
if ( inputState.guessing==0 ) {
_ttype = DoubleDoubleConst;
}
{
switch ( LA(1)) {
case 'F': case 'f':
{
mFloatSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = FloatDoubleConst;
}
break;
}
case 'L': case 'l':
{
mLongSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = LongDoubleConst;
}
break;
}
default:
{
}
}
}
}
else {
}
}
}
else if ((LA(1)=='0') && (true) && (true)) {
match('0');
{
_loop368:
do {
if (((LA(1) >= '0' && LA(1) <= '7'))) {
matchRange('0','7');
}
else {
break _loop368;
}
} while (true);
}
if ( inputState.guessing==0 ) {
_ttype = IntOctalConst;
}
{
switch ( LA(1)) {
case 'L': case 'l':
{
mLongSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = LongOctalConst;
}
break;
}
case 'U': case 'u':
{
mUnsignedSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = UnsignedOctalConst;
}
break;
}
default:
{
}
}
}
}
else if (((LA(1) >= '1' && LA(1) <= '9')) && (true) && (true)) {
matchRange('1','9');
{
_loop371:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
break _loop371;
}
} while (true);
}
if ( inputState.guessing==0 ) {
_ttype = IntIntConst;
}
{
switch ( LA(1)) {
case 'L': case 'l':
{
mLongSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = LongIntConst;
}
break;
}
case 'U': case 'u':
{
mUnsignedSuffix(false);
if ( inputState.guessing==0 ) {
_ttype = UnsignedIntConst;
}
break;
}
default:
{
}
}
}
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mStringLiteral(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = StringLiteral;
int _saveIndex;
match('"');
{
_loop315:
do {
if ((LA(1)=='\\') && (_tokenSet_10.member(LA(2))) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
mEscape(false);
}
else if ((LA(1)=='\n'||LA(1)=='\r'||LA(1)=='\\') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
{
switch ( LA(1)) {
case '\r':
{
match('\r');
if ( inputState.guessing==0 ) {
deferredNewline();
}
break;
}
case '\n':
{
match('\n');
if ( inputState.guessing==0 ) {
deferredNewline();
_ttype = BadStringLiteral;
}
break;
}
case '\\':
{
match('\\');
match('\n');
if ( inputState.guessing==0 ) {
deferredNewline();
}
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
}
else if ((_tokenSet_11.member(LA(1)))) {
{
match(_tokenSet_11);
}
}
else {
break _loop315;
}
} while (true);
}
match('"');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mID(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = ID;
int _saveIndex;
{
switch ( LA(1)) {
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':
{
matchRange('a','z');
break;
}
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':
{
matchRange('A','Z');
break;
}
case '_':
{
match('_');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
_loop380:
do {
if (((LA(1) >= 'a' && LA(1) <= 'z')) && (true) && (true)) {
matchRange('a','z');
}
else if (((LA(1) >= 'A' && LA(1) <= 'Z')) && (true) && (true)) {
matchRange('A','Z');
}
else if ((LA(1)=='_') && (true) && (true)) {
match('_');
}
else if (((LA(1) >= '0' && LA(1) <= '9')) && (true) && (true)) {
matchRange('0','9');
}
else {
break _loop380;
}
} while (true);
}
_ttype = testLiteralsTable(_ttype);
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mCharLiteral(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = CharLiteral;
int _saveIndex;
match('\'');
{
if ((LA(1)=='\\') && (_tokenSet_10.member(LA(2))) && (_tokenSet_12.member(LA(3)))) {
mEscape(false);
}
else if ((_tokenSet_13.member(LA(1))) && (LA(2)=='\'') && (true)) {
{
match(_tokenSet_13);
}
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
match('\'');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mEscape(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Escape;
int _saveIndex;
match('\\');
{
switch ( LA(1)) {
case 'a':
{
match('a');
break;
}
case 'b':
{
match('b');
break;
}
case 'f':
{
match('f');
break;
}
case 'n':
{
match('n');
break;
}
case 'r':
{
match('r');
break;
}
case 't':
{
match('t');
break;
}
case 'v':
{
match('v');
break;
}
case '"':
{
match('"');
break;
}
case '\'':
{
match('\'');
break;
}
case '\\':
{
match('\\');
break;
}
case '?':
{
match('?');
break;
}
case '0': case '1': case '2': case '3':
{
{
matchRange('0','3');
}
{
if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mDigit(false);
{
if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mDigit(false);
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
break;
}
case '4': case '5': case '6': case '7':
{
{
matchRange('4','7');
}
{
if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mDigit(false);
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
break;
}
case 'x':
{
match('x');
{
int _cnt325=0;
_loop325:
do {
if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mDigit(false);
}
else if (((LA(1) >= 'a' && LA(1) <= 'f')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
matchRange('a','f');
}
else if (((LA(1) >= 'A' && LA(1) <= 'F')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
matchRange('A','F');
}
else {
if ( _cnt325>=1 ) { break _loop325; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt325++;
} while (true);
}
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mBadStringLiteral(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BadStringLiteral;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mDigit(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Digit;
int _saveIndex;
matchRange('0','9');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongSuffix(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongSuffix;
int _saveIndex;
switch ( LA(1)) {
case 'l':
{
match('l');
break;
}
case 'L':
{
match('L');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mUnsignedSuffix(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = UnsignedSuffix;
int _saveIndex;
switch ( LA(1)) {
case 'u':
{
match('u');
break;
}
case 'U':
{
match('U');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mFloatSuffix(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = FloatSuffix;
int _saveIndex;
switch ( LA(1)) {
case 'f':
{
match('f');
break;
}
case 'F':
{
match('F');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mExponent(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Exponent;
int _saveIndex;
{
switch ( LA(1)) {
case 'e':
{
match('e');
break;
}
case 'E':
{
match('E');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
switch ( LA(1)) {
case '+':
{
match('+');
break;
}
case '-':
{
match('-');
break;
}
case '0': case '1': case '2': case '3':
case '4': case '5': case '6': case '7':
case '8': case '9':
{
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
int _cnt334=0;
_loop334:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
if ( _cnt334>=1 ) { break _loop334; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt334++;
} while (true);
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mDoubleDoubleConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DoubleDoubleConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mFloatDoubleConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = FloatDoubleConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongDoubleConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongDoubleConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mIntOctalConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = IntOctalConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongOctalConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongOctalConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mUnsignedOctalConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = UnsignedOctalConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mIntIntConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = IntIntConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongIntConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongIntConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mUnsignedIntConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = UnsignedIntConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mIntHexConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = IntHexConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongHexConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongHexConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mUnsignedHexConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = UnsignedHexConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
private static final long[] mk_tokenSet_0() {
long[] data = new long[8];
data[0]=8589934584L;
data[1]=-9223372036854775808L;
for (int i = 2; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
private static final long[] mk_tokenSet_1() {
long[] data = new long[8];
data[0]=8589925368L;
data[1]=-9223372036854775808L;
for (int i = 2; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
private static final long[] mk_tokenSet_2() {
long[] data = new long[8];
data[0]=-4398046520328L;
for (int i = 1; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
private static final long[] mk_tokenSet_3() {
long[] data = new long[8];
data[0]=-1032L;
for (int i = 1; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
private static final long[] mk_tokenSet_4() {
long[] data = { 4294971904L, 17592186044416L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
private static final long[] mk_tokenSet_5() {
long[] data = { 288019274214150656L, 2199023255552L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
private static final long[] mk_tokenSet_6() {
long[] data = { 288019274214150656L, 81152891680722976L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
private static final long[] mk_tokenSet_7() {
long[] data = { 0L, 576460745995190270L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
private static final long[] mk_tokenSet_8() {
long[] data = new long[8];
data[0]=-9224L;
for (int i = 1; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
private static final long[] mk_tokenSet_9() {
long[] data = { 288019269919178752L, 137438953504L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
private static final long[] mk_tokenSet_10() {
long[] data = { -9151595350857875456L, 95772161741946880L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());
private static final long[] mk_tokenSet_11() {
long[] data = new long[8];
data[0]=-17179878408L;
data[1]=-268435457L;
for (int i = 2; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11());
private static final long[] mk_tokenSet_12() {
long[] data = { 287949450930814976L, 541165879422L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_12 = new BitSet(mk_tokenSet_12());
private static final long[] mk_tokenSet_13() {
long[] data = new long[8];
data[0]=-549755813896L;
for (int i = 1; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_13 = new BitSet(mk_tokenSet_13());
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
// $ANTLR 2.7.2: "expandedWEmitter.g" -> "WEmitter.java"$
// $ANTLR 2.7.2: "expandedWEmitter.g" -> "WEmitter.java"$
package processing.app.preproc;
import processing.app.*;
@ -7,157 +7,157 @@ import java.util.*;
import antlr.CommonAST;
import antlr.DumpASTVisitor;
public interface WEmitterTokenTypes {
int EOF = 1;
int NULL_TREE_LOOKAHEAD = 3;
int LITERAL_typedef = 4;
int LITERAL_asm = 5;
int LITERAL_volatile = 6;
int LCURLY = 7;
int RCURLY = 8;
int SEMI = 9;
int LITERAL_struct = 10;
int LITERAL_union = 11;
int LITERAL_enum = 12;
int LITERAL_auto = 13;
int LITERAL_register = 14;
int LITERAL_extern = 15;
int LITERAL_static = 16;
int LITERAL_const = 17;
int LITERAL_void = 18;
int LITERAL_char = 19;
int LITERAL_short = 20;
int LITERAL_int = 21;
int LITERAL_long = 22;
int LITERAL_float = 23;
int LITERAL_double = 24;
int LITERAL_signed = 25;
int LITERAL_unsigned = 26;
int ID = 27;
int COMMA = 28;
int COLON = 29;
int ASSIGN = 30;
int STAR = 31;
int LPAREN = 32;
int RPAREN = 33;
int LBRACKET = 34;
int RBRACKET = 35;
int VARARGS = 36;
int LITERAL_while = 37;
int LITERAL_do = 38;
int LITERAL_for = 39;
int LITERAL_goto = 40;
int LITERAL_continue = 41;
int LITERAL_break = 42;
int LITERAL_return = 43;
int LITERAL_case = 44;
int LITERAL_default = 45;
int LITERAL_if = 46;
int LITERAL_else = 47;
int LITERAL_switch = 48;
int DIV_ASSIGN = 49;
int PLUS_ASSIGN = 50;
int MINUS_ASSIGN = 51;
int STAR_ASSIGN = 52;
int MOD_ASSIGN = 53;
int RSHIFT_ASSIGN = 54;
int LSHIFT_ASSIGN = 55;
int BAND_ASSIGN = 56;
int BOR_ASSIGN = 57;
int BXOR_ASSIGN = 58;
int QUESTION = 59;
int LOR = 60;
int LAND = 61;
int BOR = 62;
int BXOR = 63;
int BAND = 64;
int EQUAL = 65;
int NOT_EQUAL = 66;
int LT = 67;
int LTE = 68;
int GT = 69;
int GTE = 70;
int LSHIFT = 71;
int RSHIFT = 72;
int PLUS = 73;
int MINUS = 74;
int DIV = 75;
int MOD = 76;
int INC = 77;
int DEC = 78;
int LITERAL_sizeof = 79;
int BNOT = 80;
int LNOT = 81;
int PTR = 82;
int DOT = 83;
int CharLiteral = 84;
int StringLiteral = 85;
int IntOctalConst = 86;
int LongOctalConst = 87;
int UnsignedOctalConst = 88;
int IntIntConst = 89;
int LongIntConst = 90;
int UnsignedIntConst = 91;
int IntHexConst = 92;
int LongHexConst = 93;
int UnsignedHexConst = 94;
int FloatDoubleConst = 95;
int DoubleDoubleConst = 96;
int LongDoubleConst = 97;
int NTypedefName = 98;
int NInitDecl = 99;
int NDeclarator = 100;
int NStructDeclarator = 101;
int NDeclaration = 102;
int NCast = 103;
int NPointerGroup = 104;
int NExpressionGroup = 105;
int NFunctionCallArgs = 106;
int NNonemptyAbstractDeclarator = 107;
int NInitializer = 108;
int NStatementExpr = 109;
int NEmptyExpression = 110;
int NParameterTypeList = 111;
int NFunctionDef = 112;
int NCompoundStatement = 113;
int NParameterDeclaration = 114;
int NCommaExpr = 115;
int NUnaryExpr = 116;
int NLabel = 117;
int NPostfixExpr = 118;
int NRangeExpr = 119;
int NStringSeq = 120;
int NInitializerElementLabel = 121;
int NLcurlyInitializer = 122;
int NAsmAttribute = 123;
int NGnuAsmExpr = 124;
int NTypeMissing = 125;
int Vocabulary = 126;
int Whitespace = 127;
int Comment = 128;
int CPPComment = 129;
int PREPROC_DIRECTIVE = 130;
int Space = 131;
int LineDirective = 132;
int BadStringLiteral = 133;
int Escape = 134;
int Digit = 135;
int LongSuffix = 136;
int UnsignedSuffix = 137;
int FloatSuffix = 138;
int Exponent = 139;
int Number = 140;
int LITERAL___label__ = 141;
int LITERAL_inline = 142;
int LITERAL_byte = 143;
int LITERAL_boolean = 144;
int LITERAL_Servo = 145;
int LITERAL_Wire = 146;
int LITERAL_typeof = 147;
int LITERAL___complex = 148;
int LITERAL___attribute = 149;
int LITERAL___alignof = 150;
int LITERAL___real = 151;
int LITERAL___imag = 152;
}
public interface WEmitterTokenTypes {
int EOF = 1;
int NULL_TREE_LOOKAHEAD = 3;
int LITERAL_typedef = 4;
int LITERAL_asm = 5;
int LITERAL_volatile = 6;
int LCURLY = 7;
int RCURLY = 8;
int SEMI = 9;
int LITERAL_struct = 10;
int LITERAL_union = 11;
int LITERAL_enum = 12;
int LITERAL_auto = 13;
int LITERAL_register = 14;
int LITERAL_extern = 15;
int LITERAL_static = 16;
int LITERAL_const = 17;
int LITERAL_void = 18;
int LITERAL_char = 19;
int LITERAL_short = 20;
int LITERAL_int = 21;
int LITERAL_long = 22;
int LITERAL_float = 23;
int LITERAL_double = 24;
int LITERAL_signed = 25;
int LITERAL_unsigned = 26;
int ID = 27;
int COMMA = 28;
int COLON = 29;
int ASSIGN = 30;
int STAR = 31;
int LPAREN = 32;
int RPAREN = 33;
int LBRACKET = 34;
int RBRACKET = 35;
int VARARGS = 36;
int LITERAL_while = 37;
int LITERAL_do = 38;
int LITERAL_for = 39;
int LITERAL_goto = 40;
int LITERAL_continue = 41;
int LITERAL_break = 42;
int LITERAL_return = 43;
int LITERAL_case = 44;
int LITERAL_default = 45;
int LITERAL_if = 46;
int LITERAL_else = 47;
int LITERAL_switch = 48;
int DIV_ASSIGN = 49;
int PLUS_ASSIGN = 50;
int MINUS_ASSIGN = 51;
int STAR_ASSIGN = 52;
int MOD_ASSIGN = 53;
int RSHIFT_ASSIGN = 54;
int LSHIFT_ASSIGN = 55;
int BAND_ASSIGN = 56;
int BOR_ASSIGN = 57;
int BXOR_ASSIGN = 58;
int QUESTION = 59;
int LOR = 60;
int LAND = 61;
int BOR = 62;
int BXOR = 63;
int BAND = 64;
int EQUAL = 65;
int NOT_EQUAL = 66;
int LT = 67;
int LTE = 68;
int GT = 69;
int GTE = 70;
int LSHIFT = 71;
int RSHIFT = 72;
int PLUS = 73;
int MINUS = 74;
int DIV = 75;
int MOD = 76;
int INC = 77;
int DEC = 78;
int LITERAL_sizeof = 79;
int BNOT = 80;
int LNOT = 81;
int PTR = 82;
int DOT = 83;
int CharLiteral = 84;
int StringLiteral = 85;
int IntOctalConst = 86;
int LongOctalConst = 87;
int UnsignedOctalConst = 88;
int IntIntConst = 89;
int LongIntConst = 90;
int UnsignedIntConst = 91;
int IntHexConst = 92;
int LongHexConst = 93;
int UnsignedHexConst = 94;
int FloatDoubleConst = 95;
int DoubleDoubleConst = 96;
int LongDoubleConst = 97;
int NTypedefName = 98;
int NInitDecl = 99;
int NDeclarator = 100;
int NStructDeclarator = 101;
int NDeclaration = 102;
int NCast = 103;
int NPointerGroup = 104;
int NExpressionGroup = 105;
int NFunctionCallArgs = 106;
int NNonemptyAbstractDeclarator = 107;
int NInitializer = 108;
int NStatementExpr = 109;
int NEmptyExpression = 110;
int NParameterTypeList = 111;
int NFunctionDef = 112;
int NCompoundStatement = 113;
int NParameterDeclaration = 114;
int NCommaExpr = 115;
int NUnaryExpr = 116;
int NLabel = 117;
int NPostfixExpr = 118;
int NRangeExpr = 119;
int NStringSeq = 120;
int NInitializerElementLabel = 121;
int NLcurlyInitializer = 122;
int NAsmAttribute = 123;
int NGnuAsmExpr = 124;
int NTypeMissing = 125;
int Vocabulary = 126;
int Whitespace = 127;
int Comment = 128;
int CPPComment = 129;
int PREPROC_DIRECTIVE = 130;
int Space = 131;
int LineDirective = 132;
int BadStringLiteral = 133;
int Escape = 134;
int Digit = 135;
int LongSuffix = 136;
int UnsignedSuffix = 137;
int FloatSuffix = 138;
int Exponent = 139;
int Number = 140;
int LITERAL___label__ = 141;
int LITERAL_inline = 142;
int LITERAL_byte = 143;
int LITERAL_boolean = 144;
int LITERAL_Servo = 145;
int LITERAL_Wire = 146;
int LITERAL_typeof = 147;
int LITERAL___complex = 148;
int LITERAL___attribute = 149;
int LITERAL___alignof = 150;
int LITERAL___real = 151;
int LITERAL___imag = 152;
}

View File

@ -1,151 +1,151 @@
// $ANTLR 2.7.2: expandedWEmitter.g -> WEmitterTokenTypes.txt$
WEmitter // output token vocab name
LITERAL_typedef="typedef"=4
LITERAL_asm="asm"=5
LITERAL_volatile="volatile"=6
LCURLY=7
RCURLY=8
SEMI=9
LITERAL_struct="struct"=10
LITERAL_union="union"=11
LITERAL_enum="enum"=12
LITERAL_auto="auto"=13
LITERAL_register="register"=14
LITERAL_extern="extern"=15
LITERAL_static="static"=16
LITERAL_const="const"=17
LITERAL_void="void"=18
LITERAL_char="char"=19
LITERAL_short="short"=20
LITERAL_int="int"=21
LITERAL_long="long"=22
LITERAL_float="float"=23
LITERAL_double="double"=24
LITERAL_signed="signed"=25
LITERAL_unsigned="unsigned"=26
ID=27
COMMA=28
COLON=29
ASSIGN=30
STAR=31
LPAREN=32
RPAREN=33
LBRACKET=34
RBRACKET=35
VARARGS=36
LITERAL_while="while"=37
LITERAL_do="do"=38
LITERAL_for="for"=39
LITERAL_goto="goto"=40
LITERAL_continue="continue"=41
LITERAL_break="break"=42
LITERAL_return="return"=43
LITERAL_case="case"=44
LITERAL_default="default"=45
LITERAL_if="if"=46
LITERAL_else="else"=47
LITERAL_switch="switch"=48
DIV_ASSIGN=49
PLUS_ASSIGN=50
MINUS_ASSIGN=51
STAR_ASSIGN=52
MOD_ASSIGN=53
RSHIFT_ASSIGN=54
LSHIFT_ASSIGN=55
BAND_ASSIGN=56
BOR_ASSIGN=57
BXOR_ASSIGN=58
QUESTION=59
LOR=60
LAND=61
BOR=62
BXOR=63
BAND=64
EQUAL=65
NOT_EQUAL=66
LT=67
LTE=68
GT=69
GTE=70
LSHIFT=71
RSHIFT=72
PLUS=73
MINUS=74
DIV=75
MOD=76
INC=77
DEC=78
LITERAL_sizeof="sizeof"=79
BNOT=80
LNOT=81
PTR=82
DOT=83
CharLiteral=84
StringLiteral=85
IntOctalConst=86
LongOctalConst=87
UnsignedOctalConst=88
IntIntConst=89
LongIntConst=90
UnsignedIntConst=91
IntHexConst=92
LongHexConst=93
UnsignedHexConst=94
FloatDoubleConst=95
DoubleDoubleConst=96
LongDoubleConst=97
NTypedefName=98
NInitDecl=99
NDeclarator=100
NStructDeclarator=101
NDeclaration=102
NCast=103
NPointerGroup=104
NExpressionGroup=105
NFunctionCallArgs=106
NNonemptyAbstractDeclarator=107
NInitializer=108
NStatementExpr=109
NEmptyExpression=110
NParameterTypeList=111
NFunctionDef=112
NCompoundStatement=113
NParameterDeclaration=114
NCommaExpr=115
NUnaryExpr=116
NLabel=117
NPostfixExpr=118
NRangeExpr=119
NStringSeq=120
NInitializerElementLabel=121
NLcurlyInitializer=122
NAsmAttribute=123
NGnuAsmExpr=124
NTypeMissing=125
Vocabulary=126
Whitespace=127
Comment=128
CPPComment=129
PREPROC_DIRECTIVE("a line directive")=130
Space=131
LineDirective=132
BadStringLiteral=133
Escape=134
Digit=135
LongSuffix=136
UnsignedSuffix=137
FloatSuffix=138
Exponent=139
Number=140
LITERAL___label__="__label__"=141
LITERAL_inline="inline"=142
LITERAL_byte="byte"=143
LITERAL_boolean="boolean"=144
LITERAL_Servo="Servo"=145
LITERAL_Wire="Wire"=146
LITERAL_typeof="typeof"=147
LITERAL___complex="__complex"=148
LITERAL___attribute="__attribute"=149
LITERAL___alignof="__alignof"=150
LITERAL___real="__real"=151
LITERAL___imag="__imag"=152
// $ANTLR 2.7.2: expandedWEmitter.g -> WEmitterTokenTypes.txt$
WEmitter // output token vocab name
LITERAL_typedef="typedef"=4
LITERAL_asm="asm"=5
LITERAL_volatile="volatile"=6
LCURLY=7
RCURLY=8
SEMI=9
LITERAL_struct="struct"=10
LITERAL_union="union"=11
LITERAL_enum="enum"=12
LITERAL_auto="auto"=13
LITERAL_register="register"=14
LITERAL_extern="extern"=15
LITERAL_static="static"=16
LITERAL_const="const"=17
LITERAL_void="void"=18
LITERAL_char="char"=19
LITERAL_short="short"=20
LITERAL_int="int"=21
LITERAL_long="long"=22
LITERAL_float="float"=23
LITERAL_double="double"=24
LITERAL_signed="signed"=25
LITERAL_unsigned="unsigned"=26
ID=27
COMMA=28
COLON=29
ASSIGN=30
STAR=31
LPAREN=32
RPAREN=33
LBRACKET=34
RBRACKET=35
VARARGS=36
LITERAL_while="while"=37
LITERAL_do="do"=38
LITERAL_for="for"=39
LITERAL_goto="goto"=40
LITERAL_continue="continue"=41
LITERAL_break="break"=42
LITERAL_return="return"=43
LITERAL_case="case"=44
LITERAL_default="default"=45
LITERAL_if="if"=46
LITERAL_else="else"=47
LITERAL_switch="switch"=48
DIV_ASSIGN=49
PLUS_ASSIGN=50
MINUS_ASSIGN=51
STAR_ASSIGN=52
MOD_ASSIGN=53
RSHIFT_ASSIGN=54
LSHIFT_ASSIGN=55
BAND_ASSIGN=56
BOR_ASSIGN=57
BXOR_ASSIGN=58
QUESTION=59
LOR=60
LAND=61
BOR=62
BXOR=63
BAND=64
EQUAL=65
NOT_EQUAL=66
LT=67
LTE=68
GT=69
GTE=70
LSHIFT=71
RSHIFT=72
PLUS=73
MINUS=74
DIV=75
MOD=76
INC=77
DEC=78
LITERAL_sizeof="sizeof"=79
BNOT=80
LNOT=81
PTR=82
DOT=83
CharLiteral=84
StringLiteral=85
IntOctalConst=86
LongOctalConst=87
UnsignedOctalConst=88
IntIntConst=89
LongIntConst=90
UnsignedIntConst=91
IntHexConst=92
LongHexConst=93
UnsignedHexConst=94
FloatDoubleConst=95
DoubleDoubleConst=96
LongDoubleConst=97
NTypedefName=98
NInitDecl=99
NDeclarator=100
NStructDeclarator=101
NDeclaration=102
NCast=103
NPointerGroup=104
NExpressionGroup=105
NFunctionCallArgs=106
NNonemptyAbstractDeclarator=107
NInitializer=108
NStatementExpr=109
NEmptyExpression=110
NParameterTypeList=111
NFunctionDef=112
NCompoundStatement=113
NParameterDeclaration=114
NCommaExpr=115
NUnaryExpr=116
NLabel=117
NPostfixExpr=118
NRangeExpr=119
NStringSeq=120
NInitializerElementLabel=121
NLcurlyInitializer=122
NAsmAttribute=123
NGnuAsmExpr=124
NTypeMissing=125
Vocabulary=126
Whitespace=127
Comment=128
CPPComment=129
PREPROC_DIRECTIVE("a line directive")=130
Space=131
LineDirective=132
BadStringLiteral=133
Escape=134
Digit=135
LongSuffix=136
UnsignedSuffix=137
FloatSuffix=138
Exponent=139
Number=140
LITERAL___label__="__label__"=141
LITERAL_inline="inline"=142
LITERAL_byte="byte"=143
LITERAL_boolean="boolean"=144
LITERAL_Servo="Servo"=145
LITERAL_Wire="Wire"=146
LITERAL_typeof="typeof"=147
LITERAL___complex="__complex"=148
LITERAL___attribute="__attribute"=149
LITERAL___alignof="__alignof"=150
LITERAL___real="__real"=151
LITERAL___imag="__imag"=152

View File

@ -1,4 +1,4 @@
// $ANTLR 2.7.2: "expandedWParser.g" -> "WLexer.java"$
// $ANTLR 2.7.2: "expandedWParser.g" -> "WLexer.java"$
package processing.app.preproc;
@ -6,38 +6,38 @@ import java.io.*;
import antlr.CommonAST;
import antlr.DumpASTVisitor;
import java.io.InputStream;
import antlr.TokenStreamException;
import antlr.TokenStreamIOException;
import antlr.TokenStreamRecognitionException;
import antlr.CharStreamException;
import antlr.CharStreamIOException;
import antlr.ANTLRException;
import java.io.Reader;
import java.util.Hashtable;
import antlr.CharScanner;
import antlr.InputBuffer;
import antlr.ByteBuffer;
import antlr.CharBuffer;
import antlr.Token;
import antlr.CommonToken;
import antlr.RecognitionException;
import antlr.NoViableAltForCharException;
import antlr.MismatchedCharException;
import antlr.TokenStream;
import antlr.ANTLRHashString;
import antlr.LexerSharedInputState;
import antlr.collections.impl.BitSet;
import antlr.SemanticException;
import java.io.InputStream;
import antlr.TokenStreamException;
import antlr.TokenStreamIOException;
import antlr.TokenStreamRecognitionException;
import antlr.CharStreamException;
import antlr.CharStreamIOException;
import antlr.ANTLRException;
import java.io.Reader;
import java.util.Hashtable;
import antlr.CharScanner;
import antlr.InputBuffer;
import antlr.ByteBuffer;
import antlr.CharBuffer;
import antlr.Token;
import antlr.CommonToken;
import antlr.RecognitionException;
import antlr.NoViableAltForCharException;
import antlr.MismatchedCharException;
import antlr.TokenStream;
import antlr.ANTLRHashString;
import antlr.LexerSharedInputState;
import antlr.collections.impl.BitSet;
import antlr.SemanticException;
// import CToken;
import java.io.*;
// import LineObject;
import antlr.*;
public class WLexer extends antlr.CharScanner implements WLexerTokenTypes, TokenStream
{
public class WLexer extends antlr.CharScanner implements WLexerTokenTypes, TokenStream
{
public void initialize(String src)
{
@ -133,2678 +133,2678 @@ public class WLexer extends antlr.CharScanner implements WLexerTokenTypes, Token
public WLexer(InputStream in) {
this(new ByteBuffer(in));
}
public WLexer(Reader in) {
this(new CharBuffer(in));
}
public WLexer(InputBuffer ib) {
this(new LexerSharedInputState(ib));
}
public WLexer(LexerSharedInputState state) {
super(state);
caseSensitiveLiterals = true;
setCaseSensitive(true);
literals = new Hashtable();
literals.put(new ANTLRHashString("byte", this), new Integer(143));
literals.put(new ANTLRHashString("extern", this), new Integer(15));
literals.put(new ANTLRHashString("__real", this), new Integer(151));
literals.put(new ANTLRHashString("case", this), new Integer(44));
literals.put(new ANTLRHashString("short", this), new Integer(20));
literals.put(new ANTLRHashString("break", this), new Integer(42));
literals.put(new ANTLRHashString("while", this), new Integer(37));
literals.put(new ANTLRHashString("typeof", this), new Integer(147));
literals.put(new ANTLRHashString("inline", this), new Integer(142));
literals.put(new ANTLRHashString("unsigned", this), new Integer(26));
literals.put(new ANTLRHashString("const", this), new Integer(17));
literals.put(new ANTLRHashString("float", this), new Integer(23));
literals.put(new ANTLRHashString("return", this), new Integer(43));
literals.put(new ANTLRHashString("sizeof", this), new Integer(79));
literals.put(new ANTLRHashString("do", this), new Integer(38));
literals.put(new ANTLRHashString("__label__", this), new Integer(141));
literals.put(new ANTLRHashString("typedef", this), new Integer(4));
literals.put(new ANTLRHashString("if", this), new Integer(46));
literals.put(new ANTLRHashString("double", this), new Integer(24));
literals.put(new ANTLRHashString("volatile", this), new Integer(6));
literals.put(new ANTLRHashString("__attribute", this), new Integer(149));
literals.put(new ANTLRHashString("union", this), new Integer(11));
literals.put(new ANTLRHashString("register", this), new Integer(14));
literals.put(new ANTLRHashString("auto", this), new Integer(13));
literals.put(new ANTLRHashString("goto", this), new Integer(40));
literals.put(new ANTLRHashString("enum", this), new Integer(12));
literals.put(new ANTLRHashString("Servo", this), new Integer(145));
literals.put(new ANTLRHashString("int", this), new Integer(21));
literals.put(new ANTLRHashString("for", this), new Integer(39));
literals.put(new ANTLRHashString("boolean", this), new Integer(144));
literals.put(new ANTLRHashString("Wire", this), new Integer(146));
literals.put(new ANTLRHashString("char", this), new Integer(19));
literals.put(new ANTLRHashString("default", this), new Integer(45));
literals.put(new ANTLRHashString("__imag", this), new Integer(152));
literals.put(new ANTLRHashString("__alignof", this), new Integer(150));
literals.put(new ANTLRHashString("static", this), new Integer(16));
literals.put(new ANTLRHashString("continue", this), new Integer(41));
literals.put(new ANTLRHashString("struct", this), new Integer(10));
literals.put(new ANTLRHashString("signed", this), new Integer(25));
literals.put(new ANTLRHashString("else", this), new Integer(47));
literals.put(new ANTLRHashString("void", this), new Integer(18));
literals.put(new ANTLRHashString("switch", this), new Integer(48));
literals.put(new ANTLRHashString("long", this), new Integer(22));
literals.put(new ANTLRHashString("__extension__", this), new Integer(153));
literals.put(new ANTLRHashString("asm", this), new Integer(5));
literals.put(new ANTLRHashString("__complex", this), new Integer(148));
}
public Token nextToken() throws TokenStreamException {
Token theRetToken=null;
tryAgain:
for (;;) {
Token _token = null;
int _ttype = Token.INVALID_TYPE;
resetText();
try { // for char stream error handling
try { // for lexical error handling
switch ( LA(1)) {
case '\t': case '\n': case '\u000c': case '\r':
case ' ':
{
mWhitespace(true);
theRetToken=_returnToken;
break;
}
case '.': case '0': case '1': case '2':
case '3': case '4': case '5': case '6':
case '7': case '8': case '9':
{
mNumber(true);
theRetToken=_returnToken;
break;
}
case '\'':
{
mCharLiteral(true);
theRetToken=_returnToken;
break;
}
case '"':
{
mStringLiteral(true);
theRetToken=_returnToken;
break;
}
case ':':
{
mCOLON(true);
theRetToken=_returnToken;
break;
}
case ',':
{
mCOMMA(true);
theRetToken=_returnToken;
break;
}
case '?':
{
mQUESTION(true);
theRetToken=_returnToken;
break;
}
case ';':
{
mSEMI(true);
theRetToken=_returnToken;
break;
}
case '(':
{
mLPAREN(true);
theRetToken=_returnToken;
break;
}
case ')':
{
mRPAREN(true);
theRetToken=_returnToken;
break;
}
case '[':
{
mLBRACKET(true);
theRetToken=_returnToken;
break;
}
case ']':
{
mRBRACKET(true);
theRetToken=_returnToken;
break;
}
case '{':
{
mLCURLY(true);
theRetToken=_returnToken;
break;
}
case '}':
{
mRCURLY(true);
theRetToken=_returnToken;
break;
}
case '~':
{
mBNOT(true);
theRetToken=_returnToken;
break;
}
case '#':
{
mPREPROC_DIRECTIVE(true);
theRetToken=_returnToken;
break;
}
default:
if ((LA(1)=='>') && (LA(2)=='>') && (LA(3)=='=')) {
mRSHIFT_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='<') && (LA(2)=='<') && (LA(3)=='=')) {
mLSHIFT_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='L') && (LA(2)=='\'')) {
mWideCharLiteral(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='L') && (LA(2)=='"')) {
mWideStringLiteral(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='-') && (LA(2)=='>')) {
mPTR(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='=') && (LA(2)=='=')) {
mEQUAL(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='!') && (LA(2)=='=')) {
mNOT_EQUAL(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='<') && (LA(2)=='=')) {
mLTE(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='>') && (LA(2)=='=')) {
mGTE(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='/') && (LA(2)=='=')) {
mDIV_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='+') && (LA(2)=='=')) {
mPLUS_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='+') && (LA(2)=='+')) {
mINC(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='-') && (LA(2)=='=')) {
mMINUS_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='-') && (LA(2)=='-')) {
mDEC(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='*') && (LA(2)=='=')) {
mSTAR_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='%') && (LA(2)=='=')) {
mMOD_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='>') && (LA(2)=='>') && (true)) {
mRSHIFT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='<') && (LA(2)=='<') && (true)) {
mLSHIFT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='&') && (LA(2)=='&')) {
mLAND(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='|') && (LA(2)=='|')) {
mLOR(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='&') && (LA(2)=='=')) {
mBAND_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='|') && (LA(2)=='=')) {
mBOR_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='^') && (LA(2)=='=')) {
mBXOR_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='/') && (LA(2)=='*')) {
mComment(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='/') && (LA(2)=='/')) {
mCPPComment(true);
theRetToken=_returnToken;
}
else if ((_tokenSet_0.member(LA(1))) && (true)) {
mIDMEAT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='=') && (true)) {
mASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='<') && (true)) {
mLT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='>') && (true)) {
mGT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='/') && (true)) {
mDIV(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='+') && (true)) {
mPLUS(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='-') && (true)) {
mMINUS(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='*') && (true)) {
mSTAR(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='%') && (true)) {
mMOD(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='!') && (true)) {
mLNOT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='&') && (true)) {
mBAND(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='|') && (true)) {
mBOR(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='^') && (true)) {
mBXOR(true);
theRetToken=_returnToken;
}
else {
if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
}
if ( _returnToken==null ) continue tryAgain; // found SKIP token
_ttype = _returnToken.getType();
_returnToken.setType(_ttype);
return _returnToken;
}
catch (RecognitionException e) {
throw new TokenStreamRecognitionException(e);
}
}
catch (CharStreamException cse) {
if ( cse instanceof CharStreamIOException ) {
throw new TokenStreamIOException(((CharStreamIOException)cse).io);
}
else {
throw new TokenStreamException(cse.getMessage());
}
}
}
}
public final void mWhitespace(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Whitespace;
int _saveIndex;
{
if ((LA(1)=='\r') && (LA(2)=='\n')) {
match("\r\n");
if ( inputState.guessing==0 ) {
newline();
}
}
else if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ')) {
{
switch ( LA(1)) {
case ' ':
{
match(' ');
break;
}
case '\t':
{
match('\t');
break;
}
case '\u000c':
{
match('\014');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
}
else if ((LA(1)=='\n'||LA(1)=='\r') && (true)) {
{
switch ( LA(1)) {
case '\n':
{
match('\n');
break;
}
case '\r':
{
match('\r');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( inputState.guessing==0 ) {
newline();
}
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( inputState.guessing==0 ) {
_ttype = Token.SKIP;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mEscape(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Escape;
int _saveIndex;
match('\\');
{
switch ( LA(1)) {
case '0': case '1': case '2': case '3':
{
{
matchRange('0','3');
}
{
_loop327:
do {
if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mDigit(false);
}
else {
break _loop327;
}
} while (true);
}
break;
}
case '4': case '5': case '6': case '7':
{
{
matchRange('4','7');
}
{
_loop330:
do {
if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mDigit(false);
}
else {
break _loop330;
}
} while (true);
}
break;
}
case 'x':
{
match('x');
{
int _cnt332=0;
_loop332:
do {
if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mDigit(false);
}
else if (((LA(1) >= 'a' && LA(1) <= 'f')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
matchRange('a','f');
}
else if (((LA(1) >= 'A' && LA(1) <= 'F')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
matchRange('A','F');
}
else {
if ( _cnt332>=1 ) { break _loop332; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt332++;
} while (true);
}
break;
}
default:
if ((_tokenSet_1.member(LA(1)))) {
{
match(_tokenSet_1);
}
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mDigit(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Digit;
int _saveIndex;
matchRange('0','9');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mIntSuffix(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = IntSuffix;
int _saveIndex;
switch ( LA(1)) {
case 'L':
{
match('L');
break;
}
case 'l':
{
match('l');
break;
}
case 'U':
{
match('U');
break;
}
case 'u':
{
match('u');
break;
}
case 'I':
{
match('I');
break;
}
case 'i':
{
match('i');
break;
}
case 'J':
{
match('J');
break;
}
case 'j':
{
match('j');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mNumberSuffix(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = NumberSuffix;
int _saveIndex;
switch ( LA(1)) {
case 'I': case 'J': case 'L': case 'U':
case 'i': case 'j': case 'l': case 'u':
{
mIntSuffix(false);
break;
}
case 'F':
{
match('F');
break;
}
case 'f':
{
match('f');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mNumber(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Number;
int _saveIndex;
boolean synPredMatched340 = false;
if ((((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_2.member(LA(2))) && (true))) {
int _m340 = mark();
synPredMatched340 = true;
inputState.guessing++;
try {
{
{
int _cnt338=0;
_loop338:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
if ( _cnt338>=1 ) { break _loop338; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt338++;
} while (true);
}
{
switch ( LA(1)) {
case '.':
{
match('.');
break;
}
case 'e':
{
match('e');
break;
}
case 'E':
{
match('E');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
}
}
catch (RecognitionException pe) {
synPredMatched340 = false;
}
rewind(_m340);
inputState.guessing--;
}
if ( synPredMatched340 ) {
{
int _cnt342=0;
_loop342:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
if ( _cnt342>=1 ) { break _loop342; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt342++;
} while (true);
}
{
switch ( LA(1)) {
case '.':
{
match('.');
{
_loop345:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
break _loop345;
}
} while (true);
}
{
if ((LA(1)=='E'||LA(1)=='e')) {
mExponent(false);
}
else {
}
}
break;
}
case 'E': case 'e':
{
mExponent(false);
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
_loop348:
do {
if ((_tokenSet_3.member(LA(1)))) {
mNumberSuffix(false);
}
else {
break _loop348;
}
} while (true);
}
}
else {
boolean synPredMatched350 = false;
if (((LA(1)=='.') && (LA(2)=='.'))) {
int _m350 = mark();
synPredMatched350 = true;
inputState.guessing++;
try {
{
match("...");
}
}
catch (RecognitionException pe) {
synPredMatched350 = false;
}
rewind(_m350);
inputState.guessing--;
}
if ( synPredMatched350 ) {
match("...");
if ( inputState.guessing==0 ) {
_ttype = VARARGS;
}
}
else if ((LA(1)=='0') && (LA(2)=='X'||LA(2)=='x')) {
match('0');
{
switch ( LA(1)) {
case 'x':
{
match('x');
break;
}
case 'X':
{
match('X');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
int _cnt367=0;
_loop367:
do {
switch ( LA(1)) {
case 'a': case 'b': case 'c': case 'd':
case 'e': case 'f':
{
matchRange('a','f');
break;
}
case 'A': case 'B': case 'C': case 'D':
case 'E': case 'F':
{
matchRange('A','F');
break;
}
case '0': case '1': case '2': case '3':
case '4': case '5': case '6': case '7':
case '8': case '9':
{
mDigit(false);
break;
}
default:
{
if ( _cnt367>=1 ) { break _loop367; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
}
_cnt367++;
} while (true);
}
{
_loop369:
do {
if ((_tokenSet_4.member(LA(1)))) {
mIntSuffix(false);
}
else {
break _loop369;
}
} while (true);
}
}
else if ((LA(1)=='.') && (true)) {
match('.');
if ( inputState.guessing==0 ) {
_ttype = DOT;
}
{
if (((LA(1) >= '0' && LA(1) <= '9'))) {
{
int _cnt353=0;
_loop353:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
if ( _cnt353>=1 ) { break _loop353; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt353++;
} while (true);
}
{
if ((LA(1)=='E'||LA(1)=='e')) {
mExponent(false);
}
else {
}
}
if ( inputState.guessing==0 ) {
_ttype = Number;
}
{
_loop356:
do {
if ((_tokenSet_3.member(LA(1)))) {
mNumberSuffix(false);
}
else {
break _loop356;
}
} while (true);
}
}
else {
}
}
}
else if ((LA(1)=='0') && (true) && (true)) {
match('0');
{
_loop358:
do {
if (((LA(1) >= '0' && LA(1) <= '7'))) {
matchRange('0','7');
}
else {
break _loop358;
}
} while (true);
}
{
_loop360:
do {
if ((_tokenSet_3.member(LA(1)))) {
mNumberSuffix(false);
}
else {
break _loop360;
}
} while (true);
}
}
else if (((LA(1) >= '1' && LA(1) <= '9')) && (true) && (true)) {
matchRange('1','9');
{
_loop362:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
break _loop362;
}
} while (true);
}
{
_loop364:
do {
if ((_tokenSet_3.member(LA(1)))) {
mNumberSuffix(false);
}
else {
break _loop364;
}
} while (true);
}
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mExponent(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Exponent;
int _saveIndex;
{
switch ( LA(1)) {
case 'e':
{
match('e');
break;
}
case 'E':
{
match('E');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
switch ( LA(1)) {
case '+':
{
match('+');
break;
}
case '-':
{
match('-');
break;
}
case '0': case '1': case '2': case '3':
case '4': case '5': case '6': case '7':
case '8': case '9':
{
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
int _cnt487=0;
_loop487:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
if ( _cnt487>=1 ) { break _loop487; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt487++;
} while (true);
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mIDMEAT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = IDMEAT;
int _saveIndex;
Token i=null;
mID(true);
i=_returnToken;
if ( inputState.guessing==0 ) {
if ( i.getType() == LITERAL___extension__ ) {
_ttype = Token.SKIP;
}
else {
_ttype = i.getType();
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mID(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = ID;
int _saveIndex;
{
switch ( LA(1)) {
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':
{
matchRange('a','z');
break;
}
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':
{
matchRange('A','Z');
break;
}
case '_':
{
match('_');
break;
}
case '$':
{
match('$');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
_loop374:
do {
if (((LA(1) >= 'a' && LA(1) <= 'z')) && (true) && (true)) {
matchRange('a','z');
}
else if (((LA(1) >= 'A' && LA(1) <= 'Z')) && (true) && (true)) {
matchRange('A','Z');
}
else if ((LA(1)=='_') && (true) && (true)) {
match('_');
}
else if ((LA(1)=='$') && (true) && (true)) {
match('$');
}
else if (((LA(1) >= '0' && LA(1) <= '9')) && (true) && (true)) {
matchRange('0','9');
}
else {
break _loop374;
}
} while (true);
}
_ttype = testLiteralsTable(new String(text.getBuffer(),_begin,text.length()-_begin),_ttype);
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mWideCharLiteral(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = WideCharLiteral;
int _saveIndex;
match('L');
mCharLiteral(false);
if ( inputState.guessing==0 ) {
_ttype = CharLiteral;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mCharLiteral(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = CharLiteral;
int _saveIndex;
match('\'');
{
if ((LA(1)=='\\') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (_tokenSet_5.member(LA(3)))) {
mEscape(false);
}
else if ((_tokenSet_6.member(LA(1))) && (LA(2)=='\'') && (true)) {
{
match(_tokenSet_6);
}
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
match('\'');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mWideStringLiteral(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = WideStringLiteral;
int _saveIndex;
match('L');
mStringLiteral(false);
if ( inputState.guessing==0 ) {
_ttype = StringLiteral;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mStringLiteral(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = StringLiteral;
int _saveIndex;
match('"');
{
_loop384:
do {
boolean synPredMatched381 = false;
if (((LA(1)=='\\') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff')))) {
int _m381 = mark();
synPredMatched381 = true;
inputState.guessing++;
try {
{
match('\\');
{
match(_tokenSet_7);
}
}
}
catch (RecognitionException pe) {
synPredMatched381 = false;
}
rewind(_m381);
inputState.guessing--;
}
if ( synPredMatched381 ) {
mEscape(false);
}
else if ((LA(1)=='\n'||LA(1)=='\r'||LA(1)=='\\') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
{
switch ( LA(1)) {
case '\r':
{
match('\r');
if ( inputState.guessing==0 ) {
newline();
}
break;
}
case '\n':
{
match('\n');
if ( inputState.guessing==0 ) {
newline();
}
break;
}
case '\\':
{
match('\\');
match('\n');
if ( inputState.guessing==0 ) {
newline();
}
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
}
else if ((_tokenSet_8.member(LA(1)))) {
{
match(_tokenSet_8);
}
}
else {
break _loop384;
}
} while (true);
}
match('"');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mVocabulary(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Vocabulary;
int _saveIndex;
matchRange('\3','\377');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = ASSIGN;
int _saveIndex;
match('=');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mCOLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = COLON;
int _saveIndex;
match(':');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mCOMMA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = COMMA;
int _saveIndex;
match(',');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mQUESTION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = QUESTION;
int _saveIndex;
match('?');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mSEMI(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = SEMI;
int _saveIndex;
match(';');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mPTR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = PTR;
int _saveIndex;
match("->");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mDOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DOT;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mVARARGS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = VARARGS;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LPAREN;
int _saveIndex;
match('(');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RPAREN;
int _saveIndex;
match(')');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLBRACKET(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LBRACKET;
int _saveIndex;
match('[');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRBRACKET(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RBRACKET;
int _saveIndex;
match(']');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LCURLY;
int _saveIndex;
match('{');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RCURLY;
int _saveIndex;
match('}');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mEQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = EQUAL;
int _saveIndex;
match("==");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mNOT_EQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = NOT_EQUAL;
int _saveIndex;
match("!=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLTE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LTE;
int _saveIndex;
match("<=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LT;
int _saveIndex;
match("<");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mGTE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = GTE;
int _saveIndex;
match(">=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mGT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = GT;
int _saveIndex;
match(">");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mDIV(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DIV;
int _saveIndex;
match('/');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mDIV_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DIV_ASSIGN;
int _saveIndex;
match("/=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mPLUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = PLUS;
int _saveIndex;
match('+');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mPLUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = PLUS_ASSIGN;
int _saveIndex;
match("+=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mINC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = INC;
int _saveIndex;
match("++");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mMINUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = MINUS;
int _saveIndex;
match('-');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mMINUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = MINUS_ASSIGN;
int _saveIndex;
match("-=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mDEC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DEC;
int _saveIndex;
match("--");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mSTAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = STAR;
int _saveIndex;
match('*');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mSTAR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = STAR_ASSIGN;
int _saveIndex;
match("*=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mMOD(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = MOD;
int _saveIndex;
match('%');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mMOD_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = MOD_ASSIGN;
int _saveIndex;
match("%=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRSHIFT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RSHIFT;
int _saveIndex;
match(">>");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRSHIFT_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RSHIFT_ASSIGN;
int _saveIndex;
match(">>=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLSHIFT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LSHIFT;
int _saveIndex;
match("<<");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLSHIFT_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LSHIFT_ASSIGN;
int _saveIndex;
match("<<=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LAND;
int _saveIndex;
match("&&");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LNOT;
int _saveIndex;
match('!');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LOR;
int _saveIndex;
match("||");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BAND;
int _saveIndex;
match('&');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBAND_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BAND_ASSIGN;
int _saveIndex;
match("&=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BNOT;
int _saveIndex;
match('~');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BOR;
int _saveIndex;
match('|');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BOR_ASSIGN;
int _saveIndex;
match("|=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBXOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BXOR;
int _saveIndex;
match('^');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBXOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BXOR_ASSIGN;
int _saveIndex;
match("^=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mComment(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Comment;
int _saveIndex;
match("/*");
{
_loop436:
do {
if (((LA(1)=='*') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff')))&&( LA(2) != '/' )) {
match('*');
}
else if ((LA(1)=='\r') && (LA(2)=='\n') && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
match("\r\n");
if ( inputState.guessing==0 ) {
deferredNewline();
}
}
else if ((LA(1)=='\n'||LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
{
switch ( LA(1)) {
case '\r':
{
match('\r');
break;
}
case '\n':
{
match('\n');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( inputState.guessing==0 ) {
deferredNewline();
}
}
else if ((_tokenSet_9.member(LA(1)))) {
{
match(_tokenSet_9);
}
}
else {
break _loop436;
}
} while (true);
}
match("*/");
if ( inputState.guessing==0 ) {
_ttype = Token.SKIP;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mCPPComment(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = CPPComment;
int _saveIndex;
match("//");
{
_loop440:
do {
if ((_tokenSet_7.member(LA(1)))) {
{
match(_tokenSet_7);
}
}
else {
break _loop440;
}
} while (true);
}
if ( inputState.guessing==0 ) {
_ttype = Token.SKIP;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mPREPROC_DIRECTIVE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = PREPROC_DIRECTIVE;
int _saveIndex;
match('#');
{
boolean synPredMatched447 = false;
if (((_tokenSet_10.member(LA(1))) && (_tokenSet_11.member(LA(2))) && (_tokenSet_12.member(LA(3))))) {
int _m447 = mark();
synPredMatched447 = true;
inputState.guessing++;
try {
{
switch ( LA(1)) {
case 'l':
{
match("line");
break;
}
case '\t': case '\u000c': case ' ':
{
{
{
int _cnt446=0;
_loop446:
do {
switch ( LA(1)) {
case ' ':
{
match(' ');
break;
}
case '\t':
{
match('\t');
break;
}
case '\u000c':
{
match('\014');
break;
}
default:
{
if ( _cnt446>=1 ) { break _loop446; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
}
_cnt446++;
} while (true);
}
matchRange('0','9');
}
break;
}
default:
{
}
}
}
}
catch (RecognitionException pe) {
synPredMatched447 = false;
}
rewind(_m447);
inputState.guessing--;
}
if ( synPredMatched447 ) {
mLineDirective(false);
}
else {
{
_loop449:
do {
if ((_tokenSet_7.member(LA(1)))) {
matchNot('\n');
}
else {
break _loop449;
}
} while (true);
}
if ( inputState.guessing==0 ) {
setPreprocessingDirective(getText());
}
}
}
if ( inputState.guessing==0 ) {
_ttype = Token.SKIP;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLineDirective(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LineDirective;
int _saveIndex;
Token n=null;
Token fn=null;
Token fi=null;
boolean oldCountingTokens = countingTokens;
countingTokens = false;
if ( inputState.guessing==0 ) {
lineObject = new LineObject();
deferredLineCount = 0;
}
{
switch ( LA(1)) {
case 'l':
{
match("line");
break;
}
case '\t': case '\u000c': case ' ':
{
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
int _cnt455=0;
_loop455:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ')) {
mSpace(false);
}
else {
if ( _cnt455>=1 ) { break _loop455; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt455++;
} while (true);
}
mNumber(true);
n=_returnToken;
if ( inputState.guessing==0 ) {
lineObject.setLine(Integer.parseInt(n.getText()));
}
{
int _cnt457=0;
_loop457:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
if ( _cnt457>=1 ) { break _loop457; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt457++;
} while (true);
}
{
if ((LA(1)=='"') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
mStringLiteral(true);
fn=_returnToken;
if ( inputState.guessing==0 ) {
try {
lineObject.setSource(fn.getText().substring(1,fn.getText().length()-1));
}
catch (StringIndexOutOfBoundsException e) { /*not possible*/ }
}
}
else if ((_tokenSet_0.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mID(true);
fi=_returnToken;
if ( inputState.guessing==0 ) {
lineObject.setSource(fi.getText());
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop460:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
break _loop460;
}
} while (true);
}
{
if ((LA(1)=='1') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
match("1");
if ( inputState.guessing==0 ) {
lineObject.setEnteringFile(true);
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop463:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
break _loop463;
}
} while (true);
}
{
if ((LA(1)=='2') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
match("2");
if ( inputState.guessing==0 ) {
lineObject.setReturningToFile(true);
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop466:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
break _loop466;
}
} while (true);
}
{
if ((LA(1)=='3') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
match("3");
if ( inputState.guessing==0 ) {
lineObject.setSystemHeader(true);
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop469:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
break _loop469;
}
} while (true);
}
{
if ((LA(1)=='4') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
match("4");
if ( inputState.guessing==0 ) {
lineObject.setTreatAsC(true);
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop473:
do {
if ((_tokenSet_13.member(LA(1)))) {
{
match(_tokenSet_13);
}
}
else {
break _loop473;
}
} while (true);
}
{
if ((LA(1)=='\r') && (LA(2)=='\n')) {
match("\r\n");
}
else if ((LA(1)=='\r') && (true)) {
match("\r");
}
else if ((LA(1)=='\n')) {
match("\n");
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( inputState.guessing==0 ) {
preprocessorInfoChannel.addLineForTokenNumber(new LineObject(lineObject), new Integer(tokenNumber));
countingTokens = oldCountingTokens;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mSpace(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Space;
int _saveIndex;
{
switch ( LA(1)) {
case ' ':
{
match(' ');
break;
}
case '\t':
{
match('\t');
break;
}
case '\u000c':
{
match('\014');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mBadStringLiteral(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BadStringLiteral;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongSuffix(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongSuffix;
int _saveIndex;
switch ( LA(1)) {
case 'l':
{
match('l');
break;
}
case 'L':
{
match('L');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mUnsignedSuffix(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = UnsignedSuffix;
int _saveIndex;
switch ( LA(1)) {
case 'u':
{
match('u');
break;
}
case 'U':
{
match('U');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mFloatSuffix(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = FloatSuffix;
int _saveIndex;
switch ( LA(1)) {
case 'f':
{
match('f');
break;
}
case 'F':
{
match('F');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mDoubleDoubleConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DoubleDoubleConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mFloatDoubleConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = FloatDoubleConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongDoubleConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongDoubleConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mIntOctalConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = IntOctalConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongOctalConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongOctalConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mUnsignedOctalConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = UnsignedOctalConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mIntIntConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = IntIntConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongIntConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongIntConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mUnsignedIntConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = UnsignedIntConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mIntHexConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = IntHexConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongHexConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongHexConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mUnsignedHexConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = UnsignedHexConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
private static final long[] mk_tokenSet_0() {
long[] data = { 68719476736L, 576460745995190270L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
private static final long[] mk_tokenSet_1() {
long[] data = new long[8];
data[0]=-71776119061217288L;
data[1]=-72057594037927937L;
for (int i = 2; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
private static final long[] mk_tokenSet_2() {
long[] data = { 288019269919178752L, 137438953504L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
private static final long[] mk_tokenSet_3() {
long[] data = { 0L, 9031663390561856L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
private static final long[] mk_tokenSet_4() {
long[] data = { 0L, 9031388512654848L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
private static final long[] mk_tokenSet_5() {
long[] data = { 287949450930814976L, 541165879422L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
private static final long[] mk_tokenSet_6() {
long[] data = new long[8];
data[0]=-549755813896L;
for (int i = 1; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
private static final long[] mk_tokenSet_7() {
long[] data = new long[8];
data[0]=-1032L;
for (int i = 1; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
private static final long[] mk_tokenSet_8() {
long[] data = new long[8];
data[0]=-17179878408L;
data[1]=-268435457L;
for (int i = 2; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
private static final long[] mk_tokenSet_9() {
long[] data = new long[8];
data[0]=-4398046520328L;
for (int i = 1; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
private static final long[] mk_tokenSet_10() {
long[] data = { 4294971904L, 17592186044416L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());
private static final long[] mk_tokenSet_11() {
long[] data = { 288019274214150656L, 2199023255552L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11());
private static final long[] mk_tokenSet_12() {
long[] data = { 288019274214150656L, 81159763628398176L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_12 = new BitSet(mk_tokenSet_12());
private static final long[] mk_tokenSet_13() {
long[] data = new long[8];
data[0]=-9224L;
for (int i = 1; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_13 = new BitSet(mk_tokenSet_13());
}
public WLexer(InputStream in) {
this(new ByteBuffer(in));
}
public WLexer(Reader in) {
this(new CharBuffer(in));
}
public WLexer(InputBuffer ib) {
this(new LexerSharedInputState(ib));
}
public WLexer(LexerSharedInputState state) {
super(state);
caseSensitiveLiterals = true;
setCaseSensitive(true);
literals = new Hashtable();
literals.put(new ANTLRHashString("byte", this), new Integer(143));
literals.put(new ANTLRHashString("extern", this), new Integer(15));
literals.put(new ANTLRHashString("__real", this), new Integer(151));
literals.put(new ANTLRHashString("case", this), new Integer(44));
literals.put(new ANTLRHashString("short", this), new Integer(20));
literals.put(new ANTLRHashString("break", this), new Integer(42));
literals.put(new ANTLRHashString("while", this), new Integer(37));
literals.put(new ANTLRHashString("typeof", this), new Integer(147));
literals.put(new ANTLRHashString("inline", this), new Integer(142));
literals.put(new ANTLRHashString("unsigned", this), new Integer(26));
literals.put(new ANTLRHashString("const", this), new Integer(17));
literals.put(new ANTLRHashString("float", this), new Integer(23));
literals.put(new ANTLRHashString("return", this), new Integer(43));
literals.put(new ANTLRHashString("sizeof", this), new Integer(79));
literals.put(new ANTLRHashString("do", this), new Integer(38));
literals.put(new ANTLRHashString("__label__", this), new Integer(141));
literals.put(new ANTLRHashString("typedef", this), new Integer(4));
literals.put(new ANTLRHashString("if", this), new Integer(46));
literals.put(new ANTLRHashString("double", this), new Integer(24));
literals.put(new ANTLRHashString("volatile", this), new Integer(6));
literals.put(new ANTLRHashString("__attribute", this), new Integer(149));
literals.put(new ANTLRHashString("union", this), new Integer(11));
literals.put(new ANTLRHashString("register", this), new Integer(14));
literals.put(new ANTLRHashString("auto", this), new Integer(13));
literals.put(new ANTLRHashString("goto", this), new Integer(40));
literals.put(new ANTLRHashString("enum", this), new Integer(12));
literals.put(new ANTLRHashString("Servo", this), new Integer(145));
literals.put(new ANTLRHashString("int", this), new Integer(21));
literals.put(new ANTLRHashString("for", this), new Integer(39));
literals.put(new ANTLRHashString("boolean", this), new Integer(144));
literals.put(new ANTLRHashString("Wire", this), new Integer(146));
literals.put(new ANTLRHashString("char", this), new Integer(19));
literals.put(new ANTLRHashString("default", this), new Integer(45));
literals.put(new ANTLRHashString("__imag", this), new Integer(152));
literals.put(new ANTLRHashString("__alignof", this), new Integer(150));
literals.put(new ANTLRHashString("static", this), new Integer(16));
literals.put(new ANTLRHashString("continue", this), new Integer(41));
literals.put(new ANTLRHashString("struct", this), new Integer(10));
literals.put(new ANTLRHashString("signed", this), new Integer(25));
literals.put(new ANTLRHashString("else", this), new Integer(47));
literals.put(new ANTLRHashString("void", this), new Integer(18));
literals.put(new ANTLRHashString("switch", this), new Integer(48));
literals.put(new ANTLRHashString("long", this), new Integer(22));
literals.put(new ANTLRHashString("__extension__", this), new Integer(153));
literals.put(new ANTLRHashString("asm", this), new Integer(5));
literals.put(new ANTLRHashString("__complex", this), new Integer(148));
}
public Token nextToken() throws TokenStreamException {
Token theRetToken=null;
tryAgain:
for (;;) {
Token _token = null;
int _ttype = Token.INVALID_TYPE;
resetText();
try { // for char stream error handling
try { // for lexical error handling
switch ( LA(1)) {
case '\t': case '\n': case '\u000c': case '\r':
case ' ':
{
mWhitespace(true);
theRetToken=_returnToken;
break;
}
case '.': case '0': case '1': case '2':
case '3': case '4': case '5': case '6':
case '7': case '8': case '9':
{
mNumber(true);
theRetToken=_returnToken;
break;
}
case '\'':
{
mCharLiteral(true);
theRetToken=_returnToken;
break;
}
case '"':
{
mStringLiteral(true);
theRetToken=_returnToken;
break;
}
case ':':
{
mCOLON(true);
theRetToken=_returnToken;
break;
}
case ',':
{
mCOMMA(true);
theRetToken=_returnToken;
break;
}
case '?':
{
mQUESTION(true);
theRetToken=_returnToken;
break;
}
case ';':
{
mSEMI(true);
theRetToken=_returnToken;
break;
}
case '(':
{
mLPAREN(true);
theRetToken=_returnToken;
break;
}
case ')':
{
mRPAREN(true);
theRetToken=_returnToken;
break;
}
case '[':
{
mLBRACKET(true);
theRetToken=_returnToken;
break;
}
case ']':
{
mRBRACKET(true);
theRetToken=_returnToken;
break;
}
case '{':
{
mLCURLY(true);
theRetToken=_returnToken;
break;
}
case '}':
{
mRCURLY(true);
theRetToken=_returnToken;
break;
}
case '~':
{
mBNOT(true);
theRetToken=_returnToken;
break;
}
case '#':
{
mPREPROC_DIRECTIVE(true);
theRetToken=_returnToken;
break;
}
default:
if ((LA(1)=='>') && (LA(2)=='>') && (LA(3)=='=')) {
mRSHIFT_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='<') && (LA(2)=='<') && (LA(3)=='=')) {
mLSHIFT_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='L') && (LA(2)=='\'')) {
mWideCharLiteral(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='L') && (LA(2)=='"')) {
mWideStringLiteral(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='-') && (LA(2)=='>')) {
mPTR(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='=') && (LA(2)=='=')) {
mEQUAL(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='!') && (LA(2)=='=')) {
mNOT_EQUAL(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='<') && (LA(2)=='=')) {
mLTE(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='>') && (LA(2)=='=')) {
mGTE(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='/') && (LA(2)=='=')) {
mDIV_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='+') && (LA(2)=='=')) {
mPLUS_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='+') && (LA(2)=='+')) {
mINC(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='-') && (LA(2)=='=')) {
mMINUS_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='-') && (LA(2)=='-')) {
mDEC(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='*') && (LA(2)=='=')) {
mSTAR_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='%') && (LA(2)=='=')) {
mMOD_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='>') && (LA(2)=='>') && (true)) {
mRSHIFT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='<') && (LA(2)=='<') && (true)) {
mLSHIFT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='&') && (LA(2)=='&')) {
mLAND(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='|') && (LA(2)=='|')) {
mLOR(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='&') && (LA(2)=='=')) {
mBAND_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='|') && (LA(2)=='=')) {
mBOR_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='^') && (LA(2)=='=')) {
mBXOR_ASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='/') && (LA(2)=='*')) {
mComment(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='/') && (LA(2)=='/')) {
mCPPComment(true);
theRetToken=_returnToken;
}
else if ((_tokenSet_0.member(LA(1))) && (true)) {
mIDMEAT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='=') && (true)) {
mASSIGN(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='<') && (true)) {
mLT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='>') && (true)) {
mGT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='/') && (true)) {
mDIV(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='+') && (true)) {
mPLUS(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='-') && (true)) {
mMINUS(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='*') && (true)) {
mSTAR(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='%') && (true)) {
mMOD(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='!') && (true)) {
mLNOT(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='&') && (true)) {
mBAND(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='|') && (true)) {
mBOR(true);
theRetToken=_returnToken;
}
else if ((LA(1)=='^') && (true)) {
mBXOR(true);
theRetToken=_returnToken;
}
else {
if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
}
if ( _returnToken==null ) continue tryAgain; // found SKIP token
_ttype = _returnToken.getType();
_returnToken.setType(_ttype);
return _returnToken;
}
catch (RecognitionException e) {
throw new TokenStreamRecognitionException(e);
}
}
catch (CharStreamException cse) {
if ( cse instanceof CharStreamIOException ) {
throw new TokenStreamIOException(((CharStreamIOException)cse).io);
}
else {
throw new TokenStreamException(cse.getMessage());
}
}
}
}
public final void mWhitespace(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Whitespace;
int _saveIndex;
{
if ((LA(1)=='\r') && (LA(2)=='\n')) {
match("\r\n");
if ( inputState.guessing==0 ) {
newline();
}
}
else if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ')) {
{
switch ( LA(1)) {
case ' ':
{
match(' ');
break;
}
case '\t':
{
match('\t');
break;
}
case '\u000c':
{
match('\014');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
}
else if ((LA(1)=='\n'||LA(1)=='\r') && (true)) {
{
switch ( LA(1)) {
case '\n':
{
match('\n');
break;
}
case '\r':
{
match('\r');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( inputState.guessing==0 ) {
newline();
}
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( inputState.guessing==0 ) {
_ttype = Token.SKIP;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mEscape(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Escape;
int _saveIndex;
match('\\');
{
switch ( LA(1)) {
case '0': case '1': case '2': case '3':
{
{
matchRange('0','3');
}
{
_loop327:
do {
if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mDigit(false);
}
else {
break _loop327;
}
} while (true);
}
break;
}
case '4': case '5': case '6': case '7':
{
{
matchRange('4','7');
}
{
_loop330:
do {
if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mDigit(false);
}
else {
break _loop330;
}
} while (true);
}
break;
}
case 'x':
{
match('x');
{
int _cnt332=0;
_loop332:
do {
if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mDigit(false);
}
else if (((LA(1) >= 'a' && LA(1) <= 'f')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
matchRange('a','f');
}
else if (((LA(1) >= 'A' && LA(1) <= 'F')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
matchRange('A','F');
}
else {
if ( _cnt332>=1 ) { break _loop332; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt332++;
} while (true);
}
break;
}
default:
if ((_tokenSet_1.member(LA(1)))) {
{
match(_tokenSet_1);
}
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mDigit(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Digit;
int _saveIndex;
matchRange('0','9');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mIntSuffix(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = IntSuffix;
int _saveIndex;
switch ( LA(1)) {
case 'L':
{
match('L');
break;
}
case 'l':
{
match('l');
break;
}
case 'U':
{
match('U');
break;
}
case 'u':
{
match('u');
break;
}
case 'I':
{
match('I');
break;
}
case 'i':
{
match('i');
break;
}
case 'J':
{
match('J');
break;
}
case 'j':
{
match('j');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mNumberSuffix(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = NumberSuffix;
int _saveIndex;
switch ( LA(1)) {
case 'I': case 'J': case 'L': case 'U':
case 'i': case 'j': case 'l': case 'u':
{
mIntSuffix(false);
break;
}
case 'F':
{
match('F');
break;
}
case 'f':
{
match('f');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mNumber(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Number;
int _saveIndex;
boolean synPredMatched340 = false;
if ((((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_2.member(LA(2))) && (true))) {
int _m340 = mark();
synPredMatched340 = true;
inputState.guessing++;
try {
{
{
int _cnt338=0;
_loop338:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
if ( _cnt338>=1 ) { break _loop338; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt338++;
} while (true);
}
{
switch ( LA(1)) {
case '.':
{
match('.');
break;
}
case 'e':
{
match('e');
break;
}
case 'E':
{
match('E');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
}
}
catch (RecognitionException pe) {
synPredMatched340 = false;
}
rewind(_m340);
inputState.guessing--;
}
if ( synPredMatched340 ) {
{
int _cnt342=0;
_loop342:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
if ( _cnt342>=1 ) { break _loop342; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt342++;
} while (true);
}
{
switch ( LA(1)) {
case '.':
{
match('.');
{
_loop345:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
break _loop345;
}
} while (true);
}
{
if ((LA(1)=='E'||LA(1)=='e')) {
mExponent(false);
}
else {
}
}
break;
}
case 'E': case 'e':
{
mExponent(false);
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
_loop348:
do {
if ((_tokenSet_3.member(LA(1)))) {
mNumberSuffix(false);
}
else {
break _loop348;
}
} while (true);
}
}
else {
boolean synPredMatched350 = false;
if (((LA(1)=='.') && (LA(2)=='.'))) {
int _m350 = mark();
synPredMatched350 = true;
inputState.guessing++;
try {
{
match("...");
}
}
catch (RecognitionException pe) {
synPredMatched350 = false;
}
rewind(_m350);
inputState.guessing--;
}
if ( synPredMatched350 ) {
match("...");
if ( inputState.guessing==0 ) {
_ttype = VARARGS;
}
}
else if ((LA(1)=='0') && (LA(2)=='X'||LA(2)=='x')) {
match('0');
{
switch ( LA(1)) {
case 'x':
{
match('x');
break;
}
case 'X':
{
match('X');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
int _cnt367=0;
_loop367:
do {
switch ( LA(1)) {
case 'a': case 'b': case 'c': case 'd':
case 'e': case 'f':
{
matchRange('a','f');
break;
}
case 'A': case 'B': case 'C': case 'D':
case 'E': case 'F':
{
matchRange('A','F');
break;
}
case '0': case '1': case '2': case '3':
case '4': case '5': case '6': case '7':
case '8': case '9':
{
mDigit(false);
break;
}
default:
{
if ( _cnt367>=1 ) { break _loop367; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
}
_cnt367++;
} while (true);
}
{
_loop369:
do {
if ((_tokenSet_4.member(LA(1)))) {
mIntSuffix(false);
}
else {
break _loop369;
}
} while (true);
}
}
else if ((LA(1)=='.') && (true)) {
match('.');
if ( inputState.guessing==0 ) {
_ttype = DOT;
}
{
if (((LA(1) >= '0' && LA(1) <= '9'))) {
{
int _cnt353=0;
_loop353:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
if ( _cnt353>=1 ) { break _loop353; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt353++;
} while (true);
}
{
if ((LA(1)=='E'||LA(1)=='e')) {
mExponent(false);
}
else {
}
}
if ( inputState.guessing==0 ) {
_ttype = Number;
}
{
_loop356:
do {
if ((_tokenSet_3.member(LA(1)))) {
mNumberSuffix(false);
}
else {
break _loop356;
}
} while (true);
}
}
else {
}
}
}
else if ((LA(1)=='0') && (true) && (true)) {
match('0');
{
_loop358:
do {
if (((LA(1) >= '0' && LA(1) <= '7'))) {
matchRange('0','7');
}
else {
break _loop358;
}
} while (true);
}
{
_loop360:
do {
if ((_tokenSet_3.member(LA(1)))) {
mNumberSuffix(false);
}
else {
break _loop360;
}
} while (true);
}
}
else if (((LA(1) >= '1' && LA(1) <= '9')) && (true) && (true)) {
matchRange('1','9');
{
_loop362:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
break _loop362;
}
} while (true);
}
{
_loop364:
do {
if ((_tokenSet_3.member(LA(1)))) {
mNumberSuffix(false);
}
else {
break _loop364;
}
} while (true);
}
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mExponent(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Exponent;
int _saveIndex;
{
switch ( LA(1)) {
case 'e':
{
match('e');
break;
}
case 'E':
{
match('E');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
switch ( LA(1)) {
case '+':
{
match('+');
break;
}
case '-':
{
match('-');
break;
}
case '0': case '1': case '2': case '3':
case '4': case '5': case '6': case '7':
case '8': case '9':
{
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
int _cnt487=0;
_loop487:
do {
if (((LA(1) >= '0' && LA(1) <= '9'))) {
mDigit(false);
}
else {
if ( _cnt487>=1 ) { break _loop487; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt487++;
} while (true);
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mIDMEAT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = IDMEAT;
int _saveIndex;
Token i=null;
mID(true);
i=_returnToken;
if ( inputState.guessing==0 ) {
if ( i.getType() == LITERAL___extension__ ) {
_ttype = Token.SKIP;
}
else {
_ttype = i.getType();
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mID(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = ID;
int _saveIndex;
{
switch ( LA(1)) {
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':
{
matchRange('a','z');
break;
}
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':
{
matchRange('A','Z');
break;
}
case '_':
{
match('_');
break;
}
case '$':
{
match('$');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
_loop374:
do {
if (((LA(1) >= 'a' && LA(1) <= 'z')) && (true) && (true)) {
matchRange('a','z');
}
else if (((LA(1) >= 'A' && LA(1) <= 'Z')) && (true) && (true)) {
matchRange('A','Z');
}
else if ((LA(1)=='_') && (true) && (true)) {
match('_');
}
else if ((LA(1)=='$') && (true) && (true)) {
match('$');
}
else if (((LA(1) >= '0' && LA(1) <= '9')) && (true) && (true)) {
matchRange('0','9');
}
else {
break _loop374;
}
} while (true);
}
_ttype = testLiteralsTable(new String(text.getBuffer(),_begin,text.length()-_begin),_ttype);
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mWideCharLiteral(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = WideCharLiteral;
int _saveIndex;
match('L');
mCharLiteral(false);
if ( inputState.guessing==0 ) {
_ttype = CharLiteral;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mCharLiteral(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = CharLiteral;
int _saveIndex;
match('\'');
{
if ((LA(1)=='\\') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (_tokenSet_5.member(LA(3)))) {
mEscape(false);
}
else if ((_tokenSet_6.member(LA(1))) && (LA(2)=='\'') && (true)) {
{
match(_tokenSet_6);
}
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
match('\'');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mWideStringLiteral(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = WideStringLiteral;
int _saveIndex;
match('L');
mStringLiteral(false);
if ( inputState.guessing==0 ) {
_ttype = StringLiteral;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mStringLiteral(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = StringLiteral;
int _saveIndex;
match('"');
{
_loop384:
do {
boolean synPredMatched381 = false;
if (((LA(1)=='\\') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff')))) {
int _m381 = mark();
synPredMatched381 = true;
inputState.guessing++;
try {
{
match('\\');
{
match(_tokenSet_7);
}
}
}
catch (RecognitionException pe) {
synPredMatched381 = false;
}
rewind(_m381);
inputState.guessing--;
}
if ( synPredMatched381 ) {
mEscape(false);
}
else if ((LA(1)=='\n'||LA(1)=='\r'||LA(1)=='\\') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
{
switch ( LA(1)) {
case '\r':
{
match('\r');
if ( inputState.guessing==0 ) {
newline();
}
break;
}
case '\n':
{
match('\n');
if ( inputState.guessing==0 ) {
newline();
}
break;
}
case '\\':
{
match('\\');
match('\n');
if ( inputState.guessing==0 ) {
newline();
}
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
}
else if ((_tokenSet_8.member(LA(1)))) {
{
match(_tokenSet_8);
}
}
else {
break _loop384;
}
} while (true);
}
match('"');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mVocabulary(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Vocabulary;
int _saveIndex;
matchRange('\3','\377');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = ASSIGN;
int _saveIndex;
match('=');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mCOLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = COLON;
int _saveIndex;
match(':');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mCOMMA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = COMMA;
int _saveIndex;
match(',');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mQUESTION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = QUESTION;
int _saveIndex;
match('?');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mSEMI(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = SEMI;
int _saveIndex;
match(';');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mPTR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = PTR;
int _saveIndex;
match("->");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mDOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DOT;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mVARARGS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = VARARGS;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LPAREN;
int _saveIndex;
match('(');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RPAREN;
int _saveIndex;
match(')');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLBRACKET(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LBRACKET;
int _saveIndex;
match('[');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRBRACKET(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RBRACKET;
int _saveIndex;
match(']');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LCURLY;
int _saveIndex;
match('{');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RCURLY;
int _saveIndex;
match('}');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mEQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = EQUAL;
int _saveIndex;
match("==");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mNOT_EQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = NOT_EQUAL;
int _saveIndex;
match("!=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLTE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LTE;
int _saveIndex;
match("<=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LT;
int _saveIndex;
match("<");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mGTE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = GTE;
int _saveIndex;
match(">=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mGT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = GT;
int _saveIndex;
match(">");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mDIV(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DIV;
int _saveIndex;
match('/');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mDIV_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DIV_ASSIGN;
int _saveIndex;
match("/=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mPLUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = PLUS;
int _saveIndex;
match('+');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mPLUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = PLUS_ASSIGN;
int _saveIndex;
match("+=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mINC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = INC;
int _saveIndex;
match("++");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mMINUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = MINUS;
int _saveIndex;
match('-');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mMINUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = MINUS_ASSIGN;
int _saveIndex;
match("-=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mDEC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DEC;
int _saveIndex;
match("--");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mSTAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = STAR;
int _saveIndex;
match('*');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mSTAR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = STAR_ASSIGN;
int _saveIndex;
match("*=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mMOD(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = MOD;
int _saveIndex;
match('%');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mMOD_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = MOD_ASSIGN;
int _saveIndex;
match("%=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRSHIFT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RSHIFT;
int _saveIndex;
match(">>");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mRSHIFT_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = RSHIFT_ASSIGN;
int _saveIndex;
match(">>=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLSHIFT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LSHIFT;
int _saveIndex;
match("<<");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLSHIFT_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LSHIFT_ASSIGN;
int _saveIndex;
match("<<=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LAND;
int _saveIndex;
match("&&");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LNOT;
int _saveIndex;
match('!');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mLOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LOR;
int _saveIndex;
match("||");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BAND;
int _saveIndex;
match('&');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBAND_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BAND_ASSIGN;
int _saveIndex;
match("&=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BNOT;
int _saveIndex;
match('~');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BOR;
int _saveIndex;
match('|');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BOR_ASSIGN;
int _saveIndex;
match("|=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBXOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BXOR;
int _saveIndex;
match('^');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mBXOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BXOR_ASSIGN;
int _saveIndex;
match("^=");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mComment(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Comment;
int _saveIndex;
match("/*");
{
_loop436:
do {
if (((LA(1)=='*') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff')))&&( LA(2) != '/' )) {
match('*');
}
else if ((LA(1)=='\r') && (LA(2)=='\n') && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
match("\r\n");
if ( inputState.guessing==0 ) {
deferredNewline();
}
}
else if ((LA(1)=='\n'||LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
{
switch ( LA(1)) {
case '\r':
{
match('\r');
break;
}
case '\n':
{
match('\n');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( inputState.guessing==0 ) {
deferredNewline();
}
}
else if ((_tokenSet_9.member(LA(1)))) {
{
match(_tokenSet_9);
}
}
else {
break _loop436;
}
} while (true);
}
match("*/");
if ( inputState.guessing==0 ) {
_ttype = Token.SKIP;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mCPPComment(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = CPPComment;
int _saveIndex;
match("//");
{
_loop440:
do {
if ((_tokenSet_7.member(LA(1)))) {
{
match(_tokenSet_7);
}
}
else {
break _loop440;
}
} while (true);
}
if ( inputState.guessing==0 ) {
_ttype = Token.SKIP;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
public final void mPREPROC_DIRECTIVE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = PREPROC_DIRECTIVE;
int _saveIndex;
match('#');
{
boolean synPredMatched447 = false;
if (((_tokenSet_10.member(LA(1))) && (_tokenSet_11.member(LA(2))) && (_tokenSet_12.member(LA(3))))) {
int _m447 = mark();
synPredMatched447 = true;
inputState.guessing++;
try {
{
switch ( LA(1)) {
case 'l':
{
match("line");
break;
}
case '\t': case '\u000c': case ' ':
{
{
{
int _cnt446=0;
_loop446:
do {
switch ( LA(1)) {
case ' ':
{
match(' ');
break;
}
case '\t':
{
match('\t');
break;
}
case '\u000c':
{
match('\014');
break;
}
default:
{
if ( _cnt446>=1 ) { break _loop446; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
}
_cnt446++;
} while (true);
}
matchRange('0','9');
}
break;
}
default:
{
}
}
}
}
catch (RecognitionException pe) {
synPredMatched447 = false;
}
rewind(_m447);
inputState.guessing--;
}
if ( synPredMatched447 ) {
mLineDirective(false);
}
else {
{
_loop449:
do {
if ((_tokenSet_7.member(LA(1)))) {
matchNot('\n');
}
else {
break _loop449;
}
} while (true);
}
if ( inputState.guessing==0 ) {
setPreprocessingDirective(getText());
}
}
}
if ( inputState.guessing==0 ) {
_ttype = Token.SKIP;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLineDirective(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LineDirective;
int _saveIndex;
Token n=null;
Token fn=null;
Token fi=null;
boolean oldCountingTokens = countingTokens;
countingTokens = false;
if ( inputState.guessing==0 ) {
lineObject = new LineObject();
deferredLineCount = 0;
}
{
switch ( LA(1)) {
case 'l':
{
match("line");
break;
}
case '\t': case '\u000c': case ' ':
{
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
{
int _cnt455=0;
_loop455:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ')) {
mSpace(false);
}
else {
if ( _cnt455>=1 ) { break _loop455; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt455++;
} while (true);
}
mNumber(true);
n=_returnToken;
if ( inputState.guessing==0 ) {
lineObject.setLine(Integer.parseInt(n.getText()));
}
{
int _cnt457=0;
_loop457:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
if ( _cnt457>=1 ) { break _loop457; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt457++;
} while (true);
}
{
if ((LA(1)=='"') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
mStringLiteral(true);
fn=_returnToken;
if ( inputState.guessing==0 ) {
try {
lineObject.setSource(fn.getText().substring(1,fn.getText().length()-1));
}
catch (StringIndexOutOfBoundsException e) { /*not possible*/ }
}
}
else if ((_tokenSet_0.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mID(true);
fi=_returnToken;
if ( inputState.guessing==0 ) {
lineObject.setSource(fi.getText());
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop460:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
break _loop460;
}
} while (true);
}
{
if ((LA(1)=='1') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
match("1");
if ( inputState.guessing==0 ) {
lineObject.setEnteringFile(true);
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop463:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
break _loop463;
}
} while (true);
}
{
if ((LA(1)=='2') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
match("2");
if ( inputState.guessing==0 ) {
lineObject.setReturningToFile(true);
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop466:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
break _loop466;
}
} while (true);
}
{
if ((LA(1)=='3') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
match("3");
if ( inputState.guessing==0 ) {
lineObject.setSystemHeader(true);
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop469:
do {
if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
mSpace(false);
}
else {
break _loop469;
}
} while (true);
}
{
if ((LA(1)=='4') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
match("4");
if ( inputState.guessing==0 ) {
lineObject.setTreatAsC(true);
}
}
else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
{
_loop473:
do {
if ((_tokenSet_13.member(LA(1)))) {
{
match(_tokenSet_13);
}
}
else {
break _loop473;
}
} while (true);
}
{
if ((LA(1)=='\r') && (LA(2)=='\n')) {
match("\r\n");
}
else if ((LA(1)=='\r') && (true)) {
match("\r");
}
else if ((LA(1)=='\n')) {
match("\n");
}
else {
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( inputState.guessing==0 ) {
preprocessorInfoChannel.addLineForTokenNumber(new LineObject(lineObject), new Integer(tokenNumber));
countingTokens = oldCountingTokens;
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mSpace(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = Space;
int _saveIndex;
{
switch ( LA(1)) {
case ' ':
{
match(' ');
break;
}
case '\t':
{
match('\t');
break;
}
case '\u000c':
{
match('\014');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mBadStringLiteral(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = BadStringLiteral;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongSuffix(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongSuffix;
int _saveIndex;
switch ( LA(1)) {
case 'l':
{
match('l');
break;
}
case 'L':
{
match('L');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mUnsignedSuffix(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = UnsignedSuffix;
int _saveIndex;
switch ( LA(1)) {
case 'u':
{
match('u');
break;
}
case 'U':
{
match('U');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mFloatSuffix(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = FloatSuffix;
int _saveIndex;
switch ( LA(1)) {
case 'f':
{
match('f');
break;
}
case 'F':
{
match('F');
break;
}
default:
{
throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mDoubleDoubleConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = DoubleDoubleConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mFloatDoubleConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = FloatDoubleConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongDoubleConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongDoubleConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mIntOctalConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = IntOctalConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongOctalConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongOctalConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mUnsignedOctalConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = UnsignedOctalConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mIntIntConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = IntIntConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongIntConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongIntConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mUnsignedIntConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = UnsignedIntConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mIntHexConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = IntHexConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mLongHexConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LongHexConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
protected final void mUnsignedHexConst(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = UnsignedHexConst;
int _saveIndex;
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
}
_returnToken = _token;
}
private static final long[] mk_tokenSet_0() {
long[] data = { 68719476736L, 576460745995190270L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
private static final long[] mk_tokenSet_1() {
long[] data = new long[8];
data[0]=-71776119061217288L;
data[1]=-72057594037927937L;
for (int i = 2; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
private static final long[] mk_tokenSet_2() {
long[] data = { 288019269919178752L, 137438953504L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
private static final long[] mk_tokenSet_3() {
long[] data = { 0L, 9031663390561856L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
private static final long[] mk_tokenSet_4() {
long[] data = { 0L, 9031388512654848L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
private static final long[] mk_tokenSet_5() {
long[] data = { 287949450930814976L, 541165879422L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
private static final long[] mk_tokenSet_6() {
long[] data = new long[8];
data[0]=-549755813896L;
for (int i = 1; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
private static final long[] mk_tokenSet_7() {
long[] data = new long[8];
data[0]=-1032L;
for (int i = 1; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
private static final long[] mk_tokenSet_8() {
long[] data = new long[8];
data[0]=-17179878408L;
data[1]=-268435457L;
for (int i = 2; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
private static final long[] mk_tokenSet_9() {
long[] data = new long[8];
data[0]=-4398046520328L;
for (int i = 1; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
private static final long[] mk_tokenSet_10() {
long[] data = { 4294971904L, 17592186044416L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());
private static final long[] mk_tokenSet_11() {
long[] data = { 288019274214150656L, 2199023255552L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11());
private static final long[] mk_tokenSet_12() {
long[] data = { 288019274214150656L, 81159763628398176L, 0L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_12 = new BitSet(mk_tokenSet_12());
private static final long[] mk_tokenSet_13() {
long[] data = new long[8];
data[0]=-9224L;
for (int i = 1; i<=3; i++) { data[i]=-1L; }
return data;
}
public static final BitSet _tokenSet_13 = new BitSet(mk_tokenSet_13());
}

View File

@ -1,4 +1,4 @@
// $ANTLR 2.7.2: "expandedWParser.g" -> "WLexer.java"$
// $ANTLR 2.7.2: "expandedWParser.g" -> "WLexer.java"$
package processing.app.preproc;
@ -6,163 +6,163 @@ import java.io.*;
import antlr.CommonAST;
import antlr.DumpASTVisitor;
public interface WLexerTokenTypes {
int EOF = 1;
int NULL_TREE_LOOKAHEAD = 3;
int LITERAL_typedef = 4;
int LITERAL_asm = 5;
int LITERAL_volatile = 6;
int LCURLY = 7;
int RCURLY = 8;
int SEMI = 9;
int LITERAL_struct = 10;
int LITERAL_union = 11;
int LITERAL_enum = 12;
int LITERAL_auto = 13;
int LITERAL_register = 14;
int LITERAL_extern = 15;
int LITERAL_static = 16;
int LITERAL_const = 17;
int LITERAL_void = 18;
int LITERAL_char = 19;
int LITERAL_short = 20;
int LITERAL_int = 21;
int LITERAL_long = 22;
int LITERAL_float = 23;
int LITERAL_double = 24;
int LITERAL_signed = 25;
int LITERAL_unsigned = 26;
int ID = 27;
int COMMA = 28;
int COLON = 29;
int ASSIGN = 30;
int STAR = 31;
int LPAREN = 32;
int RPAREN = 33;
int LBRACKET = 34;
int RBRACKET = 35;
int VARARGS = 36;
int LITERAL_while = 37;
int LITERAL_do = 38;
int LITERAL_for = 39;
int LITERAL_goto = 40;
int LITERAL_continue = 41;
int LITERAL_break = 42;
int LITERAL_return = 43;
int LITERAL_case = 44;
int LITERAL_default = 45;
int LITERAL_if = 46;
int LITERAL_else = 47;
int LITERAL_switch = 48;
int DIV_ASSIGN = 49;
int PLUS_ASSIGN = 50;
int MINUS_ASSIGN = 51;
int STAR_ASSIGN = 52;
int MOD_ASSIGN = 53;
int RSHIFT_ASSIGN = 54;
int LSHIFT_ASSIGN = 55;
int BAND_ASSIGN = 56;
int BOR_ASSIGN = 57;
int BXOR_ASSIGN = 58;
int QUESTION = 59;
int LOR = 60;
int LAND = 61;
int BOR = 62;
int BXOR = 63;
int BAND = 64;
int EQUAL = 65;
int NOT_EQUAL = 66;
int LT = 67;
int LTE = 68;
int GT = 69;
int GTE = 70;
int LSHIFT = 71;
int RSHIFT = 72;
int PLUS = 73;
int MINUS = 74;
int DIV = 75;
int MOD = 76;
int INC = 77;
int DEC = 78;
int LITERAL_sizeof = 79;
int BNOT = 80;
int LNOT = 81;
int PTR = 82;
int DOT = 83;
int CharLiteral = 84;
int StringLiteral = 85;
int IntOctalConst = 86;
int LongOctalConst = 87;
int UnsignedOctalConst = 88;
int IntIntConst = 89;
int LongIntConst = 90;
int UnsignedIntConst = 91;
int IntHexConst = 92;
int LongHexConst = 93;
int UnsignedHexConst = 94;
int FloatDoubleConst = 95;
int DoubleDoubleConst = 96;
int LongDoubleConst = 97;
int NTypedefName = 98;
int NInitDecl = 99;
int NDeclarator = 100;
int NStructDeclarator = 101;
int NDeclaration = 102;
int NCast = 103;
int NPointerGroup = 104;
int NExpressionGroup = 105;
int NFunctionCallArgs = 106;
int NNonemptyAbstractDeclarator = 107;
int NInitializer = 108;
int NStatementExpr = 109;
int NEmptyExpression = 110;
int NParameterTypeList = 111;
int NFunctionDef = 112;
int NCompoundStatement = 113;
int NParameterDeclaration = 114;
int NCommaExpr = 115;
int NUnaryExpr = 116;
int NLabel = 117;
int NPostfixExpr = 118;
int NRangeExpr = 119;
int NStringSeq = 120;
int NInitializerElementLabel = 121;
int NLcurlyInitializer = 122;
int NAsmAttribute = 123;
int NGnuAsmExpr = 124;
int NTypeMissing = 125;
int Vocabulary = 126;
int Whitespace = 127;
int Comment = 128;
int CPPComment = 129;
int PREPROC_DIRECTIVE = 130;
int Space = 131;
int LineDirective = 132;
int BadStringLiteral = 133;
int Escape = 134;
int Digit = 135;
int LongSuffix = 136;
int UnsignedSuffix = 137;
int FloatSuffix = 138;
int Exponent = 139;
int Number = 140;
int LITERAL___label__ = 141;
int LITERAL_inline = 142;
int LITERAL_byte = 143;
int LITERAL_boolean = 144;
int LITERAL_Servo = 145;
int LITERAL_Wire = 146;
int LITERAL_typeof = 147;
int LITERAL___complex = 148;
int LITERAL___attribute = 149;
int LITERAL___alignof = 150;
int LITERAL___real = 151;
int LITERAL___imag = 152;
int LITERAL___extension__ = 153;
int IntSuffix = 154;
int NumberSuffix = 155;
int IDMEAT = 156;
int WideCharLiteral = 157;
int WideStringLiteral = 158;
}
public interface WLexerTokenTypes {
int EOF = 1;
int NULL_TREE_LOOKAHEAD = 3;
int LITERAL_typedef = 4;
int LITERAL_asm = 5;
int LITERAL_volatile = 6;
int LCURLY = 7;
int RCURLY = 8;
int SEMI = 9;
int LITERAL_struct = 10;
int LITERAL_union = 11;
int LITERAL_enum = 12;
int LITERAL_auto = 13;
int LITERAL_register = 14;
int LITERAL_extern = 15;
int LITERAL_static = 16;
int LITERAL_const = 17;
int LITERAL_void = 18;
int LITERAL_char = 19;
int LITERAL_short = 20;
int LITERAL_int = 21;
int LITERAL_long = 22;
int LITERAL_float = 23;
int LITERAL_double = 24;
int LITERAL_signed = 25;
int LITERAL_unsigned = 26;
int ID = 27;
int COMMA = 28;
int COLON = 29;
int ASSIGN = 30;
int STAR = 31;
int LPAREN = 32;
int RPAREN = 33;
int LBRACKET = 34;
int RBRACKET = 35;
int VARARGS = 36;
int LITERAL_while = 37;
int LITERAL_do = 38;
int LITERAL_for = 39;
int LITERAL_goto = 40;
int LITERAL_continue = 41;
int LITERAL_break = 42;
int LITERAL_return = 43;
int LITERAL_case = 44;
int LITERAL_default = 45;
int LITERAL_if = 46;
int LITERAL_else = 47;
int LITERAL_switch = 48;
int DIV_ASSIGN = 49;
int PLUS_ASSIGN = 50;
int MINUS_ASSIGN = 51;
int STAR_ASSIGN = 52;
int MOD_ASSIGN = 53;
int RSHIFT_ASSIGN = 54;
int LSHIFT_ASSIGN = 55;
int BAND_ASSIGN = 56;
int BOR_ASSIGN = 57;
int BXOR_ASSIGN = 58;
int QUESTION = 59;
int LOR = 60;
int LAND = 61;
int BOR = 62;
int BXOR = 63;
int BAND = 64;
int EQUAL = 65;
int NOT_EQUAL = 66;
int LT = 67;
int LTE = 68;
int GT = 69;
int GTE = 70;
int LSHIFT = 71;
int RSHIFT = 72;
int PLUS = 73;
int MINUS = 74;
int DIV = 75;
int MOD = 76;
int INC = 77;
int DEC = 78;
int LITERAL_sizeof = 79;
int BNOT = 80;
int LNOT = 81;
int PTR = 82;
int DOT = 83;
int CharLiteral = 84;
int StringLiteral = 85;
int IntOctalConst = 86;
int LongOctalConst = 87;
int UnsignedOctalConst = 88;
int IntIntConst = 89;
int LongIntConst = 90;
int UnsignedIntConst = 91;
int IntHexConst = 92;
int LongHexConst = 93;
int UnsignedHexConst = 94;
int FloatDoubleConst = 95;
int DoubleDoubleConst = 96;
int LongDoubleConst = 97;
int NTypedefName = 98;
int NInitDecl = 99;
int NDeclarator = 100;
int NStructDeclarator = 101;
int NDeclaration = 102;
int NCast = 103;
int NPointerGroup = 104;
int NExpressionGroup = 105;
int NFunctionCallArgs = 106;
int NNonemptyAbstractDeclarator = 107;
int NInitializer = 108;
int NStatementExpr = 109;
int NEmptyExpression = 110;
int NParameterTypeList = 111;
int NFunctionDef = 112;
int NCompoundStatement = 113;
int NParameterDeclaration = 114;
int NCommaExpr = 115;
int NUnaryExpr = 116;
int NLabel = 117;
int NPostfixExpr = 118;
int NRangeExpr = 119;
int NStringSeq = 120;
int NInitializerElementLabel = 121;
int NLcurlyInitializer = 122;
int NAsmAttribute = 123;
int NGnuAsmExpr = 124;
int NTypeMissing = 125;
int Vocabulary = 126;
int Whitespace = 127;
int Comment = 128;
int CPPComment = 129;
int PREPROC_DIRECTIVE = 130;
int Space = 131;
int LineDirective = 132;
int BadStringLiteral = 133;
int Escape = 134;
int Digit = 135;
int LongSuffix = 136;
int UnsignedSuffix = 137;
int FloatSuffix = 138;
int Exponent = 139;
int Number = 140;
int LITERAL___label__ = 141;
int LITERAL_inline = 142;
int LITERAL_byte = 143;
int LITERAL_boolean = 144;
int LITERAL_Servo = 145;
int LITERAL_Wire = 146;
int LITERAL_typeof = 147;
int LITERAL___complex = 148;
int LITERAL___attribute = 149;
int LITERAL___alignof = 150;
int LITERAL___real = 151;
int LITERAL___imag = 152;
int LITERAL___extension__ = 153;
int IntSuffix = 154;
int NumberSuffix = 155;
int IDMEAT = 156;
int WideCharLiteral = 157;
int WideStringLiteral = 158;
}

View File

@ -1,157 +1,157 @@
// $ANTLR 2.7.2: expandedWParser.g -> WLexerTokenTypes.txt$
WLexer // output token vocab name
LITERAL_typedef="typedef"=4
LITERAL_asm="asm"=5
LITERAL_volatile="volatile"=6
LCURLY=7
RCURLY=8
SEMI=9
LITERAL_struct="struct"=10
LITERAL_union="union"=11
LITERAL_enum="enum"=12
LITERAL_auto="auto"=13
LITERAL_register="register"=14
LITERAL_extern="extern"=15
LITERAL_static="static"=16
LITERAL_const="const"=17
LITERAL_void="void"=18
LITERAL_char="char"=19
LITERAL_short="short"=20
LITERAL_int="int"=21
LITERAL_long="long"=22
LITERAL_float="float"=23
LITERAL_double="double"=24
LITERAL_signed="signed"=25
LITERAL_unsigned="unsigned"=26
ID=27
COMMA=28
COLON=29
ASSIGN=30
STAR=31
LPAREN=32
RPAREN=33
LBRACKET=34
RBRACKET=35
VARARGS=36
LITERAL_while="while"=37
LITERAL_do="do"=38
LITERAL_for="for"=39
LITERAL_goto="goto"=40
LITERAL_continue="continue"=41
LITERAL_break="break"=42
LITERAL_return="return"=43
LITERAL_case="case"=44
LITERAL_default="default"=45
LITERAL_if="if"=46
LITERAL_else="else"=47
LITERAL_switch="switch"=48
DIV_ASSIGN=49
PLUS_ASSIGN=50
MINUS_ASSIGN=51
STAR_ASSIGN=52
MOD_ASSIGN=53
RSHIFT_ASSIGN=54
LSHIFT_ASSIGN=55
BAND_ASSIGN=56
BOR_ASSIGN=57
BXOR_ASSIGN=58
QUESTION=59
LOR=60
LAND=61
BOR=62
BXOR=63
BAND=64
EQUAL=65
NOT_EQUAL=66
LT=67
LTE=68
GT=69
GTE=70
LSHIFT=71
RSHIFT=72
PLUS=73
MINUS=74
DIV=75
MOD=76
INC=77
DEC=78
LITERAL_sizeof="sizeof"=79
BNOT=80
LNOT=81
PTR=82
DOT=83
CharLiteral=84
StringLiteral=85
IntOctalConst=86
LongOctalConst=87
UnsignedOctalConst=88
IntIntConst=89
LongIntConst=90
UnsignedIntConst=91
IntHexConst=92
LongHexConst=93
UnsignedHexConst=94
FloatDoubleConst=95
DoubleDoubleConst=96
LongDoubleConst=97
NTypedefName=98
NInitDecl=99
NDeclarator=100
NStructDeclarator=101
NDeclaration=102
NCast=103
NPointerGroup=104
NExpressionGroup=105
NFunctionCallArgs=106
NNonemptyAbstractDeclarator=107
NInitializer=108
NStatementExpr=109
NEmptyExpression=110
NParameterTypeList=111
NFunctionDef=112
NCompoundStatement=113
NParameterDeclaration=114
NCommaExpr=115
NUnaryExpr=116
NLabel=117
NPostfixExpr=118
NRangeExpr=119
NStringSeq=120
NInitializerElementLabel=121
NLcurlyInitializer=122
NAsmAttribute=123
NGnuAsmExpr=124
NTypeMissing=125
Vocabulary=126
Whitespace=127
Comment=128
CPPComment=129
PREPROC_DIRECTIVE("a line directive")=130
Space=131
LineDirective=132
BadStringLiteral=133
Escape=134
Digit=135
LongSuffix=136
UnsignedSuffix=137
FloatSuffix=138
Exponent=139
Number=140
LITERAL___label__="__label__"=141
LITERAL_inline="inline"=142
LITERAL_byte="byte"=143
LITERAL_boolean="boolean"=144
LITERAL_Servo="Servo"=145
LITERAL_Wire="Wire"=146
LITERAL_typeof="typeof"=147
LITERAL___complex="__complex"=148
LITERAL___attribute="__attribute"=149
LITERAL___alignof="__alignof"=150
LITERAL___real="__real"=151
LITERAL___imag="__imag"=152
LITERAL___extension__="__extension__"=153
IntSuffix=154
NumberSuffix=155
IDMEAT=156
WideCharLiteral=157
WideStringLiteral=158
// $ANTLR 2.7.2: expandedWParser.g -> WLexerTokenTypes.txt$
WLexer // output token vocab name
LITERAL_typedef="typedef"=4
LITERAL_asm="asm"=5
LITERAL_volatile="volatile"=6
LCURLY=7
RCURLY=8
SEMI=9
LITERAL_struct="struct"=10
LITERAL_union="union"=11
LITERAL_enum="enum"=12
LITERAL_auto="auto"=13
LITERAL_register="register"=14
LITERAL_extern="extern"=15
LITERAL_static="static"=16
LITERAL_const="const"=17
LITERAL_void="void"=18
LITERAL_char="char"=19
LITERAL_short="short"=20
LITERAL_int="int"=21
LITERAL_long="long"=22
LITERAL_float="float"=23
LITERAL_double="double"=24
LITERAL_signed="signed"=25
LITERAL_unsigned="unsigned"=26
ID=27
COMMA=28
COLON=29
ASSIGN=30
STAR=31
LPAREN=32
RPAREN=33
LBRACKET=34
RBRACKET=35
VARARGS=36
LITERAL_while="while"=37
LITERAL_do="do"=38
LITERAL_for="for"=39
LITERAL_goto="goto"=40
LITERAL_continue="continue"=41
LITERAL_break="break"=42
LITERAL_return="return"=43
LITERAL_case="case"=44
LITERAL_default="default"=45
LITERAL_if="if"=46
LITERAL_else="else"=47
LITERAL_switch="switch"=48
DIV_ASSIGN=49
PLUS_ASSIGN=50
MINUS_ASSIGN=51
STAR_ASSIGN=52
MOD_ASSIGN=53
RSHIFT_ASSIGN=54
LSHIFT_ASSIGN=55
BAND_ASSIGN=56
BOR_ASSIGN=57
BXOR_ASSIGN=58
QUESTION=59
LOR=60
LAND=61
BOR=62
BXOR=63
BAND=64
EQUAL=65
NOT_EQUAL=66
LT=67
LTE=68
GT=69
GTE=70
LSHIFT=71
RSHIFT=72
PLUS=73
MINUS=74
DIV=75
MOD=76
INC=77
DEC=78
LITERAL_sizeof="sizeof"=79
BNOT=80
LNOT=81
PTR=82
DOT=83
CharLiteral=84
StringLiteral=85
IntOctalConst=86
LongOctalConst=87
UnsignedOctalConst=88
IntIntConst=89
LongIntConst=90
UnsignedIntConst=91
IntHexConst=92
LongHexConst=93
UnsignedHexConst=94
FloatDoubleConst=95
DoubleDoubleConst=96
LongDoubleConst=97
NTypedefName=98
NInitDecl=99
NDeclarator=100
NStructDeclarator=101
NDeclaration=102
NCast=103
NPointerGroup=104
NExpressionGroup=105
NFunctionCallArgs=106
NNonemptyAbstractDeclarator=107
NInitializer=108
NStatementExpr=109
NEmptyExpression=110
NParameterTypeList=111
NFunctionDef=112
NCompoundStatement=113
NParameterDeclaration=114
NCommaExpr=115
NUnaryExpr=116
NLabel=117
NPostfixExpr=118
NRangeExpr=119
NStringSeq=120
NInitializerElementLabel=121
NLcurlyInitializer=122
NAsmAttribute=123
NGnuAsmExpr=124
NTypeMissing=125
Vocabulary=126
Whitespace=127
Comment=128
CPPComment=129
PREPROC_DIRECTIVE("a line directive")=130
Space=131
LineDirective=132
BadStringLiteral=133
Escape=134
Digit=135
LongSuffix=136
UnsignedSuffix=137
FloatSuffix=138
Exponent=139
Number=140
LITERAL___label__="__label__"=141
LITERAL_inline="inline"=142
LITERAL_byte="byte"=143
LITERAL_boolean="boolean"=144
LITERAL_Servo="Servo"=145
LITERAL_Wire="Wire"=146
LITERAL_typeof="typeof"=147
LITERAL___complex="__complex"=148
LITERAL___attribute="__attribute"=149
LITERAL___alignof="__alignof"=150
LITERAL___real="__real"=151
LITERAL___imag="__imag"=152
LITERAL___extension__="__extension__"=153
IntSuffix=154
NumberSuffix=155
IDMEAT=156
WideCharLiteral=157
WideStringLiteral=158

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
// $ANTLR 2.7.2: "expandedWParser.g" -> "WLexer.java"$
// $ANTLR 2.7.2: "expandedWParser.g" -> "WLexer.java"$
package processing.app.preproc;
@ -6,157 +6,157 @@ import java.io.*;
import antlr.CommonAST;
import antlr.DumpASTVisitor;
public interface WTokenTypes {
int EOF = 1;
int NULL_TREE_LOOKAHEAD = 3;
int LITERAL_typedef = 4;
int LITERAL_asm = 5;
int LITERAL_volatile = 6;
int LCURLY = 7;
int RCURLY = 8;
int SEMI = 9;
int LITERAL_struct = 10;
int LITERAL_union = 11;
int LITERAL_enum = 12;
int LITERAL_auto = 13;
int LITERAL_register = 14;
int LITERAL_extern = 15;
int LITERAL_static = 16;
int LITERAL_const = 17;
int LITERAL_void = 18;
int LITERAL_char = 19;
int LITERAL_short = 20;
int LITERAL_int = 21;
int LITERAL_long = 22;
int LITERAL_float = 23;
int LITERAL_double = 24;
int LITERAL_signed = 25;
int LITERAL_unsigned = 26;
int ID = 27;
int COMMA = 28;
int COLON = 29;
int ASSIGN = 30;
int STAR = 31;
int LPAREN = 32;
int RPAREN = 33;
int LBRACKET = 34;
int RBRACKET = 35;
int VARARGS = 36;
int LITERAL_while = 37;
int LITERAL_do = 38;
int LITERAL_for = 39;
int LITERAL_goto = 40;
int LITERAL_continue = 41;
int LITERAL_break = 42;
int LITERAL_return = 43;
int LITERAL_case = 44;
int LITERAL_default = 45;
int LITERAL_if = 46;
int LITERAL_else = 47;
int LITERAL_switch = 48;
int DIV_ASSIGN = 49;
int PLUS_ASSIGN = 50;
int MINUS_ASSIGN = 51;
int STAR_ASSIGN = 52;
int MOD_ASSIGN = 53;
int RSHIFT_ASSIGN = 54;
int LSHIFT_ASSIGN = 55;
int BAND_ASSIGN = 56;
int BOR_ASSIGN = 57;
int BXOR_ASSIGN = 58;
int QUESTION = 59;
int LOR = 60;
int LAND = 61;
int BOR = 62;
int BXOR = 63;
int BAND = 64;
int EQUAL = 65;
int NOT_EQUAL = 66;
int LT = 67;
int LTE = 68;
int GT = 69;
int GTE = 70;
int LSHIFT = 71;
int RSHIFT = 72;
int PLUS = 73;
int MINUS = 74;
int DIV = 75;
int MOD = 76;
int INC = 77;
int DEC = 78;
int LITERAL_sizeof = 79;
int BNOT = 80;
int LNOT = 81;
int PTR = 82;
int DOT = 83;
int CharLiteral = 84;
int StringLiteral = 85;
int IntOctalConst = 86;
int LongOctalConst = 87;
int UnsignedOctalConst = 88;
int IntIntConst = 89;
int LongIntConst = 90;
int UnsignedIntConst = 91;
int IntHexConst = 92;
int LongHexConst = 93;
int UnsignedHexConst = 94;
int FloatDoubleConst = 95;
int DoubleDoubleConst = 96;
int LongDoubleConst = 97;
int NTypedefName = 98;
int NInitDecl = 99;
int NDeclarator = 100;
int NStructDeclarator = 101;
int NDeclaration = 102;
int NCast = 103;
int NPointerGroup = 104;
int NExpressionGroup = 105;
int NFunctionCallArgs = 106;
int NNonemptyAbstractDeclarator = 107;
int NInitializer = 108;
int NStatementExpr = 109;
int NEmptyExpression = 110;
int NParameterTypeList = 111;
int NFunctionDef = 112;
int NCompoundStatement = 113;
int NParameterDeclaration = 114;
int NCommaExpr = 115;
int NUnaryExpr = 116;
int NLabel = 117;
int NPostfixExpr = 118;
int NRangeExpr = 119;
int NStringSeq = 120;
int NInitializerElementLabel = 121;
int NLcurlyInitializer = 122;
int NAsmAttribute = 123;
int NGnuAsmExpr = 124;
int NTypeMissing = 125;
int Vocabulary = 126;
int Whitespace = 127;
int Comment = 128;
int CPPComment = 129;
int PREPROC_DIRECTIVE = 130;
int Space = 131;
int LineDirective = 132;
int BadStringLiteral = 133;
int Escape = 134;
int Digit = 135;
int LongSuffix = 136;
int UnsignedSuffix = 137;
int FloatSuffix = 138;
int Exponent = 139;
int Number = 140;
int LITERAL___label__ = 141;
int LITERAL_inline = 142;
int LITERAL_byte = 143;
int LITERAL_boolean = 144;
int LITERAL_Servo = 145;
int LITERAL_Wire = 146;
int LITERAL_typeof = 147;
int LITERAL___complex = 148;
int LITERAL___attribute = 149;
int LITERAL___alignof = 150;
int LITERAL___real = 151;
int LITERAL___imag = 152;
}
public interface WTokenTypes {
int EOF = 1;
int NULL_TREE_LOOKAHEAD = 3;
int LITERAL_typedef = 4;
int LITERAL_asm = 5;
int LITERAL_volatile = 6;
int LCURLY = 7;
int RCURLY = 8;
int SEMI = 9;
int LITERAL_struct = 10;
int LITERAL_union = 11;
int LITERAL_enum = 12;
int LITERAL_auto = 13;
int LITERAL_register = 14;
int LITERAL_extern = 15;
int LITERAL_static = 16;
int LITERAL_const = 17;
int LITERAL_void = 18;
int LITERAL_char = 19;
int LITERAL_short = 20;
int LITERAL_int = 21;
int LITERAL_long = 22;
int LITERAL_float = 23;
int LITERAL_double = 24;
int LITERAL_signed = 25;
int LITERAL_unsigned = 26;
int ID = 27;
int COMMA = 28;
int COLON = 29;
int ASSIGN = 30;
int STAR = 31;
int LPAREN = 32;
int RPAREN = 33;
int LBRACKET = 34;
int RBRACKET = 35;
int VARARGS = 36;
int LITERAL_while = 37;
int LITERAL_do = 38;
int LITERAL_for = 39;
int LITERAL_goto = 40;
int LITERAL_continue = 41;
int LITERAL_break = 42;
int LITERAL_return = 43;
int LITERAL_case = 44;
int LITERAL_default = 45;
int LITERAL_if = 46;
int LITERAL_else = 47;
int LITERAL_switch = 48;
int DIV_ASSIGN = 49;
int PLUS_ASSIGN = 50;
int MINUS_ASSIGN = 51;
int STAR_ASSIGN = 52;
int MOD_ASSIGN = 53;
int RSHIFT_ASSIGN = 54;
int LSHIFT_ASSIGN = 55;
int BAND_ASSIGN = 56;
int BOR_ASSIGN = 57;
int BXOR_ASSIGN = 58;
int QUESTION = 59;
int LOR = 60;
int LAND = 61;
int BOR = 62;
int BXOR = 63;
int BAND = 64;
int EQUAL = 65;
int NOT_EQUAL = 66;
int LT = 67;
int LTE = 68;
int GT = 69;
int GTE = 70;
int LSHIFT = 71;
int RSHIFT = 72;
int PLUS = 73;
int MINUS = 74;
int DIV = 75;
int MOD = 76;
int INC = 77;
int DEC = 78;
int LITERAL_sizeof = 79;
int BNOT = 80;
int LNOT = 81;
int PTR = 82;
int DOT = 83;
int CharLiteral = 84;
int StringLiteral = 85;
int IntOctalConst = 86;
int LongOctalConst = 87;
int UnsignedOctalConst = 88;
int IntIntConst = 89;
int LongIntConst = 90;
int UnsignedIntConst = 91;
int IntHexConst = 92;
int LongHexConst = 93;
int UnsignedHexConst = 94;
int FloatDoubleConst = 95;
int DoubleDoubleConst = 96;
int LongDoubleConst = 97;
int NTypedefName = 98;
int NInitDecl = 99;
int NDeclarator = 100;
int NStructDeclarator = 101;
int NDeclaration = 102;
int NCast = 103;
int NPointerGroup = 104;
int NExpressionGroup = 105;
int NFunctionCallArgs = 106;
int NNonemptyAbstractDeclarator = 107;
int NInitializer = 108;
int NStatementExpr = 109;
int NEmptyExpression = 110;
int NParameterTypeList = 111;
int NFunctionDef = 112;
int NCompoundStatement = 113;
int NParameterDeclaration = 114;
int NCommaExpr = 115;
int NUnaryExpr = 116;
int NLabel = 117;
int NPostfixExpr = 118;
int NRangeExpr = 119;
int NStringSeq = 120;
int NInitializerElementLabel = 121;
int NLcurlyInitializer = 122;
int NAsmAttribute = 123;
int NGnuAsmExpr = 124;
int NTypeMissing = 125;
int Vocabulary = 126;
int Whitespace = 127;
int Comment = 128;
int CPPComment = 129;
int PREPROC_DIRECTIVE = 130;
int Space = 131;
int LineDirective = 132;
int BadStringLiteral = 133;
int Escape = 134;
int Digit = 135;
int LongSuffix = 136;
int UnsignedSuffix = 137;
int FloatSuffix = 138;
int Exponent = 139;
int Number = 140;
int LITERAL___label__ = 141;
int LITERAL_inline = 142;
int LITERAL_byte = 143;
int LITERAL_boolean = 144;
int LITERAL_Servo = 145;
int LITERAL_Wire = 146;
int LITERAL_typeof = 147;
int LITERAL___complex = 148;
int LITERAL___attribute = 149;
int LITERAL___alignof = 150;
int LITERAL___real = 151;
int LITERAL___imag = 152;
}

View File

@ -1,151 +1,151 @@
// $ANTLR 2.7.2: expandedWParser.g -> WTokenTypes.txt$
W // output token vocab name
LITERAL_typedef="typedef"=4
LITERAL_asm="asm"=5
LITERAL_volatile="volatile"=6
LCURLY=7
RCURLY=8
SEMI=9
LITERAL_struct="struct"=10
LITERAL_union="union"=11
LITERAL_enum="enum"=12
LITERAL_auto="auto"=13
LITERAL_register="register"=14
LITERAL_extern="extern"=15
LITERAL_static="static"=16
LITERAL_const="const"=17
LITERAL_void="void"=18
LITERAL_char="char"=19
LITERAL_short="short"=20
LITERAL_int="int"=21
LITERAL_long="long"=22
LITERAL_float="float"=23
LITERAL_double="double"=24
LITERAL_signed="signed"=25
LITERAL_unsigned="unsigned"=26
ID=27
COMMA=28
COLON=29
ASSIGN=30
STAR=31
LPAREN=32
RPAREN=33
LBRACKET=34
RBRACKET=35
VARARGS=36
LITERAL_while="while"=37
LITERAL_do="do"=38
LITERAL_for="for"=39
LITERAL_goto="goto"=40
LITERAL_continue="continue"=41
LITERAL_break="break"=42
LITERAL_return="return"=43
LITERAL_case="case"=44
LITERAL_default="default"=45
LITERAL_if="if"=46
LITERAL_else="else"=47
LITERAL_switch="switch"=48
DIV_ASSIGN=49
PLUS_ASSIGN=50
MINUS_ASSIGN=51
STAR_ASSIGN=52
MOD_ASSIGN=53
RSHIFT_ASSIGN=54
LSHIFT_ASSIGN=55
BAND_ASSIGN=56
BOR_ASSIGN=57
BXOR_ASSIGN=58
QUESTION=59
LOR=60
LAND=61
BOR=62
BXOR=63
BAND=64
EQUAL=65
NOT_EQUAL=66
LT=67
LTE=68
GT=69
GTE=70
LSHIFT=71
RSHIFT=72
PLUS=73
MINUS=74
DIV=75
MOD=76
INC=77
DEC=78
LITERAL_sizeof="sizeof"=79
BNOT=80
LNOT=81
PTR=82
DOT=83
CharLiteral=84
StringLiteral=85
IntOctalConst=86
LongOctalConst=87
UnsignedOctalConst=88
IntIntConst=89
LongIntConst=90
UnsignedIntConst=91
IntHexConst=92
LongHexConst=93
UnsignedHexConst=94
FloatDoubleConst=95
DoubleDoubleConst=96
LongDoubleConst=97
NTypedefName=98
NInitDecl=99
NDeclarator=100
NStructDeclarator=101
NDeclaration=102
NCast=103
NPointerGroup=104
NExpressionGroup=105
NFunctionCallArgs=106
NNonemptyAbstractDeclarator=107
NInitializer=108
NStatementExpr=109
NEmptyExpression=110
NParameterTypeList=111
NFunctionDef=112
NCompoundStatement=113
NParameterDeclaration=114
NCommaExpr=115
NUnaryExpr=116
NLabel=117
NPostfixExpr=118
NRangeExpr=119
NStringSeq=120
NInitializerElementLabel=121
NLcurlyInitializer=122
NAsmAttribute=123
NGnuAsmExpr=124
NTypeMissing=125
Vocabulary=126
Whitespace=127
Comment=128
CPPComment=129
PREPROC_DIRECTIVE("a line directive")=130
Space=131
LineDirective=132
BadStringLiteral=133
Escape=134
Digit=135
LongSuffix=136
UnsignedSuffix=137
FloatSuffix=138
Exponent=139
Number=140
LITERAL___label__="__label__"=141
LITERAL_inline="inline"=142
LITERAL_byte="byte"=143
LITERAL_boolean="boolean"=144
LITERAL_Servo="Servo"=145
LITERAL_Wire="Wire"=146
LITERAL_typeof="typeof"=147
LITERAL___complex="__complex"=148
LITERAL___attribute="__attribute"=149
LITERAL___alignof="__alignof"=150
LITERAL___real="__real"=151
LITERAL___imag="__imag"=152
// $ANTLR 2.7.2: expandedWParser.g -> WTokenTypes.txt$
W // output token vocab name
LITERAL_typedef="typedef"=4
LITERAL_asm="asm"=5
LITERAL_volatile="volatile"=6
LCURLY=7
RCURLY=8
SEMI=9
LITERAL_struct="struct"=10
LITERAL_union="union"=11
LITERAL_enum="enum"=12
LITERAL_auto="auto"=13
LITERAL_register="register"=14
LITERAL_extern="extern"=15
LITERAL_static="static"=16
LITERAL_const="const"=17
LITERAL_void="void"=18
LITERAL_char="char"=19
LITERAL_short="short"=20
LITERAL_int="int"=21
LITERAL_long="long"=22
LITERAL_float="float"=23
LITERAL_double="double"=24
LITERAL_signed="signed"=25
LITERAL_unsigned="unsigned"=26
ID=27
COMMA=28
COLON=29
ASSIGN=30
STAR=31
LPAREN=32
RPAREN=33
LBRACKET=34
RBRACKET=35
VARARGS=36
LITERAL_while="while"=37
LITERAL_do="do"=38
LITERAL_for="for"=39
LITERAL_goto="goto"=40
LITERAL_continue="continue"=41
LITERAL_break="break"=42
LITERAL_return="return"=43
LITERAL_case="case"=44
LITERAL_default="default"=45
LITERAL_if="if"=46
LITERAL_else="else"=47
LITERAL_switch="switch"=48
DIV_ASSIGN=49
PLUS_ASSIGN=50
MINUS_ASSIGN=51
STAR_ASSIGN=52
MOD_ASSIGN=53
RSHIFT_ASSIGN=54
LSHIFT_ASSIGN=55
BAND_ASSIGN=56
BOR_ASSIGN=57
BXOR_ASSIGN=58
QUESTION=59
LOR=60
LAND=61
BOR=62
BXOR=63
BAND=64
EQUAL=65
NOT_EQUAL=66
LT=67
LTE=68
GT=69
GTE=70
LSHIFT=71
RSHIFT=72
PLUS=73
MINUS=74
DIV=75
MOD=76
INC=77
DEC=78
LITERAL_sizeof="sizeof"=79
BNOT=80
LNOT=81
PTR=82
DOT=83
CharLiteral=84
StringLiteral=85
IntOctalConst=86
LongOctalConst=87
UnsignedOctalConst=88
IntIntConst=89
LongIntConst=90
UnsignedIntConst=91
IntHexConst=92
LongHexConst=93
UnsignedHexConst=94
FloatDoubleConst=95
DoubleDoubleConst=96
LongDoubleConst=97
NTypedefName=98
NInitDecl=99
NDeclarator=100
NStructDeclarator=101
NDeclaration=102
NCast=103
NPointerGroup=104
NExpressionGroup=105
NFunctionCallArgs=106
NNonemptyAbstractDeclarator=107
NInitializer=108
NStatementExpr=109
NEmptyExpression=110
NParameterTypeList=111
NFunctionDef=112
NCompoundStatement=113
NParameterDeclaration=114
NCommaExpr=115
NUnaryExpr=116
NLabel=117
NPostfixExpr=118
NRangeExpr=119
NStringSeq=120
NInitializerElementLabel=121
NLcurlyInitializer=122
NAsmAttribute=123
NGnuAsmExpr=124
NTypeMissing=125
Vocabulary=126
Whitespace=127
Comment=128
CPPComment=129
PREPROC_DIRECTIVE("a line directive")=130
Space=131
LineDirective=132
BadStringLiteral=133
Escape=134
Digit=135
LongSuffix=136
UnsignedSuffix=137
FloatSuffix=138
Exponent=139
Number=140
LITERAL___label__="__label__"=141
LITERAL_inline="inline"=142
LITERAL_byte="byte"=143
LITERAL_boolean="boolean"=144
LITERAL_Servo="Servo"=145
LITERAL_Wire="Wire"=146
LITERAL_typeof="typeof"=147
LITERAL___complex="__complex"=148
LITERAL___attribute="__attribute"=149
LITERAL___alignof="__alignof"=150
LITERAL___real="__real"=151
LITERAL___imag="__imag"=152

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
// $ANTLR 2.7.2: "WTreeParser.g" -> "WTreeParser.java"$
// $ANTLR 2.7.2: "WTreeParser.g" -> "WTreeParser.java"$
package processing.app.preproc;
@ -6,157 +6,157 @@ import java.io.*;
import antlr.CommonAST;
import antlr.DumpASTVisitor;
public interface WTreeParserTokenTypes {
int EOF = 1;
int NULL_TREE_LOOKAHEAD = 3;
int LITERAL_typedef = 4;
int LITERAL_asm = 5;
int LITERAL_volatile = 6;
int LCURLY = 7;
int RCURLY = 8;
int SEMI = 9;
int LITERAL_struct = 10;
int LITERAL_union = 11;
int LITERAL_enum = 12;
int LITERAL_auto = 13;
int LITERAL_register = 14;
int LITERAL_extern = 15;
int LITERAL_static = 16;
int LITERAL_const = 17;
int LITERAL_void = 18;
int LITERAL_char = 19;
int LITERAL_short = 20;
int LITERAL_int = 21;
int LITERAL_long = 22;
int LITERAL_float = 23;
int LITERAL_double = 24;
int LITERAL_signed = 25;
int LITERAL_unsigned = 26;
int ID = 27;
int COMMA = 28;
int COLON = 29;
int ASSIGN = 30;
int STAR = 31;
int LPAREN = 32;
int RPAREN = 33;
int LBRACKET = 34;
int RBRACKET = 35;
int VARARGS = 36;
int LITERAL_while = 37;
int LITERAL_do = 38;
int LITERAL_for = 39;
int LITERAL_goto = 40;
int LITERAL_continue = 41;
int LITERAL_break = 42;
int LITERAL_return = 43;
int LITERAL_case = 44;
int LITERAL_default = 45;
int LITERAL_if = 46;
int LITERAL_else = 47;
int LITERAL_switch = 48;
int DIV_ASSIGN = 49;
int PLUS_ASSIGN = 50;
int MINUS_ASSIGN = 51;
int STAR_ASSIGN = 52;
int MOD_ASSIGN = 53;
int RSHIFT_ASSIGN = 54;
int LSHIFT_ASSIGN = 55;
int BAND_ASSIGN = 56;
int BOR_ASSIGN = 57;
int BXOR_ASSIGN = 58;
int QUESTION = 59;
int LOR = 60;
int LAND = 61;
int BOR = 62;
int BXOR = 63;
int BAND = 64;
int EQUAL = 65;
int NOT_EQUAL = 66;
int LT = 67;
int LTE = 68;
int GT = 69;
int GTE = 70;
int LSHIFT = 71;
int RSHIFT = 72;
int PLUS = 73;
int MINUS = 74;
int DIV = 75;
int MOD = 76;
int INC = 77;
int DEC = 78;
int LITERAL_sizeof = 79;
int BNOT = 80;
int LNOT = 81;
int PTR = 82;
int DOT = 83;
int CharLiteral = 84;
int StringLiteral = 85;
int IntOctalConst = 86;
int LongOctalConst = 87;
int UnsignedOctalConst = 88;
int IntIntConst = 89;
int LongIntConst = 90;
int UnsignedIntConst = 91;
int IntHexConst = 92;
int LongHexConst = 93;
int UnsignedHexConst = 94;
int FloatDoubleConst = 95;
int DoubleDoubleConst = 96;
int LongDoubleConst = 97;
int NTypedefName = 98;
int NInitDecl = 99;
int NDeclarator = 100;
int NStructDeclarator = 101;
int NDeclaration = 102;
int NCast = 103;
int NPointerGroup = 104;
int NExpressionGroup = 105;
int NFunctionCallArgs = 106;
int NNonemptyAbstractDeclarator = 107;
int NInitializer = 108;
int NStatementExpr = 109;
int NEmptyExpression = 110;
int NParameterTypeList = 111;
int NFunctionDef = 112;
int NCompoundStatement = 113;
int NParameterDeclaration = 114;
int NCommaExpr = 115;
int NUnaryExpr = 116;
int NLabel = 117;
int NPostfixExpr = 118;
int NRangeExpr = 119;
int NStringSeq = 120;
int NInitializerElementLabel = 121;
int NLcurlyInitializer = 122;
int NAsmAttribute = 123;
int NGnuAsmExpr = 124;
int NTypeMissing = 125;
int Vocabulary = 126;
int Whitespace = 127;
int Comment = 128;
int CPPComment = 129;
int PREPROC_DIRECTIVE = 130;
int Space = 131;
int LineDirective = 132;
int BadStringLiteral = 133;
int Escape = 134;
int Digit = 135;
int LongSuffix = 136;
int UnsignedSuffix = 137;
int FloatSuffix = 138;
int Exponent = 139;
int Number = 140;
int LITERAL___label__ = 141;
int LITERAL_inline = 142;
int LITERAL_byte = 143;
int LITERAL_boolean = 144;
int LITERAL_Servo = 145;
int LITERAL_Wire = 146;
int LITERAL_typeof = 147;
int LITERAL___complex = 148;
int LITERAL___attribute = 149;
int LITERAL___alignof = 150;
int LITERAL___real = 151;
int LITERAL___imag = 152;
}
public interface WTreeParserTokenTypes {
int EOF = 1;
int NULL_TREE_LOOKAHEAD = 3;
int LITERAL_typedef = 4;
int LITERAL_asm = 5;
int LITERAL_volatile = 6;
int LCURLY = 7;
int RCURLY = 8;
int SEMI = 9;
int LITERAL_struct = 10;
int LITERAL_union = 11;
int LITERAL_enum = 12;
int LITERAL_auto = 13;
int LITERAL_register = 14;
int LITERAL_extern = 15;
int LITERAL_static = 16;
int LITERAL_const = 17;
int LITERAL_void = 18;
int LITERAL_char = 19;
int LITERAL_short = 20;
int LITERAL_int = 21;
int LITERAL_long = 22;
int LITERAL_float = 23;
int LITERAL_double = 24;
int LITERAL_signed = 25;
int LITERAL_unsigned = 26;
int ID = 27;
int COMMA = 28;
int COLON = 29;
int ASSIGN = 30;
int STAR = 31;
int LPAREN = 32;
int RPAREN = 33;
int LBRACKET = 34;
int RBRACKET = 35;
int VARARGS = 36;
int LITERAL_while = 37;
int LITERAL_do = 38;
int LITERAL_for = 39;
int LITERAL_goto = 40;
int LITERAL_continue = 41;
int LITERAL_break = 42;
int LITERAL_return = 43;
int LITERAL_case = 44;
int LITERAL_default = 45;
int LITERAL_if = 46;
int LITERAL_else = 47;
int LITERAL_switch = 48;
int DIV_ASSIGN = 49;
int PLUS_ASSIGN = 50;
int MINUS_ASSIGN = 51;
int STAR_ASSIGN = 52;
int MOD_ASSIGN = 53;
int RSHIFT_ASSIGN = 54;
int LSHIFT_ASSIGN = 55;
int BAND_ASSIGN = 56;
int BOR_ASSIGN = 57;
int BXOR_ASSIGN = 58;
int QUESTION = 59;
int LOR = 60;
int LAND = 61;
int BOR = 62;
int BXOR = 63;
int BAND = 64;
int EQUAL = 65;
int NOT_EQUAL = 66;
int LT = 67;
int LTE = 68;
int GT = 69;
int GTE = 70;
int LSHIFT = 71;
int RSHIFT = 72;
int PLUS = 73;
int MINUS = 74;
int DIV = 75;
int MOD = 76;
int INC = 77;
int DEC = 78;
int LITERAL_sizeof = 79;
int BNOT = 80;
int LNOT = 81;
int PTR = 82;
int DOT = 83;
int CharLiteral = 84;
int StringLiteral = 85;
int IntOctalConst = 86;
int LongOctalConst = 87;
int UnsignedOctalConst = 88;
int IntIntConst = 89;
int LongIntConst = 90;
int UnsignedIntConst = 91;
int IntHexConst = 92;
int LongHexConst = 93;
int UnsignedHexConst = 94;
int FloatDoubleConst = 95;
int DoubleDoubleConst = 96;
int LongDoubleConst = 97;
int NTypedefName = 98;
int NInitDecl = 99;
int NDeclarator = 100;
int NStructDeclarator = 101;
int NDeclaration = 102;
int NCast = 103;
int NPointerGroup = 104;
int NExpressionGroup = 105;
int NFunctionCallArgs = 106;
int NNonemptyAbstractDeclarator = 107;
int NInitializer = 108;
int NStatementExpr = 109;
int NEmptyExpression = 110;
int NParameterTypeList = 111;
int NFunctionDef = 112;
int NCompoundStatement = 113;
int NParameterDeclaration = 114;
int NCommaExpr = 115;
int NUnaryExpr = 116;
int NLabel = 117;
int NPostfixExpr = 118;
int NRangeExpr = 119;
int NStringSeq = 120;
int NInitializerElementLabel = 121;
int NLcurlyInitializer = 122;
int NAsmAttribute = 123;
int NGnuAsmExpr = 124;
int NTypeMissing = 125;
int Vocabulary = 126;
int Whitespace = 127;
int Comment = 128;
int CPPComment = 129;
int PREPROC_DIRECTIVE = 130;
int Space = 131;
int LineDirective = 132;
int BadStringLiteral = 133;
int Escape = 134;
int Digit = 135;
int LongSuffix = 136;
int UnsignedSuffix = 137;
int FloatSuffix = 138;
int Exponent = 139;
int Number = 140;
int LITERAL___label__ = 141;
int LITERAL_inline = 142;
int LITERAL_byte = 143;
int LITERAL_boolean = 144;
int LITERAL_Servo = 145;
int LITERAL_Wire = 146;
int LITERAL_typeof = 147;
int LITERAL___complex = 148;
int LITERAL___attribute = 149;
int LITERAL___alignof = 150;
int LITERAL___real = 151;
int LITERAL___imag = 152;
}

View File

@ -1,151 +1,151 @@
// $ANTLR 2.7.2: WTreeParser.g -> WTreeParserTokenTypes.txt$
WTreeParser // output token vocab name
LITERAL_typedef="typedef"=4
LITERAL_asm="asm"=5
LITERAL_volatile="volatile"=6
LCURLY=7
RCURLY=8
SEMI=9
LITERAL_struct="struct"=10
LITERAL_union="union"=11
LITERAL_enum="enum"=12
LITERAL_auto="auto"=13
LITERAL_register="register"=14
LITERAL_extern="extern"=15
LITERAL_static="static"=16
LITERAL_const="const"=17
LITERAL_void="void"=18
LITERAL_char="char"=19
LITERAL_short="short"=20
LITERAL_int="int"=21
LITERAL_long="long"=22
LITERAL_float="float"=23
LITERAL_double="double"=24
LITERAL_signed="signed"=25
LITERAL_unsigned="unsigned"=26
ID=27
COMMA=28
COLON=29
ASSIGN=30
STAR=31
LPAREN=32
RPAREN=33
LBRACKET=34
RBRACKET=35
VARARGS=36
LITERAL_while="while"=37
LITERAL_do="do"=38
LITERAL_for="for"=39
LITERAL_goto="goto"=40
LITERAL_continue="continue"=41
LITERAL_break="break"=42
LITERAL_return="return"=43
LITERAL_case="case"=44
LITERAL_default="default"=45
LITERAL_if="if"=46
LITERAL_else="else"=47
LITERAL_switch="switch"=48
DIV_ASSIGN=49
PLUS_ASSIGN=50
MINUS_ASSIGN=51
STAR_ASSIGN=52
MOD_ASSIGN=53
RSHIFT_ASSIGN=54
LSHIFT_ASSIGN=55
BAND_ASSIGN=56
BOR_ASSIGN=57
BXOR_ASSIGN=58
QUESTION=59
LOR=60
LAND=61
BOR=62
BXOR=63
BAND=64
EQUAL=65
NOT_EQUAL=66
LT=67
LTE=68
GT=69
GTE=70
LSHIFT=71
RSHIFT=72
PLUS=73
MINUS=74
DIV=75
MOD=76
INC=77
DEC=78
LITERAL_sizeof="sizeof"=79
BNOT=80
LNOT=81
PTR=82
DOT=83
CharLiteral=84
StringLiteral=85
IntOctalConst=86
LongOctalConst=87
UnsignedOctalConst=88
IntIntConst=89
LongIntConst=90
UnsignedIntConst=91
IntHexConst=92
LongHexConst=93
UnsignedHexConst=94
FloatDoubleConst=95
DoubleDoubleConst=96
LongDoubleConst=97
NTypedefName=98
NInitDecl=99
NDeclarator=100
NStructDeclarator=101
NDeclaration=102
NCast=103
NPointerGroup=104
NExpressionGroup=105
NFunctionCallArgs=106
NNonemptyAbstractDeclarator=107
NInitializer=108
NStatementExpr=109
NEmptyExpression=110
NParameterTypeList=111
NFunctionDef=112
NCompoundStatement=113
NParameterDeclaration=114
NCommaExpr=115
NUnaryExpr=116
NLabel=117
NPostfixExpr=118
NRangeExpr=119
NStringSeq=120
NInitializerElementLabel=121
NLcurlyInitializer=122
NAsmAttribute=123
NGnuAsmExpr=124
NTypeMissing=125
Vocabulary=126
Whitespace=127
Comment=128
CPPComment=129
PREPROC_DIRECTIVE("a line directive")=130
Space=131
LineDirective=132
BadStringLiteral=133
Escape=134
Digit=135
LongSuffix=136
UnsignedSuffix=137
FloatSuffix=138
Exponent=139
Number=140
LITERAL___label__="__label__"=141
LITERAL_inline="inline"=142
LITERAL_byte="byte"=143
LITERAL_boolean="boolean"=144
LITERAL_Servo="Servo"=145
LITERAL_Wire="Wire"=146
LITERAL_typeof="typeof"=147
LITERAL___complex="__complex"=148
LITERAL___attribute="__attribute"=149
LITERAL___alignof="__alignof"=150
LITERAL___real="__real"=151
LITERAL___imag="__imag"=152
// $ANTLR 2.7.2: WTreeParser.g -> WTreeParserTokenTypes.txt$
WTreeParser // output token vocab name
LITERAL_typedef="typedef"=4
LITERAL_asm="asm"=5
LITERAL_volatile="volatile"=6
LCURLY=7
RCURLY=8
SEMI=9
LITERAL_struct="struct"=10
LITERAL_union="union"=11
LITERAL_enum="enum"=12
LITERAL_auto="auto"=13
LITERAL_register="register"=14
LITERAL_extern="extern"=15
LITERAL_static="static"=16
LITERAL_const="const"=17
LITERAL_void="void"=18
LITERAL_char="char"=19
LITERAL_short="short"=20
LITERAL_int="int"=21
LITERAL_long="long"=22
LITERAL_float="float"=23
LITERAL_double="double"=24
LITERAL_signed="signed"=25
LITERAL_unsigned="unsigned"=26
ID=27
COMMA=28
COLON=29
ASSIGN=30
STAR=31
LPAREN=32
RPAREN=33
LBRACKET=34
RBRACKET=35
VARARGS=36
LITERAL_while="while"=37
LITERAL_do="do"=38
LITERAL_for="for"=39
LITERAL_goto="goto"=40
LITERAL_continue="continue"=41
LITERAL_break="break"=42
LITERAL_return="return"=43
LITERAL_case="case"=44
LITERAL_default="default"=45
LITERAL_if="if"=46
LITERAL_else="else"=47
LITERAL_switch="switch"=48
DIV_ASSIGN=49
PLUS_ASSIGN=50
MINUS_ASSIGN=51
STAR_ASSIGN=52
MOD_ASSIGN=53
RSHIFT_ASSIGN=54
LSHIFT_ASSIGN=55
BAND_ASSIGN=56
BOR_ASSIGN=57
BXOR_ASSIGN=58
QUESTION=59
LOR=60
LAND=61
BOR=62
BXOR=63
BAND=64
EQUAL=65
NOT_EQUAL=66
LT=67
LTE=68
GT=69
GTE=70
LSHIFT=71
RSHIFT=72
PLUS=73
MINUS=74
DIV=75
MOD=76
INC=77
DEC=78
LITERAL_sizeof="sizeof"=79
BNOT=80
LNOT=81
PTR=82
DOT=83
CharLiteral=84
StringLiteral=85
IntOctalConst=86
LongOctalConst=87
UnsignedOctalConst=88
IntIntConst=89
LongIntConst=90
UnsignedIntConst=91
IntHexConst=92
LongHexConst=93
UnsignedHexConst=94
FloatDoubleConst=95
DoubleDoubleConst=96
LongDoubleConst=97
NTypedefName=98
NInitDecl=99
NDeclarator=100
NStructDeclarator=101
NDeclaration=102
NCast=103
NPointerGroup=104
NExpressionGroup=105
NFunctionCallArgs=106
NNonemptyAbstractDeclarator=107
NInitializer=108
NStatementExpr=109
NEmptyExpression=110
NParameterTypeList=111
NFunctionDef=112
NCompoundStatement=113
NParameterDeclaration=114
NCommaExpr=115
NUnaryExpr=116
NLabel=117
NPostfixExpr=118
NRangeExpr=119
NStringSeq=120
NInitializerElementLabel=121
NLcurlyInitializer=122
NAsmAttribute=123
NGnuAsmExpr=124
NTypeMissing=125
Vocabulary=126
Whitespace=127
Comment=128
CPPComment=129
PREPROC_DIRECTIVE("a line directive")=130
Space=131
LineDirective=132
BadStringLiteral=133
Escape=134
Digit=135
LongSuffix=136
UnsignedSuffix=137
FloatSuffix=138
Exponent=139
Number=140
LITERAL___label__="__label__"=141
LITERAL_inline="inline"=142
LITERAL_byte="byte"=143
LITERAL_boolean="boolean"=144
LITERAL_Servo="Servo"=145
LITERAL_Wire="Wire"=146
LITERAL_typeof="typeof"=147
LITERAL___complex="__complex"=148
LITERAL___attribute="__attribute"=149
LITERAL___alignof="__alignof"=150
LITERAL___real="__real"=151
LITERAL___imag="__imag"=152

View File

@ -6,17 +6,17 @@ import java.util.*;
import antlr.CommonAST;
import antlr.DumpASTVisitor;
}
class WEmitter extends TreeParser;
options {
importVocab= W;
buildAST= false;
ASTLabelType= "TNode";
codeGenMakeSwitchThreshold= 2;
codeGenBitsetTestThreshold= 3;
}
}
class WEmitter extends TreeParser;
options {
importVocab= W;
buildAST= false;
ASTLabelType= "TNode";
codeGenMakeSwitchThreshold= 2;
codeGenBitsetTestThreshold= 3;
}
{
@ -359,29 +359,29 @@ void commaSep( TNode t ) {
}
translationUnit
options {
defaultErrorHandler=false;
}
}
translationUnit
options {
defaultErrorHandler=false;
}
:{ initializePrinting(); }
( externalList )?
{ finalizePrinting(); }
;
;
externalList :( externalDef )+
;
;
externalDef :declaration
| functionDef
| asm_expr
| typelessDeclaration
| s:SEMI { print( s ); }
;
;
typelessDeclaration :#(NTypeMissing initDeclList s: SEMI) { print( s ); }
;
;
asm_expr :#( a:"asm" { print( a ); }
( v:"volatile" { print( v ); }
)?
@ -390,8 +390,8 @@ asm_expr :#( a:"asm" { print( a ); }
rc:RCURLY { tabs--; print( rc ); }
s:SEMI { print( s ); }
)
;
;
declaration :#( NDeclaration
declSpecifiers
(
@ -399,29 +399,29 @@ declaration :#( NDeclaration
)?
( s:SEMI { print( s ); } )+
)
;
;
declSpecifiers :( storageClassSpecifier
| typeQualifier
| typeSpecifier
)+
;
;
storageClassSpecifier :a:"auto" { print( a ); }
| b:"register" { print( b ); }
| c:"typedef" { print( c ); }
| functionStorageClassSpecifier
;
;
functionStorageClassSpecifier :a:"extern" { print( a ); }
| b:"static" { print( b ); }
| c:"inline" { print( c ); }
;
;
typeQualifier :a:"const" { print( a ); }
| b:"volatile" { print( b ); }
;
;
typeSpecifier :a:"void" { print( a ); }
| b:"char" { print( b ); }
| c:"short" { print( c ); }
@ -446,21 +446,21 @@ typeSpecifier :a:"void" { print( a ); }
rp:RPAREN { print( rp ); }
)
| p:"__complex" { print( p ); }
;
;
typedefName :#(NTypedefName i:ID { print( i ); } )
;
;
structSpecifier :#( a:"struct" { print( a ); }
structOrUnionBody
)
;
;
unionSpecifier :#( a:"union" { print( a ); }
structOrUnionBody
)
;
;
structOrUnionBody :( (ID LCURLY) => i1:ID lc1:LCURLY { print( i1 ); print ( "{" ); tabs++; }
( structDeclarationList )?
rc1:RCURLY { tabs--; print( rc1 ); }
@ -469,32 +469,32 @@ structOrUnionBody :( (ID LCURLY) => i1:ID lc1:LCURLY { print( i1 ); print ( "{
rc2:RCURLY { tabs--; print( rc2 ); }
| i2:ID { print( i2 ); }
)
;
;
structDeclarationList :( structDeclaration { print( ";" ); }
)+
;
;
structDeclaration :specifierQualifierList structDeclaratorList
;
;
specifierQualifierList :(
typeSpecifier
| typeQualifier
)+
;
;
structDeclaratorList :structDeclarator
( { print(","); } structDeclarator )*
;
;
structDeclarator :#( NStructDeclarator
( declarator )?
( c:COLON { print( c ); } expr )?
( attributeDecl )*
)
;
;
enumSpecifier :#( a:"enum" { print( a ); }
( i:ID { print( i ); } )?
( lc:LCURLY { print( lc ); tabs++; }
@ -502,17 +502,17 @@ enumSpecifier :#( a:"enum" { print( a ); }
rc:RCURLY { tabs--; print( rc ); }
)?
)
;
;
enumList :enumerator ( {print(",");} enumerator)*
;
;
enumerator :i:ID { print( i ); }
( b:ASSIGN { print( b ); }
expr
)?
;
;
attributeDecl :#( a:"__attribute" { print( a ); }
(b:. { print( b ); } )*
)
@ -521,13 +521,13 @@ attributeDecl :#( a:"__attribute" { print( a ); }
expr { print( ")" ); }
rp:RPAREN { print( rp ); }
)
;
;
initDeclList :initDecl
( { print( "," ); } initDecl )*
;
initDecl { String declName = ""; }
;
initDecl { String declName = ""; }
:#(NInitDecl
declarator
( attributeDecl )*
@ -537,25 +537,25 @@ initDecl { String declName = ""; }
expr
)?
)
;
;
pointerGroup :#( NPointerGroup
( a:STAR { print( a ); }
( typeQualifier )*
)+
)
;
;
idList :i:ID { print( i ); }
( c:COMMA { print( c ); }
id:ID { print( id ); }
)*
;
;
initializer :#( NInitializer (initializerElementLabel)? expr )
| lcurlyInitializer
;
;
initializerElementLabel :#( NInitializerElementLabel
(
( l:LBRACKET { print( l ); }
@ -567,18 +567,18 @@ initializerElementLabel :#( NInitializerElementLabel
| d:DOT i2:ID a2:ASSIGN { print( d ); print( i2 ); print( a2 ); }
)
)
;
;
lcurlyInitializer :#(n:NLcurlyInitializer { print( n ); tabs++; }
initializerList
rc:RCURLY { tabs--; print( rc ); }
)
;
;
initializerList :( i:initializer { commaSep( i ); }
)*
;
;
declarator :#( NDeclarator
( pointerGroup )?
@ -596,22 +596,22 @@ declarator :#( NDeclarator
| lb:LBRACKET { print( lb );} ( expr )? rb:RBRACKET { print( rb ); }
)*
)
;
;
parameterTypeList :( parameterDeclaration
( c:COMMA { print( c ); }
| s:SEMI { print( s ); }
)?
)+
( v:VARARGS { print( v ); } )?
;
;
parameterDeclaration :#( NParameterDeclaration
declSpecifiers
(declarator | nonemptyAbstractDeclarator)?
)
;
;
functionDef :#( NFunctionDef
( functionDeclSpecifiers)?
declarator
@ -620,14 +620,14 @@ functionDef :#( NFunctionDef
)*
compoundStatement
)
;
;
functionDeclSpecifiers :( functionStorageClassSpecifier
| typeQualifier
| typeSpecifier
)+
;
;
declarationList :( //ANTLR doesn't know that declarationList properly eats all the declarations
//so it warns about the ambiguity
options {
@ -636,15 +636,15 @@ declarationList :( //ANTLR doesn't know that declarationList properly eats all
localLabelDecl
| declaration
)+
;
;
localLabelDecl :#(a:"__label__" { print( a ); }
( i:ID { commaSep( i ); }
)+
{ print( ";" ); }
)
;
;
compoundStatement :#( cs:NCompoundStatement { print( cs ); tabs++; }
( declarationList
| functionDef
@ -653,14 +653,14 @@ compoundStatement :#( cs:NCompoundStatement { print( cs ); tabs++
rc:RCURLY { tabs--; print( rc ); }
)
;
;
statementList :( statement )+
;
;
statement :statementBody
;
;
statementBody :s:SEMI { print( s ); }
| compoundStatement // Group of statements
@ -738,8 +738,8 @@ statementBody :s:SEMI { print( s ); }
;
;
expr :binaryExpr
| conditionalExpr
| castExpr
@ -751,20 +751,20 @@ expr :binaryExpr
| initializer
| rangeExpr
| gnuAsmExpr
;
;
emptyExpr :NEmptyExpression
;
;
compoundStatementExpr :#(l:LPAREN { print( l ); }
compoundStatement
r:RPAREN { print( r ); }
)
;
;
rangeExpr :#(NRangeExpr expr v:VARARGS{ print( v ); } expr)
;
;
gnuAsmExpr :#(n:NGnuAsmExpr { print( n ); }
(v:"volatile" { print( v ); } )?
lp:LPAREN { print( lp ); }
@ -789,16 +789,16 @@ gnuAsmExpr :#(n:NGnuAsmExpr { print( n ); }
)?
rp:RPAREN { print( rp ); }
)
;
;
strOptExprPair :stringConst
(
l:LPAREN { print( l ); }
expr
r:RPAREN { print( r ); }
)?
;
;
binaryOperator :ASSIGN
| DIV_ASSIGN
| PLUS_ASSIGN
@ -829,8 +829,8 @@ binaryOperator :ASSIGN
| DIV
| MOD
| NCommaExpr
;
;
binaryExpr :b:binaryOperator
// no rules allowed as roots, so here I manually get
// the first and second children of the binary operator
@ -843,27 +843,27 @@ binaryExpr :b:binaryOperator
expr( e2 );
}
;
;
conditionalExpr :#( q:QUESTION
expr { print( q ); }
( expr )?
c:COLON { print( c ); }
expr
)
;
;
castExpr :#(
c:NCast { print( c ); }
typeName
rp:RPAREN { print( rp ); }
expr
)
;
;
typeName :specifierQualifierList (nonemptyAbstractDeclarator)?
;
;
nonemptyAbstractDeclarator :#( NNonemptyAbstractDeclarator
( pointerGroup
( (lp1:LPAREN { print( lp1 ); }
@ -893,8 +893,8 @@ nonemptyAbstractDeclarator :#( NNonemptyAbstractDeclarator
)+
)
)
;
;
unaryExpr :#( i:INC { print( i ); } expr )
| #( d:DEC { print( d ); } expr )
| #( NUnaryExpr u:unaryOperator { print( u ); } expr)
@ -914,8 +914,8 @@ unaryExpr :#( i:INC { print( i ); } expr )
| expr
)
)
;
;
unaryOperator :BAND
| STAR
| PLUS
@ -925,8 +925,8 @@ unaryOperator :BAND
| LAND
| "__real"
| "__imag"
;
;
postfixExpr :#( NPostfixExpr
primaryExpr
( a:PTR b:ID { print( a ); print( b ); }
@ -942,8 +942,8 @@ postfixExpr :#( NPostfixExpr
| g:DEC { print( g ); }
)+
)
;
;
primaryExpr :i:ID { print( i ); }
| n:Number { print( n ); }
| charConst
@ -957,21 +957,21 @@ primaryExpr :i:ID { print( i ); }
| #( eg:NExpressionGroup { print( eg ); }
expr { print( ")" ); }
)
;
;
argExprList :expr ( {print( "," );} expr )*
;
;
protected charConst :c:CharLiteral { print( c ); }
;
;
protected stringConst :#( NStringSeq
(
s:StringLiteral { print( s ); }
)+
)
;
;
protected intConst :IntOctalConst
| LongOctalConst
| UnsignedOctalConst
@ -981,18 +981,18 @@ protected intConst :IntOctalConst
| IntHexConst
| LongHexConst
| UnsignedHexConst
;
;
protected floatConst :FloatDoubleConst
| DoubleDoubleConst
| LongDoubleConst
;
// inherited from grammar WTreeParser
;
// inherited from grammar WTreeParser
commaExpr :#(NCommaExpr expr expr)
;
// inherited from grammar WTreeParser
;
// inherited from grammar WTreeParser
assignExpr :#( ASSIGN expr expr)
| #( DIV_ASSIGN expr expr)
| #( PLUS_ASSIGN expr expr)
@ -1004,54 +1004,54 @@ assignExpr :#( ASSIGN expr expr)
| #( BAND_ASSIGN expr expr)
| #( BOR_ASSIGN expr expr)
| #( BXOR_ASSIGN expr expr)
;
// inherited from grammar WTreeParser
;
// inherited from grammar WTreeParser
logicalOrExpr :#( LOR expr expr)
;
// inherited from grammar WTreeParser
;
// inherited from grammar WTreeParser
logicalAndExpr :#( LAND expr expr )
;
// inherited from grammar WTreeParser
;
// inherited from grammar WTreeParser
inclusiveOrExpr :#( BOR expr expr )
;
// inherited from grammar WTreeParser
;
// inherited from grammar WTreeParser
exclusiveOrExpr :#( BXOR expr expr )
;
// inherited from grammar WTreeParser
;
// inherited from grammar WTreeParser
bitAndExpr :#( BAND expr expr )
;
// inherited from grammar WTreeParser
;
// inherited from grammar WTreeParser
equalityExpr :#( EQUAL expr expr)
| #( NOT_EQUAL expr expr)
;
// inherited from grammar WTreeParser
;
// inherited from grammar WTreeParser
relationalExpr :#( LT expr expr)
| #( LTE expr expr)
| #( GT expr expr)
| #( GTE expr expr)
;
// inherited from grammar WTreeParser
;
// inherited from grammar WTreeParser
shiftExpr :#( LSHIFT expr expr)
| #( RSHIFT expr expr)
;
// inherited from grammar WTreeParser
;
// inherited from grammar WTreeParser
additiveExpr :#( PLUS expr expr)
| #( MINUS expr expr)
;
// inherited from grammar WTreeParser
;
// inherited from grammar WTreeParser
multExpr :#( STAR expr expr)
| #( DIV expr expr)
| #( MOD expr expr)
;
;

View File

@ -5,20 +5,20 @@ import java.io.*;
import antlr.CommonAST;
import antlr.DumpASTVisitor;
}
class WParser extends Parser;
options {
k= 2;
exportVocab= W;
buildAST= true;
ASTLabelType= "TNode";
defaultErrorHandler= false;
codeGenMakeSwitchThreshold= 2;
codeGenBitsetTestThreshold= 3;
importVocab=STDC;
}
}
class WParser extends Parser;
options {
k= 2;
exportVocab= W;
buildAST= true;
ASTLabelType= "TNode";
defaultErrorHandler= false;
codeGenMakeSwitchThreshold= 2;
codeGenBitsetTestThreshold= 3;
importVocab=STDC;
}
{
// Suppport C++-style single-line comments?
public static boolean CPPComments = true;
@ -125,59 +125,59 @@ options {
traceDepth -= 1;
}
}
}
translationUnit :( externalList )? /* Empty source files are allowed. */
;
;
asm_expr :"asm"^
("volatile")? LCURLY expr RCURLY ( SEMI )+
;
;
idList :ID ( options{warnWhenFollowAmbig=false;}: COMMA ID )*
;
;
externalDef :( "typedef" | declaration )=> declaration
| ( functionPrefix )=> functionDef
| typelessDeclaration
| asm_expr
| SEMI
;
functionPrefix { String declName; }
;
functionPrefix { String declName; }
:( (functionDeclSpecifiers)=> ds:functionDeclSpecifiers
| //epsilon
)
declName = d:declarator[true]
( declaration )* (VARARGS)? ( SEMI )*
LCURLY
;
typelessDeclaration { AST typeMissing = #[NTypeMissing]; }
;
typelessDeclaration { AST typeMissing = #[NTypeMissing]; }
:initDeclList[typeMissing] SEMI { ## = #( #[NTypeMissing], ##); }
;
;
initializer :( ( ( (initializerElementLabel)=> initializerElementLabel )?
( assignExpr | lcurlyInitializer ) { ## = #( #[NInitializer], ## ); }
)
| lcurlyInitializer
)
;
;
initializerElementLabel :( ( LBRACKET ((constExpr VARARGS)=> rangeExpr | constExpr) RBRACKET (ASSIGN)? )
| ID COLON
| DOT ID ASSIGN
)
{ ## = #( #[NInitializerElementLabel], ##) ; }
;
;
lcurlyInitializer :LCURLY^ (initializerList ( COMMA! )? )? RCURLY
{ ##.setType( NLcurlyInitializer ); }
;
;
initializerList :initializer ( options{warnWhenFollowAmbig=false;}:COMMA! initializer )*
;
declarator[boolean isFunctionDefinition] returns [String declName]{ declName = ""; }
;
declarator[boolean isFunctionDefinition] returns [String declName]{ declName = ""; }
:( pointerGroup )?
( id:ID { declName = id.getText(); }
@ -188,8 +188,8 @@ declarator[boolean isFunctionDefinition] returns [String declName]{ declName = "
| LBRACKET ( expr )? RBRACKET
)*
{ ## = #( #[NDeclarator], ## ); }
;
;
declaratorParamaterList[boolean isFunctionDefinition, String declName] :LPAREN^
{
if (isFunctionDefinition) {
@ -209,8 +209,8 @@ declaratorParamaterList[boolean isFunctionDefinition, String declName] :LPAREN^
( COMMA! )?
RPAREN
{ ##.setType(NParameterTypeList); }
;
;
parameterTypeList :parameterDeclaration
( options {
warnWhenFollowAmbig = false;
@ -221,8 +221,8 @@ parameterTypeList :parameterDeclaration
( ( COMMA | SEMI )
VARARGS
)?
;
;
declarationList :( options { // this loop properly aborts when
// it finds a non-typedefName ID MBZ
warnWhenFollowAmbig = false;
@ -231,14 +231,14 @@ declarationList :( options { // this loop properly aborts when
localLabelDeclaration
| ( declarationPredictor )=> declaration
)+
;
;
localLabelDeclaration :( //GNU note: any __label__ declarations must come before regular declarations.
"__label__"^ ID (options{warnWhenFollowAmbig=false;}: COMMA! ID)* ( COMMA! )? ( SEMI! )+
)
;
declaration { AST ds1 = null; }
;
declaration { AST ds1 = null; }
:ds:declSpecifiers { ds1 = astFactory.dupList(#ds); }
(
initDeclList[ds1]
@ -246,14 +246,14 @@ declaration { AST ds1 = null; }
( SEMI )+
{ ## = #( #[NDeclaration], ##); }
;
;
functionStorageClassSpecifier :"extern"
| "static"
| "inline"
;
typeSpecifier[int specCount] returns [int retSpecCount]{ retSpecCount = specCount + 1; }
;
typeSpecifier[int specCount] returns [int retSpecCount]{ retSpecCount = specCount + 1; }
:( "void"
| "char"
| "short"
@ -277,9 +277,9 @@ typeSpecifier[int specCount] returns [int retSpecCount]{ retSpecCount = specCoun
RPAREN
| "__complex"
)
;
structOrUnionSpecifier { String scopeName; }
;
structOrUnionSpecifier { String scopeName; }
:sou:structOrUnion!
( ( ID LCURLY )=> i:ID l:LCURLY
{
@ -304,36 +304,36 @@ structOrUnionSpecifier { String scopeName; }
{
## = #( #sou, ## );
}
;
;
structDeclaration :specifierQualifierList structDeclaratorList ( COMMA! )? ( SEMI! )+
;
;
structDeclaratorList :structDeclarator ( options{warnWhenFollowAmbig=false;}: COMMA! structDeclarator )*
;
;
structDeclarator :( declarator[false] )?
( COLON constExpr )?
( attributeDecl )*
{ ## = #( #[NStructDeclarator], ##); }
;
;
enumSpecifier :"enum"^
( ( ID LCURLY )=> i:ID LCURLY enumList[i.getText()] RCURLY
| LCURLY enumList["anonymous"] RCURLY
| ID
)
;
;
enumList[String enumName] :enumerator[enumName] ( options{warnWhenFollowAmbig=false;}: COMMA! enumerator[enumName] )* ( COMMA! )?
;
;
initDeclList[AST declarationSpecifiers] :initDecl[declarationSpecifiers]
( options{warnWhenFollowAmbig=false;}: COMMA! initDecl[declarationSpecifiers] )*
( COMMA! )?
;
initDecl[AST declarationSpecifiers] { String declName = ""; }
;
initDecl[AST declarationSpecifiers] { String declName = ""; }
:declName = d:declarator[false]
{ AST ds1, d1;
ds1 = astFactory.dupList(declarationSpecifiers);
@ -345,20 +345,20 @@ initDecl[AST declarationSpecifiers] { String declName = ""; }
| COLON expr
)?
{ ## = #( #[NInitDecl], ## ); }
;
;
attributeDecl :"__attribute"^ LPAREN LPAREN attributeList RPAREN RPAREN
| "asm"^ LPAREN stringConst RPAREN { ##.setType( NAsmAttribute ); }
;
;
attributeList :attribute ( options{warnWhenFollowAmbig=false;}: COMMA attribute)* ( COMMA )?
;
;
attribute :( ~(LPAREN | RPAREN | COMMA)
| LPAREN attributeList RPAREN
)*
;
;
compoundStatement[String scopeName] :LCURLY^
{
@ -375,9 +375,9 @@ compoundStatement[String scopeName] :LCURLY^
{ popScope(); }
RCURLY
{ ##.setType( NCompoundStatement ); ##.setAttribute( "scopeName", scopeName ); }
;
nestedFunctionDef { String declName; }
;
nestedFunctionDef { String declName; }
:( "auto" )? //only for nested functions
( (functionDeclSpecifiers)=> ds:functionDeclSpecifiers
)?
@ -393,8 +393,8 @@ nestedFunctionDef { String declName; }
{ popScope(); }
compoundStatement[declName]
{ ## = #( #[NFunctionDef], ## );}
;
;
statement :SEMI // Empty statements
| compoundStatement[getAScopeName()] // Group of statements
@ -439,23 +439,23 @@ statement :SEMI // Empty statements
} :
"else" statement )?
| "switch"^ LPAREN! expr RPAREN! statement
;
;
conditionalExpr :logicalOrExpr
( QUESTION^ (expr)? COLON conditionalExpr )?
;
;
rangeExpr :constExpr VARARGS constExpr
{ ## = #(#[NRangeExpr], ##); }
;
;
castExpr :( LPAREN typeName RPAREN )=>
LPAREN^ typeName RPAREN ( castExpr | lcurlyInitializer )
{ ##.setType(NCast); }
| unaryExpr
;
;
nonemptyAbstractDeclarator :(
pointerGroup
( (LPAREN
@ -478,8 +478,8 @@ nonemptyAbstractDeclarator :(
)
{ ## = #( #[NNonemptyAbstractDeclarator], ## ); }
;
;
unaryExpr :postfixExpr
| INC^ castExpr
| DEC^ castExpr
@ -494,8 +494,8 @@ unaryExpr :postfixExpr
| unaryExpr
)
| gnuAsmExpr
;
;
unaryOperator :BAND
| STAR
| PLUS
@ -505,8 +505,8 @@ unaryOperator :BAND
| LAND //for label dereference (&&label)
| "__real"
| "__imag"
;
;
gnuAsmExpr :"asm"^ ("volatile")?
LPAREN stringConst
( options { warnWhenFollowAmbig = false; }:
@ -518,11 +518,11 @@ gnuAsmExpr :"asm"^ ("volatile")?
( COLON stringConst ( COMMA stringConst)* )?
RPAREN
{ ##.setType(NGnuAsmExpr); }
;
;
strOptExprPair :stringConst ( LPAREN expr RPAREN )?
;
;
primaryExpr :ID
| Number
| charConst
@ -533,14 +533,14 @@ primaryExpr :ID
// | enumerator
| (LPAREN LCURLY) => LPAREN^ compoundStatement[getAScopeName()] RPAREN
| LPAREN^ expr RPAREN { ##.setType(NExpressionGroup); }
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
externalList :( externalDef )+
;
// inherited from grammar StdCParser
declSpecifiers { int specCount=0; }
;
// inherited from grammar StdCParser
declSpecifiers { int specCount=0; }
:( options { // this loop properly aborts when
// it finds a non-typedefName ID MBZ
warnWhenFollowAmbig = false;
@ -550,36 +550,36 @@ declSpecifiers { int specCount=0; }
| ( "struct" | "union" | "enum" | typeSpecifier[specCount] )=>
specCount = typeSpecifier[specCount]
)+
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
storageClassSpecifier :"auto"
| "register"
| "typedef"
| functionStorageClassSpecifier
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
typeQualifier :"const"
| "volatile"
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
typedefName :{ isTypedefName ( LT(1).getText() ) }?
i:ID { ## = #(#[NTypedefName], #i); }
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
structOrUnion :"struct"
| "union"
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
structDeclarationList :( structDeclaration )+
;
// inherited from grammar StdCParser
specifierQualifierList { int specCount = 0; }
;
// inherited from grammar StdCParser
specifierQualifierList { int specCount = 0; }
:( options { // this loop properly aborts when
// it finds a non-typedefName ID MBZ
warnWhenFollowAmbig = false;
@ -588,9 +588,9 @@ specifierQualifierList { int specCount = 0; }
specCount = typeSpecifier[specCount]
| typeQualifier
)+
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
enumerator[String enumName] :i:ID { symbolTable.add( i.getText(),
#( null,
#[LITERAL_enum, "enum"],
@ -599,14 +599,14 @@ enumerator[String enumName] :i:ID { symbolTable.add( i.getText()
);
}
(ASSIGN constExpr)?
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
pointerGroup :( STAR ( typeQualifier )* )+ { ## = #( #[NPointerGroup], ##); }
;
// inherited from grammar StdCParser
parameterDeclaration { String declName; }
;
// inherited from grammar StdCParser
parameterDeclaration { String declName; }
:ds:declSpecifiers
( ( declarator[false] )=> declName = d:declarator[false]
{
@ -620,10 +620,10 @@ parameterDeclaration { String declName; }
{
## = #( #[NParameterDeclaration], ## );
}
;
// inherited from grammar StdCParser
functionDef { String declName; }
;
// inherited from grammar StdCParser
functionDef { String declName; }
:( (functionDeclSpecifiers)=> ds:functionDeclSpecifiers
| //epsilon
)
@ -639,10 +639,10 @@ functionDef { String declName; }
{ popScope(); }
compoundStatement[declName]
{ ## = #( #[NFunctionDef], ## );}
;
// inherited from grammar StdCParser
functionDeclSpecifiers { int specCount = 0; }
;
// inherited from grammar StdCParser
functionDeclSpecifiers { int specCount = 0; }
:( options { // this loop properly aborts when
// it finds a non-typedefName ID MBZ
warnWhenFollowAmbig = false;
@ -652,22 +652,22 @@ functionDeclSpecifiers { int specCount = 0; }
| ( "struct" | "union" | "enum" | typeSpecifier[specCount] )=>
specCount = typeSpecifier[specCount]
)+
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
declarationPredictor :(options { //only want to look at declaration if I don't see typedef
warnWhenFollowAmbig = false;
}:
"typedef"
| declaration
)
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
statementList :( statement )+
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
expr :assignExpr (options {
/* MBZ:
COMMA is ambiguous between comma expressions and
@ -679,13 +679,13 @@ expr :assignExpr (options {
} :
c:COMMA^ { #c.setType(NCommaExpr); } assignExpr
)*
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
assignExpr :conditionalExpr ( a:assignOperator! assignExpr { ## = #( #a, ## );} )?
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
assignOperator :ASSIGN
| DIV_ASSIGN
| PLUS_ASSIGN
@ -697,69 +697,69 @@ assignOperator :ASSIGN
| BAND_ASSIGN
| BOR_ASSIGN
| BXOR_ASSIGN
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
constExpr :conditionalExpr
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
logicalOrExpr :logicalAndExpr ( LOR^ logicalAndExpr )*
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
logicalAndExpr :inclusiveOrExpr ( LAND^ inclusiveOrExpr )*
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
inclusiveOrExpr :exclusiveOrExpr ( BOR^ exclusiveOrExpr )*
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
exclusiveOrExpr :bitAndExpr ( BXOR^ bitAndExpr )*
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
bitAndExpr :equalityExpr ( BAND^ equalityExpr )*
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
equalityExpr :relationalExpr
( ( EQUAL^ | NOT_EQUAL^ ) relationalExpr )*
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
relationalExpr :shiftExpr
( ( LT^ | LTE^ | GT^ | GTE^ ) shiftExpr )*
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
shiftExpr :additiveExpr
( ( LSHIFT^ | RSHIFT^ ) additiveExpr )*
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
additiveExpr :multExpr
( ( PLUS^ | MINUS^ ) multExpr )*
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
multExpr :castExpr
( ( STAR^ | DIV^ | MOD^ ) castExpr )*
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
typeName :specifierQualifierList (nonemptyAbstractDeclarator)?
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
postfixExpr :primaryExpr
(
postfixSuffix {## = #( #[NPostfixExpr], ## );}
)?
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
postfixSuffix :( PTR ID
| DOT ID
| functionCall
@ -767,28 +767,28 @@ postfixSuffix :( PTR ID
| INC
| DEC
)+
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
functionCall :LPAREN^ (a:argExprList)? RPAREN
{
##.setType( NFunctionCallArgs );
}
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
argExprList :assignExpr ( COMMA! assignExpr )*
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
protected charConst :CharLiteral
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
protected stringConst :(StringLiteral)+ { ## = #(#[NStringSeq], ##); }
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
protected intConst :IntOctalConst
| LongOctalConst
| UnsignedOctalConst
@ -798,15 +798,15 @@ protected intConst :IntOctalConst
| IntHexConst
| LongHexConst
| UnsignedHexConst
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
protected floatConst :FloatDoubleConst
| DoubleDoubleConst
| LongDoubleConst
;
// inherited from grammar StdCParser
;
// inherited from grammar StdCParser
dummy :NTypedefName
| NInitDecl
| NDeclarator
@ -835,21 +835,21 @@ dummy :NTypedefName
| NAsmAttribute
| NGnuAsmExpr
| NTypeMissing
;
;
{
// import CToken;
import java.io.*;
// import LineObject;
import antlr.*;
}class WLexer extends Lexer;
options {
k= 3;
importVocab= W;
testLiterals= false;
}
}class WLexer extends Lexer;
options {
k= 3;
importVocab= W;
testLiterals= false;
}
tokens {
LITERAL___extension__ = "__extension__";
}
@ -948,13 +948,13 @@ tokens {
}
}
Whitespace :( ( ' ' | '\t' | '\014')
| "\r\n" { newline(); }
| ( '\n' | '\r' ) { newline(); }
) { _ttype = Token.SKIP; }
;
;
protected Escape :'\\'
( options{warnWhenFollowAmbig=false;}:
~('0'..'7' | 'x')
@ -962,8 +962,8 @@ protected Escape :'\\'
| ('4'..'7') ( options{warnWhenFollowAmbig=false;}: Digit )*
| 'x' ( options{warnWhenFollowAmbig=false;}: Digit | 'a'..'f' | 'A'..'F' )+
)
;
;
protected IntSuffix :'L'
| 'l'
| 'U'
@ -972,13 +972,13 @@ protected IntSuffix :'L'
| 'i'
| 'J'
| 'j'
;
;
protected NumberSuffix :IntSuffix
| 'F'
| 'f'
;
;
Number :( ( Digit )+ ( '.' | 'e' | 'E' ) )=> ( Digit )+
( '.' ( Digit )* ( Exponent )?
| Exponent
@ -1006,8 +1006,8 @@ Number :( ( Digit )+ ( '.' | 'e' | 'E' ) )=> ( Digit )+
| '0' ( 'x' | 'X' ) ( 'a'..'f' | 'A'..'F' | Digit )+
( IntSuffix
)*
;
;
IDMEAT :i:ID {
if ( i.getType() == LITERAL___extension__ ) {
@ -1018,24 +1018,24 @@ IDMEAT :i:ID {
}
}
;
protected ID
options {
testLiterals= true;
}
;
protected ID
options {
testLiterals= true;
}
:( 'a'..'z' | 'A'..'Z' | '_' | '$')
( 'a'..'z' | 'A'..'Z' | '_' | '$' | '0'..'9' )*
;
;
WideCharLiteral :'L' CharLiteral
{ $setType(CharLiteral); }
;
;
WideStringLiteral :'L' StringLiteral
{ $setType(StringLiteral); }
;
;
StringLiteral :'"'
( ('\\' ~('\n'))=> Escape
| ( '\r' { newline(); }
@ -1049,151 +1049,151 @@ StringLiteral :'"'
| ~( '"' | '\r' | '\n' | '\\' )
)*
'"'
;
// inherited from grammar StdCLexer
;
// inherited from grammar StdCLexer
protected Vocabulary :'\3'..'\377'
;
// inherited from grammar StdCLexer
ASSIGN :'=' ;
// inherited from grammar StdCLexer
COLON :':' ;
// inherited from grammar StdCLexer
COMMA :',' ;
// inherited from grammar StdCLexer
QUESTION :'?' ;
// inherited from grammar StdCLexer
SEMI :';' ;
// inherited from grammar StdCLexer
PTR :"->" ;
// inherited from grammar StdCLexer
protected DOT :;
// inherited from grammar StdCLexer
protected VARARGS :;
// inherited from grammar StdCLexer
LPAREN :'(' ;
// inherited from grammar StdCLexer
RPAREN :')' ;
// inherited from grammar StdCLexer
LBRACKET :'[' ;
// inherited from grammar StdCLexer
RBRACKET :']' ;
// inherited from grammar StdCLexer
LCURLY :'{' ;
// inherited from grammar StdCLexer
RCURLY :'}' ;
// inherited from grammar StdCLexer
EQUAL :"==" ;
// inherited from grammar StdCLexer
NOT_EQUAL :"!=" ;
// inherited from grammar StdCLexer
LTE :"<=" ;
// inherited from grammar StdCLexer
LT :"<" ;
// inherited from grammar StdCLexer
GTE :">=" ;
// inherited from grammar StdCLexer
GT :">" ;
// inherited from grammar StdCLexer
DIV :'/' ;
// inherited from grammar StdCLexer
DIV_ASSIGN :"/=" ;
// inherited from grammar StdCLexer
PLUS :'+' ;
// inherited from grammar StdCLexer
PLUS_ASSIGN :"+=" ;
// inherited from grammar StdCLexer
INC :"++" ;
// inherited from grammar StdCLexer
MINUS :'-' ;
// inherited from grammar StdCLexer
MINUS_ASSIGN :"-=" ;
// inherited from grammar StdCLexer
DEC :"--" ;
// inherited from grammar StdCLexer
STAR :'*' ;
// inherited from grammar StdCLexer
STAR_ASSIGN :"*=" ;
// inherited from grammar StdCLexer
MOD :'%' ;
// inherited from grammar StdCLexer
MOD_ASSIGN :"%=" ;
// inherited from grammar StdCLexer
RSHIFT :">>" ;
// inherited from grammar StdCLexer
RSHIFT_ASSIGN :">>=" ;
// inherited from grammar StdCLexer
LSHIFT :"<<" ;
// inherited from grammar StdCLexer
LSHIFT_ASSIGN :"<<=" ;
// inherited from grammar StdCLexer
LAND :"&&" ;
// inherited from grammar StdCLexer
LNOT :'!' ;
// inherited from grammar StdCLexer
LOR :"||" ;
// inherited from grammar StdCLexer
BAND :'&' ;
// inherited from grammar StdCLexer
BAND_ASSIGN :"&=" ;
// inherited from grammar StdCLexer
BNOT :'~' ;
// inherited from grammar StdCLexer
BOR :'|' ;
// inherited from grammar StdCLexer
BOR_ASSIGN :"|=" ;
// inherited from grammar StdCLexer
BXOR :'^' ;
// inherited from grammar StdCLexer
BXOR_ASSIGN :"^=" ;
// inherited from grammar StdCLexer
;
// inherited from grammar StdCLexer
ASSIGN :'=' ;
// inherited from grammar StdCLexer
COLON :':' ;
// inherited from grammar StdCLexer
COMMA :',' ;
// inherited from grammar StdCLexer
QUESTION :'?' ;
// inherited from grammar StdCLexer
SEMI :';' ;
// inherited from grammar StdCLexer
PTR :"->" ;
// inherited from grammar StdCLexer
protected DOT :;
// inherited from grammar StdCLexer
protected VARARGS :;
// inherited from grammar StdCLexer
LPAREN :'(' ;
// inherited from grammar StdCLexer
RPAREN :')' ;
// inherited from grammar StdCLexer
LBRACKET :'[' ;
// inherited from grammar StdCLexer
RBRACKET :']' ;
// inherited from grammar StdCLexer
LCURLY :'{' ;
// inherited from grammar StdCLexer
RCURLY :'}' ;
// inherited from grammar StdCLexer
EQUAL :"==" ;
// inherited from grammar StdCLexer
NOT_EQUAL :"!=" ;
// inherited from grammar StdCLexer
LTE :"<=" ;
// inherited from grammar StdCLexer
LT :"<" ;
// inherited from grammar StdCLexer
GTE :">=" ;
// inherited from grammar StdCLexer
GT :">" ;
// inherited from grammar StdCLexer
DIV :'/' ;
// inherited from grammar StdCLexer
DIV_ASSIGN :"/=" ;
// inherited from grammar StdCLexer
PLUS :'+' ;
// inherited from grammar StdCLexer
PLUS_ASSIGN :"+=" ;
// inherited from grammar StdCLexer
INC :"++" ;
// inherited from grammar StdCLexer
MINUS :'-' ;
// inherited from grammar StdCLexer
MINUS_ASSIGN :"-=" ;
// inherited from grammar StdCLexer
DEC :"--" ;
// inherited from grammar StdCLexer
STAR :'*' ;
// inherited from grammar StdCLexer
STAR_ASSIGN :"*=" ;
// inherited from grammar StdCLexer
MOD :'%' ;
// inherited from grammar StdCLexer
MOD_ASSIGN :"%=" ;
// inherited from grammar StdCLexer
RSHIFT :">>" ;
// inherited from grammar StdCLexer
RSHIFT_ASSIGN :">>=" ;
// inherited from grammar StdCLexer
LSHIFT :"<<" ;
// inherited from grammar StdCLexer
LSHIFT_ASSIGN :"<<=" ;
// inherited from grammar StdCLexer
LAND :"&&" ;
// inherited from grammar StdCLexer
LNOT :'!' ;
// inherited from grammar StdCLexer
LOR :"||" ;
// inherited from grammar StdCLexer
BAND :'&' ;
// inherited from grammar StdCLexer
BAND_ASSIGN :"&=" ;
// inherited from grammar StdCLexer
BNOT :'~' ;
// inherited from grammar StdCLexer
BOR :'|' ;
// inherited from grammar StdCLexer
BOR_ASSIGN :"|=" ;
// inherited from grammar StdCLexer
BXOR :'^' ;
// inherited from grammar StdCLexer
BXOR_ASSIGN :"^=" ;
// inherited from grammar StdCLexer
Comment :"/*"
( { LA(2) != '/' }? '*'
| "\r\n" { deferredNewline(); }
@ -1202,20 +1202,20 @@ Comment :"/*"
)*
"*/" { _ttype = Token.SKIP;
}
;
// inherited from grammar StdCLexer
;
// inherited from grammar StdCLexer
CPPComment :"//" ( ~('\n') )*
{
_ttype = Token.SKIP;
}
;
// inherited from grammar StdCLexer
PREPROC_DIRECTIVE
options {
paraphrase= "a line directive";
}
;
// inherited from grammar StdCLexer
PREPROC_DIRECTIVE
options {
paraphrase= "a line directive";
}
:'#'
( ( "line" || (( ' ' | '\t' | '\014')+ '0'..'9')) => LineDirective
| (~'\n')* { setPreprocessingDirective(getText()); }
@ -1223,17 +1223,17 @@ options {
{
_ttype = Token.SKIP;
}
;
// inherited from grammar StdCLexer
;
// inherited from grammar StdCLexer
protected Space :( ' ' | '\t' | '\014')
;
// inherited from grammar StdCLexer
;
// inherited from grammar StdCLexer
protected LineDirective {
boolean oldCountingTokens = countingTokens;
countingTokens = false;
}
}
:{
lineObject = new LineObject();
deferredLineCount = 0;
@ -1263,73 +1263,73 @@ protected LineDirective {
preprocessorInfoChannel.addLineForTokenNumber(new LineObject(lineObject), new Integer(tokenNumber));
countingTokens = oldCountingTokens;
}
;
// inherited from grammar StdCLexer
;
// inherited from grammar StdCLexer
CharLiteral :'\'' ( Escape | ~( '\'' ) ) '\''
;
// inherited from grammar StdCLexer
;
// inherited from grammar StdCLexer
protected BadStringLiteral :// Imaginary token.
;
// inherited from grammar StdCLexer
;
// inherited from grammar StdCLexer
protected Digit :'0'..'9'
;
// inherited from grammar StdCLexer
;
// inherited from grammar StdCLexer
protected LongSuffix :'l'
| 'L'
;
// inherited from grammar StdCLexer
;
// inherited from grammar StdCLexer
protected UnsignedSuffix :'u'
| 'U'
;
// inherited from grammar StdCLexer
;
// inherited from grammar StdCLexer
protected FloatSuffix :'f'
| 'F'
;
// inherited from grammar StdCLexer
;
// inherited from grammar StdCLexer
protected Exponent :( 'e' | 'E' ) ( '+' | '-' )? ( Digit )+
;
// inherited from grammar StdCLexer
protected DoubleDoubleConst :;
// inherited from grammar StdCLexer
protected FloatDoubleConst :;
// inherited from grammar StdCLexer
protected LongDoubleConst :;
// inherited from grammar StdCLexer
protected IntOctalConst :;
// inherited from grammar StdCLexer
protected LongOctalConst :;
// inherited from grammar StdCLexer
protected UnsignedOctalConst :;
// inherited from grammar StdCLexer
protected IntIntConst :;
// inherited from grammar StdCLexer
protected LongIntConst :;
// inherited from grammar StdCLexer
protected UnsignedIntConst :;
// inherited from grammar StdCLexer
protected IntHexConst :;
// inherited from grammar StdCLexer
protected LongHexConst :;
// inherited from grammar StdCLexer
protected UnsignedHexConst :;
;
// inherited from grammar StdCLexer
protected DoubleDoubleConst :;
// inherited from grammar StdCLexer
protected FloatDoubleConst :;
// inherited from grammar StdCLexer
protected LongDoubleConst :;
// inherited from grammar StdCLexer
protected IntOctalConst :;
// inherited from grammar StdCLexer
protected LongOctalConst :;
// inherited from grammar StdCLexer
protected UnsignedOctalConst :;
// inherited from grammar StdCLexer
protected IntIntConst :;
// inherited from grammar StdCLexer
protected LongIntConst :;
// inherited from grammar StdCLexer
protected UnsignedIntConst :;
// inherited from grammar StdCLexer
protected IntHexConst :;
// inherited from grammar StdCLexer
protected LongHexConst :;
// inherited from grammar StdCLexer
protected UnsignedHexConst :;

View File

@ -1,54 +0,0 @@
# Arduino Makefile (for Windows XP)
# Nick Zambetti, David A. Mellis, and D. Cuartielles
# $Id: makefile.win,v 1.10 2005/08/31 02:47:04 cuartielles Exp $
# By default, this makefile uses the serial device specified by
# Wiring (either in the Tools | Serial Port menu or the Wiring
# preferences file in the sketchbook directory) and passed as
# an argument to make. To override this value, uncomment the
# following line and change the value to the desired device.
# SERIAL=com1
# The Wiring Lite IDE runs the "compile" rule when you click the play button.
compile:
-tools/rm tmp/*
tools/cat core/wiringlite.inc > tmp/prog.c
tools/cat lib/build/*.c >> tmp/prog.c
tools/cp core/* tmp
tools/cp lib/cyg*.dll tmp
tools/gnumake -s -C tmp
# The IDE runs the "program" rule when you hit the export button.
# The string after the colon determines the method used to
# program the microcontroller: program-using-bootloader,
# program-with-isp, or program-over-parallel-port.
program: program-using-bootloader-avrdude
# This rule is for uploading code using a bootloader already on
# the microcontroller. It should run at the baud rate specified
# in the bootloader's code, current 9600 baud.
program-using-bootloader-avrdude:
tools/avrdude -p atmega8 -P ${SERIAL} -c stk500@9600 -V -q -U flash:w:tmp/prog.hex
# This rule is for uploading code using a bootloader already on
# the microcontroller. It should run at the baud rate specified
# in the bootloader's code, current 9600 baud. On Windows, use
# program-using-bootloader-avrdude instead, as uisp seems to have
# problems talking to the bootloader over the serial port (though
# it appears to work fine with a Keyspan USB-to-serial adapter).
program-using-bootloader:
# cp lib/cyg*.dll .
tools/uisp -dprog=stk500 -dspeed=9600 -dserial=${SERIAL} -dpart=ATmega8 if=tmp/prog.hex --upload
# This rule is for uploading code using an in-system programmer,
# e.g. the one sold by Atmel. In this case, you want to erase the
# microcontroller, upload the code, and then verify it.
# Atmel's isp follows the stk500 protocol and works at 115200 baud.
program-with-isp:
# cp lib/cyg*.dll .
tools/uisp -dprog=stk500 -dspeed=115200 -dserial=${SERIAL} -dpart=ATmega8 if=tmp/prog.hex --erase --upload --verify
# This rule is for uploading code using a parallel port programmer.
program-over-parallel-port:
# cp lib/cyg*.dll .
tools/uisp -dprog=dapa -dpart=ATmega8 if=tmp/prog.hex -dlpt=0x378 --erase --upload

View File

@ -1,54 +0,0 @@
# Arduino Makefile (for Windows XP)
# Nick Zambetti, David A. Mellis, and D. Cuartielles
# $Id: makefile.win,v 1.10 2005/08/31 02:47:04 cuartielles Exp $
# By default, this makefile uses the serial device specified by
# Wiring (either in the Tools | Serial Port menu or the Wiring
# preferences file in the sketchbook directory) and passed as
# an argument to make. To override this value, uncomment the
# following line and change the value to the desired device.
# SERIAL=com1
# The Wiring Lite IDE runs the "compile" rule when you click the play button.
compile:
-tools\rm tmp/*
tools\cat core/wiringlite.inc > tmp/prog.c
tools\cat lib/build/*.c >> tmp/prog.c
tools\cp core/* tmp
tools\cp lib/cyg*.dll tmp
tools\gnumake -s -C tmp
# The IDE runs the "program" rule when you hit the export button.
# The string after the colon determines the method used to
# program the microcontroller: program-using-bootloader,
# program-with-isp, or program-over-parallel-port.
program: program-using-bootloader-avrdude
# This rule is for uploading code using a bootloader already on
# the microcontroller. It should run at the baud rate specified
# in the bootloader's code, current 9600 baud.
program-using-bootloader-avrdude:
tools\avrdude -p atmega8 -P ${SERIAL} -c stk500@9600 -V -q -U flash:w:tmp/prog.hex
# This rule is for uploading code using a bootloader already on
# the microcontroller. It should run at the baud rate specified
# in the bootloader's code, current 9600 baud. On Windows, use
# program-using-bootloader-avrdude instead, as uisp seems to have
# problems talking to the bootloader over the serial port (though
# it appears to work fine with a Keyspan USB-to-serial adapter).
program-using-bootloader:
# cp lib/cyg*.dll .
tools\uisp -dprog=stk500 -dspeed=9600 -dserial=${SERIAL} -dpart=ATmega8 if=tmp/prog.hex --upload
# This rule is for uploading code using an in-system programmer,
# e.g. the one sold by Atmel. In this case, you want to erase the
# microcontroller, upload the code, and then verify it.
# Atmel's isp follows the stk500 protocol and works at 115200 baud.
program-with-isp:
# cp lib/cyg*.dll .
tools\uisp -dprog=stk500 -dspeed=115200 -dserial=${SERIAL} -dpart=ATmega8 if=tmp/prog.hex --erase --upload --verify
# This rule is for uploading code using a parallel port programmer.
program-over-parallel-port:
# cp lib/cyg*.dll .
tools\uisp -dprog=dapa -dpart=ATmega8 if=tmp/prog.hex -dlpt=0x378 --erase --upload

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 B

After

Width:  |  Height:  |  Size: 1008 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 548 B

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -17,88 +17,80 @@ echo Creating P5 distribution for revision $REVISION...
echo
# remove any old boogers
rm -rf processing
rm -rf processing-*
rm -rf arduino
rm -rf arduino-*
# use 'shared' files as starting point
cp -r ../shared processing
# add the libraries folder with source
cp -r ../../net processing/libraries/
cp -r ../../opengl processing/libraries/
cp -r ../../serial processing/libraries/
cp -r ../../video processing/libraries/
cp -r ../shared arduino
cp -r work/lib/targets arduino/lib
# new style examples thing ala reas
cd processing
unzip -q examples.zip
rm examples.zip
cd ..
# new style reference
cd processing
unzip -q reference.zip
# necessary for launching reference from shell/command prompt
# which is done internally to view reference
chmod +x reference/*.html
# needed by 'help' menu
chmod +x reference/environment/*.html
# get rid of the zip file
rm reference.zip
cd arduino
mkdir examples
unzip -d examples -q dist/examples.zip
rm dist/examples.zip
rm -rf dist
cd ..
# add java (jre) files
unzip -q -d processing jre.zip
unzip -q -d arduino jre.zip
# copy tools from work/
cp -r work/tools arduino
# directories used by the app
#mkdir processing/lib/build
#mkdir arduino/lib/build
# grab pde.jar and export from the working dir
cp work/lib/pde.jar processing/lib/
cp work/lib/core.jar processing/lib/
#cp -r work/lib/export processing/lib/
#rm -rf processing/lib/export/CVS
cp work/lib/pde.jar arduino/lib/
cp work/java/lib/rt.jar arduino/lib/
#cp work/lib/core.jar arduino/lib/
#cp -r work/lib/export arduino/lib/
#rm -rf arduino/lib/export/CVS
# get jikes and depedencies
#gunzip < dist/jikes.gz > processing/jikes.exe
cp dist/jikes.exe processing/
chmod +x processing/jikes.exe
#gunzip < dist/jikes.gz > arduino/jikes.exe
cp dist/jikes.exe arduino/
chmod +x arduino/jikes.exe
cp dist/ICE_JNIRegistry.dll processing/
chmod +x processing/ICE_JNIRegistry.dll
cp dist/ICE_JNIRegistry.dll arduino/
chmod +x arduino/ICE_JNIRegistry.dll
cp work/rxtxSerial.dll arduino/
chmod +x arduino/rxtxSerial.dll
cp work/*.dll arduino
chmod +x arduino/*.dll
# get platform-specific goodies from the dist dir
cp launcher/processing.exe processing/
cp dist/run.bat processing/
cp launcher/arduino.exe arduino/
#cp dist/run.bat arduino/
# convert notes.txt to windows LFs
# the 2> is because the app is a little chatty
unix2dos processing/revisions.txt 2> /dev/null
unix2dos processing/lib/preferences.txt 2> /dev/null
unix2dos processing/lib/keywords.txt 2> /dev/null
rm -f processing/*.bak
rm -f processing/lib/*.bak
unix2dos arduino/revisions.txt 2> /dev/null
unix2dos arduino/lib/preferences.txt 2> /dev/null
unix2dos arduino/lib/keywords.txt 2> /dev/null
rm -f arduino/*.bak
rm -f arduino/lib/*.bak
# remove boogers
find processing -name "*~" -exec rm -f {} ';'
find processing -name ".DS_Store" -exec rm -f {} ';'
find processing -name "._*" -exec rm -f {} ';'
find processing -name "Thumbs.db" -exec rm -f {} ';'
find arduino -name "*~" -exec rm -f {} ';'
find arduino -name ".DS_Store" -exec rm -f {} ';'
find arduino -name "._*" -exec rm -f {} ';'
find arduino -name "Thumbs.db" -exec rm -f {} ';'
# chmod +x the crew
find processing -name "*.dll" -exec chmod +x {} ';'
find processing -name "*.exe" -exec chmod +x {} ';'
find processing -name "*.html" -exec chmod +x {} ';'
find arduino -name "*.dll" -exec chmod +x {} ';'
find arduino -name "*.exe" -exec chmod +x {} ';'
find arduino -name "*.html" -exec chmod +x {} ';'
# clean out the cvs entries
find processing -name "CVS" -exec rm -rf {} ';' 2> /dev/null
find processing -name ".cvsignore" -exec rm -rf {} ';'
# clean out the svn entries
find arduino -name ".svn" -exec rm -rf {} ';' 2> /dev/null
# zip it all up for release
echo Packaging standard release...
echo
P5=processing-$REVISION
mv processing $P5
P5=arduino-$REVISION
mv arduino $P5
zip -rq $P5.zip $P5
# nah, keep the new directory around
#rm -rf $P5

BIN
build/windows/dist/avr_tools.zip vendored Normal file

Binary file not shown.

View File

@ -6,7 +6,7 @@ REM --- (which means 128 megabytes) to something higher.
set SAVEDCP=%CLASSPATH%
set SAVEDPATH=%PATH%
set CLASSPATH=java\lib\rt.jar;lib;lib\build;lib\pde.jar;lib\core.jar;lib\antlr.jar;lib\oro.jar;lib\registry.jar;lib\mrj.jar;%windir%\system32\qtjava.zip;%windir%\system\qtjava.zip
set CLASSPATH=java\lib\rt.jar;lib;lib\build;lib\pde.jar;lib\core.jar;lib\antlr.jar;lib\oro.jar;lib\registry.jar;lib\mrj.jar
set PATH=java\bin;%PATH%
start javaw -ms128m -mx128m processing.app.Base

BIN
build/windows/jre.zip Normal file

Binary file not shown.

View File

@ -1,9 +1,9 @@
CXXFLAGS = -mwindows -mno-cygwin -O2 -Wall
OBJS = launcher.o launcher-rc.o
processing.exe: $(OBJS)
arduino.exe: $(OBJS)
$(LINK.cc) $(CXXFLAGS) -o $@ $(OBJS)
cp processing.exe ../work/
cp arduino.exe ../work/
$(OBJS): Makefile
@ -11,4 +11,4 @@ launcher-rc.o: launcher.rc
windres -i $< -o $@
clean:
$(RM) $(OBJS) processing.exe
$(RM) $(OBJS) arduino.exe

View File

@ -12,6 +12,8 @@ else
cp -r ../shared work
rm -rf work/CVS
rm -f work/.DS_Store
cp ../../lib/*.dll work
cp dist/lib/*.dll work
# needs to make the dir because of packaging goofiness
mkdir -p work/classes/arduino/app/preproc
@ -80,7 +82,7 @@ else
# take care of the examples
mkdir work/examples
cd work/examples
cp ../shared/dist/examples.zip .
cp ../../../shared/dist/examples.zip .
echo Extracting examples ...
unzip -q -d . examples.zip
rm -f examples.zip
@ -112,12 +114,14 @@ cd app/preproc
# first build the default java goop
../../build/windows/work/java/bin/java \
-cp "..\\..\\build\\windows\\work\\lib\\antlr.jar" antlr.Tool java.g
-cp "..\\..\\build\\windows\\work\\lib\\antlr.jar" antlr.Tool StdCParser.g
# now build the pde stuff that extends the java classes
../../build/windows/work/java/bin/java \
-cp "..\\..\\build\\windows\\work\\lib\\antlr.jar" antlr.Tool \
-glib java.g pde.g
-cp "..\\..\\build\\windows\\work\\lib\\antlr.jar" antlr.Tool -glib StdCParser.g WParser.g
../../build/windows/work/java/bin/java \
-cp "..\\..\\build\\windows\\work\\lib\\antlr.jar" antlr.Tool WTreeParser.g
../../build/windows/work/java/bin/java \
-cp "..\\..\\build\\windows\\work\\lib\\antlr.jar" antlr.Tool -glib WTreeParser.g WEmitter.g
# back to base arduino dir
cd ../..
@ -127,8 +131,8 @@ fi
### -- BUILD BOOTLOADER -----------------------------------------
cd bootloader
export AVRDIR=../build/windows/work/tools/avr
make
export DIRAVR=../build/windows/work/tools/avr
make
cp ATmegaBOOT.hex ../build/windows/work/bootloader
cd ..
@ -136,13 +140,14 @@ cd ..
cd app
CLASSPATH="..\\build\\windows\\work\\lib\\RXTXcomm.jar;..\\build\\windows\\work\\lib\\core.jar;..\\build\\windows\\work\\lib\\mrj.jar;..\\build\\windows\\work\\lib\antlr.jar;..\\build\\windows\\work\\lib\\oro.jar;..\\build\\windows\\work\\lib\\registry.jar;..\\build\\windows\\work\\java\\lib\\rt.jar"
CLASSPATH="..\\build\\windows\\work\\lib\\RXTXcomm.jar;..\\build\\windows\\work\\lib\\mrj.jar;..\\build\\windows\\work\\lib\antlr.jar;..\\build\\windows\\work\\lib\\oro.jar;..\\build\\windows\\work\\lib\\registry.jar;..\\build\\windows\\work\\java\\lib\\rt.jar"
# compile the code as java 1.3, so that the application will run and
# show the user an error, rather than crapping out with some strange
# "class not found" crap
../build/windows/work/jikes -target 1.3 +D -classpath "$CLASSPATH;..\\build\\windows\\work\\classes" -d ..\\build\\windows\\work\\classes *.java preproc/*.java syntax/*.java tools/*.java
#/cygdrive/c/jdk-1.4.2_05/bin/javac.exe -classpath $CLASSPATH -d ..\\build\\windows\\work\\classes *.java jeditsyntax/*.java preprocessor/*.java
# need to do this twice because otherwise dependencies aren't resolved right.
../build/windows/work/jikes -target 1.3 +D -classpath "$CLASSPATH;..\\build\\windows\\work\\classes" -d ..\\build\\windows\\work\\classes preproc/*.java syntax/*.java tools/*.java *.java
../build/windows/work/jikes -target 1.3 +D -classpath "$CLASSPATH;..\\build\\windows\\work\\classes" -d ..\\build\\windows\\work\\classes preproc/*.java syntax/*.java tools/*.java *.java
cd ../build/windows/work/classes
rm -f ../lib/pde.jar
@ -152,27 +157,6 @@ zip -0rq ../lib/pde.jar .
cd ../..
### -- BUILD LIBRARIES ------------------------------------------------
PLATFORM=windows
CLASSPATH="..\\build\\$PLATFORM\\work\\lib\\core.jar;..\\build\\$PLATFORM\\work\\java\\lib\\rt.jar"
JIKES=../build/$PLATFORM/work/jikes
CORE="..\\build\\$PLATFORM\\work\\lib\\core.jar"
LIBRARIES="..\\build\\$PLATFORM\\work\\libraries"
# move to arduino/build
cd ..
CLASSPATH="..\\..\\build\\$PLATFORM\\work\\lib\\core.jar;..\\..\\build\\$PLATFORM\\work\\java\\lib\\rt.jar"
JIKES=../../build/$PLATFORM/work/jikes
CORE=..\\..\\build\\$PLATFORM\\work\\lib\\core.jar
LIBRARIES=..\\..\\build\\$PLATFORM\\work\\libraries
echo
echo Done.

View File

@ -1,421 +0,0 @@
# Hey Emacs, this is a -*- makefile -*-
#
# WinAVR Sample makefile written by Eric B. Weddington, Jörg Wunsch, et al.
# Released to the Public Domain
# Please read the make user manual!
#
# Additional material for this makefile was submitted by:
# Tim Henigan
# Peter Fleury
# Reiner Patommel
# Sander Pool
# Frederik Rouleau
# Markus Pfaff
#
# On command line:
#
# make all = Make software.
#
# make clean = Clean out built project files.
#
# make coff = Convert ELF to AVR COFF (for use with AVR Studio 3.x or VMLAB).
#
# make extcoff = Convert ELF to AVR Extended COFF (for use with AVR Studio
# 4.07 or greater).
#
# make program = Download the hex file to the device, using avrdude. Please
# customize the avrdude settings below first!
#
# make filename.s = Just compile filename.c into the assembler code only
#
# To rebuild project do "make clean" then "make all".
#
# MCU name
MCU = atmega8
# Output format. (can be srec, ihex, binary)
FORMAT = ihex
# Target file name (without extension).
TARGET = prog
# List C source files here. (C dependencies are automatically generated.)
#SRC = pins_arduino.c wiring.c ../avrlib/uart.c ../avrlib/buffer.c ../avrlib/timer.c ../avrlib/a2d.c $(TARGET).c
#SRC = pins_arduino.c wiring.c ../avrlib/uart.c ../avrlib/buffer.c ../avrlib/timer.c $(TARGET).c
SRC = pins_arduino.c wiring.c ../lib/avrlib/uart.c ../lib/avrlib/buffer.c ../lib/avrlib/timer.c $(TARGET).c
# List Assembler source files here.
# Make them always end in a capital .S. Files ending in a lowercase .s
# will not be considered source files but generated files (assembler
# output from the compiler), and will be deleted upon "make clean"!
# Even though the DOS/Win* filesystem matches both .s and .S the same,
# it will preserve the spelling of the filenames, and gcc itself does
# care about how the name is spelled on its command-line.
ASRC =
# Optimization level, can be [0, 1, 2, 3, s].
# 0 = turn off optimization. s = optimize for size.
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
OPT = s
# List any extra directories to look for include files here.
# Each directory must be seperated by a space.
EXTRAINCDIRS = ../lib/avrlib
# Compiler flag to set the C Standard level.
# c89 - "ANSI" C
# gnu89 - c89 plus GCC extensions
# c99 - ISO C99 standard (not yet fully implemented)
# gnu99 - c99 plus GCC extensions
CSTANDARD = -std=gnu99
# Place -D or -U options here
CDEFS = -D F_CPU=16000000L
# Place -I options here
CINCS =
# Compiler flags.
# -g: generate debugging information
# -O*: optimization level
# -f...: tuning, see GCC manual and avr-libc documentation
# -Wall...: warning level
# -Wa,...: tell GCC to pass this to the assembler.
# -adhlns...: create assembler listing
CFLAGS = -g
CFLAGS += $(CDEFS) $(CINCS)
CFLAGS += -O$(OPT)
CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
CFLAGS += -Wall -Wstrict-prototypes
CFLAGS += -Wa,-adhlns=$(<:.c=.lst)
CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
CFLAGS += $(CSTANDARD)
# Assembler flags.
# -Wa,...: tell GCC to pass this to the assembler.
# -ahlms: create listing
# -gstabs: have the assembler create line number information; note that
# for use in COFF files, additional information about filenames
# and function names needs to be present in the assembler source
# files -- see avr-libc docs [FIXME: not yet described there]
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
#Additional libraries.
# Minimalistic printf version
PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
# Floating point printf version (requires MATH_LIB = -lm below)
PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt
PRINTF_LIB =
# Minimalistic scanf version
SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min
# Floating point + %[ scanf version (requires MATH_LIB = -lm below)
SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt
SCANF_LIB =
MATH_LIB = -lm
# External memory options
# 64 KB of external RAM, starting after internal RAM (ATmega128!),
# used for variables (.data/.bss) and heap (malloc()).
#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff
# 64 KB of external RAM, starting after internal RAM (ATmega128!),
# only used for heap (malloc()).
#EXTMEMOPTS = -Wl,--defsym=__heap_start=0x801100,--defsym=__heap_end=0x80ffff
EXTMEMOPTS =
# Linker flags.
# -Wl,...: tell GCC to pass this to linker.
# -Map: create map file
# --cref: add cross reference to map file
LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
LDFLAGS += $(EXTMEMOPTS)
LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
# Programming support using avrdude. Settings and variables.
# Programming hardware: alf avr910 avrisp bascom bsd
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
#
# Type: avrdude -c ?
# to get a full listing.
#
AVRDUDE_PROGRAMMER = stk500
# com1 = serial port. Use lpt1 to connect to parallel port.
AVRDUDE_PORT = com1 # programmer connected to serial device
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
# Uncomment the following if you want avrdude's erase cycle counter.
# Note that this counter needs to be initialized first using -Yn,
# see avrdude manual.
#AVRDUDE_ERASE_COUNTER = -y
# Uncomment the following if you do /not/ wish a verification to be
# performed after programming the device.
#AVRDUDE_NO_VERIFY = -V
# Increase verbosity level. Please use this when submitting bug
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
# to submit bug reports.
#AVRDUDE_VERBOSE = -v -v
AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
# ---------------------------------------------------------------------------
# Define directories, if needed.
DIRAVR = ../tools/avr
DIRAVRBIN = $(DIRAVR)/bin
# Define programs and commands.
SHELL = sh
CC = ${DIRAVRBIN}/avr-gcc
OBJCOPY = ${DIRAVRBIN}/avr-objcopy
OBJDUMP = ${DIRAVRBIN}/avr-objdump
SIZE = ${DIRAVRBIN}/avr-size
NM = ${DIRAVRBIN}/avr-nm
AVRDUDE = avrdude
REMOVE = rm -f
COPY = cp
# Define Messages
# English
MSG_ERRORS_NONE = Errors: none
MSG_BEGIN = -------- begin --------
MSG_END = -------- end --------
MSG_SIZE_BEFORE = Size before:
MSG_SIZE_AFTER = Size after:
MSG_COFF = Converting to AVR COFF:
MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
MSG_FLASH = Creating load file for Flash:
MSG_EEPROM = Creating load file for EEPROM:
MSG_EXTENDED_LISTING = Creating Extended Listing:
MSG_SYMBOL_TABLE = Creating Symbol Table:
MSG_LINKING = Linking:
MSG_COMPILING = Compiling:
MSG_ASSEMBLING = Assembling:
MSG_CLEANING = Cleaning project:
# Define all object files.
OBJ = $(SRC:.c=.o) $(ASRC:.S=.o)
# Define all listing files.
LST = $(ASRC:.S=.lst) $(SRC:.c=.lst)
# Compiler flags to generate dependency files.
GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,dep/$(@F).d
# Combine all necessary flags and optional flags.
# Add target processor to flags.
ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
# Default target.
#all: begin gccversion sizebefore build sizeafter finished end
all: begin gccversion build finished end
build: elf hex eep lss sym
elf: $(TARGET).elf
hex: $(TARGET).hex
eep: $(TARGET).eep
lss: $(TARGET).lss
sym: $(TARGET).sym
# Eye candy.
# AVR Studio 3.x does not check make's exit code but relies on
# the following magic strings to be generated by the compile job.
begin:
@echo
@echo $(MSG_BEGIN)
finished:
@echo $(MSG_ERRORS_NONE)
end:
@echo $(MSG_END)
@echo
# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
ELFSIZE = $(SIZE) -A $(TARGET).elf
sizebefore:
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
sizeafter:
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
# Display compiler version information.
gccversion :
@$(CC) --version
# Program the device.
program: $(TARGET).hex $(TARGET).eep
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
COFFCONVERT=$(OBJCOPY) --debugging \
--change-section-address .data-0x800000 \
--change-section-address .bss-0x800000 \
--change-section-address .noinit-0x800000 \
--change-section-address .eeprom-0x810000
coff: $(TARGET).elf
@echo
@echo $(MSG_COFF) $(TARGET).cof
$(COFFCONVERT) -O coff-avr $< $(TARGET).cof
extcoff: $(TARGET).elf
@echo
@echo $(MSG_EXTENDED_COFF) $(TARGET).cof
$(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
# Create final output files (.hex, .eep) from ELF output file.
%.hex: %.elf
@echo
@echo $(MSG_FLASH) $@
$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
%.eep: %.elf
@echo
@echo $(MSG_EEPROM) $@
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
# Create extended listing file from ELF output file.
%.lss: %.elf
@echo
@echo $(MSG_EXTENDED_LISTING) $@
$(OBJDUMP) -h -S $< > $@
# Create a symbol table from ELF output file.
%.sym: %.elf
@echo
@echo $(MSG_SYMBOL_TABLE) $@
$(NM) -n $< > $@
# Link: create ELF output file from object files.
.SECONDARY : $(TARGET).elf
.PRECIOUS : $(OBJ)
%.elf: $(OBJ)
@echo
@echo $(MSG_LINKING) $@
$(CC) $(ALL_CFLAGS) $(OBJ) --output $@ $(LDFLAGS)
# Compile: create object files from C source files.
%.o : %.c
@echo
@echo $(MSG_COMPILING) $<
$(CC) -c $(ALL_CFLAGS) $< -o $@
# Compile: create assembler files from C source files.
%.s : %.c
$(CC) -S $(ALL_CFLAGS) $< -o $@
# Assemble: create object files from assembler source files.
%.o : %.S
@echo
@echo $(MSG_ASSEMBLING) $<
$(CC) -c $(ALL_ASFLAGS) $< -o $@
# Target: clean project.
clean: begin clean_list finished end
clean_list :
@echo
@echo $(MSG_CLEANING)
$(REMOVE) $(TARGET).hex
$(REMOVE) $(TARGET).eep
$(REMOVE) $(TARGET).obj
$(REMOVE) $(TARGET).cof
$(REMOVE) $(TARGET).elf
$(REMOVE) $(TARGET).map
$(REMOVE) $(TARGET).obj
$(REMOVE) $(TARGET).a90
$(REMOVE) $(TARGET).sym
$(REMOVE) $(TARGET).lnk
$(REMOVE) $(TARGET).lss
$(REMOVE) $(OBJ)
$(REMOVE) $(LST)
$(REMOVE) $(SRC:.c=.s)
$(REMOVE) $(SRC:.c=.d)
$(REMOVE) dep/*
# Include the dependency files.
-include $(shell mkdir dep 2>/dev/null) $(wildcard dep/*)
# Listing of phony targets.
.PHONY : all begin finish end sizebefore sizeafter gccversion \
build elf hex eep lss sym coff extcoff \
clean clean_list program

View File

@ -1,421 +0,0 @@
# Hey Emacs, this is a -*- makefile -*-
#
# WinAVR Sample makefile written by Eric B. Weddington, Jörg Wunsch, et al.
# Released to the Public Domain
# Please read the make user manual!
#
# Additional material for this makefile was submitted by:
# Tim Henigan
# Peter Fleury
# Reiner Patommel
# Sander Pool
# Frederik Rouleau
# Markus Pfaff
#
# On command line:
#
# make all = Make software.
#
# make clean = Clean out built project files.
#
# make coff = Convert ELF to AVR COFF (for use with AVR Studio 3.x or VMLAB).
#
# make extcoff = Convert ELF to AVR Extended COFF (for use with AVR Studio
# 4.07 or greater).
#
# make program = Download the hex file to the device, using avrdude. Please
# customize the avrdude settings below first!
#
# make filename.s = Just compile filename.c into the assembler code only
#
# To rebuild project do "make clean" then "make all".
#
# MCU name
MCU = atmega8
# Output format. (can be srec, ihex, binary)
FORMAT = ihex
# Target file name (without extension).
TARGET = prog
# List C source files here. (C dependencies are automatically generated.)
#SRC = pins_arduino.c wiring.c ../avrlib/uart.c ../avrlib/buffer.c ../avrlib/timer.c ../avrlib/a2d.c $(TARGET).c
#SRC = pins_arduino.c wiring.c ../avrlib/uart.c ../avrlib/buffer.c ../avrlib/timer.c $(TARGET).c
SRC = pins_arduino.c wiring.c ../lib/avrlib/uart.c ../lib/avrlib/buffer.c ../lib/avrlib/timer.c $(TARGET).c
# List Assembler source files here.
# Make them always end in a capital .S. Files ending in a lowercase .s
# will not be considered source files but generated files (assembler
# output from the compiler), and will be deleted upon "make clean"!
# Even though the DOS/Win* filesystem matches both .s and .S the same,
# it will preserve the spelling of the filenames, and gcc itself does
# care about how the name is spelled on its command-line.
ASRC =
# Optimization level, can be [0, 1, 2, 3, s].
# 0 = turn off optimization. s = optimize for size.
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
OPT = s
# List any extra directories to look for include files here.
# Each directory must be seperated by a space.
EXTRAINCDIRS = ../lib/avrlib
# Compiler flag to set the C Standard level.
# c89 - "ANSI" C
# gnu89 - c89 plus GCC extensions
# c99 - ISO C99 standard (not yet fully implemented)
# gnu99 - c99 plus GCC extensions
CSTANDARD = -std=gnu99
# Place -D or -U options here
CDEFS = -D F_CPU=16000000L
# Place -I options here
CINCS =
# Compiler flags.
# -g: generate debugging information
# -O*: optimization level
# -f...: tuning, see GCC manual and avr-libc documentation
# -Wall...: warning level
# -Wa,...: tell GCC to pass this to the assembler.
# -adhlns...: create assembler listing
CFLAGS = -g
CFLAGS += $(CDEFS) $(CINCS)
CFLAGS += -O$(OPT)
CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
CFLAGS += -Wall -Wstrict-prototypes
CFLAGS += -Wa,-adhlns=$(<:.c=.lst)
CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
CFLAGS += $(CSTANDARD)
# Assembler flags.
# -Wa,...: tell GCC to pass this to the assembler.
# -ahlms: create listing
# -gstabs: have the assembler create line number information; note that
# for use in COFF files, additional information about filenames
# and function names needs to be present in the assembler source
# files -- see avr-libc docs [FIXME: not yet described there]
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
#Additional libraries.
# Minimalistic printf version
PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
# Floating point printf version (requires MATH_LIB = -lm below)
PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt
PRINTF_LIB =
# Minimalistic scanf version
SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min
# Floating point + %[ scanf version (requires MATH_LIB = -lm below)
SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt
SCANF_LIB =
MATH_LIB = -lm
# External memory options
# 64 KB of external RAM, starting after internal RAM (ATmega128!),
# used for variables (.data/.bss) and heap (malloc()).
#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff
# 64 KB of external RAM, starting after internal RAM (ATmega128!),
# only used for heap (malloc()).
#EXTMEMOPTS = -Wl,--defsym=__heap_start=0x801100,--defsym=__heap_end=0x80ffff
EXTMEMOPTS =
# Linker flags.
# -Wl,...: tell GCC to pass this to linker.
# -Map: create map file
# --cref: add cross reference to map file
LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
LDFLAGS += $(EXTMEMOPTS)
LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
# Programming support using avrdude. Settings and variables.
# Programming hardware: alf avr910 avrisp bascom bsd
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
#
# Type: avrdude -c ?
# to get a full listing.
#
AVRDUDE_PROGRAMMER = stk500
# com1 = serial port. Use lpt1 to connect to parallel port.
AVRDUDE_PORT = com1 # programmer connected to serial device
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
# Uncomment the following if you want avrdude's erase cycle counter.
# Note that this counter needs to be initialized first using -Yn,
# see avrdude manual.
#AVRDUDE_ERASE_COUNTER = -y
# Uncomment the following if you do /not/ wish a verification to be
# performed after programming the device.
#AVRDUDE_NO_VERIFY = -V
# Increase verbosity level. Please use this when submitting bug
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
# to submit bug reports.
#AVRDUDE_VERBOSE = -v -v
AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
# ---------------------------------------------------------------------------
# Define directories, if needed.
DIRAVR = ..\tools\avr
DIRAVRBIN = $(DIRAVR)\bin
# Define programs and commands.
SHELL = sh
CC = ${DIRAVRBIN}\avr-gcc
OBJCOPY = ${DIRAVRBIN}\avr-objcopy
OBJDUMP = ${DIRAVRBIN}\avr-objdump
SIZE = ${DIRAVRBIN}\avr-size
NM = ${DIRAVRBIN}\avr-nm
AVRDUDE = avrdude
REMOVE = rm -f
COPY = cp
# Define Messages
# English
MSG_ERRORS_NONE = Errors: none
MSG_BEGIN = -------- begin --------
MSG_END = -------- end --------
MSG_SIZE_BEFORE = Size before:
MSG_SIZE_AFTER = Size after:
MSG_COFF = Converting to AVR COFF:
MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
MSG_FLASH = Creating load file for Flash:
MSG_EEPROM = Creating load file for EEPROM:
MSG_EXTENDED_LISTING = Creating Extended Listing:
MSG_SYMBOL_TABLE = Creating Symbol Table:
MSG_LINKING = Linking:
MSG_COMPILING = Compiling:
MSG_ASSEMBLING = Assembling:
MSG_CLEANING = Cleaning project:
# Define all object files.
OBJ = $(SRC:.c=.o) $(ASRC:.S=.o)
# Define all listing files.
LST = $(ASRC:.S=.lst) $(SRC:.c=.lst)
# Compiler flags to generate dependency files.
GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,dep/$(@F).d
# Combine all necessary flags and optional flags.
# Add target processor to flags.
ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
# Default target.
#all: begin gccversion sizebefore build sizeafter finished end
all: begin gccversion build finished end
build: elf hex eep lss sym
elf: $(TARGET).elf
hex: $(TARGET).hex
eep: $(TARGET).eep
lss: $(TARGET).lss
sym: $(TARGET).sym
# Eye candy.
# AVR Studio 3.x does not check make's exit code but relies on
# the following magic strings to be generated by the compile job.
begin:
@echo
@echo $(MSG_BEGIN)
finished:
@echo $(MSG_ERRORS_NONE)
end:
@echo $(MSG_END)
@echo
# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
ELFSIZE = $(SIZE) -A $(TARGET).elf
sizebefore:
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
sizeafter:
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
# Display compiler version information.
gccversion :
@$(CC) --version
# Program the device.
program: $(TARGET).hex $(TARGET).eep
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
COFFCONVERT=$(OBJCOPY) --debugging \
--change-section-address .data-0x800000 \
--change-section-address .bss-0x800000 \
--change-section-address .noinit-0x800000 \
--change-section-address .eeprom-0x810000
coff: $(TARGET).elf
@echo
@echo $(MSG_COFF) $(TARGET).cof
$(COFFCONVERT) -O coff-avr $< $(TARGET).cof
extcoff: $(TARGET).elf
@echo
@echo $(MSG_EXTENDED_COFF) $(TARGET).cof
$(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
# Create final output files (.hex, .eep) from ELF output file.
%.hex: %.elf
@echo
@echo $(MSG_FLASH) $@
$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
%.eep: %.elf
@echo
@echo $(MSG_EEPROM) $@
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
# Create extended listing file from ELF output file.
%.lss: %.elf
@echo
@echo $(MSG_EXTENDED_LISTING) $@
$(OBJDUMP) -h -S $< > $@
# Create a symbol table from ELF output file.
%.sym: %.elf
@echo
@echo $(MSG_SYMBOL_TABLE) $@
$(NM) -n $< > $@
# Link: create ELF output file from object files.
.SECONDARY : $(TARGET).elf
.PRECIOUS : $(OBJ)
%.elf: $(OBJ)
@echo
@echo $(MSG_LINKING) $@
$(CC) $(ALL_CFLAGS) $(OBJ) --output $@ $(LDFLAGS)
# Compile: create object files from C source files.
%.o : %.c
@echo
@echo $(MSG_COMPILING) $<
$(CC) -c $(ALL_CFLAGS) $< -o $@
# Compile: create assembler files from C source files.
%.s : %.c
$(CC) -S $(ALL_CFLAGS) $< -o $@
# Assemble: create object files from assembler source files.
%.o : %.S
@echo
@echo $(MSG_ASSEMBLING) $<
$(CC) -c $(ALL_ASFLAGS) $< -o $@
# Target: clean project.
clean: begin clean_list finished end
clean_list :
@echo
@echo $(MSG_CLEANING)
$(REMOVE) $(TARGET).hex
$(REMOVE) $(TARGET).eep
$(REMOVE) $(TARGET).obj
$(REMOVE) $(TARGET).cof
$(REMOVE) $(TARGET).elf
$(REMOVE) $(TARGET).map
$(REMOVE) $(TARGET).obj
$(REMOVE) $(TARGET).a90
$(REMOVE) $(TARGET).sym
$(REMOVE) $(TARGET).lnk
$(REMOVE) $(TARGET).lss
$(REMOVE) $(OBJ)
$(REMOVE) $(LST)
$(REMOVE) $(SRC:.c=.s)
$(REMOVE) $(SRC:.c=.d)
$(REMOVE) dep/*
# Include the dependency files.
-include $(shell mkdir dep 2>/dev/null) $(wildcard dep/*)
# Listing of phony targets.
.PHONY : all begin finish end sizebefore sizeafter gccversion \
build elf hex eep lss sym coff extcoff \
clean clean_list program