Asterisk.org: Developer Documentation (28 Oct 2009)

Wed Oct 28 15:48:21 2009

## Asterisk developer's documentation

# ast_expr2f.c File Reference

Dialplan Expression Parser. More...

`#include <stdio.h>`
`#include <string.h>`
`#include <errno.h>`
`#include <stdlib.h>`
`#include <sys/types.h>`
`#include <locale.h>`
`#include <ctype.h>`
`#include <err.h>`
`#include <regex.h>`
`#include <limits.h>`
`#include <asterisk/ast_expr.h>`
`#include <asterisk/logger.h>`
`#include <asterisk/strings.h>`
`#include "ast_expr2.h"`
`#include <unistd.h>`

Include dependency graph for ast_expr2f.c:

Go to the source code of this file.

## Data Structures

struct | parse_io
struct | val
struct | yy_buffer_state
struct | yy_trans_info
struct | yyguts_t

## Defines

#define | ast_yywrap(n) 1
#define | BEGIN yyg->yy_start = 1 + 2 *
#define | ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#define | EOB_ACT_CONTINUE_SCAN 0
#define | EOB_ACT_END_OF_FILE 1
#define | EOB_ACT_LAST_MATCH 2
#define | FLEX_BETA
#define | FLEX_SCANNER
#define | INITIAL 0
#define | INT16_MAX (32767)
#define | INT16_MIN (-32767-1)
#define | INT32_MAX (2147483647)
#define | INT32_MIN (-2147483647-1)
#define | INT8_MAX (127)
#define | INT8_MIN (-128)
#define | REJECT reject_used_but_not_detected
#define | SET_COLUMNS yylloc_param->first_column = (int)(yyg->yytext_r - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf);yylloc_param->last_column = yylloc_param->last_column + yyleng - 1; yylloc_param->first_line = yylloc_param->last_line = 1
#define | SET_NUMERIC_STRING yylval_param->val = (struct val *)calloc(sizeof(struct val),1); yylval_param->val->type = AST_EXPR_numeric_string; yylval_param->val->u.s = strdup(yytext);
#define | SET_STRING yylval_param->val = (struct val *)calloc(sizeof(struct val),1); yylval_param->val->type = AST_EXPR_string; yylval_param->val->u.s = strdup(yytext);
#define | trail 2
#define | UINT16_MAX (65535U)
#define | UINT32_MAX (4294967295U)
#define | UINT8_MAX (255U)
#define | unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
#define | var 1
#define | YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
#define | YY_BREAK break;
#define | YY_BUF_SIZE 16384
#define | YY_BUFFER_EOF_PENDING 2
#define | YY_BUFFER_NEW 0
#define | YY_BUFFER_NORMAL 1
#define | YY_CURRENT_BUFFER
#define | YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
#define | YY_DECL int ast_yylex (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
#define | YY_DECL_IS_OURS 1
#define | YY_DO_BEFORE_ACTION
#define | YY_END_OF_BUFFER 31
#define | YY_END_OF_BUFFER_CHAR 0
#define | YY_EXIT_FAILURE 2
#define | YY_EXTRA_TYPE void *
#define | YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
#define | yy_flex_debug yyg->yy_flex_debug_r
#define | YY_FLEX_MAJOR_VERSION 2
#define | YY_FLEX_MINOR_VERSION 5
#define | YY_FLEX_SUBMINOR_VERSION 31
#define | YY_FLUSH_BUFFER ast_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
#define | YY_INPUT(buf, result, max_size)
#define | YY_INT_ALIGNED short int
#define | YY_LESS_LINENO(n)
#define | YY_MORE_ADJ yyg->yy_more_len
#define | yy_new_buffer ast_yy_create_buffer
#define | YY_NEW_FILE ast_yyrestart(yyin ,yyscanner )
#define | YY_NULL 0
#define | YY_NUM_RULES 30
#define | YY_READ_BUF_SIZE 8192
#define | YY_RESTORE_YY_MORE_OFFSET
#define | YY_RULE_SETUP YY_USER_ACTION
#define | YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
#define | yy_set_bol(at_bol)
#define | yy_set_interactive(is_interactive)
#define | YY_SKIP_YYWRAP
#define | YY_START ((yyg->yy_start - 1) / 2)
#define | YY_START_STACK_INCR 25
#define | YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
#define | yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
#define | yyconst
#define | yyextra yyg->yyextra_r
#define | yyin yyg->yyin_r
#define | yyleng yyg->yyleng_r
#define | yyless(n)
#define | yyless(n)
#define | yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
#define | yylloc yyg->yylloc_r
#define | yylval yyg->yylval_r
#define | yymore() (yyg->yy_more_flag = 1)
#define | yyout yyg->yyout_r
#define | YYSTATE YY_START
#define | YYTABLES_NAME "yytables"
#define | yyterminate() return YY_NULL
#define | yytext yyg->yytext_r
#define | yytext_ptr yytext_r

## Typedefs

typedef short int | flex_int16_t
typedef int | flex_int32_t
typedef signed char | flex_int8_t
typedef unsigned short int | flex_uint16_t
typedef unsigned int | flex_uint32_t
typedef unsigned char | flex_uint8_t
typedef struct yy_buffer_state * | YY_BUFFER_STATE
typedef char | YY_CHAR
typedef unsigned int | yy_size_t
typedef int | yy_state_type
typedef void * | yyscan_t

## Enumerations

enum | valtype { AST_EXPR_integer, AST_EXPR_numeric_string, AST_EXPR_string, AST_EXPR_integer, AST_EXPR_numeric_string, AST_EXPR_string }

## Functions

int | ast_expr (char *expr, char *buf, int length)
YY_BUFFER_STATE | ast_yy_create_buffer (FILE *file, int size, yyscan_t yyscanner)
void | ast_yy_delete_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
void | ast_yy_flush_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
static void | ast_yy_init_buffer (YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner)
static void | ast_yy_load_buffer_state (yyscan_t yyscanner)
YY_BUFFER_STATE | ast_yy_scan_buffer (char *base, yy_size_t size, yyscan_t yyscanner)
YY_BUFFER_STATE | ast_yy_scan_bytes (yyconst char *bytes, int len, yyscan_t yyscanner)
YY_BUFFER_STATE | ast_yy_scan_string (yyconst char *yy_str, yyscan_t yyscanner)
void | ast_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
void * | ast_yyalloc (yy_size_t, yyscan_t yyscanner)
static void | ast_yyensure_buffer_stack (yyscan_t yyscanner)
int | ast_yyerror (const char *s, yyltype *loc, struct parse_io *parseio)
int | ast_yyerror (const char *, YYLTYPE *, struct parse_io *)
void | ast_yyfree (void *, yyscan_t yyscanner)
int | ast_yyget_column (yyscan_t yyscanner)
int | ast_yyget_debug (yyscan_t yyscanner)
YY_EXTRA_TYPE | ast_yyget_extra (yyscan_t yyscanner)
FILE * | ast_yyget_in (yyscan_t yyscanner)
int | ast_yyget_leng (yyscan_t yyscanner)
int | ast_yyget_lineno (yyscan_t yyscanner)
YYLTYPE * | ast_yyget_lloc (yyscan_t yyscanner)
YYSTYPE * | ast_yyget_lval (yyscan_t yyscanner)
FILE * | ast_yyget_out (yyscan_t yyscanner)
char * | ast_yyget_text (yyscan_t yyscanner)
int | ast_yylex (YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner)
int | ast_yylex_destroy (yyscan_t yyscanner)
int | ast_yylex_init (yyscan_t *scanner)
int | ast_yyparse (void *)
void | ast_yypop_buffer_state (yyscan_t yyscanner)
void | ast_yypush_buffer_state (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
void * | ast_yyrealloc (void *, yy_size_t, yyscan_t yyscanner)
void | ast_yyrestart (FILE *input_file, yyscan_t yyscanner)
void | ast_yyset_column (int column_no, yyscan_t yyscanner)
void | ast_yyset_debug (int debug_flag, yyscan_t yyscanner)
void | ast_yyset_extra (YY_EXTRA_TYPE user_defined, yyscan_t yyscanner)
void | ast_yyset_in (FILE *in_str, yyscan_t yyscanner)
void | ast_yyset_lineno (int line_number, yyscan_t yyscanner)
void | ast_yyset_lloc (YYLTYPE *yylloc_param, yyscan_t yyscanner)
void | ast_yyset_lval (YYSTYPE *yylval_param, yyscan_t yyscanner)
void | ast_yyset_out (FILE *out_str, yyscan_t yyscanner)
static int | input (yyscan_t yyscanner)
static void | yy_fatal_error (yyconst char *msg, yyscan_t yyscanner)
static void | yy_fatal_error (yyconst char msg[], yyscan_t yyscanner)
static int | yy_get_next_buffer (yyscan_t yyscanner)
static yy_state_type | yy_get_previous_state (yyscan_t yyscanner)
static int | yy_init_globals (yyscan_t yyscanner)
static yy_state_type | yy_try_NUL_trans (yy_state_type current_state, yyscan_t yyscanner)
static void | yyunput (int c, char *buf_ptr, yyscan_t yyscanner)

## Variables

static int | curlycount = 0
static yyconst flex_int16_t | yy_accept [50]
static yyconst yy_state_type | yy_NUL_trans [50]
static yyconst flex_int16_t | yy_nxt [][128]

## Detailed Description

Dialplan Expression Parser.

Definition in file ast_expr2f.c.

## Define Documentation

#define ast_yywrap | ( | n |  | ) | 1

Definition at line 322 of file ast_expr2f.c.

#define BEGIN yyg->yy_start = 1 + 2 *

Definition at line 135 of file ast_expr2f.c.

#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )

Definition at line 1442 of file ast_expr2f.c.

Referenced by ast_hide_password(), ast_restore_tty(), and stty().

#define EOB_ACT_CONTINUE_SCAN 0

Definition at line 162 of file ast_expr2f.c.

#define EOB_ACT_END_OF_FILE 1

Definition at line 163 of file ast_expr2f.c.

#define EOB_ACT_LAST_MATCH 2

Definition at line 164 of file ast_expr2f.c.

#define FLEX_BETA

Definition at line 14 of file ast_expr2f.c.

#define FLEX_SCANNER

Definition at line 9 of file ast_expr2f.c.

#define INITIAL 0

Definition at line 1305 of file ast_expr2f.c.

#define INT16_MAX (32767)

Definition at line 65 of file ast_expr2f.c.

Referenced by fsaturate().

#define INT16_MIN (-32767-1)

Definition at line 56 of file ast_expr2f.c.

Referenced by fsaturate().

#define INT32_MAX (2147483647)

Definition at line 68 of file ast_expr2f.c.

#define INT32_MIN (-2147483647-1)

Definition at line 59 of file ast_expr2f.c.

#define INT8_MAX (127)

Definition at line 62 of file ast_expr2f.c.

#define INT8_MIN (-128)

Definition at line 53 of file ast_expr2f.c.

#define REJECT reject_used_but_not_detected

Definition at line 1245 of file ast_expr2f.c.

#define SET_COLUMNS yylloc_param->first_column = (int)(yyg->yytext_r - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf);yylloc_param->last_column = yylloc_param->last_column + yyleng - 1; yylloc_param->first_line = yylloc_param->last_line = 1

Definition at line 1288 of file ast_expr2f.c.

#define SET_NUMERIC_STRING yylval_param->val = (struct val *)calloc(sizeof(struct val),1); yylval_param->val->type = AST_EXPR_numeric_string; yylval_param->val->u.s = strdup(yytext);

Definition at line 1290 of file ast_expr2f.c.

#define SET_STRING yylval_param->val = (struct val *)calloc(sizeof(struct val),1); yylval_param->val->type = AST_EXPR_string; yylval_param->val->u.s = strdup(yytext);

Definition at line 1289 of file ast_expr2f.c.

#define trail 2

Definition at line 1307 of file ast_expr2f.c.

#define UINT16_MAX (65535U)

Definition at line 74 of file ast_expr2f.c.

#define UINT32_MAX (4294967295U)

Definition at line 77 of file ast_expr2f.c.

#define UINT8_MAX (255U)

Definition at line 71 of file ast_expr2f.c.

#define unput | ( | c |  | ) | yyunput( c, yyg->yytext_ptr , yyscanner )

Definition at line 182 of file ast_expr2f.c.

#define var 1

Definition at line 1306 of file ast_expr2f.c.

Referenced by aPGSQL_connect(), aPGSQL_fetch(), aPGSQL_query(), apply_options(), apply_outgoing(), ast_cdr_copy_vars(), ast_cdr_serialize_variables(), ast_var_assign(), astman_get_variables(), cli_load_realtime(), conf_exec(), config_text_file_save(), dial_exec_full(), find_conf(), find_user_realtime(), inherit_category(), init_logger_chain(), load_config(), load_moh_classes(), move_variables(), odbc_load_module(), parse_config(), pbx_builtin_serialize_variables(), pbx_substitute_variables_helper_full(), process_my_load_module(), realtime_canmatch(), realtime_directory(), realtime_exec(), realtime_exists(), realtime_matchmore(), realtime_multi_odbc(), realtime_odbc(), realtime_peer(), realtime_switch_common(), realtime_user(), reload_queues(), retrieve_astcfgint(), sip_notify(), tds_load_module(), and vm_forwardoptions().

#define YY_AT_BOL | ( |  | ) | (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 318 of file ast_expr2f.c.

#define YY_BREAK break;

Definition at line 1505 of file ast_expr2f.c.

#define YY_BUF_SIZE 16384

Definition at line 154 of file ast_expr2f.c.

#define YY_BUFFER_EOF_PENDING 2

Definition at line 254 of file ast_expr2f.c.

#define YY_BUFFER_NEW 0

Definition at line 242 of file ast_expr2f.c.

Referenced by ast_yy_flush_buffer(), and ast_yy_scan_buffer().

#define YY_BUFFER_NORMAL 1

Definition at line 243 of file ast_expr2f.c.

#define YY_CURRENT_BUFFER

Value:

    ( yyg->yy_buffer_stack \
                              ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
                              : NULL)

Definition at line 265 of file ast_expr2f.c.

Referenced by ast_yy_flush_buffer(), ast_yy_init_buffer(), ast_yyget_column(), ast_yyget_lineno(), ast_yylex_destroy(), ast_yypop_buffer_state(), ast_yypush_buffer_state(), ast_yyset_column(), and ast_yyset_lineno().

#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]

Definition at line 272 of file ast_expr2f.c.

Referenced by ast_yyerror(), ast_yylex_destroy(), ast_yypop_buffer_state(), and ast_yypush_buffer_state().

#define YY_DECL int ast_yylex (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)

Definition at line 1493 of file ast_expr2f.c.

#define YY_DECL_IS_OURS 1

Definition at line 1489 of file ast_expr2f.c.

#define YY_DO_BEFORE_ACTION

Definition at line 1207 of file ast_expr2f.c.

#define YY_END_OF_BUFFER 31

Definition at line 1216 of file ast_expr2f.c.

#define YY_END_OF_BUFFER_CHAR 0

Definition at line 150 of file ast_expr2f.c.

Referenced by ast_yy_flush_buffer(), ast_yy_scan_buffer(), and ast_yy_scan_bytes().

#define YY_EXIT_FAILURE 2

Definition at line 2558 of file ast_expr2f.c.

Referenced by yy_fatal_error().

#define YY_EXTRA_TYPE void *

Definition at line 1316 of file ast_expr2f.c.

#define YY_FATAL_ERROR | ( | msg |  | ) | yy_fatal_error( msg , yyscanner)

Definition at line 1480 of file ast_expr2f.c.

Referenced by ast_yy_scan_buffer(), and ast_yy_scan_bytes().

#define yy_flex_debug yyg->yy_flex_debug_r

Definition at line 127 of file ast_expr2f.c.

Referenced by ast_yyget_debug(), and ast_yyset_debug().

#define YY_FLEX_MAJOR_VERSION 2

Definition at line 10 of file ast_expr2f.c.

#define YY_FLEX_MINOR_VERSION 5

Definition at line 11 of file ast_expr2f.c.

#define YY_FLEX_SUBMINOR_VERSION 31

Definition at line 12 of file ast_expr2f.c.

#define YY_FLUSH_BUFFER ast_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)

Definition at line 286 of file ast_expr2f.c.

#define YY_INPUT | ( | buf,
|  | result,
|  | max_size |  | ) |

Definition at line 1449 of file ast_expr2f.c.

#define YY_INT_ALIGNED short int

Definition at line 5 of file ast_expr2f.c.

#define YY_LESS_LINENO | ( | n |  | ) |

Definition at line 166 of file ast_expr2f.c.

#define YY_MORE_ADJ yyg->yy_more_len

Definition at line 1247 of file ast_expr2f.c.

#define yy_new_buffer ast_yy_create_buffer

Definition at line 296 of file ast_expr2f.c.

#define YY_NEW_FILE ast_yyrestart(yyin ,yyscanner )

Definition at line 148 of file ast_expr2f.c.

#define YY_NULL 0

Definition at line 103 of file ast_expr2f.c.

#define YY_NUM_RULES 30

Definition at line 1215 of file ast_expr2f.c.

#define YY_READ_BUF_SIZE 8192

Definition at line 1434 of file ast_expr2f.c.

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 1248 of file ast_expr2f.c.

#define YY_RULE_SETUP YY_USER_ACTION

Definition at line 1508 of file ast_expr2f.c.

#define YY_SC_TO_UI | ( | c |  | ) | ((unsigned int) (unsigned char) c)

Definition at line 110 of file ast_expr2f.c.

#define yy_set_bol | ( | at_bol |  | ) |

Definition at line 308 of file ast_expr2f.c.

#define yy_set_interactive | ( | is_interactive |  | ) |

Definition at line 298 of file ast_expr2f.c.

#define YY_SKIP_YYWRAP

Definition at line 323 of file ast_expr2f.c.

#define YY_START ((yyg->yy_start - 1) / 2)

Definition at line 141 of file ast_expr2f.c.

#define YY_START_STACK_INCR 25

Definition at line 1475 of file ast_expr2f.c.

#define YY_STATE_EOF | ( | state |  | ) | (YY_END_OF_BUFFER + state + 1)

Definition at line 145 of file ast_expr2f.c.

#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)

Definition at line 126 of file ast_expr2f.c.

Referenced by ast_yyget_column(), and ast_yyset_column().

#define yyconst

Definition at line 99 of file ast_expr2f.c.

#define yyextra yyg->yyextra_r

Definition at line 122 of file ast_expr2f.c.

Referenced by ast_yyget_extra(), and ast_yyset_extra().

#define yyin yyg->yyin_r

Definition at line 120 of file ast_expr2f.c.

Referenced by ast_yyget_in(), ast_yyset_in(), and yy_init_globals().

#define yyleng yyg->yyleng_r

Definition at line 123 of file ast_expr2f.c.

Referenced by ast_yyget_leng().

#define yyless | ( | n |  | ) |

Definition at line 2570 of file ast_expr2f.c.

#define yyless | ( | n |  | ) |

Definition at line 2570 of file ast_expr2f.c.

#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)

Definition at line 125 of file ast_expr2f.c.

Referenced by ast_yyget_lineno(), and ast_yyset_lineno().

#define yylloc yyg->yylloc_r

Definition at line 1361 of file ast_expr2f.c.

#define yylval yyg->yylval_r

Definition at line 1359 of file ast_expr2f.c.

#define yymore | ( |  | ) | (yyg->yy_more_flag = 1)

