Asterisk - The Open Source Telephony Project
18.5.0
include
asterisk
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
84
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
;
85
86
87
struct
ael_priority
88
{
89
int
priority_num
;
90
ael_priority_type
type
;
91
92
char
*
app
;
93
char
*
appargs
;
94
95
struct
pval
*
origin
;
96
struct
ael_extension
*
exten
;
97
98
struct
ael_priority
*
goto_true
;
99
struct
ael_priority
*
goto_false
;
100
struct
ael_priority
*
next
;
101
};
102
103
struct
ael_extension
104
{
105
char
*
name
;
106
char
*
cidmatch
;
107
char
*
hints
;
108
int
regexten
;
109
int
is_switch
;
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
113
struct
ast_context
*
context
;
114
115
struct
ael_priority
*
plist
;
116
struct
ael_priority
*
plist_last
;
117
struct
ael_extension
*
next_exten
;
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 */
121
struct
ael_priority
*
return_target
;
122
int
return_needed
;
123
};
124
125
#endif
/* _ASTERISK_AEL_STRUCTS_H */
AEL_IFTIME_CONTROL
Definition:
ael_structs.h:84
type
static const char type[]
Definition:
chan_ooh323.c:109
ael_extension::name
char * name
Definition:
ael_structs.h:105
ael_priority::origin
struct pval * origin
Definition:
ael_structs.h:95
errs
static int errs
Definition:
pval.c:65
ael_extension::is_switch
int is_switch
Definition:
ael_structs.h:109
AEL_CONTROL1
Definition:
ael_structs.h:84
parse_io::pval
struct pval * pval
Definition:
ael_structs.h:77
ael_extension::has_switch
int has_switch
Definition:
ael_structs.h:110
ael_priority::goto_true
struct ael_priority * goto_true
Definition:
ael_structs.h:98
ael_extension::plist_last
struct ael_priority * plist_last
Definition:
ael_structs.h:116
item
static struct aco_type item
Definition:
test_config.c:1463
ael_extension::plist
struct ael_priority * plist
Definition:
ael_structs.h:115
parse_io::scanner
yyscan_t scanner
Definition:
ael_structs.h:78
ael_priority::goto_false
struct ael_priority * goto_false
Definition:
ael_structs.h:99
ael_priority::appargs
char * appargs
Definition:
ael_structs.h:93
AEL_APPCALL
Definition:
ael_structs.h:84
AEL_FOR_CONTROL
Definition:
ael_structs.h:84
ael_extension::next_exten
struct ael_extension * next_exten
Definition:
ael_structs.h:117
ael_extension::regexten
int regexten
Definition:
ael_structs.h:108
ael_extension::context
struct ast_context * context
Definition:
ael_structs.h:113
ael_extension::cidmatch
char * cidmatch
Definition:
ael_structs.h:106
notes
static int notes
Definition:
pval.c:66
paths.h
Asterisk file paths, configured in asterisk.conf.
ael_priority::exten
struct ael_extension * exten
Definition:
ael_structs.h:96
ael2_print
void ael2_print(char *fname, pval *tree)
Definition:
pval.c:382
AEL_IF_CONTROL
Definition:
ael_structs.h:84
AEL_RETURN
Definition:
ael_structs.h:84
parse_io::syntax_error_count
int syntax_error_count
Definition:
ael_structs.h:79
pval
Definition:
pval.h:48
ael_extension::loop_break
struct ael_priority * loop_break
Definition:
ael_structs.h:119
AEL_LABEL
Definition:
ael_structs.h:84
destroy_pval
void destroy_pval(pval *item)
Definition:
pval.c:4940
ael_priority::app
char * app
Definition:
ael_structs.h:92
ael_priority_type
ael_priority_type
Definition:
ael_structs.h:84
pval.h
ael_extension::loop_continue
struct ael_priority * loop_continue
Definition:
ael_structs.h:120
pvaltype
pvaltype
Definition:
pval.h:6
ael_extension::return_target
struct ael_priority * return_target
Definition:
ael_structs.h:121
linku1
pval * linku1(pval *head, pval *tail)
Definition:
pval.c:5922
prev_word
char * prev_word
Definition:
ael_lex.c:889
ael_priority::next
struct ael_priority * next
Definition:
ael_structs.h:100
AEL_RAND_CONTROL
Definition:
ael_structs.h:84
ael_extension
Definition:
ael_structs.h:103
parse_io
Definition:
ael_structs.h:75
ael_priority::priority_num
int priority_num
Definition:
ael_structs.h:89
ael_extension::return_needed
int return_needed
Definition:
ael_structs.h:122
ael_priority
Definition:
ael_structs.h:87
yyscan_t
void * yyscan_t
Definition:
ael_structs.h:71
warns
static int warns
Definition:
pval.c:65
ael2_parse
struct pval * ael2_parse(char *fname, int *errs)
Definition:
ael_lex.c:3360
ael2_semantic_check
void ael2_semantic_check(pval *item, int *errs, int *warns, int *notes)
Definition:
pval.c:2885
npval
pval * npval(pvaltype type, int first_line, int last_line, int first_column, int last_column)
Definition:
ael.tab.c:3965
ael_priority::type
ael_priority_type type
Definition:
ael_structs.h:90
ast_context
ast_context: An extension context - must remain in sync with fake_context
Definition:
pbx.c:284
ael_extension::hints
char * hints
Definition:
ael_structs.h:107
ael_extension::checked_switch
int checked_switch
Definition:
ael_structs.h:111
Generated on Sun Aug 8 2021 19:42:56 for Asterisk - The Open Source Telephony Project by
1.8.13