Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

better .gitignore

  • Loading branch information...
commit 2881986bc5741ba75d0526faea862859730dc62c 1 parent f50aa50
@Swizec authored
View
2  .gitignore
@@ -1,2 +1,4 @@
*.xml
*.pyc
+pascal/src/compiler/synanal/PascalSyn.java
+pascal/src/compiler/synanal/PascalTok.java
View
2,200 pascal/src/compiler/synanal/PascalSyn.java
0 additions, 2,200 deletions not shown
View
107 pascal/src/compiler/synanal/PascalTok.java
@@ -1,107 +0,0 @@
-
-//----------------------------------------------------
-// The following code was generated by CUP v0.11a beta 20060608
-// Sun Apr 29 23:35:56 CEST 2012
-//----------------------------------------------------
-
-package compiler.synanal;
-
-/** CUP generated class containing symbol constants. */
-public class PascalTok {
- /* terminals */
- public static final int CHAR_CONST = 3;
- public static final int VAL = 36;
- public static final int LTH = 26;
- public static final int FUNCTION = 45;
- public static final int LBRACKET = 14;
- public static final int CONST = 40;
- public static final int CHAR = 8;
- public static final int SEMIC = 18;
- public static final int INT = 9;
- public static final int ARRAY = 37;
- public static final int FOR = 44;
- public static final int NOT = 30;
- public static final int AND = 20;
- public static final int RECORD = 50;
- public static final int TYPE = 53;
- public static final int NIL = 5;
- public static final int OR = 31;
- public static final int BOOL = 7;
- public static final int COMMA = 11;
- public static final int BEGIN = 39;
- public static final int DIV = 21;
- public static final int GEQ = 23;
- public static final int IF = 46;
- public static final int ASSIGN = 38;
- public static final int DOT = 12;
- public static final int UADD = 34;
- public static final int PTR = 32;
- public static final int OF = 47;
- public static final int DOTS = 13;
- public static final int EOF = 0;
- public static final int RBRACKET = 16;
- public static final int INT_CONST = 4;
- public static final int PROGRAM = 49;
- public static final int error = 1;
- public static final int MUL = 28;
- public static final int ADD = 19;
- public static final int LPARENTHESIS = 15;
- public static final int NEQ = 29;
- public static final int GTH = 24;
- public static final int EQU = 22;
- public static final int COLON = 10;
- public static final int ELSE = 42;
- public static final int TO = 52;
- public static final int MEM = 27;
- public static final int WHILE = 55;
- public static final int THEN = 51;
- public static final int RPARENTHESIS = 17;
- public static final int LEQ = 25;
- public static final int END = 43;
- public static final int USUB = 35;
- public static final int BOOL_CONST = 2;
- public static final int SUB = 33;
- public static final int VAR = 54;
- public static final int PROCEDURE = 48;
- public static final int DO = 41;
- public static final int IDENTIFIER = 6;
-
- /* non terminals */
- static final int program = 1;
- static final int var_ = 11;
- static final int function = 30;
- static final int one_type = 9;
- static final int loop = 34;
- static final int type_desc = 19;
- static final int type_record_component = 24;
- static final int parameter_call = 18;
- static final int type_atom = 20;
- static final int one_param = 29;
- static final int statement_ = 32;
- static final int type_record = 22;
- static final int conditional = 33;
- static final int source = 0;
- static final int subroutine = 13;
- static final int type_pointer = 25;
- static final int var = 10;
- static final int statement = 31;
- static final int bin_expr = 16;
- static final int eps = 35;
- static final int constant = 4;
- static final int procedure = 26;
- static final int subroutine_call = 17;
- static final int parameter = 28;
- static final int prefix = 15;
- static final int type_record_components = 23;
- static final int block_statement = 3;
- static final int value = 14;
- static final int type_array = 21;
- static final int parameters = 27;
- static final int one_var = 12;
- static final int one_constant = 6;
- static final int declaration = 2;
- static final int constant_ = 5;
- static final int type_ = 8;
- static final int type = 7;
-}
-
View
2  pascal/src/compiler/synanal/pascal.cup
@@ -345,7 +345,7 @@ value ::= BOOL_CONST:val {: RESULT = (new AbsAtomConst(val, AbsAtomConst.BOOL))
(new AbsAlloc((AbsTypeExpr)desc))
.setBeg(l.toString(), lleft, lright)
.setEnd(r.toString(), rleft, rright); :}
- | LPARENTHESIS:l value:v RPARENTHESIS:r {: RESULT = v; :}
+ | LPARENTHESIS:l value:v RPARENTHESIS:r {: RESULT = v; :}
| bin_expr:v {: RESULT = v; :};
prefix ::= SUB {: RESULT = AbsUnExpr.SUB; :}
Please sign in to comment.
Something went wrong with that request. Please try again.