Tue Aug 20 16:34:40 2013

Asterisk developer's documentation


ael_lex.c File Reference

Flex scanner description of tokens used in AEL2 . More...

#include "asterisk.h"
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <glob.h>
#include "asterisk/logger.h"
#include "asterisk/utils.h"
#include "asterisk/lock.h"
#include "asterisk/hashtab.h"
#include "ael/ael.tab.h"
#include "asterisk/ael_structs.h"

Go to the source code of this file.

Data Structures

struct  stackelement
struct  yy_buffer_state
struct  yy_trans_info
struct  yyguts_t

Defines

#define ael_yywrap(n)   1
#define argg   3
#define BEGIN   yyg->yy_start = 1 + 2 *
#define brackstate   7
#define comment   4
#define curlystate   5
#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 GLOB_ABORTED   GLOB_ABEND
#define INITIAL   0
#define MAX_INCLUDE_DEPTH   50
#define paren   1
#define REJECT   reject_used_but_not_detected
#define semic   2
#define STORE_LOC
#define STORE_POS
#define unput(c)   yyunput( c, yyg->yytext_ptr , yyscanner )
#define wordstate   6
#define YY_AT_BOL()   (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
#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_DO_BEFORE_ACTION
#define YY_END_OF_BUFFER   77
#define YY_END_OF_BUFFER_CHAR   0
#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   35
#define YY_FLUSH_BUFFER   ael_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
#define YY_INT_ALIGNED   short int
#define YY_LESS_LINENO(n)
#define YY_MORE_ADJ   yyg->yy_more_len
#define yy_new_buffer   ael_yy_create_buffer
#define YY_NEW_FILE   ael_yyrestart(yyin ,yyscanner )
#define YY_NULL   0
#define YY_NUM_RULES   76
#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_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
#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 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_stateYY_BUFFER_STATE
typedef unsigned char YY_CHAR
typedef size_t yy_size_t
typedef int yy_state_type
typedef void * yyscan_t

Functions

YY_BUFFER_STATE ael_yy_create_buffer (FILE *file, int size, yyscan_t yyscanner)
void ael_yy_delete_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
void ael_yy_flush_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
static void ael_yy_init_buffer (YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner)
static void ael_yy_load_buffer_state (yyscan_t yyscanner)
YY_BUFFER_STATE ael_yy_scan_buffer (char *base, yy_size_t size, yyscan_t yyscanner)
YY_BUFFER_STATE ael_yy_scan_bytes (yyconst char *bytes, int len, yyscan_t yyscanner)
YY_BUFFER_STATE ael_yy_scan_string (yyconst char *yy_str, yyscan_t yyscanner)
void ael_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
void * ael_yyalloc (yy_size_t, yyscan_t yyscanner)
static void ael_yyensure_buffer_stack (yyscan_t yyscanner)
void ael_yyfree (void *, yyscan_t yyscanner)
int ael_yyget_column (yyscan_t yyscanner)
int ael_yyget_debug (yyscan_t yyscanner)
YY_EXTRA_TYPE ael_yyget_extra (yyscan_t yyscanner)
FILE * ael_yyget_in (yyscan_t yyscanner)
int ael_yyget_leng (yyscan_t yyscanner)
int ael_yyget_lineno (yyscan_t yyscanner)
YYLTYPE * ael_yyget_lloc (yyscan_t yyscanner)
YYSTYPEael_yyget_lval (yyscan_t yyscanner)
FILE * ael_yyget_out (yyscan_t yyscanner)
char * ael_yyget_text (yyscan_t yyscanner)
int ael_yylex_destroy (yyscan_t yyscanner)
int ael_yylex_init (yyscan_t *scanner)
int ael_yylex_init_extra (YY_EXTRA_TYPE user_defined, yyscan_t *scanner)
int ael_yyparse (struct parse_io *)
void ael_yypop_buffer_state (yyscan_t yyscanner)
void ael_yypush_buffer_state (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
void * ael_yyrealloc (void *, yy_size_t, yyscan_t yyscanner)
void ael_yyrestart (FILE *input_file, yyscan_t yyscanner)
void ael_yyset_column (int column_no, yyscan_t yyscanner)
void ael_yyset_debug (int debug_flag, yyscan_t yyscanner)
void ael_yyset_extra (YY_EXTRA_TYPE user_defined, yyscan_t yyscanner)
void ael_yyset_in (FILE *in_str, yyscan_t yyscanner)
void ael_yyset_lineno (int line_number, yyscan_t yyscanner)
void ael_yyset_lloc (YYLTYPE *yylloc_param, yyscan_t yyscanner)
void ael_yyset_lval (YYSTYPE *yylval_param, yyscan_t yyscanner)
void ael_yyset_out (FILE *out_str, yyscan_t yyscanner)
static int input (yyscan_t yyscanner)
static int pbcpop (char x)
static int pbcpop2 (char x)
static int pbcpop3 (char x)
static void pbcpush (char x)
static void pbcpush2 (char x)
static void pbcpush3 (char x)
static void pbcwhere (const char *text, int *line, int *col)
static void setup_filestack (char *fnamebuf, int fnamebuf_siz, glob_t *globbuf, int globpos, yyscan_t xscan, int create)
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 struct stackelement include_stack [MAX_INCLUDE_DEPTH]
static int include_stack_index = 0
static int my_col = 1
char * my_file = 0
static int my_lineno = 1
static int parencount = 0
static int parencount2 = 0
static int parencount3 = 0
static int pbcpos = 0
static int pbcpos2 = 0
static int pbcpos3 = 0
static char pbcstack [400]
static char pbcstack2 [400]
static char pbcstack3 [400]
char * prev_word
static yyconst flex_int16_t yy_accept [285]
static yyconst flex_int16_t yy_base [304]
static yyconst flex_int16_t yy_chk [1073]
static yyconst flex_int16_t yy_def [304]
static yyconst flex_int32_t yy_ec [256]
static yyconst flex_int32_t yy_meta [50]
static yyconst flex_int16_t yy_nxt [1073]

Detailed Description

Flex scanner description of tokens used in AEL2 .

Definition in file ael_lex.c.


Define Documentation

#define ael_yywrap (  )     1

Definition at line 330 of file ael_lex.c.

#define argg   3

Definition at line 960 of file ael_lex.c.

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

Definition at line 144 of file ael_lex.c.

#define brackstate   7

Definition at line 964 of file ael_lex.c.

#define comment   4

Definition at line 961 of file ael_lex.c.

Referenced by __ast_play_and_record(), and config_text_file_load().

#define curlystate   5

Definition at line 962 of file ael_lex.c.

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 175 of file ael_lex.c.

#define EOB_ACT_END_OF_FILE   1

Definition at line 176 of file ael_lex.c.

#define EOB_ACT_LAST_MATCH   2

Definition at line 177 of file ael_lex.c.

#define FLEX_BETA

Definition at line 16 of file ael_lex.c.

#define FLEX_SCANNER

Definition at line 11 of file ael_lex.c.

#define GLOB_ABORTED   GLOB_ABEND

Definition at line 830 of file ael_lex.c.

Referenced by config_text_file_load().

#define INITIAL   0

Definition at line 957 of file ael_lex.c.

#define MAX_INCLUDE_DEPTH   50

Definition at line 876 of file ael_lex.c.

#define paren   1

Definition at line 958 of file ael_lex.c.

Referenced by __ast_app_separate_args(), and parse_options().

#define REJECT   reject_used_but_not_detected

Definition at line 763 of file ael_lex.c.

#define semic   2

Definition at line 959 of file ael_lex.c.

#define STORE_LOC

Definition at line 944 of file ael_lex.c.

#define STORE_POS

Definition at line 937 of file ael_lex.c.

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

Definition at line 195 of file ael_lex.c.

#define wordstate   6

Definition at line 963 of file ael_lex.c.

 
#define YY_AT_BOL (  )     (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 326 of file ael_lex.c.

#define YY_BUFFER_EOF_PENDING   2

Definition at line 262 of file ael_lex.c.

#define YY_BUFFER_NEW   0

Definition at line 250 of file ael_lex.c.

#define YY_BUFFER_NORMAL   1

Definition at line 251 of file ael_lex.c.

#define YY_CURRENT_BUFFER
Value:
( yyg->yy_buffer_stack \
                          ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
                          : NULL)

Definition at line 273 of file ael_lex.c.

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

Definition at line 280 of file ael_lex.c.

#define YY_DO_BEFORE_ACTION

Definition at line 347 of file ael_lex.c.

#define YY_END_OF_BUFFER   77

Definition at line 356 of file ael_lex.c.

#define YY_END_OF_BUFFER_CHAR   0

Definition at line 159 of file ael_lex.c.

#define yy_flex_debug   yyg->yy_flex_debug_r

Definition at line 138 of file ael_lex.c.

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 12 of file ael_lex.c.

#define YY_FLEX_MINOR_VERSION   5

Definition at line 13 of file ael_lex.c.

#define YY_FLEX_SUBMINOR_VERSION   35

Definition at line 14 of file ael_lex.c.

#define YY_FLUSH_BUFFER   ael_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)

Definition at line 294 of file ael_lex.c.

#define YY_INT_ALIGNED   short int

Definition at line 7 of file ael_lex.c.

#define YY_LESS_LINENO (  ) 

Definition at line 179 of file ael_lex.c.

#define YY_MORE_ADJ   yyg->yy_more_len

Definition at line 765 of file ael_lex.c.

#define yy_new_buffer   ael_yy_create_buffer

Definition at line 304 of file ael_lex.c.

#define YY_NEW_FILE   ael_yyrestart(yyin ,yyscanner )

Definition at line 157 of file ael_lex.c.

#define YY_NULL   0

Definition at line 114 of file ael_lex.c.

#define YY_NUM_RULES   76

Definition at line 355 of file ael_lex.c.

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 766 of file ael_lex.c.

#define YY_RULE_SETUP   YY_USER_ACTION

Definition at line 1195 of file ael_lex.c.

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

Definition at line 121 of file ael_lex.c.

#define yy_set_bol ( at_bol   ) 

Definition at line 316 of file ael_lex.c.

#define yy_set_interactive ( is_interactive   ) 

Definition at line 306 of file ael_lex.c.

#define YY_SKIP_YYWRAP

Definition at line 331 of file ael_lex.c.

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

Definition at line 150 of file ael_lex.c.

#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

Definition at line 168 of file ael_lex.c.

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

Definition at line 154 of file ael_lex.c.

#define yycolumn   (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)

Definition at line 137 of file ael_lex.c.

#define yyconst

Definition at line 110 of file ael_lex.c.

#define yyextra   yyg->yyextra_r

Definition at line 133 of file ael_lex.c.

#define yyin   yyg->yyin_r

Definition at line 131 of file ael_lex.c.

#define yyleng   yyg->yyleng_r

Definition at line 134 of file ael_lex.c.

#define yyless (  ) 

Definition at line 182 of file ael_lex.c.

#define yyless (  ) 

Definition at line 182 of file ael_lex.c.

#define yylineno   (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)

Definition at line 136 of file ael_lex.c.

#define yylloc   yyg->yylloc_r

Definition at line 1022 of file ael_lex.c.

#define yylval   yyg->yylval_r

Definition at line 1020 of file ael_lex.c.

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

Definition at line 764 of file ael_lex.c.

#define yyout   yyg->yyout_r

Definition at line 132 of file ael_lex.c.

#define YYSTATE   YY_START

Definition at line 151 of file ael_lex.c.

#define YYTABLES_NAME   "yytables"
#define yytext   yyg->yytext_r

Definition at line 135 of file ael_lex.c.

#define yytext_ptr   yytext_r

Definition at line 337 of file ael_lex.c.


Typedef Documentation

typedef short int flex_int16_t

Definition at line 54 of file ael_lex.c.

typedef int flex_int32_t

Definition at line 55 of file ael_lex.c.

typedef signed char flex_int8_t

Definition at line 53 of file ael_lex.c.

typedef unsigned short int flex_uint16_t

Definition at line 57 of file ael_lex.c.

typedef unsigned int flex_uint32_t

Definition at line 58 of file ael_lex.c.

typedef unsigned char flex_uint8_t

Definition at line 56 of file ael_lex.c.

Definition at line 172 of file ael_lex.c.

typedef unsigned char YY_CHAR

Definition at line 333 of file ael_lex.c.

typedef size_t yy_size_t

Definition at line 199 of file ael_lex.c.

typedef int yy_state_type

Definition at line 335 of file ael_lex.c.

typedef void* yyscan_t

Definition at line 126 of file ael_lex.c.


Function Documentation

YY_BUFFER_STATE ael_yy_create_buffer ( FILE *  file,
int  size,
yyscan_t  yyscanner 
)
void ael_yy_delete_buffer ( YY_BUFFER_STATE  b,
yyscan_t  yyscanner 
)
void ael_yy_flush_buffer ( YY_BUFFER_STATE  b,
yyscan_t  yyscanner 
)
static void ael_yy_init_buffer ( YY_BUFFER_STATE  b,
FILE *  file,
yyscan_t  yyscanner 
) [static]
static void ael_yy_load_buffer_state ( yyscan_t  yyscanner  )  [static]
YY_BUFFER_STATE ael_yy_scan_buffer ( char *  base,
yy_size_t  size,
yyscan_t  yyscanner 
)
YY_BUFFER_STATE ael_yy_scan_bytes ( yyconst char *  bytes,
int  len,
yyscan_t  yyscanner 
)
YY_BUFFER_STATE ael_yy_scan_string ( yyconst char *  yy_str,
yyscan_t  yyscanner 
)
void ael_yy_switch_to_buffer ( YY_BUFFER_STATE  new_buffer,
yyscan_t  yyscanner 
)
void* ael_yyalloc ( yy_size_t  ,
yyscan_t  yyscanner 
)
static void ael_yyensure_buffer_stack ( yyscan_t  yyscanner  )  [static]
void ael_yyfree ( void *  ,
yyscan_t  yyscanner 
)
int ael_yyget_column ( yyscan_t  yyscanner  ) 
int ael_yyget_debug ( yyscan_t  yyscanner  ) 
YY_EXTRA_TYPE ael_yyget_extra ( yyscan_t  yyscanner  ) 
FILE* ael_yyget_in ( yyscan_t  yyscanner  ) 
int ael_yyget_leng ( yyscan_t  yyscanner  ) 
int ael_yyget_lineno ( yyscan_t  yyscanner  ) 
YYLTYPE* ael_yyget_lloc ( yyscan_t  yyscanner  ) 
YYSTYPE* ael_yyget_lval ( yyscan_t  yyscanner  ) 
FILE* ael_yyget_out ( yyscan_t  yyscanner  ) 
char* ael_yyget_text ( yyscan_t  yyscanner  ) 
int ael_yylex_destroy ( yyscan_t  yyscanner  ) 
int ael_yylex_init ( yyscan_t scanner  ) 
int ael_yylex_init_extra ( YY_EXTRA_TYPE  user_defined,
yyscan_t scanner 
)
int ael_yyparse ( struct parse_io  ) 
void ael_yypop_buffer_state ( yyscan_t  yyscanner  ) 
void ael_yypush_buffer_state ( YY_BUFFER_STATE  new_buffer,
yyscan_t  yyscanner 
)
void* ael_yyrealloc ( void *  ,
yy_size_t  ,
yyscan_t  yyscanner 
)
void ael_yyrestart ( FILE *  input_file,
yyscan_t  yyscanner 
)
void ael_yyset_column ( int  column_no,
yyscan_t  yyscanner 
)
void ael_yyset_debug ( int  debug_flag,
yyscan_t  yyscanner 
)
void ael_yyset_extra ( YY_EXTRA_TYPE  user_defined,
yyscan_t  yyscanner 
)
void ael_yyset_in ( FILE *  in_str,
yyscan_t  yyscanner 
)
void ael_yyset_lineno ( int  line_number,
yyscan_t  yyscanner 
)
void ael_yyset_lloc ( YYLTYPE *  yylloc_param,
yyscan_t  yyscanner 
)
void ael_yyset_lval ( YYSTYPE yylval_param,
yyscan_t  yyscanner 
)
void ael_yyset_out ( FILE *  out_str,
yyscan_t  yyscanner 
)
static int input ( yyscan_t  yyscanner  )  [static]
static int pbcpop ( char  x  )  [static]
static int pbcpop2 ( char  x  )  [static]
static int pbcpop3 ( char  x  )  [static]
static void pbcpush ( char  x  )  [static]
static void pbcpush2 ( char  x  )  [static]
static void pbcpush3 ( char  x  )  [static]
static void pbcwhere ( const char *  text,
int *  line,
int *  col 
) [static]

Definition at line 919 of file ael_lex.c.

00920 {
00921    int loc_line = *line;
00922    int loc_col = *col;
00923    char c;
00924    while ( (c = *text++) ) {
00925       if ( c == '\t' ) {
00926          loc_col += 8 - (loc_col % 8);
00927       } else if ( c == '\n' ) {
00928          loc_line++;
00929          loc_col = 1;
00930       } else
00931          loc_col++;
00932    }
00933    *line = loc_line;
00934    *col = loc_col;
00935 }

static void setup_filestack ( char *  fnamebuf,
int  fnamebuf_siz,
glob_t *  globbuf,
int  globpos,
yyscan_t  xscan,
int  create 
) [static]
static void yy_fatal_error ( yyconst char  msg[],
yyscan_t  yyscanner 
) [static]
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]
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

