// Scanner Header File

#ifndef __SCANNER_H__
#define __SCANNER_H__


// Variable Types
#define VAR_VOID			0
#define VAR_INTEGER     1
#define VAR_LONG        2
#define VAR_SINGLE      3
#define VAR_DOUBLE      4
#define VAR_STRING      5
#define VAR_FILE			6
#define VAR_USER_DEFINED	7
#define VAR_DEFAULT	VAR_SINGLE

#define TK_SYMBOL          0
#define TK_OPERATOR        1
#define TK_STRINGCONSTANT  2
#define TK_KEYWORD         3
#define TK_VARIABLE        4
#define TK_NUMBER          5
#define TK_TYPE            6
#define TK_UNKNOWN         7
#define TK_COMMENT			8
#define TK_HEX					11
#define TK_NEWLINE			12
#define TK_SOFTLINE			13
#define TK_LABEL				14
#define TK_EOF					15
#define TK_FUNCTION			16
#define TK_DOT					17
#define TK_METACOMMAND		18
#define TK_SPACE				19
#define TK_TAB					20
#define TK_UNRECOGNIZE		21
#define TK_DEFINE				22
#define TK_CONTLINE			23


// Typedef's
typedef struct TOKEN_S token_t;

// Token Structure
struct TOKEN_S {
	char text[1024];			// Text
	int type;					// Token type
	int VarType;				// Variable Type (if a var)
	int flags;					// Flags
};

// Tokens
extern token_t *curToken;					// Current Token
extern token_t *LookToken;					// Look ahead Token


extern int LineNumber;						// Line Number
extern int FileStart;						// File started?

// Prototypes
void NextLine(int linetype);
void RestartScanner(FILE *file);
void GetToken(void);
void Match(char *string);

#endif  //  __SCANNER_H__