diff options
Diffstat (limited to 'src/main/javassist/compiler/TokenId.java')
-rw-r--r-- | src/main/javassist/compiler/TokenId.java | 103 |
1 files changed, 46 insertions, 57 deletions
diff --git a/src/main/javassist/compiler/TokenId.java b/src/main/javassist/compiler/TokenId.java index 8b78bf00..b0cd7acf 100644 --- a/src/main/javassist/compiler/TokenId.java +++ b/src/main/javassist/compiler/TokenId.java @@ -1,28 +1,17 @@ /* - * This file is part of the Javassist toolkit. + * Javassist, a Java-bytecode translator toolkit. + * Copyright (C) 1999-2003 Shigeru Chiba. All Rights Reserved. * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - * the License for the specific language governing rights and limitations - * under the License. - * - * The Original Code is Javassist. - * - * The Initial Developer of the Original Code is Shigeru Chiba. Portions - * created by Shigeru Chiba are Copyright (C) 1999-2003 Shigeru Chiba. - * All Rights Reserved. - * - * Contributor(s): - * - * The development of this software is supported in part by the PRESTO - * program (Sakigake Kenkyu 21) of Japan Science and Technology Corporation. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. */ - package javassist.compiler; public interface TokenId { @@ -34,7 +23,7 @@ public interface TokenId { int CATCH = 305; int CHAR = 306; int CLASS = 307; - int CONST = 308; // reserved keyword + int CONST = 308; // reserved keyword int CONTINUE = 309; int DEFAULT = 310; int DO = 311; @@ -45,7 +34,7 @@ public interface TokenId { int FINALLY = 316; int FLOAT = 317; int FOR = 318; - int GOTO = 319; // reserved keyword + int GOTO = 319; // reserved keyword int IF = 320; int IMPLEMENTS = 321; int IMPORT = 322; @@ -75,39 +64,39 @@ public interface TokenId { int WHILE = 346; int STRICT = 347; - int NEQ = 350; // != - int MOD_E = 351; // %= - int AND_E = 352; // &= - int MUL_E = 353; // *= - int PLUS_E = 354; // += - int MINUS_E = 355; // -= - int DIV_E = 356; // /= - int LE = 357; // <= - int EQ = 358; // == - int GE = 359; // >= - int EXOR_E = 360; // ^= - int OR_E = 361; // |= - int PLUSPLUS = 362; // ++ - int MINUSMINUS = 363; // -- - int LSHIFT = 364; // << - int LSHIFT_E = 365; // <<= - int RSHIFT = 366; // >> - int RSHIFT_E = 367; // >>= - int OROR = 368; // || - int ANDAND = 369; // && - int ARSHIFT = 370; // >>> - int ARSHIFT_E = 371; // >>>= + int NEQ = 350; // != + int MOD_E = 351; // %= + int AND_E = 352; // &= + int MUL_E = 353; // *= + int PLUS_E = 354; // += + int MINUS_E = 355; // -= + int DIV_E = 356; // /= + int LE = 357; // <= + int EQ = 358; // == + int GE = 359; // >= + int EXOR_E = 360; // ^= + int OR_E = 361; // |= + int PLUSPLUS = 362; // ++ + int MINUSMINUS = 363; // -- + int LSHIFT = 364; // << + int LSHIFT_E = 365; // <<= + int RSHIFT = 366; // >> + int RSHIFT_E = 367; // >>= + int OROR = 368; // || + int ANDAND = 369; // && + int ARSHIFT = 370; // >>> + int ARSHIFT_E = 371; // >>>= // operators from NEQ to ARSHIFT_E String opNames[] = { "!=", "%=", "&=", "*=", "+=", "-=", "/=", - "<=", "==", ">=", "^=", "|=", "++", "--", - "<<", "<<=", ">>", ">>=", "||", "&&", ">>>", - ">>>=" }; + "<=", "==", ">=", "^=", "|=", "++", "--", + "<<", "<<=", ">>", ">>=", "||", "&&", ">>>", + ">>>=" }; // operators from MOD_E to ARSHIFT_E int assignOps[] = { '%', '&', '*', '+', '-', '/', 0, 0, 0, - '^', '|', 0, 0, 0, LSHIFT, 0, RSHIFT, 0, 0, 0, - ARSHIFT }; + '^', '|', 0, 0, 0, LSHIFT, 0, RSHIFT, 0, 0, 0, + ARSHIFT }; int Identifier = 400; int CharConstant = 401; @@ -121,14 +110,14 @@ public interface TokenId { int FALSE = 411; int NULL = 412; - int CALL = 'C'; // method call - int ARRAY = 'A'; // array access - int MEMBER = '#'; // static member access + int CALL = 'C'; // method call + int ARRAY = 'A'; // array access + int MEMBER = '#'; // static member access - int EXPR = 'E'; // expression statement - int LABEL = 'L'; // label statement - int BLOCK = 'B'; // block statement - int DECL = 'D'; // declaration statement + int EXPR = 'E'; // expression statement + int LABEL = 'L'; // label statement + int BLOCK = 'B'; // block statement + int DECL = 'D'; // declaration statement int BadToken = 500; } |