// 
//  scanner.h
//  trunk
//  
//  Created by Ben McRedmond on 2008-11-06.
//  Copyright 2008 Ben McRedmond. All rights reserved.
// 

#ifndef scanner_h
#define scanner_h

#include "buffer.h"
#include "common.h"
#include "token.h"

namespace cirrus {
	class scanner {
		buffer *pTextInBuffer;
		
		void skipWhiteSpace(); // Method to skip whitespace
		
		// Comment Skipping
		void skipComment(char nextCh);
		void skipSingleLineComment();
		void skipMultiLineComment();
		
		// Token Types
		wordToken 	cWordToken;
		//numberToken cNumberToken;
		//stringToken cStringToken;
		//symbolToken cSymbolToken;
		//eofToken    cEofToken;
		//errorToken	cErrorToken;
		
	public:		
		characterCode charCodeMap[]; // Character map
		
		// Constructors and Destructors
		scanner(buffer *source);
		~scanner();
		
		token *getToken(); // Returns a pointer to the next token
	};
}

#endif