Commit 0b6430f6 authored by David Schleef's avatar David Schleef
Browse files

parser: Allow element names to begin with digits

parent e9afe727
......@@ -35,7 +35,7 @@ PRINT (const char *format, ...)
%}
_operator [(){}.!,;=]
_identifier [[:alpha:]][[:alnum:]\-_%:]*
_identifier [[:alnum:]_][[:alnum:]\-_%:]*
_char ("\\".)|([^[:space:]])
_string {_char}+|("\""([^\"]|"\\\"")*"\"")|("'"([^']|"\\\'")*"'")
......
......@@ -99,6 +99,8 @@ static const gchar *test_lines[] = {
"fakesrc ! video/raw, format=(fourcc)YUY2; video/raw, format=(fourcc)YV12 ! fakesink silent=true",
"fakesrc ! audio/x-raw-int, width=[16, 32], depth={16, 24, 32}, signed=TRUE ! fakesink silent=true",
"fakesrc ! identity silent=true ! identity silent=true ! identity silent=true ! fakesink silent=true",
"fakesrc name=100 fakesink name=101 silent=true 100. ! 101.",
"fakesrc ! 1dentity ! fakesink silent=true",
NULL
};
......@@ -106,6 +108,18 @@ GST_START_TEST (test_launch_lines)
{
GstElement *pipeline;
const gchar **s;
GType type;
GstElementFactory *efac;
efac = gst_element_factory_find ("identity");
fail_unless (efac != NULL);
efac =
GST_ELEMENT_FACTORY (gst_plugin_feature_load (GST_PLUGIN_FEATURE (efac)));
fail_unless (efac != NULL);
type = gst_element_factory_get_element_type (efac);
fail_unless (type != 0);
g_object_unref (efac);
fail_unless (gst_element_register (NULL, "1dentity", GST_RANK_NONE, type));
for (s = test_lines; *s != NULL; s++) {
pipeline = setup_pipeline (*s);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment