34 #include "loc/kword.h" 36 #include "system/program.h" 115 for (
unsigned int i = 0; i < count; i++)
137 const unsigned int startPos =
pos;
138 int unsigned len = 0;
147 if (len == 0 || *
str !=
'"')
153 char* ident =
new char[len + 1];
168 const char* start =
str;
169 const unsigned int startPos =
pos;
170 int unsigned len = 0;
197 char* ident =
new char[len + 1];
230 char* text =
new char[len + 1];
232 *(text + len) =
'\0';
251 for (
unsigned int i = 0; i < kwcount; i++)
260 for (
unsigned int i = 0; i < ocount; i++)
273 if (character ==
'\n')
virtual bool CharIsSpace(unsigned long character)=0
static bool ShouldSkip(char character)
Token(Token *last, Symbol symbol, int pos)
Symbol FindKeyword(const char *ident) const
virtual bool CharIsAlpha(unsigned long character)=0
Encapsulates an lexical analyzer. Provides token for the parser.
Character representation of keyword tied with its symbol.
Tokens are created by the Lexical Analyzer and provides an intermediate state for input consumed by t...
static const keyworddef keywords[]
static Symbol FindKeyword(const char *ident)
static char * FindKeyword(Symbol symbol)
virtual Number * Parse(const char *text, unsigned int *length, char **end)=0
Token * GetFirstToken() const
virtual bool CharIsDigit(unsigned long character)=0
Character definition of operators.
virtual bool CharIsCntrl(unsigned long character)=0
unsigned int AllocAndCopy(char **destination, const char *source)
Allocate memory and copy a string into the array.
class NumeralSystem * Input
static const operatordef operators[]
Character representation of operators tied with their symbols.
void MemCopy(void *destination, const void *source, unsigned int length)
Copy a block of memory, handling overlap.
Token(Token *last, Symbol symbol, const char *text, int pos)