diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-01-06 23:25:55 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-01-06 23:25:55 +0100 |
commit | b26d241f04059c858462367318f1a6427053a8b4 (patch) | |
tree | a0655aeea78760ee64b674ccb9fc864089031fc6 /lexer/theme-lexer.l | |
parent | 361d5c62d75b27be63395a2ef6667c80b5d132c7 (diff) |
Make parser accept old + more CSS style elements
Diffstat (limited to 'lexer/theme-lexer.l')
-rw-r--r-- | lexer/theme-lexer.l | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lexer/theme-lexer.l b/lexer/theme-lexer.l index e5995e25..9af32541 100644 --- a/lexer/theme-lexer.l +++ b/lexer/theme-lexer.l @@ -90,24 +90,25 @@ if ( queue == NULL ){ } /* Go into parsing an entry */ -<INITIAL>"\{" { +<NAMESTR>"\{" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(ENTRY); return BOPEN; } /* Pop out of parsing an entry. */ <ENTRY>"\}" { + g_queue_pop_head ( queue ); BEGIN(GPOINTER_TO_INT(g_queue_pop_head ( queue ))); return BCLOSE; } <INITIAL>"#" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(NAMESTR);return NAME_PREFIX;} -<INITIAL,NAMESTR>"." { return NSEP; } +<NAMESTR>\.|{WHITESPACE} { return NSEP; } <INITIAL,ENTRY>{WORD} { yylval->sval = g_strdup(yytext); return N_STRING;} <NAMESTR>{WORD} { yylval->sval = g_strdup(yytext); return NAME_ELEMENT;} /* After Namestr/Classstr we want to go to state str, then to { */ -<NAMESTR>{WHITESPACE} { BEGIN(GPOINTER_TO_INT (g_queue_pop_head ( queue )));} + /*<NAMESTR>{WHITESPACE} { BEGIN(GPOINTER_TO_INT (g_queue_pop_head ( queue )));}*/ <INITIAL,ENTRY>{WHITESPACE}+ ; // ignore all whitespace <PROPERTIES>{WHITESPACE}+ ; // ignore all whitespace |