Asterisk - The Open Source Telephony Project GIT-master-d856a3e
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 <markster@digium.com>
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
60void ael2_semantic_check(pval *item, int *errs, int *warns, int *notes);
61pval *npval(pvaltype type, int first_line, int last_line, int first_column, int last_column);
62pval *linku1(pval *head, pval *tail);
63void ael2_print(char *fname, pval *tree);
64struct pval *ael2_parse(char *fname, int *errs); /* in ael.flex */
66
67extern char *prev_word; /* in ael.flex */
68
69#ifndef YY_TYPEDEF_YY_SCANNER_T
70#define YY_TYPEDEF_YY_SCANNER_T
71typedef void* yyscan_t;
72#endif
73
74/* for passing info into and out of yyparse */
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;
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 */
void * yyscan_t
Definition: ael_structs.h:71
char * prev_word
Definition: ael_lex.c:878
struct pval * ael2_parse(char *fname, int *errs)
Definition: ael_lex.c:3344
pval * linku1(pval *head, pval *tail)
Definition: pval.c:5922
void ael2_semantic_check(pval *item, int *errs, int *warns, int *notes)
Definition: pval.c:2885
void destroy_pval(pval *item)
Definition: pval.c:4940
pval * npval(pvaltype type, int first_line, int last_line, int first_column, int last_column)
Definition: ael.tab.c:3965
ael_priority_type
Definition: ael_structs.h:84
@ AEL_FOR_CONTROL
Definition: ael_structs.h:84
@ AEL_RAND_CONTROL
Definition: ael_structs.h:84
@ AEL_RETURN
Definition: ael_structs.h:84
@ AEL_IF_CONTROL
Definition: ael_structs.h:84
@ AEL_IFTIME_CONTROL
Definition: ael_structs.h:84
@ AEL_CONTROL1
Definition: ael_structs.h:84
@ AEL_LABEL
Definition: ael_structs.h:84
@ AEL_APPCALL
Definition: ael_structs.h:84
void ael2_print(char *fname, pval *tree)
Definition: pval.c:382
static const char type[]
Definition: chan_ooh323.c:109
Asterisk file paths, configured in asterisk.conf.
static int notes
Definition: pval.c:66
static int warns
Definition: pval.c:65
static int errs
Definition: pval.c:65
pvaltype
Definition: pval.h:7
struct ael_priority * plist
Definition: ael_structs.h:115
struct ael_priority * loop_break
Definition: ael_structs.h:119
struct ast_context * context
Definition: ael_structs.h:113
struct ael_priority * plist_last
Definition: ael_structs.h:116
struct ael_priority * loop_continue
Definition: ael_structs.h:120
struct ael_priority * return_target
Definition: ael_structs.h:121
char * cidmatch
Definition: ael_structs.h:106
struct ael_extension * next_exten
Definition: ael_structs.h:117
struct ael_priority * goto_false
Definition: ael_structs.h:99
struct ael_priority * goto_true
Definition: ael_structs.h:98
struct pval * origin
Definition: ael_structs.h:95
char * appargs
Definition: ael_structs.h:93
char * app
Definition: ael_structs.h:92
ael_priority_type type
Definition: ael_structs.h:90
struct ael_priority * next
Definition: ael_structs.h:100
int priority_num
Definition: ael_structs.h:89
struct ael_extension * exten
Definition: ael_structs.h:96
ast_context: An extension context
Definition: pbx.c:284
int syntax_error_count
Definition: ael_structs.h:79
yyscan_t scanner
Definition: ael_structs.h:78
struct pval * pval
Definition: ael_structs.h:77
Definition: pval.h:49
static struct aco_type item
Definition: test_config.c:1463