Codename Pineapple

Home page | Mailing list | Docs

Last updated: Sat Feb 3 05:01:00 2007

Asterisk developer's documentation :: Codename Pineapple


ast_expr2f.c File Reference


Detailed Description

Dialplan Expression Lexical Scanner.

Definition in file ast_expr2f.c.

#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include "asterisk.h"
#include <sys/types.h>
#include <locale.h>
#include <ctype.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
#define SET_NUMERIC_STRING
#define SET_STRING
#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   36
#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   35
#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 yy_buffer_stateYY_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 }

Functions

int ast_expr (char *expr, char *buf, int length)
void ast_expr_clear_extra_error_info (void)
void ast_expr_register_extra_error_info (char *message)
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)
YYLTYPEast_yyget_lloc (yyscan_t yyscanner)
YYSTYPEast_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 char * expr2_token_subst (char *mess)
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 char * expr2_token_equivs1 []
static char * expr2_token_equivs2 []
char extra_error_message [4095]
int extra_error_message_supplied = 0
static yyconst flex_int16_t yy_accept [54]
static yyconst yy_state_type yy_NUL_trans [54]
static yyconst flex_int16_t yy_nxt [][128]


Define Documentation

#define ast_yywrap  )     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 1553 of file ast_expr2f.c.

Referenced by ast_hide_password(), and ast_restore_tty().

#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 1416 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 1316 of file ast_expr2f.c.

#define SET_COLUMNS
 

Value:

do {     \
   yylloc_param->first_column = (int)(yyg->yytext_r - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf); \
   yylloc_param->last_column += yyleng - 1; \
   yylloc_param->first_line = yylloc_param->last_line = 1; \
   } while (0)

Definition at line 1384 of file ast_expr2f.c.

#define SET_NUMERIC_STRING
 

Value:

do {  \
   yylval_param->val = calloc(1, sizeof(struct val)); \
   yylval_param->val->type = AST_EXPR_numeric_string; \
   yylval_param->val->u.s = strdup(yytext);  \
   } while (0)

Definition at line 1396 of file ast_expr2f.c.

#define SET_STRING
 

Value:

do {     \
   yylval_param->val = calloc(1, sizeof(struct val)); \
   yylval_param->val->type = AST_EXPR_string;      \
   yylval_param->val->u.s = strdup(yytext);     \
   } while (0)

Definition at line 1390 of file ast_expr2f.c.

#define trail   2
 

Definition at line 1418 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  )     yyunput( c, yyg->yytext_ptr , yyscanner )
 

Definition at line 182 of file ast_expr2f.c.

#define var   1
 

Definition at line 1417 of file ast_expr2f.c.

Referenced by aji_create_client(), aji_load_config(), apply_outgoing(), ast_cdr_copy_vars(), ast_cdr_serialize_variables(), ast_channeltype_list(), ast_var_assign(), ast_var_delete(), ast_var_full_name(), ast_var_name(), ast_var_value(), astman_get_variables(), cli_realtime_load(), config_text_file_save(), gtalk_create_member(), gtalk_load_config(), handle_updates(), handle_uri(), httpd_helper_thread(), iax2_call(), iax_parse_ies(), inherit_category(), init_logger_chain(), init_manager(), jingle_create_member(), jingle_load_config(), load_config(), load_moh_classes(), move_variables(), pbx_builtin_serialize_variables(), pbx_substitute_variables_helper_full(), realtime_alias(), realtime_canmatch(), realtime_common(), realtime_exec(), realtime_exists(), realtime_matchmore(), realtime_multi_odbc(), realtime_multi_pgsql(), realtime_odbc(), realtime_peer(), realtime_pgsql(), realtime_switch_common(), realtime_user(), sip_notify(), socket_process(), and xml_translate().

 
#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 1616 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 1604 of file ast_expr2f.c.

#define YY_DECL_IS_OURS   1
 

Definition at line 1600 of file ast_expr2f.c.

#define YY_DO_BEFORE_ACTION
 

Definition at line 1276 of file ast_expr2f.c.

#define YY_END_OF_BUFFER   36
 

Definition at line 1285 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 2743 of file ast_expr2f.c.

Referenced by yy_fatal_error().

#define YY_EXTRA_TYPE   void *
 

Definition at line 1427 of file ast_expr2f.c.

#define YY_FATAL_ERROR msg   )     yy_fatal_error( msg , yyscanner)
 

Definition at line 1591 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 1560 of file ast_expr2f.c.

#define YY_INT_ALIGNED   short int
 

Definition at line 5 of file ast_expr2f.c.

#define YY_LESS_LINENO  ) 
 

Definition at line 166 of file ast_expr2f.c.

#define YY_MORE_ADJ   yyg->yy_more_len
 

Definition at line 1318 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   35
 

Definition at line 1284 of file ast_expr2f.c.

#define YY_READ_BUF_SIZE   8192
 

Definition at line 1545 of file ast_expr2f.c.

#define YY_RESTORE_YY_MORE_OFFSET
 

Definition at line 1319 of file ast_expr2f.c.

#define YY_RULE_SETUP   YY_USER_ACTION
 

Definition at line 1619 of file ast_expr2f.c.

#define YY_SC_TO_UI  )     ((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 1586 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  ) 
 

Definition at line 2755 of file ast_expr2f.c.

#define yyless  ) 
 

Definition at line 2755 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 1472 of file ast_expr2f.c.

#define yylval   yyg->yylval_r
 

Definition at line 1470 of file ast_expr2f.c.

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

Definition at line 1317 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 3070 of file ast_expr2f.c.

 
#define yyterminate  )     return YY_NULL
 

Definition at line 1581 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.