Definition at line 1246 of file ast_expr2f.c.

#define yyout yyg->yyout_r

Definition at line 121 of file ast_expr2f.c.

Referenced by ast_yyget_out(), ast_yyset_out(), and yy_init_globals().

#define YYSTATE YY_START

Definition at line 142 of file ast_expr2f.c.

#define YYTABLES_NAME "yytables"

Definition at line 2885 of file ast_expr2f.c.

#define yyterminate | ( |  | ) | return YY_NULL

Definition at line 1470 of file ast_expr2f.c.

#define yytext yyg->yytext_r

Definition at line 124 of file ast_expr2f.c.

Referenced by ast_yyerror(), and ast_yyget_text().

#define yytext_ptr yytext_r

Definition at line 329 of file ast_expr2f.c.

## Typedef Documentation

typedef short int flex_int16_t

Definition at line 44 of file ast_expr2f.c.

typedef int flex_int32_t

Definition at line 45 of file ast_expr2f.c.

typedef signed char flex_int8_t

Definition at line 43 of file ast_expr2f.c.

typedef unsigned short int flex_uint16_t

Definition at line 47 of file ast_expr2f.c.

typedef unsigned int flex_uint32_t

Definition at line 48 of file ast_expr2f.c.

typedef unsigned char flex_uint8_t

Definition at line 46 of file ast_expr2f.c.

typedef struct yy_buffer_state* YY_BUFFER_STATE

Definition at line 159 of file ast_expr2f.c.

typedef char YY_CHAR

Definition at line 325 of file ast_expr2f.c.

typedef unsigned int yy_size_t

Definition at line 191 of file ast_expr2f.c.

typedef int yy_state_type

Definition at line 327 of file ast_expr2f.c.

typedef void* yyscan_t

Definition at line 115 of file ast_expr2f.c.

## Enumeration Type Documentation

enum valtype

Enumerator:

  AST_EXPR_integer |
  AST_EXPR_numeric_string |
  AST_EXPR_string |
  AST_EXPR_integer |
  AST_EXPR_numeric_string |
  AST_EXPR_string |

Definition at line 1274 of file ast_expr2f.c.

    01274              {
    01275    AST_EXPR_integer, AST_EXPR_numeric_string, AST_EXPR_string
    01276 } ;

## Function Documentation

int ast_expr | ( | char * | expr,
|  | char * | buf,
|  | int | length |
| ) |  |  |

Definition at line 2912 of file ast_expr2f.c.

References AST_EXPR_integer, ast_yy_scan_string(), ast_yylex_destroy(), ast_yylex_init(), ast_yyparse(), free, parse_io::scanner, and parse_io::string.

Referenced by pbx_substitute_variables_helper_full().

    02913 {
    02914    struct parse_io io;
    02915    int return_value = 0;
    02916
    02917    memset(&io, 0, sizeof(io));
    02918    io.string = expr;  /* to pass to the error routine */
    02919
    02920    ast_yylex_init(&io.scanner);
    02921
    02922    ast_yy_scan_string(expr, io.scanner);
    02923
    02924    ast_yyparse ((void *) &io);
    02925
    02926    ast_yylex_destroy(io.scanner);
    02927
    02928    if (!io.val) {
    02929       if (length > 1) {
    02930          strcpy(buf, "0");
    02931          return_value = 1;
    02932       }
    02933    } else {
    02934       if (io.val->type == AST_EXPR_integer) {
    02935          int res_length;
    02936
    02937          res_length = snprintf(buf, length, "%ld", (long int) io.val->u.i);
    02938          return_value = (res_length <= length) ? res_length : length;
    02939       } else {
    02940 #ifdef STANDALONE
    02941          strncpy(buf, io.val->u.s, length - 1);
    02942 #else /* !STANDALONE */
    02943          ast_copy_string(buf, io.val->u.s, length);
    02944 #endif /* STANDALONE */
    02945          return_value = strlen(buf);
    02946          free(io.val->u.s);
    02947       }
    02948       free(io.val);
    02949    }
    02950    return return_value;
    02951 }

YY_BUFFER_STATE ast_yy_create_buffer | ( | FILE * | file,
|  | int | size,
|  | yyscan_t | yyscanner |
| ) |  |  |

void ast_yy_delete_buffer | ( | YY_BUFFER_STATE | b,
|  | yyscan_t | yyscanner |
| ) |  |  |

Referenced by ast_yylex_destroy(), and ast_yypop_buffer_state().

void ast_yy_flush_buffer | ( | YY_BUFFER_STATE | b,
|  | yyscan_t | yyscanner |
| ) |  |  |

Discard all buffered characters. On the next scan, YY_INPUT will be called.

Parameters:

  | b | the buffer state to be flushed, usually `YY_CURRENT_BUFFER`.
  | yyscanner | The scanner object.

Definition at line 2350 of file ast_expr2f.c.

References ast_yy_load_buffer_state(), yy_buffer_state::yy_at_bol, yy_buffer_state::yy_buf_pos, YY_BUFFER_NEW, yy_buffer_state::yy_buffer_status, yy_buffer_state::yy_ch_buf, YY_CURRENT_BUFFER, YY_END_OF_BUFFER_CHAR, and yy_buffer_state::yy_n_chars.

Referenced by ast_yy_init_buffer().

    02351 {
    02352     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02353    if ( ! b )
    02354       return;
    02355
    02356    b->yy_n_chars = 0;
    02357
    02358    /* We always need two end-of-buffer characters.  The first causes
    02359     * a transition to the end-of-buffer state.  The second causes
    02360     * a jam in that state.
    02361     */
    02362    b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
    02363    b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
    02364
    02365    b->yy_buf_pos = &b->yy_ch_buf[0];
    02366
    02367    b->yy_at_bol = 1;
    02368    b->yy_buffer_status = YY_BUFFER_NEW;
    02369
    02370    if ( b == YY_CURRENT_BUFFER )
    02371       ast_yy_load_buffer_state(yyscanner );
    02372 }

static void ast_yy_init_buffer | ( | YY_BUFFER_STATE | b,
|  | FILE * | file,
|  | yyscan_t | yyscanner |
| ) |  |  | `[static]`

The main scanner function which does all the work.

Definition at line 2321 of file ast_expr2f.c.

References ast_yy_flush_buffer(), yy_buffer_state::yy_bs_column, yy_buffer_state::yy_bs_lineno, YY_CURRENT_BUFFER, yy_buffer_state::yy_fill_buffer, yy_buffer_state::yy_input_file, and yy_buffer_state::yy_is_interactive.

    02323 {
    02324    int oerrno = errno;
    02325     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02326
    02327    ast_yy_flush_buffer(b ,yyscanner);
    02328
    02329    b->yy_input_file = file;
    02330    b->yy_fill_buffer = 1;
    02331
    02332     /* If b is the current buffer, then ast_yy_init_buffer was _probably_
    02333      * called from ast_yyrestart() or through yy_get_next_buffer.
    02334      * In that case, we don't want to reset the lineno or column.
    02335      */
    02336     if (b != YY_CURRENT_BUFFER){
    02337         b->yy_bs_lineno = 1;
    02338         b->yy_bs_column = 0;
    02339     }
    02340
    02341         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
    02342
    02343    errno = oerrno;
    02344 }

static void ast_yy_load_buffer_state | ( | yyscan_t | yyscanner | ) | `[static]`

Referenced by ast_yy_flush_buffer(), ast_yypop_buffer_state(), and ast_yypush_buffer_state().

YY_BUFFER_STATE ast_yy_scan_buffer | ( | char * | base,
|  | yy_size_t | size,
|  | yyscan_t | yyscanner |
| ) |  |  |

Setup the input buffer state to scan directly from a user-specified character buffer.

Parameters:

  | base | the character buffer
  | size | the size in bytes of the character buffer
  | yyscanner | The scanner object.

Returns:
  the newly allocated buffer state object.

Definition at line 2477 of file ast_expr2f.c.

References ast_yy_switch_to_buffer(), ast_yyalloc(), yy_buffer_state::yy_at_bol, yy_buffer_state::yy_buf_pos, yy_buffer_state::yy_buf_size, YY_BUFFER_NEW, yy_buffer_state::yy_buffer_status, yy_buffer_state::yy_ch_buf, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, yy_buffer_state::yy_fill_buffer, yy_buffer_state::yy_input_file, yy_buffer_state::yy_is_interactive, yy_buffer_state::yy_is_our_buffer, and yy_buffer_state::yy_n_chars.

Referenced by ast_yy_scan_bytes().

    02478 {
    02479    YY_BUFFER_STATE b;
    02480
    02481    if ( size < 2 ||
    02482         base[size-2] != YY_END_OF_BUFFER_CHAR ||
    02483         base[size-1] != YY_END_OF_BUFFER_CHAR )
    02484       /* They forgot to leave room for the EOB's. */
    02485       return 0;
    02486
    02487    b = (YY_BUFFER_STATE) ast_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
    02488    if ( ! b )
    02489       YY_FATAL_ERROR( "out of dynamic memory in ast_yy_scan_buffer()" );
    02490
    02491    b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
    02492    b->yy_buf_pos = b->yy_ch_buf = base;
    02493    b->yy_is_our_buffer = 0;
    02494    b->yy_input_file = 0;
    02495    b->yy_n_chars = b->yy_buf_size;
    02496    b->yy_is_interactive = 0;
    02497    b->yy_at_bol = 1;
    02498    b->yy_fill_buffer = 0;
    02499    b->yy_buffer_status = YY_BUFFER_NEW;
    02500
    02501    ast_yy_switch_to_buffer(b ,yyscanner );
    02502
    02503    return b;
    02504 }

YY_BUFFER_STATE ast_yy_scan_bytes | ( | yyconst char * | bytes,
|  | int | len,
|  | yyscan_t | yyscanner |
| ) |  |  |

Setup the input buffer state to scan the given bytes. The next call to ast_yylex() will scan from a copy of bytes.

Parameters:

  | bytes | the byte buffer to scan
  | len | the number of bytes in the buffer pointed to by bytes.
  | yyscanner | The scanner object.

Returns:
  the newly allocated buffer state object.

Definition at line 2527 of file ast_expr2f.c.

References ast_yy_scan_buffer(), ast_yyalloc(), n, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, and yy_buffer_state::yy_is_our_buffer.

Referenced by ast_yy_scan_string().

    02528 {
    02529    YY_BUFFER_STATE b;
    02530    char *buf;
    02531    yy_size_t n;
    02532    int i;
    02533
    02534    /* Get memory for full buffer, including space for trailing EOB's. */
    02535    n = len + 2;
    02536    buf = (char *) ast_yyalloc(n ,yyscanner );
    02537    if ( ! buf )
    02538       YY_FATAL_ERROR( "out of dynamic memory in ast_yy_scan_bytes()" );
    02539
    02540    for ( i = 0; i < len; ++i )
    02541       buf[i] = bytes[i];
    02542
    02543    buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
    02544
    02545    b = ast_yy_scan_buffer(buf,n ,yyscanner);
    02546    if ( ! b )
    02547       YY_FATAL_ERROR( "bad buffer in ast_yy_scan_bytes()" );
    02548
    02549    /* It's okay to grow etc. this buffer, and we should throw it
    02550     * away when we're done.
    02551     */
    02552    b->yy_is_our_buffer = 1;
    02553
    02554    return b;
    02555 }

YY_BUFFER_STATE ast_yy_scan_string | ( | yyconst char * | str,
|  | yyscan_t | yyscanner |
| ) |  |  |

Setup the input buffer state to scan a string. The next call to ast_yylex() will scan from a copy of str.

Parameters:

  | str | a NUL-terminated string to scan
  | yyscanner | The scanner object.

Returns:
  the newly allocated buffer state object.

Note:
  If you want to scan bytes that may contain NUL values, then use ast_yy_scan_bytes() instead.

Definition at line 2514 of file ast_expr2f.c.

References ast_yy_scan_bytes().

Referenced by ast_expr().

    02515 {
    02516
    02517    return ast_yy_scan_bytes(str,strlen(str) ,yyscanner);
    02518 }

void ast_yy_switch_to_buffer | ( | YY_BUFFER_STATE | new_buffer,
|  | yyscan_t | yyscanner |
| ) |  |  |

Referenced by ast_yy_scan_buffer().

void * ast_yyalloc | ( | yy_size_t | size,
|  | yyscan_t | yyscanner |
| ) |  |  |

Definition at line 2863 of file ast_expr2f.c.

References malloc.

Referenced by ast_yy_scan_buffer(), ast_yy_scan_bytes(), ast_yyensure_buffer_stack(), and ast_yylex_init().

    02864 {
    02865    return (void *) malloc( size );
    02866 }

static void ast_yyensure_buffer_stack | ( | yyscan_t | yyscanner | ) | `[static]`

Definition at line 2431 of file ast_expr2f.c.

References ast_yyalloc(), ast_yyrealloc(), yyguts_t::yy_buffer_stack, yyguts_t::yy_buffer_stack_max, and yyguts_t::yy_buffer_stack_top.

Referenced by ast_yypush_buffer_state().

    02432 {
    02433    int num_to_alloc;
    02434     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02435
    02436    if (!yyg->yy_buffer_stack) {
    02437
    02438       /* First allocation is just for 2 elements, since we don't know if this
    02439        * scanner will even need a stack. We use 2 instead of 1 to avoid an
    02440        * immediate realloc on the next call.
    02441          */
    02442       num_to_alloc = 1;
    02443       yyg->yy_buffer_stack = (struct yy_buffer_state**)ast_yyalloc
    02444                         (num_to_alloc * sizeof(struct yy_buffer_state*)
    02445                         , yyscanner);
    02446
    02447       memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
    02448
    02449       yyg->yy_buffer_stack_max = num_to_alloc;
    02450       yyg->yy_buffer_stack_top = 0;
    02451       return;
    02452    }
    02453
    02454    if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
    02455
    02456       /* Increase the buffer to prepare for a possible push. */
    02457       int grow_size = 8 /* arbitrary grow size */;
    02458
    02459       num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
    02460       yyg->yy_buffer_stack = (struct yy_buffer_state**)ast_yyrealloc
    02461                         (yyg->yy_buffer_stack,
    02462                         num_to_alloc * sizeof(struct yy_buffer_state*)
    02463                         , yyscanner);
    02464
    02465       /* zero only the new slots.*/
    02466       memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
    02467       yyg->yy_buffer_stack_max = num_to_alloc;
    02468    }
    02469 }

int ast_yyerror | ( | const char * | s,
|  | yyltype * | loc,
|  | struct parse_io * | parseio |
| ) |  |  |

Definition at line 2953 of file ast_expr2f.c.

References ast_log(), LOG_WARNING, parse_io::scanner, parse_io::string, YY_CURRENT_BUFFER_LVALUE, and yytext.

    02954 {
    02955    struct yyguts_t * yyg = (struct yyguts_t*)(parseio->scanner);
    02956    char spacebuf[8000]; /* best safe than sorry */
    02957    char spacebuf2[8000]; /* best safe than sorry */
    02958    int i=0;
    02959    spacebuf[0] = 0;
    02960
    02961    for(i=0;i< (int)(yytext - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf);i++) spacebuf2[i] = ' ';  /* uh... assuming yyg is defined, then I can use the yycolumn macro,
    02962                                        which is the same thing as... get this:
    02963                                        yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]->yy_bs_column
    02964                                        I was tempted to just use yy_buf_pos in the STATE, but..., well:
    02965                                           a. the yy_buf_pos is the current position in the buffer, which
    02966                                              may not relate to the entire string/buffer because of the
    02967                                              buffering.
    02968                                           b. but, analysis of the situation is that when you use the
    02969                                              ast_yy_scan_string func, it creates a single buffer the size of
    02970                                              string, so the two would be the same...
    02971                                        so, in the end, the yycolumn macro is available, shorter, therefore easier. */
    02972    spacebuf2[i++]='^';
    02973    spacebuf2[i]= 0;
    02974
    02975 #ifdef STANDALONE3
    02976    /* easier to read in the standalone version */
    02977    printf("ast_yyerror(): syntax error: %s; Input:\n%s\n%s\n",
    02978          s, parseio->string,spacebuf2);
    02979 #else
    02980    ast_log(LOG_WARNING,"ast_yyerror(): syntax error: %s; Input:\n%s\n%s\n",
    02981          s, parseio->string,spacebuf2);
    02982 #endif
    02983 #ifndef STANDALONE
    02984    ast_log(LOG_WARNING,"If you have questions, please refer to doc/README.variables in the asterisk source.\n");
    02985 #endif
    02986    return(0);
    02987 }

int ast_yyerror | ( | const char * | ,
|  | YYLTYPE * | ,
|  | struct parse_io * |  |
| ) |  |  |

void ast_yyfree | ( | void * | ptr,
|  | yyscan_t | yyscanner |
| ) |  |  |

Definition at line 2880 of file ast_expr2f.c.

References free.

Referenced by ast_yylex_destroy().

    02881 {
    02882    free( (char *) ptr );   /* see ast_yyrealloc() for (char *) cast */
    02883 }

int ast_yyget_column | ( | yyscan_t | yyscanner | ) |

Get the current column number.

Parameters:

  | yyscanner | The scanner object.

Definition at line 2611 of file ast_expr2f.c.

References YY_CURRENT_BUFFER, and yycolumn.

    02612 {
    02613     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02614
    02615         if (! YY_CURRENT_BUFFER)
    02616             return 0;
    02617
    02618     return yycolumn;
    02619 }

int ast_yyget_debug | ( | yyscan_t | yyscanner | ) |

Definition at line 2716 of file ast_expr2f.c.

References yy_flex_debug.

    02717 {
    02718     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02719     return yy_flex_debug;
    02720 }

YY_EXTRA_TYPE ast_yyget_extra | ( | yyscan_t | yyscanner | ) |

Get the user-defined data for this scanner.

Parameters:

  | yyscanner | The scanner object.

Definition at line 2589 of file ast_expr2f.c.

References yyextra.

    02590 {
    02591     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02592     return yyextra;
    02593 }

FILE * ast_yyget_in | ( | yyscan_t | yyscanner | ) |

Get the input stream.

Parameters:

  | yyscanner | The scanner object.

Definition at line 2624 of file ast_expr2f.c.

References yyin.

    02625 {
    02626     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02627     return yyin;
    02628 }

int ast_yyget_leng | ( | yyscan_t | yyscanner | ) |

Get the length of the current token.

Parameters:

  | yyscanner | The scanner object.

Definition at line 2642 of file ast_expr2f.c.

References yyleng.

    02643 {
    02644     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02645     return yyleng;
    02646 }

int ast_yyget_lineno | ( | yyscan_t | yyscanner | ) |

Get the current line number.

Parameters:

  | yyscanner | The scanner object.

Definition at line 2598 of file ast_expr2f.c.

References YY_CURRENT_BUFFER, and yylineno.

    02599 {
    02600     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02601
    02602         if (! YY_CURRENT_BUFFER)
    02603             return 0;
    02604
    02605     return yylineno;
    02606 }

YYLTYPE * ast_yyget_lloc | ( | yyscan_t | yyscanner | ) |

Definition at line 2742 of file ast_expr2f.c.

References yylloc.

    02743 {
    02744     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02745     return yylloc;
    02746 }

YYSTYPE * ast_yyget_lval | ( | yyscan_t | yyscanner | ) |

Definition at line 2730 of file ast_expr2f.c.

References yylval.

    02731 {
    02732     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02733     return yylval;
    02734 }

FILE * ast_yyget_out | ( | yyscan_t | yyscanner | ) |

Get the output stream.

Parameters:

  | yyscanner | The scanner object.

Definition at line 2633 of file ast_expr2f.c.

References yyout.

    02634 {
    02635     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02636     return yyout;
    02637 }

char * ast_yyget_text | ( | yyscan_t | yyscanner | ) |

Get the current token.

Parameters:

  | yyscanner | The scanner object.

Definition at line 2652 of file ast_expr2f.c.

References yytext.

    02653 {
    02654     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02655     return yytext;
    02656 }

int ast_yylex | ( | YYSTYPE * | yylval_param,
|  | YYLTYPE * | yylloc_param,
|  | yyscan_t | yyscanner |
| ) |  |  |

int ast_yylex_destroy | ( | yyscan_t | yyscanner | ) |

Definition at line 2813 of file ast_expr2f.c.

References ast_yy_delete_buffer(), ast_yyfree(), ast_yypop_buffer_state(), yyguts_t::yy_buffer_stack, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, and yyguts_t::yy_start_stack.

Referenced by ast_expr().

    02814 {
    02815     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02816
    02817     /* Pop the buffer stack, destroying each element. */
    02818    while(YY_CURRENT_BUFFER){
    02819       ast_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
    02820       YY_CURRENT_BUFFER_LVALUE = NULL;
    02821       ast_yypop_buffer_state(yyscanner);
    02822    }
    02823
    02824    /* Destroy the stack itself. */
    02825    ast_yyfree(yyg->yy_buffer_stack ,yyscanner);
    02826    yyg->yy_buffer_stack = NULL;
    02827
    02828     /* Destroy the start condition stack. */
    02829         ast_yyfree(yyg->yy_start_stack ,yyscanner );
    02830         yyg->yy_start_stack = NULL;
    02831
    02832     /* Destroy the main struct (reentrant only). */
    02833     ast_yyfree ( yyscanner , yyscanner );
    02834     return 0;
    02835 }

int ast_yylex_init | ( | yyscan_t * | scanner | ) |

Definition at line 2792 of file ast_expr2f.c.

References ast_yyalloc(), and yy_init_globals().

Referenced by ast_expr().

    02794 {
    02795     if (ptr_yy_globals == NULL){
    02796         errno = EINVAL;
    02797         return 1;
    02798     }
    02799
    02800     *ptr_yy_globals = (yyscan_t) ast_yyalloc ( sizeof( struct yyguts_t ), NULL );
    02801
    02802     if (*ptr_yy_globals == NULL){
    02803         errno = ENOMEM;
    02804         return 1;
    02805     }
    02806
    02807     memset(*ptr_yy_globals,0,sizeof(struct yyguts_t));
    02808
    02809     return yy_init_globals ( *ptr_yy_globals );
    02810 }

int ast_yyparse | ( | void * |  | ) |

Referenced by ast_expr().

void ast_yypop_buffer_state | ( | yyscan_t | yyscanner | ) |

Removes and deletes the top of the stack, if present. The next element becomes the new top.

Parameters:

  | yyscanner | The scanner object.

Definition at line 2411 of file ast_expr2f.c.

References ast_yy_delete_buffer(), ast_yy_load_buffer_state(), yyguts_t::yy_buffer_stack_top, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, and yyguts_t::yy_did_buffer_switch_on_eof.

Referenced by ast_yylex_destroy().

    02412 {
    02413     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02414    if (!YY_CURRENT_BUFFER)
    02415       return;
    02416
    02417    ast_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
    02418    YY_CURRENT_BUFFER_LVALUE = NULL;
    02419    if (yyg->yy_buffer_stack_top > 0)
    02420       --yyg->yy_buffer_stack_top;
    02421
    02422    if (YY_CURRENT_BUFFER) {
    02423       ast_yy_load_buffer_state(yyscanner );
    02424       yyg->yy_did_buffer_switch_on_eof = 1;
    02425    }
    02426 }

void ast_yypush_buffer_state | ( | YY_BUFFER_STATE | new_buffer,
|  | yyscan_t | yyscanner |
| ) |  |  |

Pushes the new state onto the stack. The new state becomes the current state. This function will allocate the stack if necessary.

Parameters:

  | new_buffer | The new state.
  | yyscanner | The scanner object.

Definition at line 2380 of file ast_expr2f.c.

References ast_yy_load_buffer_state(), ast_yyensure_buffer_stack(), yyguts_t::yy_buffer_stack_top, yyguts_t::yy_c_buf_p, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yyguts_t::yy_did_buffer_switch_on_eof, yyguts_t::yy_hold_char, and yyguts_t::yy_n_chars.

    02381 {
    02382     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02383    if (new_buffer == NULL)
    02384       return;
    02385
    02386    ast_yyensure_buffer_stack(yyscanner);
    02387
    02388    /* This block is copied from ast_yy_switch_to_buffer. */
    02389    if ( YY_CURRENT_BUFFER )
    02390       {
    02391       /* Flush out information for old buffer. */
    02392       *yyg->yy_c_buf_p = yyg->yy_hold_char;
    02393       YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
    02394       YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
    02395       }
    02396
    02397    /* Only push if top exists. Otherwise, replace top. */
    02398    if (YY_CURRENT_BUFFER)
    02399       yyg->yy_buffer_stack_top++;
    02400    YY_CURRENT_BUFFER_LVALUE = new_buffer;
    02401
    02402    /* copied from ast_yy_switch_to_buffer. */
    02403    ast_yy_load_buffer_state(yyscanner );
    02404    yyg->yy_did_buffer_switch_on_eof = 1;
    02405 }

void * ast_yyrealloc | ( | void * | ptr,
|  | yy_size_t | size,
|  | yyscan_t | yyscanner |
| ) |  |  |

Definition at line 2868 of file ast_expr2f.c.

References realloc.

Referenced by ast_yyensure_buffer_stack().

    02869 {
    02870    /* The cast to (char *) in the following accommodates both
    02871     * implementations that use char* generic pointers, and those
    02872     * that use void* generic pointers.  It works with the latter
    02873     * because both ANSI C and C++ allow castless assignment from
    02874     * any pointer type to void*, and deal with argument conversions
    02875     * as though doing an assignment.
    02876     */
    02877    return (void *) realloc( (char *) ptr, size );
    02878 }

void ast_yyrestart | ( | FILE * | input_file,
|  | yyscan_t | yyscanner |
| ) |  |  |

void ast_yyset_column | ( | int | column_no,
|  | yyscan_t | yyscanner |
| ) |  |  |

Set the current column.

