Asterisk - The Open Source Telephony Project  21.4.1
Data Structures | Macros | Typedefs | Functions | Variables
aelparse.c File Reference

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

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

Go to the source code of this file.

Data Structures

struct  stackelement
 
struct  yy_buffer_state
 
struct  yy_trans_info
 
struct  yyguts_t
 

Macros

#define ael_yywrap(n)   1
 
#define argg   3
 
#define ASTMM_LIBC   ASTMM_REDIRECT
 
#define BEGIN   yyg->yy_start = 1 + 2 *
 
#define brackstate   7
 
#define comment   4
 
#define curlystate   5
 
#define ECHO   fwrite( yytext, yyleng, 1, yyout )
 
#define EOB_ACT_CONTINUE_SCAN   0
 
#define EOB_ACT_END_OF_FILE   1
 
#define EOB_ACT_LAST_MATCH   2
 
#define FLEX_BETA
 
#define FLEX_SCANNER
 
#define 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 aelparse.c.

Macro Definition Documentation

#define YY_CURRENT_BUFFER
Value:
: NULL)
YY_BUFFER_STATE * yy_buffer_stack
size_t yy_buffer_stack_top

Definition at line 274 of file aelparse.c.

#define YY_DECL
Value:
int ael_yylex \
(YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)

Definition at line 1179 of file aelparse.c.

Function Documentation

YY_BUFFER_STATE ael_yy_create_buffer ( FILE *  file,
int  size,
yyscan_t  yyscanner 
)

Allocate and initialize an input buffer state.

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

Definition at line 2558 of file aelparse.c.

Referenced by ael_yyrestart().

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

Destroy the buffer.

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

Definition at line 2586 of file aelparse.c.

Referenced by ael_yypop_buffer_state().

2587 {
2588  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2589 
2590  if ( ! b )
2591  return;
2592 
2593  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2594  YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2595 
2596  if ( b->yy_is_our_buffer )
2597  ael_yyfree((void *) b->yy_ch_buf ,yyscanner );
2598 
2599  ael_yyfree((void *) b ,yyscanner );
2600 }
void ael_yy_flush_buffer ( YY_BUFFER_STATE  b,
yyscan_t  yyscanner 
)

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

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

Definition at line 2639 of file aelparse.c.

2640 {
2641  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2642  if ( ! b )
2643  return;
2644 
2645  b->yy_n_chars = 0;
2646 
2647  /* We always need two end-of-buffer characters. The first causes
2648  * a transition to the end-of-buffer state. The second causes
2649  * a jam in that state.
2650  */
2651  b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2652  b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2653 
2654  b->yy_buf_pos = &b->yy_ch_buf[0];
2655 
2656  b->yy_at_bol = 1;
2657  b->yy_buffer_status = YY_BUFFER_NEW;
2658 
2659  if ( b == YY_CURRENT_BUFFER )
2660  ael_yy_load_buffer_state(yyscanner );
2661 }
YY_BUFFER_STATE ael_yy_scan_buffer ( char *  base,
yy_size_t  size,
yyscan_t  yyscanner 
)

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

Parameters
basethe character buffer
sizethe size in bytes of the character buffer
yyscannerThe scanner object.
Returns
the newly allocated buffer state object.

Definition at line 2770 of file aelparse.c.

References ael_yy_switch_to_buffer().

Referenced by ael_yy_scan_bytes().

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

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

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

Definition at line 2820 of file aelparse.c.

References ael_yy_scan_buffer().

Referenced by ael_yy_scan_string().

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

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

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

Definition at line 2807 of file aelparse.c.

References ael_yy_scan_bytes().

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

Switch to a different input buffer.

Parameters
new_bufferThe new input buffer.
yyscannerThe scanner object.

Definition at line 2511 of file aelparse.c.

Referenced by ael_yy_scan_buffer().

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

Get the current column number.

Parameters
yyscannerThe scanner object.

Definition at line 2904 of file aelparse.c.

2905 {
2906  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2907 
2908  if (! YY_CURRENT_BUFFER)
2909  return 0;
2910 
2911  return yycolumn;
2912 }
YY_EXTRA_TYPE ael_yyget_extra ( yyscan_t  yyscanner)

Get the user-defined data for this scanner.

Parameters
yyscannerThe scanner object.

Definition at line 2882 of file aelparse.c.

2883 {
2884  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2885  return yyextra;
2886 }
FILE* ael_yyget_in ( yyscan_t  yyscanner)

Get the input stream.

Parameters
yyscannerThe scanner object.

Definition at line 2917 of file aelparse.c.

2918 {
2919  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2920  return yyin;
2921 }
int ael_yyget_leng ( yyscan_t  yyscanner)

Get the length of the current token.

Parameters
yyscannerThe scanner object.

Definition at line 2935 of file aelparse.c.

2936 {
2937  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2938  return yyleng;
2939 }
int ael_yyget_lineno ( yyscan_t  yyscanner)

Get the current line number.

Parameters
yyscannerThe scanner object.

Definition at line 2891 of file aelparse.c.

2892 {
2893  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2894 
2895  if (! YY_CURRENT_BUFFER)
2896  return 0;
2897 
2898  return yylineno;
2899 }
FILE* ael_yyget_out ( yyscan_t  yyscanner)

Get the output stream.

Parameters
yyscannerThe scanner object.

Definition at line 2926 of file aelparse.c.

2927 {
2928  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2929  return yyout;
2930 }
char* ael_yyget_text ( yyscan_t  yyscanner)

Get the current token.

Parameters
yyscannerThe scanner object.

Definition at line 2945 of file aelparse.c.

2946 {
2947  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2948  return yytext;
2949 }
void ael_yypop_buffer_state ( yyscan_t  yyscanner)

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

Parameters
yyscannerThe scanner object.

Definition at line 2700 of file aelparse.c.

References ael_yy_delete_buffer(), and yyguts_t::yy_buffer_stack_top.

2701 {
2702  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2703  if (!YY_CURRENT_BUFFER)
2704  return;
2705 
2706  ael_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
2707  YY_CURRENT_BUFFER_LVALUE = NULL;
2708  if (yyg->yy_buffer_stack_top > 0)
2709  --yyg->yy_buffer_stack_top;
2710 
2711  if (YY_CURRENT_BUFFER) {
2712  ael_yy_load_buffer_state(yyscanner );
2713  yyg->yy_did_buffer_switch_on_eof = 1;
2714  }
2715 }
void ael_yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner)
Definition: aelparse.c:2586
size_t yy_buffer_stack_top
void ael_yypush_buffer_state ( YY_BUFFER_STATE  new_buffer,
yyscan_t  yyscanner 
)

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

Parameters
new_bufferThe new state.
yyscannerThe scanner object.

Definition at line 2669 of file aelparse.c.

References yyguts_t::yy_buffer_stack_top.

2670 {
2671  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2672  if (new_buffer == NULL)
2673  return;
2674 
2675  ael_yyensure_buffer_stack(yyscanner);
2676 
2677  /* This block is copied from ael_yy_switch_to_buffer. */
2678  if ( YY_CURRENT_BUFFER )
2679  {
2680  /* Flush out information for old buffer. */
2681  *yyg->yy_c_buf_p = yyg->yy_hold_char;
2682  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2683  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2684  }
2685 
2686  /* Only push if top exists. Otherwise, replace top. */
2687  if (YY_CURRENT_BUFFER)
2688  yyg->yy_buffer_stack_top++;
2689  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2690 
2691  /* copied from ael_yy_switch_to_buffer. */
2692  ael_yy_load_buffer_state(yyscanner );
2693  yyg->yy_did_buffer_switch_on_eof = 1;
2694 }
size_t yy_buffer_stack_top
void ael_yyrestart ( FILE *  input_file,
yyscan_t  yyscanner 
)

Immediately switch to a different input stream.

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

Definition at line 2493 of file aelparse.c.

References ael_yy_create_buffer().

2494 {
2495  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2496 
2497  if ( ! YY_CURRENT_BUFFER ){
2498  ael_yyensure_buffer_stack (yyscanner);
2499  YY_CURRENT_BUFFER_LVALUE =
2500  ael_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
2501  }
2502 
2503  ael_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
2504  ael_yy_load_buffer_state(yyscanner );
2505 }
YY_BUFFER_STATE ael_yy_create_buffer(FILE *file, int size, yyscan_t yyscanner)
Definition: aelparse.c:2558
void ael_yyset_column ( int  column_no,
yyscan_t  yyscanner 
)

Set the current column.

Parameters
line_number
yyscannerThe scanner object.

Definition at line 2980 of file aelparse.c.

2981 {
2982  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2983 
2984  /* column is only valid if an input buffer exists. */
2985  if (! YY_CURRENT_BUFFER )
2986  yy_fatal_error( "ael_yyset_column called with no buffer" , yyscanner);
2987 
2988  yycolumn = column_no;
2989 }
void ael_yyset_extra ( YY_EXTRA_TYPE  user_defined,
yyscan_t  yyscanner 
)

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

Parameters
user_definedThe data to be associated with this scanner.
yyscannerThe scanner object.

Definition at line 2955 of file aelparse.c.

2956 {
2957  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2958  yyextra = user_defined ;
2959 }
void ael_yyset_in ( FILE *  in_str,
yyscan_t  yyscanner 
)

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

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

Definition at line 2997 of file aelparse.c.

2998 {
2999  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3000  yyin = in_str ;
3001 }
void ael_yyset_lineno ( int  line_number,
yyscan_t  yyscanner 
)

Set the current line number.

Parameters
line_number
yyscannerThe scanner object.

Definition at line 2965 of file aelparse.c.

2966 {
2967  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2968 
2969  /* lineno is only valid if an input buffer exists. */
2970  if (! YY_CURRENT_BUFFER )
2971  yy_fatal_error( "ael_yyset_lineno called with no buffer" , yyscanner);
2972 
2973  yylineno = line_number;
2974 }

Variable Documentation

YY_DECL
Initial value:
{
register yy_state_type yy_current_state

The main scanner function which does all the work.

Definition at line 1201 of file aelparse.c.