parse.l: Modify command arguments.

+ --clip uri=file:// becomes clip file:// for example.
This commit is contained in:
Mathieu Duponchelle 2015-02-25 18:01:38 +01:00 committed by Thibault Saunier
parent e37d8e768f
commit d77ad923a6
2 changed files with 13 additions and 7 deletions

View file

@ -121,10 +121,16 @@ ges_structure_parser_parse_symbol (GESStructureParser * self,
{
_finish_structure (self);
while (*symbol == '-' || *symbol == ' ')
while (*symbol == ' ')
symbol++;
ges_structure_parser_parse_string (self, symbol, TRUE);
self->add_comma = TRUE;
self->add_comma = FALSE;
if (!g_ascii_strncasecmp (symbol, "clip", 4))
ges_structure_parser_parse_string (self, "clip, uri=", TRUE);
else if (!g_ascii_strncasecmp (symbol, "effect", 6))
ges_structure_parser_parse_string (self, "effect, bin-description=", TRUE);
else if (!g_ascii_strncasecmp (symbol, "transition", 10))
ges_structure_parser_parse_string (self, "transition, type=", TRUE);
}
void

View file

@ -10,11 +10,11 @@
%option never-interactive
%option noinput
CLIP [ ]+--clip[ ]+|[ ]+-c[ ]+
TRANSITION [ ]+--transition[ ]+|[ ]+-t[ ]+
EFFECT [ ]+--effect[ ]+|[ ]+-e[ ]+
CLIP [ ]+clip[ ]+
TRANSITION [ ]+transition[ ]+
EFFECT [ ]+effect[ ]+
SETTER [ ]+--set-[^ ]+[ ]+
SETTER [ ]+set-[^ ]+[ ]+
%%