Now 'vbgame' is included inside this project. Some fixes.
This commit is contained in:
77
tokenizer.h
Normal file
77
tokenizer.h
Normal file
@@ -0,0 +1,77 @@
|
||||
#pragma once
|
||||
|
||||
typedef unsigned char byte;
|
||||
typedef unsigned short word;
|
||||
|
||||
enum t_tokentype {
|
||||
TOKEN_ERROR,
|
||||
TOKEN_NUMBER,
|
||||
TOKEN_STRING,
|
||||
|
||||
TOKEN_IDENTIFIER,
|
||||
TOKEN_LABEL,
|
||||
TOKEN_DIM,
|
||||
|
||||
TOKEN_LET,
|
||||
TOKEN_IF,
|
||||
TOKEN_ELSE,
|
||||
TOKEN_END,
|
||||
TOKEN_FOR,
|
||||
TOKEN_BREAK,
|
||||
TOKEN_CONTINUE,
|
||||
TOKEN_GOTO,
|
||||
TOKEN_GOSUB,
|
||||
TOKEN_RETURN,
|
||||
TOKEN_REM,
|
||||
TOKEN_QUIT,
|
||||
TOKEN_INC,
|
||||
TOKEN_DEC,
|
||||
|
||||
TOKEN_THEN,
|
||||
TOKEN_TO,
|
||||
|
||||
TOKEN_AND,
|
||||
TOKEN_OR,
|
||||
TOKEN_NOT,
|
||||
TOKEN_MOD,
|
||||
TOKEN_PLUS,
|
||||
TOKEN_MINUS,
|
||||
TOKEN_ASTERISC,
|
||||
TOKEN_SLASH,
|
||||
TOKEN_LPAR,
|
||||
TOKEN_RPAR,
|
||||
TOKEN_COLON,
|
||||
TOKEN_COMMA,
|
||||
TOKEN_LT,
|
||||
TOKEN_GT,
|
||||
TOKEN_LEQ,
|
||||
TOKEN_GEQ,
|
||||
TOKEN_EQ,
|
||||
TOKEN_ENDLINE,
|
||||
TOKEN_ENDFILE,
|
||||
|
||||
TOKEN_STRLEFT,
|
||||
TOKEN_STRLEN,
|
||||
TOKEN_DEBUG,
|
||||
TOKEN_CHR,
|
||||
TOKEN_STR,
|
||||
TOKEN_SETSPRITE,
|
||||
TOKEN_PUTSPRITE,
|
||||
TOKEN_LOCATE,
|
||||
TOKEN_PRINT,
|
||||
TOKEN_PUTCHAR,
|
||||
TOKEN_SETCHAR,
|
||||
TOKEN_KEYPRESSED,
|
||||
TOKEN_ANYKEY,
|
||||
TOKEN_UPDATESCR,
|
||||
TOKEN_COLOR,
|
||||
TOKEN_BORDER,
|
||||
};
|
||||
|
||||
void tkn_init(const char* buffer);
|
||||
void tkn_next();
|
||||
t_tokentype tkn_get_token();
|
||||
char* tkn_get_string();
|
||||
int tkn_get_value();
|
||||
int tkn_get_line();
|
||||
int tkn_get_row();
|
||||
Reference in New Issue
Block a user