mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 09:41:07 +00:00
gst/parse/lex._gst_parse_yy.pre.c: Update pre-generated flex files with flex 2.3.34.
Original commit message from CVS: * gst/parse/lex._gst_parse_yy.pre.c: (yy_get_next_buffer), (_gst_parse_yyensure_buffer_stack), (_gst_parse_yylex_init_extra): Update pre-generated flex files with flex 2.3.34.
This commit is contained in:
parent
60526f8dd6
commit
ca9663de37
2 changed files with 108 additions and 43 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-02-19 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* gst/parse/lex._gst_parse_yy.pre.c: (yy_get_next_buffer),
|
||||
(_gst_parse_yyensure_buffer_stack), (_gst_parse_yylex_init_extra):
|
||||
Update pre-generated flex files with flex 2.3.34.
|
||||
|
||||
2008-02-19 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* gst/gstminiobject.c:
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#define FLEX_SCANNER
|
||||
#define YY_FLEX_MAJOR_VERSION 2
|
||||
#define YY_FLEX_MINOR_VERSION 5
|
||||
#define YY_FLEX_SUBMINOR_VERSION 33
|
||||
#define YY_FLEX_SUBMINOR_VERSION 34
|
||||
#if YY_FLEX_SUBMINOR_VERSION > 0
|
||||
#define FLEX_BETA
|
||||
#endif
|
||||
|
@ -33,7 +33,7 @@
|
|||
|
||||
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
|
||||
|
||||
#if __STDC_VERSION__ >= 199901L
|
||||
#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.
|
||||
|
@ -96,11 +96,12 @@ typedef unsigned int flex_uint32_t;
|
|||
|
||||
#else /* ! __cplusplus */
|
||||
|
||||
#if __STDC__
|
||||
/* C99 requires __STDC__ to be defined as 1. */
|
||||
#if defined (__STDC__)
|
||||
|
||||
#define YY_USE_CONST
|
||||
|
||||
#endif /* __STDC__ */
|
||||
#endif /* defined (__STDC__) */
|
||||
#endif /* ! __cplusplus */
|
||||
|
||||
#ifdef YY_USE_CONST
|
||||
|
@ -136,8 +137,6 @@ typedef void *yyscan_t;
|
|||
#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
|
||||
#define yy_flex_debug yyg->yy_flex_debug_r
|
||||
|
||||
int _gst_parse_yylex_init (yyscan_t * scanner);
|
||||
|
||||
/* Enter a start condition. This macro really ought to take a parameter,
|
||||
* but we do it the disgusting crufty way forced on us by the ()-less
|
||||
* definition of BEGIN.
|
||||
|
@ -198,11 +197,13 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
|||
/* The following is because we cannot portably get our hands on size_t
|
||||
* (without autoconf's help, which isn't available because we want
|
||||
* flex-generated scanners to compile on their own).
|
||||
* Given that the standard has decreed that size_t exists since 1989,
|
||||
* I guess we can afford to depend on it. Manoj.
|
||||
*/
|
||||
|
||||
#ifndef YY_TYPEDEF_YY_SIZE_T
|
||||
#define YY_TYPEDEF_YY_SIZE_T
|
||||
typedef unsigned int yy_size_t;
|
||||
typedef size_t yy_size_t;
|
||||
#endif
|
||||
|
||||
#ifndef YY_STRUCT_YY_BUFFER_STATE
|
||||
|
@ -838,7 +839,7 @@ PRINT (const char *format, ...)
|
|||
/* links */
|
||||
|
||||
#define YY_NO_INPUT 1
|
||||
#line 838 "lex._gst_parse_yy.c"
|
||||
#line 839 "lex._gst_parse_yy.c"
|
||||
|
||||
#define INITIAL 0
|
||||
#define value 1
|
||||
|
@ -897,6 +898,11 @@ static int yy_init_globals (yyscan_t yyscanner);
|
|||
* from bison output in section 1.*/
|
||||
# define yylval yyg->yylval_r
|
||||
|
||||
int _gst_parse_yylex_init (yyscan_t * scanner);
|
||||
|
||||
int _gst_parse_yylex_init_extra (YY_EXTRA_TYPE user_defined,
|
||||
yyscan_t * scanner);
|
||||
|
||||
/* Accessor methods to globals.
|
||||
These are made visible to non-reentrant scanners for convenience. */
|
||||
|
||||
|
@ -970,7 +976,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 (void) fwrite( yytext, yyleng, 1, yyout )
|
||||
#define ECHO fwrite( yytext, yyleng, 1, yyout )
|
||||
#endif
|
||||
|
||||
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
||||
|
@ -981,7 +987,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; \
|
||||
|
@ -1067,7 +1073,7 @@ YY_DECL {
|
|||
#line 71 "parse.l"
|
||||
|
||||
|
||||
#line 1069 "lex._gst_parse_yy.c"
|
||||
#line 1074 "lex._gst_parse_yy.c"
|
||||
|
||||
yylval = yylval_param;
|
||||
|
||||
|
@ -1155,8 +1161,7 @@ YY_DECL {
|
|||
BEGIN (INITIAL);
|
||||
return ASSIGNMENT;
|
||||
}
|
||||
YY_BREAK case 2:
|
||||
YY_RULE_SETUP
|
||||
YY_BREAK case 2:YY_RULE_SETUP
|
||||
#line 81 "parse.l"
|
||||
{
|
||||
yytext++;
|
||||
|
@ -1165,8 +1170,7 @@ YY_DECL {
|
|||
BEGIN (INITIAL);
|
||||
return PADREF;
|
||||
}
|
||||
YY_BREAK case 3:
|
||||
YY_RULE_SETUP
|
||||
YY_BREAK case 3:YY_RULE_SETUP
|
||||
#line 89 "parse.l"
|
||||
{
|
||||
PRINT ("REF: %s", yytext);
|
||||
|
@ -1189,8 +1193,7 @@ YY_DECL {
|
|||
BEGIN (INITIAL);
|
||||
return BINREF;
|
||||
}
|
||||
YY_BREAK case 5:
|
||||
YY_RULE_SETUP
|
||||
YY_BREAK case 5:YY_RULE_SETUP
|
||||
#line 106 "parse.l"
|
||||
{
|
||||
PRINT ("IDENTIFIER: %s", yytext);
|
||||
|
@ -1207,7 +1210,8 @@ YY_DECL {
|
|||
|
||||
PRINT ("LINK: %s", yytext);
|
||||
c++;
|
||||
if (*c) {
|
||||
if (*c)
|
||||
{
|
||||
while (g_ascii_isspace (*c))
|
||||
c++;
|
||||
c = yylval->s = gst_parse_strdup (c);
|
||||
|
@ -1217,7 +1221,8 @@ YY_DECL {
|
|||
g_assert_not_reached ();
|
||||
while (g_ascii_isspace (*--c));
|
||||
*++c = '\0';
|
||||
} else {
|
||||
} else
|
||||
{
|
||||
yylval->s = NULL;
|
||||
}
|
||||
BEGIN (INITIAL);
|
||||
|
@ -1234,8 +1239,7 @@ YY_DECL {
|
|||
BEGIN (INITIAL);
|
||||
return PARSE_URL;
|
||||
}
|
||||
YY_BREAK case 8:
|
||||
YY_RULE_SETUP
|
||||
YY_BREAK case 8:YY_RULE_SETUP
|
||||
#line 139 "parse.l"
|
||||
{
|
||||
PRINT ("OPERATOR: [%s]", yytext);
|
||||
|
@ -1248,19 +1252,18 @@ YY_DECL {
|
|||
{
|
||||
PRINT ("SPACE: [%s]", yytext);
|
||||
}
|
||||
YY_BREAK case 10:
|
||||
YY_RULE_SETUP
|
||||
YY_BREAK case 10:YY_RULE_SETUP
|
||||
#line 143 "parse.l"
|
||||
{
|
||||
PRINT ("Invalid Lexer element: %s\n", yytext);
|
||||
return *yytext;
|
||||
}
|
||||
YY_BREAK case 11:
|
||||
YY_RULE_SETUP
|
||||
YY_BREAK case 11:YY_RULE_SETUP
|
||||
#line 148 "parse.l"
|
||||
ECHO;
|
||||
|
||||
YY_BREAK
|
||||
#line 1266 "lex._gst_parse_yy.c"
|
||||
#line 1271 "lex._gst_parse_yy.c"
|
||||
case YY_STATE_EOF (INITIAL):
|
||||
case YY_STATE_EOF (value):
|
||||
yyterminate ();
|
||||
|
@ -1497,6 +1500,18 @@ yy_get_next_buffer (yyscan_t yyscanner)
|
|||
else
|
||||
ret_val = EOB_ACT_CONTINUE_SCAN;
|
||||
|
||||
if ((yy_size_t) (yyg->yy_n_chars + number_to_move) >
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
|
||||
/* Extend the array by 50%, plus the number we really need. */
|
||||
yy_size_t new_size =
|
||||
yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf =
|
||||
(char *) _gst_parse_yyrealloc ((void *) YY_CURRENT_BUFFER_LVALUE->
|
||||
yy_ch_buf, new_size, yyscanner);
|
||||
if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf)
|
||||
YY_FATAL_ERROR ("out of dynamic memory in yy_get_next_buffer()");
|
||||
}
|
||||
|
||||
yyg->yy_n_chars += number_to_move;
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] =
|
||||
|
@ -1892,6 +1907,9 @@ _gst_parse_yyensure_buffer_stack (yyscan_t yyscanner)
|
|||
yyg->yy_buffer_stack = (struct yy_buffer_state **) _gst_parse_yyalloc
|
||||
(num_to_alloc * sizeof (struct yy_buffer_state *)
|
||||
, yyscanner);
|
||||
if (!yyg->yy_buffer_stack)
|
||||
YY_FATAL_ERROR
|
||||
("out of dynamic memory in _gst_parse_yyensure_buffer_stack()");
|
||||
|
||||
memset (yyg->yy_buffer_stack, 0,
|
||||
num_to_alloc * sizeof (struct yy_buffer_state *));
|
||||
|
@ -1910,6 +1928,9 @@ _gst_parse_yyensure_buffer_stack (yyscan_t yyscanner)
|
|||
yyg->yy_buffer_stack = (struct yy_buffer_state **) _gst_parse_yyrealloc
|
||||
(yyg->yy_buffer_stack, num_to_alloc * sizeof (struct yy_buffer_state *)
|
||||
, yyscanner);
|
||||
if (!yyg->yy_buffer_stack)
|
||||
YY_FATAL_ERROR
|
||||
("out of dynamic memory in _gst_parse_yyensure_buffer_stack()");
|
||||
|
||||
/* zero only the new slots. */
|
||||
memset (yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0,
|
||||
|
@ -2252,6 +2273,44 @@ _gst_parse_yylex_init (yyscan_t * ptr_yy_globals)
|
|||
return yy_init_globals (*ptr_yy_globals);
|
||||
}
|
||||
|
||||
/* _gst_parse_yylex_init_extra has the same functionality as _gst_parse_yylex_init, but follows the
|
||||
* convention of taking the scanner as the last argument. Note however, that
|
||||
* this is a *pointer* to a scanner, as it will be allocated by this call (and
|
||||
* is the reason, too, why this function also must handle its own declaration).
|
||||
* The user defined value in the first argument will be available to _gst_parse_yyalloc in
|
||||
* the yyextra field.
|
||||
*/
|
||||
|
||||
int
|
||||
_gst_parse_yylex_init_extra (YY_EXTRA_TYPE yy_user_defined,
|
||||
yyscan_t * ptr_yy_globals)
|
||||
{
|
||||
struct yyguts_t dummy_yyguts;
|
||||
|
||||
_gst_parse_yyset_extra (yy_user_defined, &dummy_yyguts);
|
||||
|
||||
if (ptr_yy_globals == NULL) {
|
||||
errno = EINVAL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
*ptr_yy_globals =
|
||||
(yyscan_t) _gst_parse_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));
|
||||
|
||||
_gst_parse_yyset_extra (yy_user_defined, *ptr_yy_globals);
|
||||
|
||||
return yy_init_globals (*ptr_yy_globals);
|
||||
}
|
||||
|
||||
static int
|
||||
yy_init_globals (yyscan_t yyscanner)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue