aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/tads/tads2/tokenizer.h
diff options
context:
space:
mode:
authorPaul Gilbert2019-05-17 11:02:01 -1000
committerPaul Gilbert2019-05-24 18:21:06 -0700
commite83972f502142b4e6191b962a7be89829bd8d708 (patch)
treeebb795b1f58f7f8c2acc8cf7e19c3ea7fb2e0077 /engines/glk/tads/tads2/tokenizer.h
parent0279143a62c2cdab635894103da03b43eba7cf9c (diff)
downloadscummvm-rg350-e83972f502142b4e6191b962a7be89829bd8d708.tar.gz
scummvm-rg350-e83972f502142b4e6191b962a7be89829bd8d708.tar.bz2
scummvm-rg350-e83972f502142b4e6191b962a7be89829bd8d708.zip
GLK: TADS2: Added code for tokenizer & vocabulary
Diffstat (limited to 'engines/glk/tads/tads2/tokenizer.h')
-rw-r--r--engines/glk/tads/tads2/tokenizer.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/glk/tads/tads2/tokenizer.h b/engines/glk/tads/tads2/tokenizer.h
index 50a8492cd3..11d76c6657 100644
--- a/engines/glk/tads/tads2/tokenizer.h
+++ b/engines/glk/tads/tads2/tokenizer.h
@@ -26,6 +26,7 @@
#include "glk/tads/tads2/lib.h"
#include "glk/tads/tads2/error_handling.h"
#include "glk/tads/tads2/line_source.h"
+#include "glk/tads/tads2/line_source_file.h"
#include "glk/tads/tads2/memory_cache.h"
namespace Glk {
@@ -356,7 +357,7 @@ struct tokcxdef {
int tokcxifcnt; /* number of #endif's we expect to find */
char tokcxif[TOKIFNEST]; /* #if state for each nesting level */
int tokcxifcur; /* current #if state, obeying nesting */
- struct linfdef *tokcxhdr; /* list of previously included headers */
+ linfdef *tokcxhdr; /* list of previously included headers */
tokscdef *tokcxsc[1]; /* special character table */
};
@@ -453,16 +454,16 @@ void tok_write_defines(tokcxdef *ctx, osfildef *fp, errcxdef *ec);
/* determine if a char is a valid non-initial character in a symbol name */
#define TOKISSYM(c) \
- (isalpha((uchar)(c)) || isdigit((uchar)(c)) || (c)=='_' || (c)=='$')
+ (Common::isAlpha((uchar)(c)) || Common::isDigit((uchar)(c)) || (c)=='_' || (c)=='$')
/* numeric conversion and checking macros */
#define TOKISHEX(c) \
- (isdigit((uchar)(c))||((c)>='a'&&(c)<='f')||((c)>='A'&&(c)<='F'))
+ (Common::isDigit((uchar)(c))||((c)>='a'&&(c)<='f')||((c)>='A'&&(c)<='F'))
#define TOKISOCT(c) \
- (isdigit((uchar)(c))&&!((c)=='8'||(c)=='9'))
+ (Common::isDigit((uchar)(c))&&!((c)=='8'||(c)=='9'))
#define TOKHEX2INT(c) \
- (isdigit((uchar)c)?(c)-'0':((c)>='a'?(c)-'a'+10:(c)-'A'+10))
+ (Common::isDigit((uchar)c)?(c)-'0':((c)>='a'?(c)-'a'+10:(c)-'A'+10))
#define TOKOCT2INT(c) ((c)-'0')
#define TOKDEC2INT(c) ((c)-'0')