gstreamer_core/gst/parse/lex._gst_parse_yy.c
branchRCL_3
changeset 30 7e817e7e631c
parent 29 567bb019e3e3
equal deleted inserted replaced
29:567bb019e3e3 30:7e817e7e631c
     1 #ifdef HAVE_CONFIG_H
     1 #ifdef HAVE_CONFIG_H
     2 #ifdef __SYMBIAN32__
     2 #ifdef __SYMBIAN32__
     3 #include <config.h>
     3 #include "config.h"
     4 #else
     4 #else
     5 #include <config.h>
     5 #include <config.h>
     6 #endif
     6 #endif
     7 #endif
     7 #endif
     8 
     8 
    13 /* A lexical scanner generated by flex */
    13 /* A lexical scanner generated by flex */
    14 
    14 
    15 #define FLEX_SCANNER
    15 #define FLEX_SCANNER
    16 #define YY_FLEX_MAJOR_VERSION 2
    16 #define YY_FLEX_MAJOR_VERSION 2
    17 #define YY_FLEX_MINOR_VERSION 5
    17 #define YY_FLEX_MINOR_VERSION 5
    18 #define YY_FLEX_SUBMINOR_VERSION 35
    18 #define YY_FLEX_SUBMINOR_VERSION 33
    19 #if YY_FLEX_SUBMINOR_VERSION > 0
    19 #if YY_FLEX_SUBMINOR_VERSION > 0
    20 #define FLEX_BETA
    20 #define FLEX_BETA
    21 #endif
    21 #endif
    22 
    22 
    23 /* First, we deal with  platform-specific or compiler-specific issues. */
    23 /* First, we deal with  platform-specific or compiler-specific issues. */
    35 #ifndef FLEXINT_H
    35 #ifndef FLEXINT_H
    36 #define FLEXINT_H
    36 #define FLEXINT_H
    37 
    37 
    38 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
    38 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
    39 
    39 
    40 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    40 #if __STDC_VERSION__ >= 199901L
    41 
    41 
    42 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
    42 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
    43  * if you want the limit (max/min) macros for int types. 
    43  * if you want the limit (max/min) macros for int types. 
    44  */
    44  */
    45 #ifndef __STDC_LIMIT_MACROS
    45 #ifndef __STDC_LIMIT_MACROS
    58 typedef short int flex_int16_t;
    58 typedef short int flex_int16_t;
    59 typedef int flex_int32_t;
    59 typedef int flex_int32_t;
    60 typedef unsigned char flex_uint8_t; 
    60 typedef unsigned char flex_uint8_t; 
    61 typedef unsigned short int flex_uint16_t;
    61 typedef unsigned short int flex_uint16_t;
    62 typedef unsigned int flex_uint32_t;
    62 typedef unsigned int flex_uint32_t;
       
    63 #endif /* ! C99 */
    63 
    64 
    64 /* Limits of integral types. */
    65 /* Limits of integral types. */
    65 #ifndef INT8_MIN
    66 #ifndef INT8_MIN
    66 #define INT8_MIN               (-128)
    67 #define INT8_MIN               (-128)
    67 #endif
    68 #endif
    88 #endif
    89 #endif
    89 #ifndef UINT32_MAX
    90 #ifndef UINT32_MAX
    90 #define UINT32_MAX             (4294967295U)
    91 #define UINT32_MAX             (4294967295U)
    91 #endif
    92 #endif
    92 
    93 
    93 #endif /* ! C99 */
       
    94 
       
    95 #endif /* ! FLEXINT_H */
    94 #endif /* ! FLEXINT_H */
    96 
    95 
    97 #ifdef __cplusplus
    96 #ifdef __cplusplus
    98 
    97 
    99 /* The "const" storage-class-modifier is valid. */
    98 /* The "const" storage-class-modifier is valid. */
   100 #define YY_USE_CONST
    99 #define YY_USE_CONST
   101 
   100 
   102 #else	/* ! __cplusplus */
   101 #else	/* ! __cplusplus */
   103 
   102 
   104 /* C99 requires __STDC__ to be defined as 1. */
   103 #if __STDC__
   105 #if defined (__STDC__)
       
   106 
   104 
   107 #define YY_USE_CONST
   105 #define YY_USE_CONST
   108 
   106 
   109 #endif	/* defined (__STDC__) */
   107 #endif	/* __STDC__ */
   110 #endif	/* ! __cplusplus */
   108 #endif	/* ! __cplusplus */
   111 
   109 
   112 #ifdef YY_USE_CONST
   110 #ifdef YY_USE_CONST
   113 #define yyconst const
   111 #define yyconst const
   114 #else
   112 #else
   140 #define yytext yyg->yytext_r
   138 #define yytext yyg->yytext_r
   141 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
   139 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
   142 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
   140 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
   143 #define yy_flex_debug yyg->yy_flex_debug_r
   141 #define yy_flex_debug yyg->yy_flex_debug_r
   144 
   142 
       
   143 int _gst_parse_yylex_init (yyscan_t* scanner);
       
   144 
   145 /* Enter a start condition.  This macro really ought to take a parameter,
   145 /* Enter a start condition.  This macro really ought to take a parameter,
   146  * but we do it the disgusting crufty way forced on us by the ()-less
   146  * but we do it the disgusting crufty way forced on us by the ()-less
   147  * definition of BEGIN.
   147  * definition of BEGIN.
   148  */
   148  */
   149 #define BEGIN yyg->yy_start = 1 + 2 *
   149 #define BEGIN yyg->yy_start = 1 + 2 *
   163 
   163 
   164 #define YY_END_OF_BUFFER_CHAR 0
   164 #define YY_END_OF_BUFFER_CHAR 0
   165 
   165 
   166 /* Size of default input buffer. */
   166 /* Size of default input buffer. */
   167 #ifndef YY_BUF_SIZE
   167 #ifndef YY_BUF_SIZE
   168 #ifdef __ia64__
       
   169 /* On IA-64, the buffer size is 16k, not 8k.
       
   170  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
       
   171  * Ditto for the __ia64__ case accordingly.
       
   172  */
       
   173 #define YY_BUF_SIZE 32768
       
   174 #else
       
   175 #define YY_BUF_SIZE 16384
   168 #define YY_BUF_SIZE 16384
   176 #endif /* __ia64__ */
       
   177 #endif
   169 #endif
   178 
   170 
   179 /* The state buf must be large enough to hold one state per character in the main buffer.
   171 /* The state buf must be large enough to hold one state per character in the main buffer.
   180  */
   172  */
   181 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
   173 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
   205 		} \
   197 		} \
   206 	while ( 0 )
   198 	while ( 0 )
   207 
   199 
   208 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
   200 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
   209 
   201 
       
   202 /* The following is because we cannot portably get our hands on size_t
       
   203  * (without autoconf's help, which isn't available because we want
       
   204  * flex-generated scanners to compile on their own).
       
   205  */
       
   206 
   210 #ifndef YY_TYPEDEF_YY_SIZE_T
   207 #ifndef YY_TYPEDEF_YY_SIZE_T
   211 #define YY_TYPEDEF_YY_SIZE_T
   208 #define YY_TYPEDEF_YY_SIZE_T
   212 typedef size_t yy_size_t;
   209 typedef unsigned int yy_size_t;
   213 #endif
   210 #endif
   214 
   211 
   215 #ifndef YY_STRUCT_YY_BUFFER_STATE
   212 #ifndef YY_STRUCT_YY_BUFFER_STATE
   216 #define YY_STRUCT_YY_BUFFER_STATE
   213 #define YY_STRUCT_YY_BUFFER_STATE
   217 struct yy_buffer_state
   214 struct yy_buffer_state
   847 /* we must do this here, because nearly everything matches a {_string} */ 
   844 /* we must do this here, because nearly everything matches a {_string} */ 
   848 /* get pad/element references and stuff with dots right */
   845 /* get pad/element references and stuff with dots right */
   849 /* links */
   846 /* links */
   850 
   847 
   851 #define YY_NO_INPUT 1
   848 #define YY_NO_INPUT 1
   852 #line 841 "lex._gst_parse_yy.c"
   849 #line 838 "lex._gst_parse_yy.c"
   853 
   850 
   854 #define INITIAL 0
   851 #define INITIAL 0
   855 #define value 1
   852 #define value 1
   856 
   853 
   857 #ifndef YY_NO_UNISTD_H
   854 #ifndef YY_NO_UNISTD_H
   906 
   903 
   907     /* This must go here because YYSTYPE and YYLTYPE are included
   904     /* This must go here because YYSTYPE and YYLTYPE are included
   908      * from bison output in section 1.*/
   905      * from bison output in section 1.*/
   909     #    define yylval yyg->yylval_r
   906     #    define yylval yyg->yylval_r
   910     
   907     
   911 int _gst_parse_yylex_init (yyscan_t* scanner);
       
   912 
       
   913 int _gst_parse_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
       
   914 
       
   915 /* Accessor methods to globals.
   908 /* Accessor methods to globals.
   916    These are made visible to non-reentrant scanners for convenience. */
   909    These are made visible to non-reentrant scanners for convenience. */
   917 
   910 
   918 int _gst_parse_yylex_destroy (yyscan_t yyscanner );
   911 int _gst_parse_yylex_destroy (yyscan_t yyscanner );
   919 
   912 
   975 
   968 
   976 #endif
   969 #endif
   977 
   970 
   978 /* Amount of stuff to slurp up with each read. */
   971 /* Amount of stuff to slurp up with each read. */
   979 #ifndef YY_READ_BUF_SIZE
   972 #ifndef YY_READ_BUF_SIZE
   980 #ifdef __ia64__
       
   981 /* On IA-64, the buffer size is 16k, not 8k */
       
   982 #define YY_READ_BUF_SIZE 16384
       
   983 #else
       
   984 #define YY_READ_BUF_SIZE 8192
   973 #define YY_READ_BUF_SIZE 8192
   985 #endif /* __ia64__ */
       
   986 #endif
   974 #endif
   987 
   975 
   988 /* Copy whatever the last rule matched to the standard output. */
   976 /* Copy whatever the last rule matched to the standard output. */
   989 #ifndef ECHO
   977 #ifndef ECHO
   990 /* This used to be an fputs(), but since the string might contain NUL's,
   978 /* This used to be an fputs(), but since the string might contain NUL's,
   991  * we now use fwrite().
   979  * we now use fwrite().
   992  */
   980  */
   993 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
   981 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
   994 #endif
   982 #endif
   995 
   983 
   996 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
   984 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
   997  * is returned in "result".
   985  * is returned in "result".
   998  */
   986  */
  1053  * easily add parameters.
  1041  * easily add parameters.
  1054  */
  1042  */
  1055 #ifndef YY_DECL
  1043 #ifndef YY_DECL
  1056 #define YY_DECL_IS_OURS 1
  1044 #define YY_DECL_IS_OURS 1
  1057 
  1045 
  1058 extern int _gst_parse_yylex \
  1046 extern int _gst_parse_yylex (YYSTYPE * yylval_param ,yyscan_t yyscanner);
  1059                (YYSTYPE * yylval_param ,yyscan_t yyscanner);
  1047 
  1060 
  1048 #define YY_DECL int _gst_parse_yylex (YYSTYPE * yylval_param , yyscan_t yyscanner)
  1061 #define YY_DECL int _gst_parse_yylex \
       
  1062                (YYSTYPE * yylval_param , yyscan_t yyscanner)
       
  1063 #endif /* !YY_DECL */
  1049 #endif /* !YY_DECL */
  1064 
  1050 
  1065 /* Code executed at the beginning of each rule, after yytext and yyleng
  1051 /* Code executed at the beginning of each rule, after yytext and yyleng
  1066  * have been set up.
  1052  * have been set up.
  1067  */
  1053  */
  1087     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1073     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1088 
  1074 
  1089 #line 71 "parse.l"
  1075 #line 71 "parse.l"
  1090 
  1076 
  1091 
  1077 
  1092 #line 1081 "lex._gst_parse_yy.c"
  1078 #line 1067 "lex._gst_parse_yy.c"
  1093 
  1079 
  1094     yylval = yylval_param;
  1080     yylval = yylval_param;
  1095 
  1081 
  1096 	if ( !yyg->yy_init )
  1082 	if ( !yyg->yy_init )
  1097 		{
  1083 		{
  1233 #line 113 "parse.l"
  1219 #line 113 "parse.l"
  1234 {
  1220 {
  1235     gchar *c = yytext;
  1221     gchar *c = yytext;
  1236     PRINT ("LINK: %s", yytext);
  1222     PRINT ("LINK: %s", yytext);
  1237     c++;
  1223     c++;
  1238     if (*c) {
  1224     /*if (*c) {
  1239       while (g_ascii_isspace (*c)) c++;
  1225       while (g_ascii_isspace (*c)) c++;
  1240       c = yylval->s = gst_parse_strdup (c);
  1226       c = yylval->s = gst_parse_strdup (c);
  1241       while (*c) c++;
  1227       while (*c) c++;
  1242       if (*--c != '!')
  1228       if (*--c != '!')
  1243 	g_assert_not_reached ();
  1229 	g_assert_not_reached ();
  1244       while (g_ascii_isspace (*--c));
  1230       while (g_ascii_isspace (*--c));
  1245       *++c = '\0';
  1231       *++c = '\0';
  1246     } else {
  1232     } else {
  1247       yylval->s = NULL;
  1233       yylval->s = NULL;
  1248     }
  1234     }*/
  1249     BEGIN (INITIAL);
  1235     BEGIN (INITIAL);
  1250     return LINK;
  1236     return LINK;
  1251 }
  1237 }
  1252 	YY_BREAK
  1238 	YY_BREAK
  1253 case 7:
  1239 case 7:
  1284 case 11:
  1270 case 11:
  1285 YY_RULE_SETUP
  1271 YY_RULE_SETUP
  1286 #line 148 "parse.l"
  1272 #line 148 "parse.l"
  1287 ECHO;
  1273 ECHO;
  1288 	YY_BREAK
  1274 	YY_BREAK
  1289 #line 1278 "lex._gst_parse_yy.c"
  1275 #line 1264 "lex._gst_parse_yy.c"
  1290 case YY_STATE_EOF(INITIAL):
  1276 case YY_STATE_EOF(INITIAL):
  1291 case YY_STATE_EOF(value):
  1277 case YY_STATE_EOF(value):
  1292 	yyterminate();
  1278 	yyterminate();
  1293 
  1279 
  1294 	case YY_END_OF_BUFFER:
  1280 	case YY_END_OF_BUFFER:
  1518 		if ( num_to_read > YY_READ_BUF_SIZE )
  1504 		if ( num_to_read > YY_READ_BUF_SIZE )
  1519 			num_to_read = YY_READ_BUF_SIZE;
  1505 			num_to_read = YY_READ_BUF_SIZE;
  1520 
  1506 
  1521 		/* Read in more data. */
  1507 		/* Read in more data. */
  1522 		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
  1508 		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
  1523 			yyg->yy_n_chars, (size_t) num_to_read );
  1509 			yyg->yy_n_chars, num_to_read );
  1524 
  1510 
  1525 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
  1511 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
  1526 		}
  1512 		}
  1527 
  1513 
  1528 	if ( yyg->yy_n_chars == 0 )
  1514 	if ( yyg->yy_n_chars == 0 )
  1541 			}
  1527 			}
  1542 		}
  1528 		}
  1543 
  1529 
  1544 	else
  1530 	else
  1545 		ret_val = EOB_ACT_CONTINUE_SCAN;
  1531 		ret_val = EOB_ACT_CONTINUE_SCAN;
  1546 
       
  1547 	if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
       
  1548 		/* Extend the array by 50%, plus the number we really need. */
       
  1549 		yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
       
  1550 		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) _gst_parse_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
       
  1551 		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
       
  1552 			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
       
  1553 	}
       
  1554 
  1532 
  1555 	yyg->yy_n_chars += number_to_move;
  1533 	yyg->yy_n_chars += number_to_move;
  1556 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  1534 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  1557 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  1535 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  1558 
  1536 
  1936          */
  1914          */
  1937 		num_to_alloc = 1;
  1915 		num_to_alloc = 1;
  1938 		yyg->yy_buffer_stack = (struct yy_buffer_state**)_gst_parse_yyalloc
  1916 		yyg->yy_buffer_stack = (struct yy_buffer_state**)_gst_parse_yyalloc
  1939 								(num_to_alloc * sizeof(struct yy_buffer_state*)
  1917 								(num_to_alloc * sizeof(struct yy_buffer_state*)
  1940 								, yyscanner);
  1918 								, yyscanner);
  1941 		if ( ! yyg->yy_buffer_stack )
  1919 		
  1942 			YY_FATAL_ERROR( "out of dynamic memory in _gst_parse_yyensure_buffer_stack()" );
       
  1943 								  
       
  1944 		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
  1920 		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
  1945 				
  1921 				
  1946 		yyg->yy_buffer_stack_max = num_to_alloc;
  1922 		yyg->yy_buffer_stack_max = num_to_alloc;
  1947 		yyg->yy_buffer_stack_top = 0;
  1923 		yyg->yy_buffer_stack_top = 0;
  1948 		return;
  1924 		return;
  1956 		num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
  1932 		num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
  1957 		yyg->yy_buffer_stack = (struct yy_buffer_state**)_gst_parse_yyrealloc
  1933 		yyg->yy_buffer_stack = (struct yy_buffer_state**)_gst_parse_yyrealloc
  1958 								(yyg->yy_buffer_stack,
  1934 								(yyg->yy_buffer_stack,
  1959 								num_to_alloc * sizeof(struct yy_buffer_state*)
  1935 								num_to_alloc * sizeof(struct yy_buffer_state*)
  1960 								, yyscanner);
  1936 								, yyscanner);
  1961 		if ( ! yyg->yy_buffer_stack )
       
  1962 			YY_FATAL_ERROR( "out of dynamic memory in _gst_parse_yyensure_buffer_stack()" );
       
  1963 
  1937 
  1964 		/* zero only the new slots.*/
  1938 		/* zero only the new slots.*/
  1965 		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
  1939 		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
  1966 		yyg->yy_buffer_stack_max = num_to_alloc;
  1940 		yyg->yy_buffer_stack_max = num_to_alloc;
  1967 	}
  1941 	}
  2002 	return b;
  1976 	return b;
  2003 }
  1977 }
  2004 
  1978 
  2005 /** Setup the input buffer state to scan a string. The next call to _gst_parse_yylex() will
  1979 /** Setup the input buffer state to scan a string. The next call to _gst_parse_yylex() will
  2006  * scan from a @e copy of @a str.
  1980  * scan from a @e copy of @a str.
  2007  * @param yystr a NUL-terminated string to scan
  1981  * @param str a NUL-terminated string to scan
  2008  * @param yyscanner The scanner object.
  1982  * @param yyscanner The scanner object.
  2009  * @return the newly allocated buffer state object.
  1983  * @return the newly allocated buffer state object.
  2010  * @note If you want to scan bytes that may contain NUL values, then use
  1984  * @note If you want to scan bytes that may contain NUL values, then use
  2011  *       _gst_parse_yy_scan_bytes() instead.
  1985  *       _gst_parse_yy_scan_bytes() instead.
  2012  */
  1986  */
  2016 	return _gst_parse_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
  1990 	return _gst_parse_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
  2017 }
  1991 }
  2018 
  1992 
  2019 /** Setup the input buffer state to scan the given bytes. The next call to _gst_parse_yylex() will
  1993 /** Setup the input buffer state to scan the given bytes. The next call to _gst_parse_yylex() will
  2020  * scan from a @e copy of @a bytes.
  1994  * scan from a @e copy of @a bytes.
  2021  * @param yybytes the byte buffer to scan
  1995  * @param bytes the byte buffer to scan
  2022  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
  1996  * @param len the number of bytes in the buffer pointed to by @a bytes.
  2023  * @param yyscanner The scanner object.
  1997  * @param yyscanner The scanner object.
  2024  * @return the newly allocated buffer state object.
  1998  * @return the newly allocated buffer state object.
  2025  */
  1999  */
  2026 YY_BUFFER_STATE _gst_parse_yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
  2000 YY_BUFFER_STATE _gst_parse_yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
  2027 {
  2001 {
  2264     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
  2238     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
  2265 
  2239 
  2266     return yy_init_globals ( *ptr_yy_globals );
  2240     return yy_init_globals ( *ptr_yy_globals );
  2267 }
  2241 }
  2268 
  2242 
  2269 /* _gst_parse_yylex_init_extra has the same functionality as _gst_parse_yylex_init, but follows the
       
  2270  * convention of taking the scanner as the last argument. Note however, that
       
  2271  * this is a *pointer* to a scanner, as it will be allocated by this call (and
       
  2272  * is the reason, too, why this function also must handle its own declaration).
       
  2273  * The user defined value in the first argument will be available to _gst_parse_yyalloc in
       
  2274  * the yyextra field.
       
  2275  */
       
  2276 
       
  2277 int _gst_parse_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
       
  2278 
       
  2279 {
       
  2280     struct yyguts_t dummy_yyguts;
       
  2281 
       
  2282     _gst_parse_yyset_extra (yy_user_defined, &dummy_yyguts);
       
  2283 
       
  2284     if (ptr_yy_globals == NULL){
       
  2285         errno = EINVAL;
       
  2286         return 1;
       
  2287     }
       
  2288 	
       
  2289     *ptr_yy_globals = (yyscan_t) _gst_parse_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
       
  2290 	
       
  2291     if (*ptr_yy_globals == NULL){
       
  2292         errno = ENOMEM;
       
  2293         return 1;
       
  2294     }
       
  2295     
       
  2296     /* By setting to 0xAA, we expose bugs in
       
  2297     yy_init_globals. Leave at 0x00 for releases. */
       
  2298     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
       
  2299     
       
  2300     _gst_parse_yyset_extra (yy_user_defined, *ptr_yy_globals);
       
  2301     
       
  2302     return yy_init_globals ( *ptr_yy_globals );
       
  2303 }
       
  2304 
       
  2305 static int yy_init_globals (yyscan_t yyscanner)
  2243 static int yy_init_globals (yyscan_t yyscanner)
  2306 {
  2244 {
  2307     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2245     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2308     /* Initialization is the same as for the non-reentrant scanner.
  2246     /* Initialization is the same as for the non-reentrant scanner.
  2309      * This function is called from _gst_parse_yylex_destroy(), so don't allocate here.
  2247      * This function is called from _gst_parse_yylex_destroy(), so don't allocate here.
  2478 
  2416 
  2479 
  2417 
  2480 
  2418 
  2481 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
  2419 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
  2482 typedef union YYSTYPE
  2420 typedef union YYSTYPE
  2483 #line 566 "./grammar.y"
  2421 #line 521 "./grammar.y"
  2484 {
  2422 {
  2485     gchar *s;
  2423     gchar *s;
  2486     chain_t *c;
  2424     chain_t *c;
  2487     link_t *l;
  2425     link_t *l;
  2488     GstElement *e;
  2426     GstElement *e;