6 #include "../gstinfo.h"
7 #include "grammar.tab.h"
13 #ifdef G_HAVE_ISO_VARARGS
14 # ifdef GST_DEBUG_ENABLED
15 # define PRINT(...) GST_DEBUG (GST_CAT_PIPELINE, "flex: "__VA_ARGS__)
17 #elif defined(G_HAVE_GNUC_VARARGS)
18 # ifdef GST_DEBUG_ENABLED
19 # define PRINT(...) GST_DEBUG (GST_CAT_PIPELINE, "flex: "##args)
22 # ifdef GST_DEBUG_ENABLED
23 # define PRINT(a...) GST_DEBUG (GST_CAT_PIPELINE, "flex: "##a)
25 #endif /* G_HAVE_ISO_VARARGS */
27 #define YY_DECL int _gst_parse_yylex (YYSTYPE *lvalp)
30 _operators [(){}.:!,=]
31 _identifier [[:alpha:]][[:alnum:]\-_%]*
33 _char ("\\".)|([^[:space:]])
34 _string {_char}+|("\""([^\"]|"\\\"")*"\"")
36 _comma [[:space:]]*","[[:space:]]*
37 _assign [[:space:]]*"="[[:space:]]*
39 /* we must do this here, because nearly everything matches a {_string} */
40 _assignment {_identifier}{_assign}{_string}
42 /* get pad/element references and stuff with dots right */
43 _padref "."{_identifier}
44 _ref {_identifier}"."{_identifier}?
45 _binref {_identifier}[[:space:]]*"."[[:space:]]*"("
54 PRINT ("ASSIGNMENT: %s\n", yytext);
55 lvalp->s = gst_parse_strdup (yytext);
62 PRINT ("PADREF: %s\n", yytext);
63 lvalp->s = gst_parse_strdup (yytext);
69 PRINT ("REF: %s\n", yytext);
70 lvalp->s = gst_parse_strdup (yytext);
77 while (!g_ascii_isspace (*pos) && (*pos != '.')) pos++;
79 PRINT ("BINREF: %s\n", yytext);
80 lvalp->s = gst_parse_strdup (yytext);
86 PRINT ("IDENTIFIER: %s\n", yytext);
87 lvalp->s = gst_parse_strdup (yytext);
92 {_operators} { PRINT ("OPERATOR: [%s]\n", yytext); return *yytext; }
94 [[:space:]]+ { PRINT ("SPACE: [%s]\n", yytext); }
97 printf ("???: %s\n", yytext);