ael_structs.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _ASTERISK_AEL_STRUCTS_H
00027 #define _ASTERISK_AEL_STRUCTS_H
00028
00029
00030
00031
00032
00033 #include "asterisk/paths.h"
00034
00035 #include "pval.h"
00036
00037 #if !defined(SOLARIS) && !defined(__CYGWIN__)
00038
00039 #else
00040 #define quad_t int64_t
00041 #endif
00042
00043 #if defined(LONG_LONG_MIN) && !defined(QUAD_MIN)
00044 #define QUAD_MIN LONG_LONG_MIN
00045 #endif
00046 #if defined(LONG_LONG_MAX) && !defined(QUAD_MAX)
00047 #define QUAD_MAX LONG_LONG_MAX
00048 #endif
00049
00050 # if ! defined(QUAD_MIN)
00051 # define QUAD_MIN (-0x7fffffffffffffffLL-1)
00052 # endif
00053 # if ! defined(QUAD_MAX)
00054 # define QUAD_MAX (0x7fffffffffffffffLL)
00055 # endif
00056
00057
00058 #if 0
00059 #endif
00060 void ael2_semantic_check(pval *item, int *errs, int *warns, int *notes);
00061 pval *npval(pvaltype type, int first_line, int last_line, int first_column, int last_column);
00062 pval *linku1(pval *head, pval *tail);
00063 void ael2_print(char *fname, pval *tree);
00064 struct pval *ael2_parse(char *fname, int *errs);
00065 void destroy_pval(pval *item);
00066
00067 extern char *prev_word;
00068
00069 #ifndef YY_TYPEDEF_YY_SCANNER_T
00070 #define YY_TYPEDEF_YY_SCANNER_T
00071 typedef void* yyscan_t;
00072 #endif
00073
00074
00075 struct parse_io
00076 {
00077 struct pval *pval;
00078 yyscan_t scanner;
00079 int syntax_error_count;
00080 };
00081
00082
00083
00084 typedef enum { AEL_APPCALL, AEL_CONTROL1, AEL_FOR_CONTROL, AEL_IF_CONTROL, AEL_IFTIME_CONTROL, AEL_RAND_CONTROL, AEL_LABEL, AEL_RETURN } ael_priority_type;
00085
00086
00087 struct ael_priority
00088 {
00089 int priority_num;
00090 ael_priority_type type;
00091
00092 char *app;
00093 char *appargs;
00094
00095 struct pval *origin;
00096 struct ael_extension *exten;
00097
00098 struct ael_priority *goto_true;
00099 struct ael_priority *goto_false;
00100 struct ael_priority *next;
00101 };
00102
00103 struct ael_extension
00104 {
00105 char *name;
00106 char *cidmatch;
00107 char *hints;
00108 int regexten;
00109 int is_switch;
00110 int has_switch;
00111 int checked_switch;
00112
00113 struct ast_context *context;
00114
00115 struct ael_priority *plist;
00116 struct ael_priority *plist_last;
00117 struct ael_extension *next_exten;
00118
00119 struct ael_priority *loop_break;
00120 struct ael_priority *loop_continue;
00121 struct ael_priority *return_target;
00122 int return_needed;
00123 };
00124
00125 #endif