changes made after tupshins reconstruction
[org.ibex.core.git] / src / org / xwt / js / Tokens.java
index 11508fb..28e57af 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2003 Adam Megacz, see the COPYING file for licensing [GPL]
+// Copyright 2004 Adam Megacz, see the COPYING file for licensing [GPL]
 package org.xwt.js;
 
 /** this class contains a <tt>public static final int</tt> for each valid token */
@@ -6,8 +6,6 @@ interface Tokens {
 
     // Token Constants //////////////////////////////////////////////////////////
 
-    public static final int EOL           = -1;  // end of line
-
     // arithmetic operations; also valid as bytecodes
     public static final int BITOR         = 0;   // |
     public static final int ASSIGN_BITOR  = 1;   // |=
@@ -89,15 +87,18 @@ interface Tokens {
     public static final int DEFAULT       = 69;  // default keyword
     public static final int WHILE         = 70;  // while keyword
     public static final int DO            = 71;  // do keyword
-    public static final int FOR           = 74;  // for keyword
-    public static final int VAR           = 75;  // var keyword
-    public static final int WITH          = 76;  // with keyword
-    public static final int CATCH         = 77;  // catch keyword
-    public static final int FINALLY       = 78;  // finally keyword
-    public static final int RESERVED      = 79;  // reserved keyword
-    public static final int MAX_TOKEN = RESERVED;
+    public static final int FOR           = 72;  // for keyword
+    public static final int VAR           = 73;  // var keyword
+    public static final int WITH          = 74;  // with keyword
+    public static final int CATCH         = 75;  // catch keyword
+    public static final int FINALLY       = 76;  // finally keyword
+    public static final int RESERVED      = 77;  // reserved keyword
+    public static final int GRAMMAR       = 78;  // the grammar-definition operator (::=)
+    public static final int ADD_TRAP      = 79;  // the add-trap operator (++=)
+    public static final int DEL_TRAP      = 80;  // the del-trap operator (--=)
  
+    public static final int MAX_TOKEN = DEL_TRAP;
+
     public final static String[] codeToString = new String[] {
         "BITOR", "ASSIGN_BITOR", "BITXOR", "ASSIGN_BITXOR", "BITAND",
         "ASSIGN_BITAND", "LSH", "ASSIGN_LSH", "RSH", "ASSIGN_RSH",
@@ -110,7 +111,8 @@ interface Tokens {
         "SEMI", "LB", "RB", "LC", "RC", "LP", "RP", "COMMA", "ASSIGN",
         "HOOK", "COLON", "INC", "DEC", "DOT", "FUNCTION", "IF",
         "ELSE", "SWITCH", "CASE", "DEFAULT", "WHILE", "DO", "FOR",
-        "VAR", "WITH", "CATCH", "FINALLY", "RESERVED" 
+        "VAR", "WITH", "CATCH", "FINALLY", "RESERVED", "GRAMMAR",
+        "ADD_TRAP", "DEL_TRAP"
     };
 
 }