GenericToken.java
Go to the documentation of this file.
00001 /*
00002  * (c) copyright 2008, Technische Universitaet Graz and Technische Universitaet Wien
00003  *
00004  * This file is part of jdiagengine.
00005  *
00006  * jdiagengine is free software: you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation, either version 3 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * jdiagengine is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  * You should have received a copy of the GNU General Public License
00016  * along with jdiagengine. If not, see <http://www.gnu.org/licenses/>.
00017  *
00018  * Authors: Joerg Weber, Franz Wotawa
00019  * Contact: jweber@ist.tugraz.at (preferred), or fwotawa@ist.tugraz.at
00020  *
00021  */
00022 
00023 
00039 package theoremprover;
00040 
00041 import java.lang.*;
00042 
00043 public class GenericToken extends Object
00044 {
00045   protected String value;
00046   protected int position;
00047 
00048   // Accessing structure...
00049 
00050   public String value ()
00051   {
00052     return value;
00053   }
00054 
00055   public int position ()
00056   {
00057     return position;
00058   }
00059 
00060   public void setValue(String val)
00061   {
00062     setValue(val, 0);
00063   }
00064 
00065   public void setValue(String val, int i)
00066   {
00067     value = val;
00068     position = i;
00069   }
00070 
00071 
00072   // Testing...
00073 
00074   public boolean isInteger ()
00075   {
00076     return false;
00077   }
00078 
00079   public boolean isFloat ()
00080   {
00081     return false;
00082   }
00083 
00084   public boolean isCharacter ()
00085   {
00086     return false;
00087   }
00088 
00089   public boolean isString ()
00090   {
00091     return false;
00092   }
00093 
00094   public boolean isKeyword ()
00095   {
00096     return false;
00097   }
00098 
00099   public boolean isDelimiter ()
00100   {
00101     return false;
00102   }
00103 
00104   public boolean isIdentifier ()
00105   {
00106     return false;
00107   }
00108 
00109   public boolean isEOI ()
00110   {
00111     return false;
00112   }
00113 
00114   public boolean isErrorToken ()
00115   {
00116     return false;
00117   }
00118 
00119   public boolean equalValue (String val)
00120   {
00121     return value.equals(val);
00122   }
00123 
00124   // Printing...
00125 
00126   public String print ()
00127   {
00128     return "token(" + value + ")";
00129   }
00130 
00131 
00132   // Constructors...
00133 
00134   public GenericToken ()
00135   {
00136     value = "";
00137     position = 0;
00138   }
00139 
00140   public GenericToken (String val)
00141   {
00142     value = val;
00143     position = 0;
00144   }
00145 
00146   public GenericToken (String val, int i)
00147   {
00148     value = val;
00149     position = i;
00150   }
00151 
00152 }
00153 


tug_ist_diagnosis_engine
Author(s): Safdar Zaman, Gerald Steinbauer
autogenerated on Mon Jan 6 2014 11:51:16