diff --git a/AST/Bool.class b/AST/Bool.class new file mode 100644 index 0000000000000000000000000000000000000000..5e5fa457b11b347d541402c3ef507b8fbce23e45 Binary files /dev/null and b/AST/Bool.class differ diff --git a/AST/Bool.java b/AST/Bool.java new file mode 100644 index 0000000000000000000000000000000000000000..27652641fcb9e8f9cd7a1fc34951adede4dffee4 --- /dev/null +++ b/AST/Bool.java @@ -0,0 +1,16 @@ +package AST; + +public class Bool extends ExpressionA { + public boolean num; + + public Bool(boolean num) { + this.num = num; + } + + public String toString() { + return Boolean.toString(num); + } + public String toAssembly() { + return "CsteBo " + num+"\n"; + } +} diff --git a/AST/Egal.class b/AST/Egal.class new file mode 100644 index 0000000000000000000000000000000000000000..099ce227fa25c5136e87e1f9defce753aa629523 Binary files /dev/null and b/AST/Egal.class differ diff --git a/AST/Egal.java b/AST/Egal.java new file mode 100644 index 0000000000000000000000000000000000000000..4a61e077a231a3496b8ba643340674e487e1a645 --- /dev/null +++ b/AST/Egal.java @@ -0,0 +1,15 @@ +package AST; + +public class Egal extends ExpressionA_Binaire { + + public Egal(ExpressionA gauche, ExpressionA droite) { + super(gauche, droite); + } + + public String symbole() { + return "Equals"; + } + public String toAssembly() { + return gauche.toAssembly() + droite.toAssembly() + "Equals\n"; + } +} diff --git a/AST/FloatT.class b/AST/FloatT.class new file mode 100644 index 0000000000000000000000000000000000000000..a17f71ac6dfb33e7fda3c10b0f23021dcc80644d Binary files /dev/null and b/AST/FloatT.class differ diff --git a/AST/FloatT.java b/AST/FloatT.java new file mode 100644 index 0000000000000000000000000000000000000000..ae7215bd75ccf218a0a036cbac32e597d2e60e4a --- /dev/null +++ b/AST/FloatT.java @@ -0,0 +1,22 @@ +// +// Source code recreated from a .class file by IntelliJ IDEA +// (powered by FernFlower decompiler) +// + +package AST; + +public class FloatT extends ExpressionA { + public float arg; + + public FloatT(float var1) { + this.arg = var1; + } + + public String toString() { + return Float.toString(this.arg); + } + + public String toAssembly() { + return "CsteNb " + this.arg + "\n"; + } +} diff --git a/AST/GrEgNb.class b/AST/GrEgNb.class new file mode 100644 index 0000000000000000000000000000000000000000..6d14eac0ef889fed381f6949537e9a84158b9241 Binary files /dev/null and b/AST/GrEgNb.class differ diff --git a/AST/GrEgNb.java b/AST/GrEgNb.java new file mode 100644 index 0000000000000000000000000000000000000000..03c2aab41852088fb0ee091131cb72cdf6f280db --- /dev/null +++ b/AST/GrEgNb.java @@ -0,0 +1,15 @@ +package AST; + +public class GrEgNb extends ExpressionA_Binaire { + + public GrEgNb(ExpressionA gauche, ExpressionA droite) { + super(gauche, droite); + } + + public String symbole() { + return "GrEqNb"; + } + public String toAssembly() { + return gauche.toAssembly() + droite.toAssembly() + "GrEqNb\n"; + } +} diff --git a/AST/GrStNb.class b/AST/GrStNb.class new file mode 100644 index 0000000000000000000000000000000000000000..21cb2dce4c70bb0f96c73ce64121734939d2edfb Binary files /dev/null and b/AST/GrStNb.class differ diff --git a/AST/GrStNb.java b/AST/GrStNb.java new file mode 100644 index 0000000000000000000000000000000000000000..4db76e1b9428f07fab22b899a3b90dc0a540e6f4 --- /dev/null +++ b/AST/GrStNb.java @@ -0,0 +1,15 @@ +package AST; + +public class GrStNb extends ExpressionA_Binaire { + + public GrStNb(ExpressionA gauche, ExpressionA droite) { + super(gauche, droite); + } + + public String symbole() { + return "GrStNb"; + } + public String toAssembly() { + return gauche.toAssembly() + droite.toAssembly() + "GrStNb\n"; + } +} diff --git a/AST/LoEqNb.class b/AST/LoEqNb.class new file mode 100644 index 0000000000000000000000000000000000000000..a655e32420a284d13eed069f04ff0b515c920f17 Binary files /dev/null and b/AST/LoEqNb.class differ diff --git a/AST/LoEqNb.java b/AST/LoEqNb.java new file mode 100644 index 0000000000000000000000000000000000000000..fd6a521a0f13da6554de3c4de888a8e8e6ba6664 --- /dev/null +++ b/AST/LoEqNb.java @@ -0,0 +1,15 @@ +package AST; + +public class LoEqNb extends ExpressionA_Binaire { + + public LoEqNb(ExpressionA gauche, ExpressionA droite) { + super(gauche, droite); + } + + public String symbole() { + return "LoEqNb"; + } + public String toAssembly() { + return gauche.toAssembly() + droite.toAssembly() + "LoEqNb\n"; + } +} diff --git a/AST/LoStNb.class b/AST/LoStNb.class new file mode 100644 index 0000000000000000000000000000000000000000..15502362c45cee8f74cb672caaa133f51ab525bf Binary files /dev/null and b/AST/LoStNb.class differ diff --git a/AST/LoStNb.java b/AST/LoStNb.java new file mode 100644 index 0000000000000000000000000000000000000000..953f9624d946c854bc166e9cc9ba787dd42eb740 --- /dev/null +++ b/AST/LoStNb.java @@ -0,0 +1,15 @@ +package AST; + +public class LoStNb extends ExpressionA_Binaire { + + public LoStNb(ExpressionA gauche, ExpressionA droite) { + super(gauche, droite); + } + + public String symbole() { + return "LoStNb"; + } + public String toAssembly() { + return gauche.toAssembly() + droite.toAssembly() + "LoStNb\n"; + } +} diff --git a/AST/Modulo.class b/AST/Modulo.class new file mode 100644 index 0000000000000000000000000000000000000000..c700d73d6cdda889950837839ab01726ed77abf1 Binary files /dev/null and b/AST/Modulo.class differ diff --git a/AST/Modulo.java b/AST/Modulo.java new file mode 100644 index 0000000000000000000000000000000000000000..b02615f3782638f78ebcd67c4f2b9c116a1c3ad1 --- /dev/null +++ b/AST/Modulo.java @@ -0,0 +1,11 @@ +package AST; + +public class Modulo extends ExpressionA_Binaire { + + public Modulo(ExpressionA gauche,ExpressionA droite) {super(gauche, droite);} + + public String symbole() {return "Modulo";}; + public String toAssembly() { + return gauche.toAssembly() + droite.toAssembly() + "ModuNb\n"; + } +} diff --git a/AST/Not.class b/AST/Not.class new file mode 100644 index 0000000000000000000000000000000000000000..d63de49f9d2860ddb60f59b3fabee95e50dbbe16 Binary files /dev/null and b/AST/Not.class differ diff --git a/AST/Not.java b/AST/Not.java new file mode 100644 index 0000000000000000000000000000000000000000..8cdde2e820e275752a3de321017d3efc2eabec9c --- /dev/null +++ b/AST/Not.java @@ -0,0 +1,17 @@ +package AST; + +public class Not extends ExpressionA { + + public ExpressionA arg; + + public Not(ExpressionA arg) { + this.arg = arg; + } + + public String toString() { + return String.format("Not(%1$s)", arg.toString()); + } + public String toAssembly() { + return (arg.toAssembly())+"Not\n"; + } +} diff --git a/AST/NotEql.class b/AST/NotEql.class new file mode 100644 index 0000000000000000000000000000000000000000..d1f224d1abe23b7642888ad8f66f8e03a4e71d99 Binary files /dev/null and b/AST/NotEql.class differ diff --git a/AST/NotEql.java b/AST/NotEql.java new file mode 100644 index 0000000000000000000000000000000000000000..33e5304dc634e2fa93d2faa7ba1b7ce158dde9eb --- /dev/null +++ b/AST/NotEql.java @@ -0,0 +1,15 @@ +package AST; + +public class NotEql extends ExpressionA_Binaire { + + public NotEql(ExpressionA gauche, ExpressionA droite) { + super(gauche, droite); + } + + public String symbole() { + return "NotEqual"; + } + public String toAssembly() { + return gauche.toAssembly() + droite.toAssembly() + "NotEql\n"; + } +} diff --git a/Compilateur.class b/Compilateur.class index 1c4d79fddc79d98aae8417efccb5f86bdcc49bdf..f5b5c61d9646ce29d806e9596b46a315752f5b44 100644 Binary files a/Compilateur.class and b/Compilateur.class differ diff --git a/Compilateur.java b/Compilateur.java index 71b240187d29be803900ffdf744dc7007a5589f3..64deedf79ab79e64a3fc75bd282f216693683fca 100644 --- a/Compilateur.java +++ b/Compilateur.java @@ -25,12 +25,16 @@ public class Compilateur implements CompilateurConstants { } static final public ExpressionA expression() throws ParseException {ExpressionA gauche, droite; - gauche = terme(); + gauche = comp(); label_1: while (true) { switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case 5: - case 6:{ + case 7: + case 8: + case 9: + case 10: + case 11: + case 12:{ ; break; } @@ -39,20 +43,81 @@ public class Compilateur implements CompilateurConstants { break label_1; } switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case 5:{ - jj_consume_token(5); + case 7:{ + jj_consume_token(7); + droite = comp(); +gauche = new Egal(gauche, droite); + break; + } + case 8:{ + jj_consume_token(8); + droite = comp(); +gauche = new GrEgNb(gauche, droite); + break; + } + case 9:{ + jj_consume_token(9); + droite = comp(); +gauche = new GrStNb(gauche, droite); + break; + } + case 10:{ + jj_consume_token(10); + droite = comp(); +gauche = new LoStNb(gauche, droite); + break; + } + case 11:{ + jj_consume_token(11); + droite = comp(); +gauche = new LoEqNb(gauche, droite); + break; + } + case 12:{ + jj_consume_token(12); + droite = comp(); +gauche = new NotEql(gauche, droite); + break; + } + default: + jj_la1[1] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } +{if ("" != null) return gauche;} + throw new Error("Missing return statement in function"); +} + + static final public ExpressionA comp() throws ParseException {ExpressionA gauche, droite; + gauche = terme(); + label_2: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 13: + case 14:{ + ; + break; + } + default: + jj_la1[2] = jj_gen; + break label_2; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 13:{ + jj_consume_token(13); droite = terme(); gauche = new Plus(gauche, droite); break; } - case 6:{ - jj_consume_token(6); + case 14:{ + jj_consume_token(14); droite = terme(); gauche = new Moins(gauche, droite); break; } default: - jj_la1[1] = jj_gen; + jj_la1[3] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -63,33 +128,40 @@ gauche = new Moins(gauche, droite); static final public ExpressionA terme() throws ParseException {ExpressionA gauche, droite; gauche = facteur(); - label_2: + label_3: while (true) { switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case 7: - case 8:{ + case 15: + case 16: + case 17:{ ; break; } default: - jj_la1[2] = jj_gen; - break label_2; + jj_la1[4] = jj_gen; + break label_3; } switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case 7:{ - jj_consume_token(7); + case 15:{ + jj_consume_token(15); droite = facteur(); gauche = new Mult(gauche, droite); break; } - case 8:{ - jj_consume_token(8); + case 16:{ + jj_consume_token(16); droite = facteur(); gauche = new Div(gauche, droite); break; } + case 17:{ + jj_consume_token(17); + droite = facteur(); +gauche = new Modulo(gauche, droite); + break; + } default: - jj_la1[3] = jj_gen; + jj_la1[5] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -100,26 +172,42 @@ gauche = new Div(gauche, droite); static final public ExpressionA facteur() throws ParseException {ExpressionA expr; switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case 9:{ - jj_consume_token(9); + case 18:{ + jj_consume_token(18); expr = expression(); - jj_consume_token(10); + jj_consume_token(19); {if ("" != null) return expr;} break; } - case 6:{ - jj_consume_token(6); + case 14:{ + jj_consume_token(14); expr = facteur(); {if ("" != null) return new Neg(expr);} break; } + case 20:{ + jj_consume_token(20); + expr = facteur(); +{if ("" != null) return new Not(expr);} + break; + } case NOMBRE:{ jj_consume_token(NOMBRE); {if ("" != null) return new Num(Integer.parseInt(token.image));} break; } + case FLOAT:{ + jj_consume_token(FLOAT); +{if ("" != null) return new FloatT(Float.parseFloat(token.image));} + break; + } + case BOOLEAN:{ + jj_consume_token(BOOLEAN); +{if ("" != null) return new Bool(Boolean.parseBoolean(token.image));} + break; + } default: - jj_la1[4] = jj_gen; + jj_la1[6] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -136,13 +224,13 @@ gauche = new Div(gauche, droite); static public Token jj_nt; static private int jj_ntk; static private int jj_gen; - static final private int[] jj_la1 = new int[5]; + static final private int[] jj_la1 = new int[7]; static private int[] jj_la1_0; static { jj_la1_init_0(); } private static void jj_la1_init_0() { - jj_la1_0 = new int[] {0x60,0x60,0x180,0x180,0x248,}; + jj_la1_0 = new int[] {0x1f80,0x1f80,0x6000,0x6000,0x38000,0x38000,0x144038,}; } /** Constructor with InputStream. */ @@ -163,7 +251,7 @@ gauche = new Div(gauche, droite); token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 5; i++) jj_la1[i] = -1; + for (int i = 0; i < 7; i++) jj_la1[i] = -1; } /** Reinitialise. */ @@ -177,7 +265,7 @@ gauche = new Div(gauche, droite); token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 5; i++) jj_la1[i] = -1; + for (int i = 0; i < 7; i++) jj_la1[i] = -1; } /** Constructor. */ @@ -194,7 +282,7 @@ gauche = new Div(gauche, droite); token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 5; i++) jj_la1[i] = -1; + for (int i = 0; i < 7; i++) jj_la1[i] = -1; } /** Reinitialise. */ @@ -212,7 +300,7 @@ gauche = new Div(gauche, droite); token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 5; i++) jj_la1[i] = -1; + for (int i = 0; i < 7; i++) jj_la1[i] = -1; } /** Constructor with generated Token Manager. */ @@ -228,7 +316,7 @@ gauche = new Div(gauche, droite); token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 5; i++) jj_la1[i] = -1; + for (int i = 0; i < 7; i++) jj_la1[i] = -1; } /** Reinitialise. */ @@ -237,7 +325,7 @@ gauche = new Div(gauche, droite); token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 5; i++) jj_la1[i] = -1; + for (int i = 0; i < 7; i++) jj_la1[i] = -1; } static private Token jj_consume_token(int kind) throws ParseException { @@ -288,12 +376,12 @@ gauche = new Div(gauche, droite); /** Generate ParseException. */ static public ParseException generateParseException() { jj_expentries.clear(); - boolean[] la1tokens = new boolean[11]; + boolean[] la1tokens = new boolean[21]; if (jj_kind >= 0) { la1tokens[jj_kind] = true; jj_kind = -1; } - for (int i = 0; i < 5; i++) { + for (int i = 0; i < 7; i++) { if (jj_la1[i] == jj_gen) { for (int j = 0; j < 32; j++) { if ((jj_la1_0[i] & (1<<j)) != 0) { @@ -302,7 +390,7 @@ gauche = new Div(gauche, droite); } } } - for (int i = 0; i < 11; i++) { + for (int i = 0; i < 21; i++) { if (la1tokens[i]) { jj_expentry = new int[1]; jj_expentry[0] = i; diff --git a/Compilateur.jj b/Compilateur.jj index aa74977342a7d08629fc4bb7d476902c5eb17bdd..71c1c199a205efa35f0917657ae61c28b73f842a 100644 --- a/Compilateur.jj +++ b/Compilateur.jj @@ -23,6 +23,8 @@ SKIP : TOKEN : { < NOMBRE: ["1"-"9"] (["0"-"9"])* > +| < FLOAT: (["0"-"9"])+ "." (["0"-"9"])+ > +| < BOOLEAN: "True" | "False"> | < EOL: "\n" > } @@ -33,15 +35,33 @@ ExpressionA mainNT () : { expression=expression() <EOL> { return expression; } } -ExpressionA expression () : +ExpressionA expression() : +{ + ExpressionA gauche, droite; +} +{ + gauche=comp() ( + "==" droite=comp() { gauche = new Egal(gauche, droite); } + | ">=" droite=comp() { gauche = new GrEgNb(gauche, droite); } + | ">" droite=comp() { gauche = new GrStNb(gauche, droite);} + | "<" droite=comp() { gauche = new LoStNb(gauche, droite);} + | "<=" droite=comp() { gauche = new LoEqNb(gauche, droite); } + | "!=" droite=comp() { gauche = new NotEql(gauche, droite); } + + + )* + { return gauche; } +} + +ExpressionA comp() : { ExpressionA gauche, droite; } { gauche=terme() ( - "+" droite=terme() { gauche = new Plus(gauche, droite); } + "+" droite=terme() { gauche = new Plus(gauche, droite); } | "-" droite=terme() { gauche = new Moins(gauche, droite); } - )* + )* { return gauche; } } ExpressionA terme () : @@ -50,8 +70,9 @@ ExpressionA terme () : } { gauche=facteur() ( - "*" droite=facteur() { gauche = new Mult(gauche, droite); } - | "/" droite=facteur() { gauche = new Div(gauche, droite); } + "*" droite=facteur() { gauche = new Mult(gauche, droite); } + | "/" droite=facteur() { gauche = new Div(gauche, droite);} + | "%" droite=facteur() { gauche = new Modulo(gauche, droite); } )* { return gauche; } } @@ -61,7 +82,10 @@ ExpressionA facteur() : ExpressionA expr; } { - "(" expr=expression() ")" { return expr; } - | "-" expr=facteur() { return new Neg(expr); } // Construit un nœud Neg - | <NOMBRE> { return new Num(Integer.parseInt(token.image)); } // Construit un nœud Num + "(" expr=expression() ")" { return expr; } + | "-" expr=facteur() { return new Neg(expr); } + | "!" expr=facteur() { return new Not(expr); }// Construit un nœud not + | <NOMBRE> { return new Num(Integer.parseInt(token.image));} + | <FLOAT> { return new FloatT(Float.parseFloat(token.image));} + | <BOOLEAN> { return new Bool(Boolean.parseBoolean(token.image));}// Construit un nœud Num } diff --git a/CompilateurConstants.class b/CompilateurConstants.class index a58ead425930158a1078c1587deed3c426639012..69c8546ba136dbbd5cab74c09e0f9cc35539b62f 100644 Binary files a/CompilateurConstants.class and b/CompilateurConstants.class differ diff --git a/CompilateurConstants.java b/CompilateurConstants.java index 62e0b982c719887f0b41fece6ccfa5586bff97ad..9d38bb9388f914eb1cf77c94d3c372849cd3a63d 100644 --- a/CompilateurConstants.java +++ b/CompilateurConstants.java @@ -11,7 +11,11 @@ public interface CompilateurConstants { /** RegularExpression Id. */ int NOMBRE = 3; /** RegularExpression Id. */ - int EOL = 4; + int FLOAT = 4; + /** RegularExpression Id. */ + int BOOLEAN = 5; + /** RegularExpression Id. */ + int EOL = 6; /** Lexical state. */ int DEFAULT = 0; @@ -22,13 +26,23 @@ public interface CompilateurConstants { "\" \"", "\"\\t\"", "<NOMBRE>", + "<FLOAT>", + "<BOOLEAN>", "\"\\n\"", + "\"==\"", + "\">=\"", + "\">\"", + "\"<\"", + "\"<=\"", + "\"!=\"", "\"+\"", "\"-\"", "\"*\"", "\"/\"", + "\"%\"", "\"(\"", "\")\"", + "\"!\"", }; } diff --git a/CompilateurTokenManager.class b/CompilateurTokenManager.class index 07b173fc224be35b1a4ff6b8c2fe2cb6a464732b..3477ce7fdf63c56e5bb2e2d0a81bcdd0e6af6d04 100644 Binary files a/CompilateurTokenManager.class and b/CompilateurTokenManager.class differ diff --git a/CompilateurTokenManager.java b/CompilateurTokenManager.java index 9a0b305705c5e977cf616a5f280907a8a51b321a..cdfb2aa9057be0cad5bfb18ddb6f7a9d9d8d5afc 100644 --- a/CompilateurTokenManager.java +++ b/CompilateurTokenManager.java @@ -31,27 +31,63 @@ static private int jjMoveStringLiteralDfa0_0(){ switch(curChar) { case 10: - return jjStopAtPos(0, 4); + return jjStopAtPos(0, 6); + case 33: + jjmatchedKind = 20; + return jjMoveStringLiteralDfa1_0(0x1000L); + case 37: + return jjStopAtPos(0, 17); case 40: - return jjStopAtPos(0, 9); + return jjStopAtPos(0, 18); case 41: - return jjStopAtPos(0, 10); + return jjStopAtPos(0, 19); case 42: - return jjStopAtPos(0, 7); + return jjStopAtPos(0, 15); case 43: - return jjStopAtPos(0, 5); + return jjStopAtPos(0, 13); case 45: - return jjStopAtPos(0, 6); + return jjStopAtPos(0, 14); case 47: - return jjStopAtPos(0, 8); + return jjStopAtPos(0, 16); + case 60: + jjmatchedKind = 10; + return jjMoveStringLiteralDfa1_0(0x800L); + case 61: + return jjMoveStringLiteralDfa1_0(0x80L); + case 62: + jjmatchedKind = 9; + return jjMoveStringLiteralDfa1_0(0x100L); default : return jjMoveNfa_0(0, 0); } } +static private int jjMoveStringLiteralDfa1_0(long active0){ + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(0, active0); + return 1; + } + switch(curChar) + { + case 61: + if ((active0 & 0x80L) != 0L) + return jjStopAtPos(1, 7); + else if ((active0 & 0x100L) != 0L) + return jjStopAtPos(1, 8); + else if ((active0 & 0x800L) != 0L) + return jjStopAtPos(1, 11); + else if ((active0 & 0x1000L) != 0L) + return jjStopAtPos(1, 12); + break; + default : + break; + } + return jjStartNfa_0(0, active0); +} static private int jjMoveNfa_0(int startState, int curPos) { int startsAt = 0; - jjnewStateCnt = 2; + jjnewStateCnt = 13; int i = 1; jjstateSet[0] = startState; int kind = 0x7fffffff; @@ -67,11 +103,14 @@ static private int jjMoveNfa_0(int startState, int curPos) switch(jjstateSet[--i]) { case 0: - if ((0x3fe000000000000L & l) == 0L) - break; - if (kind > 3) - kind = 3; - { jjCheckNAdd(1); } + if ((0x3ff000000000000L & l) != 0L) + { jjCheckNAddTwoStates(2, 3); } + if ((0x3fe000000000000L & l) != 0L) + { + if (kind > 3) + kind = 3; + { jjCheckNAdd(1); } + } break; case 1: if ((0x3ff000000000000L & l) == 0L) @@ -80,6 +119,21 @@ static private int jjMoveNfa_0(int startState, int curPos) kind = 3; { jjCheckNAdd(1); } break; + case 2: + if ((0x3ff000000000000L & l) != 0L) + { jjCheckNAddTwoStates(2, 3); } + break; + case 3: + if (curChar == 46) + { jjCheckNAdd(4); } + break; + case 4: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 4) + kind = 4; + { jjCheckNAdd(4); } + break; default : break; } } while(i != startsAt); @@ -91,6 +145,44 @@ static private int jjMoveNfa_0(int startState, int curPos) { switch(jjstateSet[--i]) { + case 0: + if (curChar == 70) + jjstateSet[jjnewStateCnt++] = 11; + else if (curChar == 84) + jjstateSet[jjnewStateCnt++] = 7; + break; + case 5: + if (curChar == 101) + kind = 5; + break; + case 6: + if (curChar == 117) + { jjCheckNAdd(5); } + break; + case 7: + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 6; + break; + case 8: + if (curChar == 84) + jjstateSet[jjnewStateCnt++] = 7; + break; + case 9: + if (curChar == 115) + { jjCheckNAdd(5); } + break; + case 10: + if (curChar == 108) + jjstateSet[jjnewStateCnt++] = 9; + break; + case 11: + if (curChar == 97) + jjstateSet[jjnewStateCnt++] = 10; + break; + case 12: + if (curChar == 70) + jjstateSet[jjnewStateCnt++] = 11; + break; default : break; } } while(i != startsAt); @@ -114,7 +206,7 @@ static private int jjMoveNfa_0(int startState, int curPos) kind = 0x7fffffff; } ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 2 - (jjnewStateCnt = startsAt))) + if ((i = jjnewStateCnt) == (startsAt = 13 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } @@ -123,7 +215,8 @@ static private int jjMoveNfa_0(int startState, int curPos) /** Token literal values. */ public static final String[] jjstrLiteralImages = { -"", null, null, null, "\12", "\53", "\55", "\52", "\57", "\50", "\51", }; +"", null, null, null, null, null, "\12", "\75\75", "\76\75", "\76", "\74", +"\74\75", "\41\75", "\53", "\55", "\52", "\57", "\45", "\50", "\51", "\41", }; static protected Token jjFillToken() { final Token t; @@ -301,7 +394,7 @@ static private void jjCheckNAddTwoStates(int state1, int state2) { int i; jjround = 0x80000001; - for (i = 2; i-- > 0;) + for (i = 13; i-- > 0;) jjrounds[i] = 0x80000000; } @@ -330,10 +423,10 @@ public static final String[] lexStateNames = { /** Lex State array. */ public static final int[] jjnewLexState = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, }; static final long[] jjtoToken = { - 0x7f9L, + 0x1ffff9L, }; static final long[] jjtoSkip = { 0x6L, @@ -346,8 +439,8 @@ static final long[] jjtoMore = { }; static protected SimpleCharStream input_stream; - static private final int[] jjrounds = new int[2]; - static private final int[] jjstateSet = new int[2 * 2]; + static private final int[] jjrounds = new int[13]; + static private final int[] jjstateSet = new int[2 * 13]; private static final StringBuilder jjimage = new StringBuilder(); private static StringBuilder image = jjimage; private static int jjimageLen;