Asterisk - The Open Source Telephony Project  18.5.0
ael_structs.h
Go to the documentation of this file.
1 /*
2  * Asterisk -- An open source telephony toolkit.
3  *
4  * Copyright (C) 1999 - 2007, Digium, Inc.
5  *
6  * Mark Spencer <[email protected]>
7  *
8  * See http://www.asterisk.org for more information about
9  * the Asterisk project. Please do not directly contact
10  * any of the maintainers of this project for assistance;
11  * the project provides a web site, mailing lists and IRC
12  * channels for your use.
13  *
14  * This program is free software, distributed under the terms of
15  * the GNU General Public License Version 2. See the LICENSE file
16  * at the top of the source tree.
17  */
18 
19 /*! \file
20  * \brief Structures for AEL - the Asterisk extension language
21  *
22  * \ref pbx_ael.c
23  * \todo document this file (ael.h)
24  */
25 
26 #ifndef _ASTERISK_AEL_STRUCTS_H
27 #define _ASTERISK_AEL_STRUCTS_H
28 
29 /*
30  * We include asterisk/paths.h here because it is a convenient place
31  * that doesn't require us to rebuild ael files from .fl/.y
32  */
33 #include "asterisk/paths.h"
34 
35 #include "pval.h"
36 
37 #if !defined(SOLARIS) && !defined(__CYGWIN__)
38 /* #include <err.h> */
39 #else
40 #define quad_t int64_t
41 #endif
42 
43 #if defined(LONG_LONG_MIN) && !defined(QUAD_MIN)
44 #define QUAD_MIN LONG_LONG_MIN
45 #endif
46 #if defined(LONG_LONG_MAX) && !defined(QUAD_MAX)
47 #define QUAD_MAX LONG_LONG_MAX
48 #endif
49 
50 # if ! defined(QUAD_MIN)
51 # define QUAD_MIN (-0x7fffffffffffffffLL-1)
52 # endif
53 # if ! defined(QUAD_MAX)
54 # define QUAD_MAX (0x7fffffffffffffffLL)
55 # endif
56 
57 
58 #if 0
59 #endif
60 void ael2_semantic_check(pval *item, int *errs, int *warns, int *notes);
61 pval *npval(pvaltype type, int first_line, int last_line, int first_column, int last_column);
62 pval *linku1(pval *head, pval *tail);
63 void ael2_print(char *fname, pval *tree);
64 struct pval *ael2_parse(char *fname, int *errs); /* in ael.flex */
65 void destroy_pval(pval *item);
66 
67 extern char *prev_word; /* in ael.flex */
68 
69 #ifndef YY_TYPEDEF_YY_SCANNER_T
70 #define YY_TYPEDEF_YY_SCANNER_T
71 typedef void* yyscan_t;
72 #endif
73 
74 /* for passing info into and out of yyparse */
75 struct parse_io
76 {
77  struct pval *pval; /* yyparse will set this to point to the parse tree */
78  yyscan_t scanner; /* yylex needs a scanner. Set it up, and pass it in */
79  int syntax_error_count; /* the count of syntax errors encountered */
80 };
81 
82 /* for CODE GENERATION */
83 
85 
86 
88 {
91 
92  char *app;
93  char *appargs;
94 
95  struct pval *origin;
97 
101 };
102 
104 {
105  char *name;
106  char *cidmatch;
107  char *hints;
108  int regexten;
110  int has_switch; /* set if a switch exists in the extension */
111  int checked_switch; /* set if we checked for a switch in the extension -- so we don't have to do it again */
112 
114 
118 
119  struct ael_priority *loop_break; /*!< set by latest loop for breaks */
120  struct ael_priority *loop_continue; /*!< set by lastest loop for continuing */
123 };
124 
125 #endif /* _ASTERISK_AEL_STRUCTS_H */
static const char type[]
Definition: chan_ooh323.c:109
struct pval * origin
Definition: ael_structs.h:95
static int errs
Definition: pval.c:65
struct pval * pval
Definition: ael_structs.h:77
struct ael_priority * goto_true
Definition: ael_structs.h:98
struct ael_priority * plist_last
Definition: ael_structs.h:116
static struct aco_type item
Definition: test_config.c:1463
struct ael_priority * plist
Definition: ael_structs.h:115
yyscan_t scanner
Definition: ael_structs.h:78
struct ael_priority * goto_false
Definition: ael_structs.h:99
char * appargs
Definition: ael_structs.h:93
struct ael_extension * next_exten
Definition: ael_structs.h:117
struct ast_context * context
Definition: ael_structs.h:113
char * cidmatch
Definition: ael_structs.h:106
static int notes
Definition: pval.c:66
Asterisk file paths, configured in asterisk.conf.
struct ael_extension * exten
Definition: ael_structs.h:96
void ael2_print(char *fname, pval *tree)
Definition: pval.c:382
int syntax_error_count
Definition: ael_structs.h:79
Definition: pval.h:48
struct ael_priority * loop_break
Definition: ael_structs.h:119
void destroy_pval(pval *item)
Definition: pval.c:4940
char * app
Definition: ael_structs.h:92
ael_priority_type
Definition: ael_structs.h:84
struct ael_priority * loop_continue
Definition: ael_structs.h:120
pvaltype
Definition: pval.h:6
struct ael_priority * return_target
Definition: ael_structs.h:121
pval * linku1(pval *head, pval *tail)
Definition: pval.c:5922
char * prev_word
Definition: ael_lex.c:889
struct ael_priority * next
Definition: ael_structs.h:100
int priority_num
Definition: ael_structs.h:89
void * yyscan_t
Definition: ael_structs.h:71
static int warns
Definition: pval.c:65
struct pval * ael2_parse(char *fname, int *errs)
Definition: ael_lex.c:3360
void ael2_semantic_check(pval *item, int *errs, int *warns, int *notes)
Definition: pval.c:2885
pval * npval(pvaltype type, int first_line, int last_line, int first_column, int last_column)
Definition: ael.tab.c:3965
ael_priority_type type
Definition: ael_structs.h:90
ast_context: An extension context - must remain in sync with fake_context
Definition: pbx.c:284