Wed Jan 8 2020 09:49:52

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
 

Macros

#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 ECHO   do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
 
#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 FLEXINT_H
 
#define GLOB_ABORTED   GLOB_ABEND
 
#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 MAX_INCLUDE_DEPTH   50
 
#define paren   1
 
#define REJECT   reject_used_but_not_detected
 
#define semic   2
 
#define STORE_LOC
 
#define STORE_POS
 
#define UINT16_MAX   (65535U)
 
#define UINT32_MAX   (4294967295U)
 
#define UINT8_MAX   (255U)
 
#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_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
 
#define YY_DECL_IS_OURS   1
 
#define YY_DO_BEFORE_ACTION
 
#define YY_END_OF_BUFFER   77
 
#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   35
 
#define YY_FLUSH_BUFFER   ael_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   ael_yy_create_buffer
 
#define YY_NEW_FILE   ael_yyrestart(yyin ,yyscanner )
 
#define YY_NULL   0
 
#define YY_NUM_RULES   76
 
#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_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
 
#define YY_STATE_EOF(state)   (YY_END_OF_BUFFER + state + 1)
 
#define YY_STRUCT_YY_BUFFER_STATE
 
#define YY_TYPEDEF_YY_BUFFER_STATE
 
#define YY_TYPEDEF_YY_SCANNER_T
 
#define YY_TYPEDEF_YY_SIZE_T
 
#define YY_USER_ACTION
 
#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_stateYY_BUFFER_STATE
 
typedef unsigned char YY_CHAR
 
typedef size_t yy_size_t
 
typedef int yy_state_type
 
typedef void * yyscan_t
 

Functions

struct pvalael2_parse (char *filename, int *errors)
 
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)
 
YYLTYPEael_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 (YYSTYPE *yylval_param, YYLTYPE *yylloc_param, 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 c_prevword (void)
 
 if (!yyg->yy_init)
 
static int input (yyscan_t yyscanner)
 
int isatty (int)
 
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)
 
void reset_argcount (yyscan_t yyscanner)
 
void reset_parencount (yyscan_t yyscanner)
 
void reset_semicount (yyscan_t yyscanner)
 
static void setup_filestack (char *fnamebuf, int fnamebuf_siz, glob_t *globbuf, int globpos, yyscan_t xscan, int create)
 
 while (1)
 
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)
 
static void yyunput (int c, register char *yy_bp, 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]
 
register int yy_act
 
static yyconst flex_int16_t yy_base [304]
 
register char * yy_bp
 
static yyconst flex_int16_t yy_chk [1073]
 
register char * yy_cp
 
 YY_DECL
 
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]
 
struct yyguts_tyyg = (struct yyguts_t*)yyscanner
 
 yylloc = yylloc_param
 
 yylval = yylval_param
 

Detailed Description

Flex scanner description of tokens used in AEL2 .

Definition in file ael_lex.c.

Macro Definition Documentation

#define ael_yywrap (   n)    1

Definition at line 330 of file ael_lex.c.

Referenced by input(), and while().

#define argg   3

Definition at line 960 of file ael_lex.c.

Referenced by reset_argcount(), and while().

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

Definition at line 144 of file ael_lex.c.

Referenced by reset_argcount(), reset_parencount(), reset_semicount(), setup_filestack(), and while().

#define brackstate   7

Definition at line 964 of file ael_lex.c.

Referenced by while().

#define comment   4

Definition at line 961 of file ael_lex.c.

Referenced by __ast_play_and_record(), config_text_file_load(), and while().

#define curlystate   5

Definition at line 962 of file ael_lex.c.

Referenced by while().

#define ECHO   do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)

Definition at line 1111 of file ael_lex.c.

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 175 of file ael_lex.c.

Referenced by input(), while(), and yy_get_next_buffer().

#define EOB_ACT_END_OF_FILE   1

Definition at line 176 of file ael_lex.c.

Referenced by input(), while(), and yy_get_next_buffer().

#define EOB_ACT_LAST_MATCH   2

Definition at line 177 of file ael_lex.c.

Referenced by input(), while(), and yy_get_next_buffer().

#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 FLEXINT_H

Definition at line 32 of file ael_lex.c.

#define GLOB_ABORTED   GLOB_ABEND

Definition at line 830 of file ael_lex.c.

Referenced by ast_xmldoc_load_documentation(), config_text_file_load(), and while().

#define INITIAL   0

Definition at line 957 of file ael_lex.c.

Referenced by setup_filestack(), and while().

#define INT16_MAX   (32767)

Definition at line 75 of file ael_lex.c.

#define INT16_MIN   (-32767-1)

Definition at line 66 of file ael_lex.c.

#define INT32_MAX   (2147483647)

Definition at line 78 of file ael_lex.c.

#define INT32_MIN   (-2147483647-1)

Definition at line 69 of file ael_lex.c.

#define INT8_MAX   (127)

Definition at line 72 of file ael_lex.c.

#define INT8_MIN   (-128)

Definition at line 63 of file ael_lex.c.

#define MAX_INCLUDE_DEPTH   50

Definition at line 876 of file ael_lex.c.

Referenced by while().

#define paren   1

Definition at line 958 of file ael_lex.c.

Referenced by __ast_app_separate_args(), parse_options(), reset_parencount(), and while().

#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.

Referenced by reset_semicount(), and while().

#define STORE_LOC

Definition at line 944 of file ael_lex.c.

Referenced by while().

#define STORE_POS

Definition at line 937 of file ael_lex.c.

Referenced by while().

#define UINT16_MAX   (65535U)

Definition at line 84 of file ael_lex.c.

#define UINT32_MAX   (4294967295U)

Definition at line 87 of file ael_lex.c.

#define UINT8_MAX   (255U)

Definition at line 81 of file ael_lex.c.

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

Definition at line 195 of file ael_lex.c.

Referenced by while().

#define wordstate   6

Definition at line 963 of file ael_lex.c.

Referenced by while().

#define YY_AT_BOL ( )    (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 326 of file ael_lex.c.

#define YY_BREAK   break;

Definition at line 1192 of file ael_lex.c.

Referenced by while().

#define YY_BUF_SIZE   16384

Definition at line 163 of file ael_lex.c.

Referenced by ael_yyrestart(), and if().

#define YY_BUFFER_EOF_PENDING   2

Definition at line 262 of file ael_lex.c.

Referenced by yy_get_next_buffer().

#define YY_BUFFER_NEW   0

Definition at line 250 of file ael_lex.c.

Referenced by ael_yy_flush_buffer(), ael_yy_scan_buffer(), and while().

#define YY_BUFFER_NORMAL   1

Definition at line 251 of file ael_lex.c.

Referenced by while().

#define YY_CURRENT_BUFFER_LVALUE   yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
#define YY_DECL
Value:
int ael_yylex \
(YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
int ael_yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, void *yyscanner)
void * yyscan_t
Definition: ael_structs.h:71

Definition at line 1179 of file ael_lex.c.

#define YY_DECL_IS_OURS   1

Definition at line 1174 of file ael_lex.c.

#define YY_DO_BEFORE_ACTION

Definition at line 347 of file ael_lex.c.

Referenced by while().

#define YY_END_OF_BUFFER   77

Definition at line 356 of file ael_lex.c.

Referenced by while().

#define YY_END_OF_BUFFER_CHAR   0
#define YY_EXIT_FAILURE   2

Definition at line 2851 of file ael_lex.c.

Referenced by yy_fatal_error().

#define YY_EXTRA_TYPE   void *

Definition at line 975 of file ael_lex.c.

#define YY_FATAL_ERROR (   msg)    yy_fatal_error( msg , yyscanner)
#define yy_flex_debug   yyg->yy_flex_debug_r

Definition at line 138 of file ael_lex.c.

Referenced by ael_yyget_debug(), and ael_yyset_debug().

#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_INPUT (   buf,
  result,
  max_size 
)

Definition at line 1118 of file ael_lex.c.

Referenced by yy_get_next_buffer().

#define YY_INT_ALIGNED   short int

Definition at line 7 of file ael_lex.c.

#define YY_LESS_LINENO (   n)

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.

Referenced by while(), yy_get_next_buffer(), and yy_get_previous_state().

#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.

Referenced by input(), and while().

#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_READ_BUF_SIZE   8192

Definition at line 1103 of file ael_lex.c.

Referenced by yy_get_next_buffer().

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 766 of file ael_lex.c.

Referenced by while().

#define YY_RULE_SETUP   YY_USER_ACTION

Definition at line 1195 of file ael_lex.c.

Referenced by while().

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

Definition at line 121 of file ael_lex.c.

Referenced by while(), and yy_get_previous_state().

#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.

Referenced by while().

#define YY_START_STACK_INCR   25

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

Referenced by while().

#define YY_STRUCT_YY_BUFFER_STATE

Definition at line 203 of file ael_lex.c.

#define YY_TYPEDEF_YY_BUFFER_STATE

Definition at line 171 of file ael_lex.c.

#define YY_TYPEDEF_YY_SCANNER_T

Definition at line 125 of file ael_lex.c.

#define YY_TYPEDEF_YY_SIZE_T

Definition at line 198 of file ael_lex.c.

#define YY_USER_ACTION

Definition at line 1187 of file ael_lex.c.

#define yycolumn   (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)

Definition at line 137 of file ael_lex.c.

Referenced by ael_yyget_column(), and ael_yyset_column().

#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.

Referenced by ael_yyget_extra(), and ael_yyset_extra().

#define yyin   yyg->yyin_r
#define yyleng   yyg->yyleng_r

Definition at line 134 of file ael_lex.c.

Referenced by ael_yyget_leng(), setup_filestack(), and while().

#define yyless (   n)

Definition at line 2863 of file ael_lex.c.

#define yyless (   n)

Definition at line 2863 of file ael_lex.c.

#define yylineno   (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)

Definition at line 136 of file ael_lex.c.

Referenced by ael_yyget_lineno(), and ael_yyset_lineno().

#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.

Referenced by while().

#define yyout   yyg->yyout_r

Definition at line 132 of file ael_lex.c.

Referenced by ael_yyget_out(), ael_yyset_out(), if(), and yy_init_globals().

#define YYSTATE   YY_START

Definition at line 151 of file ael_lex.c.

#define YYTABLES_NAME   "yytables"

Definition at line 3215 of file ael_lex.c.

#define yyterminate ( )    return YY_NULL

Definition at line 1155 of file ael_lex.c.

Referenced by while().

#define yytext   yyg->yytext_r

Definition at line 135 of file ael_lex.c.

Referenced by ael_yyget_text(), and while().

#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

struct pval* ael2_parse ( char *  filename,
int *  errors 
)

Definition at line 3344 of file ael_lex.c.

References ael_yy_scan_string(), ael_yylex_destroy(), ael_yylex_init(), ael_yyparse(), ael_yyset_lineno(), ast_log(), calloc, errno, free, io, LOG_ERROR, malloc, parse_io::pval, parse_io::scanner, strdup, and parse_io::syntax_error_count.

Referenced by pbx_load_module().

3345 {
3346  struct pval *pvalue;
3347  struct parse_io *io;
3348  char *buffer;
3349  struct stat stats;
3350  FILE *fin;
3351 
3352  /* extern int ael_yydebug; */
3353 
3354  io = calloc(sizeof(struct parse_io),1);
3355  /* reset the global counters */
3356  prev_word = 0;
3357  my_lineno = 1;
3359  my_col = 0;
3360  /* ael_yydebug = 1; */
3361  ael_yylex_init(&io->scanner);
3362  fin = fopen(filename,"r");
3363  if ( !fin ) {
3364  ast_log(LOG_ERROR,"File %s could not be opened\n", filename);
3365  *errors = 1;
3366  return 0;
3367  }
3368  if (my_file)
3369  free(my_file);
3370  my_file = strdup(filename);
3371  stat(filename, &stats);
3372  buffer = (char*)malloc(stats.st_size+2);
3373  if (fread(buffer, 1, stats.st_size, fin) != stats.st_size) {
3374  ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));
3375  }
3376  buffer[stats.st_size]=0;
3377  fclose(fin);
3378 
3379  ael_yy_scan_string (buffer ,io->scanner);
3380  ael_yyset_lineno(1 , io->scanner);
3381 
3382  /* ael_yyset_in (fin , io->scanner); OLD WAY */
3383 
3384  ael_yyparse(io);
3385 
3386 
3387  pvalue = io->pval;
3388  *errors = io->syntax_error_count;
3389 
3391  free(buffer);
3392  free(io);
3393 
3394  return pvalue;
3395 }
#define malloc(a)
Definition: astmm.h:88
static struct io_context * io
Definition: chan_gtalk.c:228
struct pval * pval
Definition: ael_structs.h:77
static int my_col
Definition: ael_lex.c:872
yyscan_t scanner
Definition: ael_structs.h:78
#define calloc(a, b)
Definition: astmm.h:79
YY_BUFFER_STATE ael_yy_scan_string(yyconst char *yy_str, yyscan_t yyscanner)
Definition: ael_lex.c:2807
int ael_yylex_init(yyscan_t *scanner)
Definition: ael_lex.c:3054
void ael_yyset_lineno(int line_number, yyscan_t yyscanner)
Definition: ael_lex.c:2965
static int include_stack_index
Definition: ael_lex.c:904
char * my_file
Definition: ael_lex.c:873
int syntax_error_count
Definition: ael_structs.h:79
Definition: pval.h:48
static int my_lineno
Definition: ael_lex.c:871
#define LOG_ERROR
Definition: logger.h:155
#define free(a)
Definition: astmm.h:94
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
Definition: logger.c:1207
int errno
char * prev_word
Definition: ael_lex.c:874
int ael_yyparse(struct parse_io *)
#define strdup(a)
Definition: astmm.h:106
int ael_yylex_destroy(yyscan_t yyscanner)
Definition: ael_lex.c:3145
YY_BUFFER_STATE ael_yy_create_buffer ( FILE *  file,
int  size,
yyscan_t  yyscanner 
)

Allocate and initialize an input buffer state.

Parameters
fileA readable stream.
sizeThe character buffer size in bytes. When in doubt, use YY_BUF_SIZE.
yyscannerThe scanner object.
Returns
the allocated buffer state.

Definition at line 2558 of file ael_lex.c.

References ael_yy_init_buffer(), ael_yyalloc(), yy_buffer_state::yy_buf_size, yy_buffer_state::yy_ch_buf, YY_FATAL_ERROR, and yy_buffer_state::yy_is_our_buffer.

Referenced by ael_yyrestart(), and if().

