Main Page | Class List | Directories | File List | Class Members | File Members

operators.h

Go to the documentation of this file.
00001 /*
00002 || This file is part of Pike. For copyright information see COPYRIGHT.
00003 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
00004 || for more information.
00005 || $Id: operators.h,v 1.17 2004/11/27 22:48:11 mast Exp $
00006 */
00007 
00008 #ifndef OPERATORS_H
00009 #define OPERATORS_H
00010 
00011 #define COMPARISON(ID,NAME,X) PMOD_EXPORT void ID(INT32 num_arg);
00012 
00013 #include "svalue.h"
00014 
00015 extern struct program *string_assignment_program;
00016 struct string_assignment_storage
00017 {
00018   struct svalue lval[2];
00019   struct pike_string *s;
00020 };
00021 
00022 /* Flags for the bitfield to o_range2. */
00023 #define RANGE_LOW_FROM_BEG      0x10
00024 #define RANGE_LOW_FROM_END      0x20
00025 #define RANGE_LOW_OPEN          0x40
00026 #define RANGE_HIGH_FROM_BEG     0x01
00027 #define RANGE_HIGH_FROM_END     0x02
00028 #define RANGE_HIGH_OPEN         0x04
00029 
00030 /* The bound type flags passed to `[..] */
00031 #define INDEX_FROM_BEG          0
00032 #define INDEX_FROM_END          1
00033 #define OPEN_BOUND              2
00034 #define tRangeBound tInt02
00035 
00036 /* Prototypes begin here */
00037 void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind);
00038 void o_index(void);
00039 void o_cast_to_int(void);
00040 void o_cast_to_string(void);
00041 void o_cast(struct pike_type *type, INT32 run_time_type);
00042 PMOD_EXPORT void f_cast(void);
00043 
00044 PMOD_EXPORT void f_ne(INT32 args);
00045 COMPARISON(f_eq,"`==", is_eq)
00046 COMPARISON(f_lt,"`<" , is_lt)
00047 COMPARISON(f_le,"`<=", is_le)
00048 COMPARISON(f_gt,"`>" , is_gt)
00049 COMPARISON(f_ge,"`>=", is_ge)
00050 
00051 PMOD_EXPORT void f_add(INT32 args);
00052 PMOD_EXPORT void o_subtract(void);
00053 PMOD_EXPORT void f_minus(INT32 args);
00054 PMOD_EXPORT void o_and(void);
00055 PMOD_EXPORT void f_and(INT32 args);
00056 PMOD_EXPORT void o_or(void);
00057 PMOD_EXPORT void f_or(INT32 args);
00058 PMOD_EXPORT void o_xor(void);
00059 PMOD_EXPORT void f_xor(INT32 args);
00060 PMOD_EXPORT void o_lsh(void);
00061 PMOD_EXPORT void f_lsh(INT32 args);
00062 PMOD_EXPORT void o_rsh(void);
00063 PMOD_EXPORT void f_rsh(INT32 args);
00064 PMOD_EXPORT void o_multiply(void);
00065 PMOD_EXPORT void f_multiply(INT32 args);
00066 PMOD_EXPORT void o_divide(void);
00067 PMOD_EXPORT void f_divide(INT32 args);
00068 PMOD_EXPORT void o_mod(void);
00069 PMOD_EXPORT void f_mod(INT32 args);
00070 PMOD_EXPORT void o_not(void);
00071 PMOD_EXPORT void f_not(INT32 args);
00072 PMOD_EXPORT void o_compl(void);
00073 PMOD_EXPORT void f_compl(INT32 args);
00074 PMOD_EXPORT void o_negate(void);
00075 PMOD_EXPORT void o_range2(int bound_types);
00076 PMOD_EXPORT void f_range (INT32 args);
00077 PMOD_EXPORT void f_index(INT32 args);
00078 PMOD_EXPORT void f_arrow(INT32 args);
00079 PMOD_EXPORT void f_index_assign(INT32 args);
00080 PMOD_EXPORT void f_arrow_assign(INT32 args);
00081 PMOD_EXPORT void f_sizeof(INT32 args);
00082 void init_operators(void);
00083 void exit_operators(void);
00084 /* Prototypes end here */
00085 
00086 /* Compat. */
00087 #define o_range() o_range2 (RANGE_LOW_FROM_BEG|RANGE_HIGH_FROM_BEG)
00088 
00089 #undef COMPARISON
00090 #endif

Generated on Fri Jul 22 23:44:26 2005 for Pike by  doxygen 1.3.9.1