Asterisk - The Open Source Telephony Project  18.5.0
Data Structures | Macros | Typedefs | Functions | Variables
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"
Include dependency graph for ael_lex.c:

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 ASTMM_LIBC   ASTMM_REDIRECT
 
#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 GLOB_BRACE   0
 
#define GLOB_NOMAGIC   0
 
#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

◆ ael_yywrap

#define ael_yywrap (   n)    1

Definition at line 340 of file ael_lex.c.

Referenced by input(), and while().

◆ argg

#define argg   3

Definition at line 975 of file ael_lex.c.

Referenced by reset_argcount(), and while().

◆ ASTMM_LIBC

#define ASTMM_LIBC   ASTMM_REDIRECT

Definition at line 1 of file ael_lex.c.

◆ BEGIN

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

Definition at line 146 of file ael_lex.c.

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

◆ brackstate

#define brackstate   7

Definition at line 979 of file ael_lex.c.

Referenced by while().

◆ comment

#define comment   4
Examples:
/usr/src/asterisk-18.5.0/main/app.c.

Definition at line 976 of file ael_lex.c.

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

◆ curlystate

#define curlystate   5

Definition at line 977 of file ael_lex.c.

Referenced by while().

◆ ECHO

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

Definition at line 1127 of file ael_lex.c.

◆ EOB_ACT_CONTINUE_SCAN

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 185 of file ael_lex.c.

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

◆ EOB_ACT_END_OF_FILE

#define EOB_ACT_END_OF_FILE   1

Definition at line 186 of file ael_lex.c.

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

◆ EOB_ACT_LAST_MATCH

#define EOB_ACT_LAST_MATCH   2

Definition at line 187 of file ael_lex.c.

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

◆ FLEX_BETA

#define FLEX_BETA

Definition at line 17 of file ael_lex.c.

◆ FLEX_SCANNER

#define FLEX_SCANNER

Definition at line 12 of file ael_lex.c.

◆ FLEXINT_H

#define FLEXINT_H

Definition at line 33 of file ael_lex.c.

◆ GLOB_ABORTED

#define GLOB_ABORTED   GLOB_ABEND

Definition at line 839 of file ael_lex.c.

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

◆ GLOB_BRACE

#define GLOB_BRACE   0

Definition at line 842 of file ael_lex.c.

Referenced by while().

◆ GLOB_NOMAGIC

#define GLOB_NOMAGIC   0

Definition at line 845 of file ael_lex.c.

Referenced by while().

◆ INITIAL

#define INITIAL   0

Definition at line 972 of file ael_lex.c.

Referenced by setup_filestack(), and while().

◆ INT16_MAX

#define INT16_MAX   (32767)

Definition at line 75 of file ael_lex.c.

◆ INT16_MIN

#define INT16_MIN   (-32767-1)

Definition at line 66 of file ael_lex.c.

◆ INT32_MAX

#define INT32_MAX   (2147483647)

Definition at line 78 of file ael_lex.c.

◆ INT32_MIN

#define INT32_MIN   (-2147483647-1)

Definition at line 69 of file ael_lex.c.

◆ INT8_MAX

#define INT8_MAX   (127)

Definition at line 72 of file ael_lex.c.

◆ INT8_MIN

#define INT8_MIN   (-128)

Definition at line 63 of file ael_lex.c.

◆ MAX_INCLUDE_DEPTH

#define MAX_INCLUDE_DEPTH   50

Definition at line 891 of file ael_lex.c.

Referenced by while().

◆ paren

#define paren   1

◆ REJECT

#define REJECT   reject_used_but_not_detected

Definition at line 773 of file ael_lex.c.

◆ semic

#define semic   2

Definition at line 974 of file ael_lex.c.

Referenced by reset_semicount(), and while().

◆ STORE_LOC

#define STORE_LOC

Definition at line 959 of file ael_lex.c.

Referenced by while().

◆ STORE_POS

#define STORE_POS

Definition at line 952 of file ael_lex.c.

Referenced by while().

◆ UINT16_MAX

#define UINT16_MAX   (65535U)

Definition at line 84 of file ael_lex.c.

◆ UINT32_MAX

#define UINT32_MAX   (4294967295U)

Definition at line 87 of file ael_lex.c.

◆ UINT8_MAX

#define UINT8_MAX   (255U)

Definition at line 81 of file ael_lex.c.

◆ unput

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

Definition at line 205 of file ael_lex.c.

Referenced by while().

◆ wordstate

#define wordstate   6

Definition at line 978 of file ael_lex.c.

Referenced by while().

◆ YY_AT_BOL

#define YY_AT_BOL ( )    (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 336 of file ael_lex.c.

◆ YY_BREAK

#define YY_BREAK   break;

Definition at line 1208 of file ael_lex.c.

Referenced by while().

◆ YY_BUF_SIZE

#define YY_BUF_SIZE   16384

Definition at line 172 of file ael_lex.c.

Referenced by ael_yyrestart(), and if().

◆ YY_BUFFER_EOF_PENDING

#define YY_BUFFER_EOF_PENDING   2

Definition at line 272 of file ael_lex.c.

Referenced by yy_get_next_buffer().

◆ YY_BUFFER_NEW

#define YY_BUFFER_NEW   0

Definition at line 260 of file ael_lex.c.

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

◆ YY_BUFFER_NORMAL

#define YY_BUFFER_NORMAL   1

Definition at line 261 of file ael_lex.c.

Referenced by while().

◆ YY_CURRENT_BUFFER

#define YY_CURRENT_BUFFER

◆ YY_CURRENT_BUFFER_LVALUE

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

◆ YY_DECL

#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, yyscan_t yyscanner)
void * yyscan_t
Definition: ael_structs.h:71

Definition at line 1195 of file ael_lex.c.

◆ YY_DECL_IS_OURS

#define YY_DECL_IS_OURS   1

Definition at line 1190 of file ael_lex.c.

◆ YY_DO_BEFORE_ACTION

#define YY_DO_BEFORE_ACTION

Definition at line 357 of file ael_lex.c.

Referenced by while().

◆ YY_END_OF_BUFFER

#define YY_END_OF_BUFFER   77

Definition at line 366 of file ael_lex.c.

Referenced by while().

◆ YY_END_OF_BUFFER_CHAR

#define YY_END_OF_BUFFER_CHAR   0

◆ YY_EXIT_FAILURE

#define YY_EXIT_FAILURE   2

Definition at line 2867 of file ael_lex.c.

Referenced by yy_fatal_error().

◆ YY_EXTRA_TYPE

#define YY_EXTRA_TYPE   void *

Definition at line 990 of file ael_lex.c.

◆ YY_FATAL_ERROR

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

◆ yy_flex_debug

#define yy_flex_debug   yyg->yy_flex_debug_r

Definition at line 140 of file ael_lex.c.

Referenced by ael_yyget_debug(), and ael_yyset_debug().

◆ YY_FLEX_MAJOR_VERSION

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 13 of file ael_lex.c.

◆ YY_FLEX_MINOR_VERSION

#define YY_FLEX_MINOR_VERSION   5

Definition at line 14 of file ael_lex.c.

◆ YY_FLEX_SUBMINOR_VERSION

#define YY_FLEX_SUBMINOR_VERSION   35

Definition at line 15 of file ael_lex.c.

◆ YY_FLUSH_BUFFER

#define YY_FLUSH_BUFFER   ael_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)

Definition at line 304 of file ael_lex.c.

◆ YY_INPUT

#define YY_INPUT (   buf,
  result,
  max_size 
)

Definition at line 1134 of file ael_lex.c.

Referenced by yy_get_next_buffer().

◆ YY_INT_ALIGNED

#define YY_INT_ALIGNED   short int

Definition at line 8 of file ael_lex.c.

◆ YY_LESS_LINENO

#define YY_LESS_LINENO (   n)

Definition at line 189 of file ael_lex.c.

◆ YY_MORE_ADJ

#define YY_MORE_ADJ   yyg->yy_more_len

Definition at line 775 of file ael_lex.c.

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

◆ yy_new_buffer

#define yy_new_buffer   ael_yy_create_buffer

Definition at line 314 of file ael_lex.c.

◆ YY_NEW_FILE

#define YY_NEW_FILE   ael_yyrestart(yyin ,yyscanner )

Definition at line 159 of file ael_lex.c.

Referenced by input(), and while().

◆ YY_NULL

#define YY_NULL   0

Definition at line 116 of file ael_lex.c.

◆ YY_NUM_RULES

#define YY_NUM_RULES   76

Definition at line 365 of file ael_lex.c.

◆ YY_READ_BUF_SIZE

#define YY_READ_BUF_SIZE   8192

Definition at line 1118 of file ael_lex.c.

Referenced by yy_get_next_buffer().

◆ YY_RESTORE_YY_MORE_OFFSET

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 776 of file ael_lex.c.

Referenced by while().

◆ YY_RULE_SETUP

#define YY_RULE_SETUP   YY_USER_ACTION

Definition at line 1211 of file ael_lex.c.

Referenced by while().

◆ YY_SC_TO_UI

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

Definition at line 123 of file ael_lex.c.

Referenced by while(), and yy_get_previous_state().

◆ yy_set_bol

#define yy_set_bol (   at_bol)

Definition at line 326 of file ael_lex.c.

◆ yy_set_interactive

#define yy_set_interactive (   is_interactive)

Definition at line 316 of file ael_lex.c.

◆ YY_SKIP_YYWRAP

#define YY_SKIP_YYWRAP

Definition at line 341 of file ael_lex.c.

◆ YY_START

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

Definition at line 152 of file ael_lex.c.

Referenced by while().

◆ YY_START_STACK_INCR

#define YY_START_STACK_INCR   25

Definition at line 1176 of file ael_lex.c.

◆ YY_STATE_BUF_SIZE

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

Definition at line 178 of file ael_lex.c.

◆ YY_STATE_EOF

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

Definition at line 156 of file ael_lex.c.

Referenced by while().

◆ YY_STRUCT_YY_BUFFER_STATE

#define YY_STRUCT_YY_BUFFER_STATE

Definition at line 213 of file ael_lex.c.

◆ YY_TYPEDEF_YY_BUFFER_STATE

#define YY_TYPEDEF_YY_BUFFER_STATE

Definition at line 181 of file ael_lex.c.

◆ YY_TYPEDEF_YY_SCANNER_T

#define YY_TYPEDEF_YY_SCANNER_T

Definition at line 127 of file ael_lex.c.

◆ YY_TYPEDEF_YY_SIZE_T

#define YY_TYPEDEF_YY_SIZE_T

Definition at line 208 of file ael_lex.c.

◆ YY_USER_ACTION

#define YY_USER_ACTION

Definition at line 1203 of file ael_lex.c.

◆ yycolumn

#define yycolumn   (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)

Definition at line 139 of file ael_lex.c.

Referenced by ael_yyget_column(), and ael_yyset_column().

◆ yyconst

#define yyconst

Definition at line 112 of file ael_lex.c.

Referenced by ael_yylex_destroy().

◆ yyextra

#define yyextra   yyg->yyextra_r

Definition at line 135 of file ael_lex.c.

Referenced by ael_yyget_extra(), and ael_yyset_extra().

◆ yyin

#define yyin   yyg->yyin_r

◆ yyleng

#define yyleng   yyg->yyleng_r

Definition at line 136 of file ael_lex.c.

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

◆ yyless [1/2]

#define yyless (   n)

Definition at line 2879 of file ael_lex.c.

◆ yyless [2/2]

#define yyless (   n)

Definition at line 2879 of file ael_lex.c.

◆ yylineno

#define yylineno   (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)

Definition at line 138 of file ael_lex.c.

Referenced by ael_yyget_lineno(), and ael_yyset_lineno().

◆ yylloc

#define yylloc   yyg->yylloc_r

Definition at line 1037 of file ael_lex.c.

Referenced by ael_yyget_lloc(), and ael_yyset_lloc().

◆ yylval

#define yylval   yyg->yylval_r

Definition at line 1035 of file ael_lex.c.

Referenced by ael_yyget_lval(), ael_yyset_lval(), and while().

◆ yymore

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

Definition at line 774 of file ael_lex.c.

Referenced by while().

◆ yyout

#define yyout   yyg->yyout_r

Definition at line 134 of file ael_lex.c.

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

◆ YYSTATE

#define YYSTATE   YY_START

Definition at line 153 of file ael_lex.c.

◆ YYTABLES_NAME

#define YYTABLES_NAME   "yytables"

Definition at line 3231 of file ael_lex.c.

◆ yyterminate

#define yyterminate ( )    return YY_NULL

Definition at line 1171 of file ael_lex.c.

Referenced by while().

◆ yytext

#define yytext   yyg->yytext_r

Definition at line 137 of file ael_lex.c.

Referenced by ael_yyget_text(), and while().

◆ yytext_ptr

#define yytext_ptr   yytext_r

Definition at line 347 of file ael_lex.c.

Typedef Documentation

◆ flex_int16_t

typedef short int flex_int16_t

Definition at line 55 of file ael_lex.c.

◆ flex_int32_t

typedef int flex_int32_t

Definition at line 56 of file ael_lex.c.

◆ flex_int8_t

typedef signed char flex_int8_t

Definition at line 54 of file ael_lex.c.

◆ flex_uint16_t

typedef unsigned short int flex_uint16_t

Definition at line 58 of file ael_lex.c.

◆ flex_uint32_t

typedef unsigned int flex_uint32_t

Definition at line 59 of file ael_lex.c.

◆ flex_uint8_t

typedef unsigned char flex_uint8_t

Definition at line 57 of file ael_lex.c.

◆ YY_BUFFER_STATE

Definition at line 182 of file ael_lex.c.

◆ YY_CHAR

typedef unsigned char YY_CHAR

Definition at line 343 of file ael_lex.c.

◆ yy_size_t

typedef size_t yy_size_t

Definition at line 209 of file ael_lex.c.

◆ yy_state_type

typedef int yy_state_type

Definition at line 345 of file ael_lex.c.

◆ yyscan_t

typedef void* yyscan_t

Definition at line 128 of file ael_lex.c.

Function Documentation

◆ ael2_parse()

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

Definition at line 3360 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(), include_stack_index, io, LOG_ERROR, LOG_WARNING, malloc(), my_col, my_file, my_lineno, prev_word, parse_io::pval, parse_io::scanner, strdup, and parse_io::syntax_error_count.

