1 /* ScummVM - Graphic Adventure Engine 2 * 3 * ScummVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the COPYRIGHT 5 * file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 */ 22 23 #ifndef GLK_HUGO_HTOKENS 24 #define GLK_HUGO_HTOKENS 25 26 namespace Glk { 27 namespace Hugo { 28 29 /* 30 * This file contains token definitions for the Hugo Compiler and Engine 31 * The enum constants of type TOKEN_T reflect the token names given in the token array. 32 * Token names followed by a # are for system use. 33 */ 34 35 /* i.e., highest numbered token */ 36 #define TOKENS 0x7B 37 38 /* arbitrary */ 39 #define HASH_KEY 1023 40 41 enum TOKEN_T { 42 /* 0x00 - 0x0f */ 43 NULL_T, OPEN_BRACKET_T, CLOSE_BRACKET_T, DECIMAL_T, 44 COLON_T, EQUALS_T, MINUS_T, PLUS_T, 45 ASTERISK_T, FORWARD_SLASH_T, PIPE_T, SEMICOLON_T, 46 OPEN_BRACE_T, CLOSE_BRACE_T, OPEN_SQUARE_T, CLOSE_SQUARE_T, 47 48 /* 0x10 - 0x1f */ 49 POUND_T, TILDE_T, GREATER_EQUAL_T, LESS_EQUAL_T, 50 NOT_EQUAL_T, AMPERSAND_T, GREATER_T, LESS_T, 51 IF_T, COMMA_T, ELSE_T, ELSEIF_T, 52 WHILE_T, DO_T, SELECT_T, CASE_T, 53 54 /* 0x20 - 0x2f */ 55 FOR_T, RETURN_T, BREAK_T, AND_T, 56 OR_T, JUMP_T, RUN_T, IS_T, 57 NOT_T, TRUE_T, FALSE_T, LOCAL_T, 58 VERB_T, XVERB_T, HELD_T, MULTI_T, 59 60 /* 0x30 - 0x3f */ 61 MULTIHELD_T, NEWLINE_T, ANYTHING_T, PRINT_T, 62 NUMBER_T, CAPITAL_T, TEXT_T, GRAPHICS_T, 63 COLOR_T, REMOVE_T, MOVE_T, TO_T, 64 PARENT_T, SIBLING_T, CHILD_T, YOUNGEST_T, 65 66 /* 0x40 - 0x4f */ 67 ELDEST_T, YOUNGER_T, ELDER_T, PROP_T, 68 ATTR_T, VAR_T, DICTENTRY_T, TEXTDATA_T, 69 ROUTINE_T, DEBUGDATA_T, OBJECTNUM_T, VALUE_T, 70 EOL_T, SYSTEM_T, NOTHELD_T, MULTINOTHELD_T, 71 72 /* 0x50 - 0x5f */ 73 WINDOW_T, RANDOM_T, WORD_T, LOCATE_T, 74 PARSE_T, CHILDREN_T, IN_T, PAUSE_T, 75 RUNEVENTS_T, ARRAYDATA_T, CALL_T, STRINGDATA_T, 76 SAVE_T, RESTORE_T, QUIT_T, INPUT_T, 77 78 /* 0x60 - 0x6f */ 79 SERIAL_T, CLS_T, SCRIPTON_T, SCRIPTOFF_T, 80 RESTART_T, HEX_T, OBJECT_T, XOBJECT_T, 81 STRING_T, ARRAY_T, PRINTCHAR_T, UNDO_T, 82 DICT_T, RECORDON_T, RECORDOFF_T, WRITEFILE_T, 83 84 /* 0x70 - */ 85 READFILE_T, WRITEVAL_T, READVAL_T, PLAYBACK_T, 86 COLOUR_T, PICTURE_T, LABEL_T, SOUND_T, 87 MUSIC_T, REPEAT_T, ADDCONTEXT_T, VIDEO_T 88 }; 89 90 struct HTokens { 91 static const char *const token[]; 92 static int token_hash[]; 93 94 HTokens(); 95 }; 96 97 } // End of namespace Hugo 98 } // End of namespace Glk 99 100 #endif 101