Parameters:

  | line_number |
  | yyscanner | The scanner object.

Definition at line 2687 of file ast_expr2f.c.

References YY_CURRENT_BUFFER, yy_fatal_error(), and yycolumn.

    02688 {
    02689     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02690
    02691         /* column is only valid if an input buffer exists. */
    02692         if (! YY_CURRENT_BUFFER )
    02693            yy_fatal_error( "ast_yyset_column called with no buffer" , yyscanner);
    02694
    02695     yycolumn = column_no;
    02696 }

void ast_yyset_debug | ( | int | debug_flag,
|  | yyscan_t | yyscanner |
| ) |  |  |

Definition at line 2722 of file ast_expr2f.c.

References yy_flex_debug.

    02723 {
    02724     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02725     yy_flex_debug = bdebug ;
    02726 }

void ast_yyset_extra | ( | YY_EXTRA_TYPE | user_defined,
|  | yyscan_t | yyscanner |
| ) |  |  |

Set the user-defined data. This data is never touched by the scanner.

Parameters:

  | user_defined | The data to be associated with this scanner.
  | yyscanner | The scanner object.

Definition at line 2662 of file ast_expr2f.c.

References yyextra.

    02663 {
    02664     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02665     yyextra = user_defined ;
    02666 }

void ast_yyset_in | ( | FILE * | in_str,
|  | yyscan_t | yyscanner |
| ) |  |  |

Set the input stream. This does not discard the current input buffer.

Parameters:

  | in_str | A readable stream.
  | yyscanner | The scanner object.

See also:
  ast_yy_switch_to_buffer

Definition at line 2704 of file ast_expr2f.c.

References yyin.

    02705 {
    02706     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02707     yyin = in_str ;
    02708 }

void ast_yyset_lineno | ( | int | line_number,
|  | yyscan_t | yyscanner |
| ) |  |  |

Set the current line number.

Parameters:

  | line_number |
  | yyscanner | The scanner object.

Definition at line 2672 of file ast_expr2f.c.

References YY_CURRENT_BUFFER, yy_fatal_error(), and yylineno.

    02673 {
    02674     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02675
    02676         /* lineno is only valid if an input buffer exists. */
    02677         if (! YY_CURRENT_BUFFER )
    02678            yy_fatal_error( "ast_yyset_lineno called with no buffer" , yyscanner);
    02679
    02680     yylineno = line_number;
    02681 }

void ast_yyset_lloc | ( | YYLTYPE * | yylloc_param,
|  | yyscan_t | yyscanner |
| ) |  |  |

Definition at line 2748 of file ast_expr2f.c.

References yylloc.

    02749 {
    02750     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02751     yylloc = yylloc_param;
    02752 }

void ast_yyset_lval | ( | YYSTYPE * | yylval_param,
|  | yyscan_t | yyscanner |
| ) |  |  |

Definition at line 2736 of file ast_expr2f.c.

References yylval.

    02737 {
    02738     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02739     yylval = yylval_param;
    02740 }

void ast_yyset_out | ( | FILE * | out_str,
|  | yyscan_t | yyscanner |
| ) |  |  |

Definition at line 2710 of file ast_expr2f.c.

References yyout.

    02711 {
    02712     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02713     yyout = out_str ;
    02714 }

static int input | ( | yyscan_t | yyscanner | ) | `[static]`

Referenced by app_exec(), conf_exec(), conf_run(), and hasvoicemail_exec().

static void yy_fatal_error | ( | yyconst char * | msg,
|  | yyscan_t | yyscanner |
| ) |  |  | `[static]`

Definition at line 2561 of file ast_expr2f.c.

References YY_EXIT_FAILURE.

    02562 {
    02563       (void) fprintf( stderr, "%s\n", msg );
    02564    exit( YY_EXIT_FAILURE );
    02565 }

static void yy_fatal_error | ( | yyconst char | msg[],
|  | yyscan_t | yyscanner |
| ) |  |  | `[static]`

Referenced by ast_yyset_column(), and ast_yyset_lineno().

static int yy_get_next_buffer | ( | yyscan_t | yyscanner | ) | `[static]`

static yy_state_type yy_get_previous_state | ( | yyscan_t | yyscanner | ) | `[static]`

static int yy_init_globals | ( | yyscan_t | yyscanner | ) | `[static]`

Definition at line 2754 of file ast_expr2f.c.

References yyguts_t::yy_buffer_stack, yyguts_t::yy_buffer_stack_max, yyguts_t::yy_buffer_stack_top, yyguts_t::yy_c_buf_p, yyguts_t::yy_init, yyguts_t::yy_start, yyguts_t::yy_start_stack, yyguts_t::yy_start_stack_depth, yyguts_t::yy_start_stack_ptr, yyin, and yyout.

Referenced by ast_yylex_init().

    02755 {
    02756     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    02757     /* Initialization is the same as for the non-reentrant scanner.
    02758        This function is called once per scanner lifetime. */
    02759
    02760     yyg->yy_buffer_stack = 0;
    02761     yyg->yy_buffer_stack_top = 0;
    02762     yyg->yy_buffer_stack_max = 0;
    02763     yyg->yy_c_buf_p = (char *) 0;
    02764     yyg->yy_init = 1;
    02765     yyg->yy_start = 0;
    02766     yyg->yy_start_stack_ptr = 0;
    02767     yyg->yy_start_stack_depth = 0;
    02768     yyg->yy_start_stack = (int *) 0;
    02769
    02770 /* Defined in main.c */
    02771 #ifdef YY_STDINIT
    02772     yyin = stdin;
    02773     yyout = stdout;
    02774 #else
    02775     yyin = (FILE *) 0;
    02776     yyout = (FILE *) 0;
    02777 #endif
    02778
    02779     /* For future reference: Set errno on error, since we are called by
    02780      * ast_yylex_init()
    02781      */
    02782     return 0;
    02783 }

static yy_state_type yy_try_NUL_trans | ( | yy_state_type | current_state,
|  | yyscan_t | yyscanner |
| ) |  |  | `[static]`

static void yyunput | ( | int | c,
|  | char * | buf_ptr,
|  | yyscan_t | yyscanner |
| ) |  |  | `[static]`

## Variable Documentation

int curlycount = 0`[static]`

Definition at line 1301 of file ast_expr2f.c.

yyconst flex_int16_t yy_accept[50]`[static]`

Definition at line 1224 of file ast_expr2f.c.

yyconst yy_state_type yy_NUL_trans[50]`[static]`

Definition at line 1233 of file ast_expr2f.c.

yyconst flex_int16_t yy_nxt[][128]`[static]`

Definition at line 330 of file ast_expr2f.c.