/* %Z%%M% %I% %E% */ /* * Copyright (c) 1990, 1991, 1992, 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 defines the type definitions needed for expressions: */ #ifndef EXP_TYPES_H #define EXP_TYPES_H typedef enum Exp_op_enum Exp_op; typedef struct Exp_struct *Exp; typedef struct Exp_access_struct *Exp_access; typedef struct Exp_assign_struct *Exp_assign; typedef struct Exp_binary_struct *Exp_binary; typedef struct Exp_define_struct *Exp_define; typedef struct Exp_field_struct *Exp_field; typedef enum Exp_mode_enum Exp_mode; typedef struct Exp_object_struct *Exp_object; typedef struct Exp_trinary_struct *Exp_trinary; typedef struct Exp_type_struct *Exp_type; typedef union Exp_operands_union Exp_operands; /* Defining the enum here shuts alint up! */ enum Exp_op_enum { Exp_op_add, /* '+' */ Exp_op_add_assign, /* ':+=' */ Exp_op_add_result, /* '::+=' */ Exp_op_and, /* '&' */ Exp_op_and_assign, /* ':&=' */ Exp_op_and_if, /* '&&' */ Exp_op_and_result, /* '::&=' */ Exp_op_arithmetic_if, /* '? :' */ Exp_op_at, /* '@' */ Exp_op_array, /* Array fetch/store */ Exp_op_assign, /* ':=' */ Exp_op_call, /* Function call */ Exp_op_colon, /* ':' in arith. if, (temp. only */ Exp_op_convert, /* Unary '+' */ Exp_op_define, /* '::' */ Exp_op_define_assign, /* ':@=' */ Exp_op_define_result, /* '::@=' */ Exp_op_divide, /* '/' */ Exp_op_divide_assign, /* ':/=' */ Exp_op_divide_result, /* '::/=' */ Exp_op_dot, /* '.' */ Exp_op_equal, /* '=' */ Exp_op_error, /* Error expression */ Exp_op_greater_than, /* '>' */ Exp_op_greater_than_or_equal, /* '>=' */ Exp_op_identical, /* '==' */ Exp_op_integer, /* Integer constant */ Exp_op_left_shift, /* '<<' */ Exp_op_left_shift_assign, /* ':<<=' */ Exp_op_left_shift_result, /* '::<<=' */ Exp_op_less_than, /* '<' */ Exp_op_less_than_or_equal, /* '<=' */ Exp_op_list, /* Comma separated expression list */ Exp_op_minus, /* Unary '-' */ Exp_op_multiply, /* '*' */ Exp_op_multiply_assign, /* ':*=' */ Exp_op_multiply_result, /* '::*=' */ Exp_op_not, /* '!' */ Exp_op_not_equal, /* '!=' */ Exp_op_not_identical, /* '!==' */ Exp_op_or, /* '|' */ Exp_op_or_assign, /* ':|=' */ Exp_op_or_if, /* '||' */ Exp_op_or_result, /* '::|=' */ Exp_op_post_decrement, /* '--' */ Exp_op_post_increment, /* '++' */ Exp_op_power, /* '**' */ Exp_op_power_assign, /* ':**=' */ Exp_op_power_result, /* '::**=' */ Exp_op_pre_decrement, /* '--' */ Exp_op_pre_increment, /* '++' */ Exp_op_remainder, /* '%' */ Exp_op_remainder_assign, /* ':%=' */ Exp_op_remainder_result, /* '::%=' */ Exp_op_result, /* '::=' */ Exp_op_reswitch, /* Reswitch statement */ Exp_op_right_shift, /* '>>' */ Exp_op_right_shift_assign, /* ':>>=' */ Exp_op_right_shift_result, /* '::>>=' */ Exp_op_string, /* Character string in double quotes */ Exp_op_subtract, /* '-' */ Exp_op_subtract_assign, /* ':-=' */ Exp_op_subtract_result, /* '::-=' */ Exp_op_symbol, /* Symbol from symbol table */ Exp_op_text, /* Character string in single quotes */ Exp_op_xor, /* '^' */ Exp_op_xor_assign, /* ':^=' */ Exp_op_xor_result, /* '::^=' */ Exp_op_twiddle, /* '~' */ Exp_op_size /* Number of operators */ }; enum Exp_mode_enum { Exp_mode_read, Exp_mode_write }; #endif /* EXP_TYPES_H */