2559 {
2560  YY_BUFFER_STATE b;
2561 
2562  b = (YY_BUFFER_STATE) ael_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
2563  if ( ! b )
2564  YY_FATAL_ERROR( "out of dynamic memory in ael_yy_create_buffer()" );
2565 
2566  b->yy_buf_size = size;
2567 
2568  /* yy_ch_buf has to be 2 characters longer than the size given because
2569  * we need to put in 2 end-of-buffer characters.
2570  */
2571  b->yy_ch_buf = (char *) ael_yyalloc(b->yy_buf_size + 2 ,yyscanner );
2572  if ( ! b->yy_ch_buf )
2573  YY_FATAL_ERROR( "out of dynamic memory in ael_yy_create_buffer()" );
2574 
2575  b->yy_is_our_buffer = 1;
2576 
2577  ael_yy_init_buffer(b,file ,yyscanner);
2578 
2579  return b;
2580 }
void * ael_yyalloc(yy_size_t, yyscan_t yyscanner)
Definition: ael_lex.c:3198
char * yy_ch_buf
Definition: ast_expr2f.c:208
yy_size_t yy_buf_size
Definition: ast_expr2f.c:214
struct yy_buffer_state * YY_BUFFER_STATE
Definition: ast_expr2f.c:172
static void ael_yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner)
Definition: ael_lex.c:2610
#define YY_FATAL_ERROR(msg)
Definition: ael_lex.c:1165
void ael_yy_delete_buffer ( YY_BUFFER_STATE  b,
yyscan_t  yyscanner 
)

Destroy the buffer.

Parameters
ba buffer created with ael_yy_create_buffer()
yyscannerThe scanner object.

Definition at line 2586 of file ael_lex.c.

References ael_yyfree(), yy_buffer_state::yy_ch_buf, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, and yy_buffer_state::yy_is_our_buffer.

Referenced by ael_yylex_destroy(), ael_yypop_buffer_state(), and while().

2587 {
2588  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2589 
2590  if ( ! b )
2591  return;
2592 
2593  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2595 
2596  if ( b->yy_is_our_buffer )
2597  ael_yyfree((void *) b->yy_ch_buf ,yyscanner );
2598 
2599  ael_yyfree((void *) b ,yyscanner );
2600 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:280
char * yy_ch_buf
Definition: ast_expr2f.c:208
void ael_yyfree(void *, yyscan_t yyscanner)
Definition: ael_lex.c:3226
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:273
struct yy_buffer_state * YY_BUFFER_STATE
Definition: ast_expr2f.c:172
void ael_yy_flush_buffer ( YY_BUFFER_STATE  b,
yyscan_t  yyscanner 
)

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

Parameters
bthe buffer state to be flushed, usually YY_CURRENT_BUFFER.
yyscannerThe scanner object.

Definition at line 2639 of file ael_lex.c.

References ael_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 ael_yy_init_buffer().

2640 {
2641  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2642  if ( ! b )
2643  return;
2644 
2645  b->yy_n_chars = 0;
2646 
2647  /* We always need two end-of-buffer characters. The first causes
2648  * a transition to the end-of-buffer state. The second causes
2649  * a jam in that state.
2650  */
2653 
2654  b->yy_buf_pos = &b->yy_ch_buf[0];
2655 
2656  b->yy_at_bol = 1;
2658 
2659  if ( b == YY_CURRENT_BUFFER )
2660  ael_yy_load_buffer_state(yyscanner );
2661 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define YY_END_OF_BUFFER_CHAR
Definition: ael_lex.c:159
char * yy_ch_buf
Definition: ast_expr2f.c:208
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:273
static void ael_yy_load_buffer_state(yyscan_t yyscanner)
Definition: ael_lex.c:2543
#define YY_BUFFER_NEW
Definition: ael_lex.c:250
char * yy_buf_pos
Definition: ast_expr2f.c:209
static void ael_yy_init_buffer ( YY_BUFFER_STATE  b,
FILE *  file,
yyscan_t  yyscanner 
)
static

Definition at line 2610 of file ael_lex.c.

References ael_yy_flush_buffer(), errno, isatty(), 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.

Referenced by ael_yy_create_buffer(), and ael_yyrestart().

2612 {
2613  int oerrno = errno;
2614  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2615 
2616  ael_yy_flush_buffer(b ,yyscanner);
2617 
2618  b->yy_input_file = file;
2619  b->yy_fill_buffer = 1;
2620 
2621  /* If b is the current buffer, then ael_yy_init_buffer was _probably_
2622  * called from ael_yyrestart() or through yy_get_next_buffer.
2623  * In that case, we don't want to reset the lineno or column.
2624  */
2625  if (b != YY_CURRENT_BUFFER){
2626  b->yy_bs_lineno = 1;
2627  b->yy_bs_column = 0;
2628  }
2629 
2630  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2631 
2632  errno = oerrno;
2633 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
void ael_yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner)
Definition: ael_lex.c:2639
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:273
int errno
int isatty(int)
FILE * yy_input_file
Definition: ast_expr2f.c:206
static void ael_yy_load_buffer_state ( yyscan_t  yyscanner)
static

Definition at line 2543 of file ael_lex.c.

References yyguts_t::yy_c_buf_p, YY_CURRENT_BUFFER_LVALUE, yyguts_t::yy_hold_char, yyguts_t::yy_n_chars, and yyin.

Referenced by ael_yy_flush_buffer(), ael_yy_switch_to_buffer(), ael_yypop_buffer_state(), ael_yypush_buffer_state(), ael_yyrestart(), and if().

2544 {
2545  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2546  yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2547  yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2548  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2549  yyg->yy_hold_char = *yyg->yy_c_buf_p;
2550 }
char yy_hold_char
Definition: ast_expr2f.c:633
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
char * yy_c_buf_p
Definition: ast_expr2f.c:636
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:280
int yy_n_chars
Definition: ast_expr2f.c:634
#define yyin
Definition: ael_lex.c:131
YY_BUFFER_STATE ael_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
basethe character buffer
sizethe size in bytes of the character buffer
yyscannerThe scanner object.
Returns
the newly allocated buffer state object.

Definition at line 2770 of file ael_lex.c.

References ael_yy_switch_to_buffer(), ael_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 ael_yy_scan_bytes().

2771 {
2772  YY_BUFFER_STATE b;
2773 
2774  if ( size < 2 ||
2775  base[size-2] != YY_END_OF_BUFFER_CHAR ||
2776  base[size-1] != YY_END_OF_BUFFER_CHAR )
2777  /* They forgot to leave room for the EOB's. */
2778  return 0;
2779 
2780  b = (YY_BUFFER_STATE) ael_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
2781  if ( ! b )
2782  YY_FATAL_ERROR( "out of dynamic memory in ael_yy_scan_buffer()" );
2783 
2784  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2785  b->yy_buf_pos = b->yy_ch_buf = base;
2786  b->yy_is_our_buffer = 0;
2787  b->yy_input_file = 0;
2788  b->yy_n_chars = b->yy_buf_size;
2789  b->yy_is_interactive = 0;
2790  b->yy_at_bol = 1;
2791  b->yy_fill_buffer = 0;
2793 
2794  ael_yy_switch_to_buffer(b ,yyscanner );
2795 
2796  return b;
2797 }
void * ael_yyalloc(yy_size_t, yyscan_t yyscanner)
Definition: ael_lex.c:3198
#define YY_END_OF_BUFFER_CHAR
Definition: ael_lex.c:159
char * yy_ch_buf
Definition: ast_expr2f.c:208
yy_size_t yy_buf_size
Definition: ast_expr2f.c:214
void ael_yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
Definition: ael_lex.c:2511
#define YY_BUFFER_NEW
Definition: ael_lex.c:250
struct yy_buffer_state * YY_BUFFER_STATE
Definition: ast_expr2f.c:172
#define YY_FATAL_ERROR(msg)
Definition: ael_lex.c:1165
char * yy_buf_pos
Definition: ast_expr2f.c:209
FILE * yy_input_file
Definition: ast_expr2f.c:206
YY_BUFFER_STATE ael_yy_scan_bytes ( yyconst char *  yybytes,
int  _yybytes_len,
yyscan_t  yyscanner 
)

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

Parameters
bytesthe byte buffer to scan
lenthe number of bytes in the buffer pointed to by bytes.
yyscannerThe scanner object.
Returns
the newly allocated buffer state object.

Definition at line 2820 of file ael_lex.c.

References ael_yy_scan_buffer(), ael_yyalloc(), YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, and yy_buffer_state::yy_is_our_buffer.

Referenced by ael_yy_scan_string().

2821 {
2822  YY_BUFFER_STATE b;
2823  char *buf;
2824  yy_size_t n;
2825  int i;
2826 
2827  /* Get memory for full buffer, including space for trailing EOB's. */
2828  n = _yybytes_len + 2;
2829  buf = (char *) ael_yyalloc(n ,yyscanner );
2830  if ( ! buf )
2831  YY_FATAL_ERROR( "out of dynamic memory in ael_yy_scan_bytes()" );
2832 
2833  for ( i = 0; i < _yybytes_len; ++i )
2834  buf[i] = yybytes[i];
2835 
2836  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2837 
2838  b = ael_yy_scan_buffer(buf,n ,yyscanner);
2839  if ( ! b )
2840  YY_FATAL_ERROR( "bad buffer in ael_yy_scan_bytes()" );
2841 
2842  /* It's okay to grow etc. this buffer, and we should throw it
2843  * away when we're done.
2844  */
2845  b->yy_is_our_buffer = 1;
2846 
2847  return b;
2848 }
void * ael_yyalloc(yy_size_t, yyscan_t yyscanner)
Definition: ael_lex.c:3198
YY_BUFFER_STATE ael_yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner)
Definition: ael_lex.c:2770
#define YY_END_OF_BUFFER_CHAR
Definition: ael_lex.c:159
size_t yy_size_t
Definition: ast_expr2f.c:199
#define YY_FATAL_ERROR(msg)
Definition: ael_lex.c:1165
YY_BUFFER_STATE ael_yy_scan_string ( yyconst char *  yystr,
yyscan_t  yyscanner 
)

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

Parameters
yystra NUL-terminated string to scan
yyscannerThe scanner object.
Returns
the newly allocated buffer state object.
Note
If you want to scan bytes that may contain NUL values, then use ael_yy_scan_bytes() instead.

Definition at line 2807 of file ael_lex.c.

References ael_yy_scan_bytes().

Referenced by ael2_parse(), and setup_filestack().

2808 {
2809 
2810  return ael_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
2811 }
YY_BUFFER_STATE ael_yy_scan_bytes(yyconst char *bytes, int len, yyscan_t yyscanner)
Definition: ael_lex.c:2820
static YYSIZE_T const char * yystr
Definition: ast_expr2.c:1261
void ael_yy_switch_to_buffer ( YY_BUFFER_STATE  new_buffer,
yyscan_t  yyscanner 
)

Switch to a different input buffer.

Parameters
new_bufferThe new input buffer.
yyscannerThe scanner object.

Definition at line 2511 of file ael_lex.c.

References ael_yy_load_buffer_state(), ael_yyensure_buffer_stack(), 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.

Referenced by ael_yy_scan_buffer(), setup_filestack(), and while().

2512 {
2513  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2514 
2515  /* TODO. We should be able to replace this entire function body
2516  * with
2517  * ael_yypop_buffer_state();
2518  * ael_yypush_buffer_state(new_buffer);
2519  */
2520  ael_yyensure_buffer_stack (yyscanner);
2521  if ( YY_CURRENT_BUFFER == new_buffer )
2522  return;
2523 
2524  if ( YY_CURRENT_BUFFER )
2525  {
2526  /* Flush out information for old buffer. */
2527  *yyg->yy_c_buf_p = yyg->yy_hold_char;
2528  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2529  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2530  }
2531 
2532  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2533  ael_yy_load_buffer_state(yyscanner );
2534 
2535  /* We don't actually know whether we did this switch during
2536  * EOF (ael_yywrap()) processing, but the only time this flag
2537  * is looked at is after ael_yywrap() is called, so it's safe
2538  * to go ahead and always set it.
2539  */
2540  yyg->yy_did_buffer_switch_on_eof = 1;
2541 }
char yy_hold_char
Definition: ast_expr2f.c:633
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
char * yy_c_buf_p
Definition: ast_expr2f.c:636
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:280
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:273
static void ael_yy_load_buffer_state(yyscan_t yyscanner)
Definition: ael_lex.c:2543
int yy_did_buffer_switch_on_eof
Definition: ast_expr2f.c:639
int yy_n_chars
Definition: ast_expr2f.c:634
static void ael_yyensure_buffer_stack(yyscan_t yyscanner)
Definition: ael_lex.c:2720
void * ael_yyalloc ( yy_size_t  size,
yyscan_t  yyscanner 
)

Definition at line 3198 of file ael_lex.c.

References malloc.

Referenced by ael_yy_create_buffer(), ael_yy_scan_buffer(), ael_yy_scan_bytes(), ael_yyensure_buffer_stack(), ael_yylex_init(), and ael_yylex_init_extra().

3199 {
3200  return (void *) malloc( size );
3201 }
#define malloc(a)
Definition: astmm.h:88
static void ael_yyensure_buffer_stack ( yyscan_t  yyscanner)
static

Definition at line 2720 of file ael_lex.c.

References ael_yyalloc(), ael_yyrealloc(), yyguts_t::yy_buffer_stack, yyguts_t::yy_buffer_stack_max, yyguts_t::yy_buffer_stack_top, and YY_FATAL_ERROR.

Referenced by ael_yy_switch_to_buffer(), ael_yypush_buffer_state(), ael_yyrestart(), and if().

2721 {
2722  int num_to_alloc;
2723  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2724 
2725  if (!yyg->yy_buffer_stack) {
2726 
2727  /* First allocation is just for 2 elements, since we don't know if this
2728  * scanner will even need a stack. We use 2 instead of 1 to avoid an
2729  * immediate realloc on the next call.
2730  */
2731  num_to_alloc = 1;
2733  (num_to_alloc * sizeof(struct yy_buffer_state*)
2734  , yyscanner);
2735  if ( ! yyg->yy_buffer_stack )
2736  YY_FATAL_ERROR( "out of dynamic memory in ael_yyensure_buffer_stack()" );
2737 
2738  memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2739 
2740  yyg->yy_buffer_stack_max = num_to_alloc;
2741  yyg->yy_buffer_stack_top = 0;
2742  return;
2743  }
2744 
2745  if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
2746 
2747  /* Increase the buffer to prepare for a possible push. */
2748  int grow_size = 8 /* arbitrary grow size */;
2749 
2750  num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
2752  (yyg->yy_buffer_stack,
2753  num_to_alloc * sizeof(struct yy_buffer_state*)
2754  , yyscanner);
2755  if ( ! yyg->yy_buffer_stack )
2756  YY_FATAL_ERROR( "out of dynamic memory in ael_yyensure_buffer_stack()" );
2757 
2758  /* zero only the new slots.*/
2759  memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
2760  yyg->yy_buffer_stack_max = num_to_alloc;
2761  }
2762 }
void * ael_yyalloc(yy_size_t, yyscan_t yyscanner)
Definition: ael_lex.c:3198
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
void * ael_yyrealloc(void *, yy_size_t, yyscan_t yyscanner)
Definition: ael_lex.c:3203
YY_BUFFER_STATE * yy_buffer_stack
Definition: ast_expr2f.c:632
size_t yy_buffer_stack_max
Definition: ast_expr2f.c:631
#define YY_FATAL_ERROR(msg)
Definition: ael_lex.c:1165
size_t yy_buffer_stack_top
Definition: ast_expr2f.c:630
void ael_yyfree ( void *  ptr,
yyscan_t  yyscanner 
)

