#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
/* 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.
#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
#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.
/* 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
/* 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
* 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. */
/* 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,
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; \
#line 71 "parse.l"
-#line 1069 "lex._gst_parse_yy.c"
+#line 1074 "lex._gst_parse_yy.c"
yylval = yylval_param;
BEGIN (INITIAL);
return ASSIGNMENT;
}
- YY_BREAK case 2:
- YY_RULE_SETUP
+ YY_BREAK case 2:YY_RULE_SETUP
#line 81 "parse.l"
{
yytext++;
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);
BEGIN (INITIAL);
return REF;
}
- YY_BREAK case 4:
+ YY_BREAK case 4:
/* rule 4 can match eol */
- YY_RULE_SETUP
+ YY_RULE_SETUP
#line 96 "parse.l"
{
gchar *pos = yytext;
while (!g_ascii_isspace (*pos) && (*pos != '.'))
- pos++;
- *pos = '\0';
- PRINT ("BINREF: %s", yytext);
- yylval->s = gst_parse_strdup (yytext);
- BEGIN (INITIAL);
- return BINREF;
+ pos++;
+ *pos = '\0';
+ PRINT ("BINREF: %s", yytext);
+ yylval->s = gst_parse_strdup (yytext);
+ 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);
BEGIN (INITIAL);
return IDENTIFIER;
}
- YY_BREAK case 6:
+ YY_BREAK case 6:
/* rule 6 can match eol */
- YY_RULE_SETUP
+ YY_RULE_SETUP
#line 113 "parse.l"
{
gchar *c = yytext;
- PRINT ("LINK: %s", yytext);
- c++;
- if (*c) {
+ PRINT ("LINK: %s", yytext);
+ c++;
+ if (*c)
+ {
while (g_ascii_isspace (*c))
c++;
c = yylval->s = gst_parse_strdup (c);
g_assert_not_reached ();
while (g_ascii_isspace (*--c));
*++c = '\0';
- } else {
+ } else
+ {
yylval->s = NULL;
}
BEGIN (INITIAL);
return LINK;
}
- YY_BREAK case 7:
+ YY_BREAK case 7:
/* rule 7 can match eol */
- YY_RULE_SETUP
+ YY_RULE_SETUP
#line 131 "parse.l"
{
PRINT ("URL: %s", yytext);
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);
return *yytext;
}
- YY_BREAK case 9:
+ YY_BREAK case 9:
/* rule 9 can match eol */
- YY_RULE_SETUP
+ YY_RULE_SETUP
#line 141 "parse.l"
{
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;
+ 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 ();
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] =
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 *));
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,
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)
{