/******************************************************************
 * File: vs20_token.hpp
 *
 * This file was automatically generated by CppCC Version 0.0.5
 * DO NOT EDIT MANUALLY
 ******************************************************************/


#ifndef __VS20_TOKEN_HH__
#define __VS20_TOKEN_HH__

#include <string>
#include <sstream>
using namespace std;
 
#pragma warning(disable : 4290)
#pragma warning(disable : 4786)

#undef TRUE
#undef FALSE


namespace vs20
{

class Position
{
  public:
    Position () : ln(0) {}
    Position (int ln_, int col_) : ln(ln_) {}
    Position (const Position &o) : ln(o.ln) {}
    
    operator string () const
    {
      ostringstream oss;
      oss << ln << ":";
      return oss.str();
    }
    
    int ln;
};

class vs20_token
{
  friend class vs20_scanner;
  public:
    
    vs20_token () : _img_valid(true) {}
    vs20_token (int id_, const std::string &_str_img_, 
              const Position &bPos_, const Position &ePos_) :
      _str_img(_str_img_), _img_valid(true), id(id_), bPos(bPos_), ePos(ePos_)
    {}
    vs20_token (int id_, const Position &bPos_, const Position &ePos_) :
      _img_valid(true), id(id_), bPos(bPos_), ePos(ePos_)
    {}
    vs20_token (int id_) : 
      _img_valid(true), id(id_)
    {}
    vs20_token (const std::string &_str_img_) : 
      _str_img(_str_img_), _img_valid(true)
    { length = _str_img.length(); }
    vs20_token (int id_, const Position &bPos_) :
      _img_valid(true), id(id_), bPos(bPos_), ePos(bPos_)
    {}
  
  public:
    Position bPos, ePos;
    int id;
    int length;
    std::string& image()
    {
      _cacheImg();
      return _str_img;
    }
  
  private:
    const char *_img_start; //points into the scanner's buffer
    bool _img_valid; //true if the string image is in sync with the buffer
    std::string _str_img; //caches the image as a string
    
    void _set (int id_, const Position &bPos_, const Position &ePos_,
               const char *_img_start_, int length_)
    {
      id = id_; bPos = bPos_; ePos = ePos_;
      _img_start = _img_start_; length = length_;
      _img_valid = false;
    }
    
    void _set (const char *_img_start_, int length_)
    {
      _img_start = _img_start_; length = length_;
      _img_valid = false;
    }
    void _cacheImg()
    {
      if (!_img_valid) {
        _str_img.assign(_img_start, length);
        _img_valid = true;
      }
    }
    
  private: // user code
  
public:
	int integer;
	double real;


  
   /* Token id constants: */
  public:
  
    static const int eof;
    static const int BLANK;
    static const int COMMENT1;
    static const int COMMENT2;
    static const int LONG_COMMENT1;
    static const int LONG_COMMENT2;
    static const int LONG_COMMENT3;
    static const int LONG_COMMENT4;
    static const int LONG_COMMENT5;
    static const int LONG_COMMENT;
    static const int EOL;
    static const int X;
    static const int Y;
    static const int Z;
    static const int W;
    static const int COMMA;
    static const int DOT;
    static const int MINUS;
    static const int TRUE;
    static const int FALSE;
    static const int INTEGER;
    static const int REAL;
    static const int VS_2_0;
    static const int DCL_POSITION;
    static const int DCL_BLENDWEIGHT;
    static const int DCL_BLENDINDICES;
    static const int DCL_NORMAL;
    static const int DCL_PSIZE;
    static const int DCL_TEXCOORD;
    static const int DCL_TANGENT;
    static const int DCL_BINORMAL;
    static const int DCL_TESSFACTOR;
    static const int DCL_POSITIONT;
    static const int DCL_COLOR;
    static const int DCL_FOG;
    static const int DCL_DEPTH;
    static const int DCL_SAMPLE;
    static const int DEF;
    static const int DEFB;
    static const int DEFI;
    static const int ABS;
    static const int ADD;
    static const int CALL;
    static const int CALLNZ;
    static const int CRS;
    static const int DP3;
    static const int DP4;
    static const int DST;
    static const int ELSE;
    static const int ENDIF;
    static const int ENDLOOP;
    static const int ENDREP;
    static const int EXP;
    static const int EXPP;
    static const int FRC;
    static const int IF;
    static const int LABEL;
    static const int LIT;
    static const int LOG;
    static const int LOGP;
    static const int LOOP;
    static const int LRP;
    static const int M3X2;
    static const int M3X3;
    static const int M3X4;
    static const int M4X3;
    static const int M4X4;
    static const int MAD;
    static const int MAX;
    static const int MIN;
    static const int MOV;
    static const int MOVA;
    static const int MUL;
    static const int NOP;
    static const int NRM;
    static const int POW;
    static const int RCP;
    static const int REP;
    static const int RET;
    static const int RSQ;
    static const int SGE;
    static const int SGN;
    static const int SINCOS;
    static const int SLT;
    static const int _SAT;
    static const int V;
    static const int R;
    static const int C;
    static const int I;
    static const int B;
    static const int A0;
    static const int AL;
    static const int O_D;
    static const int O_FOG;
    static const int O_POS;
    static const int O_PTS;
    static const int O_T;
    static const int L;
    
}; // end of vs20_token class


} // end namespace vs20
#endif // ifndef __VS20_TOKEN_HH__


/* End of file. */