struct stackelement include_stack[MAX_INCLUDE_DEPTH] [static]

Definition at line 903 of file ael_lex.c.

int include_stack_index = 0 [static]

Definition at line 904 of file ael_lex.c.

int my_col = 1 [static]

Definition at line 872 of file ael_lex.c.

char* my_file = 0

Definition at line 873 of file ael_lex.c.

int my_lineno = 1 [static]

Definition at line 871 of file ael_lex.c.

int parencount = 0 [static]

Definition at line 847 of file ael_lex.c.

int parencount2 = 0 [static]

Definition at line 856 of file ael_lex.c.

int parencount3 = 0 [static]

Definition at line 865 of file ael_lex.c.

int pbcpos = 0 [static]

Definition at line 844 of file ael_lex.c.

int pbcpos2 = 0 [static]

Definition at line 853 of file ael_lex.c.

int pbcpos3 = 0 [static]

Definition at line 862 of file ael_lex.c.

char pbcstack[400] [static]

Definition at line 843 of file ael_lex.c.

char pbcstack2[400] [static]

Definition at line 852 of file ael_lex.c.

char pbcstack3[400] [static]

Definition at line 861 of file ael_lex.c.

char* prev_word

Definition at line 874 of file ael_lex.c.

Referenced by yydestruct(), and yyparse().

yyconst flex_int16_t yy_accept[285] [static]

Definition at line 364 of file ael_lex.c.

yyconst flex_int16_t yy_base[304] [static]

Definition at line 440 of file ael_lex.c.

yyconst flex_int16_t yy_chk[1073] [static]

Definition at line 638 of file ael_lex.c.

yyconst flex_int16_t yy_def[304] [static]

Definition at line 478 of file ael_lex.c.

yyconst flex_int32_t yy_ec[256] [static]

Definition at line 399 of file ael_lex.c.

yyconst flex_int32_t yy_meta[50] [static]

Definition at line 431 of file ael_lex.c.

yyconst flex_int16_t yy_nxt[1073] [static]

Definition at line 516 of file ael_lex.c.


Generated on 20 Aug 2013 for Asterisk - The Open Source Telephony Project by  doxygen 1.6.1