Definition at line 3226 of file ael_lex.c.

References free.

Referenced by ael_yy_delete_buffer(), and ael_yylex_destroy().

3227 {
3228  if (ptr)
3229  free( (char*) ptr );
3230 }
#define free(a)
Definition: astmm.h:94
int ael_yyget_column ( yyscan_t  yyscanner)

Get the current column number.

Parameters
yyscannerThe scanner object.

Definition at line 2904 of file ael_lex.c.

References YY_CURRENT_BUFFER, and yycolumn.

2905 {
2906  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2907 
2908  if (! YY_CURRENT_BUFFER)
2909  return 0;
2910 
2911  return yycolumn;
2912 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:273
#define yycolumn
Definition: ael_lex.c:137
int ael_yyget_debug ( yyscan_t  yyscanner)

Definition at line 3009 of file ael_lex.c.

References yy_flex_debug.

3010 {
3011  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3012  return yy_flex_debug;
3013 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define yy_flex_debug
Definition: ael_lex.c:138
YY_EXTRA_TYPE ael_yyget_extra ( yyscan_t  yyscanner)

Get the user-defined data for this scanner.

Parameters
yyscannerThe scanner object.

Definition at line 2882 of file ael_lex.c.

References yyextra.

2883 {
2884  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2885  return yyextra;
2886 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define yyextra
Definition: ael_lex.c:133
FILE * ael_yyget_in ( yyscan_t  yyscanner)

Get the input stream.

Parameters
yyscannerThe scanner object.

Definition at line 2917 of file ael_lex.c.

References yyin.

2918 {
2919  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2920  return yyin;
2921 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define yyin
Definition: ael_lex.c:131
int ael_yyget_leng ( yyscan_t  yyscanner)

Get the length of the current token.

Parameters
yyscannerThe scanner object.

Definition at line 2935 of file ael_lex.c.

References yyleng.

2936 {
2937  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2938  return yyleng;
2939 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define yyleng
Definition: ael_lex.c:134
int ael_yyget_lineno ( yyscan_t  yyscanner)

Get the current line number.

Parameters
yyscannerThe scanner object.

Definition at line 2891 of file ael_lex.c.

References YY_CURRENT_BUFFER, and yylineno.

2892 {
2893  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2894 
2895  if (! YY_CURRENT_BUFFER)
2896  return 0;
2897 
2898  return yylineno;
2899 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:273
#define yylineno
Definition: ael_lex.c:136
YYLTYPE * ael_yyget_lloc ( yyscan_t  yyscanner)

Definition at line 3035 of file ael_lex.c.

References yylloc.

3036 {
3037  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3038  return yylloc;
3039 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define yylloc
Definition: ast_expr2.c:72
YYSTYPE * ael_yyget_lval ( yyscan_t  yyscanner)

Definition at line 3023 of file ael_lex.c.

References yylval.

3024 {
3025  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3026  return yylval;
3027 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define yylval
Definition: ast_expr2.c:68
FILE * ael_yyget_out ( yyscan_t  yyscanner)

Get the output stream.

Parameters
yyscannerThe scanner object.

Definition at line 2926 of file ael_lex.c.

References yyout.

2927 {
2928  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2929  return yyout;
2930 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define yyout
Definition: ael_lex.c:132
char * ael_yyget_text ( yyscan_t  yyscanner)

Get the current token.

Parameters
yyscannerThe scanner object.

Definition at line 2945 of file ael_lex.c.

References yytext.

2946 {
2947  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2948  return yytext;
2949 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define yytext
Definition: ael_lex.c:135
int ael_yylex ( YYSTYPE yylval_param,
YYLTYPE yylloc_param,
yyscan_t  yyscanner 
)
int ael_yylex_destroy ( yyscan_t  yyscanner)

Definition at line 3145 of file ael_lex.c.

References ael_yy_delete_buffer(), ael_yyfree(), ael_yypop_buffer_state(), yyguts_t::yy_buffer_stack, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_init_globals(), and yyguts_t::yy_start_stack.

Referenced by ael2_parse().

3146 {
3147  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3148 
3149  /* Pop the buffer stack, destroying each element. */
3150  while(YY_CURRENT_BUFFER){
3152  YY_CURRENT_BUFFER_LVALUE = NULL;
3153  ael_yypop_buffer_state(yyscanner);
3154  }
3155 
3156  /* Destroy the stack itself. */
3157  ael_yyfree(yyg->yy_buffer_stack ,yyscanner);
3158  yyg->yy_buffer_stack = NULL;
3159 
3160  /* Destroy the start condition stack. */
3161  ael_yyfree(yyg->yy_start_stack ,yyscanner );
3162  yyg->yy_start_stack = NULL;
3163 
3164  /* Reset the globals. This is important in a non-reentrant scanner so the next time
3165  * ael_yylex() is called, initialization will occur. */
3166  yy_init_globals( yyscanner);
3167 
3168  /* Destroy the main struct (reentrant only). */
3169  ael_yyfree ( yyscanner , yyscanner );
3170  yyscanner = NULL;
3171  return 0;
3172 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:280
void ael_yyfree(void *, yyscan_t yyscanner)
Definition: ael_lex.c:3226
void ael_yypop_buffer_state(yyscan_t yyscanner)
Definition: ael_lex.c:2700
static int yy_init_globals(yyscan_t yyscanner)
Definition: ael_lex.c:3111
YY_BUFFER_STATE * yy_buffer_stack
Definition: ast_expr2f.c:632
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:273
int * yy_start_stack
Definition: ast_expr2f.c:642
void ael_yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner)
Definition: ael_lex.c:2586
int ael_yylex_init ( yyscan_t scanner)

Definition at line 3054 of file ael_lex.c.

References ael_yyalloc(), errno, and yy_init_globals().

Referenced by ael2_parse().

3056 {
3057  if (ptr_yy_globals == NULL){
3058  errno = EINVAL;
3059  return 1;
3060  }
3061 
3062  *ptr_yy_globals = (yyscan_t) ael_yyalloc ( sizeof( struct yyguts_t ), NULL );
3063 
3064  if (*ptr_yy_globals == NULL){
3065  errno = ENOMEM;
3066  return 1;
3067  }
3068 
3069  /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
3070  memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
3071 
3072  return yy_init_globals ( *ptr_yy_globals );
3073 }
void * ael_yyalloc(yy_size_t, yyscan_t yyscanner)
Definition: ael_lex.c:3198
static int yy_init_globals(yyscan_t yyscanner)
Definition: ael_lex.c:3111
int errno
void * yyscan_t
Definition: ael_structs.h:71
int ael_yylex_init_extra ( YY_EXTRA_TYPE  user_defined,
yyscan_t scanner 
)

Definition at line 3083 of file ael_lex.c.

References ael_yyalloc(), ael_yyset_extra(), errno, and yy_init_globals().

3085 {
3086  struct yyguts_t dummy_yyguts;
3087 
3088  ael_yyset_extra (yy_user_defined, &dummy_yyguts);
3089 
3090  if (ptr_yy_globals == NULL){
3091  errno = EINVAL;
3092  return 1;
3093  }
3094 
3095  *ptr_yy_globals = (yyscan_t) ael_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
3096 
3097  if (*ptr_yy_globals == NULL){
3098  errno = ENOMEM;
3099  return 1;
3100  }
3101 
3102  /* By setting to 0xAA, we expose bugs in
3103  yy_init_globals. Leave at 0x00 for releases. */
3104  memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
3105 
3106  ael_yyset_extra (yy_user_defined, *ptr_yy_globals);
3107 
3108  return yy_init_globals ( *ptr_yy_globals );
3109 }
void * ael_yyalloc(yy_size_t, yyscan_t yyscanner)
Definition: ael_lex.c:3198
void ael_yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner)
Definition: ael_lex.c:2955
static int yy_init_globals(yyscan_t yyscanner)
Definition: ael_lex.c:3111
int errno
void * yyscan_t
Definition: ael_structs.h:71
int ael_yyparse ( struct parse_io )

Referenced by ael2_parse().

void ael_yypop_buffer_state ( yyscan_t  yyscanner)

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

Parameters
yyscannerThe scanner object.

Definition at line 2700 of file ael_lex.c.

References ael_yy_delete_buffer(), ael_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 ael_yylex_destroy().

2701 {
2702  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2703  if (!YY_CURRENT_BUFFER)
2704  return;
2705 
2707  YY_CURRENT_BUFFER_LVALUE = NULL;
2708  if (yyg->yy_buffer_stack_top > 0)
2709  --yyg->yy_buffer_stack_top;
2710 
2711  if (YY_CURRENT_BUFFER) {
2712  ael_yy_load_buffer_state(yyscanner );
2713  yyg->yy_did_buffer_switch_on_eof = 1;
2714  }
2715 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:280
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:273
static void ael_yy_load_buffer_state(yyscan_t yyscanner)
Definition: ael_lex.c:2543
int yy_did_buffer_switch_on_eof
Definition: ast_expr2f.c:639
void ael_yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner)
Definition: ael_lex.c:2586
size_t yy_buffer_stack_top
Definition: ast_expr2f.c:630
void ael_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_bufferThe new state.
yyscannerThe scanner object.

Definition at line 2669 of file ael_lex.c.

References ael_yy_load_buffer_state(), ael_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.

2670 {
2671  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2672  if (new_buffer == NULL)
2673  return;
2674 
2675  ael_yyensure_buffer_stack(yyscanner);
2676 
2677  /* This block is copied from ael_yy_switch_to_buffer. */
2678  if ( YY_CURRENT_BUFFER )
2679  {
2680  /* Flush out information for old buffer. */
2681  *yyg->yy_c_buf_p = yyg->yy_hold_char;
2682  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2683  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2684  }
2685 
2686  /* Only push if top exists. Otherwise, replace top. */
2687  if (YY_CURRENT_BUFFER)
2688  yyg->yy_buffer_stack_top++;
2689  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2690 
2691  /* copied from ael_yy_switch_to_buffer. */
2692  ael_yy_load_buffer_state(yyscanner );
2693  yyg->yy_did_buffer_switch_on_eof = 1;
2694 }
char yy_hold_char
Definition: ast_expr2f.c:633
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
char * yy_c_buf_p
Definition: ast_expr2f.c:636
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:280
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:273
static void ael_yy_load_buffer_state(yyscan_t yyscanner)
Definition: ael_lex.c:2543
int yy_did_buffer_switch_on_eof
Definition: ast_expr2f.c:639
int yy_n_chars
Definition: ast_expr2f.c:634
static void ael_yyensure_buffer_stack(yyscan_t yyscanner)
Definition: ael_lex.c:2720
size_t yy_buffer_stack_top
Definition: ast_expr2f.c:630
void * ael_yyrealloc ( void *  ptr,
yy_size_t  size,
yyscan_t  yyscanner 
)

Definition at line 3203 of file ael_lex.c.

References realloc.

Referenced by ael_yyensure_buffer_stack(), and yy_get_next_buffer().

3204 {
3205  /* The cast to (char *) in the following accommodates both
3206  * implementations that use char* generic pointers, and those
3207  * that use void* generic pointers. It works with the latter
3208  * because both ANSI C and C++ allow castless assignment from
3209  * any pointer type to void*, and deal with argument conversions
3210  * as though doing an assignment.
3211  */
3212  return (void *) realloc( (char *) ptr, size );
3213 }
#define realloc(a, b)
Definition: astmm.h:100
void ael_yyrestart ( FILE *  input_file,
yyscan_t  yyscanner 
)

Immediately switch to a different input stream.

Parameters
input_fileA readable stream.
yyscannerThe scanner object.
Note
This function does not reset the start condition to INITIAL .

Definition at line 2493 of file ael_lex.c.

References ael_yy_create_buffer(), ael_yy_init_buffer(), ael_yy_load_buffer_state(), ael_yyensure_buffer_stack(), YY_BUF_SIZE, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, and yyin.

Referenced by input(), and yy_get_next_buffer().

2494 {
2495  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2496 
2497  if ( ! YY_CURRENT_BUFFER ){
2498  ael_yyensure_buffer_stack (yyscanner);
2501  }
2502 
2503  ael_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
2504  ael_yy_load_buffer_state(yyscanner );
2505 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:280
YY_BUFFER_STATE ael_yy_create_buffer(FILE *file, int size, yyscan_t yyscanner)
Definition: ael_lex.c:2558
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:273
static void ael_yy_load_buffer_state(yyscan_t yyscanner)
Definition: ael_lex.c:2543
#define yyin
Definition: ael_lex.c:131
static void ael_yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner)
Definition: ael_lex.c:2610
#define YY_BUF_SIZE
Definition: ael_lex.c:163
static void ael_yyensure_buffer_stack(yyscan_t yyscanner)
Definition: ael_lex.c:2720
void ael_yyset_column ( int  column_no,
yyscan_t  yyscanner 
)

Set the current column.

Parameters
line_number
yyscannerThe scanner object.

Definition at line 2980 of file ael_lex.c.

References YY_CURRENT_BUFFER, yy_fatal_error(), and yycolumn.

2981 {
2982  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2983 
2984  /* column is only valid if an input buffer exists. */
2985  if (! YY_CURRENT_BUFFER )
2986  yy_fatal_error( "ael_yyset_column called with no buffer" , yyscanner);
2987 
2988  yycolumn = column_no;
2989 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:273
#define yycolumn
Definition: ael_lex.c:137
static void yy_fatal_error(yyconst char msg[], yyscan_t yyscanner)
void ael_yyset_debug ( int  debug_flag,
yyscan_t  yyscanner 
)

Definition at line 3015 of file ael_lex.c.

References yy_flex_debug.

3016 {
3017  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3018  yy_flex_debug = bdebug ;
3019 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define yy_flex_debug
Definition: ael_lex.c:138
void ael_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_definedThe data to be associated with this scanner.
yyscannerThe scanner object.

Definition at line 2955 of file ael_lex.c.

References yyextra.

Referenced by ael_yylex_init_extra().

2956 {
2957  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2958  yyextra = user_defined ;
2959 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define yyextra
Definition: ael_lex.c:133
void ael_yyset_in ( FILE *  in_str,
yyscan_t  yyscanner 
)

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

Parameters
in_strA readable stream.
yyscannerThe scanner object.
See Also
ael_yy_switch_to_buffer

Definition at line 2997 of file ael_lex.c.

References yyin.

2998 {
2999  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3000  yyin = in_str ;
3001 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define yyin
Definition: ael_lex.c:131
void ael_yyset_lineno ( int  line_number,
yyscan_t  yyscanner 
)

Set the current line number.

Parameters
line_number
yyscannerThe scanner object.

Definition at line 2965 of file ael_lex.c.

References YY_CURRENT_BUFFER, yy_fatal_error(), and yylineno.

Referenced by ael2_parse().

2966 {
2967  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2968 
2969  /* lineno is only valid if an input buffer exists. */
2970  if (! YY_CURRENT_BUFFER )
2971  yy_fatal_error( "ael_yyset_lineno called with no buffer" , yyscanner);
2972 
2973  yylineno = line_number;
2974 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:273
#define yylineno
Definition: ael_lex.c:136
static void yy_fatal_error(yyconst char msg[], yyscan_t yyscanner)
void ael_yyset_lloc ( YYLTYPE yylloc_param,
yyscan_t  yyscanner 
)

Definition at line 3041 of file ael_lex.c.

References yylloc.

3042 {
3043  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3044  yylloc = yylloc_param;
3045 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define yylloc
Definition: ast_expr2.c:72
void ael_yyset_lval ( YYSTYPE yylval_param,
yyscan_t  yyscanner 
)

Definition at line 3029 of file ael_lex.c.

References yylval.

3030 {
3031  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3032  yylval = yylval_param;
3033 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define yylval
Definition: ast_expr2.c:68
void ael_yyset_out ( FILE *  out_str,
yyscan_t  yyscanner 
)

Definition at line 3003 of file ael_lex.c.

References yyout.

3004 {
3005  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3006  yyout = out_str ;
3007 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define yyout
Definition: ael_lex.c:132
static int c_prevword ( void  )
static

Definition at line 3275 of file ael_lex.c.

References pbcpop(), pbcpush(), and prev_word.

Referenced by reset_argcount(), and reset_parencount().

3276 {
3277  char *c = prev_word;
3278  if (c == NULL)
3279  return 0;
3280  while ( *c ) {
3281  switch (*c) {
3282  case '{':
3283  case '[':
3284  case '(':
3285  pbcpush(*c);
3286  break;
3287  case '}':
3288  case ']':
3289  case ')':
3290  if (pbcpop(*c))
3291  return 1;
3292  break;
3293  }
3294  c++;
3295  }
3296  return 0;
3297 }
static int pbcpop(char x)
Definition: ael_lex.c:3232
static void pbcpush(char x)
Definition: ael_lex.c:3221
char * prev_word
Definition: ael_lex.c:874
if ( !yyg->  yy_init)

Definition at line 1216 of file ael_lex.c.

References ael_yy_create_buffer(), ael_yy_load_buffer_state(), ael_yyensure_buffer_stack(), YY_BUF_SIZE, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yyguts_t::yy_init, yyguts_t::yy_start, yyin, and yyout.

1217  {
1218  yyg->yy_init = 1;
1219 
1220 #ifdef YY_USER_INIT
1221  YY_USER_INIT;
1222 #endif
1223 
1224  if ( ! yyg->yy_start )
1225  yyg->yy_start = 1; /* first start state */
1226 
1227  if ( ! yyin )
1228  yyin = stdin;
1229 
1230  if ( ! yyout )
1231  yyout = stdout;
1232 
1233  if ( ! YY_CURRENT_BUFFER ) {
1234  ael_yyensure_buffer_stack (yyscanner);
1237  }
1238 
1239  ael_yy_load_buffer_state(yyscanner );
1240  }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:280
YY_BUFFER_STATE ael_yy_create_buffer(FILE *file, int size, yyscan_t yyscanner)
Definition: ael_lex.c:2558
int yy_init
Definition: ast_expr2f.c:637
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:273
int yy_start
Definition: ast_expr2f.c:638
static void ael_yy_load_buffer_state(yyscan_t yyscanner)
Definition: ael_lex.c:2543
#define yyin
Definition: ael_lex.c:131
#define YY_BUF_SIZE
Definition: ael_lex.c:163
static void ael_yyensure_buffer_stack(yyscan_t yyscanner)
Definition: ael_lex.c:2720
#define yyout
Definition: ael_lex.c:132
static int input ( yyscan_t  yyscanner)
static

Definition at line 2417 of file ael_lex.c.

References ael_yyrestart(), ael_yywrap, EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, yyguts_t::yy_c_buf_p, YY_CURRENT_BUFFER_LVALUE, yyguts_t::yy_did_buffer_switch_on_eof, YY_END_OF_BUFFER_CHAR, yy_get_next_buffer(), yyguts_t::yy_hold_char, yyguts_t::yy_n_chars, YY_NEW_FILE, and yyin.

2420 {
2421  int c;
2422  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2423 
2424  *yyg->yy_c_buf_p = yyg->yy_hold_char;
2425 
2426  if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2427  {
2428  /* yy_c_buf_p now points to the character we want to return.
2429  * If this occurs *before* the EOB characters, then it's a
2430  * valid NUL; if not, then we've hit the end of the buffer.
2431  */
2432  if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2433  /* This was really a NUL. */
2434  *yyg->yy_c_buf_p = '\0';
2435 
2436  else
2437  { /* need more input */
2438  int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
2439  ++yyg->yy_c_buf_p;
2440 
2441  switch ( yy_get_next_buffer( yyscanner ) )
2442  {
2443  case EOB_ACT_LAST_MATCH:
2444  /* This happens because yy_g_n_b()
2445  * sees that we've accumulated a
2446  * token and flags that we need to
2447  * try matching the token before
2448  * proceeding. But for input(),
2449  * there's no matching to consider.
2450  * So convert the EOB_ACT_LAST_MATCH
2451  * to EOB_ACT_END_OF_FILE.
2452  */
2453 
2454  /* Reset buffer status. */
2455  ael_yyrestart(yyin ,yyscanner);
2456 
2457  /*FALLTHROUGH*/
2458 
2459  case EOB_ACT_END_OF_FILE:
2460  {
2461  if ( ael_yywrap(yyscanner ) )
2462  return EOF;
2463 
2464  if ( ! yyg->yy_did_buffer_switch_on_eof )
2465  YY_NEW_FILE;
2466 #ifdef __cplusplus
2467  return yyinput(yyscanner);
2468 #else
2469  return input(yyscanner);
2470 #endif
2471  }
2472 
2473  case EOB_ACT_CONTINUE_SCAN:
2474  yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
2475  break;
2476  }
2477  }
2478  }
2479 
2480  c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
2481  *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
2482  yyg->yy_hold_char = *++yyg->yy_c_buf_p;
2483 
2484  return c;
2485 }
char yy_hold_char
Definition: ast_expr2f.c:633
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
void ael_yyrestart(FILE *input_file, yyscan_t yyscanner)
Definition: ael_lex.c:2493
char * yy_c_buf_p
Definition: ast_expr2f.c:636
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:280
#define YY_END_OF_BUFFER_CHAR
Definition: ael_lex.c:159
#define EOB_ACT_CONTINUE_SCAN
Definition: ael_lex.c:175
#define EOB_ACT_LAST_MATCH
Definition: ael_lex.c:177
#define ael_yywrap(n)
Definition: ael_lex.c:330
#define YY_NEW_FILE
Definition: ael_lex.c:157
#define EOB_ACT_END_OF_FILE
Definition: ael_lex.c:176
int yy_did_buffer_switch_on_eof
Definition: ast_expr2f.c:639
int yy_n_chars
Definition: ast_expr2f.c:634
#define yyin
Definition: ael_lex.c:131
static int yy_get_next_buffer(yyscan_t yyscanner)
Definition: ael_lex.c:2183
static int input(yyscan_t yyscanner)
Definition: ael_lex.c:2417
int isatty ( int  )
static int pbcpop ( char  x)
static

Definition at line 3232 of file ael_lex.c.

Referenced by c_prevword(), and while().

3233 {
3234  if ( ( x == ')' && pbcstack[pbcpos-1] == '(' )
3235  || ( x == ']' && pbcstack[pbcpos-1] == '[' )
3236  || ( x == '}' && pbcstack[pbcpos-1] == '{' )) {
3237  pbcpos--;
3238  return 0;
3239  }
3240  return 1; /* error */
3241 }
static char pbcstack[400]
Definition: ael_lex.c:843
static int pbcpos
Definition: ael_lex.c:844
static int pbcpop2 ( char  x)
static

Definition at line 3248 of file ael_lex.c.

Referenced by while().

3249 {
3250  if ( ( x == ')' && pbcstack2[pbcpos2-1] == '(' )
3251  || ( x == ']' && pbcstack2[pbcpos2-1] == '[' )
3252  || ( x == '}' && pbcstack2[pbcpos2-1] == '{' )) {
3253  pbcpos2--;
3254  return 0;
3255  }
3256  return 1; /* error */
3257 }
static int pbcpos2
Definition: ael_lex.c:853
static char pbcstack2[400]
Definition: ael_lex.c:852
static int pbcpop3 ( char  x)
static

Definition at line 3264 of file ael_lex.c.

Referenced by while().

3265 {
3266  if ( ( x == ')' && pbcstack3[pbcpos3-1] == '(' )
3267  || ( x == ']' && pbcstack3[pbcpos3-1] == '[' )
3268  || ( x == '}' && pbcstack3[pbcpos3-1] == '{' )) {
3269  pbcpos3--;
3270  return 0;
3271  }
3272  return 1; /* error */
3273 }
static char pbcstack3[400]
Definition: ael_lex.c:861
static int pbcpos3
Definition: ael_lex.c:862
static void pbcpush ( char  x)
static

Definition at line 3221 of file ael_lex.c.

Referenced by c_prevword(), reset_argcount(), reset_parencount(), and while().

3222 {
3223  pbcstack[pbcpos++] = x;
3224 }
static char pbcstack[400]
Definition: ael_lex.c:843
static int pbcpos
Definition: ael_lex.c:844
static void pbcpush2 ( char  x)
static

Definition at line 3243 of file ael_lex.c.

Referenced by while().

3244 {
3245  pbcstack2[pbcpos2++] = x;
3246 }
static int pbcpos2
Definition: ael_lex.c:853
static char pbcstack2[400]
Definition: ael_lex.c:852
static void pbcpush3 ( char  x)
static

Definition at line 3259 of file ael_lex.c.

Referenced by while().

3260 {
3261  pbcstack3[pbcpos3++] = x;
3262 }
static char pbcstack3[400]
Definition: ael_lex.c:861
static int pbcpos3
Definition: ael_lex.c:862
static void pbcwhere ( const char *  text,
int *  line,
int *  col 
)
static

Definition at line 919 of file ael_lex.c.

920 {
921  int loc_line = *line;
922  int loc_col = *col;
923  char c;
924  while ( (c = *text++) ) {
925  if ( c == '\t' ) {
926  loc_col += 8 - (loc_col % 8);
927  } else if ( c == '\n' ) {
928  loc_line++;
929  loc_col = 1;
930  } else
931  loc_col++;
932  }
933  *line = loc_line;
934  *col = loc_col;
935 }
char * text
Definition: app_queue.c:1091
void reset_argcount ( yyscan_t  yyscanner)

Definition at line 3333 of file ael_lex.c.

References argg, BEGIN, c_prevword(), and pbcpush().

Referenced by switch().

3334 {
3335  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3336  parencount = 0;
3337  pbcpos = 0;
3338  pbcpush('('); /* push '(' so the last pcbpop (parencount= -1) will succeed */
3339  c_prevword();
3340  BEGIN(argg);
3341 }
static int parencount
Definition: ael_lex.c:847
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define BEGIN
Definition: ael_lex.c:144
#define argg
Definition: ael_lex.c:960
static void pbcpush(char x)
Definition: ael_lex.c:3221
static int pbcpos
Definition: ael_lex.c:844
static int c_prevword(void)
Definition: ael_lex.c:3275
void reset_parencount ( yyscan_t  yyscanner)

Definition at line 3314 of file ael_lex.c.

References BEGIN, c_prevword(), paren, and pbcpush().

Referenced by switch().

3315 {
3316  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3317  parencount = 0;
3318  pbcpos = 0;
3319  pbcpush('('); /* push '(' so the last pcbpop (parencount= -1) will succeed */
3320  c_prevword();
3321  BEGIN(paren);
3322 }
static int parencount
Definition: ael_lex.c:847
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define BEGIN
Definition: ael_lex.c:144
static void pbcpush(char x)
Definition: ael_lex.c:3221
static int pbcpos
Definition: ael_lex.c:844
static int c_prevword(void)
Definition: ael_lex.c:3275
#define paren
Definition: ael_lex.c:958
void reset_semicount ( yyscan_t  yyscanner)

Definition at line 3325 of file ael_lex.c.

References BEGIN, and semic.

Referenced by switch().

3326 {
3327  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3328  pbcpos = 0;
3329  BEGIN(semic);
3330 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
#define semic
Definition: ael_lex.c:959
#define BEGIN
Definition: ael_lex.c:144
static int pbcpos
Definition: ael_lex.c:844
static void setup_filestack ( char *  fnamebuf,
int  fnamebuf_siz,
glob_t *  globbuf,
int  globpos,
yyscan_t  xscan,
int  create 
)
static

Definition at line 3397 of file ael_lex.c.

References ael_yy_scan_string(), ael_yy_switch_to_buffer(), ast_config_AST_CONFIG_DIR, ast_copy_string(), ast_log(), BEGIN, stackelement::bufstate, stackelement::colno, errno, stackelement::fname, free, stackelement::globbuf, stackelement::globbuf_pos, include_stack, include_stack_index, INITIAL, stackelement::lineno, LOG_ERROR, LOG_NOTICE, malloc, my_lineno, S_OR, strdup, YY_CURRENT_BUFFER, and yyleng.

Referenced by while().

3398 {
3399  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3400  int error, i;
3401  FILE *in1;
3402  char fnamebuf[2048];
3403 
3404  if (globbuf && globbuf->gl_pathv && globbuf->gl_pathc > 0)
3405 #if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL)
3406  strncpy(fnamebuf, globbuf->gl_pathv[globpos], fnamebuf_siz);
3407 #else
3408  ast_copy_string(fnamebuf, globbuf->gl_pathv[globpos], fnamebuf_siz);
3409 #endif
3410  else {
3411  ast_log(LOG_ERROR,"Include file name not present!\n");
3412  return;
3413  }
3414  for (i=0; i<include_stack_index; i++) {
3415  if ( !strcmp(fnamebuf,include_stack[i].fname )) {
3416  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Nice Try!!! But %s has already been included (perhaps by another file), and would cause an infinite loop of file inclusions!!! Include directive ignored\n",
3417  my_file, my_lineno, my_col, fnamebuf);
3418  break;
3419  }
3420  }
3421  error = 1;
3422  if (i == include_stack_index)
3423  error = 0; /* we can use this file */
3424  if ( !error ) { /* valid file name */
3425  /* relative vs. absolute */
3426  if (fnamebuf[0] != '/')
3427  snprintf(fnamebuf2, fnamebuf_siz, "%s/%s", ast_config_AST_CONFIG_DIR, fnamebuf);
3428  else
3429 #if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL)
3430  strncpy(fnamebuf2, fnamebuf, fnamebuf_siz);
3431 #else
3432  ast_copy_string(fnamebuf2, fnamebuf, fnamebuf_siz);
3433 #endif
3434  in1 = fopen( fnamebuf2, "r" );
3435 
3436  if ( ! in1 ) {
3437  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Couldn't find the include file: %s; ignoring the Include directive!\n", my_file, my_lineno, my_col, fnamebuf2);
3438  } else {
3439  char *buffer;
3440  struct stat stats;
3441  stat(fnamebuf2, &stats);
3442  buffer = (char*)malloc(stats.st_size+1);
3443  if (fread(buffer, 1, stats.st_size, in1) != stats.st_size) {
3444  ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));
3445  }
3446  buffer[stats.st_size] = 0;
3447  ast_log(LOG_NOTICE," --Read in included file %s, %d chars\n",fnamebuf2, (int)stats.st_size);
3448  fclose(in1);
3449  if (include_stack[include_stack_index].fname) {
3450  free(include_stack[include_stack_index].fname);
3452  }
3456  if (my_file)
3457  free(my_file);
3458  my_file = strdup(fnamebuf2);
3459  if (create)
3461 
3463 
3465  if (create)
3466  include_stack_index++;
3467  ael_yy_switch_to_buffer(ael_yy_scan_string (buffer ,yyscanner),yyscanner);
3468  free(buffer);
3469  my_lineno = 1;
3470  my_col = 1;
3471  BEGIN(INITIAL);
3472  }
3473  }
3474 }
int lineno
Definition: ael_lex.c:896
#define malloc(a)
Definition: astmm.h:88
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
YY_BUFFER_STATE bufstate
Definition: ael_lex.c:900
glob_t globbuf
Definition: ael_lex.c:898
#define BEGIN
Definition: ael_lex.c:144
#define INITIAL
Definition: ael_lex.c:957
static int my_col
Definition: ael_lex.c:872
static struct stackelement include_stack[MAX_INCLUDE_DEPTH]
Definition: ael_lex.c:903
void ael_yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
Definition: ael_lex.c:2511
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:273
YY_BUFFER_STATE ael_yy_scan_string(yyconst char *yy_str, yyscan_t yyscanner)
Definition: ael_lex.c:2807
static int include_stack_index
Definition: ael_lex.c:904
char * my_file
Definition: ael_lex.c:873
static int my_lineno
Definition: ael_lex.c:871
#define LOG_ERROR
Definition: logger.h:155
#define free(a)
Definition: astmm.h:94
const char * ast_config_AST_CONFIG_DIR
Definition: asterisk.c:256
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
Definition: logger.c:1207
#define LOG_NOTICE
Definition: logger.h:133
int errno
char * fname
Definition: ael_lex.c:895
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
Definition: strings.h:223
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one...
Definition: strings.h:77
int globbuf_pos
Definition: ael_lex.c:899
#define strdup(a)
Definition: astmm.h:106
#define yyleng
Definition: ael_lex.c:134
while ( )

Definition at line 1242 of file ael_lex.c.

References ael_yy_delete_buffer(), ael_yy_switch_to_buffer(), ael_yywrap, AMPER, argg, ast_config_AST_CONFIG_DIR, ast_copy_string(), ast_log(), AT, BAR, BEGIN, brackstate, stackelement::colno, COLON, COMMA, comment, curlystate, EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, EQ, EXTENMARK, stackelement::fname, free, GLOB_ABORTED, stackelement::globbuf_pos, include_stack, include_stack_index, INITIAL, KW_ABSTRACT, KW_BREAK, KW_CASE, KW_CATCH, KW_CONTEXT, KW_CONTINUE, KW_DEFAULT, KW_ELSE, KW_ESWITCHES, KW_EXTEND, KW_FOR, KW_GLOBALS, KW_GOTO, KW_HINT, KW_IF, KW_IFTIME, KW_IGNOREPAT, KW_INCLUDES, KW_JUMP, KW_LOCAL, KW_MACRO, KW_PATTERN, KW_RANDOM, KW_REGEXTEN, KW_RETURN, KW_SWITCH, KW_SWITCHES, KW_WHILE, LC, stackelement::lineno, LOG_ERROR, LOG_WARNING, LP, malloc, MAX_INCLUDE_DEPTH, my_lineno, paren, pbcpop(), pbcpop2(), pbcpop3(), pbcpush(), pbcpush2(), pbcpush3(), RC, RP, SEMI, semic, setup_filestack(), STORE_LOC, STORE_POS, strdup, unput, word, wordstate, yy_accept, yy_base, YY_BREAK, YY_BUFFER_NEW, YY_BUFFER_NORMAL, yyguts_t::yy_c_buf_p, yy_chk, yy_cp, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_def, yyguts_t::yy_did_buffer_switch_on_eof, YY_DO_BEFORE_ACTION, yy_ec, YY_END_OF_BUFFER, YY_FATAL_ERROR, yy_get_next_buffer(), yy_get_previous_state(), yyguts_t::yy_hold_char, yyguts_t::yy_last_accepting_cpos, yyguts_t::yy_last_accepting_state, yy_meta, YY_MORE_ADJ, yyguts_t::yy_more_flag, yyguts_t::yy_more_len, yyguts_t::yy_n_chars, YY_NEW_FILE, yy_nxt, YY_RESTORE_YY_MORE_OFFSET, YY_RULE_SETUP, YY_SC_TO_UI, YY_START, yyguts_t::yy_start, YY_STATE_EOF, yy_try_NUL_trans(), yyin, yyleng, yylval, yymore, yyterminate, and yytext.

1243  {
1244  yyg->yy_more_len = 0;
1245  if ( yyg->yy_more_flag )
1246  {
1247  yyg->yy_more_len = yyg->yy_c_buf_p - yyg->yytext_ptr;
1248  yyg->yy_more_flag = 0;
1249  }
1250  yy_cp = yyg->yy_c_buf_p;
1251 
1252  /* Support of yytext. */
1253  *yy_cp = yyg->yy_hold_char;
1254 
1255  /* yy_bp points to the position in yy_ch_buf of the start of
1256  * the current run.
1257  */
1258  yy_bp = yy_cp;
1259 
1260  yy_current_state = yyg->yy_start;
1261 yy_match:
1262  do
1263  {
1264  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1265  if ( yy_accept[yy_current_state] )
1266  {
1267  yyg->yy_last_accepting_state = yy_current_state;
1269  }
1270  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1271  {
1272  yy_current_state = (int) yy_def[yy_current_state];
1273  if ( yy_current_state >= 285 )
1274  yy_c = yy_meta[(unsigned int) yy_c];
1275  }
1276  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1277  ++yy_cp;
1278  }
1279  while ( yy_current_state != 284 );
1281  yy_current_state = yyg->yy_last_accepting_state;
1282 
1283 yy_find_action:
1284  yy_act = yy_accept[yy_current_state];
1285 
1287 
1288 do_action: /* This label is used only to access EOF actions. */
1289 
1290  switch ( yy_act )
1291  { /* beginning of action switch */
1292  case 0: /* must back up */
1293  /* undo the effects of YY_DO_BEFORE_ACTION */
1294  *yy_cp = yyg->yy_hold_char;
1296  yy_current_state = yyg->yy_last_accepting_state;
1297  goto yy_find_action;
1298 
1299 case 1:
1301 #line 219 "ael.flex"
1302 { STORE_POS; return LC;}
1303  YY_BREAK
1304 case 2:
1306 #line 220 "ael.flex"
1307 { STORE_POS; return RC;}
1308  YY_BREAK
1309 case 3:
1311 #line 221 "ael.flex"
1312 { STORE_POS; return LP;}
1313  YY_BREAK
1314 case 4:
1316 #line 222 "ael.flex"
1317 { STORE_POS; return RP;}
1318  YY_BREAK
1319 case 5:
1321 #line 223 "ael.flex"
1322 { STORE_POS; return SEMI;}
1323  YY_BREAK
1324 case 6:
1326 #line 224 "ael.flex"
1327 { STORE_POS; return EQ;}
1328  YY_BREAK
1329 case 7:
1331 #line 225 "ael.flex"
1332 { STORE_POS; return COMMA;}
1333  YY_BREAK
1334 case 8:
1336 #line 226 "ael.flex"
1337 { STORE_POS; return COLON;}
1338  YY_BREAK
1339 case 9:
1341 #line 227 "ael.flex"
1342 { STORE_POS; return AMPER;}
1343  YY_BREAK
1344 case 10:
1346 #line 228 "ael.flex"
1347 { STORE_POS; return BAR;}
1348  YY_BREAK
1349 case 11:
1351 #line 229 "ael.flex"
1352 { STORE_POS; return EXTENMARK;}
1353  YY_BREAK
1354 case 12:
1356 #line 230 "ael.flex"
1357 { STORE_POS; return AT;}
1358  YY_BREAK
1359 case 13:
1361 #line 231 "ael.flex"
1362 {/*comment*/}
1363  YY_BREAK
1364 case 14:
1366 #line 232 "ael.flex"
1367 { STORE_POS; return KW_CONTEXT;}
1368  YY_BREAK
1369 case 15:
1371 #line 233 "ael.flex"
1372 { STORE_POS; return KW_ABSTRACT;}
1373  YY_BREAK
1374 case 16:
1376 #line 234 "ael.flex"
1377 { STORE_POS; return KW_EXTEND;}
1378  YY_BREAK
1379 case 17:
1381 #line 235 "ael.flex"
1382 { STORE_POS; return KW_MACRO;};
1383  YY_BREAK
1384 case 18:
1386 #line 236 "ael.flex"
1387 { STORE_POS; return KW_GLOBALS;}
1388  YY_BREAK
1389 case 19:
1391 #line 237 "ael.flex"
1392 { STORE_POS; return KW_LOCAL;}
1393  YY_BREAK
1394 case 20:
1396 #line 238 "ael.flex"
1397 { STORE_POS; return KW_IGNOREPAT;}
1398  YY_BREAK
1399 case 21:
1401 #line 239 "ael.flex"
1402 { STORE_POS; return KW_SWITCH;}
1403  YY_BREAK
1404 case 22:
1406 #line 240 "ael.flex"
1407 { STORE_POS; return KW_IF;}
1408  YY_BREAK
1409 case 23:
1411 #line 241 "ael.flex"
1412 { STORE_POS; return KW_IFTIME;}
1413  YY_BREAK
1414 case 24:
1416 #line 242 "ael.flex"
1417 { STORE_POS; return KW_RANDOM;}
1418  YY_BREAK
1419 case 25:
1421 #line 243 "ael.flex"
1422 { STORE_POS; return KW_REGEXTEN;}
1423  YY_BREAK
1424 case 26:
1426 #line 244 "ael.flex"
1427 { STORE_POS; return KW_HINT;}
1428  YY_BREAK
1429 case 27:
1431 #line 245 "ael.flex"
1432 { STORE_POS; return KW_ELSE;}
1433  YY_BREAK
1434 case 28:
1436 #line 246 "ael.flex"
1437 { STORE_POS; return KW_GOTO;}
1438  YY_BREAK
1439 case 29:
1441 #line 247 "ael.flex"
1442 { STORE_POS; return KW_JUMP;}
1443  YY_BREAK
1444 case 30:
1446 #line 248 "ael.flex"
1447 { STORE_POS; return KW_RETURN;}
1448  YY_BREAK
1449 case 31:
1451 #line 249 "ael.flex"
1452 { STORE_POS; return KW_BREAK;}
1453  YY_BREAK
1454 case 32:
1456 #line 250 "ael.flex"
1457 { STORE_POS; return KW_CONTINUE;}
1458  YY_BREAK
1459 case 33:
1461 #line 251 "ael.flex"
1462 { STORE_POS; return KW_FOR;}
1463  YY_BREAK
1464 case 34:
1466 #line 252 "ael.flex"
1467 { STORE_POS; return KW_WHILE;}
1468  YY_BREAK
1469 case 35:
1471 #line 253 "ael.flex"
1472 { STORE_POS; return KW_CASE;}
1473  YY_BREAK
1474 case 36:
1476 #line 254 "ael.flex"
1477 { STORE_POS; return KW_DEFAULT;}
1478  YY_BREAK
1479 case 37:
1481 #line 255 "ael.flex"
1482 { STORE_POS; return KW_PATTERN;}
1483  YY_BREAK
1484 case 38:
1486 #line 256 "ael.flex"
1487 { STORE_POS; return KW_CATCH;}
1488  YY_BREAK
1489 case 39:
1491 #line 257 "ael.flex"
1492 { STORE_POS; return KW_SWITCHES;}
1493  YY_BREAK
1494 case 40:
1496 #line 258 "ael.flex"
1497 { STORE_POS; return KW_ESWITCHES;}
1498  YY_BREAK
1499 case 41:
1501 #line 259 "ael.flex"
1502 { STORE_POS; return KW_INCLUDES;}
1503  YY_BREAK
1504 case 42:
1506 #line 260 "ael.flex"
1507 { BEGIN(comment); my_col += 2; }
1508  YY_BREAK
1509 case 43:
1511 #line 262 "ael.flex"
1512 { my_col += yyleng; }
1513  YY_BREAK
1514 case 44:
1515 /* rule 44 can match eol */
1517 #line 263 "ael.flex"
1518 { ++my_lineno; my_col=1;}
1519  YY_BREAK
1520 case 45:
1522 #line 264 "ael.flex"
1523 { my_col += yyleng; }
1524  YY_BREAK
1525 case 46:
1526 /* rule 46 can match eol */
1528 #line 265 "ael.flex"
1529 { ++my_lineno; my_col=1;}
1530  YY_BREAK
1531 case 47:
1533 #line 266 "ael.flex"
1534 { my_col += 2; BEGIN(INITIAL); } /* the nice thing about comments is that you know exactly what ends them */
1535  YY_BREAK
1536 case 48:
1537 /* rule 48 can match eol */
1539 #line 268 "ael.flex"
1540 { my_lineno++; my_col = 1; }
1541  YY_BREAK
1542 case 49:
1544 #line 269 "ael.flex"
1545 { my_col += yyleng; }
1546  YY_BREAK
1547 case 50:
1549 #line 270 "ael.flex"
1550 { my_col += (yyleng*8)-(my_col%8); }
1551  YY_BREAK
1552 case 51:
1554 #line 272 "ael.flex"
1555 {
1556  /* boy did I open a can of worms when I changed the lexical token "word".
1557  all the above keywords can be used as a beginning to a "word".-
1558  before, a "word" would match a longer sequence than the above
1559  keywords, and all would be well. But now "word" is a single char
1560  and feeds into a statemachine sort of sequence from there on. So...
1561  I added the {KEYWORD}? to the beginning of the word match sequence */
1562 
1563  if (!strcmp(yytext,"${")) {
1564  parencount2 = 0;
1565  pbcpos2 = 0;
1566  pbcpush2('{'); /* push '{' so the last pcbpop (parencount2 = -1) will succeed */
1567  BEGIN(curlystate);
1568  yymore();
1569  } else if (!strcmp(yytext,"$[")) {
1570  parencount3 = 0;
1571  pbcpos3 = 0;
1572  pbcpush3('['); /* push '[' so the last pcbpop (parencount3 = -1) will succeed */
1573  BEGIN(brackstate);
1574  yymore();
1575  } else {
1576  BEGIN(wordstate);
1577  yymore();
1578  }
1579  }
1580  YY_BREAK
1581 case 52:
1583 #line 298 "ael.flex"
1584 { yymore(); /* Keep going */ }
1585  YY_BREAK
1586 case 53:
1588 #line 299 "ael.flex"
1589 { yymore(); /* Keep going */ }
1590  YY_BREAK
1591 case 54:
1593 #line 300 "ael.flex"
1594 { yymore(); /* Keep Going */ }
1595  YY_BREAK
1596 case 55:
1598 #line 301 "ael.flex"
1599 { /* the beginning of a ${} construct. prepare and pop into curlystate */
1600  parencount2 = 0;
1601  pbcpos2 = 0;
1602  pbcpush2('{'); /* push '{' so the last pcbpop (parencount2 = -1) will succeed */
1603  BEGIN(curlystate);
1604  yymore();
1605  }
1606  YY_BREAK
1607 case 56:
1609 #line 308 "ael.flex"
1610 { /* the beginning of a $[] construct. prepare and pop into brackstate */
1611  parencount3 = 0;
1612  pbcpos3 = 0;
1613  pbcpush3('['); /* push '[' so the last pcbpop (parencount3 = -1) will succeed */
1614  BEGIN(brackstate);
1615  yymore();
1616  }
1617  YY_BREAK
1618 case 57:
1619 /* rule 57 can match eol */
1621 #line 315 "ael.flex"
1622 {
1623  /* a non-word constituent char, like a space, tab, curly, paren, etc */
1624  char c = yytext[yyleng-1];
1625  STORE_POS;
1626  yylval->str = malloc(yyleng);
1627  strncpy(yylval->str, yytext, yyleng);
1628  yylval->str[yyleng-1] = 0;
1629  unput(c); /* put this ending char back in the stream */
1630  BEGIN(0);
1631  return word;
1632  }
1633  YY_BREAK
1634 case 58:
1635 /* rule 58 can match eol */
1637 #line 328 "ael.flex"
1638 {
1639  if ( pbcpop2('}') ) { /* error */
1640  STORE_LOC;
1641  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
1642  BEGIN(0);
1643  yylval->str = malloc(yyleng+1);
1644  strncpy(yylval->str, yytext, yyleng);
1645  yylval->str[yyleng] = 0;
1646  return word;
1647  }
1648  parencount2--;
1649  if ( parencount2 >= 0) {
1650  yymore();
1651  } else {
1652  BEGIN(wordstate); /* Finished with the current ${} construct. Return to word gathering state */
1653  yymore();
1654  }
1655  }
1656  YY_BREAK
1657 case 59:
1658 /* rule 59 can match eol */
1660 #line 347 "ael.flex"
1661 {
1662  char c = yytext[yyleng-1];
1663  if (c == '{')
1664  parencount2++;
1665  pbcpush2(c);
1666  yymore();
1667  }
1668  YY_BREAK
1669 case 60:
1670 /* rule 60 can match eol */
1672 #line 355 "ael.flex"
1673 {
1674  char c = yytext[yyleng-1];
1675  if ( pbcpop2(c)) { /* error */
1676  STORE_LOC;
1677  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
1678  my_file, my_lineno, my_col, c);
1679  BEGIN(0);
1680  yylval->str = malloc(yyleng+1);
1681  strncpy(yylval->str, yytext, yyleng);
1682  yylval->str[yyleng] = 0;
1683  return word;
1684  }
1685  yymore();
1686  }
1687  YY_BREAK
1688 case 61:
1689 /* rule 61 can match eol */
1691 #line 371 "ael.flex"
1692 {
1693  if ( pbcpop3(']') ) { /* error */
1694  STORE_LOC;
1695  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
1696  BEGIN(0);
1697  yylval->str = malloc(yyleng+1);
1698  strncpy(yylval->str, yytext, yyleng);
1699  yylval->str[yyleng] = 0;
1700  return word;
1701  }
1702  parencount3--;
1703  if ( parencount3 >= 0) {
1704  yymore();
1705  } else {
1706  BEGIN(wordstate); /* Finished with the current ${} construct. Return to word gathering state */
1707  yymore();
1708  }
1709  }
1710  YY_BREAK
1711 case 62:
1712 /* rule 62 can match eol */
1714 #line 390 "ael.flex"
1715 {
1716  char c = yytext[yyleng-1];
1717  if (c == '[')
1718  parencount3++;
1719  pbcpush3(c);
1720  yymore();
1721  }
1722  YY_BREAK
1723 case 63:
1724 /* rule 63 can match eol */
1726 #line 398 "ael.flex"
1727 {
1728  char c = yytext[yyleng-1];
1729  if ( pbcpop3(c)) { /* error */
1730  STORE_LOC;
1731  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
1732  my_file, my_lineno, my_col, c);
1733  BEGIN(0);
1734  yylval->str = malloc(yyleng+1);
1735  strncpy(yylval->str, yytext, yyleng);
1736  yylval->str[yyleng] = 0;
1737  return word;
1738  }
1739  yymore();
1740  }
1741  YY_BREAK
1742 /*
1743  * context used for arguments of if_head, random_head, switch_head,
1744  * for (last statement), while (XXX why not iftime_head ?).
1745  * End with the matching parentheses.
1746  * A comma at the top level is valid here, unlike in argg where it
1747  * is an argument separator so it must be returned as a token.
1748  */
1749 case 64:
1750 /* rule 64 can match eol */
1752 #line 421 "ael.flex"
1753 {
1754  if ( pbcpop(')') ) { /* error */
1755  STORE_LOC;
1756  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
1757  BEGIN(0);
1758  yylval->str = malloc(yyleng+1);
1759  strncpy(yylval->str, yytext, yyleng);
1760  yylval->str[yyleng] = 0;
1761  prev_word = 0;
1762  return word;
1763  }
1764  parencount--;
1765  if ( parencount >= 0) {
1766  yymore();
1767  } else {
1768  STORE_LOC;
1769  yylval->str = malloc(yyleng);
1770  strncpy(yylval->str, yytext, yyleng);
1771  yylval->str[yyleng-1] = 0;
1772  unput(')');
1773  BEGIN(0);
1774  return word;
1775  }
1776  }
1777  YY_BREAK
1778 case 65:
1779 /* rule 65 can match eol */
1781 #line 446 "ael.flex"
1782 {
1783  char c = yytext[yyleng-1];
1784  if (c == '(')
1785  parencount++;
1786  pbcpush(c);
1787  yymore();
1788  }
1789  YY_BREAK
1790 case 66:
1791 /* rule 66 can match eol */
1793 #line 454 "ael.flex"
1794 {
1795  char c = yytext[yyleng-1];
1796  if ( pbcpop(c)) { /* error */
1797  STORE_LOC;
1798  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
1799  my_file, my_lineno, my_col, c);
1800  BEGIN(0);
1801  yylval->str = malloc(yyleng+1);
1802  strncpy(yylval->str, yytext, yyleng);
1803  yylval->str[yyleng] = 0;
1804  return word;
1805  }
1806  yymore();
1807  }
1808  YY_BREAK
1809 /*
1810  * handlers for arguments to a macro or application calls.
1811  * We enter this context when we find the initial '(' and
1812  * stay here until we close all matching parentheses,
1813  * and find the comma (argument separator) or the closing ')'
1814  * of the (external) call, which happens when parencount == 0
1815  * before the decrement.
1816  */
1817 case 67:
1818 /* rule 67 can match eol */
1820 #line 478 "ael.flex"
1821 {
1822  char c = yytext[yyleng-1];
1823  if (c == '(')
1824  parencount++;
1825  pbcpush(c);
1826  yymore();
1827  }
1828  YY_BREAK
1829 case 68:
1830 /* rule 68 can match eol */
1832 #line 486 "ael.flex"
1833 {
1834  if ( pbcpop(')') ) { /* error */
1835  STORE_LOC;
1836  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression!\n", my_file, my_lineno, my_col);
1837  BEGIN(0);
1838  yylval->str = malloc(yyleng+1);
1839  strncpy(yylval->str, yytext, yyleng);
1840  yylval->str[yyleng] = 0;
1841  return word;
1842  }
1843 
1844  parencount--;
1845  if( parencount >= 0){
1846  yymore();
1847  } else {
1848  STORE_LOC;
1849  BEGIN(0);
1850  if ( !strcmp(yytext, ")") )
1851  return RP;
1852  yylval->str = malloc(yyleng);
1853  strncpy(yylval->str, yytext, yyleng);
1854  yylval->str[yyleng-1] = '\0'; /* trim trailing ')' */
1855  unput(')');
1856  return word;
1857  }
1858  }
1859  YY_BREAK
1860 case 69:
1861 /* rule 69 can match eol */
1863 #line 513 "ael.flex"
1864 {
1865  if( parencount != 0) { /* ast_log(LOG_NOTICE,"Folding in a comma!\n"); */
1866  yymore();
1867  } else {
1868  STORE_LOC;
1869  if( !strcmp(yytext,"," ) )
1870  return COMMA;
1871  yylval->str = malloc(yyleng);
1872  strncpy(yylval->str, yytext, yyleng);
1873  yylval->str[yyleng-1] = '\0'; /* trim trailing ',' */
1874  unput(',');
1875  return word;
1876  }
1877  }
1878  YY_BREAK
1879 case 70:
1880 /* rule 70 can match eol */
1882 #line 528 "ael.flex"
1883 {
1884  char c = yytext[yyleng-1];
1885  if ( pbcpop(c) ) { /* error */
1886  STORE_LOC;
1887  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
1888  BEGIN(0);
1889  yylval->str = malloc(yyleng+1);
1890  strncpy(yylval->str, yytext, yyleng);
1891  yylval->str[yyleng] = '\0';
1892  return word;
1893  }
1894  yymore();
1895  }
1896  YY_BREAK
1897 /*
1898  * context used to find tokens in the right hand side of assignments,
1899  * or in the first and second operand of a 'for'. As above, match
1900  * commas and use ';' as a separator (hence return it as a separate token).
1901  */
1902 case 71:
1903 /* rule 71 can match eol */
1905 #line 547 "ael.flex"
1906 {
1907  char c = yytext[yyleng-1];
1908  yymore();
1909  pbcpush(c);
1910  }
1911  YY_BREAK
1912 case 72:
1913 /* rule 72 can match eol */
1915 #line 553 "ael.flex"
1916 {
1917  char c = yytext[yyleng-1];
1918  if ( pbcpop(c) ) { /* error */
1919  STORE_LOC;
1920  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
1921  BEGIN(0);
1922  yylval->str = malloc(yyleng+1);
1923  strncpy(yylval->str, yytext, yyleng);
1924  yylval->str[yyleng] = '\0';
1925  return word;
1926  }
1927  yymore();
1928  }
1929  YY_BREAK
1930 case 73:
1931 /* rule 73 can match eol */
1933 #line 567 "ael.flex"
1934 {
1935  STORE_LOC;
1936  yylval->str = malloc(yyleng);
1937  strncpy(yylval->str, yytext, yyleng);
1938  yylval->str[yyleng-1] = '\0'; /* trim trailing ';' */
1939  unput(';');
1940  BEGIN(0);
1941  return word;
1942  }
1943  YY_BREAK
1944 case 74:
1945 /* rule 74 can match eol */
1947 #line 577 "ael.flex"
1948 {
1949  char fnamebuf[1024],*p1,*p2;
1950  int glob_ret;
1951  glob_t globbuf; /* the current globbuf */
1952  int globbuf_pos = -1; /* where we are in the current globbuf */
1953  globbuf.gl_offs = 0; /* initialize it to silence gcc */
1954 
1955  p1 = strchr(yytext,'"');
1956  p2 = strrchr(yytext,'"');
1958  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Includes nested too deeply! Wow!!! How did you do that?\n", my_file, my_lineno, my_col);
1959  } else if ( (int)(p2-p1) > sizeof(fnamebuf) - 1 ) {
1960  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Filename is incredibly way too long (%d chars!). Inclusion ignored!\n", my_file, my_lineno, my_col, yyleng - 10);
1961  } else {
1962  strncpy(fnamebuf, p1+1, p2-p1-1);
1963  fnamebuf[p2-p1-1] = 0;
1964  if (fnamebuf[0] != '/') {
1965  char fnamebuf2[1024];
1966  snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf);
1967  ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf));
1968  }
1969 #ifdef SOLARIS
1970  glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf);
1971 #else
1972  glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf);
1973 #endif
1974  if (glob_ret == GLOB_NOSPACE) {
1976  "Glob Expansion of pattern '%s' failed: Not enough memory\n", fnamebuf);
1977  } else if (glob_ret == GLOB_ABORTED) {
1979  "Glob Expansion of pattern '%s' failed: Read error\n", fnamebuf);
1980  } else if (glob_ret == GLOB_NOMATCH) {
1982  "Glob Expansion of pattern '%s' failed: No matches!\n", fnamebuf);
1983  } else {
1984  globbuf_pos = 0;
1985  }
1986  }
1987  if (globbuf_pos > -1) {
1988  setup_filestack(fnamebuf, sizeof(fnamebuf), &globbuf, 0, yyscanner, 1);
1989  }
1990  }
1991  YY_BREAK
1992 case YY_STATE_EOF(INITIAL):
1993 case YY_STATE_EOF(paren):
1994 case YY_STATE_EOF(semic):
1995 case YY_STATE_EOF(argg):
1996 case YY_STATE_EOF(comment):
1997 case YY_STATE_EOF(curlystate):
1998 case YY_STATE_EOF(wordstate):
1999 case YY_STATE_EOF(brackstate):
2000 #line 622 "ael.flex"
2001 {
2002  char fnamebuf[2048];
2003  if (include_stack_index > 0 && include_stack[include_stack_index-1].globbuf_pos < include_stack[include_stack_index-1].globbuf.gl_pathc-1) {
2006  setup_filestack(fnamebuf, sizeof(fnamebuf), &include_stack[include_stack_index-1].globbuf, include_stack[include_stack_index-1].globbuf_pos, yyscanner, 0);
2007  /* finish this */
2008 
2009  } else {
2010  if (include_stack[include_stack_index].fname) {
2013  }
2014  if (my_file) {
2015  free(my_file);
2016  my_file = 0;
2017  }
2018  if ( --include_stack_index < 0 ) {
2019  yyterminate();
2020  } else {
2021  globfree(&include_stack[include_stack_index].globbuf);
2023 
2029  }
2030  }
2031  }
2032  YY_BREAK
2033 case 75:
2034 /* rule 75 can match eol */
2036 #line 654 "ael.flex"
2037 { /* default rule */ ast_log(LOG_ERROR,"Unhandled char(s): %s\n", yytext); }
2038  YY_BREAK
2039 case 76:
2041 #line 656 "ael.flex"
2042 YY_FATAL_ERROR( "flex scanner jammed" );
2043  YY_BREAK
2044 #line 2043 "ael_lex.c"
2045 
2046  case YY_END_OF_BUFFER:
2047  {
2048  /* Amount of text matched not including the EOB char. */
2049  int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
2050 
2051  /* Undo the effects of YY_DO_BEFORE_ACTION. */
2052  *yy_cp = yyg->yy_hold_char;
2054 
2055  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2056  {
2057  /* We're scanning a new file or input source. It's
2058  * possible that this happened because the user
2059  * just pointed yyin at a new source and called
2060  * ael_yylex(). If so, then we have to assure
2061  * consistency between YY_CURRENT_BUFFER and our
2062  * globals. Here is the right place to do so, because
2063  * this is the first action (other than possibly a
2064  * back-up) that will match for the new input source.
2065  */
2066  yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2067  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2068  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2069  }
2070 
2071  /* Note that here we test for yy_c_buf_p "<=" to the position
2072  * of the first EOB in the buffer, since yy_c_buf_p will
2073  * already have been incremented past the NUL character
2074  * (since all states make transitions on EOB to the
2075  * end-of-buffer state). Contrast this with the test
2076  * in input().
2077  */
2078  if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2079  { /* This was really a NUL. */
2080  yy_state_type yy_next_state;
2081 
2082  yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
2083 
2084  yy_current_state = yy_get_previous_state( yyscanner );
2085 
2086  /* Okay, we're now positioned to make the NUL
2087  * transition. We couldn't have
2088  * yy_get_previous_state() go ahead and do it
2089  * for us because it doesn't know how to deal
2090  * with the possibility of jamming (and we don't
2091  * want to build jamming into it because then it
2092  * will run more slowly).
2093  */
2094 
2095  yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
2096 
2097  yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2098 
2099  if ( yy_next_state )
2100  {
2101  /* Consume the NUL. */
2102  yy_cp = ++yyg->yy_c_buf_p;
2103  yy_current_state = yy_next_state;
2104  goto yy_match;
2105  }
2106 
2107  else
2108  {
2110  yy_current_state = yyg->yy_last_accepting_state;
2111  goto yy_find_action;
2112  }
2113  }
2114 
2115  else switch ( yy_get_next_buffer( yyscanner ) )
2116  {
2117  case EOB_ACT_END_OF_FILE:
2118  {
2120 
2121  if ( ael_yywrap(yyscanner ) )
2122  {
2123  /* Note: because we've taken care in
2124  * yy_get_next_buffer() to have set up
2125  * yytext, we can now set up
2126  * yy_c_buf_p so that if some total
2127  * hoser (like flex itself) wants to
2128  * call the scanner after we return the
2129  * YY_NULL, it'll still work - another
2130  * YY_NULL will get returned.
2131  */
2132  yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
2133 
2135  goto do_action;
2136  }
2137 
2138  else
2139  {
2141  YY_NEW_FILE;
2142  }
2143  break;
2144  }
2145 
2146  case EOB_ACT_CONTINUE_SCAN:
2147  yyg->yy_c_buf_p =
2148  yyg->yytext_ptr + yy_amount_of_matched_text;
2149 
2150  yy_current_state = yy_get_previous_state( yyscanner );
2151 
2152  yy_cp = yyg->yy_c_buf_p;
2153  yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2154  goto yy_match;
2155 
2156  case EOB_ACT_LAST_MATCH:
2157  yyg->yy_c_buf_p =
2158  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
2159 
2160  yy_current_state = yy_get_previous_state( yyscanner );
2161 
2162  yy_cp = yyg->yy_c_buf_p;
2163  yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2164  goto yy_find_action;
2165  }
2166  break;
2167  }
2168 
2169  default:
2171  "fatal flex scanner internal error--no action found" );
2172  } /* end of action switch */
2173  } /* end of scanning one token */
Definition: ael.tab.c:168
Definition: ael.tab.c:166
static int parencount
Definition: ael_lex.c:847
#define YY_RULE_SETUP
Definition: ael_lex.c:1195
#define YY_SC_TO_UI(c)
Definition: ael_lex.c:121
char yy_hold_char
Definition: ast_expr2f.c:633
static yyconst flex_int16_t yy_chk[1073]
Definition: ael_lex.c:638
static int pbcpop(char x)
Definition: ael_lex.c:3232
int lineno
Definition: ael_lex.c:896
#define YY_MORE_ADJ
Definition: ael_lex.c:765
Definition: ael.tab.c:169
#define malloc(a)
Definition: astmm.h:88
#define STORE_POS
Definition: ael_lex.c:937
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
char * yy_c_buf_p
Definition: ast_expr2f.c:636
#define semic
Definition: ael_lex.c:959
Definition: ael.tab.c:171
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:280
Definition: ael.tab.c:167
Definition: ael.tab.c:174
#define BEGIN
Definition: ael_lex.c:144
#define LOG_WARNING
Definition: logger.h:144
Definition: ael.tab.c:172
static yy_state_type yy_get_previous_state(yyscan_t yyscanner)
Definition: ael_lex.c:2318
#define EOB_ACT_CONTINUE_SCAN
Definition: ael_lex.c:175
#define STORE_LOC
Definition: ael_lex.c:944
#define EOB_ACT_LAST_MATCH
Definition: ael_lex.c:177
#define ael_yywrap(n)
Definition: ael_lex.c:330
#define INITIAL
Definition: ael_lex.c:957
static int my_col
Definition: ael_lex.c:872
static void pbcpush2(char x)
Definition: ael_lex.c:3243
static struct stackelement include_stack[MAX_INCLUDE_DEPTH]
Definition: ael_lex.c:903
#define YY_RESTORE_YY_MORE_OFFSET
Definition: ael_lex.c:766
void ael_yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
Definition: ael_lex.c:2511
Definition: ael.tab.c:203
static int parencount2
Definition: ael_lex.c:856
#define YY_END_OF_BUFFER
Definition: ael_lex.c:356
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:273
static yyconst flex_int16_t yy_nxt[1073]
Definition: ael_lex.c:516
#define YY_NEW_FILE
Definition: ael_lex.c:157
static yyconst flex_int16_t yy_def[304]
Definition: ael_lex.c:478
#define YY_START
Definition: ael_lex.c:150
#define yytext
Definition: ael_lex.c:135
int yy_start
Definition: ast_expr2f.c:638
Definition: ael.tab.c:173
#define unput(c)
Definition: ael_lex.c:195
static void setup_filestack(char *fnamebuf, int fnamebuf_siz, glob_t *globbuf, int globpos, yyscan_t xscan, int create)
Definition: ael_lex.c:3397
#define YY_STATE_EOF(state)
Definition: ael_lex.c:154
#define yyterminate()
Definition: ael_lex.c:1155
static yyconst flex_int32_t yy_meta[50]
Definition: ael_lex.c:431
#define argg
Definition: ael_lex.c:960
#define YY_BUFFER_NORMAL
Definition: ael_lex.c:251
#define EOB_ACT_END_OF_FILE
Definition: ael_lex.c:176
Definition: ael.tab.c:170
static int include_stack_index
Definition: ael_lex.c:904
static int pbcpop3(char x)
Definition: ael_lex.c:3264
char * my_file
Definition: ael_lex.c:873
static void pbcpush(char x)
Definition: ael_lex.c:3221
static int pbcpop2(char x)
Definition: ael_lex.c:3248
#define YY_BUFFER_NEW
Definition: ael_lex.c:250
int yy_did_buffer_switch_on_eof
Definition: ast_expr2f.c:639
void ael_yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner)
Definition: ael_lex.c:2586
int yy_state_type
Definition: ast_expr2f.c:335
static int parencount3
Definition: ael_lex.c:865
static int my_lineno
Definition: ael_lex.c:871
int yy_more_flag
Definition: ast_expr2f.c:650
register char * yy_cp
Definition: ast_expr2f.c:846
#define LOG_ERROR
Definition: logger.h:155
Definition: ael.tab.c:165
static int pbcpos2
Definition: ael_lex.c:853
#define free(a)
Definition: astmm.h:94
register char * yy_bp
Definition: ast_expr2f.c:846
const char * ast_config_AST_CONFIG_DIR
Definition: asterisk.c:256
static yyconst flex_int16_t yy_base[304]
Definition: ael_lex.c:440
int yy_n_chars
Definition: ast_expr2f.c:634
#define comment
Definition: ael_lex.c:961
char * yy_last_accepting_cpos
Definition: ast_expr2f.c:644
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
Definition: logger.c:1207
#define yyin
Definition: ael_lex.c:131
#define brackstate
Definition: ael_lex.c:964
static int pbcpos3
Definition: ael_lex.c:862
char * prev_word
Definition: ael_lex.c:874
#define GLOB_ABORTED
Definition: ael_lex.c:830
static int yy_get_next_buffer(yyscan_t yyscanner)
Definition: ael_lex.c:2183
unsigned char YY_CHAR
Definition: ast_expr2f.c:333
static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner)
Definition: ael_lex.c:2351
char * fname
Definition: ael_lex.c:895
#define wordstate
Definition: ael_lex.c:963
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
Definition: strings.h:223
#define MAX_INCLUDE_DEPTH
Definition: ael_lex.c:876
static yyconst flex_int16_t yy_accept[285]
Definition: ael_lex.c:364
int globbuf_pos
Definition: ael_lex.c:899
#define YY_BREAK
Definition: ael_lex.c:1192
int yy_more_len
Definition: ast_expr2f.c:651
Definition: ael.tab.c:179
#define YY_DO_BEFORE_ACTION
Definition: ael_lex.c:347
#define yymore()
Definition: ael_lex.c:764
register int yy_act
Definition: ast_expr2f.c:847
#define strdup(a)
Definition: astmm.h:106
yy_state_type yy_last_accepting_state
Definition: ast_expr2f.c:643
Definition: ael.tab.c:164
#define yylval
Definition: ast_expr2.c:68
#define yyleng
Definition: ael_lex.c:134
#define paren
Definition: ael_lex.c:958
#define YY_FATAL_ERROR(msg)
Definition: ael_lex.c:1165
static void pbcpush3(char x)
Definition: ael_lex.c:3259
static yyconst flex_int32_t yy_ec[256]
Definition: ael_lex.c:399
#define curlystate
Definition: ael_lex.c:962
static void yy_fatal_error ( yyconst char  msg[],
yyscan_t  yyscanner 
)
static
static void yy_fatal_error ( yyconst char *  msg,
yyscan_t  yyscanner 
)
static

Definition at line 2854 of file ael_lex.c.

References YY_EXIT_FAILURE.

2855 {
2856  (void) fprintf( stderr, "%s\n", msg );
2857  exit( YY_EXIT_FAILURE );
2858 }
#define YY_EXIT_FAILURE
Definition: ael_lex.c:2851
static int yy_get_next_buffer ( yyscan_t  yyscanner)
static

Definition at line 2183 of file ael_lex.c.

References ael_yyrealloc(), ael_yyrestart(), EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, yy_buffer_state::yy_buf_size, YY_BUFFER_EOF_PENDING, yyguts_t::yy_c_buf_p, yy_buffer_state::yy_ch_buf, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, YY_INPUT, yy_buffer_state::yy_is_our_buffer, YY_MORE_ADJ, yyguts_t::yy_n_chars, YY_READ_BUF_SIZE, and yyin.

Referenced by input(), and while().

2184 {
2185  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2186  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2187  register char *source = yyg->yytext_ptr;
2188  register int number_to_move, i;
2189  int ret_val;
2190 
2191  if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
2193  "fatal flex scanner internal error--end of buffer missed" );
2194 
2195  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2196  { /* Don't try to fill the buffer, so this is an EOF. */
2197  if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
2198  {
2199  /* We matched a single character, the EOB, so
2200  * treat this as a final EOF.
2201  */
2202  return EOB_ACT_END_OF_FILE;
2203  }
2204 
2205  else
2206  {
2207  /* We matched some text prior to the EOB, first
2208  * process it.
2209  */
2210  return EOB_ACT_LAST_MATCH;
2211  }
2212  }
2213 
2214  /* Try to read more data. */
2215 
2216  /* First move last chars to start of buffer. */
2217  number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
2218 
2219  for ( i = 0; i < number_to_move; ++i )
2220  *(dest++) = *(source++);
2221 
2222  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2223  /* don't do the read, it's not guaranteed to return an EOF,
2224  * just force an EOF
2225  */
2226  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
2227 
2228  else
2229  {
2230  int num_to_read =
2231  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2232 
2233  while ( num_to_read <= 0 )
2234  { /* Not enough room in the buffer - grow it. */
2235 
2236  /* just a shorter name for the current buffer */
2238 
2239  int yy_c_buf_p_offset =
2240  (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
2241 
2242  if ( b->yy_is_our_buffer )
2243  {
2244  int new_size = b->yy_buf_size * 2;
2245 
2246  if ( new_size <= 0 )
2247  b->yy_buf_size += b->yy_buf_size / 8;
2248  else
2249  b->yy_buf_size *= 2;
2250 
2251  b->yy_ch_buf = (char *)
2252  /* Include room in for 2 EOB chars. */
2253  ael_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
2254  }
2255  else
2256  /* Can't grow it, we don't own it. */
2257  b->yy_ch_buf = 0;
2258 
2259  if ( ! b->yy_ch_buf )
2261  "fatal error - scanner input buffer overflow" );
2262 
2263  yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2264 
2265  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2266  number_to_move - 1;
2267 
2268  }
2269 
2270  if ( num_to_read > YY_READ_BUF_SIZE )
2271  num_to_read = YY_READ_BUF_SIZE;
2272 
2273  /* Read in more data. */
2274  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2275  yyg->yy_n_chars, (size_t) num_to_read );
2276 
2277  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2278  }
2279 
2280  if ( yyg->yy_n_chars == 0 )
2281  {
2282  if ( number_to_move == YY_MORE_ADJ )
2283  {
2284  ret_val = EOB_ACT_END_OF_FILE;
2285  ael_yyrestart(yyin ,yyscanner);
2286  }
2287 
2288  else
2289  {
2290  ret_val = EOB_ACT_LAST_MATCH;
2291  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2293  }
2294  }
2295 
2296  else
2297  ret_val = EOB_ACT_CONTINUE_SCAN;
2298 
2299  if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2300  /* Extend the array by 50%, plus the number we really need. */
2301  yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
2302  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) ael_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
2303  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2304  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2305  }
2306 
2307  yyg->yy_n_chars += number_to_move;
2310 
2311  yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2312 
2313  return ret_val;
2314 }
#define YY_MORE_ADJ
Definition: ael_lex.c:765
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
void ael_yyrestart(FILE *input_file, yyscan_t yyscanner)
Definition: ael_lex.c:2493
char * yy_c_buf_p
Definition: ast_expr2f.c:636
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:280
#define YY_END_OF_BUFFER_CHAR
Definition: ael_lex.c:159
char * yy_ch_buf
Definition: ast_expr2f.c:208
void * ael_yyrealloc(void *, yy_size_t, yyscan_t yyscanner)
Definition: ael_lex.c:3203
#define EOB_ACT_CONTINUE_SCAN
Definition: ael_lex.c:175
#define EOB_ACT_LAST_MATCH
Definition: ael_lex.c:177
yy_size_t yy_buf_size
Definition: ast_expr2f.c:214
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:273
#define EOB_ACT_END_OF_FILE
Definition: ael_lex.c:176
#define YY_INPUT(buf, result, max_size)
Definition: ael_lex.c:1118
int yy_n_chars
Definition: ast_expr2f.c:634
#define yyin
Definition: ael_lex.c:131
#define YY_READ_BUF_SIZE
Definition: ael_lex.c:1103
#define YY_BUFFER_EOF_PENDING
Definition: ael_lex.c:262
size_t yy_size_t
Definition: ast_expr2f.c:199
#define YY_FATAL_ERROR(msg)
Definition: ael_lex.c:1165
static yy_state_type yy_get_previous_state ( yyscan_t  yyscanner)
static

