/* %Z%%M% %I% %E% */ /* * Copyright (c) 1990, 1991, 1992, 1993, 1995 by Wayne C. Gramlich. * All rights reserved. * * Permission to use, copy, modify, distribute, and sell this software * for any purpose is hereby granted without fee provided that the above * copyright notice and this permission are retained. The author makes * no representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. */ /* This file contains the lexical token typedefs: */ #ifndef TOKEN_TYPES_H #define TOKEN_TYPES_H typedef enum Token_type_enum Token_type; typedef union Token_value_union Token_value; typedef struct Token_struct *Token; /* Defining the enum here shuts alint up! */ /* These are the different types of lexical tokens: */ enum Token_type_enum { Token_type_add, /* '+' */ Token_type_add_assign, /* ':+=' */ Token_type_add_result, /* '::+=' */ Token_type_and, /* '&' */ Token_type_and_assign, /* ':&=' */ Token_type_and_if, /* '&&' */ Token_type_and_result, /* '::&=' */ Token_type_at, /* '@' */ Token_type_at_parenthesis, /* '@(' */ Token_type_assign, /* ':=' */ Token_type_colon, /* ':' */ Token_type_comma, /* ',' */ Token_type_decrement, /* '--' */ Token_type_define, /* '::' */ Token_type_define_assign, /* ':@=' */ Token_type_define_result, /* '::@=' */ Token_type_dot, /* '.' */ Token_type_equal, /* '=' */ Token_type_divide, /* '/' */ Token_type_divide_assign, /* ':/=' */ Token_type_divide_result, /* '::/=' */ Token_type_eol, /* End-of-line */ Token_type_greater_than, /* '>' */ Token_type_greater_than_or_equal, /* '>=' */ Token_type_identical, /* '==' */ Token_type_increment, /* '++' */ Token_type_integer, /* Integer constant */ Token_type_if, /* '?' */ Token_type_left_bracket, /* '[' */ Token_type_left_paren, /* '(' */ Token_type_left_shift, /* '<<' */ Token_type_left_shift_assign, /* ':<<=' */ Token_type_left_shift_result, /* '::<<=' */ Token_type_less_than, /* '<' */ Token_type_less_than_or_equal, /* '<=' */ Token_type_not, /* '!' */ Token_type_not_equal, /* '!=' */ Token_type_not_identical, /* '!==' */ Token_type_multiply, /* '*' */ Token_type_multiply_assign, /* ':*=' */ Token_type_multiply_result, /* '::*=' */ Token_type_or, /* '|' */ Token_type_or_assign, /* ':|=' */ Token_type_or_if, /* '||' */ Token_type_or_result, /* '::|=' */ Token_type_power, /* '**' */ Token_type_power_assign, /* ':**=' */ Token_type_power_result, /* '::**=' */ Token_type_remainder, /* '%' */ Token_type_remainder_assign, /* ':%=' */ Token_type_remainder_result, /* '::%=' */ Token_type_result, /* '::=' */ Token_type_right_bracket, /* ']' */ Token_type_right_paren, /* ')' */ Token_type_right_shift, /* '>>' */ Token_type_right_shift_assign, /* ':>>=' */ Token_type_right_shift_result, /* '::>>=' */ Token_type_string, /* Character string in double quotes */ Token_type_subtract, /* '-' */ Token_type_subtract_assign, /* ':-=' */ Token_type_subtract_result, /* '::-=' */ Token_type_symbol, /* Symbol from symbol table */ Token_type_text, /* Character string in single quotes */ Token_type_twiddle, /* '~' */ Token_type_xor, /* '^' */ Token_type_xor_assign, /* ':^=' */ Token_type_xor_result, /* '::^=' */ Token_type_zilch, /* ?? */ Token_type_size /* Number of different lexemes */ }; #endif /* TOKEN_TYPES_H */