001: /***** BEGIN LICENSE BLOCK *****
002: * Version: CPL 1.0/GPL 2.0/LGPL 2.1
003: *
004: * The contents of this file are subject to the Common Public
005: * License Version 1.0 (the "License"); you may not use this file
006: * except in compliance with the License. You may obtain a copy of
007: * the License at http://www.eclipse.org/legal/cpl-v10.html
008: *
009: * Software distributed under the License is distributed on an "AS
010: * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
011: * implied. See the License for the specific language governing
012: * rights and limitations under the License.
013: *
014: * Copyright (C) 2001-2002 Jan Arne Petersen <jpetersen@uni-bonn.de>
015: * Copyright (C) 2004-2005 Thomas E Enebo <enebo@acm.org>
016: *
017: * Alternatively, the contents of this file may be used under the terms of
018: * either of the GNU General Public License Version 2 or later (the "GPL"),
019: * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
020: * in which case the provisions of the GPL or the LGPL are applicable instead
021: * of those above. If you wish to allow use of your version of this file only
022: * under the terms of either the GPL or the LGPL, and not to allow others to
023: * use your version of this file under the terms of the CPL, indicate your
024: * decision by deleting the provisions above and replace them with the notice
025: * and other provisions required by the GPL or the LGPL. If you do not delete
026: * the provisions above, a recipient may use your version of this file under
027: * the terms of any one of the CPL, the GPL or the LGPL.
028: ***** END LICENSE BLOCK *****/package org.jruby.parser;
029:
030: public interface Tokens {
031: int yyErrorCode = DefaultRubyParser.yyErrorCode;
032: int kCLASS = DefaultRubyParser.kCLASS;
033: int kMODULE = DefaultRubyParser.kMODULE;
034: int kDEF = DefaultRubyParser.kDEF;
035: int kUNDEF = DefaultRubyParser.kUNDEF;
036: int kBEGIN = DefaultRubyParser.kBEGIN;
037: int kRESCUE = DefaultRubyParser.kRESCUE;
038: int kENSURE = DefaultRubyParser.kENSURE;
039: int kEND = DefaultRubyParser.kEND;
040: int kIF = DefaultRubyParser.kIF;
041: int kUNLESS = DefaultRubyParser.kUNLESS;
042: int kTHEN = DefaultRubyParser.kTHEN;
043: int kELSIF = DefaultRubyParser.kELSIF;
044: int kELSE = DefaultRubyParser.kELSE;
045: int kCASE = DefaultRubyParser.kCASE;
046: int kWHEN = DefaultRubyParser.kWHEN;
047: int kWHILE = DefaultRubyParser.kWHILE;
048: int kUNTIL = DefaultRubyParser.kUNTIL;
049: int kFOR = DefaultRubyParser.kFOR;
050: int kBREAK = DefaultRubyParser.kBREAK;
051: int kNEXT = DefaultRubyParser.kNEXT;
052: int kREDO = DefaultRubyParser.kREDO;
053: int kRETRY = DefaultRubyParser.kRETRY;
054: int kIN = DefaultRubyParser.kIN;
055: int kDO = DefaultRubyParser.kDO;
056: int kDO_COND = DefaultRubyParser.kDO_COND;
057: int kDO_BLOCK = DefaultRubyParser.kDO_BLOCK;
058: int kRETURN = DefaultRubyParser.kRETURN;
059: int kYIELD = DefaultRubyParser.kYIELD;
060: int kSUPER = DefaultRubyParser.kSUPER;
061: int kSELF = DefaultRubyParser.kSELF;
062: int kNIL = DefaultRubyParser.kNIL;
063: int kTRUE = DefaultRubyParser.kTRUE;
064: int kFALSE = DefaultRubyParser.kFALSE;
065: int kAND = DefaultRubyParser.kAND;
066: int kOR = DefaultRubyParser.kOR;
067: int kNOT = DefaultRubyParser.kNOT;
068: int kIF_MOD = DefaultRubyParser.kIF_MOD;
069: int kUNLESS_MOD = DefaultRubyParser.kUNLESS_MOD;
070: int kWHILE_MOD = DefaultRubyParser.kWHILE_MOD;
071: int kUNTIL_MOD = DefaultRubyParser.kUNTIL_MOD;
072: int kRESCUE_MOD = DefaultRubyParser.kRESCUE_MOD;
073: int kALIAS = DefaultRubyParser.kALIAS;
074: int kDEFINED = DefaultRubyParser.kDEFINED;
075: int klBEGIN = DefaultRubyParser.klBEGIN;
076: int klEND = DefaultRubyParser.klEND;
077: int k__LINE__ = DefaultRubyParser.k__LINE__;
078: int k__FILE__ = DefaultRubyParser.k__FILE__;
079:
080: int tIDENTIFIER = DefaultRubyParser.tIDENTIFIER;
081: int tFID = DefaultRubyParser.tFID;
082: int tGVAR = DefaultRubyParser.tGVAR;
083: int tIVAR = DefaultRubyParser.tIVAR;
084: int tCONSTANT = DefaultRubyParser.tCONSTANT;
085: int tCVAR = DefaultRubyParser.tCVAR;
086: int tINTEGER = DefaultRubyParser.tINTEGER;
087: int tFLOAT = DefaultRubyParser.tFLOAT;
088: int tSTRING_CONTENT = DefaultRubyParser.tSTRING_CONTENT;
089: int tSTRING_BEG = DefaultRubyParser.tSTRING_BEG;
090: int tSTRING_END = DefaultRubyParser.tSTRING_END;
091: int tSTRING_DBEG = DefaultRubyParser.tSTRING_DBEG;
092: int tSTRING_DVAR = DefaultRubyParser.tSTRING_DVAR;
093: int tXSTRING_BEG = DefaultRubyParser.tXSTRING_BEG;
094: int tREGEXP_BEG = DefaultRubyParser.tREGEXP_BEG;
095: int tREGEXP_END = DefaultRubyParser.tREGEXP_END;
096: int tWORDS_BEG = DefaultRubyParser.tWORDS_BEG;
097: int tQWORDS_BEG = DefaultRubyParser.tQWORDS_BEG;
098: int tBACK_REF = DefaultRubyParser.tBACK_REF;
099: int tBACK_REF2 = DefaultRubyParser.tBACK_REF2;
100: int tNTH_REF = DefaultRubyParser.tNTH_REF;
101:
102: int tUPLUS = DefaultRubyParser.tUPLUS;
103: int tUMINUS = DefaultRubyParser.tUMINUS;
104: int tUMINUS_NUM = DefaultRubyParser.tUMINUS_NUM;
105: int tPOW = DefaultRubyParser.tPOW;
106: int tCMP = DefaultRubyParser.tCMP;
107: int tEQ = DefaultRubyParser.tEQ;
108: int tEQQ = DefaultRubyParser.tEQQ;
109: int tNEQ = DefaultRubyParser.tNEQ;
110: int tGEQ = DefaultRubyParser.tGEQ;
111: int tLEQ = DefaultRubyParser.tLEQ;
112: int tANDOP = DefaultRubyParser.tANDOP;
113: int tOROP = DefaultRubyParser.tOROP;
114: int tMATCH = DefaultRubyParser.tMATCH;
115: int tNMATCH = DefaultRubyParser.tNMATCH;
116: int tDOT = DefaultRubyParser.tDOT;
117: int tDOT2 = DefaultRubyParser.tDOT2;
118: int tDOT3 = DefaultRubyParser.tDOT3;
119: int tAREF = DefaultRubyParser.tAREF;
120: int tASET = DefaultRubyParser.tASET;
121: int tLSHFT = DefaultRubyParser.tLSHFT;
122: int tRSHFT = DefaultRubyParser.tRSHFT;
123: int tCOLON2 = DefaultRubyParser.tCOLON2;
124:
125: int tCOLON3 = DefaultRubyParser.tCOLON3;
126: int tOP_ASGN = DefaultRubyParser.tOP_ASGN;
127: int tASSOC = DefaultRubyParser.tASSOC;
128: int tLPAREN = DefaultRubyParser.tLPAREN;
129: int tLPAREN2 = DefaultRubyParser.tLPAREN2;
130: int tRPAREN = DefaultRubyParser.tRPAREN;
131: int tLPAREN_ARG = DefaultRubyParser.tLPAREN_ARG;
132: int tLBRACK = DefaultRubyParser.tLBRACK;
133: int tRBRACK = DefaultRubyParser.tRBRACK;
134: int tLBRACE = DefaultRubyParser.tLBRACE;
135: int tLBRACE_ARG = DefaultRubyParser.tLBRACE_ARG;
136: int tSTAR = DefaultRubyParser.tSTAR;
137: int tSTAR2 = DefaultRubyParser.tSTAR2;
138: int tAMPER = DefaultRubyParser.tAMPER;
139: int tAMPER2 = DefaultRubyParser.tAMPER2;
140: int tSYMBEG = DefaultRubyParser.tSYMBEG;
141: int tTILDE = DefaultRubyParser.tTILDE;
142: int tPERCENT = DefaultRubyParser.tPERCENT;
143: int tDIVIDE = DefaultRubyParser.tDIVIDE;
144: int tPLUS = DefaultRubyParser.tPLUS;
145: int tMINUS = DefaultRubyParser.tMINUS;
146: int tLT = DefaultRubyParser.tLT;
147: int tGT = DefaultRubyParser.tGT;
148: int tCARET = DefaultRubyParser.tCARET;
149: int tBANG = DefaultRubyParser.tBANG;
150: int tLCURLY = DefaultRubyParser.tLCURLY;
151: int tRCURLY = DefaultRubyParser.tRCURLY;
152: int tPIPE = DefaultRubyParser.tPIPE;
153:
154: // BEGIN NETBEANS MODIFICATIONS
155: // I'd like to pull these out of the grammar, but I don't dare to regenerate the yacc file etc.
156: // so for now just use unused constants
157: //int tCOMMENT = DefaultRubyParser.tCOMMENT;
158: //int tWHITESPACE = DefaultRubyParser.tWHITESPACE;
159: int tCOMMENT = 50000;
160: int tWHITESPACE = 50001;
161: int tDOCUMENTATION = 50002;
162: // END NETBEANS MODIFICATIONS
163:
164: String[] operators = { "+@", "-@", "**", "<=>", "==", "===", "!=",
165: ">=", "<=", "&&", "||", "=~", "!~", "..", "...", "[]",
166: "[]=", "<<", ">>", "::" };
167: }
|