retab! cfgparse.y
This commit is contained in:
parent
55f4e5ab68
commit
051caf571d
|
@ -263,16 +263,16 @@ workspace:
|
||||||
workspace_set_name(&(workspaces[ws_num - 1]), $<string>8);
|
workspace_set_name(&(workspaces[ws_num - 1]), $<string>8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
| TOKWORKSPACE WHITESPACE NUMBER workspace_name
|
| TOKWORKSPACE WHITESPACE NUMBER workspace_name
|
||||||
{
|
{
|
||||||
int ws_num = $<number>3;
|
int ws_num = $<number>3;
|
||||||
if (ws_num < 1 || ws_num > 10) {
|
if (ws_num < 1 || ws_num > 10) {
|
||||||
LOG("Invalid workspace assignment, workspace number %d out of range\n", ws_num);
|
LOG("Invalid workspace assignment, workspace number %d out of range\n", ws_num);
|
||||||
} else {
|
} else {
|
||||||
if ($<string>4 != NULL)
|
if ($<string>4 != NULL)
|
||||||
workspace_set_name(&(workspaces[ws_num - 1]), $<string>4);
|
workspace_set_name(&(workspaces[ws_num - 1]), $<string>4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
workspace_name:
|
workspace_name:
|
||||||
|
@ -293,34 +293,34 @@ assign:
|
||||||
{
|
{
|
||||||
printf("assignment of %s to %d\n", $<string>3, $<number>6);
|
printf("assignment of %s to %d\n", $<string>3, $<number>6);
|
||||||
|
|
||||||
struct Assignment *new = $<assignment>6;
|
struct Assignment *new = $<assignment>6;
|
||||||
new->windowclass_title = strdup($<string>3);
|
new->windowclass_title = strdup($<string>3);
|
||||||
TAILQ_INSERT_TAIL(&assignments, new, assignments);
|
TAILQ_INSERT_TAIL(&assignments, new, assignments);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
assign_target:
|
assign_target:
|
||||||
NUMBER
|
NUMBER
|
||||||
{
|
{
|
||||||
struct Assignment *new = scalloc(sizeof(struct Assignment));
|
struct Assignment *new = scalloc(sizeof(struct Assignment));
|
||||||
new->workspace = $<number>1;
|
new->workspace = $<number>1;
|
||||||
new->floating = ASSIGN_FLOATING_NO;
|
new->floating = ASSIGN_FLOATING_NO;
|
||||||
$<assignment>$ = new;
|
$<assignment>$ = new;
|
||||||
}
|
}
|
||||||
| '~'
|
| '~'
|
||||||
{
|
{
|
||||||
struct Assignment *new = scalloc(sizeof(struct Assignment));
|
struct Assignment *new = scalloc(sizeof(struct Assignment));
|
||||||
new->floating = ASSIGN_FLOATING_ONLY;
|
new->floating = ASSIGN_FLOATING_ONLY;
|
||||||
$<assignment>$ = new;
|
$<assignment>$ = new;
|
||||||
}
|
}
|
||||||
| '~' NUMBER
|
| '~' NUMBER
|
||||||
{
|
{
|
||||||
struct Assignment *new = scalloc(sizeof(struct Assignment));
|
struct Assignment *new = scalloc(sizeof(struct Assignment));
|
||||||
new->workspace = $<number>2;
|
new->workspace = $<number>2;
|
||||||
new->floating = ASSIGN_FLOATING;
|
new->floating = ASSIGN_FLOATING;
|
||||||
$<assignment>$ = new;
|
$<assignment>$ = new;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
window_class:
|
window_class:
|
||||||
QUOTEDSTRING
|
QUOTEDSTRING
|
||||||
|
|
Loading…
Reference in New Issue