mirror of https://github.com/noisymime/Arduino.git
Trying desperately to get the Windows build working.
This commit is contained in:
parent
9e8cc277ea
commit
21fe7f0a83
|
@ -1,149 +1,149 @@
|
||||||
// $ANTLR 2.7.2: "StdCParser.g" -> "StdCLexer.java"$
|
// $ANTLR 2.7.2: "StdCParser.g" -> "StdCLexer.java"$
|
||||||
|
|
||||||
package processing.app.preproc;
|
package processing.app.preproc;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
||||||
import antlr.CommonAST;
|
import antlr.CommonAST;
|
||||||
import antlr.DumpASTVisitor;
|
import antlr.DumpASTVisitor;
|
||||||
|
|
||||||
public interface STDCTokenTypes {
|
public interface STDCTokenTypes {
|
||||||
int EOF = 1;
|
int EOF = 1;
|
||||||
int NULL_TREE_LOOKAHEAD = 3;
|
int NULL_TREE_LOOKAHEAD = 3;
|
||||||
int LITERAL_typedef = 4;
|
int LITERAL_typedef = 4;
|
||||||
int LITERAL_asm = 5;
|
int LITERAL_asm = 5;
|
||||||
int LITERAL_volatile = 6;
|
int LITERAL_volatile = 6;
|
||||||
int LCURLY = 7;
|
int LCURLY = 7;
|
||||||
int RCURLY = 8;
|
int RCURLY = 8;
|
||||||
int SEMI = 9;
|
int SEMI = 9;
|
||||||
int LITERAL_struct = 10;
|
int LITERAL_struct = 10;
|
||||||
int LITERAL_union = 11;
|
int LITERAL_union = 11;
|
||||||
int LITERAL_enum = 12;
|
int LITERAL_enum = 12;
|
||||||
int LITERAL_auto = 13;
|
int LITERAL_auto = 13;
|
||||||
int LITERAL_register = 14;
|
int LITERAL_register = 14;
|
||||||
int LITERAL_extern = 15;
|
int LITERAL_extern = 15;
|
||||||
int LITERAL_static = 16;
|
int LITERAL_static = 16;
|
||||||
int LITERAL_const = 17;
|
int LITERAL_const = 17;
|
||||||
int LITERAL_void = 18;
|
int LITERAL_void = 18;
|
||||||
int LITERAL_char = 19;
|
int LITERAL_char = 19;
|
||||||
int LITERAL_short = 20;
|
int LITERAL_short = 20;
|
||||||
int LITERAL_int = 21;
|
int LITERAL_int = 21;
|
||||||
int LITERAL_long = 22;
|
int LITERAL_long = 22;
|
||||||
int LITERAL_float = 23;
|
int LITERAL_float = 23;
|
||||||
int LITERAL_double = 24;
|
int LITERAL_double = 24;
|
||||||
int LITERAL_signed = 25;
|
int LITERAL_signed = 25;
|
||||||
int LITERAL_unsigned = 26;
|
int LITERAL_unsigned = 26;
|
||||||
int ID = 27;
|
int ID = 27;
|
||||||
int COMMA = 28;
|
int COMMA = 28;
|
||||||
int COLON = 29;
|
int COLON = 29;
|
||||||
int ASSIGN = 30;
|
int ASSIGN = 30;
|
||||||
int STAR = 31;
|
int STAR = 31;
|
||||||
int LPAREN = 32;
|
int LPAREN = 32;
|
||||||
int RPAREN = 33;
|
int RPAREN = 33;
|
||||||
int LBRACKET = 34;
|
int LBRACKET = 34;
|
||||||
int RBRACKET = 35;
|
int RBRACKET = 35;
|
||||||
int VARARGS = 36;
|
int VARARGS = 36;
|
||||||
int LITERAL_while = 37;
|
int LITERAL_while = 37;
|
||||||
int LITERAL_do = 38;
|
int LITERAL_do = 38;
|
||||||
int LITERAL_for = 39;
|
int LITERAL_for = 39;
|
||||||
int LITERAL_goto = 40;
|
int LITERAL_goto = 40;
|
||||||
int LITERAL_continue = 41;
|
int LITERAL_continue = 41;
|
||||||
int LITERAL_break = 42;
|
int LITERAL_break = 42;
|
||||||
int LITERAL_return = 43;
|
int LITERAL_return = 43;
|
||||||
int LITERAL_case = 44;
|
int LITERAL_case = 44;
|
||||||
int LITERAL_default = 45;
|
int LITERAL_default = 45;
|
||||||
int LITERAL_if = 46;
|
int LITERAL_if = 46;
|
||||||
int LITERAL_else = 47;
|
int LITERAL_else = 47;
|
||||||
int LITERAL_switch = 48;
|
int LITERAL_switch = 48;
|
||||||
int DIV_ASSIGN = 49;
|
int DIV_ASSIGN = 49;
|
||||||
int PLUS_ASSIGN = 50;
|
int PLUS_ASSIGN = 50;
|
||||||
int MINUS_ASSIGN = 51;
|
int MINUS_ASSIGN = 51;
|
||||||
int STAR_ASSIGN = 52;
|
int STAR_ASSIGN = 52;
|
||||||
int MOD_ASSIGN = 53;
|
int MOD_ASSIGN = 53;
|
||||||
int RSHIFT_ASSIGN = 54;
|
int RSHIFT_ASSIGN = 54;
|
||||||
int LSHIFT_ASSIGN = 55;
|
int LSHIFT_ASSIGN = 55;
|
||||||
int BAND_ASSIGN = 56;
|
int BAND_ASSIGN = 56;
|
||||||
int BOR_ASSIGN = 57;
|
int BOR_ASSIGN = 57;
|
||||||
int BXOR_ASSIGN = 58;
|
int BXOR_ASSIGN = 58;
|
||||||
int QUESTION = 59;
|
int QUESTION = 59;
|
||||||
int LOR = 60;
|
int LOR = 60;
|
||||||
int LAND = 61;
|
int LAND = 61;
|
||||||
int BOR = 62;
|
int BOR = 62;
|
||||||
int BXOR = 63;
|
int BXOR = 63;
|
||||||
int BAND = 64;
|
int BAND = 64;
|
||||||
int EQUAL = 65;
|
int EQUAL = 65;
|
||||||
int NOT_EQUAL = 66;
|
int NOT_EQUAL = 66;
|
||||||
int LT = 67;
|
int LT = 67;
|
||||||
int LTE = 68;
|
int LTE = 68;
|
||||||
int GT = 69;
|
int GT = 69;
|
||||||
int GTE = 70;
|
int GTE = 70;
|
||||||
int LSHIFT = 71;
|
int LSHIFT = 71;
|
||||||
int RSHIFT = 72;
|
int RSHIFT = 72;
|
||||||
int PLUS = 73;
|
int PLUS = 73;
|
||||||
int MINUS = 74;
|
int MINUS = 74;
|
||||||
int DIV = 75;
|
int DIV = 75;
|
||||||
int MOD = 76;
|
int MOD = 76;
|
||||||
int INC = 77;
|
int INC = 77;
|
||||||
int DEC = 78;
|
int DEC = 78;
|
||||||
int LITERAL_sizeof = 79;
|
int LITERAL_sizeof = 79;
|
||||||
int BNOT = 80;
|
int BNOT = 80;
|
||||||
int LNOT = 81;
|
int LNOT = 81;
|
||||||
int PTR = 82;
|
int PTR = 82;
|
||||||
int DOT = 83;
|
int DOT = 83;
|
||||||
int CharLiteral = 84;
|
int CharLiteral = 84;
|
||||||
int StringLiteral = 85;
|
int StringLiteral = 85;
|
||||||
int IntOctalConst = 86;
|
int IntOctalConst = 86;
|
||||||
int LongOctalConst = 87;
|
int LongOctalConst = 87;
|
||||||
int UnsignedOctalConst = 88;
|
int UnsignedOctalConst = 88;
|
||||||
int IntIntConst = 89;
|
int IntIntConst = 89;
|
||||||
int LongIntConst = 90;
|
int LongIntConst = 90;
|
||||||
int UnsignedIntConst = 91;
|
int UnsignedIntConst = 91;
|
||||||
int IntHexConst = 92;
|
int IntHexConst = 92;
|
||||||
int LongHexConst = 93;
|
int LongHexConst = 93;
|
||||||
int UnsignedHexConst = 94;
|
int UnsignedHexConst = 94;
|
||||||
int FloatDoubleConst = 95;
|
int FloatDoubleConst = 95;
|
||||||
int DoubleDoubleConst = 96;
|
int DoubleDoubleConst = 96;
|
||||||
int LongDoubleConst = 97;
|
int LongDoubleConst = 97;
|
||||||
int NTypedefName = 98;
|
int NTypedefName = 98;
|
||||||
int NInitDecl = 99;
|
int NInitDecl = 99;
|
||||||
int NDeclarator = 100;
|
int NDeclarator = 100;
|
||||||
int NStructDeclarator = 101;
|
int NStructDeclarator = 101;
|
||||||
int NDeclaration = 102;
|
int NDeclaration = 102;
|
||||||
int NCast = 103;
|
int NCast = 103;
|
||||||
int NPointerGroup = 104;
|
int NPointerGroup = 104;
|
||||||
int NExpressionGroup = 105;
|
int NExpressionGroup = 105;
|
||||||
int NFunctionCallArgs = 106;
|
int NFunctionCallArgs = 106;
|
||||||
int NNonemptyAbstractDeclarator = 107;
|
int NNonemptyAbstractDeclarator = 107;
|
||||||
int NInitializer = 108;
|
int NInitializer = 108;
|
||||||
int NStatementExpr = 109;
|
int NStatementExpr = 109;
|
||||||
int NEmptyExpression = 110;
|
int NEmptyExpression = 110;
|
||||||
int NParameterTypeList = 111;
|
int NParameterTypeList = 111;
|
||||||
int NFunctionDef = 112;
|
int NFunctionDef = 112;
|
||||||
int NCompoundStatement = 113;
|
int NCompoundStatement = 113;
|
||||||
int NParameterDeclaration = 114;
|
int NParameterDeclaration = 114;
|
||||||
int NCommaExpr = 115;
|
int NCommaExpr = 115;
|
||||||
int NUnaryExpr = 116;
|
int NUnaryExpr = 116;
|
||||||
int NLabel = 117;
|
int NLabel = 117;
|
||||||
int NPostfixExpr = 118;
|
int NPostfixExpr = 118;
|
||||||
int NRangeExpr = 119;
|
int NRangeExpr = 119;
|
||||||
int NStringSeq = 120;
|
int NStringSeq = 120;
|
||||||
int NInitializerElementLabel = 121;
|
int NInitializerElementLabel = 121;
|
||||||
int NLcurlyInitializer = 122;
|
int NLcurlyInitializer = 122;
|
||||||
int NAsmAttribute = 123;
|
int NAsmAttribute = 123;
|
||||||
int NGnuAsmExpr = 124;
|
int NGnuAsmExpr = 124;
|
||||||
int NTypeMissing = 125;
|
int NTypeMissing = 125;
|
||||||
int Vocabulary = 126;
|
int Vocabulary = 126;
|
||||||
int Whitespace = 127;
|
int Whitespace = 127;
|
||||||
int Comment = 128;
|
int Comment = 128;
|
||||||
int CPPComment = 129;
|
int CPPComment = 129;
|
||||||
int PREPROC_DIRECTIVE = 130;
|
int PREPROC_DIRECTIVE = 130;
|
||||||
int Space = 131;
|
int Space = 131;
|
||||||
int LineDirective = 132;
|
int LineDirective = 132;
|
||||||
int BadStringLiteral = 133;
|
int BadStringLiteral = 133;
|
||||||
int Escape = 134;
|
int Escape = 134;
|
||||||
int Digit = 135;
|
int Digit = 135;
|
||||||
int LongSuffix = 136;
|
int LongSuffix = 136;
|
||||||
int UnsignedSuffix = 137;
|
int UnsignedSuffix = 137;
|
||||||
int FloatSuffix = 138;
|
int FloatSuffix = 138;
|
||||||
int Exponent = 139;
|
int Exponent = 139;
|
||||||
int Number = 140;
|
int Number = 140;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,139 +1,139 @@
|
||||||
// $ANTLR 2.7.2: StdCParser.g -> STDCTokenTypes.txt$
|
// $ANTLR 2.7.2: StdCParser.g -> STDCTokenTypes.txt$
|
||||||
STDC // output token vocab name
|
STDC // output token vocab name
|
||||||
LITERAL_typedef="typedef"=4
|
LITERAL_typedef="typedef"=4
|
||||||
LITERAL_asm="asm"=5
|
LITERAL_asm="asm"=5
|
||||||
LITERAL_volatile="volatile"=6
|
LITERAL_volatile="volatile"=6
|
||||||
LCURLY=7
|
LCURLY=7
|
||||||
RCURLY=8
|
RCURLY=8
|
||||||
SEMI=9
|
SEMI=9
|
||||||
LITERAL_struct="struct"=10
|
LITERAL_struct="struct"=10
|
||||||
LITERAL_union="union"=11
|
LITERAL_union="union"=11
|
||||||
LITERAL_enum="enum"=12
|
LITERAL_enum="enum"=12
|
||||||
LITERAL_auto="auto"=13
|
LITERAL_auto="auto"=13
|
||||||
LITERAL_register="register"=14
|
LITERAL_register="register"=14
|
||||||
LITERAL_extern="extern"=15
|
LITERAL_extern="extern"=15
|
||||||
LITERAL_static="static"=16
|
LITERAL_static="static"=16
|
||||||
LITERAL_const="const"=17
|
LITERAL_const="const"=17
|
||||||
LITERAL_void="void"=18
|
LITERAL_void="void"=18
|
||||||
LITERAL_char="char"=19
|
LITERAL_char="char"=19
|
||||||
LITERAL_short="short"=20
|
LITERAL_short="short"=20
|
||||||
LITERAL_int="int"=21
|
LITERAL_int="int"=21
|
||||||
LITERAL_long="long"=22
|
LITERAL_long="long"=22
|
||||||
LITERAL_float="float"=23
|
LITERAL_float="float"=23
|
||||||
LITERAL_double="double"=24
|
LITERAL_double="double"=24
|
||||||
LITERAL_signed="signed"=25
|
LITERAL_signed="signed"=25
|
||||||
LITERAL_unsigned="unsigned"=26
|
LITERAL_unsigned="unsigned"=26
|
||||||
ID=27
|
ID=27
|
||||||
COMMA=28
|
COMMA=28
|
||||||
COLON=29
|
COLON=29
|
||||||
ASSIGN=30
|
ASSIGN=30
|
||||||
STAR=31
|
STAR=31
|
||||||
LPAREN=32
|
LPAREN=32
|
||||||
RPAREN=33
|
RPAREN=33
|
||||||
LBRACKET=34
|
LBRACKET=34
|
||||||
RBRACKET=35
|
RBRACKET=35
|
||||||
VARARGS=36
|
VARARGS=36
|
||||||
LITERAL_while="while"=37
|
LITERAL_while="while"=37
|
||||||
LITERAL_do="do"=38
|
LITERAL_do="do"=38
|
||||||
LITERAL_for="for"=39
|
LITERAL_for="for"=39
|
||||||
LITERAL_goto="goto"=40
|
LITERAL_goto="goto"=40
|
||||||
LITERAL_continue="continue"=41
|
LITERAL_continue="continue"=41
|
||||||
LITERAL_break="break"=42
|
LITERAL_break="break"=42
|
||||||
LITERAL_return="return"=43
|
LITERAL_return="return"=43
|
||||||
LITERAL_case="case"=44
|
LITERAL_case="case"=44
|
||||||
LITERAL_default="default"=45
|
LITERAL_default="default"=45
|
||||||
LITERAL_if="if"=46
|
LITERAL_if="if"=46
|
||||||
LITERAL_else="else"=47
|
LITERAL_else="else"=47
|
||||||
LITERAL_switch="switch"=48
|
LITERAL_switch="switch"=48
|
||||||
DIV_ASSIGN=49
|
DIV_ASSIGN=49
|
||||||
PLUS_ASSIGN=50
|
PLUS_ASSIGN=50
|
||||||
MINUS_ASSIGN=51
|
MINUS_ASSIGN=51
|
||||||
STAR_ASSIGN=52
|
STAR_ASSIGN=52
|
||||||
MOD_ASSIGN=53
|
MOD_ASSIGN=53
|
||||||
RSHIFT_ASSIGN=54
|
RSHIFT_ASSIGN=54
|
||||||
LSHIFT_ASSIGN=55
|
LSHIFT_ASSIGN=55
|
||||||
BAND_ASSIGN=56
|
BAND_ASSIGN=56
|
||||||
BOR_ASSIGN=57
|
BOR_ASSIGN=57
|
||||||
BXOR_ASSIGN=58
|
BXOR_ASSIGN=58
|
||||||
QUESTION=59
|
QUESTION=59
|
||||||
LOR=60
|
LOR=60
|
||||||
LAND=61
|
LAND=61
|
||||||
BOR=62
|
BOR=62
|
||||||
BXOR=63
|
BXOR=63
|
||||||
BAND=64
|
BAND=64
|
||||||
EQUAL=65
|
EQUAL=65
|
||||||
NOT_EQUAL=66
|
NOT_EQUAL=66
|
||||||
LT=67
|
LT=67
|
||||||
LTE=68
|
LTE=68
|
||||||
GT=69
|
GT=69
|
||||||
GTE=70
|
GTE=70
|
||||||
LSHIFT=71
|
LSHIFT=71
|
||||||
RSHIFT=72
|
RSHIFT=72
|
||||||
PLUS=73
|
PLUS=73
|
||||||
MINUS=74
|
MINUS=74
|
||||||
DIV=75
|
DIV=75
|
||||||
MOD=76
|
MOD=76
|
||||||
INC=77
|
INC=77
|
||||||
DEC=78
|
DEC=78
|
||||||
LITERAL_sizeof="sizeof"=79
|
LITERAL_sizeof="sizeof"=79
|
||||||
BNOT=80
|
BNOT=80
|
||||||
LNOT=81
|
LNOT=81
|
||||||
PTR=82
|
PTR=82
|
||||||
DOT=83
|
DOT=83
|
||||||
CharLiteral=84
|
CharLiteral=84
|
||||||
StringLiteral=85
|
StringLiteral=85
|
||||||
IntOctalConst=86
|
IntOctalConst=86
|
||||||
LongOctalConst=87
|
LongOctalConst=87
|
||||||
UnsignedOctalConst=88
|
UnsignedOctalConst=88
|
||||||
IntIntConst=89
|
IntIntConst=89
|
||||||
LongIntConst=90
|
LongIntConst=90
|
||||||
UnsignedIntConst=91
|
UnsignedIntConst=91
|
||||||
IntHexConst=92
|
IntHexConst=92
|
||||||
LongHexConst=93
|
LongHexConst=93
|
||||||
UnsignedHexConst=94
|
UnsignedHexConst=94
|
||||||
FloatDoubleConst=95
|
FloatDoubleConst=95
|
||||||
DoubleDoubleConst=96
|
DoubleDoubleConst=96
|
||||||
LongDoubleConst=97
|
LongDoubleConst=97
|
||||||
NTypedefName=98
|
NTypedefName=98
|
||||||
NInitDecl=99
|
NInitDecl=99
|
||||||
NDeclarator=100
|
NDeclarator=100
|
||||||
NStructDeclarator=101
|
NStructDeclarator=101
|
||||||
NDeclaration=102
|
NDeclaration=102
|
||||||
NCast=103
|
NCast=103
|
||||||
NPointerGroup=104
|
NPointerGroup=104
|
||||||
NExpressionGroup=105
|
NExpressionGroup=105
|
||||||
NFunctionCallArgs=106
|
NFunctionCallArgs=106
|
||||||
NNonemptyAbstractDeclarator=107
|
NNonemptyAbstractDeclarator=107
|
||||||
NInitializer=108
|
NInitializer=108
|
||||||
NStatementExpr=109
|
NStatementExpr=109
|
||||||
NEmptyExpression=110
|
NEmptyExpression=110
|
||||||
NParameterTypeList=111
|
NParameterTypeList=111
|
||||||
NFunctionDef=112
|
NFunctionDef=112
|
||||||
NCompoundStatement=113
|
NCompoundStatement=113
|
||||||
NParameterDeclaration=114
|
NParameterDeclaration=114
|
||||||
NCommaExpr=115
|
NCommaExpr=115
|
||||||
NUnaryExpr=116
|
NUnaryExpr=116
|
||||||
NLabel=117
|
NLabel=117
|
||||||
NPostfixExpr=118
|
NPostfixExpr=118
|
||||||
NRangeExpr=119
|
NRangeExpr=119
|
||||||
NStringSeq=120
|
NStringSeq=120
|
||||||
NInitializerElementLabel=121
|
NInitializerElementLabel=121
|
||||||
NLcurlyInitializer=122
|
NLcurlyInitializer=122
|
||||||
NAsmAttribute=123
|
NAsmAttribute=123
|
||||||
NGnuAsmExpr=124
|
NGnuAsmExpr=124
|
||||||
NTypeMissing=125
|
NTypeMissing=125
|
||||||
Vocabulary=126
|
Vocabulary=126
|
||||||
Whitespace=127
|
Whitespace=127
|
||||||
Comment=128
|
Comment=128
|
||||||
CPPComment=129
|
CPPComment=129
|
||||||
PREPROC_DIRECTIVE("a line directive")=130
|
PREPROC_DIRECTIVE("a line directive")=130
|
||||||
Space=131
|
Space=131
|
||||||
LineDirective=132
|
LineDirective=132
|
||||||
BadStringLiteral=133
|
BadStringLiteral=133
|
||||||
Escape=134
|
Escape=134
|
||||||
Digit=135
|
Digit=135
|
||||||
LongSuffix=136
|
LongSuffix=136
|
||||||
UnsignedSuffix=137
|
UnsignedSuffix=137
|
||||||
FloatSuffix=138
|
FloatSuffix=138
|
||||||
Exponent=139
|
Exponent=139
|
||||||
Number=140
|
Number=140
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
||||||
// $ANTLR 2.7.2: "expandedWEmitter.g" -> "WEmitter.java"$
|
// $ANTLR 2.7.2: "expandedWEmitter.g" -> "WEmitter.java"$
|
||||||
|
|
||||||
package processing.app.preproc;
|
package processing.app.preproc;
|
||||||
import processing.app.*;
|
import processing.app.*;
|
||||||
|
@ -7,157 +7,157 @@ import java.util.*;
|
||||||
|
|
||||||
import antlr.CommonAST;
|
import antlr.CommonAST;
|
||||||
import antlr.DumpASTVisitor;
|
import antlr.DumpASTVisitor;
|
||||||
|
|
||||||
public interface WEmitterTokenTypes {
|
public interface WEmitterTokenTypes {
|
||||||
int EOF = 1;
|
int EOF = 1;
|
||||||
int NULL_TREE_LOOKAHEAD = 3;
|
int NULL_TREE_LOOKAHEAD = 3;
|
||||||
int LITERAL_typedef = 4;
|
int LITERAL_typedef = 4;
|
||||||
int LITERAL_asm = 5;
|
int LITERAL_asm = 5;
|
||||||
int LITERAL_volatile = 6;
|
int LITERAL_volatile = 6;
|
||||||
int LCURLY = 7;
|
int LCURLY = 7;
|
||||||
int RCURLY = 8;
|
int RCURLY = 8;
|
||||||
int SEMI = 9;
|
int SEMI = 9;
|
||||||
int LITERAL_struct = 10;
|
int LITERAL_struct = 10;
|
||||||
int LITERAL_union = 11;
|
int LITERAL_union = 11;
|
||||||
int LITERAL_enum = 12;
|
int LITERAL_enum = 12;
|
||||||
int LITERAL_auto = 13;
|
int LITERAL_auto = 13;
|
||||||
int LITERAL_register = 14;
|
int LITERAL_register = 14;
|
||||||
int LITERAL_extern = 15;
|
int LITERAL_extern = 15;
|
||||||
int LITERAL_static = 16;
|
int LITERAL_static = 16;
|
||||||
int LITERAL_const = 17;
|
int LITERAL_const = 17;
|
||||||
int LITERAL_void = 18;
|
int LITERAL_void = 18;
|
||||||
int LITERAL_char = 19;
|
int LITERAL_char = 19;
|
||||||
int LITERAL_short = 20;
|
int LITERAL_short = 20;
|
||||||
int LITERAL_int = 21;
|
int LITERAL_int = 21;
|
||||||
int LITERAL_long = 22;
|
int LITERAL_long = 22;
|
||||||
int LITERAL_float = 23;
|
int LITERAL_float = 23;
|
||||||
int LITERAL_double = 24;
|
int LITERAL_double = 24;
|
||||||
int LITERAL_signed = 25;
|
int LITERAL_signed = 25;
|
||||||
int LITERAL_unsigned = 26;
|
int LITERAL_unsigned = 26;
|
||||||
int ID = 27;
|
int ID = 27;
|
||||||
int COMMA = 28;
|
int COMMA = 28;
|
||||||
int COLON = 29;
|
int COLON = 29;
|
||||||
int ASSIGN = 30;
|
int ASSIGN = 30;
|
||||||
int STAR = 31;
|
int STAR = 31;
|
||||||
int LPAREN = 32;
|
int LPAREN = 32;
|
||||||
int RPAREN = 33;
|
int RPAREN = 33;
|
||||||
int LBRACKET = 34;
|
int LBRACKET = 34;
|
||||||
int RBRACKET = 35;
|
int RBRACKET = 35;
|
||||||
int VARARGS = 36;
|
int VARARGS = 36;
|
||||||
int LITERAL_while = 37;
|
int LITERAL_while = 37;
|
||||||
int LITERAL_do = 38;
|
int LITERAL_do = 38;
|
||||||
int LITERAL_for = 39;
|
int LITERAL_for = 39;
|
||||||
int LITERAL_goto = 40;
|
int LITERAL_goto = 40;
|
||||||
int LITERAL_continue = 41;
|
int LITERAL_continue = 41;
|
||||||
int LITERAL_break = 42;
|
int LITERAL_break = 42;
|
||||||
int LITERAL_return = 43;
|
int LITERAL_return = 43;
|
||||||
int LITERAL_case = 44;
|
int LITERAL_case = 44;
|
||||||
int LITERAL_default = 45;
|
int LITERAL_default = 45;
|
||||||
int LITERAL_if = 46;
|
int LITERAL_if = 46;
|
||||||
int LITERAL_else = 47;
|
int LITERAL_else = 47;
|
||||||
int LITERAL_switch = 48;
|
int LITERAL_switch = 48;
|
||||||
int DIV_ASSIGN = 49;
|
int DIV_ASSIGN = 49;
|
||||||
int PLUS_ASSIGN = 50;
|
int PLUS_ASSIGN = 50;
|
||||||
int MINUS_ASSIGN = 51;
|
int MINUS_ASSIGN = 51;
|
||||||
int STAR_ASSIGN = 52;
|
int STAR_ASSIGN = 52;
|
||||||
int MOD_ASSIGN = 53;
|
int MOD_ASSIGN = 53;
|
||||||
int RSHIFT_ASSIGN = 54;
|
int RSHIFT_ASSIGN = 54;
|
||||||
int LSHIFT_ASSIGN = 55;
|
int LSHIFT_ASSIGN = 55;
|
||||||
int BAND_ASSIGN = 56;
|
int BAND_ASSIGN = 56;
|
||||||
int BOR_ASSIGN = 57;
|
int BOR_ASSIGN = 57;
|
||||||
int BXOR_ASSIGN = 58;
|
int BXOR_ASSIGN = 58;
|
||||||
int QUESTION = 59;
|
int QUESTION = 59;
|
||||||
int LOR = 60;
|
int LOR = 60;
|
||||||
int LAND = 61;
|
int LAND = 61;
|
||||||
int BOR = 62;
|
int BOR = 62;
|
||||||
int BXOR = 63;
|
int BXOR = 63;
|
||||||
int BAND = 64;
|
int BAND = 64;
|
||||||
int EQUAL = 65;
|
int EQUAL = 65;
|
||||||
int NOT_EQUAL = 66;
|
int NOT_EQUAL = 66;
|
||||||
int LT = 67;
|
int LT = 67;
|
||||||
int LTE = 68;
|
int LTE = 68;
|
||||||
int GT = 69;
|
int GT = 69;
|
||||||
int GTE = 70;
|
int GTE = 70;
|
||||||
int LSHIFT = 71;
|
int LSHIFT = 71;
|
||||||
int RSHIFT = 72;
|
int RSHIFT = 72;
|
||||||
int PLUS = 73;
|
int PLUS = 73;
|
||||||
int MINUS = 74;
|
int MINUS = 74;
|
||||||
int DIV = 75;
|
int DIV = 75;
|
||||||
int MOD = 76;
|
int MOD = 76;
|
||||||
int INC = 77;
|
int INC = 77;
|
||||||
int DEC = 78;
|
int DEC = 78;
|
||||||
int LITERAL_sizeof = 79;
|
int LITERAL_sizeof = 79;
|
||||||
int BNOT = 80;
|
int BNOT = 80;
|
||||||
int LNOT = 81;
|
int LNOT = 81;
|
||||||
int PTR = 82;
|
int PTR = 82;
|
||||||
int DOT = 83;
|
int DOT = 83;
|
||||||
int CharLiteral = 84;
|
int CharLiteral = 84;
|
||||||
int StringLiteral = 85;
|
int StringLiteral = 85;
|
||||||
int IntOctalConst = 86;
|
int IntOctalConst = 86;
|
||||||
int LongOctalConst = 87;
|
int LongOctalConst = 87;
|
||||||
int UnsignedOctalConst = 88;
|
int UnsignedOctalConst = 88;
|
||||||
int IntIntConst = 89;
|
int IntIntConst = 89;
|
||||||
int LongIntConst = 90;
|
int LongIntConst = 90;
|
||||||
int UnsignedIntConst = 91;
|
int UnsignedIntConst = 91;
|
||||||
int IntHexConst = 92;
|
int IntHexConst = 92;
|
||||||
int LongHexConst = 93;
|
int LongHexConst = 93;
|
||||||
int UnsignedHexConst = 94;
|
int UnsignedHexConst = 94;
|
||||||
int FloatDoubleConst = 95;
|
int FloatDoubleConst = 95;
|
||||||
int DoubleDoubleConst = 96;
|
int DoubleDoubleConst = 96;
|
||||||
int LongDoubleConst = 97;
|
int LongDoubleConst = 97;
|
||||||
int NTypedefName = 98;
|
int NTypedefName = 98;
|
||||||
int NInitDecl = 99;
|
int NInitDecl = 99;
|
||||||
int NDeclarator = 100;
|
int NDeclarator = 100;
|
||||||
int NStructDeclarator = 101;
|
int NStructDeclarator = 101;
|
||||||
int NDeclaration = 102;
|
int NDeclaration = 102;
|
||||||
int NCast = 103;
|
int NCast = 103;
|
||||||
int NPointerGroup = 104;
|
int NPointerGroup = 104;
|
||||||
int NExpressionGroup = 105;
|
int NExpressionGroup = 105;
|
||||||
int NFunctionCallArgs = 106;
|
int NFunctionCallArgs = 106;
|
||||||
int NNonemptyAbstractDeclarator = 107;
|
int NNonemptyAbstractDeclarator = 107;
|
||||||
int NInitializer = 108;
|
int NInitializer = 108;
|
||||||
int NStatementExpr = 109;
|
int NStatementExpr = 109;
|
||||||
int NEmptyExpression = 110;
|
int NEmptyExpression = 110;
|
||||||
int NParameterTypeList = 111;
|
int NParameterTypeList = 111;
|
||||||
int NFunctionDef = 112;
|
int NFunctionDef = 112;
|
||||||
int NCompoundStatement = 113;
|
int NCompoundStatement = 113;
|
||||||
int NParameterDeclaration = 114;
|
int NParameterDeclaration = 114;
|
||||||
int NCommaExpr = 115;
|
int NCommaExpr = 115;
|
||||||
int NUnaryExpr = 116;
|
int NUnaryExpr = 116;
|
||||||
int NLabel = 117;
|
int NLabel = 117;
|
||||||
int NPostfixExpr = 118;
|
int NPostfixExpr = 118;
|
||||||
int NRangeExpr = 119;
|
int NRangeExpr = 119;
|
||||||
int NStringSeq = 120;
|
int NStringSeq = 120;
|
||||||
int NInitializerElementLabel = 121;
|
int NInitializerElementLabel = 121;
|
||||||
int NLcurlyInitializer = 122;
|
int NLcurlyInitializer = 122;
|
||||||
int NAsmAttribute = 123;
|
int NAsmAttribute = 123;
|
||||||
int NGnuAsmExpr = 124;
|
int NGnuAsmExpr = 124;
|
||||||
int NTypeMissing = 125;
|
int NTypeMissing = 125;
|
||||||
int Vocabulary = 126;
|
int Vocabulary = 126;
|
||||||
int Whitespace = 127;
|
int Whitespace = 127;
|
||||||
int Comment = 128;
|
int Comment = 128;
|
||||||
int CPPComment = 129;
|
int CPPComment = 129;
|
||||||
int PREPROC_DIRECTIVE = 130;
|
int PREPROC_DIRECTIVE = 130;
|
||||||
int Space = 131;
|
int Space = 131;
|
||||||
int LineDirective = 132;
|
int LineDirective = 132;
|
||||||
int BadStringLiteral = 133;
|
int BadStringLiteral = 133;
|
||||||
int Escape = 134;
|
int Escape = 134;
|
||||||
int Digit = 135;
|
int Digit = 135;
|
||||||
int LongSuffix = 136;
|
int LongSuffix = 136;
|
||||||
int UnsignedSuffix = 137;
|
int UnsignedSuffix = 137;
|
||||||
int FloatSuffix = 138;
|
int FloatSuffix = 138;
|
||||||
int Exponent = 139;
|
int Exponent = 139;
|
||||||
int Number = 140;
|
int Number = 140;
|
||||||
int LITERAL___label__ = 141;
|
int LITERAL___label__ = 141;
|
||||||
int LITERAL_inline = 142;
|
int LITERAL_inline = 142;
|
||||||
int LITERAL_byte = 143;
|
int LITERAL_byte = 143;
|
||||||
int LITERAL_boolean = 144;
|
int LITERAL_boolean = 144;
|
||||||
int LITERAL_Servo = 145;
|
int LITERAL_Servo = 145;
|
||||||
int LITERAL_Wire = 146;
|
int LITERAL_Wire = 146;
|
||||||
int LITERAL_typeof = 147;
|
int LITERAL_typeof = 147;
|
||||||
int LITERAL___complex = 148;
|
int LITERAL___complex = 148;
|
||||||
int LITERAL___attribute = 149;
|
int LITERAL___attribute = 149;
|
||||||
int LITERAL___alignof = 150;
|
int LITERAL___alignof = 150;
|
||||||
int LITERAL___real = 151;
|
int LITERAL___real = 151;
|
||||||
int LITERAL___imag = 152;
|
int LITERAL___imag = 152;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,151 +1,151 @@
|
||||||
// $ANTLR 2.7.2: expandedWEmitter.g -> WEmitterTokenTypes.txt$
|
// $ANTLR 2.7.2: expandedWEmitter.g -> WEmitterTokenTypes.txt$
|
||||||
WEmitter // output token vocab name
|
WEmitter // output token vocab name
|
||||||
LITERAL_typedef="typedef"=4
|
LITERAL_typedef="typedef"=4
|
||||||
LITERAL_asm="asm"=5
|
LITERAL_asm="asm"=5
|
||||||
LITERAL_volatile="volatile"=6
|
LITERAL_volatile="volatile"=6
|
||||||
LCURLY=7
|
LCURLY=7
|
||||||
RCURLY=8
|
RCURLY=8
|
||||||
SEMI=9
|
SEMI=9
|
||||||
LITERAL_struct="struct"=10
|
LITERAL_struct="struct"=10
|
||||||
LITERAL_union="union"=11
|
LITERAL_union="union"=11
|
||||||
LITERAL_enum="enum"=12
|
LITERAL_enum="enum"=12
|
||||||
LITERAL_auto="auto"=13
|
LITERAL_auto="auto"=13
|
||||||
LITERAL_register="register"=14
|
LITERAL_register="register"=14
|
||||||
LITERAL_extern="extern"=15
|
LITERAL_extern="extern"=15
|
||||||
LITERAL_static="static"=16
|
LITERAL_static="static"=16
|
||||||
LITERAL_const="const"=17
|
LITERAL_const="const"=17
|
||||||
LITERAL_void="void"=18
|
LITERAL_void="void"=18
|
||||||
LITERAL_char="char"=19
|
LITERAL_char="char"=19
|
||||||
LITERAL_short="short"=20
|
LITERAL_short="short"=20
|
||||||
LITERAL_int="int"=21
|
LITERAL_int="int"=21
|
||||||
LITERAL_long="long"=22
|
LITERAL_long="long"=22
|
||||||
LITERAL_float="float"=23
|
LITERAL_float="float"=23
|
||||||
LITERAL_double="double"=24
|
LITERAL_double="double"=24
|
||||||
LITERAL_signed="signed"=25
|
LITERAL_signed="signed"=25
|
||||||
LITERAL_unsigned="unsigned"=26
|
LITERAL_unsigned="unsigned"=26
|
||||||
ID=27
|
ID=27
|
||||||
COMMA=28
|
COMMA=28
|
||||||
COLON=29
|
COLON=29
|
||||||
ASSIGN=30
|
ASSIGN=30
|
||||||
STAR=31
|
STAR=31
|
||||||
LPAREN=32
|
LPAREN=32
|
||||||
RPAREN=33
|
RPAREN=33
|
||||||
LBRACKET=34
|
LBRACKET=34
|
||||||
RBRACKET=35
|
RBRACKET=35
|
||||||
VARARGS=36
|
VARARGS=36
|
||||||
LITERAL_while="while"=37
|
LITERAL_while="while"=37
|
||||||
LITERAL_do="do"=38
|
LITERAL_do="do"=38
|
||||||
LITERAL_for="for"=39
|
LITERAL_for="for"=39
|
||||||
LITERAL_goto="goto"=40
|
LITERAL_goto="goto"=40
|
||||||
LITERAL_continue="continue"=41
|
LITERAL_continue="continue"=41
|
||||||
LITERAL_break="break"=42
|
LITERAL_break="break"=42
|
||||||
LITERAL_return="return"=43
|
LITERAL_return="return"=43
|
||||||
LITERAL_case="case"=44
|
LITERAL_case="case"=44
|
||||||
LITERAL_default="default"=45
|
LITERAL_default="default"=45
|
||||||
LITERAL_if="if"=46
|
LITERAL_if="if"=46
|
||||||
LITERAL_else="else"=47
|
LITERAL_else="else"=47
|
||||||
LITERAL_switch="switch"=48
|
LITERAL_switch="switch"=48
|
||||||
DIV_ASSIGN=49
|
DIV_ASSIGN=49
|
||||||
PLUS_ASSIGN=50
|
PLUS_ASSIGN=50
|
||||||
MINUS_ASSIGN=51
|
MINUS_ASSIGN=51
|
||||||
STAR_ASSIGN=52
|
STAR_ASSIGN=52
|
||||||
MOD_ASSIGN=53
|
MOD_ASSIGN=53
|
||||||
RSHIFT_ASSIGN=54
|
RSHIFT_ASSIGN=54
|
||||||
LSHIFT_ASSIGN=55
|
LSHIFT_ASSIGN=55
|
||||||
BAND_ASSIGN=56
|
BAND_ASSIGN=56
|
||||||
BOR_ASSIGN=57
|
BOR_ASSIGN=57
|
||||||
BXOR_ASSIGN=58
|
BXOR_ASSIGN=58
|
||||||
QUESTION=59
|
QUESTION=59
|
||||||
LOR=60
|
LOR=60
|
||||||
LAND=61
|
LAND=61
|
||||||
BOR=62
|
BOR=62
|
||||||
BXOR=63
|
BXOR=63
|
||||||
BAND=64
|
BAND=64
|
||||||
EQUAL=65
|
EQUAL=65
|
||||||
NOT_EQUAL=66
|
NOT_EQUAL=66
|
||||||
LT=67
|
LT=67
|
||||||
LTE=68
|
LTE=68
|
||||||
GT=69
|
GT=69
|
||||||
GTE=70
|
GTE=70
|
||||||
LSHIFT=71
|
LSHIFT=71
|
||||||
RSHIFT=72
|
RSHIFT=72
|
||||||
PLUS=73
|
PLUS=73
|
||||||
MINUS=74
|
MINUS=74
|
||||||
DIV=75
|
DIV=75
|
||||||
MOD=76
|
MOD=76
|
||||||
INC=77
|
INC=77
|
||||||
DEC=78
|
DEC=78
|
||||||
LITERAL_sizeof="sizeof"=79
|
LITERAL_sizeof="sizeof"=79
|
||||||
BNOT=80
|
BNOT=80
|
||||||
LNOT=81
|
LNOT=81
|
||||||
PTR=82
|
PTR=82
|
||||||
DOT=83
|
DOT=83
|
||||||
CharLiteral=84
|
CharLiteral=84
|
||||||
StringLiteral=85
|
StringLiteral=85
|
||||||
IntOctalConst=86
|
IntOctalConst=86
|
||||||
LongOctalConst=87
|
LongOctalConst=87
|
||||||
UnsignedOctalConst=88
|
UnsignedOctalConst=88
|
||||||
IntIntConst=89
|
IntIntConst=89
|
||||||
LongIntConst=90
|
LongIntConst=90
|
||||||
UnsignedIntConst=91
|
UnsignedIntConst=91
|
||||||
IntHexConst=92
|
IntHexConst=92
|
||||||
LongHexConst=93
|
LongHexConst=93
|
||||||
UnsignedHexConst=94
|
UnsignedHexConst=94
|
||||||
FloatDoubleConst=95
|
FloatDoubleConst=95
|
||||||
DoubleDoubleConst=96
|
DoubleDoubleConst=96
|
||||||
LongDoubleConst=97
|
LongDoubleConst=97
|
||||||
NTypedefName=98
|
NTypedefName=98
|
||||||
NInitDecl=99
|
NInitDecl=99
|
||||||
NDeclarator=100
|
NDeclarator=100
|
||||||
NStructDeclarator=101
|
NStructDeclarator=101
|
||||||
NDeclaration=102
|
NDeclaration=102
|
||||||
NCast=103
|
NCast=103
|
||||||
NPointerGroup=104
|
NPointerGroup=104
|
||||||
NExpressionGroup=105
|
NExpressionGroup=105
|
||||||
NFunctionCallArgs=106
|
NFunctionCallArgs=106
|
||||||
NNonemptyAbstractDeclarator=107
|
NNonemptyAbstractDeclarator=107
|
||||||
NInitializer=108
|
NInitializer=108
|
||||||
NStatementExpr=109
|
NStatementExpr=109
|
||||||
NEmptyExpression=110
|
NEmptyExpression=110
|
||||||
NParameterTypeList=111
|
NParameterTypeList=111
|
||||||
NFunctionDef=112
|
NFunctionDef=112
|
||||||
NCompoundStatement=113
|
NCompoundStatement=113
|
||||||
NParameterDeclaration=114
|
NParameterDeclaration=114
|
||||||
NCommaExpr=115
|
NCommaExpr=115
|
||||||
NUnaryExpr=116
|
NUnaryExpr=116
|
||||||
NLabel=117
|
NLabel=117
|
||||||
NPostfixExpr=118
|
NPostfixExpr=118
|
||||||
NRangeExpr=119
|
NRangeExpr=119
|
||||||
NStringSeq=120
|
NStringSeq=120
|
||||||
NInitializerElementLabel=121
|
NInitializerElementLabel=121
|
||||||
NLcurlyInitializer=122
|
NLcurlyInitializer=122
|
||||||
NAsmAttribute=123
|
NAsmAttribute=123
|
||||||
NGnuAsmExpr=124
|
NGnuAsmExpr=124
|
||||||
NTypeMissing=125
|
NTypeMissing=125
|
||||||
Vocabulary=126
|
Vocabulary=126
|
||||||
Whitespace=127
|
Whitespace=127
|
||||||
Comment=128
|
Comment=128
|
||||||
CPPComment=129
|
CPPComment=129
|
||||||
PREPROC_DIRECTIVE("a line directive")=130
|
PREPROC_DIRECTIVE("a line directive")=130
|
||||||
Space=131
|
Space=131
|
||||||
LineDirective=132
|
LineDirective=132
|
||||||
BadStringLiteral=133
|
BadStringLiteral=133
|
||||||
Escape=134
|
Escape=134
|
||||||
Digit=135
|
Digit=135
|
||||||
LongSuffix=136
|
LongSuffix=136
|
||||||
UnsignedSuffix=137
|
UnsignedSuffix=137
|
||||||
FloatSuffix=138
|
FloatSuffix=138
|
||||||
Exponent=139
|
Exponent=139
|
||||||
Number=140
|
Number=140
|
||||||
LITERAL___label__="__label__"=141
|
LITERAL___label__="__label__"=141
|
||||||
LITERAL_inline="inline"=142
|
LITERAL_inline="inline"=142
|
||||||
LITERAL_byte="byte"=143
|
LITERAL_byte="byte"=143
|
||||||
LITERAL_boolean="boolean"=144
|
LITERAL_boolean="boolean"=144
|
||||||
LITERAL_Servo="Servo"=145
|
LITERAL_Servo="Servo"=145
|
||||||
LITERAL_Wire="Wire"=146
|
LITERAL_Wire="Wire"=146
|
||||||
LITERAL_typeof="typeof"=147
|
LITERAL_typeof="typeof"=147
|
||||||
LITERAL___complex="__complex"=148
|
LITERAL___complex="__complex"=148
|
||||||
LITERAL___attribute="__attribute"=149
|
LITERAL___attribute="__attribute"=149
|
||||||
LITERAL___alignof="__alignof"=150
|
LITERAL___alignof="__alignof"=150
|
||||||
LITERAL___real="__real"=151
|
LITERAL___real="__real"=151
|
||||||
LITERAL___imag="__imag"=152
|
LITERAL___imag="__imag"=152
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
||||||
// $ANTLR 2.7.2: "expandedWParser.g" -> "WLexer.java"$
|
// $ANTLR 2.7.2: "expandedWParser.g" -> "WLexer.java"$
|
||||||
|
|
||||||
package processing.app.preproc;
|
package processing.app.preproc;
|
||||||
|
|
||||||
|
@ -6,163 +6,163 @@ import java.io.*;
|
||||||
|
|
||||||
import antlr.CommonAST;
|
import antlr.CommonAST;
|
||||||
import antlr.DumpASTVisitor;
|
import antlr.DumpASTVisitor;
|
||||||
|
|
||||||
public interface WLexerTokenTypes {
|
public interface WLexerTokenTypes {
|
||||||
int EOF = 1;
|
int EOF = 1;
|
||||||
int NULL_TREE_LOOKAHEAD = 3;
|
int NULL_TREE_LOOKAHEAD = 3;
|
||||||
int LITERAL_typedef = 4;
|
int LITERAL_typedef = 4;
|
||||||
int LITERAL_asm = 5;
|
int LITERAL_asm = 5;
|
||||||
int LITERAL_volatile = 6;
|
int LITERAL_volatile = 6;
|
||||||
int LCURLY = 7;
|
int LCURLY = 7;
|
||||||
int RCURLY = 8;
|
int RCURLY = 8;
|
||||||
int SEMI = 9;
|
int SEMI = 9;
|
||||||
int LITERAL_struct = 10;
|
int LITERAL_struct = 10;
|
||||||
int LITERAL_union = 11;
|
int LITERAL_union = 11;
|
||||||
int LITERAL_enum = 12;
|
int LITERAL_enum = 12;
|
||||||
int LITERAL_auto = 13;
|
int LITERAL_auto = 13;
|
||||||
int LITERAL_register = 14;
|
int LITERAL_register = 14;
|
||||||
int LITERAL_extern = 15;
|
int LITERAL_extern = 15;
|
||||||
int LITERAL_static = 16;
|
int LITERAL_static = 16;
|
||||||
int LITERAL_const = 17;
|
int LITERAL_const = 17;
|
||||||
int LITERAL_void = 18;
|
int LITERAL_void = 18;
|
||||||
int LITERAL_char = 19;
|
int LITERAL_char = 19;
|
||||||
int LITERAL_short = 20;
|
int LITERAL_short = 20;
|
||||||
int LITERAL_int = 21;
|
int LITERAL_int = 21;
|
||||||
int LITERAL_long = 22;
|
int LITERAL_long = 22;
|
||||||
int LITERAL_float = 23;
|
int LITERAL_float = 23;
|
||||||
int LITERAL_double = 24;
|
int LITERAL_double = 24;
|
||||||
int LITERAL_signed = 25;
|
int LITERAL_signed = 25;
|
||||||
int LITERAL_unsigned = 26;
|
int LITERAL_unsigned = 26;
|
||||||
int ID = 27;
|
int ID = 27;
|
||||||
int COMMA = 28;
|
int COMMA = 28;
|
||||||
int COLON = 29;
|
int COLON = 29;
|
||||||
int ASSIGN = 30;
|
int ASSIGN = 30;
|
||||||
int STAR = 31;
|
int STAR = 31;
|
||||||
int LPAREN = 32;
|
int LPAREN = 32;
|
||||||
int RPAREN = 33;
|
int RPAREN = 33;
|
||||||
int LBRACKET = 34;
|
int LBRACKET = 34;
|
||||||
int RBRACKET = 35;
|
int RBRACKET = 35;
|
||||||
int VARARGS = 36;
|
int VARARGS = 36;
|
||||||
int LITERAL_while = 37;
|
int LITERAL_while = 37;
|
||||||
int LITERAL_do = 38;
|
int LITERAL_do = 38;
|
||||||
int LITERAL_for = 39;
|
int LITERAL_for = 39;
|
||||||
int LITERAL_goto = 40;
|
int LITERAL_goto = 40;
|
||||||
int LITERAL_continue = 41;
|
int LITERAL_continue = 41;
|
||||||
int LITERAL_break = 42;
|
int LITERAL_break = 42;
|
||||||
int LITERAL_return = 43;
|
int LITERAL_return = 43;
|
||||||
int LITERAL_case = 44;
|
int LITERAL_case = 44;
|
||||||
int LITERAL_default = 45;
|
int LITERAL_default = 45;
|
||||||
int LITERAL_if = 46;
|
int LITERAL_if = 46;
|
||||||
int LITERAL_else = 47;
|
int LITERAL_else = 47;
|
||||||
int LITERAL_switch = 48;
|
int LITERAL_switch = 48;
|
||||||
int DIV_ASSIGN = 49;
|
int DIV_ASSIGN = 49;
|
||||||
int PLUS_ASSIGN = 50;
|
int PLUS_ASSIGN = 50;
|
||||||
int MINUS_ASSIGN = 51;
|
int MINUS_ASSIGN = 51;
|
||||||
int STAR_ASSIGN = 52;
|
int STAR_ASSIGN = 52;
|
||||||
int MOD_ASSIGN = 53;
|
int MOD_ASSIGN = 53;
|
||||||
int RSHIFT_ASSIGN = 54;
|
int RSHIFT_ASSIGN = 54;
|
||||||
int LSHIFT_ASSIGN = 55;
|
int LSHIFT_ASSIGN = 55;
|
||||||
int BAND_ASSIGN = 56;
|
int BAND_ASSIGN = 56;
|
||||||
int BOR_ASSIGN = 57;
|
int BOR_ASSIGN = 57;
|
||||||
int BXOR_ASSIGN = 58;
|
int BXOR_ASSIGN = 58;
|
||||||
int QUESTION = 59;
|
int QUESTION = 59;
|
||||||
int LOR = 60;
|
int LOR = 60;
|
||||||
int LAND = 61;
|
int LAND = 61;
|
||||||
int BOR = 62;
|
int BOR = 62;
|
||||||
int BXOR = 63;
|
int BXOR = 63;
|
||||||
int BAND = 64;
|
int BAND = 64;
|
||||||
int EQUAL = 65;
|
int EQUAL = 65;
|
||||||
int NOT_EQUAL = 66;
|
int NOT_EQUAL = 66;
|
||||||
int LT = 67;
|
int LT = 67;
|
||||||
int LTE = 68;
|
int LTE = 68;
|
||||||
int GT = 69;
|
int GT = 69;
|
||||||
int GTE = 70;
|
int GTE = 70;
|
||||||
int LSHIFT = 71;
|
int LSHIFT = 71;
|
||||||
int RSHIFT = 72;
|
int RSHIFT = 72;
|
||||||
int PLUS = 73;
|
int PLUS = 73;
|
||||||
int MINUS = 74;
|
int MINUS = 74;
|
||||||
int DIV = 75;
|
int DIV = 75;
|
||||||
int MOD = 76;
|
int MOD = 76;
|
||||||
int INC = 77;
|
int INC = 77;
|
||||||
int DEC = 78;
|
int DEC = 78;
|
||||||
int LITERAL_sizeof = 79;
|
int LITERAL_sizeof = 79;
|
||||||
int BNOT = 80;
|
int BNOT = 80;
|
||||||
int LNOT = 81;
|
int LNOT = 81;
|
||||||
int PTR = 82;
|
int PTR = 82;
|
||||||
int DOT = 83;
|
int DOT = 83;
|
||||||
int CharLiteral = 84;
|
int CharLiteral = 84;
|
||||||
int StringLiteral = 85;
|
int StringLiteral = 85;
|
||||||
int IntOctalConst = 86;
|
int IntOctalConst = 86;
|
||||||
int LongOctalConst = 87;
|
int LongOctalConst = 87;
|
||||||
int UnsignedOctalConst = 88;
|
int UnsignedOctalConst = 88;
|
||||||
int IntIntConst = 89;
|
int IntIntConst = 89;
|
||||||
int LongIntConst = 90;
|
int LongIntConst = 90;
|
||||||
int UnsignedIntConst = 91;
|
int UnsignedIntConst = 91;
|
||||||
int IntHexConst = 92;
|
int IntHexConst = 92;
|
||||||
int LongHexConst = 93;
|
int LongHexConst = 93;
|
||||||
int UnsignedHexConst = 94;
|
int UnsignedHexConst = 94;
|
||||||
int FloatDoubleConst = 95;
|
int FloatDoubleConst = 95;
|
||||||
int DoubleDoubleConst = 96;
|
int DoubleDoubleConst = 96;
|
||||||
int LongDoubleConst = 97;
|
int LongDoubleConst = 97;
|
||||||
int NTypedefName = 98;
|
int NTypedefName = 98;
|
||||||
int NInitDecl = 99;
|
int NInitDecl = 99;
|
||||||
int NDeclarator = 100;
|
int NDeclarator = 100;
|
||||||
int NStructDeclarator = 101;
|
int NStructDeclarator = 101;
|
||||||
int NDeclaration = 102;
|
int NDeclaration = 102;
|
||||||
int NCast = 103;
|
int NCast = 103;
|
||||||
int NPointerGroup = 104;
|
int NPointerGroup = 104;
|
||||||
int NExpressionGroup = 105;
|
int NExpressionGroup = 105;
|
||||||
int NFunctionCallArgs = 106;
|
int NFunctionCallArgs = 106;
|
||||||
int NNonemptyAbstractDeclarator = 107;
|
int NNonemptyAbstractDeclarator = 107;
|
||||||
int NInitializer = 108;
|
int NInitializer = 108;
|
||||||
int NStatementExpr = 109;
|
int NStatementExpr = 109;
|
||||||
int NEmptyExpression = 110;
|
int NEmptyExpression = 110;
|
||||||
int NParameterTypeList = 111;
|
int NParameterTypeList = 111;
|
||||||
int NFunctionDef = 112;
|
int NFunctionDef = 112;
|
||||||
int NCompoundStatement = 113;
|
int NCompoundStatement = 113;
|
||||||
int NParameterDeclaration = 114;
|
int NParameterDeclaration = 114;
|
||||||
int NCommaExpr = 115;
|
int NCommaExpr = 115;
|
||||||
int NUnaryExpr = 116;
|
int NUnaryExpr = 116;
|
||||||
int NLabel = 117;
|
int NLabel = 117;
|
||||||
int NPostfixExpr = 118;
|
int NPostfixExpr = 118;
|
||||||
int NRangeExpr = 119;
|
int NRangeExpr = 119;
|
||||||
int NStringSeq = 120;
|
int NStringSeq = 120;
|
||||||
int NInitializerElementLabel = 121;
|
int NInitializerElementLabel = 121;
|
||||||
int NLcurlyInitializer = 122;
|
int NLcurlyInitializer = 122;
|
||||||
int NAsmAttribute = 123;
|
int NAsmAttribute = 123;
|
||||||
int NGnuAsmExpr = 124;
|
int NGnuAsmExpr = 124;
|
||||||
int NTypeMissing = 125;
|
int NTypeMissing = 125;
|
||||||
int Vocabulary = 126;
|
int Vocabulary = 126;
|
||||||
int Whitespace = 127;
|
int Whitespace = 127;
|
||||||
int Comment = 128;
|
int Comment = 128;
|
||||||
int CPPComment = 129;
|
int CPPComment = 129;
|
||||||
int PREPROC_DIRECTIVE = 130;
|
int PREPROC_DIRECTIVE = 130;
|
||||||
int Space = 131;
|
int Space = 131;
|
||||||
int LineDirective = 132;
|
int LineDirective = 132;
|
||||||
int BadStringLiteral = 133;
|
int BadStringLiteral = 133;
|
||||||
int Escape = 134;
|
int Escape = 134;
|
||||||
int Digit = 135;
|
int Digit = 135;
|
||||||
int LongSuffix = 136;
|
int LongSuffix = 136;
|
||||||
int UnsignedSuffix = 137;
|
int UnsignedSuffix = 137;
|
||||||
int FloatSuffix = 138;
|
int FloatSuffix = 138;
|
||||||
int Exponent = 139;
|
int Exponent = 139;
|
||||||
int Number = 140;
|
int Number = 140;
|
||||||
int LITERAL___label__ = 141;
|
int LITERAL___label__ = 141;
|
||||||
int LITERAL_inline = 142;
|
int LITERAL_inline = 142;
|
||||||
int LITERAL_byte = 143;
|
int LITERAL_byte = 143;
|
||||||
int LITERAL_boolean = 144;
|
int LITERAL_boolean = 144;
|
||||||
int LITERAL_Servo = 145;
|
int LITERAL_Servo = 145;
|
||||||
int LITERAL_Wire = 146;
|
int LITERAL_Wire = 146;
|
||||||
int LITERAL_typeof = 147;
|
int LITERAL_typeof = 147;
|
||||||
int LITERAL___complex = 148;
|
int LITERAL___complex = 148;
|
||||||
int LITERAL___attribute = 149;
|
int LITERAL___attribute = 149;
|
||||||
int LITERAL___alignof = 150;
|
int LITERAL___alignof = 150;
|
||||||
int LITERAL___real = 151;
|
int LITERAL___real = 151;
|
||||||
int LITERAL___imag = 152;
|
int LITERAL___imag = 152;
|
||||||
int LITERAL___extension__ = 153;
|
int LITERAL___extension__ = 153;
|
||||||
int IntSuffix = 154;
|
int IntSuffix = 154;
|
||||||
int NumberSuffix = 155;
|
int NumberSuffix = 155;
|
||||||
int IDMEAT = 156;
|
int IDMEAT = 156;
|
||||||
int WideCharLiteral = 157;
|
int WideCharLiteral = 157;
|
||||||
int WideStringLiteral = 158;
|
int WideStringLiteral = 158;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,157 +1,157 @@
|
||||||
// $ANTLR 2.7.2: expandedWParser.g -> WLexerTokenTypes.txt$
|
// $ANTLR 2.7.2: expandedWParser.g -> WLexerTokenTypes.txt$
|
||||||
WLexer // output token vocab name
|
WLexer // output token vocab name
|
||||||
LITERAL_typedef="typedef"=4
|
LITERAL_typedef="typedef"=4
|
||||||
LITERAL_asm="asm"=5
|
LITERAL_asm="asm"=5
|
||||||
LITERAL_volatile="volatile"=6
|
LITERAL_volatile="volatile"=6
|
||||||
LCURLY=7
|
LCURLY=7
|
||||||
RCURLY=8
|
RCURLY=8
|
||||||
SEMI=9
|
SEMI=9
|
||||||
LITERAL_struct="struct"=10
|
LITERAL_struct="struct"=10
|
||||||
LITERAL_union="union"=11
|
LITERAL_union="union"=11
|
||||||
LITERAL_enum="enum"=12
|
LITERAL_enum="enum"=12
|
||||||
LITERAL_auto="auto"=13
|
LITERAL_auto="auto"=13
|
||||||
LITERAL_register="register"=14
|
LITERAL_register="register"=14
|
||||||
LITERAL_extern="extern"=15
|
LITERAL_extern="extern"=15
|
||||||
LITERAL_static="static"=16
|
LITERAL_static="static"=16
|
||||||
LITERAL_const="const"=17
|
LITERAL_const="const"=17
|
||||||
LITERAL_void="void"=18
|
LITERAL_void="void"=18
|
||||||
LITERAL_char="char"=19
|
LITERAL_char="char"=19
|
||||||
LITERAL_short="short"=20
|
LITERAL_short="short"=20
|
||||||
LITERAL_int="int"=21
|
LITERAL_int="int"=21
|
||||||
LITERAL_long="long"=22
|
LITERAL_long="long"=22
|
||||||
LITERAL_float="float"=23
|
LITERAL_float="float"=23
|
||||||
LITERAL_double="double"=24
|
LITERAL_double="double"=24
|
||||||
LITERAL_signed="signed"=25
|
LITERAL_signed="signed"=25
|
||||||
LITERAL_unsigned="unsigned"=26
|
LITERAL_unsigned="unsigned"=26
|
||||||
ID=27
|
ID=27
|
||||||
COMMA=28
|
COMMA=28
|
||||||
COLON=29
|
COLON=29
|
||||||
ASSIGN=30
|
ASSIGN=30
|
||||||
STAR=31
|
STAR=31
|
||||||
LPAREN=32
|
LPAREN=32
|
||||||
RPAREN=33
|
RPAREN=33
|
||||||
LBRACKET=34
|
LBRACKET=34
|
||||||
RBRACKET=35
|
RBRACKET=35
|
||||||
VARARGS=36
|
VARARGS=36
|
||||||
LITERAL_while="while"=37
|
LITERAL_while="while"=37
|
||||||
LITERAL_do="do"=38
|
LITERAL_do="do"=38
|
||||||
LITERAL_for="for"=39
|
LITERAL_for="for"=39
|
||||||
LITERAL_goto="goto"=40
|
LITERAL_goto="goto"=40
|
||||||
LITERAL_continue="continue"=41
|
LITERAL_continue="continue"=41
|
||||||
LITERAL_break="break"=42
|
LITERAL_break="break"=42
|
||||||
LITERAL_return="return"=43
|
LITERAL_return="return"=43
|
||||||
LITERAL_case="case"=44
|
LITERAL_case="case"=44
|
||||||
LITERAL_default="default"=45
|
LITERAL_default="default"=45
|
||||||
LITERAL_if="if"=46
|
LITERAL_if="if"=46
|
||||||
LITERAL_else="else"=47
|
LITERAL_else="else"=47
|
||||||
LITERAL_switch="switch"=48
|
LITERAL_switch="switch"=48
|
||||||
DIV_ASSIGN=49
|
DIV_ASSIGN=49
|
||||||
PLUS_ASSIGN=50
|
PLUS_ASSIGN=50
|
||||||
MINUS_ASSIGN=51
|
MINUS_ASSIGN=51
|
||||||
STAR_ASSIGN=52
|
STAR_ASSIGN=52
|
||||||
MOD_ASSIGN=53
|
MOD_ASSIGN=53
|
||||||
RSHIFT_ASSIGN=54
|
RSHIFT_ASSIGN=54
|
||||||
LSHIFT_ASSIGN=55
|
LSHIFT_ASSIGN=55
|
||||||
BAND_ASSIGN=56
|
BAND_ASSIGN=56
|
||||||
BOR_ASSIGN=57
|
BOR_ASSIGN=57
|
||||||
BXOR_ASSIGN=58
|
BXOR_ASSIGN=58
|
||||||
QUESTION=59
|
QUESTION=59
|
||||||
LOR=60
|
LOR=60
|
||||||
LAND=61
|
LAND=61
|
||||||
BOR=62
|
BOR=62
|
||||||
BXOR=63
|
BXOR=63
|
||||||
BAND=64
|
BAND=64
|
||||||
EQUAL=65
|
EQUAL=65
|
||||||
NOT_EQUAL=66
|
NOT_EQUAL=66
|
||||||
LT=67
|
LT=67
|
||||||
LTE=68
|
LTE=68
|
||||||
GT=69
|
GT=69
|
||||||
GTE=70
|
GTE=70
|
||||||
LSHIFT=71
|
LSHIFT=71
|
||||||
RSHIFT=72
|
RSHIFT=72
|
||||||
PLUS=73
|
PLUS=73
|
||||||
MINUS=74
|
MINUS=74
|
||||||
DIV=75
|
DIV=75
|
||||||
MOD=76
|
MOD=76
|
||||||
INC=77
|
INC=77
|
||||||
DEC=78
|
DEC=78
|
||||||
LITERAL_sizeof="sizeof"=79
|
LITERAL_sizeof="sizeof"=79
|
||||||
BNOT=80
|
BNOT=80
|
||||||
LNOT=81
|
LNOT=81
|
||||||
PTR=82
|
PTR=82
|
||||||
DOT=83
|
DOT=83
|
||||||
CharLiteral=84
|
CharLiteral=84
|
||||||
StringLiteral=85
|
StringLiteral=85
|
||||||
IntOctalConst=86
|
IntOctalConst=86
|
||||||
LongOctalConst=87
|
LongOctalConst=87
|
||||||
UnsignedOctalConst=88
|
UnsignedOctalConst=88
|
||||||
IntIntConst=89
|
IntIntConst=89
|
||||||
LongIntConst=90
|
LongIntConst=90
|
||||||
UnsignedIntConst=91
|
UnsignedIntConst=91
|
||||||
IntHexConst=92
|
IntHexConst=92
|
||||||
LongHexConst=93
|
LongHexConst=93
|
||||||
UnsignedHexConst=94
|
UnsignedHexConst=94
|
||||||
FloatDoubleConst=95
|
FloatDoubleConst=95
|
||||||
DoubleDoubleConst=96
|
DoubleDoubleConst=96
|
||||||
LongDoubleConst=97
|
LongDoubleConst=97
|
||||||
NTypedefName=98
|
NTypedefName=98
|
||||||
NInitDecl=99
|
NInitDecl=99
|
||||||
NDeclarator=100
|
NDeclarator=100
|
||||||
NStructDeclarator=101
|
NStructDeclarator=101
|
||||||
NDeclaration=102
|
NDeclaration=102
|
||||||
NCast=103
|
NCast=103
|
||||||
NPointerGroup=104
|
NPointerGroup=104
|
||||||
NExpressionGroup=105
|
NExpressionGroup=105
|
||||||
NFunctionCallArgs=106
|
NFunctionCallArgs=106
|
||||||
NNonemptyAbstractDeclarator=107
|
NNonemptyAbstractDeclarator=107
|
||||||
NInitializer=108
|
NInitializer=108
|
||||||
NStatementExpr=109
|
NStatementExpr=109
|
||||||
NEmptyExpression=110
|
NEmptyExpression=110
|
||||||
NParameterTypeList=111
|
NParameterTypeList=111
|
||||||
NFunctionDef=112
|
NFunctionDef=112
|
||||||
NCompoundStatement=113
|
NCompoundStatement=113
|
||||||
NParameterDeclaration=114
|
NParameterDeclaration=114
|
||||||
NCommaExpr=115
|
NCommaExpr=115
|
||||||
NUnaryExpr=116
|
NUnaryExpr=116
|
||||||
NLabel=117
|
NLabel=117
|
||||||
NPostfixExpr=118
|
NPostfixExpr=118
|
||||||
NRangeExpr=119
|
NRangeExpr=119
|
||||||
NStringSeq=120
|
NStringSeq=120
|
||||||
NInitializerElementLabel=121
|
NInitializerElementLabel=121
|
||||||
NLcurlyInitializer=122
|
NLcurlyInitializer=122
|
||||||
NAsmAttribute=123
|
NAsmAttribute=123
|
||||||
NGnuAsmExpr=124
|
NGnuAsmExpr=124
|
||||||
NTypeMissing=125
|
NTypeMissing=125
|
||||||
Vocabulary=126
|
Vocabulary=126
|
||||||
Whitespace=127
|
Whitespace=127
|
||||||
Comment=128
|
Comment=128
|
||||||
CPPComment=129
|
CPPComment=129
|
||||||
PREPROC_DIRECTIVE("a line directive")=130
|
PREPROC_DIRECTIVE("a line directive")=130
|
||||||
Space=131
|
Space=131
|
||||||
LineDirective=132
|
LineDirective=132
|
||||||
BadStringLiteral=133
|
BadStringLiteral=133
|
||||||
Escape=134
|
Escape=134
|
||||||
Digit=135
|
Digit=135
|
||||||
LongSuffix=136
|
LongSuffix=136
|
||||||
UnsignedSuffix=137
|
UnsignedSuffix=137
|
||||||
FloatSuffix=138
|
FloatSuffix=138
|
||||||
Exponent=139
|
Exponent=139
|
||||||
Number=140
|
Number=140
|
||||||
LITERAL___label__="__label__"=141
|
LITERAL___label__="__label__"=141
|
||||||
LITERAL_inline="inline"=142
|
LITERAL_inline="inline"=142
|
||||||
LITERAL_byte="byte"=143
|
LITERAL_byte="byte"=143
|
||||||
LITERAL_boolean="boolean"=144
|
LITERAL_boolean="boolean"=144
|
||||||
LITERAL_Servo="Servo"=145
|
LITERAL_Servo="Servo"=145
|
||||||
LITERAL_Wire="Wire"=146
|
LITERAL_Wire="Wire"=146
|
||||||
LITERAL_typeof="typeof"=147
|
LITERAL_typeof="typeof"=147
|
||||||
LITERAL___complex="__complex"=148
|
LITERAL___complex="__complex"=148
|
||||||
LITERAL___attribute="__attribute"=149
|
LITERAL___attribute="__attribute"=149
|
||||||
LITERAL___alignof="__alignof"=150
|
LITERAL___alignof="__alignof"=150
|
||||||
LITERAL___real="__real"=151
|
LITERAL___real="__real"=151
|
||||||
LITERAL___imag="__imag"=152
|
LITERAL___imag="__imag"=152
|
||||||
LITERAL___extension__="__extension__"=153
|
LITERAL___extension__="__extension__"=153
|
||||||
IntSuffix=154
|
IntSuffix=154
|
||||||
NumberSuffix=155
|
NumberSuffix=155
|
||||||
IDMEAT=156
|
IDMEAT=156
|
||||||
WideCharLiteral=157
|
WideCharLiteral=157
|
||||||
WideStringLiteral=158
|
WideStringLiteral=158
|
||||||
|
|
13210
app/preproc/WParser.java
13210
app/preproc/WParser.java
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
||||||
// $ANTLR 2.7.2: "expandedWParser.g" -> "WLexer.java"$
|
// $ANTLR 2.7.2: "expandedWParser.g" -> "WLexer.java"$
|
||||||
|
|
||||||
package processing.app.preproc;
|
package processing.app.preproc;
|
||||||
|
|
||||||
|
@ -6,157 +6,157 @@ import java.io.*;
|
||||||
|
|
||||||
import antlr.CommonAST;
|
import antlr.CommonAST;
|
||||||
import antlr.DumpASTVisitor;
|
import antlr.DumpASTVisitor;
|
||||||
|
|
||||||
public interface WTokenTypes {
|
public interface WTokenTypes {
|
||||||
int EOF = 1;
|
int EOF = 1;
|
||||||
int NULL_TREE_LOOKAHEAD = 3;
|
int NULL_TREE_LOOKAHEAD = 3;
|
||||||
int LITERAL_typedef = 4;
|
int LITERAL_typedef = 4;
|
||||||
int LITERAL_asm = 5;
|
int LITERAL_asm = 5;
|
||||||
int LITERAL_volatile = 6;
|
int LITERAL_volatile = 6;
|
||||||
int LCURLY = 7;
|
int LCURLY = 7;
|
||||||
int RCURLY = 8;
|
int RCURLY = 8;
|
||||||
int SEMI = 9;
|
int SEMI = 9;
|
||||||
int LITERAL_struct = 10;
|
int LITERAL_struct = 10;
|
||||||
int LITERAL_union = 11;
|
int LITERAL_union = 11;
|
||||||
int LITERAL_enum = 12;
|
int LITERAL_enum = 12;
|
||||||
int LITERAL_auto = 13;
|
int LITERAL_auto = 13;
|
||||||
int LITERAL_register = 14;
|
int LITERAL_register = 14;
|
||||||
int LITERAL_extern = 15;
|
int LITERAL_extern = 15;
|
||||||
int LITERAL_static = 16;
|
int LITERAL_static = 16;
|
||||||
int LITERAL_const = 17;
|
int LITERAL_const = 17;
|
||||||
int LITERAL_void = 18;
|
int LITERAL_void = 18;
|
||||||
int LITERAL_char = 19;
|
int LITERAL_char = 19;
|
||||||
int LITERAL_short = 20;
|
int LITERAL_short = 20;
|
||||||
int LITERAL_int = 21;
|
int LITERAL_int = 21;
|
||||||
int LITERAL_long = 22;
|
int LITERAL_long = 22;
|
||||||
int LITERAL_float = 23;
|
int LITERAL_float = 23;
|
||||||
int LITERAL_double = 24;
|
int LITERAL_double = 24;
|
||||||
int LITERAL_signed = 25;
|
int LITERAL_signed = 25;
|
||||||
int LITERAL_unsigned = 26;
|
int LITERAL_unsigned = 26;
|
||||||
int ID = 27;
|
int ID = 27;
|
||||||
int COMMA = 28;
|
int COMMA = 28;
|
||||||
int COLON = 29;
|
int COLON = 29;
|
||||||
int ASSIGN = 30;
|
int ASSIGN = 30;
|
||||||
int STAR = 31;
|
int STAR = 31;
|
||||||
int LPAREN = 32;
|
int LPAREN = 32;
|
||||||
int RPAREN = 33;
|
int RPAREN = 33;
|
||||||
int LBRACKET = 34;
|
int LBRACKET = 34;
|
||||||
int RBRACKET = 35;
|
int RBRACKET = 35;
|
||||||
int VARARGS = 36;
|
int VARARGS = 36;
|
||||||
int LITERAL_while = 37;
|
int LITERAL_while = 37;
|
||||||
int LITERAL_do = 38;
|
int LITERAL_do = 38;
|
||||||
int LITERAL_for = 39;
|
int LITERAL_for = 39;
|
||||||
int LITERAL_goto = 40;
|
int LITERAL_goto = 40;
|
||||||
int LITERAL_continue = 41;
|
int LITERAL_continue = 41;
|
||||||
int LITERAL_break = 42;
|
int LITERAL_break = 42;
|
||||||
int LITERAL_return = 43;
|
int LITERAL_return = 43;
|
||||||
int LITERAL_case = 44;
|
int LITERAL_case = 44;
|
||||||
int LITERAL_default = 45;
|
int LITERAL_default = 45;
|
||||||
int LITERAL_if = 46;
|
int LITERAL_if = 46;
|
||||||
int LITERAL_else = 47;
|
int LITERAL_else = 47;
|
||||||
int LITERAL_switch = 48;
|
int LITERAL_switch = 48;
|
||||||
int DIV_ASSIGN = 49;
|
int DIV_ASSIGN = 49;
|
||||||
int PLUS_ASSIGN = 50;
|
int PLUS_ASSIGN = 50;
|
||||||
int MINUS_ASSIGN = 51;
|
int MINUS_ASSIGN = 51;
|
||||||
int STAR_ASSIGN = 52;
|
int STAR_ASSIGN = 52;
|
||||||
int MOD_ASSIGN = 53;
|
int MOD_ASSIGN = 53;
|
||||||
int RSHIFT_ASSIGN = 54;
|
int RSHIFT_ASSIGN = 54;
|
||||||
int LSHIFT_ASSIGN = 55;
|
int LSHIFT_ASSIGN = 55;
|
||||||
int BAND_ASSIGN = 56;
|
int BAND_ASSIGN = 56;
|
||||||
int BOR_ASSIGN = 57;
|
int BOR_ASSIGN = 57;
|
||||||
int BXOR_ASSIGN = 58;
|
int BXOR_ASSIGN = 58;
|
||||||
int QUESTION = 59;
|
int QUESTION = 59;
|
||||||
int LOR = 60;
|
int LOR = 60;
|
||||||
int LAND = 61;
|
int LAND = 61;
|
||||||
int BOR = 62;
|
int BOR = 62;
|
||||||
int BXOR = 63;
|
int BXOR = 63;
|
||||||
int BAND = 64;
|
int BAND = 64;
|
||||||
int EQUAL = 65;
|
int EQUAL = 65;
|
||||||
int NOT_EQUAL = 66;
|
int NOT_EQUAL = 66;
|
||||||
int LT = 67;
|
int LT = 67;
|
||||||
int LTE = 68;
|
int LTE = 68;
|
||||||
int GT = 69;
|
int GT = 69;
|
||||||
int GTE = 70;
|
int GTE = 70;
|
||||||
int LSHIFT = 71;
|
int LSHIFT = 71;
|
||||||
int RSHIFT = 72;
|
int RSHIFT = 72;
|
||||||
int PLUS = 73;
|
int PLUS = 73;
|
||||||
int MINUS = 74;
|
int MINUS = 74;
|
||||||
int DIV = 75;
|
int DIV = 75;
|
||||||
int MOD = 76;
|
int MOD = 76;
|
||||||
int INC = 77;
|
int INC = 77;
|
||||||
int DEC = 78;
|
int DEC = 78;
|
||||||
int LITERAL_sizeof = 79;
|
int LITERAL_sizeof = 79;
|
||||||
int BNOT = 80;
|
int BNOT = 80;
|
||||||
int LNOT = 81;
|
int LNOT = 81;
|
||||||
int PTR = 82;
|
int PTR = 82;
|
||||||
int DOT = 83;
|
int DOT = 83;
|
||||||
int CharLiteral = 84;
|
int CharLiteral = 84;
|
||||||
int StringLiteral = 85;
|
int StringLiteral = 85;
|
||||||
int IntOctalConst = 86;
|
int IntOctalConst = 86;
|
||||||
int LongOctalConst = 87;
|
int LongOctalConst = 87;
|
||||||
int UnsignedOctalConst = 88;
|
int UnsignedOctalConst = 88;
|
||||||
int IntIntConst = 89;
|
int IntIntConst = 89;
|
||||||
int LongIntConst = 90;
|
int LongIntConst = 90;
|
||||||
int UnsignedIntConst = 91;
|
int UnsignedIntConst = 91;
|
||||||
int IntHexConst = 92;
|
int IntHexConst = 92;
|
||||||
int LongHexConst = 93;
|
int LongHexConst = 93;
|
||||||
int UnsignedHexConst = 94;
|
int UnsignedHexConst = 94;
|
||||||
int FloatDoubleConst = 95;
|
int FloatDoubleConst = 95;
|
||||||
int DoubleDoubleConst = 96;
|
int DoubleDoubleConst = 96;
|
||||||
int LongDoubleConst = 97;
|
int LongDoubleConst = 97;
|
||||||
int NTypedefName = 98;
|
int NTypedefName = 98;
|
||||||
int NInitDecl = 99;
|
int NInitDecl = 99;
|
||||||
int NDeclarator = 100;
|
int NDeclarator = 100;
|
||||||
int NStructDeclarator = 101;
|
int NStructDeclarator = 101;
|
||||||
int NDeclaration = 102;
|
int NDeclaration = 102;
|
||||||
int NCast = 103;
|
int NCast = 103;
|
||||||
int NPointerGroup = 104;
|
int NPointerGroup = 104;
|
||||||
int NExpressionGroup = 105;
|
int NExpressionGroup = 105;
|
||||||
int NFunctionCallArgs = 106;
|
int NFunctionCallArgs = 106;
|
||||||
int NNonemptyAbstractDeclarator = 107;
|
int NNonemptyAbstractDeclarator = 107;
|
||||||
int NInitializer = 108;
|
int NInitializer = 108;
|
||||||
int NStatementExpr = 109;
|
int NStatementExpr = 109;
|
||||||
int NEmptyExpression = 110;
|
int NEmptyExpression = 110;
|
||||||
int NParameterTypeList = 111;
|
int NParameterTypeList = 111;
|
||||||
int NFunctionDef = 112;
|
int NFunctionDef = 112;
|
||||||
int NCompoundStatement = 113;
|
int NCompoundStatement = 113;
|
||||||
int NParameterDeclaration = 114;
|
int NParameterDeclaration = 114;
|
||||||
int NCommaExpr = 115;
|
int NCommaExpr = 115;
|
||||||
int NUnaryExpr = 116;
|
int NUnaryExpr = 116;
|
||||||
int NLabel = 117;
|
int NLabel = 117;
|
||||||
int NPostfixExpr = 118;
|
int NPostfixExpr = 118;
|
||||||
int NRangeExpr = 119;
|
int NRangeExpr = 119;
|
||||||
int NStringSeq = 120;
|
int NStringSeq = 120;
|
||||||
int NInitializerElementLabel = 121;
|
int NInitializerElementLabel = 121;
|
||||||
int NLcurlyInitializer = 122;
|
int NLcurlyInitializer = 122;
|
||||||
int NAsmAttribute = 123;
|
int NAsmAttribute = 123;
|
||||||
int NGnuAsmExpr = 124;
|
int NGnuAsmExpr = 124;
|
||||||
int NTypeMissing = 125;
|
int NTypeMissing = 125;
|
||||||
int Vocabulary = 126;
|
int Vocabulary = 126;
|
||||||
int Whitespace = 127;
|
int Whitespace = 127;
|
||||||
int Comment = 128;
|
int Comment = 128;
|
||||||
int CPPComment = 129;
|
int CPPComment = 129;
|
||||||
int PREPROC_DIRECTIVE = 130;
|
int PREPROC_DIRECTIVE = 130;
|
||||||
int Space = 131;
|
int Space = 131;
|
||||||
int LineDirective = 132;
|
int LineDirective = 132;
|
||||||
int BadStringLiteral = 133;
|
int BadStringLiteral = 133;
|
||||||
int Escape = 134;
|
int Escape = 134;
|
||||||
int Digit = 135;
|
int Digit = 135;
|
||||||
int LongSuffix = 136;
|
int LongSuffix = 136;
|
||||||
int UnsignedSuffix = 137;
|
int UnsignedSuffix = 137;
|
||||||
int FloatSuffix = 138;
|
int FloatSuffix = 138;
|
||||||
int Exponent = 139;
|
int Exponent = 139;
|
||||||
int Number = 140;
|
int Number = 140;
|
||||||
int LITERAL___label__ = 141;
|
int LITERAL___label__ = 141;
|
||||||
int LITERAL_inline = 142;
|
int LITERAL_inline = 142;
|
||||||
int LITERAL_byte = 143;
|
int LITERAL_byte = 143;
|
||||||
int LITERAL_boolean = 144;
|
int LITERAL_boolean = 144;
|
||||||
int LITERAL_Servo = 145;
|
int LITERAL_Servo = 145;
|
||||||
int LITERAL_Wire = 146;
|
int LITERAL_Wire = 146;
|
||||||
int LITERAL_typeof = 147;
|
int LITERAL_typeof = 147;
|
||||||
int LITERAL___complex = 148;
|
int LITERAL___complex = 148;
|
||||||
int LITERAL___attribute = 149;
|
int LITERAL___attribute = 149;
|
||||||
int LITERAL___alignof = 150;
|
int LITERAL___alignof = 150;
|
||||||
int LITERAL___real = 151;
|
int LITERAL___real = 151;
|
||||||
int LITERAL___imag = 152;
|
int LITERAL___imag = 152;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,151 +1,151 @@
|
||||||
// $ANTLR 2.7.2: expandedWParser.g -> WTokenTypes.txt$
|
// $ANTLR 2.7.2: expandedWParser.g -> WTokenTypes.txt$
|
||||||
W // output token vocab name
|
W // output token vocab name
|
||||||
LITERAL_typedef="typedef"=4
|
LITERAL_typedef="typedef"=4
|
||||||
LITERAL_asm="asm"=5
|
LITERAL_asm="asm"=5
|
||||||
LITERAL_volatile="volatile"=6
|
LITERAL_volatile="volatile"=6
|
||||||
LCURLY=7
|
LCURLY=7
|
||||||
RCURLY=8
|
RCURLY=8
|
||||||
SEMI=9
|
SEMI=9
|
||||||
LITERAL_struct="struct"=10
|
LITERAL_struct="struct"=10
|
||||||
LITERAL_union="union"=11
|
LITERAL_union="union"=11
|
||||||
LITERAL_enum="enum"=12
|
LITERAL_enum="enum"=12
|
||||||
LITERAL_auto="auto"=13
|
LITERAL_auto="auto"=13
|
||||||
LITERAL_register="register"=14
|
LITERAL_register="register"=14
|
||||||
LITERAL_extern="extern"=15
|
LITERAL_extern="extern"=15
|
||||||
LITERAL_static="static"=16
|
LITERAL_static="static"=16
|
||||||
LITERAL_const="const"=17
|
LITERAL_const="const"=17
|
||||||
LITERAL_void="void"=18
|
LITERAL_void="void"=18
|
||||||
LITERAL_char="char"=19
|
LITERAL_char="char"=19
|
||||||
LITERAL_short="short"=20
|
LITERAL_short="short"=20
|
||||||
LITERAL_int="int"=21
|
LITERAL_int="int"=21
|
||||||
LITERAL_long="long"=22
|
LITERAL_long="long"=22
|
||||||
LITERAL_float="float"=23
|
LITERAL_float="float"=23
|
||||||
LITERAL_double="double"=24
|
LITERAL_double="double"=24
|
||||||
LITERAL_signed="signed"=25
|
LITERAL_signed="signed"=25
|
||||||
LITERAL_unsigned="unsigned"=26
|
LITERAL_unsigned="unsigned"=26
|
||||||
ID=27
|
ID=27
|
||||||
COMMA=28
|
COMMA=28
|
||||||
COLON=29
|
COLON=29
|
||||||
ASSIGN=30
|
ASSIGN=30
|
||||||
STAR=31
|
STAR=31
|
||||||
LPAREN=32
|
LPAREN=32
|
||||||
RPAREN=33
|
RPAREN=33
|
||||||
LBRACKET=34
|
LBRACKET=34
|
||||||
RBRACKET=35
|
RBRACKET=35
|
||||||
VARARGS=36
|
VARARGS=36
|
||||||
LITERAL_while="while"=37
|
LITERAL_while="while"=37
|
||||||
LITERAL_do="do"=38
|
LITERAL_do="do"=38
|
||||||
LITERAL_for="for"=39
|
LITERAL_for="for"=39
|
||||||
LITERAL_goto="goto"=40
|
LITERAL_goto="goto"=40
|
||||||
LITERAL_continue="continue"=41
|
LITERAL_continue="continue"=41
|
||||||
LITERAL_break="break"=42
|
LITERAL_break="break"=42
|
||||||
LITERAL_return="return"=43
|
LITERAL_return="return"=43
|
||||||
LITERAL_case="case"=44
|
LITERAL_case="case"=44
|
||||||
LITERAL_default="default"=45
|
LITERAL_default="default"=45
|
||||||
LITERAL_if="if"=46
|
LITERAL_if="if"=46
|
||||||
LITERAL_else="else"=47
|
LITERAL_else="else"=47
|
||||||
LITERAL_switch="switch"=48
|
LITERAL_switch="switch"=48
|
||||||
DIV_ASSIGN=49
|
DIV_ASSIGN=49
|
||||||
PLUS_ASSIGN=50
|
PLUS_ASSIGN=50
|
||||||
MINUS_ASSIGN=51
|
MINUS_ASSIGN=51
|
||||||
STAR_ASSIGN=52
|
STAR_ASSIGN=52
|
||||||
MOD_ASSIGN=53
|
MOD_ASSIGN=53
|
||||||
RSHIFT_ASSIGN=54
|
RSHIFT_ASSIGN=54
|
||||||
LSHIFT_ASSIGN=55
|
LSHIFT_ASSIGN=55
|
||||||
BAND_ASSIGN=56
|
BAND_ASSIGN=56
|
||||||
BOR_ASSIGN=57
|
BOR_ASSIGN=57
|
||||||
BXOR_ASSIGN=58
|
BXOR_ASSIGN=58
|
||||||
QUESTION=59
|
QUESTION=59
|
||||||
LOR=60
|
LOR=60
|
||||||
LAND=61
|
LAND=61
|
||||||
BOR=62
|
BOR=62
|
||||||
BXOR=63
|
BXOR=63
|
||||||
BAND=64
|
BAND=64
|
||||||
EQUAL=65
|
EQUAL=65
|
||||||
NOT_EQUAL=66
|
NOT_EQUAL=66
|
||||||
LT=67
|
LT=67
|
||||||
LTE=68
|
LTE=68
|
||||||
GT=69
|
GT=69
|
||||||
GTE=70
|
GTE=70
|
||||||
LSHIFT=71
|
LSHIFT=71
|
||||||
RSHIFT=72
|
RSHIFT=72
|
||||||
PLUS=73
|
PLUS=73
|
||||||
MINUS=74
|
MINUS=74
|
||||||
DIV=75
|
DIV=75
|
||||||
MOD=76
|
MOD=76
|
||||||
INC=77
|
INC=77
|
||||||
DEC=78
|
DEC=78
|
||||||
LITERAL_sizeof="sizeof"=79
|
LITERAL_sizeof="sizeof"=79
|
||||||
BNOT=80
|
BNOT=80
|
||||||
LNOT=81
|
LNOT=81
|
||||||
PTR=82
|
PTR=82
|
||||||
DOT=83
|
DOT=83
|
||||||
CharLiteral=84
|
CharLiteral=84
|
||||||
StringLiteral=85
|
StringLiteral=85
|
||||||
IntOctalConst=86
|
IntOctalConst=86
|
||||||
LongOctalConst=87
|
LongOctalConst=87
|
||||||
UnsignedOctalConst=88
|
UnsignedOctalConst=88
|
||||||
IntIntConst=89
|
IntIntConst=89
|
||||||
LongIntConst=90
|
LongIntConst=90
|
||||||
UnsignedIntConst=91
|
UnsignedIntConst=91
|
||||||
IntHexConst=92
|
IntHexConst=92
|
||||||
LongHexConst=93
|
LongHexConst=93
|
||||||
UnsignedHexConst=94
|
UnsignedHexConst=94
|
||||||
FloatDoubleConst=95
|
FloatDoubleConst=95
|
||||||
DoubleDoubleConst=96
|
DoubleDoubleConst=96
|
||||||
LongDoubleConst=97
|
LongDoubleConst=97
|
||||||
NTypedefName=98
|
NTypedefName=98
|
||||||
NInitDecl=99
|
NInitDecl=99
|
||||||
NDeclarator=100
|
NDeclarator=100
|
||||||
NStructDeclarator=101
|
NStructDeclarator=101
|
||||||
NDeclaration=102
|
NDeclaration=102
|
||||||
NCast=103
|
NCast=103
|
||||||
NPointerGroup=104
|
NPointerGroup=104
|
||||||
NExpressionGroup=105
|
NExpressionGroup=105
|
||||||
NFunctionCallArgs=106
|
NFunctionCallArgs=106
|
||||||
NNonemptyAbstractDeclarator=107
|
NNonemptyAbstractDeclarator=107
|
||||||
NInitializer=108
|
NInitializer=108
|
||||||
NStatementExpr=109
|
NStatementExpr=109
|
||||||
NEmptyExpression=110
|
NEmptyExpression=110
|
||||||
NParameterTypeList=111
|
NParameterTypeList=111
|
||||||
NFunctionDef=112
|
NFunctionDef=112
|
||||||
NCompoundStatement=113
|
NCompoundStatement=113
|
||||||
NParameterDeclaration=114
|
NParameterDeclaration=114
|
||||||
NCommaExpr=115
|
NCommaExpr=115
|
||||||
NUnaryExpr=116
|
NUnaryExpr=116
|
||||||
NLabel=117
|
NLabel=117
|
||||||
NPostfixExpr=118
|
NPostfixExpr=118
|
||||||
NRangeExpr=119
|
NRangeExpr=119
|
||||||
NStringSeq=120
|
NStringSeq=120
|
||||||
NInitializerElementLabel=121
|
NInitializerElementLabel=121
|
||||||
NLcurlyInitializer=122
|
NLcurlyInitializer=122
|
||||||
NAsmAttribute=123
|
NAsmAttribute=123
|
||||||
NGnuAsmExpr=124
|
NGnuAsmExpr=124
|
||||||
NTypeMissing=125
|
NTypeMissing=125
|
||||||
Vocabulary=126
|
Vocabulary=126
|
||||||
Whitespace=127
|
Whitespace=127
|
||||||
Comment=128
|
Comment=128
|
||||||
CPPComment=129
|
CPPComment=129
|
||||||
PREPROC_DIRECTIVE("a line directive")=130
|
PREPROC_DIRECTIVE("a line directive")=130
|
||||||
Space=131
|
Space=131
|
||||||
LineDirective=132
|
LineDirective=132
|
||||||
BadStringLiteral=133
|
BadStringLiteral=133
|
||||||
Escape=134
|
Escape=134
|
||||||
Digit=135
|
Digit=135
|
||||||
LongSuffix=136
|
LongSuffix=136
|
||||||
UnsignedSuffix=137
|
UnsignedSuffix=137
|
||||||
FloatSuffix=138
|
FloatSuffix=138
|
||||||
Exponent=139
|
Exponent=139
|
||||||
Number=140
|
Number=140
|
||||||
LITERAL___label__="__label__"=141
|
LITERAL___label__="__label__"=141
|
||||||
LITERAL_inline="inline"=142
|
LITERAL_inline="inline"=142
|
||||||
LITERAL_byte="byte"=143
|
LITERAL_byte="byte"=143
|
||||||
LITERAL_boolean="boolean"=144
|
LITERAL_boolean="boolean"=144
|
||||||
LITERAL_Servo="Servo"=145
|
LITERAL_Servo="Servo"=145
|
||||||
LITERAL_Wire="Wire"=146
|
LITERAL_Wire="Wire"=146
|
||||||
LITERAL_typeof="typeof"=147
|
LITERAL_typeof="typeof"=147
|
||||||
LITERAL___complex="__complex"=148
|
LITERAL___complex="__complex"=148
|
||||||
LITERAL___attribute="__attribute"=149
|
LITERAL___attribute="__attribute"=149
|
||||||
LITERAL___alignof="__alignof"=150
|
LITERAL___alignof="__alignof"=150
|
||||||
LITERAL___real="__real"=151
|
LITERAL___real="__real"=151
|
||||||
LITERAL___imag="__imag"=152
|
LITERAL___imag="__imag"=152
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
||||||
// $ANTLR 2.7.2: "WTreeParser.g" -> "WTreeParser.java"$
|
// $ANTLR 2.7.2: "WTreeParser.g" -> "WTreeParser.java"$
|
||||||
|
|
||||||
package processing.app.preproc;
|
package processing.app.preproc;
|
||||||
|
|
||||||
|
@ -6,157 +6,157 @@ import java.io.*;
|
||||||
|
|
||||||
import antlr.CommonAST;
|
import antlr.CommonAST;
|
||||||
import antlr.DumpASTVisitor;
|
import antlr.DumpASTVisitor;
|
||||||
|
|
||||||
public interface WTreeParserTokenTypes {
|
public interface WTreeParserTokenTypes {
|
||||||
int EOF = 1;
|
int EOF = 1;
|
||||||
int NULL_TREE_LOOKAHEAD = 3;
|
int NULL_TREE_LOOKAHEAD = 3;
|
||||||
int LITERAL_typedef = 4;
|
int LITERAL_typedef = 4;
|
||||||
int LITERAL_asm = 5;
|
int LITERAL_asm = 5;
|
||||||
int LITERAL_volatile = 6;
|
int LITERAL_volatile = 6;
|
||||||
int LCURLY = 7;
|
int LCURLY = 7;
|
||||||
int RCURLY = 8;
|
int RCURLY = 8;
|
||||||
int SEMI = 9;
|
int SEMI = 9;
|
||||||
int LITERAL_struct = 10;
|
int LITERAL_struct = 10;
|
||||||
int LITERAL_union = 11;
|
int LITERAL_union = 11;
|
||||||
int LITERAL_enum = 12;
|
int LITERAL_enum = 12;
|
||||||
int LITERAL_auto = 13;
|
int LITERAL_auto = 13;
|
||||||
int LITERAL_register = 14;
|
int LITERAL_register = 14;
|
||||||
int LITERAL_extern = 15;
|
int LITERAL_extern = 15;
|
||||||
int LITERAL_static = 16;
|
int LITERAL_static = 16;
|
||||||
int LITERAL_const = 17;
|
int LITERAL_const = 17;
|
||||||
int LITERAL_void = 18;
|
int LITERAL_void = 18;
|
||||||
int LITERAL_char = 19;
|
int LITERAL_char = 19;
|
||||||
int LITERAL_short = 20;
|
int LITERAL_short = 20;
|
||||||
int LITERAL_int = 21;
|
int LITERAL_int = 21;
|
||||||
int LITERAL_long = 22;
|
int LITERAL_long = 22;
|
||||||
int LITERAL_float = 23;
|
int LITERAL_float = 23;
|
||||||
int LITERAL_double = 24;
|
int LITERAL_double = 24;
|
||||||
int LITERAL_signed = 25;
|
int LITERAL_signed = 25;
|
||||||
int LITERAL_unsigned = 26;
|
int LITERAL_unsigned = 26;
|
||||||
int ID = 27;
|
int ID = 27;
|
||||||
int COMMA = 28;
|
int COMMA = 28;
|
||||||
int COLON = 29;
|
int COLON = 29;
|
||||||
int ASSIGN = 30;
|
int ASSIGN = 30;
|
||||||
int STAR = 31;
|
int STAR = 31;
|
||||||
int LPAREN = 32;
|
int LPAREN = 32;
|
||||||
int RPAREN = 33;
|
int RPAREN = 33;
|
||||||
int LBRACKET = 34;
|
int LBRACKET = 34;
|
||||||
int RBRACKET = 35;
|
int RBRACKET = 35;
|
||||||
int VARARGS = 36;
|
int VARARGS = 36;
|
||||||
int LITERAL_while = 37;
|
int LITERAL_while = 37;
|
||||||
int LITERAL_do = 38;
|
int LITERAL_do = 38;
|
||||||
int LITERAL_for = 39;
|
int LITERAL_for = 39;
|
||||||
int LITERAL_goto = 40;
|
int LITERAL_goto = 40;
|
||||||
int LITERAL_continue = 41;
|
int LITERAL_continue = 41;
|
||||||
int LITERAL_break = 42;
|
int LITERAL_break = 42;
|
||||||
int LITERAL_return = 43;
|
int LITERAL_return = 43;
|
||||||
int LITERAL_case = 44;
|
int LITERAL_case = 44;
|
||||||
int LITERAL_default = 45;
|
int LITERAL_default = 45;
|
||||||
int LITERAL_if = 46;
|
int LITERAL_if = 46;
|
||||||
int LITERAL_else = 47;
|
int LITERAL_else = 47;
|
||||||
int LITERAL_switch = 48;
|
int LITERAL_switch = 48;
|
||||||
int DIV_ASSIGN = 49;
|
int DIV_ASSIGN = 49;
|
||||||
int PLUS_ASSIGN = 50;
|
int PLUS_ASSIGN = 50;
|
||||||
int MINUS_ASSIGN = 51;
|
int MINUS_ASSIGN = 51;
|
||||||
int STAR_ASSIGN = 52;
|
int STAR_ASSIGN = 52;
|
||||||
int MOD_ASSIGN = 53;
|
int MOD_ASSIGN = 53;
|
||||||
int RSHIFT_ASSIGN = 54;
|
int RSHIFT_ASSIGN = 54;
|
||||||
int LSHIFT_ASSIGN = 55;
|
int LSHIFT_ASSIGN = 55;
|
||||||
int BAND_ASSIGN = 56;
|
int BAND_ASSIGN = 56;
|
||||||
int BOR_ASSIGN = 57;
|
int BOR_ASSIGN = 57;
|
||||||
int BXOR_ASSIGN = 58;
|
int BXOR_ASSIGN = 58;
|
||||||
int QUESTION = 59;
|
int QUESTION = 59;
|
||||||
int LOR = 60;
|
int LOR = 60;
|
||||||
int LAND = 61;
|
int LAND = 61;
|
||||||
int BOR = 62;
|
int BOR = 62;
|
||||||
int BXOR = 63;
|
int BXOR = 63;
|
||||||
int BAND = 64;
|
int BAND = 64;
|
||||||
int EQUAL = 65;
|
int EQUAL = 65;
|
||||||
int NOT_EQUAL = 66;
|
int NOT_EQUAL = 66;
|
||||||
int LT = 67;
|
int LT = 67;
|
||||||
int LTE = 68;
|
int LTE = 68;
|
||||||
int GT = 69;
|
int GT = 69;
|
||||||
int GTE = 70;
|
int GTE = 70;
|
||||||
int LSHIFT = 71;
|
int LSHIFT = 71;
|
||||||
int RSHIFT = 72;
|
int RSHIFT = 72;
|
||||||
int PLUS = 73;
|
int PLUS = 73;
|
||||||
int MINUS = 74;
|
int MINUS = 74;
|
||||||
int DIV = 75;
|
int DIV = 75;
|
||||||
int MOD = 76;
|
int MOD = 76;
|
||||||
int INC = 77;
|
int INC = 77;
|
||||||
int DEC = 78;
|
int DEC = 78;
|
||||||
int LITERAL_sizeof = 79;
|
int LITERAL_sizeof = 79;
|
||||||
int BNOT = 80;
|
int BNOT = 80;
|
||||||
int LNOT = 81;
|
int LNOT = 81;
|
||||||
int PTR = 82;
|
int PTR = 82;
|
||||||
int DOT = 83;
|
int DOT = 83;
|
||||||
int CharLiteral = 84;
|
int CharLiteral = 84;
|
||||||
int StringLiteral = 85;
|
int StringLiteral = 85;
|
||||||
int IntOctalConst = 86;
|
int IntOctalConst = 86;
|
||||||
int LongOctalConst = 87;
|
int LongOctalConst = 87;
|
||||||
int UnsignedOctalConst = 88;
|
int UnsignedOctalConst = 88;
|
||||||
int IntIntConst = 89;
|
int IntIntConst = 89;
|
||||||
int LongIntConst = 90;
|
int LongIntConst = 90;
|
||||||
int UnsignedIntConst = 91;
|
int UnsignedIntConst = 91;
|
||||||
int IntHexConst = 92;
|
int IntHexConst = 92;
|
||||||
int LongHexConst = 93;
|
int LongHexConst = 93;
|
||||||
int UnsignedHexConst = 94;
|
int UnsignedHexConst = 94;
|
||||||
int FloatDoubleConst = 95;
|
int FloatDoubleConst = 95;
|
||||||
int DoubleDoubleConst = 96;
|
int DoubleDoubleConst = 96;
|
||||||
int LongDoubleConst = 97;
|
int LongDoubleConst = 97;
|
||||||
int NTypedefName = 98;
|
int NTypedefName = 98;
|
||||||
int NInitDecl = 99;
|
int NInitDecl = 99;
|
||||||
int NDeclarator = 100;
|
int NDeclarator = 100;
|
||||||
int NStructDeclarator = 101;
|
int NStructDeclarator = 101;
|
||||||
int NDeclaration = 102;
|
int NDeclaration = 102;
|
||||||
int NCast = 103;
|
int NCast = 103;
|
||||||
int NPointerGroup = 104;
|
int NPointerGroup = 104;
|
||||||
int NExpressionGroup = 105;
|
int NExpressionGroup = 105;
|
||||||
int NFunctionCallArgs = 106;
|
int NFunctionCallArgs = 106;
|
||||||
int NNonemptyAbstractDeclarator = 107;
|
int NNonemptyAbstractDeclarator = 107;
|
||||||
int NInitializer = 108;
|
int NInitializer = 108;
|
||||||
int NStatementExpr = 109;
|
int NStatementExpr = 109;
|
||||||
int NEmptyExpression = 110;
|
int NEmptyExpression = 110;
|
||||||
int NParameterTypeList = 111;
|
int NParameterTypeList = 111;
|
||||||
int NFunctionDef = 112;
|
int NFunctionDef = 112;
|
||||||
int NCompoundStatement = 113;
|
int NCompoundStatement = 113;
|
||||||
int NParameterDeclaration = 114;
|
int NParameterDeclaration = 114;
|
||||||
int NCommaExpr = 115;
|
int NCommaExpr = 115;
|
||||||
int NUnaryExpr = 116;
|
int NUnaryExpr = 116;
|
||||||
int NLabel = 117;
|
int NLabel = 117;
|
||||||
int NPostfixExpr = 118;
|
int NPostfixExpr = 118;
|
||||||
int NRangeExpr = 119;
|
int NRangeExpr = 119;
|
||||||
int NStringSeq = 120;
|
int NStringSeq = 120;
|
||||||
int NInitializerElementLabel = 121;
|
int NInitializerElementLabel = 121;
|
||||||
int NLcurlyInitializer = 122;
|
int NLcurlyInitializer = 122;
|
||||||
int NAsmAttribute = 123;
|
int NAsmAttribute = 123;
|
||||||
int NGnuAsmExpr = 124;
|
int NGnuAsmExpr = 124;
|
||||||
int NTypeMissing = 125;
|
int NTypeMissing = 125;
|
||||||
int Vocabulary = 126;
|
int Vocabulary = 126;
|
||||||
int Whitespace = 127;
|
int Whitespace = 127;
|
||||||
int Comment = 128;
|
int Comment = 128;
|
||||||
int CPPComment = 129;
|
int CPPComment = 129;
|
||||||
int PREPROC_DIRECTIVE = 130;
|
int PREPROC_DIRECTIVE = 130;
|
||||||
int Space = 131;
|
int Space = 131;
|
||||||
int LineDirective = 132;
|
int LineDirective = 132;
|
||||||
int BadStringLiteral = 133;
|
int BadStringLiteral = 133;
|
||||||
int Escape = 134;
|
int Escape = 134;
|
||||||
int Digit = 135;
|
int Digit = 135;
|
||||||
int LongSuffix = 136;
|
int LongSuffix = 136;
|
||||||
int UnsignedSuffix = 137;
|
int UnsignedSuffix = 137;
|
||||||
int FloatSuffix = 138;
|
int FloatSuffix = 138;
|
||||||
int Exponent = 139;
|
int Exponent = 139;
|
||||||
int Number = 140;
|
int Number = 140;
|
||||||
int LITERAL___label__ = 141;
|
int LITERAL___label__ = 141;
|
||||||
int LITERAL_inline = 142;
|
int LITERAL_inline = 142;
|
||||||
int LITERAL_byte = 143;
|
int LITERAL_byte = 143;
|
||||||
int LITERAL_boolean = 144;
|
int LITERAL_boolean = 144;
|
||||||
int LITERAL_Servo = 145;
|
int LITERAL_Servo = 145;
|
||||||
int LITERAL_Wire = 146;
|
int LITERAL_Wire = 146;
|
||||||
int LITERAL_typeof = 147;
|
int LITERAL_typeof = 147;
|
||||||
int LITERAL___complex = 148;
|
int LITERAL___complex = 148;
|
||||||
int LITERAL___attribute = 149;
|
int LITERAL___attribute = 149;
|
||||||
int LITERAL___alignof = 150;
|
int LITERAL___alignof = 150;
|
||||||
int LITERAL___real = 151;
|
int LITERAL___real = 151;
|
||||||
int LITERAL___imag = 152;
|
int LITERAL___imag = 152;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,151 +1,151 @@
|
||||||
// $ANTLR 2.7.2: WTreeParser.g -> WTreeParserTokenTypes.txt$
|
// $ANTLR 2.7.2: WTreeParser.g -> WTreeParserTokenTypes.txt$
|
||||||
WTreeParser // output token vocab name
|
WTreeParser // output token vocab name
|
||||||
LITERAL_typedef="typedef"=4
|
LITERAL_typedef="typedef"=4
|
||||||
LITERAL_asm="asm"=5
|
LITERAL_asm="asm"=5
|
||||||
LITERAL_volatile="volatile"=6
|
LITERAL_volatile="volatile"=6
|
||||||
LCURLY=7
|
LCURLY=7
|
||||||
RCURLY=8
|
RCURLY=8
|
||||||
SEMI=9
|
SEMI=9
|
||||||
LITERAL_struct="struct"=10
|
LITERAL_struct="struct"=10
|
||||||
LITERAL_union="union"=11
|
LITERAL_union="union"=11
|
||||||
LITERAL_enum="enum"=12
|
LITERAL_enum="enum"=12
|
||||||
LITERAL_auto="auto"=13
|
LITERAL_auto="auto"=13
|
||||||
LITERAL_register="register"=14
|
LITERAL_register="register"=14
|
||||||
LITERAL_extern="extern"=15
|
LITERAL_extern="extern"=15
|
||||||
LITERAL_static="static"=16
|
LITERAL_static="static"=16
|
||||||
LITERAL_const="const"=17
|
LITERAL_const="const"=17
|
||||||
LITERAL_void="void"=18
|
LITERAL_void="void"=18
|
||||||
LITERAL_char="char"=19
|
LITERAL_char="char"=19
|
||||||
LITERAL_short="short"=20
|
LITERAL_short="short"=20
|
||||||
LITERAL_int="int"=21
|
LITERAL_int="int"=21
|
||||||
LITERAL_long="long"=22
|
LITERAL_long="long"=22
|
||||||
LITERAL_float="float"=23
|
LITERAL_float="float"=23
|
||||||
LITERAL_double="double"=24
|
LITERAL_double="double"=24
|
||||||
LITERAL_signed="signed"=25
|
LITERAL_signed="signed"=25
|
||||||
LITERAL_unsigned="unsigned"=26
|
LITERAL_unsigned="unsigned"=26
|
||||||
ID=27
|
ID=27
|
||||||
COMMA=28
|
COMMA=28
|
||||||
COLON=29
|
COLON=29
|
||||||
ASSIGN=30
|
ASSIGN=30
|
||||||
STAR=31
|
STAR=31
|
||||||
LPAREN=32
|
LPAREN=32
|
||||||
RPAREN=33
|
RPAREN=33
|
||||||
LBRACKET=34
|
LBRACKET=34
|
||||||
RBRACKET=35
|
RBRACKET=35
|
||||||
VARARGS=36
|
VARARGS=36
|
||||||
LITERAL_while="while"=37
|
LITERAL_while="while"=37
|
||||||
LITERAL_do="do"=38
|
LITERAL_do="do"=38
|
||||||
LITERAL_for="for"=39
|
LITERAL_for="for"=39
|
||||||
LITERAL_goto="goto"=40
|
LITERAL_goto="goto"=40
|
||||||
LITERAL_continue="continue"=41
|
LITERAL_continue="continue"=41
|
||||||
LITERAL_break="break"=42
|
LITERAL_break="break"=42
|
||||||
LITERAL_return="return"=43
|
LITERAL_return="return"=43
|
||||||
LITERAL_case="case"=44
|
LITERAL_case="case"=44
|
||||||
LITERAL_default="default"=45
|
LITERAL_default="default"=45
|
||||||
LITERAL_if="if"=46
|
LITERAL_if="if"=46
|
||||||
LITERAL_else="else"=47
|
LITERAL_else="else"=47
|
||||||
LITERAL_switch="switch"=48
|
LITERAL_switch="switch"=48
|
||||||
DIV_ASSIGN=49
|
DIV_ASSIGN=49
|
||||||
PLUS_ASSIGN=50
|
PLUS_ASSIGN=50
|
||||||
MINUS_ASSIGN=51
|
MINUS_ASSIGN=51
|
||||||
STAR_ASSIGN=52
|
STAR_ASSIGN=52
|
||||||
MOD_ASSIGN=53
|
MOD_ASSIGN=53
|
||||||
RSHIFT_ASSIGN=54
|
RSHIFT_ASSIGN=54
|
||||||
LSHIFT_ASSIGN=55
|
LSHIFT_ASSIGN=55
|
||||||
BAND_ASSIGN=56
|
BAND_ASSIGN=56
|
||||||
BOR_ASSIGN=57
|
BOR_ASSIGN=57
|
||||||
BXOR_ASSIGN=58
|
BXOR_ASSIGN=58
|
||||||
QUESTION=59
|
QUESTION=59
|
||||||
LOR=60
|
LOR=60
|
||||||
LAND=61
|
LAND=61
|
||||||
BOR=62
|
BOR=62
|
||||||
BXOR=63
|
BXOR=63
|
||||||
BAND=64
|
BAND=64
|
||||||
EQUAL=65
|
EQUAL=65
|
||||||
NOT_EQUAL=66
|
NOT_EQUAL=66
|
||||||
LT=67
|
LT=67
|
||||||
LTE=68
|
LTE=68
|
||||||
GT=69
|
GT=69
|
||||||
GTE=70
|
GTE=70
|
||||||
LSHIFT=71
|
LSHIFT=71
|
||||||
RSHIFT=72
|
RSHIFT=72
|
||||||
PLUS=73
|
PLUS=73
|
||||||
MINUS=74
|
MINUS=74
|
||||||
DIV=75
|
DIV=75
|
||||||
MOD=76
|
MOD=76
|
||||||
INC=77
|
INC=77
|
||||||
DEC=78
|
DEC=78
|
||||||
LITERAL_sizeof="sizeof"=79
|
LITERAL_sizeof="sizeof"=79
|
||||||
BNOT=80
|
BNOT=80
|
||||||
LNOT=81
|
LNOT=81
|
||||||
PTR=82
|
PTR=82
|
||||||
DOT=83
|
DOT=83
|
||||||
CharLiteral=84
|
CharLiteral=84
|
||||||
StringLiteral=85
|
StringLiteral=85
|
||||||
IntOctalConst=86
|
IntOctalConst=86
|
||||||
LongOctalConst=87
|
LongOctalConst=87
|
||||||
UnsignedOctalConst=88
|
UnsignedOctalConst=88
|
||||||
IntIntConst=89
|
IntIntConst=89
|
||||||
LongIntConst=90
|
LongIntConst=90
|
||||||
UnsignedIntConst=91
|
UnsignedIntConst=91
|
||||||
IntHexConst=92
|
IntHexConst=92
|
||||||
LongHexConst=93
|
LongHexConst=93
|
||||||
UnsignedHexConst=94
|
UnsignedHexConst=94
|
||||||
FloatDoubleConst=95
|
FloatDoubleConst=95
|
||||||
DoubleDoubleConst=96
|
DoubleDoubleConst=96
|
||||||
LongDoubleConst=97
|
LongDoubleConst=97
|
||||||
NTypedefName=98
|
NTypedefName=98
|
||||||
NInitDecl=99
|
NInitDecl=99
|
||||||
NDeclarator=100
|
NDeclarator=100
|
||||||
NStructDeclarator=101
|
NStructDeclarator=101
|
||||||
NDeclaration=102
|
NDeclaration=102
|
||||||
NCast=103
|
NCast=103
|
||||||
NPointerGroup=104
|
NPointerGroup=104
|
||||||
NExpressionGroup=105
|
NExpressionGroup=105
|
||||||
NFunctionCallArgs=106
|
NFunctionCallArgs=106
|
||||||
NNonemptyAbstractDeclarator=107
|
NNonemptyAbstractDeclarator=107
|
||||||
NInitializer=108
|
NInitializer=108
|
||||||
NStatementExpr=109
|
NStatementExpr=109
|
||||||
NEmptyExpression=110
|
NEmptyExpression=110
|
||||||
NParameterTypeList=111
|
NParameterTypeList=111
|
||||||
NFunctionDef=112
|
NFunctionDef=112
|
||||||
NCompoundStatement=113
|
NCompoundStatement=113
|
||||||
NParameterDeclaration=114
|
NParameterDeclaration=114
|
||||||
NCommaExpr=115
|
NCommaExpr=115
|
||||||
NUnaryExpr=116
|
NUnaryExpr=116
|
||||||
NLabel=117
|
NLabel=117
|
||||||
NPostfixExpr=118
|
NPostfixExpr=118
|
||||||
NRangeExpr=119
|
NRangeExpr=119
|
||||||
NStringSeq=120
|
NStringSeq=120
|
||||||
NInitializerElementLabel=121
|
NInitializerElementLabel=121
|
||||||
NLcurlyInitializer=122
|
NLcurlyInitializer=122
|
||||||
NAsmAttribute=123
|
NAsmAttribute=123
|
||||||
NGnuAsmExpr=124
|
NGnuAsmExpr=124
|
||||||
NTypeMissing=125
|
NTypeMissing=125
|
||||||
Vocabulary=126
|
Vocabulary=126
|
||||||
Whitespace=127
|
Whitespace=127
|
||||||
Comment=128
|
Comment=128
|
||||||
CPPComment=129
|
CPPComment=129
|
||||||
PREPROC_DIRECTIVE("a line directive")=130
|
PREPROC_DIRECTIVE("a line directive")=130
|
||||||
Space=131
|
Space=131
|
||||||
LineDirective=132
|
LineDirective=132
|
||||||
BadStringLiteral=133
|
BadStringLiteral=133
|
||||||
Escape=134
|
Escape=134
|
||||||
Digit=135
|
Digit=135
|
||||||
LongSuffix=136
|
LongSuffix=136
|
||||||
UnsignedSuffix=137
|
UnsignedSuffix=137
|
||||||
FloatSuffix=138
|
FloatSuffix=138
|
||||||
Exponent=139
|
Exponent=139
|
||||||
Number=140
|
Number=140
|
||||||
LITERAL___label__="__label__"=141
|
LITERAL___label__="__label__"=141
|
||||||
LITERAL_inline="inline"=142
|
LITERAL_inline="inline"=142
|
||||||
LITERAL_byte="byte"=143
|
LITERAL_byte="byte"=143
|
||||||
LITERAL_boolean="boolean"=144
|
LITERAL_boolean="boolean"=144
|
||||||
LITERAL_Servo="Servo"=145
|
LITERAL_Servo="Servo"=145
|
||||||
LITERAL_Wire="Wire"=146
|
LITERAL_Wire="Wire"=146
|
||||||
LITERAL_typeof="typeof"=147
|
LITERAL_typeof="typeof"=147
|
||||||
LITERAL___complex="__complex"=148
|
LITERAL___complex="__complex"=148
|
||||||
LITERAL___attribute="__attribute"=149
|
LITERAL___attribute="__attribute"=149
|
||||||
LITERAL___alignof="__alignof"=150
|
LITERAL___alignof="__alignof"=150
|
||||||
LITERAL___real="__real"=151
|
LITERAL___real="__real"=151
|
||||||
LITERAL___imag="__imag"=152
|
LITERAL___imag="__imag"=152
|
||||||
|
|
|
@ -6,17 +6,17 @@ import java.util.*;
|
||||||
|
|
||||||
import antlr.CommonAST;
|
import antlr.CommonAST;
|
||||||
import antlr.DumpASTVisitor;
|
import antlr.DumpASTVisitor;
|
||||||
}
|
}
|
||||||
class WEmitter extends TreeParser;
|
class WEmitter extends TreeParser;
|
||||||
|
|
||||||
options {
|
options {
|
||||||
importVocab= W;
|
importVocab= W;
|
||||||
buildAST= false;
|
buildAST= false;
|
||||||
ASTLabelType= "TNode";
|
ASTLabelType= "TNode";
|
||||||
codeGenMakeSwitchThreshold= 2;
|
codeGenMakeSwitchThreshold= 2;
|
||||||
codeGenBitsetTestThreshold= 3;
|
codeGenBitsetTestThreshold= 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
@ -359,29 +359,29 @@ void commaSep( TNode t ) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
translationUnit
|
translationUnit
|
||||||
options {
|
options {
|
||||||
defaultErrorHandler=false;
|
defaultErrorHandler=false;
|
||||||
}
|
}
|
||||||
:{ initializePrinting(); }
|
:{ initializePrinting(); }
|
||||||
( externalList )?
|
( externalList )?
|
||||||
{ finalizePrinting(); }
|
{ finalizePrinting(); }
|
||||||
;
|
;
|
||||||
|
|
||||||
externalList :( externalDef )+
|
externalList :( externalDef )+
|
||||||
;
|
;
|
||||||
|
|
||||||
externalDef :declaration
|
externalDef :declaration
|
||||||
| functionDef
|
| functionDef
|
||||||
| asm_expr
|
| asm_expr
|
||||||
| typelessDeclaration
|
| typelessDeclaration
|
||||||
| s:SEMI { print( s ); }
|
| s:SEMI { print( s ); }
|
||||||
;
|
;
|
||||||
|
|
||||||
typelessDeclaration :#(NTypeMissing initDeclList s: SEMI) { print( s ); }
|
typelessDeclaration :#(NTypeMissing initDeclList s: SEMI) { print( s ); }
|
||||||
;
|
;
|
||||||
|
|
||||||
asm_expr :#( a:"asm" { print( a ); }
|
asm_expr :#( a:"asm" { print( a ); }
|
||||||
( v:"volatile" { print( v ); }
|
( v:"volatile" { print( v ); }
|
||||||
)?
|
)?
|
||||||
|
@ -390,8 +390,8 @@ asm_expr :#( a:"asm" { print( a ); }
|
||||||
rc:RCURLY { tabs--; print( rc ); }
|
rc:RCURLY { tabs--; print( rc ); }
|
||||||
s:SEMI { print( s ); }
|
s:SEMI { print( s ); }
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
declaration :#( NDeclaration
|
declaration :#( NDeclaration
|
||||||
declSpecifiers
|
declSpecifiers
|
||||||
(
|
(
|
||||||
|
@ -399,29 +399,29 @@ declaration :#( NDeclaration
|
||||||
)?
|
)?
|
||||||
( s:SEMI { print( s ); } )+
|
( s:SEMI { print( s ); } )+
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
declSpecifiers :( storageClassSpecifier
|
declSpecifiers :( storageClassSpecifier
|
||||||
| typeQualifier
|
| typeQualifier
|
||||||
| typeSpecifier
|
| typeSpecifier
|
||||||
)+
|
)+
|
||||||
;
|
;
|
||||||
|
|
||||||
storageClassSpecifier :a:"auto" { print( a ); }
|
storageClassSpecifier :a:"auto" { print( a ); }
|
||||||
| b:"register" { print( b ); }
|
| b:"register" { print( b ); }
|
||||||
| c:"typedef" { print( c ); }
|
| c:"typedef" { print( c ); }
|
||||||
| functionStorageClassSpecifier
|
| functionStorageClassSpecifier
|
||||||
;
|
;
|
||||||
|
|
||||||
functionStorageClassSpecifier :a:"extern" { print( a ); }
|
functionStorageClassSpecifier :a:"extern" { print( a ); }
|
||||||
| b:"static" { print( b ); }
|
| b:"static" { print( b ); }
|
||||||
| c:"inline" { print( c ); }
|
| c:"inline" { print( c ); }
|
||||||
;
|
;
|
||||||
|
|
||||||
typeQualifier :a:"const" { print( a ); }
|
typeQualifier :a:"const" { print( a ); }
|
||||||
| b:"volatile" { print( b ); }
|
| b:"volatile" { print( b ); }
|
||||||
;
|
;
|
||||||
|
|
||||||
typeSpecifier :a:"void" { print( a ); }
|
typeSpecifier :a:"void" { print( a ); }
|
||||||
| b:"char" { print( b ); }
|
| b:"char" { print( b ); }
|
||||||
| c:"short" { print( c ); }
|
| c:"short" { print( c ); }
|
||||||
|
@ -446,21 +446,21 @@ typeSpecifier :a:"void" { print( a ); }
|
||||||
rp:RPAREN { print( rp ); }
|
rp:RPAREN { print( rp ); }
|
||||||
)
|
)
|
||||||
| p:"__complex" { print( p ); }
|
| p:"__complex" { print( p ); }
|
||||||
;
|
;
|
||||||
|
|
||||||
typedefName :#(NTypedefName i:ID { print( i ); } )
|
typedefName :#(NTypedefName i:ID { print( i ); } )
|
||||||
;
|
;
|
||||||
|
|
||||||
structSpecifier :#( a:"struct" { print( a ); }
|
structSpecifier :#( a:"struct" { print( a ); }
|
||||||
structOrUnionBody
|
structOrUnionBody
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
unionSpecifier :#( a:"union" { print( a ); }
|
unionSpecifier :#( a:"union" { print( a ); }
|
||||||
structOrUnionBody
|
structOrUnionBody
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
structOrUnionBody :( (ID LCURLY) => i1:ID lc1:LCURLY { print( i1 ); print ( "{" ); tabs++; }
|
structOrUnionBody :( (ID LCURLY) => i1:ID lc1:LCURLY { print( i1 ); print ( "{" ); tabs++; }
|
||||||
( structDeclarationList )?
|
( structDeclarationList )?
|
||||||
rc1:RCURLY { tabs--; print( rc1 ); }
|
rc1:RCURLY { tabs--; print( rc1 ); }
|
||||||
|
@ -469,32 +469,32 @@ structOrUnionBody :( (ID LCURLY) => i1:ID lc1:LCURLY { print( i1 ); print ( "{
|
||||||
rc2:RCURLY { tabs--; print( rc2 ); }
|
rc2:RCURLY { tabs--; print( rc2 ); }
|
||||||
| i2:ID { print( i2 ); }
|
| i2:ID { print( i2 ); }
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
structDeclarationList :( structDeclaration { print( ";" ); }
|
structDeclarationList :( structDeclaration { print( ";" ); }
|
||||||
)+
|
)+
|
||||||
;
|
;
|
||||||
|
|
||||||
structDeclaration :specifierQualifierList structDeclaratorList
|
structDeclaration :specifierQualifierList structDeclaratorList
|
||||||
;
|
;
|
||||||
|
|
||||||
specifierQualifierList :(
|
specifierQualifierList :(
|
||||||
typeSpecifier
|
typeSpecifier
|
||||||
| typeQualifier
|
| typeQualifier
|
||||||
)+
|
)+
|
||||||
;
|
;
|
||||||
|
|
||||||
structDeclaratorList :structDeclarator
|
structDeclaratorList :structDeclarator
|
||||||
( { print(","); } structDeclarator )*
|
( { print(","); } structDeclarator )*
|
||||||
;
|
;
|
||||||
|
|
||||||
structDeclarator :#( NStructDeclarator
|
structDeclarator :#( NStructDeclarator
|
||||||
( declarator )?
|
( declarator )?
|
||||||
( c:COLON { print( c ); } expr )?
|
( c:COLON { print( c ); } expr )?
|
||||||
( attributeDecl )*
|
( attributeDecl )*
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
enumSpecifier :#( a:"enum" { print( a ); }
|
enumSpecifier :#( a:"enum" { print( a ); }
|
||||||
( i:ID { print( i ); } )?
|
( i:ID { print( i ); } )?
|
||||||
( lc:LCURLY { print( lc ); tabs++; }
|
( lc:LCURLY { print( lc ); tabs++; }
|
||||||
|
@ -502,17 +502,17 @@ enumSpecifier :#( a:"enum" { print( a ); }
|
||||||
rc:RCURLY { tabs--; print( rc ); }
|
rc:RCURLY { tabs--; print( rc ); }
|
||||||
)?
|
)?
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
enumList :enumerator ( {print(",");} enumerator)*
|
enumList :enumerator ( {print(",");} enumerator)*
|
||||||
;
|
;
|
||||||
|
|
||||||
enumerator :i:ID { print( i ); }
|
enumerator :i:ID { print( i ); }
|
||||||
( b:ASSIGN { print( b ); }
|
( b:ASSIGN { print( b ); }
|
||||||
expr
|
expr
|
||||||
)?
|
)?
|
||||||
;
|
;
|
||||||
|
|
||||||
attributeDecl :#( a:"__attribute" { print( a ); }
|
attributeDecl :#( a:"__attribute" { print( a ); }
|
||||||
(b:. { print( b ); } )*
|
(b:. { print( b ); } )*
|
||||||
)
|
)
|
||||||
|
@ -521,13 +521,13 @@ attributeDecl :#( a:"__attribute" { print( a ); }
|
||||||
expr { print( ")" ); }
|
expr { print( ")" ); }
|
||||||
rp:RPAREN { print( rp ); }
|
rp:RPAREN { print( rp ); }
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
initDeclList :initDecl
|
initDeclList :initDecl
|
||||||
( { print( "," ); } initDecl )*
|
( { print( "," ); } initDecl )*
|
||||||
;
|
;
|
||||||
|
|
||||||
initDecl { String declName = ""; }
|
initDecl { String declName = ""; }
|
||||||
:#(NInitDecl
|
:#(NInitDecl
|
||||||
declarator
|
declarator
|
||||||
( attributeDecl )*
|
( attributeDecl )*
|
||||||
|
@ -537,25 +537,25 @@ initDecl { String declName = ""; }
|
||||||
expr
|
expr
|
||||||
)?
|
)?
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
pointerGroup :#( NPointerGroup
|
pointerGroup :#( NPointerGroup
|
||||||
( a:STAR { print( a ); }
|
( a:STAR { print( a ); }
|
||||||
( typeQualifier )*
|
( typeQualifier )*
|
||||||
)+
|
)+
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
idList :i:ID { print( i ); }
|
idList :i:ID { print( i ); }
|
||||||
( c:COMMA { print( c ); }
|
( c:COMMA { print( c ); }
|
||||||
id:ID { print( id ); }
|
id:ID { print( id ); }
|
||||||
)*
|
)*
|
||||||
;
|
;
|
||||||
|
|
||||||
initializer :#( NInitializer (initializerElementLabel)? expr )
|
initializer :#( NInitializer (initializerElementLabel)? expr )
|
||||||
| lcurlyInitializer
|
| lcurlyInitializer
|
||||||
;
|
;
|
||||||
|
|
||||||
initializerElementLabel :#( NInitializerElementLabel
|
initializerElementLabel :#( NInitializerElementLabel
|
||||||
(
|
(
|
||||||
( l:LBRACKET { print( l ); }
|
( l:LBRACKET { print( l ); }
|
||||||
|
@ -567,18 +567,18 @@ initializerElementLabel :#( NInitializerElementLabel
|
||||||
| d:DOT i2:ID a2:ASSIGN { print( d ); print( i2 ); print( a2 ); }
|
| d:DOT i2:ID a2:ASSIGN { print( d ); print( i2 ); print( a2 ); }
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
lcurlyInitializer :#(n:NLcurlyInitializer { print( n ); tabs++; }
|
lcurlyInitializer :#(n:NLcurlyInitializer { print( n ); tabs++; }
|
||||||
initializerList
|
initializerList
|
||||||
rc:RCURLY { tabs--; print( rc ); }
|
rc:RCURLY { tabs--; print( rc ); }
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
initializerList :( i:initializer { commaSep( i ); }
|
initializerList :( i:initializer { commaSep( i ); }
|
||||||
)*
|
)*
|
||||||
;
|
;
|
||||||
|
|
||||||
declarator :#( NDeclarator
|
declarator :#( NDeclarator
|
||||||
( pointerGroup )?
|
( pointerGroup )?
|
||||||
|
|
||||||
|
@ -596,22 +596,22 @@ declarator :#( NDeclarator
|
||||||
| lb:LBRACKET { print( lb );} ( expr )? rb:RBRACKET { print( rb ); }
|
| lb:LBRACKET { print( lb );} ( expr )? rb:RBRACKET { print( rb ); }
|
||||||
)*
|
)*
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
parameterTypeList :( parameterDeclaration
|
parameterTypeList :( parameterDeclaration
|
||||||
( c:COMMA { print( c ); }
|
( c:COMMA { print( c ); }
|
||||||
| s:SEMI { print( s ); }
|
| s:SEMI { print( s ); }
|
||||||
)?
|
)?
|
||||||
)+
|
)+
|
||||||
( v:VARARGS { print( v ); } )?
|
( v:VARARGS { print( v ); } )?
|
||||||
;
|
;
|
||||||
|
|
||||||
parameterDeclaration :#( NParameterDeclaration
|
parameterDeclaration :#( NParameterDeclaration
|
||||||
declSpecifiers
|
declSpecifiers
|
||||||
(declarator | nonemptyAbstractDeclarator)?
|
(declarator | nonemptyAbstractDeclarator)?
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
functionDef :#( NFunctionDef
|
functionDef :#( NFunctionDef
|
||||||
( functionDeclSpecifiers)?
|
( functionDeclSpecifiers)?
|
||||||
declarator
|
declarator
|
||||||
|
@ -620,14 +620,14 @@ functionDef :#( NFunctionDef
|
||||||
)*
|
)*
|
||||||
compoundStatement
|
compoundStatement
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
functionDeclSpecifiers :( functionStorageClassSpecifier
|
functionDeclSpecifiers :( functionStorageClassSpecifier
|
||||||
| typeQualifier
|
| typeQualifier
|
||||||
| typeSpecifier
|
| typeSpecifier
|
||||||
)+
|
)+
|
||||||
;
|
;
|
||||||
|
|
||||||
declarationList :( //ANTLR doesn't know that declarationList properly eats all the declarations
|
declarationList :( //ANTLR doesn't know that declarationList properly eats all the declarations
|
||||||
//so it warns about the ambiguity
|
//so it warns about the ambiguity
|
||||||
options {
|
options {
|
||||||
|
@ -636,15 +636,15 @@ declarationList :( //ANTLR doesn't know that declarationList properly eats all
|
||||||
localLabelDecl
|
localLabelDecl
|
||||||
| declaration
|
| declaration
|
||||||
)+
|
)+
|
||||||
;
|
;
|
||||||
|
|
||||||
localLabelDecl :#(a:"__label__" { print( a ); }
|
localLabelDecl :#(a:"__label__" { print( a ); }
|
||||||
( i:ID { commaSep( i ); }
|
( i:ID { commaSep( i ); }
|
||||||
)+
|
)+
|
||||||
{ print( ";" ); }
|
{ print( ";" ); }
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
compoundStatement :#( cs:NCompoundStatement { print( cs ); tabs++; }
|
compoundStatement :#( cs:NCompoundStatement { print( cs ); tabs++; }
|
||||||
( declarationList
|
( declarationList
|
||||||
| functionDef
|
| functionDef
|
||||||
|
@ -653,14 +653,14 @@ compoundStatement :#( cs:NCompoundStatement { print( cs ); tabs++
|
||||||
rc:RCURLY { tabs--; print( rc ); }
|
rc:RCURLY { tabs--; print( rc ); }
|
||||||
)
|
)
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
statementList :( statement )+
|
statementList :( statement )+
|
||||||
;
|
;
|
||||||
|
|
||||||
statement :statementBody
|
statement :statementBody
|
||||||
;
|
;
|
||||||
|
|
||||||
statementBody :s:SEMI { print( s ); }
|
statementBody :s:SEMI { print( s ); }
|
||||||
|
|
||||||
| compoundStatement // Group of statements
|
| compoundStatement // Group of statements
|
||||||
|
@ -738,8 +738,8 @@ statementBody :s:SEMI { print( s ); }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
expr :binaryExpr
|
expr :binaryExpr
|
||||||
| conditionalExpr
|
| conditionalExpr
|
||||||
| castExpr
|
| castExpr
|
||||||
|
@ -751,20 +751,20 @@ expr :binaryExpr
|
||||||
| initializer
|
| initializer
|
||||||
| rangeExpr
|
| rangeExpr
|
||||||
| gnuAsmExpr
|
| gnuAsmExpr
|
||||||
;
|
;
|
||||||
|
|
||||||
emptyExpr :NEmptyExpression
|
emptyExpr :NEmptyExpression
|
||||||
;
|
;
|
||||||
|
|
||||||
compoundStatementExpr :#(l:LPAREN { print( l ); }
|
compoundStatementExpr :#(l:LPAREN { print( l ); }
|
||||||
compoundStatement
|
compoundStatement
|
||||||
r:RPAREN { print( r ); }
|
r:RPAREN { print( r ); }
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
rangeExpr :#(NRangeExpr expr v:VARARGS{ print( v ); } expr)
|
rangeExpr :#(NRangeExpr expr v:VARARGS{ print( v ); } expr)
|
||||||
;
|
;
|
||||||
|
|
||||||
gnuAsmExpr :#(n:NGnuAsmExpr { print( n ); }
|
gnuAsmExpr :#(n:NGnuAsmExpr { print( n ); }
|
||||||
(v:"volatile" { print( v ); } )?
|
(v:"volatile" { print( v ); } )?
|
||||||
lp:LPAREN { print( lp ); }
|
lp:LPAREN { print( lp ); }
|
||||||
|
@ -789,16 +789,16 @@ gnuAsmExpr :#(n:NGnuAsmExpr { print( n ); }
|
||||||
)?
|
)?
|
||||||
rp:RPAREN { print( rp ); }
|
rp:RPAREN { print( rp ); }
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
strOptExprPair :stringConst
|
strOptExprPair :stringConst
|
||||||
(
|
(
|
||||||
l:LPAREN { print( l ); }
|
l:LPAREN { print( l ); }
|
||||||
expr
|
expr
|
||||||
r:RPAREN { print( r ); }
|
r:RPAREN { print( r ); }
|
||||||
)?
|
)?
|
||||||
;
|
;
|
||||||
|
|
||||||
binaryOperator :ASSIGN
|
binaryOperator :ASSIGN
|
||||||
| DIV_ASSIGN
|
| DIV_ASSIGN
|
||||||
| PLUS_ASSIGN
|
| PLUS_ASSIGN
|
||||||
|
@ -829,8 +829,8 @@ binaryOperator :ASSIGN
|
||||||
| DIV
|
| DIV
|
||||||
| MOD
|
| MOD
|
||||||
| NCommaExpr
|
| NCommaExpr
|
||||||
;
|
;
|
||||||
|
|
||||||
binaryExpr :b:binaryOperator
|
binaryExpr :b:binaryOperator
|
||||||
// no rules allowed as roots, so here I manually get
|
// no rules allowed as roots, so here I manually get
|
||||||
// the first and second children of the binary operator
|
// the first and second children of the binary operator
|
||||||
|
@ -843,27 +843,27 @@ binaryExpr :b:binaryOperator
|
||||||
expr( e2 );
|
expr( e2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
conditionalExpr :#( q:QUESTION
|
conditionalExpr :#( q:QUESTION
|
||||||
expr { print( q ); }
|
expr { print( q ); }
|
||||||
( expr )?
|
( expr )?
|
||||||
c:COLON { print( c ); }
|
c:COLON { print( c ); }
|
||||||
expr
|
expr
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
castExpr :#(
|
castExpr :#(
|
||||||
c:NCast { print( c ); }
|
c:NCast { print( c ); }
|
||||||
typeName
|
typeName
|
||||||
rp:RPAREN { print( rp ); }
|
rp:RPAREN { print( rp ); }
|
||||||
expr
|
expr
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
typeName :specifierQualifierList (nonemptyAbstractDeclarator)?
|
typeName :specifierQualifierList (nonemptyAbstractDeclarator)?
|
||||||
;
|
;
|
||||||
|
|
||||||
nonemptyAbstractDeclarator :#( NNonemptyAbstractDeclarator
|
nonemptyAbstractDeclarator :#( NNonemptyAbstractDeclarator
|
||||||
( pointerGroup
|
( pointerGroup
|
||||||
( (lp1:LPAREN { print( lp1 ); }
|
( (lp1:LPAREN { print( lp1 ); }
|
||||||
|
@ -893,8 +893,8 @@ nonemptyAbstractDeclarator :#( NNonemptyAbstractDeclarator
|
||||||
)+
|
)+
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
unaryExpr :#( i:INC { print( i ); } expr )
|
unaryExpr :#( i:INC { print( i ); } expr )
|
||||||
| #( d:DEC { print( d ); } expr )
|
| #( d:DEC { print( d ); } expr )
|
||||||
| #( NUnaryExpr u:unaryOperator { print( u ); } expr)
|
| #( NUnaryExpr u:unaryOperator { print( u ); } expr)
|
||||||
|
@ -914,8 +914,8 @@ unaryExpr :#( i:INC { print( i ); } expr )
|
||||||
| expr
|
| expr
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
unaryOperator :BAND
|
unaryOperator :BAND
|
||||||
| STAR
|
| STAR
|
||||||
| PLUS
|
| PLUS
|
||||||
|
@ -925,8 +925,8 @@ unaryOperator :BAND
|
||||||
| LAND
|
| LAND
|
||||||
| "__real"
|
| "__real"
|
||||||
| "__imag"
|
| "__imag"
|
||||||
;
|
;
|
||||||
|
|
||||||
postfixExpr :#( NPostfixExpr
|
postfixExpr :#( NPostfixExpr
|
||||||
primaryExpr
|
primaryExpr
|
||||||
( a:PTR b:ID { print( a ); print( b ); }
|
( a:PTR b:ID { print( a ); print( b ); }
|
||||||
|
@ -942,8 +942,8 @@ postfixExpr :#( NPostfixExpr
|
||||||
| g:DEC { print( g ); }
|
| g:DEC { print( g ); }
|
||||||
)+
|
)+
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
primaryExpr :i:ID { print( i ); }
|
primaryExpr :i:ID { print( i ); }
|
||||||
| n:Number { print( n ); }
|
| n:Number { print( n ); }
|
||||||
| charConst
|
| charConst
|
||||||
|
@ -957,21 +957,21 @@ primaryExpr :i:ID { print( i ); }
|
||||||
| #( eg:NExpressionGroup { print( eg ); }
|
| #( eg:NExpressionGroup { print( eg ); }
|
||||||
expr { print( ")" ); }
|
expr { print( ")" ); }
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
argExprList :expr ( {print( "," );} expr )*
|
argExprList :expr ( {print( "," );} expr )*
|
||||||
;
|
;
|
||||||
|
|
||||||
protected charConst :c:CharLiteral { print( c ); }
|
protected charConst :c:CharLiteral { print( c ); }
|
||||||
;
|
;
|
||||||
|
|
||||||
protected stringConst :#( NStringSeq
|
protected stringConst :#( NStringSeq
|
||||||
(
|
(
|
||||||
s:StringLiteral { print( s ); }
|
s:StringLiteral { print( s ); }
|
||||||
)+
|
)+
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
protected intConst :IntOctalConst
|
protected intConst :IntOctalConst
|
||||||
| LongOctalConst
|
| LongOctalConst
|
||||||
| UnsignedOctalConst
|
| UnsignedOctalConst
|
||||||
|
@ -981,18 +981,18 @@ protected intConst :IntOctalConst
|
||||||
| IntHexConst
|
| IntHexConst
|
||||||
| LongHexConst
|
| LongHexConst
|
||||||
| UnsignedHexConst
|
| UnsignedHexConst
|
||||||
;
|
;
|
||||||
|
|
||||||
protected floatConst :FloatDoubleConst
|
protected floatConst :FloatDoubleConst
|
||||||
| DoubleDoubleConst
|
| DoubleDoubleConst
|
||||||
| LongDoubleConst
|
| LongDoubleConst
|
||||||
;
|
;
|
||||||
|
|
||||||
// inherited from grammar WTreeParser
|
// inherited from grammar WTreeParser
|
||||||
commaExpr :#(NCommaExpr expr expr)
|
commaExpr :#(NCommaExpr expr expr)
|
||||||
;
|
;
|
||||||
|
|
||||||
// inherited from grammar WTreeParser
|
// inherited from grammar WTreeParser
|
||||||
assignExpr :#( ASSIGN expr expr)
|
assignExpr :#( ASSIGN expr expr)
|
||||||
| #( DIV_ASSIGN expr expr)
|
| #( DIV_ASSIGN expr expr)
|
||||||
| #( PLUS_ASSIGN expr expr)
|
| #( PLUS_ASSIGN expr expr)
|
||||||
|
@ -1004,54 +1004,54 @@ assignExpr :#( ASSIGN expr expr)
|
||||||
| #( BAND_ASSIGN expr expr)
|
| #( BAND_ASSIGN expr expr)
|
||||||
| #( BOR_ASSIGN expr expr)
|
| #( BOR_ASSIGN expr expr)
|
||||||
| #( BXOR_ASSIGN expr expr)
|
| #( BXOR_ASSIGN expr expr)
|
||||||
;
|
;
|
||||||
|
|
||||||
// inherited from grammar WTreeParser
|
// inherited from grammar WTreeParser
|
||||||
logicalOrExpr :#( LOR expr expr)
|
logicalOrExpr :#( LOR expr expr)
|
||||||
;
|
;
|
||||||
|
|
||||||
// inherited from grammar WTreeParser
|
// inherited from grammar WTreeParser
|
||||||
logicalAndExpr :#( LAND expr expr )
|
logicalAndExpr :#( LAND expr expr )
|
||||||
;
|
;
|
||||||
|
|
||||||
// inherited from grammar WTreeParser
|
// inherited from grammar WTreeParser
|
||||||
inclusiveOrExpr :#( BOR expr expr )
|
inclusiveOrExpr :#( BOR expr expr )
|
||||||
;
|
;
|
||||||
|
|
||||||
// inherited from grammar WTreeParser
|
// inherited from grammar WTreeParser
|
||||||
exclusiveOrExpr :#( BXOR expr expr )
|
exclusiveOrExpr :#( BXOR expr expr )
|
||||||
;
|
;
|
||||||
|
|
||||||
// inherited from grammar WTreeParser
|
// inherited from grammar WTreeParser
|
||||||
bitAndExpr :#( BAND expr expr )
|
bitAndExpr :#( BAND expr expr )
|
||||||
;
|
;
|
||||||
|
|
||||||
// inherited from grammar WTreeParser
|
// inherited from grammar WTreeParser
|
||||||
equalityExpr :#( EQUAL expr expr)
|
equalityExpr :#( EQUAL expr expr)
|
||||||
| #( NOT_EQUAL expr expr)
|
| #( NOT_EQUAL expr expr)
|
||||||
;
|
;
|
||||||
|
|
||||||
// inherited from grammar WTreeParser
|
// inherited from grammar WTreeParser
|
||||||
relationalExpr :#( LT expr expr)
|
relationalExpr :#( LT expr expr)
|
||||||
| #( LTE expr expr)
|
| #( LTE expr expr)
|
||||||
| #( GT expr expr)
|
| #( GT expr expr)
|
||||||
| #( GTE expr expr)
|
| #( GTE expr expr)
|
||||||
;
|
;
|
||||||
|
|
||||||
// inherited from grammar WTreeParser
|
// inherited from grammar WTreeParser
|
||||||
shiftExpr :#( LSHIFT expr expr)
|
shiftExpr :#( LSHIFT expr expr)
|
||||||
| #( RSHIFT expr expr)
|
| #( RSHIFT expr expr)
|
||||||
;
|
;
|
||||||
|
|
||||||
// inherited from grammar WTreeParser
|
// inherited from grammar WTreeParser
|
||||||
additiveExpr :#( PLUS expr expr)
|
additiveExpr :#( PLUS expr expr)
|
||||||
| #( MINUS expr expr)
|
| #( MINUS expr expr)
|
||||||
;
|
;
|
||||||
|
|
||||||
// inherited from grammar WTreeParser
|
// inherited from grammar WTreeParser
|
||||||
multExpr :#( STAR expr expr)
|
multExpr :#( STAR expr expr)
|
||||||
| #( DIV expr expr)
|
| #( DIV expr expr)
|
||||||
| #( MOD expr expr)
|
| #( MOD expr expr)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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
|
|
|
@ -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 |
|
@ -17,88 +17,80 @@ echo Creating P5 distribution for revision $REVISION...
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# remove any old boogers
|
# remove any old boogers
|
||||||
rm -rf processing
|
rm -rf arduino
|
||||||
rm -rf processing-*
|
rm -rf arduino-*
|
||||||
|
|
||||||
# use 'shared' files as starting point
|
# use 'shared' files as starting point
|
||||||
cp -r ../shared processing
|
cp -r ../shared arduino
|
||||||
|
cp -r work/lib/targets arduino/lib
|
||||||
# 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/
|
|
||||||
|
|
||||||
# new style examples thing ala reas
|
# new style examples thing ala reas
|
||||||
cd processing
|
cd arduino
|
||||||
unzip -q examples.zip
|
mkdir examples
|
||||||
rm examples.zip
|
unzip -d examples -q dist/examples.zip
|
||||||
cd ..
|
rm dist/examples.zip
|
||||||
|
rm -rf dist
|
||||||
# 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 ..
|
cd ..
|
||||||
|
|
||||||
# add java (jre) files
|
# 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
|
# directories used by the app
|
||||||
#mkdir processing/lib/build
|
#mkdir arduino/lib/build
|
||||||
|
|
||||||
# grab pde.jar and export from the working dir
|
# grab pde.jar and export from the working dir
|
||||||
cp work/lib/pde.jar processing/lib/
|
cp work/lib/pde.jar arduino/lib/
|
||||||
cp work/lib/core.jar processing/lib/
|
cp work/java/lib/rt.jar arduino/lib/
|
||||||
#cp -r work/lib/export processing/lib/
|
#cp work/lib/core.jar arduino/lib/
|
||||||
#rm -rf processing/lib/export/CVS
|
#cp -r work/lib/export arduino/lib/
|
||||||
|
#rm -rf arduino/lib/export/CVS
|
||||||
|
|
||||||
# get jikes and depedencies
|
# get jikes and depedencies
|
||||||
#gunzip < dist/jikes.gz > processing/jikes.exe
|
#gunzip < dist/jikes.gz > arduino/jikes.exe
|
||||||
cp dist/jikes.exe processing/
|
cp dist/jikes.exe arduino/
|
||||||
chmod +x processing/jikes.exe
|
chmod +x arduino/jikes.exe
|
||||||
|
|
||||||
cp dist/ICE_JNIRegistry.dll processing/
|
cp dist/ICE_JNIRegistry.dll arduino/
|
||||||
chmod +x processing/ICE_JNIRegistry.dll
|
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
|
# get platform-specific goodies from the dist dir
|
||||||
cp launcher/processing.exe processing/
|
cp launcher/arduino.exe arduino/
|
||||||
cp dist/run.bat processing/
|
#cp dist/run.bat arduino/
|
||||||
|
|
||||||
# convert notes.txt to windows LFs
|
# convert notes.txt to windows LFs
|
||||||
# the 2> is because the app is a little chatty
|
# the 2> is because the app is a little chatty
|
||||||
unix2dos processing/revisions.txt 2> /dev/null
|
unix2dos arduino/revisions.txt 2> /dev/null
|
||||||
unix2dos processing/lib/preferences.txt 2> /dev/null
|
unix2dos arduino/lib/preferences.txt 2> /dev/null
|
||||||
unix2dos processing/lib/keywords.txt 2> /dev/null
|
unix2dos arduino/lib/keywords.txt 2> /dev/null
|
||||||
rm -f processing/*.bak
|
rm -f arduino/*.bak
|
||||||
rm -f processing/lib/*.bak
|
rm -f arduino/lib/*.bak
|
||||||
|
|
||||||
# remove boogers
|
# remove boogers
|
||||||
find processing -name "*~" -exec rm -f {} ';'
|
find arduino -name "*~" -exec rm -f {} ';'
|
||||||
find processing -name ".DS_Store" -exec rm -f {} ';'
|
find arduino -name ".DS_Store" -exec rm -f {} ';'
|
||||||
find processing -name "._*" -exec rm -f {} ';'
|
find arduino -name "._*" -exec rm -f {} ';'
|
||||||
find processing -name "Thumbs.db" -exec rm -f {} ';'
|
find arduino -name "Thumbs.db" -exec rm -f {} ';'
|
||||||
|
|
||||||
# chmod +x the crew
|
# chmod +x the crew
|
||||||
find processing -name "*.dll" -exec chmod +x {} ';'
|
find arduino -name "*.dll" -exec chmod +x {} ';'
|
||||||
find processing -name "*.exe" -exec chmod +x {} ';'
|
find arduino -name "*.exe" -exec chmod +x {} ';'
|
||||||
find processing -name "*.html" -exec chmod +x {} ';'
|
find arduino -name "*.html" -exec chmod +x {} ';'
|
||||||
|
|
||||||
# clean out the cvs entries
|
# clean out the svn entries
|
||||||
find processing -name "CVS" -exec rm -rf {} ';' 2> /dev/null
|
find arduino -name ".svn" -exec rm -rf {} ';' 2> /dev/null
|
||||||
find processing -name ".cvsignore" -exec rm -rf {} ';'
|
|
||||||
|
|
||||||
# zip it all up for release
|
# zip it all up for release
|
||||||
echo Packaging standard release...
|
echo Packaging standard release...
|
||||||
echo
|
echo
|
||||||
P5=processing-$REVISION
|
P5=arduino-$REVISION
|
||||||
mv processing $P5
|
mv arduino $P5
|
||||||
zip -rq $P5.zip $P5
|
zip -rq $P5.zip $P5
|
||||||
# nah, keep the new directory around
|
# nah, keep the new directory around
|
||||||
#rm -rf $P5
|
#rm -rf $P5
|
||||||
|
|
Binary file not shown.
|
@ -6,7 +6,7 @@ REM --- (which means 128 megabytes) to something higher.
|
||||||
set SAVEDCP=%CLASSPATH%
|
set SAVEDCP=%CLASSPATH%
|
||||||
set SAVEDPATH=%PATH%
|
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%
|
set PATH=java\bin;%PATH%
|
||||||
|
|
||||||
start javaw -ms128m -mx128m processing.app.Base
|
start javaw -ms128m -mx128m processing.app.Base
|
||||||
|
|
Binary file not shown.
|
@ -1,9 +1,9 @@
|
||||||
CXXFLAGS = -mwindows -mno-cygwin -O2 -Wall
|
CXXFLAGS = -mwindows -mno-cygwin -O2 -Wall
|
||||||
OBJS = launcher.o launcher-rc.o
|
OBJS = launcher.o launcher-rc.o
|
||||||
|
|
||||||
processing.exe: $(OBJS)
|
arduino.exe: $(OBJS)
|
||||||
$(LINK.cc) $(CXXFLAGS) -o $@ $(OBJS)
|
$(LINK.cc) $(CXXFLAGS) -o $@ $(OBJS)
|
||||||
cp processing.exe ../work/
|
cp arduino.exe ../work/
|
||||||
|
|
||||||
$(OBJS): Makefile
|
$(OBJS): Makefile
|
||||||
|
|
||||||
|
@ -11,4 +11,4 @@ launcher-rc.o: launcher.rc
|
||||||
windres -i $< -o $@
|
windres -i $< -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(OBJS) processing.exe
|
$(RM) $(OBJS) arduino.exe
|
||||||
|
|
|
@ -12,6 +12,8 @@ else
|
||||||
cp -r ../shared work
|
cp -r ../shared work
|
||||||
rm -rf work/CVS
|
rm -rf work/CVS
|
||||||
rm -f work/.DS_Store
|
rm -f work/.DS_Store
|
||||||
|
cp ../../lib/*.dll work
|
||||||
|
cp dist/lib/*.dll work
|
||||||
|
|
||||||
# needs to make the dir because of packaging goofiness
|
# needs to make the dir because of packaging goofiness
|
||||||
mkdir -p work/classes/arduino/app/preproc
|
mkdir -p work/classes/arduino/app/preproc
|
||||||
|
@ -80,7 +82,7 @@ else
|
||||||
# take care of the examples
|
# take care of the examples
|
||||||
mkdir work/examples
|
mkdir work/examples
|
||||||
cd work/examples
|
cd work/examples
|
||||||
cp ../shared/dist/examples.zip .
|
cp ../../../shared/dist/examples.zip .
|
||||||
echo Extracting examples ...
|
echo Extracting examples ...
|
||||||
unzip -q -d . examples.zip
|
unzip -q -d . examples.zip
|
||||||
rm -f examples.zip
|
rm -f examples.zip
|
||||||
|
@ -112,12 +114,14 @@ cd app/preproc
|
||||||
|
|
||||||
# first build the default java goop
|
# first build the default java goop
|
||||||
../../build/windows/work/java/bin/java \
|
../../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
|
# now build the pde stuff that extends the java classes
|
||||||
../../build/windows/work/java/bin/java \
|
../../build/windows/work/java/bin/java \
|
||||||
-cp "..\\..\\build\\windows\\work\\lib\\antlr.jar" antlr.Tool \
|
-cp "..\\..\\build\\windows\\work\\lib\\antlr.jar" antlr.Tool -glib StdCParser.g WParser.g
|
||||||
-glib java.g pde.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
|
# back to base arduino dir
|
||||||
cd ../..
|
cd ../..
|
||||||
|
@ -127,8 +131,8 @@ fi
|
||||||
### -- BUILD BOOTLOADER -----------------------------------------
|
### -- BUILD BOOTLOADER -----------------------------------------
|
||||||
|
|
||||||
cd bootloader
|
cd bootloader
|
||||||
export AVRDIR=../build/windows/work/tools/avr
|
export DIRAVR=../build/windows/work/tools/avr
|
||||||
make
|
make
|
||||||
cp ATmegaBOOT.hex ../build/windows/work/bootloader
|
cp ATmegaBOOT.hex ../build/windows/work/bootloader
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
@ -136,13 +140,14 @@ cd ..
|
||||||
|
|
||||||
cd app
|
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
|
# 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
|
# show the user an error, rather than crapping out with some strange
|
||||||
# "class not found" crap
|
# "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
|
# need to do this twice because otherwise dependencies aren't resolved right.
|
||||||
#/cygdrive/c/jdk-1.4.2_05/bin/javac.exe -classpath $CLASSPATH -d ..\\build\\windows\\work\\classes *.java jeditsyntax/*.java preprocessor/*.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
|
||||||
|
../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
|
cd ../build/windows/work/classes
|
||||||
rm -f ../lib/pde.jar
|
rm -f ../lib/pde.jar
|
||||||
|
@ -152,27 +157,6 @@ zip -0rq ../lib/pde.jar .
|
||||||
cd ../..
|
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
|
||||||
echo Done.
|
echo Done.
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue