mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
ael: Regenerate lexers and parsers.
Various changes to ensure that the lexers and parsers can be correctly generated when REBUILD_PARSERS is enabled. Some notes: * Because of the version of flex we are using to generate the lexers (2.5.35) some post-processing in the Makefile is still required. * The generated lexers do not contain the problematic C99 check that was being replaced by the call to sed in the respective Makefiles so it was removed. * Since these files are generated, they will include trailing whitespace in some places. This does not need to be corrected. Change-Id: Ibbd343606fcf5c0d285b1599e6e8e59f514f2e4e
This commit is contained in:
committed by
Friendly Automation
parent
1ba3b34f77
commit
34ff836db5
@@ -37,7 +37,7 @@
|
||||
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
|
||||
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
|
||||
* if you want the limit (max/min) macros for int types.
|
||||
* if you want the limit (max/min) macros for int types.
|
||||
*/
|
||||
#ifndef __STDC_LIMIT_MACROS
|
||||
#define __STDC_LIMIT_MACROS 1
|
||||
@@ -54,9 +54,10 @@ typedef uint32_t flex_uint32_t;
|
||||
typedef signed char flex_int8_t;
|
||||
typedef short int flex_int16_t;
|
||||
typedef int flex_int32_t;
|
||||
typedef unsigned char flex_uint8_t;
|
||||
typedef unsigned char flex_uint8_t;
|
||||
typedef unsigned short int flex_uint16_t;
|
||||
typedef unsigned int flex_uint32_t;
|
||||
#endif /* ! C99 */
|
||||
|
||||
/* Limits of integral types. */
|
||||
#ifndef INT8_MIN
|
||||
@@ -87,8 +88,6 @@ typedef unsigned int flex_uint32_t;
|
||||
#define UINT32_MAX (4294967295U)
|
||||
#endif
|
||||
|
||||
#endif /* ! C99 */
|
||||
|
||||
#endif /* ! FLEXINT_H */
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -162,15 +161,7 @@ typedef void* yyscan_t;
|
||||
|
||||
/* Size of default input buffer. */
|
||||
#ifndef YY_BUF_SIZE
|
||||
#ifdef __ia64__
|
||||
/* On IA-64, the buffer size is 16k, not 8k.
|
||||
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
|
||||
* Ditto for the __ia64__ case accordingly.
|
||||
*/
|
||||
#define YY_BUF_SIZE 32768
|
||||
#else
|
||||
#define YY_BUF_SIZE 16384
|
||||
#endif /* __ia64__ */
|
||||
#endif
|
||||
|
||||
/* The state buf must be large enough to hold one state per character in the main buffer.
|
||||
@@ -187,7 +178,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
||||
#define EOB_ACT_LAST_MATCH 2
|
||||
|
||||
#define YY_LESS_LINENO(n)
|
||||
|
||||
|
||||
/* Return all but the first "n" matched characters back to the input stream. */
|
||||
#define yyless(n) \
|
||||
do \
|
||||
@@ -249,7 +240,7 @@ struct yy_buffer_state
|
||||
|
||||
int yy_bs_lineno; /**< The line count. */
|
||||
int yy_bs_column; /**< The column count. */
|
||||
|
||||
|
||||
/* Whether to try to fill the input buffer when we reach the
|
||||
* end of it.
|
||||
*/
|
||||
@@ -602,13 +593,13 @@ struct parse_io
|
||||
yyscan_t scanner;
|
||||
struct ast_channel *chan;
|
||||
};
|
||||
|
||||
|
||||
void ast_yyset_column(int column_no, yyscan_t yyscanner);
|
||||
int ast_yyget_column(yyscan_t yyscanner);
|
||||
static int curlycount = 0;
|
||||
static char *expr2_token_subst(const char *mess);
|
||||
|
||||
#line 611 "ast_expr2f.c"
|
||||
#line 600 "ast_expr2f.c"
|
||||
|
||||
#define INITIAL 0
|
||||
#define var 1
|
||||
@@ -669,9 +660,9 @@ static int yy_init_globals (yyscan_t yyscanner );
|
||||
/* This must go here because YYSTYPE and YYLTYPE are included
|
||||
* from bison output in section 1.*/
|
||||
# define yylval yyg->yylval_r
|
||||
|
||||
|
||||
# define yylloc yyg->yylloc_r
|
||||
|
||||
|
||||
int ast_yylex_init (yyscan_t* scanner);
|
||||
|
||||
int ast_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
|
||||
@@ -710,9 +701,9 @@ YYSTYPE * ast_yyget_lval (yyscan_t yyscanner );
|
||||
void ast_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
|
||||
|
||||
YYLTYPE *ast_yyget_lloc (yyscan_t yyscanner );
|
||||
|
||||
|
||||
void ast_yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
|
||||
|
||||
|
||||
/* Macros after this point can all be overridden by user definitions in
|
||||
* section 1.
|
||||
*/
|
||||
@@ -726,7 +717,7 @@ extern int ast_yywrap (yyscan_t yyscanner );
|
||||
#endif
|
||||
|
||||
static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
|
||||
|
||||
|
||||
#ifndef yytext_ptr
|
||||
static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
|
||||
#endif
|
||||
@@ -747,12 +738,7 @@ static int input (yyscan_t yyscanner );
|
||||
|
||||
/* Amount of stuff to slurp up with each read. */
|
||||
#ifndef YY_READ_BUF_SIZE
|
||||
#ifdef __ia64__
|
||||
/* On IA-64, the buffer size is 16k, not 8k */
|
||||
#define YY_READ_BUF_SIZE 16384
|
||||
#else
|
||||
#define YY_READ_BUF_SIZE 8192
|
||||
#endif /* __ia64__ */
|
||||
#endif
|
||||
|
||||
/* Copy whatever the last rule matched to the standard output. */
|
||||
@@ -760,7 +746,7 @@ static int input (yyscan_t yyscanner );
|
||||
/* This used to be an fputs(), but since the string might contain NUL's,
|
||||
* we now use fwrite().
|
||||
*/
|
||||
#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
|
||||
#define ECHO fwrite( yytext, yyleng, 1, yyout )
|
||||
#endif
|
||||
|
||||
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
||||
@@ -771,7 +757,7 @@ static int input (yyscan_t yyscanner );
|
||||
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
|
||||
{ \
|
||||
int c = '*'; \
|
||||
size_t n; \
|
||||
int n; \
|
||||
for ( n = 0; n < max_size && \
|
||||
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
|
||||
buf[n] = (char) c; \
|
||||
@@ -856,10 +842,10 @@ YY_DECL
|
||||
register int yy_act;
|
||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||
|
||||
#line 130 "ast_expr2.fl"
|
||||
#line 128 "ast_expr2.fl"
|
||||
|
||||
|
||||
#line 862 "ast_expr2f.c"
|
||||
#line 846 "ast_expr2f.c"
|
||||
|
||||
yylval = yylval_param;
|
||||
|
||||
@@ -950,132 +936,132 @@ do_action: /* This label is used only to access EOF actions. */
|
||||
|
||||
case 1:
|
||||
YY_RULE_SETUP
|
||||
#line 132 "ast_expr2.fl"
|
||||
#line 130 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_OR;}
|
||||
YY_BREAK
|
||||
case 2:
|
||||
YY_RULE_SETUP
|
||||
#line 133 "ast_expr2.fl"
|
||||
#line 131 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_AND;}
|
||||
YY_BREAK
|
||||
case 3:
|
||||
YY_RULE_SETUP
|
||||
#line 134 "ast_expr2.fl"
|
||||
#line 132 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_EQ;}
|
||||
YY_BREAK
|
||||
case 4:
|
||||
YY_RULE_SETUP
|
||||
#line 135 "ast_expr2.fl"
|
||||
#line 133 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_OR;}
|
||||
YY_BREAK
|
||||
case 5:
|
||||
YY_RULE_SETUP
|
||||
#line 136 "ast_expr2.fl"
|
||||
#line 134 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_AND;}
|
||||
YY_BREAK
|
||||
case 6:
|
||||
YY_RULE_SETUP
|
||||
#line 137 "ast_expr2.fl"
|
||||
#line 135 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_EQ;}
|
||||
YY_BREAK
|
||||
case 7:
|
||||
YY_RULE_SETUP
|
||||
#line 138 "ast_expr2.fl"
|
||||
#line 136 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_EQTILDE;}
|
||||
YY_BREAK
|
||||
case 8:
|
||||
YY_RULE_SETUP
|
||||
#line 139 "ast_expr2.fl"
|
||||
#line 137 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_TILDETILDE;}
|
||||
YY_BREAK
|
||||
case 9:
|
||||
YY_RULE_SETUP
|
||||
#line 140 "ast_expr2.fl"
|
||||
#line 138 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_GT;}
|
||||
YY_BREAK
|
||||
case 10:
|
||||
YY_RULE_SETUP
|
||||
#line 141 "ast_expr2.fl"
|
||||
#line 139 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_LT;}
|
||||
YY_BREAK
|
||||
case 11:
|
||||
YY_RULE_SETUP
|
||||
#line 142 "ast_expr2.fl"
|
||||
#line 140 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_GE;}
|
||||
YY_BREAK
|
||||
case 12:
|
||||
YY_RULE_SETUP
|
||||
#line 143 "ast_expr2.fl"
|
||||
#line 141 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_LE;}
|
||||
YY_BREAK
|
||||
case 13:
|
||||
YY_RULE_SETUP
|
||||
#line 144 "ast_expr2.fl"
|
||||
#line 142 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_NE;}
|
||||
YY_BREAK
|
||||
case 14:
|
||||
YY_RULE_SETUP
|
||||
#line 145 "ast_expr2.fl"
|
||||
#line 143 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_PLUS;}
|
||||
YY_BREAK
|
||||
case 15:
|
||||
YY_RULE_SETUP
|
||||
#line 146 "ast_expr2.fl"
|
||||
#line 144 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_COMMA;}
|
||||
YY_BREAK
|
||||
case 16:
|
||||
YY_RULE_SETUP
|
||||
#line 147 "ast_expr2.fl"
|
||||
#line 145 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_MINUS;}
|
||||
YY_BREAK
|
||||
case 17:
|
||||
YY_RULE_SETUP
|
||||
#line 148 "ast_expr2.fl"
|
||||
#line 146 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_MULT;}
|
||||
YY_BREAK
|
||||
case 18:
|
||||
YY_RULE_SETUP
|
||||
#line 149 "ast_expr2.fl"
|
||||
#line 147 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_DIV;}
|
||||
YY_BREAK
|
||||
case 19:
|
||||
YY_RULE_SETUP
|
||||
#line 150 "ast_expr2.fl"
|
||||
#line 148 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_MOD;}
|
||||
YY_BREAK
|
||||
case 20:
|
||||
YY_RULE_SETUP
|
||||
#line 151 "ast_expr2.fl"
|
||||
#line 149 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_COND;}
|
||||
YY_BREAK
|
||||
case 21:
|
||||
YY_RULE_SETUP
|
||||
#line 152 "ast_expr2.fl"
|
||||
#line 150 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_COMPL;}
|
||||
YY_BREAK
|
||||
case 22:
|
||||
YY_RULE_SETUP
|
||||
#line 153 "ast_expr2.fl"
|
||||
#line 151 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_COLON;}
|
||||
YY_BREAK
|
||||
case 23:
|
||||
YY_RULE_SETUP
|
||||
#line 154 "ast_expr2.fl"
|
||||
#line 152 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_COLONCOLON;}
|
||||
YY_BREAK
|
||||
case 24:
|
||||
YY_RULE_SETUP
|
||||
#line 155 "ast_expr2.fl"
|
||||
#line 153 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_LP;}
|
||||
YY_BREAK
|
||||
case 25:
|
||||
YY_RULE_SETUP
|
||||
#line 156 "ast_expr2.fl"
|
||||
#line 154 "ast_expr2.fl"
|
||||
{ SET_COLUMNS; SET_STRING; return TOK_RP;}
|
||||
YY_BREAK
|
||||
case 26:
|
||||
YY_RULE_SETUP
|
||||
#line 157 "ast_expr2.fl"
|
||||
#line 155 "ast_expr2.fl"
|
||||
{
|
||||
/* gather the contents of ${} expressions, with trailing stuff,
|
||||
* into a single TOKEN.
|
||||
@@ -1088,24 +1074,24 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 27:
|
||||
YY_RULE_SETUP
|
||||
#line 167 "ast_expr2.fl"
|
||||
#line 165 "ast_expr2.fl"
|
||||
{}
|
||||
YY_BREAK
|
||||
case 28:
|
||||
/* rule 28 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 168 "ast_expr2.fl"
|
||||
#line 166 "ast_expr2.fl"
|
||||
{SET_COLUMNS; SET_STRING; return TOKEN;}
|
||||
YY_BREAK
|
||||
case 29:
|
||||
/* rule 29 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 170 "ast_expr2.fl"
|
||||
#line 168 "ast_expr2.fl"
|
||||
{/* what to do with eol */}
|
||||
YY_BREAK
|
||||
case 30:
|
||||
YY_RULE_SETUP
|
||||
#line 171 "ast_expr2.fl"
|
||||
#line 169 "ast_expr2.fl"
|
||||
{
|
||||
SET_COLUMNS;
|
||||
/* the original behavior of the expression parser was
|
||||
@@ -1118,7 +1104,7 @@ YY_RULE_SETUP
|
||||
case 31:
|
||||
/* rule 31 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 180 "ast_expr2.fl"
|
||||
#line 178 "ast_expr2.fl"
|
||||
{
|
||||
SET_COLUMNS;
|
||||
SET_STRING;
|
||||
@@ -1128,7 +1114,7 @@ YY_RULE_SETUP
|
||||
case 32:
|
||||
/* rule 32 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 186 "ast_expr2.fl"
|
||||
#line 184 "ast_expr2.fl"
|
||||
{
|
||||
curlycount = 0;
|
||||
BEGIN(var);
|
||||
@@ -1138,7 +1124,7 @@ YY_RULE_SETUP
|
||||
case 33:
|
||||
/* rule 33 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 192 "ast_expr2.fl"
|
||||
#line 190 "ast_expr2.fl"
|
||||
{
|
||||
curlycount--;
|
||||
if (curlycount < 0) {
|
||||
@@ -1152,7 +1138,7 @@ YY_RULE_SETUP
|
||||
case 34:
|
||||
/* rule 34 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 202 "ast_expr2.fl"
|
||||
#line 200 "ast_expr2.fl"
|
||||
{
|
||||
curlycount++;
|
||||
yymore();
|
||||
@@ -1160,7 +1146,7 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 35:
|
||||
YY_RULE_SETUP
|
||||
#line 208 "ast_expr2.fl"
|
||||
#line 206 "ast_expr2.fl"
|
||||
{
|
||||
BEGIN(0);
|
||||
SET_COLUMNS;
|
||||
@@ -1170,7 +1156,7 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 36:
|
||||
YY_RULE_SETUP
|
||||
#line 215 "ast_expr2.fl"
|
||||
#line 213 "ast_expr2.fl"
|
||||
{
|
||||
curlycount = 0;
|
||||
BEGIN(var);
|
||||
@@ -1180,7 +1166,7 @@ YY_RULE_SETUP
|
||||
case 37:
|
||||
/* rule 37 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 221 "ast_expr2.fl"
|
||||
#line 219 "ast_expr2.fl"
|
||||
{
|
||||
char c = yytext[yyleng-1];
|
||||
BEGIN(0);
|
||||
@@ -1191,7 +1177,7 @@ YY_RULE_SETUP
|
||||
}
|
||||
YY_BREAK
|
||||
case YY_STATE_EOF(trail):
|
||||
#line 230 "ast_expr2.fl"
|
||||
#line 228 "ast_expr2.fl"
|
||||
{
|
||||
BEGIN(0);
|
||||
SET_COLUMNS;
|
||||
@@ -1202,10 +1188,10 @@ case YY_STATE_EOF(trail):
|
||||
YY_BREAK
|
||||
case 38:
|
||||
YY_RULE_SETUP
|
||||
#line 238 "ast_expr2.fl"
|
||||
#line 236 "ast_expr2.fl"
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
#line 1208 "ast_expr2f.c"
|
||||
#line 1192 "ast_expr2f.c"
|
||||
case YY_STATE_EOF(INITIAL):
|
||||
case YY_STATE_EOF(var):
|
||||
yyterminate();
|
||||
@@ -1725,7 +1711,7 @@ static void ast_yy_load_buffer_state (yyscan_t yyscanner)
|
||||
YY_BUFFER_STATE ast_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
|
||||
{
|
||||
YY_BUFFER_STATE b;
|
||||
|
||||
|
||||
b = (YY_BUFFER_STATE) ast_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
|
||||
if ( ! b )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in ast_yy_create_buffer()" );
|
||||
@@ -1769,7 +1755,7 @@ static void ast_yy_load_buffer_state (yyscan_t yyscanner)
|
||||
#ifndef __cplusplus
|
||||
extern int isatty (int );
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
/* Initializes or reinitializes a buffer.
|
||||
* This function is sometimes called more than once on the same buffer,
|
||||
* such as during a ast_yyrestart() or at EOF.
|
||||
@@ -1795,7 +1781,7 @@ extern int isatty (int );
|
||||
}
|
||||
|
||||
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
||||
|
||||
|
||||
errno = oerrno;
|
||||
}
|
||||
|
||||
@@ -1901,9 +1887,9 @@ static void ast_yyensure_buffer_stack (yyscan_t yyscanner)
|
||||
, yyscanner);
|
||||
if ( ! yyg->yy_buffer_stack )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in ast_yyensure_buffer_stack()" );
|
||||
|
||||
|
||||
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
|
||||
|
||||
|
||||
yyg->yy_buffer_stack_max = num_to_alloc;
|
||||
yyg->yy_buffer_stack_top = 0;
|
||||
return;
|
||||
@@ -1932,12 +1918,12 @@ static void ast_yyensure_buffer_stack (yyscan_t yyscanner)
|
||||
* @param base the character buffer
|
||||
* @param size the size in bytes of the character buffer
|
||||
* @param yyscanner The scanner object.
|
||||
* @return the newly allocated buffer state object.
|
||||
* @return the newly allocated buffer state object.
|
||||
*/
|
||||
YY_BUFFER_STATE ast_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
|
||||
{
|
||||
YY_BUFFER_STATE b;
|
||||
|
||||
|
||||
if ( size < 2 ||
|
||||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
||||
base[size-1] != YY_END_OF_BUFFER_CHAR )
|
||||
@@ -1973,14 +1959,14 @@ YY_BUFFER_STATE ast_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yys
|
||||
*/
|
||||
YY_BUFFER_STATE ast_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
|
||||
{
|
||||
|
||||
|
||||
return ast_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
|
||||
}
|
||||
|
||||
/** Setup the input buffer state to scan the given bytes. The next call to ast_yylex() will
|
||||
* scan from a @e copy of @a bytes.
|
||||
* @param yybytes the byte buffer to scan
|
||||
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
|
||||
* @param bytes the byte buffer to scan
|
||||
* @param len the number of bytes in the buffer pointed to by @a bytes.
|
||||
* @param yyscanner The scanner object.
|
||||
* @return the newly allocated buffer state object.
|
||||
*/
|
||||
@@ -1990,7 +1976,7 @@ YY_BUFFER_STATE ast_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ,
|
||||
char *buf;
|
||||
yy_size_t n;
|
||||
int i;
|
||||
|
||||
|
||||
/* Get memory for full buffer, including space for trailing EOB's. */
|
||||
n = _yybytes_len + 2;
|
||||
buf = (char *) ast_yyalloc(n ,yyscanner );
|
||||
@@ -2058,10 +2044,10 @@ YY_EXTRA_TYPE ast_yyget_extra (yyscan_t yyscanner)
|
||||
int ast_yyget_lineno (yyscan_t yyscanner)
|
||||
{
|
||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||
|
||||
|
||||
if (! YY_CURRENT_BUFFER)
|
||||
return 0;
|
||||
|
||||
|
||||
return yylineno;
|
||||
}
|
||||
|
||||
@@ -2071,10 +2057,10 @@ int ast_yyget_lineno (yyscan_t yyscanner)
|
||||
int ast_yyget_column (yyscan_t yyscanner)
|
||||
{
|
||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||
|
||||
|
||||
if (! YY_CURRENT_BUFFER)
|
||||
return 0;
|
||||
|
||||
|
||||
return yycolumn;
|
||||
}
|
||||
|
||||
@@ -2135,14 +2121,14 @@ void ast_yyset_lineno (int line_number , yyscan_t yyscanner)
|
||||
|
||||
/* lineno is only valid if an input buffer exists. */
|
||||
if (! YY_CURRENT_BUFFER )
|
||||
yy_fatal_error( "ast_yyset_lineno called with no buffer" , yyscanner);
|
||||
|
||||
yy_fatal_error( "ast_yyset_lineno called with no buffer" , yyscanner);
|
||||
|
||||
yylineno = line_number;
|
||||
}
|
||||
|
||||
/** Set the current column.
|
||||
* \param column_no line_number
|
||||
* \param yyscanner The scanner object.
|
||||
* @param line_number
|
||||
* @param yyscanner The scanner object.
|
||||
*/
|
||||
void ast_yyset_column (int column_no , yyscan_t yyscanner)
|
||||
{
|
||||
@@ -2150,8 +2136,8 @@ void ast_yyset_column (int column_no , yyscan_t yyscanner)
|
||||
|
||||
/* column is only valid if an input buffer exists. */
|
||||
if (! YY_CURRENT_BUFFER )
|
||||
yy_fatal_error( "ast_yyset_column called with no buffer" , yyscanner);
|
||||
|
||||
yy_fatal_error( "ast_yyset_column called with no buffer" , yyscanner);
|
||||
|
||||
yycolumn = column_no;
|
||||
}
|
||||
|
||||
@@ -2204,13 +2190,13 @@ YYLTYPE *ast_yyget_lloc (yyscan_t yyscanner)
|
||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||
return yylloc;
|
||||
}
|
||||
|
||||
|
||||
void ast_yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
|
||||
{
|
||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||
yylloc = yylloc_param;
|
||||
}
|
||||
|
||||
|
||||
/* User-visible API */
|
||||
|
||||
/* ast_yylex_init is special because it creates the scanner itself, so it is
|
||||
@@ -2258,20 +2244,20 @@ int ast_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals
|
||||
errno = EINVAL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
*ptr_yy_globals = (yyscan_t) ast_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
|
||||
|
||||
|
||||
if (*ptr_yy_globals == NULL){
|
||||
errno = ENOMEM;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* By setting to 0xAA, we expose bugs in
|
||||
yy_init_globals. Leave at 0x00 for releases. */
|
||||
memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
|
||||
|
||||
|
||||
ast_yyset_extra (yy_user_defined, *ptr_yy_globals);
|
||||
|
||||
|
||||
return yy_init_globals ( *ptr_yy_globals );
|
||||
}
|
||||
|
||||
@@ -2381,7 +2367,7 @@ void *ast_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
|
||||
|
||||
#define YYTABLES_NAME "yytables"
|
||||
|
||||
#line 238 "ast_expr2.fl"
|
||||
#line 236 "ast_expr2.fl"
|
||||
|
||||
|
||||
|
||||
@@ -2486,7 +2472,7 @@ void ast_expr_clear_extra_error_info(void)
|
||||
extra_error_message[0] = 0;
|
||||
}
|
||||
|
||||
static const char * const expr2_token_equivs1[] =
|
||||
static const char * const expr2_token_equivs1[] =
|
||||
{
|
||||
"TOKEN",
|
||||
"TOK_COND",
|
||||
@@ -2512,7 +2498,7 @@ static const char * const expr2_token_equivs1[] =
|
||||
"TOK_LP"
|
||||
};
|
||||
|
||||
static const char * const expr2_token_equivs2[] =
|
||||
static const char * const expr2_token_equivs2[] =
|
||||
{
|
||||
"<token>",
|
||||
"?",
|
||||
@@ -2623,3 +2609,4 @@ int ast_yyerror (const char *s, yyltype *loc, struct parse_io *parseio )
|
||||
free(s2);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user