Referenced by pbx_load_module().

3361 {
3362  struct pval *pvalue;
3363  struct parse_io *io;
3364  char *buffer;
3365  struct stat stats;
3366  FILE *fin;
3367 
3368  /* extern int ael_yydebug; */
3369 
3370  io = calloc(sizeof(struct parse_io),1);
3371  /* reset the global counters */
3372  prev_word = 0;
3373  my_lineno = 1;
3375  my_col = 0;
3376  /* ael_yydebug = 1; */
3377  ael_yylex_init(&io->scanner);
3378  fin = fopen(filename,"r");
3379  if ( !fin ) {
3380  ast_log(LOG_ERROR,"File %s could not be opened\n", filename);
3381  *errors = 1;
3382  return 0;
3383  }
3384  if (my_file)
3385  free(my_file);
3386  my_file = strdup(filename);
3387  if (stat(filename, &stats)) {
3388  ast_log(LOG_WARNING, "failed to populate stats from file '%s'\n", filename);
3389  }
3390  buffer = (char*)malloc(stats.st_size+2);
3391  if (fread(buffer, 1, stats.st_size, fin) != stats.st_size) {
3392  ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));
3393  }
3394  buffer[stats.st_size]=0;
3395  fclose(fin);
3396 
3397  ael_yy_scan_string (buffer ,io->scanner);
3398  ael_yyset_lineno(1 , io->scanner);
3399 
3400  /* ael_yyset_in (fin , io->scanner); OLD WAY */
3401 
3402  ael_yyparse(io);
3403 
3404 
3405  pvalue = io->pval;
3406  *errors = io->syntax_error_count;
3407 
3409  free(buffer);
3410  free(io);
3411 
3412  return pvalue;
3413 }
struct pval * pval
Definition: ael_structs.h:77
#define LOG_WARNING
Definition: logger.h:274
char * my_file
Definition: ael_lex.c:888
static int my_col
Definition: ael_lex.c:887
yyscan_t scanner
Definition: ael_structs.h:78
#define calloc(a, b)
Definition: astmm.h:157
YY_BUFFER_STATE ael_yy_scan_string(yyconst char *yy_str, yyscan_t yyscanner)
Definition: ael_lex.c:2823
char * malloc()
#define ast_log
Definition: astobj2.c:42
int ael_yylex_init(yyscan_t *scanner)
Definition: ael_lex.c:3070
void free()
static struct io_context * io
Definition: chan_ooh323.c:401
void ael_yyset_lineno(int line_number, yyscan_t yyscanner)
Definition: ael_lex.c:2981
static int include_stack_index
Definition: ael_lex.c:919
int syntax_error_count
Definition: ael_structs.h:79
Definition: pval.h:48
static int my_lineno
Definition: ael_lex.c:886
#define LOG_ERROR
Definition: logger.h:285
int errno
char * prev_word
Definition: ael_lex.c:889
int ael_yyparse(struct parse_io *)
#define strdup(a)
Definition: astmm.h:165
int ael_yylex_destroy(yyscan_t yyscanner)
Definition: ael_lex.c:3161

◆ ael_yy_create_buffer()

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 2574 of file ael_lex.c.

References ael_yy_init_buffer(), ael_yyalloc(), b, 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().

2575 {
2577 
2578  b = (YY_BUFFER_STATE) ael_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
2579  if ( ! b )
2580  YY_FATAL_ERROR( "out of dynamic memory in ael_yy_create_buffer()" );
2581 
2582  b->yy_buf_size = size;
2583 
2584  /* yy_ch_buf has to be 2 characters longer than the size given because
2585  * we need to put in 2 end-of-buffer characters.
2586  */
2587  b->yy_ch_buf = (char *) ael_yyalloc(b->yy_buf_size + 2 ,yyscanner );
2588  if ( ! b->yy_ch_buf )
2589  YY_FATAL_ERROR( "out of dynamic memory in ael_yy_create_buffer()" );
2590 
2591  b->yy_is_our_buffer = 1;
2592 
2593  ael_yy_init_buffer(b,file ,yyscanner);
2594 
2595  return b;
2596 }
struct yy_buffer_state * YY_BUFFER_STATE
Definition: ael_lex.c:182
void * ael_yyalloc(yy_size_t, yyscan_t yyscanner)
Definition: ael_lex.c:3214
char * yy_ch_buf
Definition: ast_expr2f.c:218
yy_size_t yy_buf_size
Definition: ast_expr2f.c:224
static void ael_yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner)
Definition: ael_lex.c:2626
static struct test_val b
#define YY_FATAL_ERROR(msg)
Definition: ael_lex.c:1181

◆ ael_yy_delete_buffer()

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 2602 of file ael_lex.c.

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

2603 {
2604  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2605 
2606  if ( ! b )
2607  return;
2608 
2609  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2611 
2612  if ( b->yy_is_our_buffer )
2613  ael_yyfree((void *) b->yy_ch_buf ,yyscanner );
2614 
2615  ael_yyfree((void *) b ,yyscanner );
2616 }
struct yy_buffer_state * YY_BUFFER_STATE
Definition: ael_lex.c:182
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:290
struct yyguts_t * yyg
Definition: ael_lex.c:1221
char * yy_ch_buf
Definition: ast_expr2f.c:218
void ael_yyfree(void *, yyscan_t yyscanner)
Definition: ael_lex.c:3242
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:283

◆ ael_yy_flush_buffer()

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 2655 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().

2656 {
2657  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2658  if ( ! b )
2659  return;
2660 
2661  b->yy_n_chars = 0;
2662 
2663  /* We always need two end-of-buffer characters. The first causes
2664  * a transition to the end-of-buffer state. The second causes
2665  * a jam in that state.
2666  */
2669 
2670  b->yy_buf_pos = &b->yy_ch_buf[0];
2671 
2672  b->yy_at_bol = 1;
2674 
2675  if ( b == YY_CURRENT_BUFFER )
2676  ael_yy_load_buffer_state(yyscanner );
2677 }
#define YY_END_OF_BUFFER_CHAR
Definition: ael_lex.c:161
struct yyguts_t * yyg
Definition: ael_lex.c:1221
char * yy_ch_buf
Definition: ast_expr2f.c:218
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:283
static void ael_yy_load_buffer_state(yyscan_t yyscanner)
Definition: ael_lex.c:2559
#define YY_BUFFER_NEW
Definition: ael_lex.c:260
char * yy_buf_pos
Definition: ast_expr2f.c:219

◆ ael_yy_init_buffer()

static void ael_yy_init_buffer ( YY_BUFFER_STATE  b,
FILE *  file,
yyscan_t  yyscanner 
)
static

Definition at line 2626 of file ael_lex.c.

References ael_yy_flush_buffer(), errno, make_ari_stubs::file, 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().

2628 {
2629  int oerrno = errno;
2630  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2631 
2632  ael_yy_flush_buffer(b ,yyscanner);
2633 
2634  b->yy_input_file = file;
2635  b->yy_fill_buffer = 1;
2636 
2637  /* If b is the current buffer, then ael_yy_init_buffer was _probably_
2638  * called from ael_yyrestart() or through yy_get_next_buffer.
2639  * In that case, we don't want to reset the lineno or column.
2640  */
2641  if (b != YY_CURRENT_BUFFER){
2642  b->yy_bs_lineno = 1;
2643  b->yy_bs_column = 0;
2644  }
2645 
2646  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2647 
2648  errno = oerrno;
2649 }
int isatty(int)
struct yyguts_t * yyg
Definition: ael_lex.c:1221
void ael_yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner)
Definition: ael_lex.c:2655
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:283
int errno
FILE * yy_input_file
Definition: ast_expr2f.c:216

◆ ael_yy_load_buffer_state()

static void ael_yy_load_buffer_state ( yyscan_t  yyscanner)
static

Definition at line 2559 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().

2560 {
2561  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2562  yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2563  yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2564  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2565  yyg->yy_hold_char = *yyg->yy_c_buf_p;
2566 }
char yy_hold_char
Definition: ast_expr2f.c:641
char * yy_c_buf_p
Definition: ast_expr2f.c:644
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:290
struct yyguts_t * yyg
Definition: ael_lex.c:1221
int yy_n_chars
Definition: ast_expr2f.c:642
#define yyin
Definition: ael_lex.c:133

◆ ael_yy_scan_buffer()

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 2786 of file ael_lex.c.

References ael_yy_switch_to_buffer(), ael_yyalloc(), b, 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().

2787 {
2789 
2790  if ( size < 2 ||
2791  base[size-2] != YY_END_OF_BUFFER_CHAR ||
2792  base[size-1] != YY_END_OF_BUFFER_CHAR )
2793  /* They forgot to leave room for the EOB's. */
2794  return 0;
2795 
2796  b = (YY_BUFFER_STATE) ael_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
2797  if ( ! b )
2798  YY_FATAL_ERROR( "out of dynamic memory in ael_yy_scan_buffer()" );
2799 
2800  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2801  b->yy_buf_pos = b->yy_ch_buf = base;
2802  b->yy_is_our_buffer = 0;
2803  b->yy_input_file = 0;
2804  b->yy_n_chars = b->yy_buf_size;
2805  b->yy_is_interactive = 0;
2806  b->yy_at_bol = 1;
2807  b->yy_fill_buffer = 0;
2809 
2810  ael_yy_switch_to_buffer(b ,yyscanner );
2811 
2812  return b;
2813 }
struct yy_buffer_state * YY_BUFFER_STATE
Definition: ael_lex.c:182
void * ael_yyalloc(yy_size_t, yyscan_t yyscanner)
Definition: ael_lex.c:3214
#define YY_END_OF_BUFFER_CHAR
Definition: ael_lex.c:161
char * yy_ch_buf
Definition: ast_expr2f.c:218
yy_size_t yy_buf_size
Definition: ast_expr2f.c:224
void ael_yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
Definition: ael_lex.c:2527
#define YY_BUFFER_NEW
Definition: ael_lex.c:260
static struct test_val b
#define YY_FATAL_ERROR(msg)
Definition: ael_lex.c:1181
char * yy_buf_pos
Definition: ast_expr2f.c:219
FILE * yy_input_file
Definition: ast_expr2f.c:216

◆ ael_yy_scan_bytes()

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
yybytesthe byte buffer to scan
_yybytes_lenthe number of bytes in the buffer pointed to by bytes.
yyscannerThe scanner object.
Returns
the newly allocated buffer state object.

Definition at line 2836 of file ael_lex.c.

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

Referenced by ael_yy_scan_string().

2837 {
2839  char *buf;
2840  yy_size_t n;
2841  int i;
2842 
2843  /* Get memory for full buffer, including space for trailing EOB's. */
2844  n = _yybytes_len + 2;
2845  buf = (char *) ael_yyalloc(n ,yyscanner );
2846  if ( ! buf )
2847  YY_FATAL_ERROR( "out of dynamic memory in ael_yy_scan_bytes()" );
2848 
2849  for ( i = 0; i < _yybytes_len; ++i )
2850  buf[i] = yybytes[i];
2851 
2852  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2853 
2854  b = ael_yy_scan_buffer(buf,n ,yyscanner);
2855  if ( ! b )
2856  YY_FATAL_ERROR( "bad buffer in ael_yy_scan_bytes()" );
2857 
2858  /* It's okay to grow etc. this buffer, and we should throw it
2859  * away when we're done.
2860  */
2861  b->yy_is_our_buffer = 1;
2862 
2863  return b;
2864 }
void * ael_yyalloc(yy_size_t, yyscan_t yyscanner)
Definition: ael_lex.c:3214
YY_BUFFER_STATE ael_yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner)
Definition: ael_lex.c:2786
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
#define YY_END_OF_BUFFER_CHAR
Definition: ael_lex.c:161
static struct test_val b
size_t yy_size_t
Definition: ast_expr2f.c:209
#define YY_FATAL_ERROR(msg)
Definition: ael_lex.c:1181

◆ ael_yy_scan_string()

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 2823 of file ael_lex.c.

References ael_yy_scan_bytes().

Referenced by ael2_parse(), and setup_filestack().

2824 {
2825 
2826  return ael_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
2827 }
YY_BUFFER_STATE ael_yy_scan_bytes(yyconst char *bytes, int len, yyscan_t yyscanner)
Definition: ael_lex.c:2836

◆ ael_yy_switch_to_buffer()

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 2527 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().

2528 {
2529  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2530 
2531  /* TODO. We should be able to replace this entire function body
2532  * with
2533  * ael_yypop_buffer_state();
2534  * ael_yypush_buffer_state(new_buffer);
2535  */
2536  ael_yyensure_buffer_stack (yyscanner);
2537  if ( YY_CURRENT_BUFFER == new_buffer )
2538  return;
2539 
2540  if ( YY_CURRENT_BUFFER )
2541  {
2542  /* Flush out information for old buffer. */
2543  *yyg->yy_c_buf_p = yyg->yy_hold_char;
2544  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2545  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2546  }
2547 
2548  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2549  ael_yy_load_buffer_state(yyscanner );
2550 
2551  /* We don't actually know whether we did this switch during
2552  * EOF (ael_yywrap()) processing, but the only time this flag
2553  * is looked at is after ael_yywrap() is called, so it's safe
2554  * to go ahead and always set it.
2555  */
2556  yyg->yy_did_buffer_switch_on_eof = 1;
2557 }
char yy_hold_char
Definition: ast_expr2f.c:641
char * yy_c_buf_p
Definition: ast_expr2f.c:644
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:290
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:283
static void ael_yy_load_buffer_state(yyscan_t yyscanner)
Definition: ael_lex.c:2559
int yy_did_buffer_switch_on_eof
Definition: ast_expr2f.c:647
int yy_n_chars
Definition: ast_expr2f.c:642
static void ael_yyensure_buffer_stack(yyscan_t yyscanner)
Definition: ael_lex.c:2736

◆ ael_yyalloc()

void * ael_yyalloc ( yy_size_t  size,
yyscan_t  yyscanner 
)

Definition at line 3214 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().

3215 {
3216  return (void *) malloc( size );
3217 }
char * malloc()

◆ ael_yyensure_buffer_stack()

static void ael_yyensure_buffer_stack ( yyscan_t  yyscanner)
static

Definition at line 2736 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().

2737 {
2738  int num_to_alloc;
2739  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2740 
2741  if (!yyg->yy_buffer_stack) {
2742 
2743  /* First allocation is just for 2 elements, since we don't know if this
2744  * scanner will even need a stack. We use 2 instead of 1 to avoid an
2745  * immediate realloc on the next call.
2746  */
2747  num_to_alloc = 1;
2749  (num_to_alloc * sizeof(struct yy_buffer_state*)
2750  , yyscanner);
2751  if ( ! yyg->yy_buffer_stack )
2752  YY_FATAL_ERROR( "out of dynamic memory in ael_yyensure_buffer_stack()" );
2753 
2754  memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2755 
2756  yyg->yy_buffer_stack_max = num_to_alloc;
2757  yyg->yy_buffer_stack_top = 0;
2758  return;
2759  }
2760 
2761  if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
2762 
2763  /* Increase the buffer to prepare for a possible push. */
2764  int grow_size = 8 /* arbitrary grow size */;
2765 
2766  num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
2768  (yyg->yy_buffer_stack,
2769  num_to_alloc * sizeof(struct yy_buffer_state*)
2770  , yyscanner);
2771  if ( ! yyg->yy_buffer_stack )
2772  YY_FATAL_ERROR( "out of dynamic memory in ael_yyensure_buffer_stack()" );
2773 
2774  /* zero only the new slots.*/
2775  memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
2776  yyg->yy_buffer_stack_max = num_to_alloc;
2777  }
2778 }
void * ael_yyalloc(yy_size_t, yyscan_t yyscanner)
Definition: ael_lex.c:3214
struct yyguts_t * yyg
Definition: ael_lex.c:1221
void * ael_yyrealloc(void *, yy_size_t, yyscan_t yyscanner)
Definition: ael_lex.c:3219
YY_BUFFER_STATE * yy_buffer_stack
Definition: ast_expr2f.c:640
size_t yy_buffer_stack_max
Definition: ast_expr2f.c:639
#define YY_FATAL_ERROR(msg)
Definition: ael_lex.c:1181
size_t yy_buffer_stack_top
Definition: ast_expr2f.c:638

◆ ael_yyfree()

void ael_yyfree ( void *  ptr,
yyscan_t  yyscanner 
)

Definition at line 3242 of file ael_lex.c.

References free().

Referenced by ael_yy_delete_buffer(), and ael_yylex_destroy().

3243 {
3244  if (ptr)
3245  free( (char*) ptr );
3246 }
void free()

◆ ael_yyget_column()

int ael_yyget_column ( yyscan_t  yyscanner)

Get the current column number.

Parameters
yyscannerThe scanner object.

Definition at line 2920 of file ael_lex.c.

References YY_CURRENT_BUFFER, and yycolumn.

2921 {
2922  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2923 
2924  if (! YY_CURRENT_BUFFER)
2925  return 0;
2926 
2927  return yycolumn;
2928 }
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:283
#define yycolumn
Definition: ael_lex.c:139

◆ ael_yyget_debug()

int ael_yyget_debug ( yyscan_t  yyscanner)

Definition at line 3025 of file ael_lex.c.

References yy_flex_debug.

3026 {
3027  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3028  return yy_flex_debug;
3029 }
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define yy_flex_debug
Definition: ael_lex.c:140

◆ ael_yyget_extra()

YY_EXTRA_TYPE ael_yyget_extra ( yyscan_t  yyscanner)

Get the user-defined data for this scanner.

Parameters
yyscannerThe scanner object.

Definition at line 2898 of file ael_lex.c.

References yyextra.

2899 {
2900  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2901  return yyextra;
2902 }
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define yyextra
Definition: ael_lex.c:135

◆ ael_yyget_in()

FILE * ael_yyget_in ( yyscan_t  yyscanner)

Get the input stream.

Parameters
yyscannerThe scanner object.

Definition at line 2933 of file ael_lex.c.

References yyin.

2934 {
2935  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2936  return yyin;
2937 }
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define yyin
Definition: ael_lex.c:133

◆ ael_yyget_leng()

int ael_yyget_leng ( yyscan_t  yyscanner)

Get the length of the current token.

Parameters
yyscannerThe scanner object.

Definition at line 2951 of file ael_lex.c.

References yyleng.

2952 {
2953  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2954  return yyleng;
2955 }
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define yyleng
Definition: ael_lex.c:136

◆ ael_yyget_lineno()

int ael_yyget_lineno ( yyscan_t  yyscanner)

Get the current line number.

Parameters
yyscannerThe scanner object.

Definition at line 2907 of file ael_lex.c.

References YY_CURRENT_BUFFER, and yylineno.

2908 {
2909  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2910 
2911  if (! YY_CURRENT_BUFFER)
2912  return 0;
2913 
2914  return yylineno;
2915 }
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:283
#define yylineno
Definition: ael_lex.c:138

◆ ael_yyget_lloc()

YYLTYPE * ael_yyget_lloc ( yyscan_t  yyscanner)

Definition at line 3051 of file ael_lex.c.

References yylloc.

3052 {
3053  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3054  return yylloc;
3055 }
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define yylloc
Definition: ael_lex.c:1037

◆ ael_yyget_lval()

YYSTYPE * ael_yyget_lval ( yyscan_t  yyscanner)

Definition at line 3039 of file ael_lex.c.

References yylval.

3040 {
3041  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3042  return yylval;
3043 }
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define yylval
Definition: ael_lex.c:1035

◆ ael_yyget_out()

FILE * ael_yyget_out ( yyscan_t  yyscanner)

Get the output stream.

Parameters
yyscannerThe scanner object.

Definition at line 2942 of file ael_lex.c.

References yyout.

2943 {
2944  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2945  return yyout;
2946 }
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define yyout
Definition: ael_lex.c:134

◆ ael_yyget_text()

char * ael_yyget_text ( yyscan_t  yyscanner)

Get the current token.

Parameters
yyscannerThe scanner object.

Definition at line 2961 of file ael_lex.c.

References yytext.

2962 {
2963  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2964  return yytext;
2965 }
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define yytext
Definition: ael_lex.c:137

◆ ael_yylex()

int ael_yylex ( YYSTYPE yylval_param,
YYLTYPE yylloc_param,
yyscan_t  yyscanner 
)

◆ ael_yylex_destroy()

int ael_yylex_destroy ( yyscan_t  yyscanner)

Definition at line 3161 of file ael_lex.c.

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

Referenced by ael2_parse().

3162 {
3163  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3164 
3165  /* Pop the buffer stack, destroying each element. */
3166  while(YY_CURRENT_BUFFER){
3169  ael_yypop_buffer_state(yyscanner);
3170  }
3171 
3172  /* Destroy the stack itself. */
3173  ael_yyfree(yyg->yy_buffer_stack ,yyscanner);
3174  yyg->yy_buffer_stack = NULL;
3175 
3176  /* Destroy the start condition stack. */
3177  ael_yyfree(yyg->yy_start_stack ,yyscanner );
3178  yyg->yy_start_stack = NULL;
3179 
3180  /* Reset the globals. This is important in a non-reentrant scanner so the next time
3181  * ael_yylex() is called, initialization will occur. */
3182  yy_init_globals( yyscanner);
3183 
3184  /* Destroy the main struct (reentrant only). */
3185  ael_yyfree ( yyscanner , yyscanner );
3186  yyscanner = NULL;
3187  return 0;
3188 }
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:290
struct yyguts_t * yyg
Definition: ael_lex.c:1221
void ael_yyfree(void *, yyscan_t yyscanner)
Definition: ael_lex.c:3242
void ael_yypop_buffer_state(yyscan_t yyscanner)
Definition: ael_lex.c:2716
static int yy_init_globals(yyscan_t yyscanner)
Definition: ael_lex.c:3127
#define NULL
Definition: resample.c:96
YY_BUFFER_STATE * yy_buffer_stack
Definition: ast_expr2f.c:640
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:283
int * yy_start_stack
Definition: ast_expr2f.c:650
void ael_yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner)
Definition: ael_lex.c:2602

◆ ael_yylex_init()

int ael_yylex_init ( yyscan_t scanner)

Definition at line 3070 of file ael_lex.c.

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

Referenced by ael2_parse().

3072 {
3073  if (ptr_yy_globals == NULL){
3074  errno = EINVAL;
3075  return 1;
3076  }
3077 
3078  *ptr_yy_globals = (yyscan_t) ael_yyalloc ( sizeof( struct yyguts_t ), NULL );
3079 
3080  if (*ptr_yy_globals == NULL){
3081  errno = ENOMEM;
3082  return 1;
3083  }
3084 
3085  /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
3086  memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
3087 
3088  return yy_init_globals ( *ptr_yy_globals );
3089 }
void * ael_yyalloc(yy_size_t, yyscan_t yyscanner)
Definition: ael_lex.c:3214
static int yy_init_globals(yyscan_t yyscanner)
Definition: ael_lex.c:3127
#define NULL
Definition: resample.c:96
void * yyscan_t
Definition: ael_lex.c:128
int errno

◆ ael_yylex_init_extra()

int ael_yylex_init_extra ( YY_EXTRA_TYPE  user_defined,
yyscan_t scanner 
)

Definition at line 3099 of file ael_lex.c.

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

3101 {
3102  struct yyguts_t dummy_yyguts;
3103 
3104  ael_yyset_extra (yy_user_defined, &dummy_yyguts);
3105 
3106  if (ptr_yy_globals == NULL){
3107  errno = EINVAL;
3108  return 1;
3109  }
3110 
3111  *ptr_yy_globals = (yyscan_t) ael_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
3112 
3113  if (*ptr_yy_globals == NULL){
3114  errno = ENOMEM;
3115  return 1;
3116  }
3117 
3118  /* By setting to 0xAA, we expose bugs in
3119  yy_init_globals. Leave at 0x00 for releases. */
3120  memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
3121 
3122  ael_yyset_extra (yy_user_defined, *ptr_yy_globals);
3123 
3124  return yy_init_globals ( *ptr_yy_globals );
3125 }
void * ael_yyalloc(yy_size_t, yyscan_t yyscanner)
Definition: ael_lex.c:3214
void ael_yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner)
Definition: ael_lex.c:2971
static int yy_init_globals(yyscan_t yyscanner)
Definition: ael_lex.c:3127
#define NULL
Definition: resample.c:96
void * yyscan_t
Definition: ael_lex.c:128
int errno

◆ ael_yyparse()

int ael_yyparse ( struct parse_io )

Referenced by ael2_parse().

◆ ael_yypop_buffer_state()

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 2716 of file ael_lex.c.

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

2717 {
2718  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2719  if (!YY_CURRENT_BUFFER)
2720  return;
2721 
2724  if (yyg->yy_buffer_stack_top > 0)
2725  --yyg->yy_buffer_stack_top;
2726 
2727  if (YY_CURRENT_BUFFER) {
2728  ael_yy_load_buffer_state(yyscanner );
2729  yyg->yy_did_buffer_switch_on_eof = 1;
2730  }
2731 }
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:290
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define NULL
Definition: resample.c:96
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:283
static void ael_yy_load_buffer_state(yyscan_t yyscanner)
Definition: ael_lex.c:2559
int yy_did_buffer_switch_on_eof
Definition: ast_expr2f.c:647
void ael_yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner)
Definition: ael_lex.c:2602
size_t yy_buffer_stack_top
Definition: ast_expr2f.c:638

◆ ael_yypush_buffer_state()

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 2685 of file ael_lex.c.

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

2686 {
2687  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2688  if (new_buffer == NULL)
2689  return;
2690 
2691  ael_yyensure_buffer_stack(yyscanner);
2692 
2693  /* This block is copied from ael_yy_switch_to_buffer. */
2694  if ( YY_CURRENT_BUFFER )
2695  {
2696  /* Flush out information for old buffer. */
2697  *yyg->yy_c_buf_p = yyg->yy_hold_char;
2698  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2699  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2700  }
2701 
2702  /* Only push if top exists. Otherwise, replace top. */
2703  if (YY_CURRENT_BUFFER)
2704  yyg->yy_buffer_stack_top++;
2705  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2706 
2707  /* copied from ael_yy_switch_to_buffer. */
2708  ael_yy_load_buffer_state(yyscanner );
2709  yyg->yy_did_buffer_switch_on_eof = 1;
2710 }
char yy_hold_char
Definition: ast_expr2f.c:641
char * yy_c_buf_p
Definition: ast_expr2f.c:644
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:290
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define NULL
Definition: resample.c:96
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:283
static void ael_yy_load_buffer_state(yyscan_t yyscanner)
Definition: ael_lex.c:2559
int yy_did_buffer_switch_on_eof
Definition: ast_expr2f.c:647
int yy_n_chars
Definition: ast_expr2f.c:642
static void ael_yyensure_buffer_stack(yyscan_t yyscanner)
Definition: ael_lex.c:2736
size_t yy_buffer_stack_top
Definition: ast_expr2f.c:638

◆ ael_yyrealloc()

void * ael_yyrealloc ( void *  ptr,
yy_size_t  size,
yyscan_t  yyscanner 
)

Definition at line 3219 of file ael_lex.c.

References realloc.

Referenced by ael_yyensure_buffer_stack(), and yy_get_next_buffer().

3220 {
3221  /* The cast to (char *) in the following accommodates both
3222  * implementations that use char* generic pointers, and those
3223  * that use void* generic pointers. It works with the latter
3224  * because both ANSI C and C++ allow castless assignment from
3225  * any pointer type to void*, and deal with argument conversions
3226  * as though doing an assignment.
3227  */
3228  return (void *) realloc( (char *) ptr, size );
3229 }
#define realloc(a, b)
Definition: astmm.h:163

◆ ael_yyrestart()

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 2509 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().

2510 {
2511  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2512 
2513  if ( ! YY_CURRENT_BUFFER ){
2514  ael_yyensure_buffer_stack (yyscanner);
2517  }
2518 
2519  ael_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
2520  ael_yy_load_buffer_state(yyscanner );
2521 }
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:290
struct yyguts_t * yyg
Definition: ael_lex.c:1221
YY_BUFFER_STATE ael_yy_create_buffer(FILE *file, int size, yyscan_t yyscanner)
Definition: ael_lex.c:2574
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:283
static void ael_yy_load_buffer_state(yyscan_t yyscanner)
Definition: ael_lex.c:2559
#define yyin
Definition: ael_lex.c:133
static void ael_yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner)
Definition: ael_lex.c:2626
#define YY_BUF_SIZE
Definition: ael_lex.c:172
static void ael_yyensure_buffer_stack(yyscan_t yyscanner)
Definition: ael_lex.c:2736

◆ ael_yyset_column()

void ael_yyset_column ( int  column_no,
yyscan_t  yyscanner 
)

Set the current column.

Parameters
line_number
yyscannerThe scanner object.

Definition at line 2996 of file ael_lex.c.

References YY_CURRENT_BUFFER, yy_fatal_error(), and yycolumn.

2997 {
2998  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2999 
3000  /* column is only valid if an input buffer exists. */
3001  if (! YY_CURRENT_BUFFER )
3002  yy_fatal_error( "ael_yyset_column called with no buffer" , yyscanner);
3003 
3004  yycolumn = column_no;
3005 }
struct yyguts_t * yyg
Definition: ael_lex.c:1221
static void yy_fatal_error(yyconst char msg[], yyscan_t yyscanner)
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:283
#define yycolumn
Definition: ael_lex.c:139

◆ ael_yyset_debug()

void ael_yyset_debug ( int  debug_flag,
yyscan_t  yyscanner 
)

Definition at line 3031 of file ael_lex.c.

References yy_flex_debug.

3032 {
3033  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3034  yy_flex_debug = bdebug ;
3035 }
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define yy_flex_debug
Definition: ael_lex.c:140

◆ ael_yyset_extra()

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 2971 of file ael_lex.c.

References yyextra.

Referenced by ael_yylex_init_extra().

2972 {
2973  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2974  yyextra = user_defined ;
2975 }
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define yyextra
Definition: ael_lex.c:135

◆ ael_yyset_in()

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 3013 of file ael_lex.c.

References yyin.

3014 {
3015  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3016  yyin = in_str ;
3017 }
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define yyin
Definition: ael_lex.c:133

◆ ael_yyset_lineno()

void ael_yyset_lineno ( int  line_number,
yyscan_t  yyscanner 
)

Set the current line number.

Parameters
line_number
yyscannerThe scanner object.

Definition at line 2981 of file ael_lex.c.

References YY_CURRENT_BUFFER, yy_fatal_error(), and yylineno.

Referenced by ael2_parse().

2982 {
2983  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2984 
2985  /* lineno is only valid if an input buffer exists. */
2986  if (! YY_CURRENT_BUFFER )
2987  yy_fatal_error( "ael_yyset_lineno called with no buffer" , yyscanner);
2988 
2989  yylineno = line_number;
2990 }
struct yyguts_t * yyg
Definition: ael_lex.c:1221
static void yy_fatal_error(yyconst char msg[], yyscan_t yyscanner)
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:283
#define yylineno
Definition: ael_lex.c:138

◆ ael_yyset_lloc()

void ael_yyset_lloc ( YYLTYPE yylloc_param,
yyscan_t  yyscanner 
)

Definition at line 3057 of file ael_lex.c.

References yylloc.

3058 {
3059  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3060  yylloc = yylloc_param;
3061 }
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define yylloc
Definition: ael_lex.c:1037

◆ ael_yyset_lval()

void ael_yyset_lval ( YYSTYPE yylval_param,
yyscan_t  yyscanner 
)

Definition at line 3045 of file ael_lex.c.

References yylval.

3046 {
3047  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3048  yylval = yylval_param;
3049 }
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define yylval
Definition: ael_lex.c:1035

◆ ael_yyset_out()

void ael_yyset_out ( FILE *  out_str,
yyscan_t  yyscanner 
)

Definition at line 3019 of file ael_lex.c.

References yyout.

3020 {
3021  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3022  yyout = out_str ;
3023 }
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define yyout
Definition: ael_lex.c:134

◆ c_prevword()

static int c_prevword ( void  )
static

Definition at line 3291 of file ael_lex.c.

References c, NULL, pbcpop(), pbcpush(), prev_word, and reset_parencount().

Referenced by reset_argcount(), and reset_parencount().

3292 {
3293  char *c = prev_word;
3294  if (c == NULL)
3295  return 0;
3296  while ( *c ) {
3297  switch (*c) {
3298  case '{':
3299  case '[':
3300  case '(':
3301  pbcpush(*c);
3302  break;
3303  case '}':
3304  case ']':
3305  case ')':
3306  if (pbcpop(*c))
3307  return 1;
3308  break;
3309  }
3310  c++;
3311  }
3312  return 0;
3313 }
static int pbcpop(char x)
Definition: ael_lex.c:3248
static struct test_val c
#define NULL
Definition: resample.c:96
static void pbcpush(char x)
Definition: ael_lex.c:3237
char * prev_word
Definition: ael_lex.c:889

◆ if()

if ( !yyg->  yy_init)

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

1233  {
1234  yyg->yy_init = 1;
1235 
1236 #ifdef YY_USER_INIT
1237  YY_USER_INIT;
1238 #endif
1239 
1240  if ( ! yyg->yy_start )
1241  yyg->yy_start = 1; /* first start state */
1242 
1243  if ( ! yyin )
1244  yyin = stdin;
1245 
1246  if ( ! yyout )
1247  yyout = stdout;
1248 
1249  if ( ! YY_CURRENT_BUFFER ) {
1250  ael_yyensure_buffer_stack (yyscanner);
1253  }
1254 
1255  ael_yy_load_buffer_state(yyscanner );
1256  }
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:290
struct yyguts_t * yyg
Definition: ael_lex.c:1221
YY_BUFFER_STATE ael_yy_create_buffer(FILE *file, int size, yyscan_t yyscanner)
Definition: ael_lex.c:2574
int yy_init
Definition: ast_expr2f.c:645
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:283
int yy_start
Definition: ast_expr2f.c:646
static void ael_yy_load_buffer_state(yyscan_t yyscanner)
Definition: ael_lex.c:2559
#define yyin
Definition: ael_lex.c:133
#define YY_BUF_SIZE
Definition: ael_lex.c:172
static void ael_yyensure_buffer_stack(yyscan_t yyscanner)
Definition: ael_lex.c:2736
#define yyout
Definition: ael_lex.c:134

◆ input()

static int input ( yyscan_t  yyscanner)
static

Definition at line 2433 of file ael_lex.c.

References ael_yyrestart(), ael_yywrap, c, 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.

2436 {
2437  int c;
2438  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2439 
2440  *yyg->yy_c_buf_p = yyg->yy_hold_char;
2441 
2442  if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2443  {
2444  /* yy_c_buf_p now points to the character we want to return.
2445  * If this occurs *before* the EOB characters, then it's a
2446  * valid NUL; if not, then we've hit the end of the buffer.
2447  */
2448  if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2449  /* This was really a NUL. */
2450  *yyg->yy_c_buf_p = '\0';
2451 
2452  else
2453  { /* need more input */
2454  int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
2455  ++yyg->yy_c_buf_p;
2456 
2457  switch ( yy_get_next_buffer( yyscanner ) )
2458  {
2459  case EOB_ACT_LAST_MATCH:
2460  /* This happens because yy_g_n_b()
2461  * sees that we've accumulated a
2462  * token and flags that we need to
2463  * try matching the token before
2464  * proceeding. But for input(),
2465  * there's no matching to consider.
2466  * So convert the EOB_ACT_LAST_MATCH
2467  * to EOB_ACT_END_OF_FILE.
2468  */
2469 
2470  /* Reset buffer status. */
2471  ael_yyrestart(yyin ,yyscanner);
2472 
2473  /*FALLTHROUGH*/
2474 
2475  case EOB_ACT_END_OF_FILE:
2476  {
2477  if ( ael_yywrap(yyscanner ) )
2478  return EOF;
2479 
2480  if ( ! yyg->yy_did_buffer_switch_on_eof )
2481  YY_NEW_FILE;
2482 #ifdef __cplusplus
2483  return yyinput(yyscanner);
2484 #else
2485  return input(yyscanner);
2486 #endif
2487  }
2488 
2489  case EOB_ACT_CONTINUE_SCAN:
2490  yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
2491  break;
2492  }
2493  }
2494  }
2495 
2496  c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
2497  *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
2498  yyg->yy_hold_char = *++yyg->yy_c_buf_p;
2499 
2500  return c;
2501 }
char yy_hold_char
Definition: ast_expr2f.c:641
void ael_yyrestart(FILE *input_file, yyscan_t yyscanner)
Definition: ael_lex.c:2509
char * yy_c_buf_p
Definition: ast_expr2f.c:644
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:290
#define YY_END_OF_BUFFER_CHAR
Definition: ael_lex.c:161
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define EOB_ACT_CONTINUE_SCAN
Definition: ael_lex.c:185
#define EOB_ACT_LAST_MATCH
Definition: ael_lex.c:187
#define ael_yywrap(n)
Definition: ael_lex.c:340
static struct test_val c
#define YY_NEW_FILE
Definition: ael_lex.c:159
#define EOB_ACT_END_OF_FILE
Definition: ael_lex.c:186
int yy_did_buffer_switch_on_eof
Definition: ast_expr2f.c:647
int yy_n_chars
Definition: ast_expr2f.c:642
#define yyin
Definition: ael_lex.c:133
static int yy_get_next_buffer(yyscan_t yyscanner)
Definition: ael_lex.c:2199
static int input(yyscan_t yyscanner)
Definition: ael_lex.c:2433

◆ isatty()

int isatty ( int  )

◆ pbcpop()

static int pbcpop ( char  x)
static

Definition at line 3248 of file ael_lex.c.

References pbcpos, and pbcstack.

Referenced by c_prevword(), and while().

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

◆ pbcpop2()

static int pbcpop2 ( char  x)
static

Definition at line 3264 of file ael_lex.c.

References pbcpos2, and pbcstack2.

Referenced by while().

3265 {
3266  if ( ( x == ')' && pbcstack2[pbcpos2-1] == '(' )
3267  || ( x == ']' && pbcstack2[pbcpos2-1] == '[' )
3268  || ( x == '}' && pbcstack2[pbcpos2-1] == '{' )) {
3269  pbcpos2--;
3270  return 0;
3271  }
3272  return 1; /* error */
3273 }
static int pbcpos2
Definition: ael_lex.c:868
static char pbcstack2[400]
Definition: ael_lex.c:867

◆ pbcpop3()

static int pbcpop3 ( char  x)
static

Definition at line 3280 of file ael_lex.c.

References pbcpos3, and pbcstack3.

Referenced by while().

3281 {
3282  if ( ( x == ')' && pbcstack3[pbcpos3-1] == '(' )
3283  || ( x == ']' && pbcstack3[pbcpos3-1] == '[' )
3284  || ( x == '}' && pbcstack3[pbcpos3-1] == '{' )) {
3285  pbcpos3--;
3286  return 0;
3287  }
3288  return 1; /* error */
3289 }
static char pbcstack3[400]
Definition: ael_lex.c:876
static int pbcpos3
Definition: ael_lex.c:877

◆ pbcpush()

static void pbcpush ( char  x)
static

Definition at line 3237 of file ael_lex.c.

References pbcpos, and pbcstack.

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

3238 {
3239  pbcstack[pbcpos++] = x;
3240 }
static char pbcstack[400]
Definition: ael_lex.c:858
static int pbcpos
Definition: ael_lex.c:859

◆ pbcpush2()

static void pbcpush2 ( char  x)
static

Definition at line 3259 of file ael_lex.c.

References pbcpos2, and pbcstack2.

Referenced by while().

3260 {
3261  pbcstack2[pbcpos2++] = x;
3262 }
static int pbcpos2
Definition: ael_lex.c:868
static char pbcstack2[400]
Definition: ael_lex.c:867

◆ pbcpush3()

static void pbcpush3 ( char  x)
static

Definition at line 3275 of file ael_lex.c.

References pbcpos3, and pbcstack3.

Referenced by while().

3276 {
3277  pbcstack3[pbcpos3++] = x;
3278 }
static char pbcstack3[400]
Definition: ael_lex.c:876
static int pbcpos3
Definition: ael_lex.c:877

◆ pbcwhere()

static void pbcwhere ( const char *  text,
int *  line,
int *  col 
)
static

Definition at line 934 of file ael_lex.c.

References c.

935 {
936  int loc_line = *line;
937  int loc_col = *col;
938  char c;
939  while ( (c = *text++) ) {
940  if ( c == '\t' ) {
941  loc_col += 8 - (loc_col % 8);
942  } else if ( c == '\n' ) {
943  loc_line++;
944  loc_col = 1;
945  } else
946  loc_col++;
947  }
948  *line = loc_line;
949  *col = loc_col;
950 }
static struct test_val c
char * text
Definition: app_queue.c:1508

◆ reset_argcount()

void reset_argcount ( yyscan_t  yyscanner)

Definition at line 3349 of file ael_lex.c.

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

Referenced by reset_semicount(), and yyparse().

3350 {
3351  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3352  parencount = 0;
3353  pbcpos = 0;
3354  pbcpush('('); /* push '(' so the last pcbpop (parencount= -1) will succeed */
3355  c_prevword();
3356  BEGIN(argg);
3357 }
static int parencount
Definition: ael_lex.c:862
#define BEGIN
Definition: ael_lex.c:146
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define argg
Definition: ael_lex.c:975
static void pbcpush(char x)
Definition: ael_lex.c:3237
static int pbcpos
Definition: ael_lex.c:859
static int c_prevword(void)
Definition: ael_lex.c:3291

◆ reset_parencount()

void reset_parencount ( yyscan_t  yyscanner)

Definition at line 3330 of file ael_lex.c.

References BEGIN, c_prevword(), paren, parencount, pbcpos, pbcpush(), and reset_semicount().

Referenced by c_prevword(), and yyparse().

3331 {
3332  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3333  parencount = 0;
3334  pbcpos = 0;
3335  pbcpush('('); /* push '(' so the last pcbpop (parencount= -1) will succeed */
3336  c_prevword();
3337  BEGIN(paren);
3338 }
static int parencount
Definition: ael_lex.c:862
#define BEGIN
Definition: ael_lex.c:146
struct yyguts_t * yyg
Definition: ael_lex.c:1221
static void pbcpush(char x)
Definition: ael_lex.c:3237
static int pbcpos
Definition: ael_lex.c:859
static int c_prevword(void)
Definition: ael_lex.c:3291
#define paren
Definition: ael_lex.c:973

◆ reset_semicount()

void reset_semicount ( yyscan_t  yyscanner)

Definition at line 3341 of file ael_lex.c.

References BEGIN, pbcpos, reset_argcount(), and semic.

Referenced by reset_parencount(), and yyparse().

3342 {
3343  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3344  pbcpos = 0;
3345  BEGIN(semic);
3346 }
#define semic
Definition: ael_lex.c:974
#define BEGIN
Definition: ael_lex.c:146
struct yyguts_t * yyg
Definition: ael_lex.c:1221
static int pbcpos
Definition: ael_lex.c:859

◆ setup_filestack()

static void setup_filestack ( char *  fnamebuf,
int  fnamebuf_siz,
glob_t *  globbuf,
int  globpos,
yyscan_t  xscan,
int  create 
)
static

Definition at line 3415 of file ael_lex.c.

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

Referenced by while().

3416 {
3417  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3418  int error, i;
3419  FILE *in1;
3420  char fnamebuf[2048];
3421 
3422  if (globbuf && globbuf->gl_pathv && globbuf->gl_pathc > 0)
3423 #if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL)
3424  strncpy(fnamebuf, globbuf->gl_pathv[globpos], fnamebuf_siz);
3425 #else
3426  ast_copy_string(fnamebuf, globbuf->gl_pathv[globpos], fnamebuf_siz);
3427 #endif
3428  else {
3429  ast_log(LOG_ERROR,"Include file name not present!\n");
3430  return;
3431  }
3432  for (i=0; i<include_stack_index; i++) {
3433  if ( !strcmp(fnamebuf,include_stack[i].fname )) {
3434  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",
3435  my_file, my_lineno, my_col, fnamebuf);
3436  break;
3437  }
3438  }
3439  error = 1;
3440  if (i == include_stack_index)
3441  error = 0; /* we can use this file */
3442  if ( !error ) { /* valid file name */
3443  /* relative vs. absolute */
3444  if (fnamebuf[0] != '/')
3445  snprintf(fnamebuf2, fnamebuf_siz, "%s/%s", ast_config_AST_CONFIG_DIR, fnamebuf);
3446  else
3447 #if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL)
3448  strncpy(fnamebuf2, fnamebuf, fnamebuf_siz);
3449 #else
3450  ast_copy_string(fnamebuf2, fnamebuf, fnamebuf_siz);
3451 #endif
3452  in1 = fopen( fnamebuf2, "r" );
3453 
3454  if ( ! in1 ) {
3455  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);
3456  } else {
3457  char *buffer;
3458  struct stat stats;
3459  if (stat(fnamebuf2, &stats)) {
3460  ast_log(LOG_WARNING, "Failed to populate stats from file '%s'\n", fnamebuf2);
3461  }
3462  buffer = (char*)malloc(stats.st_size+1);
3463  if (fread(buffer, 1, stats.st_size, in1) != stats.st_size) {
3464  ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));
3465  }
3466  buffer[stats.st_size] = 0;
3467  ast_debug(1, " --Read in included file %s, %d chars\n",fnamebuf2, (int)stats.st_size);
3468  fclose(in1);
3469  if (include_stack[include_stack_index].fname) {
3470  free(include_stack[include_stack_index].fname);
3472  }
3476  if (my_file)
3477  free(my_file);
3478  my_file = strdup(fnamebuf2);
3479  if (create)
3481 
3483 
3485  if (create)
3486  include_stack_index++;
3487  ael_yy_switch_to_buffer(ael_yy_scan_string (buffer ,yyscanner),yyscanner);
3488  free(buffer);
3489  my_lineno = 1;
3490  my_col = 1;
3491  BEGIN(INITIAL);
3492  }
3493  }
3494 }
int lineno
Definition: ael_lex.c:911
YY_BUFFER_STATE bufstate
Definition: ael_lex.c:915
glob_t globbuf
Definition: ael_lex.c:913
#define BEGIN
Definition: ael_lex.c:146
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define LOG_WARNING
Definition: logger.h:274
char * my_file
Definition: ael_lex.c:888
#define INITIAL
Definition: ael_lex.c:972
static int my_col
Definition: ael_lex.c:887
static struct stackelement include_stack[MAX_INCLUDE_DEPTH]
Definition: ael_lex.c:918
void ael_yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
Definition: ael_lex.c:2527
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:283
YY_BUFFER_STATE ael_yy_scan_string(yyconst char *yy_str, yyscan_t yyscanner)
Definition: ael_lex.c:2823
char * malloc()
#define ast_debug(level,...)
Log a DEBUG message.
Definition: logger.h:452
#define ast_log
Definition: astobj2.c:42
void free()
static int include_stack_index
Definition: ael_lex.c:919
static int my_lineno
Definition: ael_lex.c:886
#define LOG_ERROR
Definition: logger.h:285
const char * ast_config_AST_CONFIG_DIR
Definition: options.c:151
int errno
char * fname
Definition: ael_lex.c:910
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
Definition: strings.h:401
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one...
Definition: strings.h:79
int globbuf_pos
Definition: ael_lex.c:914
int error(const char *format,...)
Definition: utils/frame.c:999
#define strdup(a)
Definition: astmm.h:165
#define yyleng
Definition: ael_lex.c:136

◆ while()

while ( )

Definition at line 1258 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, c, 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, GLOB_BRACE, GLOB_NOMAGIC, 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_col, my_file, my_lineno, NULL, paren, parencount, parencount2, parencount3, pbcpop(), pbcpop2(), pbcpop3(), pbcpos2, pbcpos3, pbcpush(), pbcpush2(), pbcpush3(), prev_word, RC, RP, SEMI, semic, setup_filestack(), STORE_LOC, STORE_POS, strdup, unput, 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.

1259  {
1260  yyg->yy_more_len = 0;
1261  if ( yyg->yy_more_flag )
1262  {
1263  yyg->yy_more_len = yyg->yy_c_buf_p - yyg->yytext_ptr;
1264  yyg->yy_more_flag = 0;
1265  }
1266  yy_cp = yyg->yy_c_buf_p;
1267 
1268  /* Support of yytext. */
1269  *yy_cp = yyg->yy_hold_char;
1270 
1271  /* yy_bp points to the position in yy_ch_buf of the start of
1272  * the current run.
1273  */
1274  yy_bp = yy_cp;
1275 
1276  yy_current_state = yyg->yy_start;
1277 yy_match:
1278  do
1279  {
1280  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1281  if ( yy_accept[yy_current_state] )
1282  {
1283  yyg->yy_last_accepting_state = yy_current_state;
1285  }
1286  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1287  {
1288  yy_current_state = (int) yy_def[yy_current_state];
1289  if ( yy_current_state >= 285 )
1290  yy_c = yy_meta[(unsigned int) yy_c];
1291  }
1292  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1293  ++yy_cp;
1294  }
1295  while ( yy_current_state != 284 );
1297  yy_current_state = yyg->yy_last_accepting_state;
1298 
1299 yy_find_action:
1300  yy_act = yy_accept[yy_current_state];
1301 
1303 
1304 do_action: /* This label is used only to access EOF actions. */
1305 
1306  switch ( yy_act )
1307  { /* beginning of action switch */
1308  case 0: /* must back up */
1309  /* undo the effects of YY_DO_BEFORE_ACTION */
1310  *yy_cp = yyg->yy_hold_char;
1312  yy_current_state = yyg->yy_last_accepting_state;
1313  goto yy_find_action;
1314 
1315 case 1:
1317 #line 219 "ael.flex"
1318 { STORE_POS; return LC;}
1319  YY_BREAK
1320 case 2:
1322 #line 220 "ael.flex"
1323 { STORE_POS; return RC;}
1324  YY_BREAK
1325 case 3:
1327 #line 221 "ael.flex"
1328 { STORE_POS; return LP;}
1329  YY_BREAK
1330 case 4:
1332 #line 222 "ael.flex"
1333 { STORE_POS; return RP;}
1334  YY_BREAK
1335 case 5:
1337 #line 223 "ael.flex"
1338 { STORE_POS; return SEMI;}
1339  YY_BREAK
1340 case 6:
1342 #line 224 "ael.flex"
1343 { STORE_POS; return EQ;}
1344  YY_BREAK
1345 case 7:
1347 #line 225 "ael.flex"
1348 { STORE_POS; return COMMA;}
1349  YY_BREAK
1350 case 8:
1352 #line 226 "ael.flex"
1353 { STORE_POS; return COLON;}
1354  YY_BREAK
1355 case 9:
1357 #line 227 "ael.flex"
1358 { STORE_POS; return AMPER;}
1359  YY_BREAK
1360 case 10:
1362 #line 228 "ael.flex"
1363 { STORE_POS; return BAR;}
1364  YY_BREAK
1365 case 11:
1367 #line 229 "ael.flex"
1368 { STORE_POS; return EXTENMARK;}
1369  YY_BREAK
1370 case 12:
1372 #line 230 "ael.flex"
1373 { STORE_POS; return AT;}
1374  YY_BREAK
1375 case 13:
1377 #line 231 "ael.flex"
1378 {/*comment*/}
1379  YY_BREAK
1380 case 14:
1382 #line 232 "ael.flex"
1383 { STORE_POS; return KW_CONTEXT;}
1384  YY_BREAK
1385 case 15:
1387 #line 233 "ael.flex"
1388 { STORE_POS; return KW_ABSTRACT;}
1389  YY_BREAK
1390 case 16:
1392 #line 234 "ael.flex"
1393 { STORE_POS; return KW_EXTEND;}
1394  YY_BREAK
1395 case 17:
1397 #line 235 "ael.flex"
1398 { STORE_POS; return KW_MACRO;};
1399  YY_BREAK
1400 case 18:
1402 #line 236 "ael.flex"
1403 { STORE_POS; return KW_GLOBALS;}
1404  YY_BREAK
1405 case 19:
1407 #line 237 "ael.flex"
1408 { STORE_POS; return KW_LOCAL;}
1409  YY_BREAK
1410 case 20:
1412 #line 238 "ael.flex"
1413 { STORE_POS; return KW_IGNOREPAT;}
1414  YY_BREAK
1415 case 21:
1417 #line 239 "ael.flex"
1418 { STORE_POS; return KW_SWITCH;}
1419  YY_BREAK
1420 case 22:
1422 #line 240 "ael.flex"
1423 { STORE_POS; return KW_IF;}
1424  YY_BREAK
1425 case 23:
1427 #line 241 "ael.flex"
1428 { STORE_POS; return KW_IFTIME;}
1429  YY_BREAK
1430 case 24:
1432 #line 242 "ael.flex"
1433 { STORE_POS; return KW_RANDOM;}
1434  YY_BREAK
1435 case 25:
1437 #line 243 "ael.flex"
1438 { STORE_POS; return KW_REGEXTEN;}
1439  YY_BREAK
1440 case 26:
1442 #line 244 "ael.flex"
1443 { STORE_POS; return KW_HINT;}
1444  YY_BREAK
1445 case 27:
1447 #line 245 "ael.flex"
1448 { STORE_POS; return KW_ELSE;}
1449  YY_BREAK
1450 case 28:
1452 #line 246 "ael.flex"
1453 { STORE_POS; return KW_GOTO;}
1454  YY_BREAK
1455 case 29:
1457 #line 247 "ael.flex"
1458 { STORE_POS; return KW_JUMP;}
1459  YY_BREAK
1460 case 30:
1462 #line 248 "ael.flex"
1463 { STORE_POS; return KW_RETURN;}
1464  YY_BREAK
1465 case 31:
1467 #line 249 "ael.flex"
1468 { STORE_POS; return KW_BREAK;}
1469  YY_BREAK
1470 case 32:
1472 #line 250 "ael.flex"
1473 { STORE_POS; return KW_CONTINUE;}
1474  YY_BREAK
1475 case 33:
1477 #line 251 "ael.flex"
1478 { STORE_POS; return KW_FOR;}
1479  YY_BREAK
1480 case 34:
1482 #line 252 "ael.flex"
1483 { STORE_POS; return KW_WHILE;}
1484  YY_BREAK
1485 case 35:
1487 #line 253 "ael.flex"
1488 { STORE_POS; return KW_CASE;}
1489  YY_BREAK
1490 case 36:
1492 #line 254 "ael.flex"
1493 { STORE_POS; return KW_DEFAULT;}
1494  YY_BREAK
1495 case 37:
1497 #line 255 "ael.flex"
1498 { STORE_POS; return KW_PATTERN;}
1499  YY_BREAK
1500 case 38:
1502 #line 256 "ael.flex"
1503 { STORE_POS; return KW_CATCH;}
1504  YY_BREAK
1505 case 39:
1507 #line 257 "ael.flex"
1508 { STORE_POS; return KW_SWITCHES;}
1509  YY_BREAK
1510 case 40:
1512 #line 258 "ael.flex"
1513 { STORE_POS; return KW_ESWITCHES;}
1514  YY_BREAK
1515 case 41:
1517 #line 259 "ael.flex"
1518 { STORE_POS; return KW_INCLUDES;}
1519  YY_BREAK
1520 case 42:
1522 #line 260 "ael.flex"
1523 { BEGIN(comment); my_col += 2; }
1524  YY_BREAK
1525 case 43:
1527 #line 262 "ael.flex"
1528 { my_col += yyleng; }
1529  YY_BREAK
1530 case 44:
1531 /* rule 44 can match eol */
1533 #line 263 "ael.flex"
1534 { ++my_lineno; my_col=1;}
1535  YY_BREAK
1536 case 45:
1538 #line 264 "ael.flex"
1539 { my_col += yyleng; }
1540  YY_BREAK
1541 case 46:
1542 /* rule 46 can match eol */
1544 #line 265 "ael.flex"
1545 { ++my_lineno; my_col=1;}
1546  YY_BREAK
1547 case 47:
1549 #line 266 "ael.flex"
1550 { my_col += 2; BEGIN(INITIAL); } /* the nice thing about comments is that you know exactly what ends them */
1551  YY_BREAK
1552 case 48:
1553 /* rule 48 can match eol */
1555 #line 268 "ael.flex"
1556 { my_lineno++; my_col = 1; }
1557  YY_BREAK
1558 case 49:
1560 #line 269 "ael.flex"
1561 { my_col += yyleng; }
1562  YY_BREAK
1563 case 50:
1565 #line 270 "ael.flex"
1566 { my_col += (yyleng*8)-(my_col%8); }
1567  YY_BREAK
1568 case 51:
1570 #line 272 "ael.flex"
1571 {
1572  /* boy did I open a can of worms when I changed the lexical token "word".
1573  all the above keywords can be used as a beginning to a "word".-
1574  before, a "word" would match a longer sequence than the above
1575  keywords, and all would be well. But now "word" is a single char
1576  and feeds into a statemachine sort of sequence from there on. So...
1577  I added the {KEYWORD}? to the beginning of the word match sequence */
1578 
1579  if (!strcmp(yytext,"${")) {
1580  parencount2 = 0;
1581  pbcpos2 = 0;
1582  pbcpush2('{'); /* push '{' so the last pcbpop (parencount2 = -1) will succeed */
1583  BEGIN(curlystate);
1584  yymore();
1585  } else if (!strcmp(yytext,"$[")) {
1586  parencount3 = 0;
1587  pbcpos3 = 0;
1588  pbcpush3('['); /* push '[' so the last pcbpop (parencount3 = -1) will succeed */
1589  BEGIN(brackstate);
1590  yymore();
1591  } else {
1592  BEGIN(wordstate);
1593  yymore();
1594  }
1595  }
1596  YY_BREAK
1597 case 52:
1599 #line 298 "ael.flex"
1600 { yymore(); /* Keep going */ }
1601  YY_BREAK
1602 case 53:
1604 #line 299 "ael.flex"
1605 { yymore(); /* Keep going */ }
1606  YY_BREAK
1607 case 54:
1609 #line 300 "ael.flex"
1610 { yymore(); /* Keep Going */ }
1611  YY_BREAK
1612 case 55:
1614 #line 301 "ael.flex"
1615 { /* the beginning of a ${} construct. prepare and pop into curlystate */
1616  parencount2 = 0;
1617  pbcpos2 = 0;
1618  pbcpush2('{'); /* push '{' so the last pcbpop (parencount2 = -1) will succeed */
1619  BEGIN(curlystate);
1620  yymore();
1621  }
1622  YY_BREAK
1623 case 56:
1625 #line 308 "ael.flex"
1626 { /* the beginning of a $[] construct. prepare and pop into brackstate */
1627  parencount3 = 0;
1628  pbcpos3 = 0;
1629  pbcpush3('['); /* push '[' so the last pcbpop (parencount3 = -1) will succeed */
1630  BEGIN(brackstate);
1631  yymore();
1632  }
1633  YY_BREAK
1634 case 57:
1635 /* rule 57 can match eol */
1637 #line 315 "ael.flex"
1638 {
1639  /* a non-word constituent char, like a space, tab, curly, paren, etc */
1640  char c = yytext[yyleng-1];
1641  STORE_POS;
1642  yylval->str = malloc(yyleng);
1643  strncpy(yylval->str, yytext, yyleng);
1644  yylval->str[yyleng-1] = 0;
1645  unput(c); /* put this ending char back in the stream */
1646  BEGIN(0);
1647  return word;
1648  }
1649  YY_BREAK
1650 case 58:
1651 /* rule 58 can match eol */
1653 #line 328 "ael.flex"
1654 {
1655  if ( pbcpop2('}') ) { /* error */
1656  STORE_LOC;
1657  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
1658  BEGIN(0);
1659  yylval->str = malloc(yyleng+1);
1660  strncpy(yylval->str, yytext, yyleng);
1661  yylval->str[yyleng] = 0;
1662  return word;
1663  }
1664  parencount2--;
1665  if ( parencount2 >= 0) {
1666  yymore();
1667  } else {
1668  BEGIN(wordstate); /* Finished with the current ${} construct. Return to word gathering state */
1669  yymore();
1670  }
1671  }
1672  YY_BREAK
1673 case 59:
1674 /* rule 59 can match eol */
1676 #line 347 "ael.flex"
1677 {
1678  char c = yytext[yyleng-1];
1679  if (c == '{')
1680  parencount2++;
1681  pbcpush2(c);
1682  yymore();
1683  }
1684  YY_BREAK
1685 case 60:
1686 /* rule 60 can match eol */
1688 #line 355 "ael.flex"
1689 {
1690  char c = yytext[yyleng-1];
1691  if ( pbcpop2(c)) { /* error */
1692  STORE_LOC;
1693  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
1694  my_file, my_lineno, my_col, c);
1695  BEGIN(0);
1696  yylval->str = malloc(yyleng+1);
1697  strncpy(yylval->str, yytext, yyleng);
1698  yylval->str[yyleng] = 0;
1699  return word;
1700  }
1701  yymore();
1702  }
1703  YY_BREAK
1704 case 61:
1705 /* rule 61 can match eol */
1707 #line 371 "ael.flex"
1708 {
1709  if ( pbcpop3(']') ) { /* error */
1710  STORE_LOC;
1711  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
1712  BEGIN(0);
1713  yylval->str = malloc(yyleng+1);
1714  strncpy(yylval->str, yytext, yyleng);
1715  yylval->str[yyleng] = 0;
1716  return word;
1717  }
1718  parencount3--;
1719  if ( parencount3 >= 0) {
1720  yymore();
1721  } else {
1722  BEGIN(wordstate); /* Finished with the current ${} construct. Return to word gathering state */
1723  yymore();
1724  }
1725  }
1726  YY_BREAK
1727 case 62:
1728 /* rule 62 can match eol */
1730 #line 390 "ael.flex"
1731 {
1732  char c = yytext[yyleng-1];
1733  if (c == '[')
1734  parencount3++;
1735  pbcpush3(c);
1736  yymore();
1737  }
1738  YY_BREAK
1739 case 63:
1740 /* rule 63 can match eol */
1742 #line 398 "ael.flex"
1743 {
1744  char c = yytext[yyleng-1];
1745  if ( pbcpop3(c)) { /* error */
1746  STORE_LOC;
1747  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
1748  my_file, my_lineno, my_col, c);
1749  BEGIN(0);
1750  yylval->str = malloc(yyleng+1);
1751  strncpy(yylval->str, yytext, yyleng);
1752  yylval->str[yyleng] = 0;
1753  return word;
1754  }
1755  yymore();
1756  }
1757  YY_BREAK
1758 /*
1759  * context used for arguments of if_head, random_head, switch_head,
1760  * for (last statement), while (XXX why not iftime_head ?).
1761  * End with the matching parentheses.
1762  * A comma at the top level is valid here, unlike in argg where it
1763  * is an argument separator so it must be returned as a token.
1764  */
1765 case 64:
1766 /* rule 64 can match eol */
1768 #line 421 "ael.flex"
1769 {
1770  if ( pbcpop(')') ) { /* error */
1771  STORE_LOC;
1772  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
1773  BEGIN(0);
1774  yylval->str = malloc(yyleng+1);
1775  strncpy(yylval->str, yytext, yyleng);
1776  yylval->str[yyleng] = 0;
1777  prev_word = 0;
1778  return word;
1779  }
1780  parencount--;
1781  if ( parencount >= 0) {
1782  yymore();
1783  } else {
1784  STORE_LOC;
1785  yylval->str = malloc(yyleng);
1786  strncpy(yylval->str, yytext, yyleng);
1787  yylval->str[yyleng-1] = 0;
1788  unput(')');
1789  BEGIN(0);
1790  return word;
1791  }
1792  }
1793  YY_BREAK
1794 case 65:
1795 /* rule 65 can match eol */
1797 #line 446 "ael.flex"
1798 {
1799  char c = yytext[yyleng-1];
1800  if (c == '(')
1801  parencount++;
1802  pbcpush(c);
1803  yymore();
1804  }
1805  YY_BREAK
1806 case 66:
1807 /* rule 66 can match eol */
1809 #line 454 "ael.flex"
1810 {
1811  char c = yytext[yyleng-1];
1812  if ( pbcpop(c)) { /* error */
1813  STORE_LOC;
1814  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
1815  my_file, my_lineno, my_col, c);
1816  BEGIN(0);
1817  yylval->str = malloc(yyleng+1);
1818  strncpy(yylval->str, yytext, yyleng);
1819  yylval->str[yyleng] = 0;
1820  return word;
1821  }
1822  yymore();
1823  }
1824  YY_BREAK
1825 /*
1826  * handlers for arguments to a macro or application calls.
1827  * We enter this context when we find the initial '(' and
1828  * stay here until we close all matching parentheses,
1829  * and find the comma (argument separator) or the closing ')'
1830  * of the (external) call, which happens when parencount == 0
1831  * before the decrement.
1832  */
1833 case 67:
1834 /* rule 67 can match eol */
1836 #line 478 "ael.flex"
1837 {
1838  char c = yytext[yyleng-1];
1839  if (c == '(')
1840  parencount++;
1841  pbcpush(c);
1842  yymore();
1843  }
1844  YY_BREAK
1845 case 68:
1846 /* rule 68 can match eol */
1848 #line 486 "ael.flex"
1849 {
1850  if ( pbcpop(')') ) { /* error */
1851  STORE_LOC;
1852  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression!\n", my_file, my_lineno, my_col);
1853  BEGIN(0);
1854  yylval->str = malloc(yyleng+1);
1855  strncpy(yylval->str, yytext, yyleng);
1856  yylval->str[yyleng] = 0;
1857  return word;
1858  }
1859 
1860  parencount--;
1861  if( parencount >= 0){
1862  yymore();
1863  } else {
1864  STORE_LOC;
1865  BEGIN(0);
1866  if ( !strcmp(yytext, ")") )
1867  return RP;
1868  yylval->str = malloc(yyleng);
1869  strncpy(yylval->str, yytext, yyleng);
1870  yylval->str[yyleng-1] = '\0'; /* trim trailing ')' */
1871  unput(')');
1872  return word;
1873  }
1874  }
1875  YY_BREAK
1876 case 69:
1877 /* rule 69 can match eol */
1879 #line 513 "ael.flex"
1880 {
1881  if( parencount != 0) { /* ast_log(LOG_NOTICE,"Folding in a comma!\n"); */
1882  yymore();
1883  } else {
1884  STORE_LOC;
1885  if( !strcmp(yytext,"," ) )
1886  return COMMA;
1887  yylval->str = malloc(yyleng);
1888  strncpy(yylval->str, yytext, yyleng);
1889  yylval->str[yyleng-1] = '\0'; /* trim trailing ',' */
1890  unput(',');
1891  return word;
1892  }
1893  }
1894  YY_BREAK
1895 case 70:
1896 /* rule 70 can match eol */
1898 #line 528 "ael.flex"
1899 {
1900  char c = yytext[yyleng-1];
1901  if ( pbcpop(c) ) { /* error */
1902  STORE_LOC;
1903  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
1904  BEGIN(0);
1905  yylval->str = malloc(yyleng+1);
1906  strncpy(yylval->str, yytext, yyleng);
1907  yylval->str[yyleng] = '\0';
1908  return word;
1909  }
1910  yymore();
1911  }
1912  YY_BREAK
1913 /*
1914  * context used to find tokens in the right hand side of assignments,
1915  * or in the first and second operand of a 'for'. As above, match
1916  * commas and use ';' as a separator (hence return it as a separate token).
1917  */
1918 case 71:
1919 /* rule 71 can match eol */
1921 #line 547 "ael.flex"
1922 {
1923  char c = yytext[yyleng-1];
1924  yymore();
1925  pbcpush(c);
1926  }
1927  YY_BREAK
1928 case 72:
1929 /* rule 72 can match eol */
1931 #line 553 "ael.flex"
1932 {
1933  char c = yytext[yyleng-1];
1934  if ( pbcpop(c) ) { /* error */
1935  STORE_LOC;
1936  ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
1937  BEGIN(0);
1938  yylval->str = malloc(yyleng+1);
1939  strncpy(yylval->str, yytext, yyleng);
1940  yylval->str[yyleng] = '\0';
1941  return word;
1942  }
1943  yymore();
1944  }
1945  YY_BREAK
1946 case 73:
1947 /* rule 73 can match eol */
1949 #line 567 "ael.flex"
1950 {
1951  STORE_LOC;
1952  yylval->str = malloc(yyleng);
1953  strncpy(yylval->str, yytext, yyleng);
1954  yylval->str[yyleng-1] = '\0'; /* trim trailing ';' */
1955  unput(';');
1956  BEGIN(0);
1957  return word;
1958  }
1959  YY_BREAK
1960 case 74:
1961 /* rule 74 can match eol */
1963 #line 577 "ael.flex"
1964 {
1965  char fnamebuf[1024],*p1,*p2;
1966  int glob_ret;
1967  glob_t globbuf; /* the current globbuf */
1968  int globbuf_pos = -1; /* where we are in the current globbuf */
1969  globbuf.gl_offs = 0; /* initialize it to silence gcc */
1970 
1971  p1 = strchr(yytext,'"');
1972  p2 = strrchr(yytext,'"');
1974  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);
1975  } else if ( (int)(p2-p1) > sizeof(fnamebuf) - 1 ) {
1976  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);
1977  } else {
1978  strncpy(fnamebuf, p1+1, p2-p1-1);
1979  fnamebuf[p2-p1-1] = 0;
1980  if (fnamebuf[0] != '/') {
1981  char fnamebuf2[1024];
1982  snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf);
1983  ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf));
1984  }
1985 #ifdef SOLARIS
1986  glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf);
1987 #else
1988  glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf);
1989 #endif
1990  if (glob_ret == GLOB_NOSPACE) {
1992  "Glob Expansion of pattern '%s' failed: Not enough memory\n", fnamebuf);
1993  } else if (glob_ret == GLOB_ABORTED) {
1995  "Glob Expansion of pattern '%s' failed: Read error\n", fnamebuf);
1996  } else if (glob_ret == GLOB_NOMATCH) {
1998  "Glob Expansion of pattern '%s' failed: No matches!\n", fnamebuf);
1999  } else {
2000  globbuf_pos = 0;
2001  }
2002  }
2003  if (globbuf_pos > -1) {
2004  setup_filestack(fnamebuf, sizeof(fnamebuf), &globbuf, 0, yyscanner, 1);
2005  }
2006  }
2007  YY_BREAK
2008 case YY_STATE_EOF(INITIAL):
2009 case YY_STATE_EOF(paren):
2010 case YY_STATE_EOF(semic):
2011 case YY_STATE_EOF(argg):
2012 case YY_STATE_EOF(comment):
2013 case YY_STATE_EOF(curlystate):
2014 case YY_STATE_EOF(wordstate):
2015 case YY_STATE_EOF(brackstate):
2016 #line 622 "ael.flex"
2017 {
2018  char fnamebuf[2048];
2019  if (include_stack_index > 0 && include_stack[include_stack_index-1].globbuf_pos < include_stack[include_stack_index-1].globbuf.gl_pathc-1) {
2022  setup_filestack(fnamebuf, sizeof(fnamebuf), &include_stack[include_stack_index-1].globbuf, include_stack[include_stack_index-1].globbuf_pos, yyscanner, 0);
2023  /* finish this */
2024 
2025  } else {
2026  if (include_stack[include_stack_index].fname) {
2029  }
2030  if (my_file) {
2031  free(my_file);
2032  my_file = 0;
2033  }
2034  if ( --include_stack_index < 0 ) {
2035  yyterminate();
2036  } else {
2037  globfree(&include_stack[include_stack_index].globbuf);
2039 
2045  }
2046  }
2047  }
2048  YY_BREAK
2049 case 75:
2050 /* rule 75 can match eol */
2052 #line 654 "ael.flex"
2053 { /* default rule */ ast_log(LOG_ERROR,"Unhandled char(s): %s\n", yytext); }
2054  YY_BREAK
2055 case 76:
2057 #line 656 "ael.flex"
2058 YY_FATAL_ERROR( "flex scanner jammed" );
2059  YY_BREAK
2060 #line 2053 "ael_lex.c"
2061 
2062  case YY_END_OF_BUFFER:
2063  {
2064  /* Amount of text matched not including the EOB char. */
2065  int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
2066 
2067  /* Undo the effects of YY_DO_BEFORE_ACTION. */
2068  *yy_cp = yyg->yy_hold_char;
2070 
2071  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2072  {
2073  /* We're scanning a new file or input source. It's
2074  * possible that this happened because the user
2075  * just pointed yyin at a new source and called
2076  * ael_yylex(). If so, then we have to assure
2077  * consistency between YY_CURRENT_BUFFER and our
2078  * globals. Here is the right place to do so, because
2079  * this is the first action (other than possibly a
2080  * back-up) that will match for the new input source.
2081  */
2082  yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2083  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2084  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2085  }
2086 
2087  /* Note that here we test for yy_c_buf_p "<=" to the position
2088  * of the first EOB in the buffer, since yy_c_buf_p will
2089  * already have been incremented past the NUL character
2090  * (since all states make transitions on EOB to the
2091  * end-of-buffer state). Contrast this with the test
2092  * in input().
2093  */
2094  if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2095  { /* This was really a NUL. */
2096  yy_state_type yy_next_state;
2097 
2098  yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
2099 
2100  yy_current_state = yy_get_previous_state( yyscanner );
2101 
2102  /* Okay, we're now positioned to make the NUL
2103  * transition. We couldn't have
2104  * yy_get_previous_state() go ahead and do it
2105  * for us because it doesn't know how to deal
2106  * with the possibility of jamming (and we don't
2107  * want to build jamming into it because then it
2108  * will run more slowly).
2109  */
2110 
2111  yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
2112 
2113  yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2114 
2115  if ( yy_next_state )
2116  {
2117  /* Consume the NUL. */
2118  yy_cp = ++yyg->yy_c_buf_p;
2119  yy_current_state = yy_next_state;
2120  goto yy_match;
2121  }
2122 
2123  else
2124  {
2126  yy_current_state = yyg->yy_last_accepting_state;
2127  goto yy_find_action;
2128  }
2129  }
2130 
2131  else switch ( yy_get_next_buffer( yyscanner ) )
2132  {
2133  case EOB_ACT_END_OF_FILE:
2134  {
2136 
2137  if ( ael_yywrap(yyscanner ) )
2138  {
2139  /* Note: because we've taken care in
2140  * yy_get_next_buffer() to have set up
2141  * yytext, we can now set up
2142  * yy_c_buf_p so that if some total
2143  * hoser (like flex itself) wants to
2144  * call the scanner after we return the
2145  * YY_NULL, it'll still work - another
2146  * YY_NULL will get returned.
2147  */
2148  yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
2149 
2151  goto do_action;
2152  }
2153 
2154  else
2155  {
2157  YY_NEW_FILE;
2158  }
2159  break;
2160  }
2161 
2162  case EOB_ACT_CONTINUE_SCAN:
2163  yyg->yy_c_buf_p =
2164  yyg->yytext_ptr + yy_amount_of_matched_text;
2165 
2166  yy_current_state = yy_get_previous_state( yyscanner );
2167 
2168  yy_cp = yyg->yy_c_buf_p;
2169  yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2170  goto yy_match;
2171 
2172  case EOB_ACT_LAST_MATCH:
2173  yyg->yy_c_buf_p =
2174  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
2175 
2176  yy_current_state = yy_get_previous_state( yyscanner );
2177 
2178  yy_cp = yyg->yy_c_buf_p;
2179  yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2180  goto yy_find_action;
2181  }
2182  break;
2183  }
2184 
2185  default:
2187  "fatal flex scanner internal error--no action found" );
2188  } /* end of action switch */
2189  } /* end of scanning one token */
Definition: ael.tab.c:167
Definition: ael.tab.c:165
static int parencount
Definition: ael_lex.c:862
#define YY_RULE_SETUP
Definition: ael_lex.c:1211
#define YY_SC_TO_UI(c)
Definition: ael_lex.c:123
char yy_hold_char
Definition: ast_expr2f.c:641
static yyconst flex_int16_t yy_chk[1073]
Definition: ael_lex.c:648
static int pbcpop(char x)
Definition: ael_lex.c:3248
int lineno
Definition: ael_lex.c:911
#define YY_MORE_ADJ
Definition: ael_lex.c:775
Definition: ael.tab.c:168
#define STORE_POS
Definition: ael_lex.c:952
char * yy_c_buf_p
Definition: ast_expr2f.c:644
#define semic
Definition: ael_lex.c:974
Definition: ael.tab.c:170
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:290
Definition: ael.tab.c:166
Definition: ael.tab.c:173
#define BEGIN
Definition: ael_lex.c:146
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define LOG_WARNING
Definition: logger.h:274
Definition: ael.tab.c:171
static yy_state_type yy_get_previous_state(yyscan_t yyscanner)
Definition: ael_lex.c:2334
char * my_file
Definition: ael_lex.c:888
#define EOB_ACT_CONTINUE_SCAN
Definition: ael_lex.c:185
#define STORE_LOC
Definition: ael_lex.c:959
#define EOB_ACT_LAST_MATCH
Definition: ael_lex.c:187
#define ael_yywrap(n)
Definition: ael_lex.c:340
#define INITIAL
Definition: ael_lex.c:972
static int my_col
Definition: ael_lex.c:887
static void pbcpush2(char x)
Definition: ael_lex.c:3259
static struct stackelement include_stack[MAX_INCLUDE_DEPTH]
Definition: ael_lex.c:918
static struct test_val c
#define YY_RESTORE_YY_MORE_OFFSET
Definition: ael_lex.c:776
#define NULL
Definition: resample.c:96
void ael_yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
Definition: ael_lex.c:2527
static int parencount2
Definition: ael_lex.c:871
#define YY_END_OF_BUFFER
Definition: ael_lex.c:366
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:283
static yyconst flex_int16_t yy_nxt[1073]
Definition: ael_lex.c:526
#define YY_NEW_FILE
Definition: ael_lex.c:159
static yyconst flex_int16_t yy_def[304]
Definition: ael_lex.c:488
#define YY_START
Definition: ael_lex.c:152
#define yytext
Definition: ael_lex.c:137
char * malloc()
register char * yy_bp
Definition: ael_lex.c:1219
int yy_start
Definition: ast_expr2f.c:646
Definition: ael.tab.c:172
#define ast_log
Definition: astobj2.c:42
#define unput(c)
Definition: ael_lex.c:205
static void setup_filestack(char *fnamebuf, int fnamebuf_siz, glob_t *globbuf, int globpos, yyscan_t xscan, int create)
Definition: ael_lex.c:3415
void free()
#define YY_STATE_EOF(state)
Definition: ael_lex.c:156
#define yyterminate()
Definition: ael_lex.c:1171
static yyconst flex_int32_t yy_meta[50]
Definition: ael_lex.c:441
#define argg
Definition: ael_lex.c:975
#define YY_BUFFER_NORMAL
Definition: ael_lex.c:261
#define EOB_ACT_END_OF_FILE
Definition: ael_lex.c:186
Definition: ael.tab.c:169
static int include_stack_index
Definition: ael_lex.c:919
register int yy_act
Definition: ael_lex.c:1220
static int pbcpop3(char x)
Definition: ael_lex.c:3280
static void pbcpush(char x)
Definition: ael_lex.c:3237
static int pbcpop2(char x)
Definition: ael_lex.c:3264
#define GLOB_BRACE
Definition: ael_lex.c:842
#define YY_BUFFER_NEW
Definition: ael_lex.c:260
register char * yy_cp
Definition: ael_lex.c:1219
int yy_did_buffer_switch_on_eof
Definition: ast_expr2f.c:647
void ael_yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner)
Definition: ael_lex.c:2602
int yy_state_type
Definition: ast_expr2f.c:345
static int parencount3
Definition: ael_lex.c:880
static int my_lineno
Definition: ael_lex.c:886
int yy_more_flag
Definition: ast_expr2f.c:658
#define LOG_ERROR
Definition: logger.h:285
Definition: ael.tab.c:164
static int pbcpos2
Definition: ael_lex.c:868
const char * ast_config_AST_CONFIG_DIR
Definition: options.c:151
static yyconst flex_int16_t yy_base[304]
Definition: ael_lex.c:450
int yy_n_chars
Definition: ast_expr2f.c:642
#define yylval
Definition: ael_lex.c:1035
#define comment
Definition: ael_lex.c:976
char * yy_last_accepting_cpos
Definition: ast_expr2f.c:652
#define yyin
Definition: ael_lex.c:133
#define brackstate
Definition: ael_lex.c:979
#define GLOB_NOMAGIC
Definition: ael_lex.c:845
static int pbcpos3
Definition: ael_lex.c:877
#define GLOB_ABORTED
Definition: ael_lex.c:839
char * prev_word
Definition: ael_lex.c:889
static int yy_get_next_buffer(yyscan_t yyscanner)
Definition: ael_lex.c:2199
unsigned char YY_CHAR
Definition: ast_expr2f.c:343
static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner)
Definition: ael_lex.c:2367
char * fname
Definition: ael_lex.c:910
#define wordstate
Definition: ael_lex.c:978
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
Definition: strings.h:401
#define MAX_INCLUDE_DEPTH
Definition: ael_lex.c:891
static yyconst flex_int16_t yy_accept[285]
Definition: ael_lex.c:374
int globbuf_pos
Definition: ael_lex.c:914
#define YY_BREAK
Definition: ael_lex.c:1208
int yy_more_len
Definition: ast_expr2f.c:659
Definition: ael.tab.c:178
#define YY_DO_BEFORE_ACTION
Definition: ael_lex.c:357
#define yymore()
Definition: ael_lex.c:774
#define strdup(a)
Definition: astmm.h:165
yy_state_type yy_last_accepting_state
Definition: ast_expr2f.c:651
Definition: ael.tab.c:163
#define yyleng
Definition: ael_lex.c:136
#define paren
Definition: ael_lex.c:973
#define YY_FATAL_ERROR(msg)
Definition: ael_lex.c:1181
static void pbcpush3(char x)
Definition: ael_lex.c:3275
static yyconst flex_int32_t yy_ec[256]
Definition: ael_lex.c:409
#define curlystate
Definition: ael_lex.c:977
short word

◆ yy_fatal_error() [1/2]

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

◆ yy_fatal_error() [2/2]

static void yy_fatal_error ( yyconst char *  msg,
yyscan_t  yyscanner 
)
static

Definition at line 2870 of file ael_lex.c.

References YY_EXIT_FAILURE.

2871 {
2872  (void) fprintf( stderr, "%s\n", msg );
2873  exit( YY_EXIT_FAILURE );
2874 }
#define YY_EXIT_FAILURE
Definition: ael_lex.c:2867

◆ yy_get_next_buffer()

static int yy_get_next_buffer ( yyscan_t  yyscanner)
static

Definition at line 2199 of file ael_lex.c.

References ael_yyrealloc(), ael_yyrestart(), b, 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().

2200 {
2201  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2202  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2203  register char *source = yyg->yytext_ptr;
2204  register int number_to_move, i;
2205  int ret_val;
2206 
2207  if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
2209  "fatal flex scanner internal error--end of buffer missed" );
2210 
2211  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2212  { /* Don't try to fill the buffer, so this is an EOF. */
2213  if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
2214  {
2215  /* We matched a single character, the EOB, so
2216  * treat this as a final EOF.
2217  */
2218  return EOB_ACT_END_OF_FILE;
2219  }
2220 
2221  else
2222  {
2223  /* We matched some text prior to the EOB, first
2224  * process it.
2225  */
2226  return EOB_ACT_LAST_MATCH;
2227  }
2228  }
2229 
2230  /* Try to read more data. */
2231 
2232  /* First move last chars to start of buffer. */
2233  number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
2234 
2235  for ( i = 0; i < number_to_move; ++i )
2236  *(dest++) = *(source++);
2237 
2238  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2239  /* don't do the read, it's not guaranteed to return an EOF,
2240  * just force an EOF
2241  */
2242  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
2243 
2244  else
2245  {
2246  int num_to_read =
2247  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2248 
2249  while ( num_to_read <= 0 )
2250  { /* Not enough room in the buffer - grow it. */
2251 
2252  /* just a shorter name for the current buffer */
2254 
2255  int yy_c_buf_p_offset =
2256  (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
2257 
2258  if ( b->yy_is_our_buffer )
2259  {
2260  int new_size = b->yy_buf_size * 2;
2261 
2262  if ( new_size <= 0 )
2263  b->yy_buf_size += b->yy_buf_size / 8;
2264  else
2265  b->yy_buf_size *= 2;
2266 
2267  b->yy_ch_buf = (char *)
2268  /* Include room in for 2 EOB chars. */
2269  ael_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
2270  }
2271  else
2272  /* Can't grow it, we don't own it. */
2273  b->yy_ch_buf = 0;
2274 
2275  if ( ! b->yy_ch_buf )
2277  "fatal error - scanner input buffer overflow" );
2278 
2279  yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2280 
2281  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2282  number_to_move - 1;
2283 
2284  }
2285 
2286  if ( num_to_read > YY_READ_BUF_SIZE )
2287  num_to_read = YY_READ_BUF_SIZE;
2288 
2289  /* Read in more data. */
2290  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2291  yyg->yy_n_chars, (size_t) num_to_read );
2292 
2293  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2294  }
2295 
2296  if ( yyg->yy_n_chars == 0 )
2297  {
2298  if ( number_to_move == YY_MORE_ADJ )
2299  {
2300  ret_val = EOB_ACT_END_OF_FILE;
2301  ael_yyrestart(yyin ,yyscanner);
2302  }
2303 
2304  else
2305  {
2306  ret_val = EOB_ACT_LAST_MATCH;
2307  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2309  }
2310  }
2311 
2312  else
2313  ret_val = EOB_ACT_CONTINUE_SCAN;
2314 
2315  if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2316  /* Extend the array by 50%, plus the number we really need. */
2317  yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
2318  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) ael_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
2319  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2320  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2321  }
2322 
2323  yyg->yy_n_chars += number_to_move;
2326 
2327  yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2328 
2329  return ret_val;
2330 }
#define YY_MORE_ADJ
Definition: ael_lex.c:775
void ael_yyrestart(FILE *input_file, yyscan_t yyscanner)
Definition: ael_lex.c:2509
char * yy_c_buf_p
Definition: ast_expr2f.c:644
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:290
#define YY_END_OF_BUFFER_CHAR
Definition: ael_lex.c:161
struct yyguts_t * yyg
Definition: ael_lex.c:1221
char * yy_ch_buf
Definition: ast_expr2f.c:218
void * ael_yyrealloc(void *, yy_size_t, yyscan_t yyscanner)
Definition: ael_lex.c:3219
#define EOB_ACT_CONTINUE_SCAN
Definition: ael_lex.c:185
#define EOB_ACT_LAST_MATCH
Definition: ael_lex.c:187
yy_size_t yy_buf_size
Definition: ast_expr2f.c:224
#define YY_CURRENT_BUFFER
Definition: ael_lex.c:283
#define EOB_ACT_END_OF_FILE
Definition: ael_lex.c:186
#define YY_INPUT(buf, result, max_size)
Definition: ael_lex.c:1134
int yy_n_chars
Definition: ast_expr2f.c:642
#define yyin
Definition: ael_lex.c:133
#define YY_READ_BUF_SIZE
Definition: ael_lex.c:1118
#define YY_BUFFER_EOF_PENDING
Definition: ael_lex.c:272
static struct test_val b
size_t yy_size_t
Definition: ast_expr2f.c:209
#define YY_FATAL_ERROR(msg)
Definition: ael_lex.c:1181

◆ yy_get_previous_state()

static yy_state_type yy_get_previous_state ( yyscan_t  yyscanner)
static

Definition at line 2334 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().

2335 {
2336  register yy_state_type yy_current_state;
2337  register char *yy_cp;
2338  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2339 
2340  yy_current_state = yyg->yy_start;
2341 
2342  for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
2343  {
2344  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2345  if ( yy_accept[yy_current_state] )
2346  {
2347  yyg->yy_last_accepting_state = yy_current_state;
2349  }
2350  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2351  {
2352  yy_current_state = (int) yy_def[yy_current_state];
2353  if ( yy_current_state >= 285 )
2354  yy_c = yy_meta[(unsigned int) yy_c];
2355  }
2356  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2357  }
2358 
2359  return yy_current_state;
2360 }
#define YY_SC_TO_UI(c)
Definition: ael_lex.c:123
static yyconst flex_int16_t yy_chk[1073]
Definition: ael_lex.c:648
#define YY_MORE_ADJ
Definition: ael_lex.c:775
char * yy_c_buf_p
Definition: ast_expr2f.c:644
struct yyguts_t * yyg
Definition: ael_lex.c:1221
static yyconst flex_int16_t yy_nxt[1073]
Definition: ael_lex.c:526
static yyconst flex_int16_t yy_def[304]
Definition: ael_lex.c:488
int yy_start
Definition: ast_expr2f.c:646
static yyconst flex_int32_t yy_meta[50]
Definition: ael_lex.c:441
register char * yy_cp
Definition: ael_lex.c:1219
int yy_state_type
Definition: ast_expr2f.c:345
static yyconst flex_int16_t yy_base[304]
Definition: ael_lex.c:450
char * yy_last_accepting_cpos
Definition: ast_expr2f.c:652
unsigned char YY_CHAR
Definition: ast_expr2f.c:343
static yyconst flex_int16_t yy_accept[285]
Definition: ael_lex.c:374
yy_state_type yy_last_accepting_state
Definition: ast_expr2f.c:651
static yyconst flex_int32_t yy_ec[256]
Definition: ael_lex.c:409

◆ yy_init_globals()

static int yy_init_globals ( yyscan_t  yyscanner)
static

Definition at line 3127 of file ael_lex.c.

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

3128 {
3129  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3130  /* Initialization is the same as for the non-reentrant scanner.
3131  * This function is called from ael_yylex_destroy(), so don't allocate here.
3132  */
3133 
3134  yyg->yy_buffer_stack = 0;
3135  yyg->yy_buffer_stack_top = 0;
3136  yyg->yy_buffer_stack_max = 0;
3137  yyg->yy_c_buf_p = (char *) 0;
3138  yyg->yy_init = 0;
3139  yyg->yy_start = 0;
3140 
3141  yyg->yy_start_stack_ptr = 0;
3142  yyg->yy_start_stack_depth = 0;
3143  yyg->yy_start_stack = NULL;
3144 
3145 /* Defined in main.c */
3146 #ifdef YY_STDINIT
3147  yyin = stdin;
3148  yyout = stdout;
3149 #else
3150  yyin = (FILE *) 0;
3151  yyout = (FILE *) 0;
3152 #endif
3153 
3154  /* For future reference: Set errno on error, since we are called by
3155  * ael_yylex_init()
3156  */
3157  return 0;
3158 }
char * yy_c_buf_p
Definition: ast_expr2f.c:644
struct yyguts_t * yyg
Definition: ael_lex.c:1221
#define NULL
Definition: resample.c:96
YY_BUFFER_STATE * yy_buffer_stack
Definition: ast_expr2f.c:640
int yy_start_stack_depth
Definition: ast_expr2f.c:649
int yy_init
Definition: ast_expr2f.c:645
int * yy_start_stack
Definition: ast_expr2f.c:650
int yy_start
Definition: ast_expr2f.c:646
int yy_start_stack_ptr
Definition: ast_expr2f.c:648
#define yyin
Definition: ael_lex.c:133
size_t yy_buffer_stack_max
Definition: ast_expr2f.c:639
size_t yy_buffer_stack_top
Definition: ast_expr2f.c:638
#define yyout
Definition: ael_lex.c:134

◆ yy_try_NUL_trans()

static yy_state_type yy_try_NUL_trans ( yy_state_type  current_state,
yyscan_t  yyscanner 
)
static

Definition at line 2367 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().

2368 {
2369  register int yy_is_jam;
2370  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
2371  register char *yy_cp = yyg->yy_c_buf_p;
2372 
2373  register YY_CHAR yy_c = 1;
2374  if ( yy_accept[yy_current_state] )
2375  {
2376  yyg->yy_last_accepting_state = yy_current_state;
2378  }
2379  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2380  {
2381  yy_current_state = (int) yy_def[yy_current_state];
2382  if ( yy_current_state >= 285 )
2383  yy_c = yy_meta[(unsigned int) yy_c];
2384  }
2385  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2386  yy_is_jam = (yy_current_state == 284);
2387 
2388  return yy_is_jam ? 0 : yy_current_state;
2389 }
static yyconst flex_int16_t yy_chk[1073]
Definition: ael_lex.c:648
char * yy_c_buf_p
Definition: ast_expr2f.c:644
struct yyguts_t * yyg
Definition: ael_lex.c:1221
static yyconst flex_int16_t yy_nxt[1073]
Definition: ael_lex.c:526
static yyconst flex_int16_t yy_def[304]
Definition: ael_lex.c:488
static yyconst flex_int32_t yy_meta[50]
Definition: ael_lex.c:441
register char * yy_cp
Definition: ael_lex.c:1219
static yyconst flex_int16_t yy_base[304]
Definition: ael_lex.c:450
char * yy_last_accepting_cpos
Definition: ast_expr2f.c:652
unsigned char YY_CHAR
Definition: ast_expr2f.c:343
static yyconst flex_int16_t yy_accept[285]
Definition: ael_lex.c:374
yy_state_type yy_last_accepting_state
Definition: ast_expr2f.c:651

◆ yyunput() [1/2]

static void yyunput ( int  c,
char *  buf_ptr,
yyscan_t  yyscanner 
)
static

◆ yyunput() [2/2]

static void yyunput ( int  c,
register char *  yy_bp,
yyscan_t  yyscanner 
)
static

Definition at line 2391 of file ael_lex.c.

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

2392 {
2393  register char *yy_cp;
2394  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2395 
2396  yy_cp = yyg->yy_c_buf_p;
2397 
2398  /* undo effects of setting up yytext */
2399  *yy_cp = yyg->yy_hold_char;
2400 
2401  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2402  { /* need to shift things up to make room */
2403  /* +2 for EOB chars. */
2404  register int number_to_move = yyg->yy_n_chars + 2;
2405  register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2406  YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2407  register char *source =
2408  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2409 
2410  while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2411  *--dest = *--source;
2412 
2413  yy_cp += (int) (dest - source);
2414  yy_bp += (int) (dest - source);
2415  YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2416  yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2417 
2418  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2419  YY_FATAL_ERROR( "flex scanner push-back overflow" );
2420  }
2421 
2422  *--yy_cp = (char) c;
2423 
2424  yyg->yytext_ptr = yy_bp;
2425  yyg->yy_hold_char = *yy_cp;
2426  yyg->yy_c_buf_p = yy_cp;
2427 }
char yy_hold_char
Definition: ast_expr2f.c:641
char * yy_c_buf_p
Definition: ast_expr2f.c:644
#define YY_CURRENT_BUFFER_LVALUE
Definition: ael_lex.c:290
struct yyguts_t * yyg
Definition: ael_lex.c:1221
static struct test_val c
register char * yy_bp
Definition: ael_lex.c:1219
register char * yy_cp
Definition: ael_lex.c:1219
int yy_n_chars
Definition: ast_expr2f.c:642
#define YY_FATAL_ERROR(msg)
Definition: ael_lex.c:1181

Variable Documentation

◆ include_stack

struct stackelement include_stack[MAX_INCLUDE_DEPTH]
static

Definition at line 918 of file ael_lex.c.

Referenced by setup_filestack(), and while().

◆ include_stack_index

int include_stack_index = 0
static

Definition at line 919 of file ael_lex.c.

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

◆ my_col

int my_col = 1
static

Definition at line 887 of file ael_lex.c.

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

◆ my_file

char* my_file = 0

Definition at line 888 of file ael_lex.c.

Referenced by ael2_parse(), npval(), setup_filestack(), while(), yyerror(), and yyparse().

◆ my_lineno

int my_lineno = 1
static

Definition at line 886 of file ael_lex.c.

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

◆ parencount

int parencount = 0
static

Definition at line 862 of file ael_lex.c.

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

◆ parencount2

int parencount2 = 0
static

Definition at line 871 of file ael_lex.c.

Referenced by while().

◆ parencount3

int parencount3 = 0
static

Definition at line 880 of file ael_lex.c.

Referenced by while().

◆ pbcpos

int pbcpos = 0
static

Definition at line 859 of file ael_lex.c.

Referenced by pbcpop(), pbcpush(), reset_argcount(), reset_parencount(), and reset_semicount().

◆ pbcpos2

int pbcpos2 = 0
static

Definition at line 868 of file ael_lex.c.

Referenced by pbcpop2(), pbcpush2(), and while().

◆ pbcpos3

int pbcpos3 = 0
static

Definition at line 877 of file ael_lex.c.

Referenced by pbcpop3(), pbcpush3(), and while().

◆ pbcstack

char pbcstack[400]
static

Definition at line 858 of file ael_lex.c.

Referenced by pbcpop(), and pbcpush().

◆ pbcstack2

char pbcstack2[400]
static

Definition at line 867 of file ael_lex.c.

Referenced by pbcpop2(), and pbcpush2().

◆ pbcstack3

char pbcstack3[400]
static

Definition at line 876 of file ael_lex.c.

Referenced by pbcpop3(), and pbcpush3().

◆ prev_word

char* prev_word

Definition at line 889 of file ael_lex.c.

Referenced by ael2_parse(), c_prevword(), while(), yydestruct(), and yyparse().

◆ yy_accept

yyconst flex_int16_t yy_accept[285]
static

Definition at line 374 of file ael_lex.c.

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

◆ yy_act

register int yy_act

Definition at line 1220 of file ael_lex.c.

◆ yy_base

yyconst flex_int16_t yy_base[304]
static

Definition at line 450 of file ael_lex.c.

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

◆ yy_bp

register char * yy_bp

Definition at line 1219 of file ael_lex.c.

Referenced by yyunput().

◆ yy_chk

yyconst flex_int16_t yy_chk[1073]
static

Definition at line 648 of file ael_lex.c.

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

◆ yy_cp

register char* yy_cp

Definition at line 1219 of file ael_lex.c.

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

◆ YY_DECL

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

The main scanner function which does all the work.

Definition at line 1217 of file ael_lex.c.

◆ yy_def

yyconst flex_int16_t yy_def[304]
static

Definition at line 488 of file ael_lex.c.

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

◆ yy_ec

yyconst flex_int32_t yy_ec[256]
static

Definition at line 409 of file ael_lex.c.

Referenced by while(), and yy_get_previous_state().

◆ yy_meta

yyconst flex_int32_t yy_meta[50]
static

Definition at line 441 of file ael_lex.c.

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

◆ yy_nxt

yyconst flex_int16_t yy_nxt[1073]
static

Definition at line 526 of file ael_lex.c.

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

◆ yyg

struct yyguts_t* yyg = (struct yyguts_t*)yyscanner

Definition at line 1221 of file ael_lex.c.

◆ yylloc

yylloc = yylloc_param

Definition at line 1230 of file ael_lex.c.

◆ yylval

yylval = yylval_param

Definition at line 1228 of file ael_lex.c.