X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcmdparse.l;h=6e33c950fbbffde9cfb6d6ac374cba0556fa346c;hb=443753bea6ae30238a3c1af29ec9c60824dca7a4;hp=ebd466afa795061a7fe80ddcb93f0d6bb476e3e4;hpb=26a416e016314bdeb299cebccae3e8617b697d98;p=i3%2Fi3 diff --git a/src/cmdparse.l b/src/cmdparse.l index ebd466af..6e33c950 100644 --- a/src/cmdparse.l +++ b/src/cmdparse.l @@ -2,7 +2,7 @@ * vim:ts=4:sw=4:expandtab * * i3 - an improved dynamic tiling window manager - * © 2009-2010 Michael Stapelberg and contributors (see also: LICENSE) + * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE) * * cmdparse.l: the lexer for commands you send to i3 (or bind on keys) * @@ -65,16 +65,25 @@ EOL (\r?\n) cmdyycolumn = 1; } -[^\n]+ { BEGIN(INITIAL); cmdyylval.string = sstrdup(yytext); return STR; } [ \t]* { BEGIN(WANT_STRING); return WHITESPACE; } -\"[^\"]+\" { +\"[^\"]+\" { BEGIN(INITIAL); /* strip quotes */ char *copy = sstrdup(yytext+1); copy[strlen(copy)-1] = '\0'; cmdyylval.string = copy; return STR; - } + } +\"[^\"]+\" { + BEGIN(INITIAL); + /* strip quotes */ + char *copy = sstrdup(yytext+1); + copy[strlen(copy)-1] = '\0'; + cmdyylval.string = copy; + return STR; + } + +[^;\n]+ { BEGIN(INITIAL); cmdyylval.string = sstrdup(yytext); return STR; } [ \t]* { return WHITESPACE; } attach { return TOK_ATTACH; } @@ -83,6 +92,8 @@ exit { return TOK_EXIT; } reload { return TOK_RELOAD; } restart { return TOK_RESTART; } kill { return TOK_KILL; } +window { return TOK_WINDOW; } +client { return TOK_CLIENT; } fullscreen { return TOK_FULLSCREEN; } global { return TOK_GLOBAL; } layout { return TOK_LAYOUT; }