//
// token.h
// trunk
//
// Created by Ben McRedmond on 2008-11-06.
// Copyright 2008 Ben McRedmond. All rights reserved.
//
#ifndef token_h
#define token_h
#include <string>
#include "buffer.h"
#include "common.h"
#include "scanner.h"
namespace cirrus {
extern characterCode charCodeMap[];
class token {
protected:
tokenCode tkCode;
std::string tkString;
public:
void print(token *tToken);
virtual void get(buffer &source);
};
class wordToken : public token {
void isReservedKeyword(); // Is the word token a reserved keyword?
public:
virtual void get(buffer &source);
};
class stringToken : public token {
public:
void get(buffer &source);
};
class numberToken : public token {
public:
void get(buffer &source);
};
class symbolToken : public token {
public:
void get(buffer &source);
};
class eofToken : public token {
public:
void get(buffer &soure);
};
class errorToken : public token {
public:
void get(buffer &source);
};
}
#endif