diff --git a/src/cmdparse.l b/src/cmdparse.l index 9a236efc..d8320578 100644 --- a/src/cmdparse.l +++ b/src/cmdparse.l @@ -120,6 +120,7 @@ grow { return TOK_GROW; } px { return TOK_PX; } or { return TOK_OR; } ppt { return TOK_PPT; } +nop { BEGIN(WANT_WS_STRING); return TOK_NOP; } restore { BEGIN(WANT_WS_STRING); return TOK_RESTORE; } mark { BEGIN(WANT_WS_STRING); return TOK_MARK; } diff --git a/src/cmdparse.y b/src/cmdparse.y index 7f9dfd46..c2f0222e 100644 --- a/src/cmdparse.y +++ b/src/cmdparse.y @@ -144,6 +144,7 @@ char *parse_cmd(const char *new) { %token TOK_PX "px" %token TOK_OR "or" %token TOK_PPT "ppt" +%token TOK_NOP "nop" %token TOK_CLASS "class" %token TOK_ID "id" @@ -306,6 +307,7 @@ operation: | level | mark | resize + | nop ; exec: @@ -609,6 +611,16 @@ mark: } ; +nop: + TOK_NOP WHITESPACE STR + { + printf("-------------------------------------------------\n"); + printf(" NOP: %s\n", $3); + printf("-------------------------------------------------\n"); + free($3); + } + ; + resize: TOK_RESIZE WHITESPACE resize_way WHITESPACE direction resize_px resize_tiling {