Definition at line 2318 of file ael_lex.c.

References yy_accept, yy_base, yyguts_t::yy_c_buf_p, yy_chk, yy_cp, yy_def, yy_ec, yyguts_t::yy_last_accepting_cpos, yyguts_t::yy_last_accepting_state, yy_meta, YY_MORE_ADJ, yy_nxt, YY_SC_TO_UI, and yyguts_t::yy_start.

Referenced by while().

2319 {
2320  register yy_state_type yy_current_state;
2321  register char *yy_cp;
2322  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2323 
2324  yy_current_state = yyg->yy_start;
2325 
2326  for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
2327  {
2328  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2329  if ( yy_accept[yy_current_state] )
2330  {
2331  yyg->yy_last_accepting_state = yy_current_state;
2333  }
2334  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2335  {
2336  yy_current_state = (int) yy_def[yy_current_state];
2337  if ( yy_current_state >= 285 )
2338  yy_c = yy_meta[(unsigned int) yy_c];
2339  }
2340  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2341  }
2342 
2343  return yy_current_state;
2344 }
#define YY_SC_TO_UI(c)
Definition: ael_lex.c:121
static yyconst flex_int16_t yy_chk[1073]
Definition: ael_lex.c:638
#define YY_MORE_ADJ
Definition: ael_lex.c:765
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
char * yy_c_buf_p
Definition: ast_expr2f.c:636
static yyconst flex_int16_t yy_nxt[1073]
Definition: ael_lex.c:516
static yyconst flex_int16_t yy_def[304]
Definition: ael_lex.c:478
int yy_start
Definition: ast_expr2f.c:638
static yyconst flex_int32_t yy_meta[50]
Definition: ael_lex.c:431
int yy_state_type
Definition: ast_expr2f.c:335
register char * yy_cp
Definition: ast_expr2f.c:846
static yyconst flex_int16_t yy_base[304]
Definition: ael_lex.c:440
char * yy_last_accepting_cpos
Definition: ast_expr2f.c:644
unsigned char YY_CHAR
Definition: ast_expr2f.c:333
static yyconst flex_int16_t yy_accept[285]
Definition: ael_lex.c:364
yy_state_type yy_last_accepting_state
Definition: ast_expr2f.c:643
static yyconst flex_int32_t yy_ec[256]
Definition: ael_lex.c:399
static int yy_init_globals ( yyscan_t  yyscanner)
static

Definition at line 3111 of file ael_lex.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 ael_yylex_destroy(), ael_yylex_init(), and ael_yylex_init_extra().

3112 {
3113  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3114  /* Initialization is the same as for the non-reentrant scanner.
3115  * This function is called from ael_yylex_destroy(), so don't allocate here.
3116  */
3117 
3118  yyg->yy_buffer_stack = 0;
3119  yyg->yy_buffer_stack_top = 0;
3120  yyg->yy_buffer_stack_max = 0;
3121  yyg->yy_c_buf_p = (char *) 0;
3122  yyg->yy_init = 0;
3123  yyg->yy_start = 0;
3124 
3125  yyg->yy_start_stack_ptr = 0;
3126  yyg->yy_start_stack_depth = 0;
3127  yyg->yy_start_stack = NULL;
3128 
3129 /* Defined in main.c */
3130 #ifdef YY_STDINIT
3131  yyin = stdin;
3132  yyout = stdout;
3133 #else
3134  yyin = (FILE *) 0;
3135  yyout = (FILE *) 0;
3136 #endif
3137 
3138  /* For future reference: Set errno on error, since we are called by
3139  * ael_yylex_init()
3140  */
3141  return 0;
3142 }
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
char * yy_c_buf_p
Definition: ast_expr2f.c:636
YY_BUFFER_STATE * yy_buffer_stack
Definition: ast_expr2f.c:632
int yy_start_stack_depth
Definition: ast_expr2f.c:641
int yy_init
Definition: ast_expr2f.c:637
int * yy_start_stack
Definition: ast_expr2f.c:642
int yy_start
Definition: ast_expr2f.c:638
int yy_start_stack_ptr
Definition: ast_expr2f.c:640
#define yyin
Definition: ael_lex.c:131
size_t yy_buffer_stack_max
Definition: ast_expr2f.c:631
size_t yy_buffer_stack_top
Definition: ast_expr2f.c:630
#define yyout
Definition: ael_lex.c:132
static yy_state_type yy_try_NUL_trans ( yy_state_type  current_state,
yyscan_t  yyscanner 
)
static

Definition at line 2351 of file ael_lex.c.

References yy_accept, yy_base, yyguts_t::yy_c_buf_p, yy_chk, yy_cp, yy_def, yyguts_t::yy_last_accepting_cpos, yyguts_t::yy_last_accepting_state, yy_meta, and yy_nxt.

Referenced by while().

2352 {
2353  register int yy_is_jam;
2354  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
2355  register char *yy_cp = yyg->yy_c_buf_p;
2356 
2357  register YY_CHAR yy_c = 1;
2358  if ( yy_accept[yy_current_state] )
2359  {
2360  yyg->yy_last_accepting_state = yy_current_state;
2362  }
2363  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2364  {
2365  yy_current_state = (int) yy_def[yy_current_state];
2366  if ( yy_current_state >= 285 )
2367  yy_c = yy_meta[(unsigned int) yy_c];
2368  }
2369  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2370  yy_is_jam = (yy_current_state == 284);
2371 
2372  return yy_is_jam ? 0 : yy_current_state;
2373 }
static yyconst flex_int16_t yy_chk[1073]
Definition: ael_lex.c:638
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
char * yy_c_buf_p
Definition: ast_expr2f.c:636
static yyconst flex_int16_t yy_nxt[1073]
Definition: ael_lex.c:516
static yyconst flex_int16_t yy_def[304]
Definition: ael_lex.c:478
static yyconst flex_int32_t yy_meta[50]
Definition: ael_lex.c:431
register char * yy_cp
Definition: ast_expr2f.c:846
static yyconst flex_int16_t yy_base[304]
Definition: ael_lex.c:440
char * yy_last_accepting_cpos
Definition: ast_expr2f.c:644
unsigned char YY_CHAR
Definition: ast_expr2f.c:333
static yyconst flex_int16_t yy_accept[285]
Definition: ael_lex.c:364
yy_state_type yy_last_accepting_state
Definition: ast_expr2f.c:643
static void yyunput ( int  c,
char *  buf_ptr,
yyscan_t  yyscanner 
)
static
static void yyunput ( int  c,
register char *  yy_bp,
yyscan_t  yyscanner 
)
static

Definition at line 2375 of file ael_lex.c.

References yy_bp, yyguts_t::yy_c_buf_p, yy_cp, YY_CURRENT_BUFFER_LVALUE, YY_FATAL_ERROR, yyguts_t::yy_hold_char, and yyguts_t::yy_n_chars.

2376 {
2377  register char *yy_cp;
2378  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2379 
2380  yy_cp = yyg->yy_c_buf_p;
2381 
2382  /* undo effects of setting up yytext */
2383  *yy_cp = yyg->yy_hold_char;
2384 
2385  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2386  { /* need to shift things up to make room */
2387  /* +2 for EOB chars. */
2388  register int number_to_move = yyg->yy_n_chars + 2;
2389  register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2390  YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2391  register char *source =
2392  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2393 
2394  while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2395  *--dest = *--source;
2396 
2397  yy_cp += (int) (dest - source);
2398  yy_bp += (int) (dest - source);
2399  YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2400  yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2401 
2402  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2403  YY_FATAL_ERROR( "flex scanner push-back overflow" );
2404  }
2405 
2406  *--yy_cp = (char) c;
2407 
2408  yyg->yytext_ptr = yy_bp;
2409  yyg->yy_hold_char = *yy_cp;
2410  yyg->yy_c_buf_p = yy_cp;
2411 }
char yy_hold_char
Definition: ast_expr2f.c:633
struct yyguts_t * yyg
Definition: ast_expr2f.c:848
char * yy_c_buf_p
Definition: ast_expr2f.c:636
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:280
register char * yy_cp
Definition: ast_expr2f.c:846
register char * yy_bp
Definition: ast_expr2f.c:846
int yy_n_chars
Definition: ast_expr2f.c:634
#define YY_FATAL_ERROR(msg)
Definition: ael_lex.c:1165

Variable Documentation

struct stackelement include_stack[MAX_INCLUDE_DEPTH]
static

Definition at line 903 of file ael_lex.c.

Referenced by setup_filestack(), and while().

int include_stack_index = 0
static

Definition at line 904 of file ael_lex.c.

Referenced by setup_filestack(), and while().

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.

Referenced by setup_filestack(), and while().

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 c_prevword(), and switch().

yyconst flex_int16_t yy_accept[285]
static

Definition at line 364 of file ael_lex.c.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

register int yy_act

Definition at line 1204 of file ael_lex.c.

yyconst flex_int16_t yy_base[304]
static

Definition at line 440 of file ael_lex.c.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

register char * yy_bp

Definition at line 1203 of file ael_lex.c.

yyconst flex_int16_t yy_chk[1073]
static

Definition at line 638 of file ael_lex.c.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

register char* yy_cp

Definition at line 1203 of file ael_lex.c.

YY_DECL
Initial value:
{
register yy_state_type yy_current_state
int yy_state_type
Definition: ast_expr2f.c:335

The main scanner function which does all the work.

Definition at line 1201 of file ael_lex.c.

yyconst flex_int16_t yy_def[304]
static

Definition at line 478 of file ael_lex.c.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

yyconst flex_int32_t yy_ec[256]
static

Definition at line 399 of file ael_lex.c.

Referenced by while(), and yy_get_previous_state().

yyconst flex_int32_t yy_meta[50]
static

Definition at line 431 of file ael_lex.c.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

yyconst flex_int16_t yy_nxt[1073]
static

Definition at line 516 of file ael_lex.c.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

struct yyguts_t* yyg = (struct yyguts_t*)yyscanner

Definition at line 1205 of file ael_lex.c.

yylloc = yylloc_param

Definition at line 1214 of file ael_lex.c.

yylval = yylval_param

Definition at line 1212 of file ael_lex.c.