47 #define YYBISON_VERSION "2.6.1"
50 #define YYSKELETON_NAME "yacc.c"
66 #line 1 "../i3-4.3/src/cfgparse.y"
73 #define I3__FILE__ "cfgparse.y"
74 #include <sys/types.h>
113 ELOG(
"CONFIG: %s\n", error_message);
114 ELOG(
"CONFIG: in file \"%s\", line %d:\n",
121 ELOG(
"CONFIG: %s\n", buffer);
138 while (*walk !=
'\0') {
145 if (strncasecmp(line,
"bindcode", strlen(
"bindcode")) == 0 ||
146 strncasecmp(line,
"force_focus_wrapping", strlen(
"force_focus_wrapping")) == 0 ||
147 strncasecmp(line,
"# i3 config file (v4)", strlen(
"# i3 config file (v4)")) == 0 ||
148 strncasecmp(line,
"workspace_layout", strlen(
"workspace_layout")) == 0) {
149 printf(
"deciding for version 4 due to this line: %.*s\n", (
int)(walk-line), line);
154 if (strncasecmp(line,
"bind", strlen(
"bind")) == 0) {
155 char *bind = strchr(line,
' ');
158 while ((*bind ==
' ' || *bind ==
'\t') && *bind !=
'\0')
162 if ((bind = strchr(bind,
' ')) == NULL)
164 while ((*bind ==
' ' || *bind ==
'\t') && *bind !=
'\0')
168 if (strncasecmp(bind,
"layout", strlen(
"layout")) == 0 ||
169 strncasecmp(bind,
"floating", strlen(
"floating")) == 0 ||
170 strncasecmp(bind,
"workspace", strlen(
"workspace")) == 0 ||
171 strncasecmp(bind,
"focus left", strlen(
"focus left")) == 0 ||
172 strncasecmp(bind,
"focus right", strlen(
"focus right")) == 0 ||
173 strncasecmp(bind,
"focus up", strlen(
"focus up")) == 0 ||
174 strncasecmp(bind,
"focus down", strlen(
"focus down")) == 0 ||
175 strncasecmp(bind,
"border normal", strlen(
"border normal")) == 0 ||
176 strncasecmp(bind,
"border 1pixel", strlen(
"border 1pixel")) == 0 ||
177 strncasecmp(bind,
"border borderless", strlen(
"border borderless")) == 0 ||
178 strncasecmp(bind,
"--no-startup-id", strlen(
"--no-startup-id")) == 0 ||
179 strncasecmp(bind,
"bar", strlen(
"bar")) == 0) {
180 printf(
"deciding for version 4 due to this line: %.*s\n", (
int)(walk-line), line);
207 if (pipe(writepipe) != 0 ||
208 pipe(readpipe) != 0) {
209 warn(
"migrate_config: Could not create pipes");
215 warn(
"Could not fork()");
223 dup2(writepipe[0], 0);
227 dup2(readpipe[1], 1);
229 static char *argv[] = {
245 while (written < size) {
246 if ((ret = write(writepipe[1], input + written, size - written)) < 0) {
247 warn(
"Could not write to pipe");
258 int conv_size = 65535;
259 char *converted = malloc(conv_size);
262 if (read_bytes == conv_size) {
264 converted = realloc(converted, conv_size);
266 ret = read(readpipe[0], converted + read_bytes, conv_size - read_bytes);
268 warn(
"Cannot read from pipe");
278 if (!WIFEXITED(status)) {
279 fprintf(stderr,
"Child did not terminate normally, using old config file (will lead to broken behaviour)\n");
283 int returncode = WEXITSTATUS(status);
284 if (returncode != 0) {
285 fprintf(stderr,
"Migration process exit code was != 0\n");
286 if (returncode == 2) {
287 fprintf(stderr,
"could not start the migration script\n");
289 }
else if (returncode == 1) {
290 fprintf(stderr,
"This already was a v4 config. Please add the following line to your config file:\n");
291 fprintf(stderr,
"# i3 config file (v4)\n");
306 ev_child_stop(EV_A_ watcher);
313 if (!WIFEXITED(watcher->rstatus)) {
314 fprintf(stderr,
"ERROR: i3-nagbar did not exit normally.\n");
318 int exitcode = WEXITSTATUS(watcher->rstatus);
319 printf(
"i3-nagbar process exited with status %d\n", exitcode);
321 fprintf(stderr,
"ERROR: i3-nagbar could not be found. Is it correctly installed on your system?\n");
330 #if EV_VERSION_MAJOR >= 4
336 static void nagbar_cleanup(EV_P_ ev_cleanup *watcher,
int revent) {
350 int fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IXUSR);
352 warn(
"Could not create temporary script to store the nagbar command");
355 write(fd,
"#!/bin/sh\n", strlen(
"#!/bin/sh\n"));
356 write(fd, command, strlen(command));
372 fprintf(stderr,
"Starting i3-nagbar due to configuration errors\n");
387 warn(
"Could not fork()");
393 char *edit_command, *pager_command;
394 sasprintf(&edit_command,
"i3-sensible-editor \"%s\" && i3-msg reload\n", config_path);
410 "You have an error in your i3 config file!" :
411 "Your config is outdated. Please fix the warnings to make sure everything works."),
416 (context->
has_errors ?
"show errors" :
"show warnings"),
425 ev_child *child =
smalloc(
sizeof(ev_child));
432 #if EV_VERSION_MAJOR >= 4
435 ev_cleanup *cleanup =
smalloc(
sizeof(ev_cleanup));
436 ev_cleanup_init(cleanup, nagbar_cleanup);
455 warn(
"kill(configerror_nagbar) failed");
487 if ((bind->
symbol == NULL && current->
symbol != NULL) ||
493 if (bind->
symbol != NULL &&
506 ELOG(
"Duplicate keybinding in config file:\n modmask %d with keycode %d, command \"%s\"\n",
509 ELOG(
"Duplicate keybinding in config file:\n modmask %d with keysym %s, command \"%s\"\n",
517 ELOG(
"**********************************************************************\n");
518 ELOG(
"IGNORING exec command: %s\n", exec->
command);
519 ELOG(
"It contains \"i3bar\". Since i3 v4.1, i3bar will be automatically started\n");
520 ELOG(
"for each 'bar' configuration block in your i3 config. Please remove the exec\n");
521 ELOG(
"line and add the following to your i3 config:\n");
524 ELOG(
" status_command i3status\n");
526 ELOG(
"**********************************************************************\n");
543 int fd, ret, read_bytes = 0;
547 char buffer[1026], key[512], value[512];
549 if ((fd = open(f, O_RDONLY)) == -1)
550 die(
"Could not open configuration file: %s\n", strerror(errno));
552 if (fstat(fd, &stbuf) == -1)
553 die(
"Could not fstat file: %s\n", strerror(errno));
555 buf =
scalloc((stbuf.st_size + 1) *
sizeof(
char));
556 while (read_bytes < stbuf.st_size) {
557 if ((ret = read(fd, buf + read_bytes, (stbuf.st_size - read_bytes))) < 0)
558 die(
"Could not read(): %s\n", strerror(errno));
562 if (lseek(fd, 0, SEEK_SET) == (off_t)-1)
563 die(
"Could not lseek: %s\n", strerror(errno));
565 if ((fstr = fdopen(fd,
"r")) == NULL)
566 die(
"Could not fdopen: %s\n", strerror(errno));
568 while (!feof(fstr)) {
569 if (fgets(buffer, 1024, fstr) == NULL) {
572 die(
"Could not read configuration file\n");
576 if (sscanf(buffer,
"%s %[^\n]", key, value) < 1 ||
577 key[0] ==
'#' || strlen(key) < 3)
580 if (strcasecmp(key,
"set") == 0) {
581 if (value[0] !=
'$') {
582 ELOG(
"Malformed variable assignment, name has to start with $\n");
587 char *v_key = value, *v_value;
588 if (strstr(value,
" ") == NULL && strstr(value,
"\t") == NULL) {
589 ELOG(
"Malformed variable assignment, need a value\n");
593 if (!(v_value = strstr(value,
" ")))
594 v_value = strstr(value,
"\t");
597 while (*v_value ==
'\t' || *v_value ==
' ')
604 DLOG(
"Got new variable %s = %s\n", v_key, v_value);
619 int extra = (strlen(current->
value) - strlen(current->
key));
622 next < (bufcopy + stbuf.st_size) &&
623 (next = strcasestr(next, current->
key)) != NULL;
624 next += strlen(current->
key)) {
626 extra_bytes += extra;
633 char *walk = buf, *destwalk;
634 char *
new =
smalloc((stbuf.st_size + extra_bytes + 1) *
sizeof(
char));
636 while (walk < (buf + stbuf.st_size)) {
641 int distance = stbuf.st_size;
645 if ((current->
next_match - walk) < distance) {
650 if (nearest == NULL) {
652 strncpy(destwalk, walk, (buf + stbuf.st_size) - walk);
653 destwalk += (buf + stbuf.st_size) - walk;
658 strncpy(destwalk, walk, distance);
659 strncpy(destwalk + distance, nearest->
value, strlen(nearest->
value));
660 walk += distance + strlen(nearest->
key);
661 destwalk += distance + strlen(nearest->
value);
671 if (converted != NULL) {
673 ELOG(
"****************************************************************\n");
674 ELOG(
"NOTE: Automatically converted configuration file from v3 to v4.\n");
676 ELOG(
"Please convert your config file to v4. You can use this command:\n");
677 ELOG(
" mv %s %s.O\n", f, f);
678 ELOG(
" i3-migrate-config-to-v4 %s.O > %s\n", f, f);
679 ELOG(
"****************************************************************\n");
685 printf(
"**********************************************************************\n");
686 printf(
"ERROR: Could not convert config file. Maybe i3-migrate-config-to-v4\n");
687 printf(
"was not correctly installed on your system?\n");
688 printf(
"**********************************************************************\n");
696 context =
scalloc(
sizeof(
struct context));
700 fprintf(stderr,
"Could not parse configfile\n");
714 if (strstr(exec->
command,
"i3bar") != NULL) {
723 if (strstr(exec->
command,
"i3bar") != NULL) {
731 ELOG(
"FYI: You are using i3 version " I3_VERSION
"\n");
733 ELOG(
"Please convert your configfile first, then fix any remaining errors (see above).\n");
755 #line 756 "src/cfgparse.tab.c"
758 # if defined __cplusplus && 201103L <= __cplusplus
759 # define YY_NULL nullptr
766 #ifdef YYERROR_VERBOSE
767 # undef YYERROR_VERBOSE
768 # define YYERROR_VERBOSE 1
770 # define YYERROR_VERBOSE 1
775 #ifndef YY_SRC_CFGPARSE_TAB_H
776 # define YY_SRC_CFGPARSE_TAB_H
891 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
895 #line 692 "../i3-4.3/src/cfgparse.y"
906 #line 907 "src/cfgparse.tab.c"
908 # define YYSTYPE_IS_TRIVIAL 1
909 # define yystype YYSTYPE
910 # define YYSTYPE_IS_DECLARED 1
916 #if defined __STDC__ || defined __cplusplus
917 int yyparse (
void *YYPARSE_PARAM);
922 #if defined __STDC__ || defined __cplusplus
934 #line 935 "src/cfgparse.tab.c"
948 #elif (defined __STDC__ || defined __C99__FUNC__ \
949 || defined __cplusplus || defined _MSC_VER)
968 # ifdef __SIZE_TYPE__
969 # define YYSIZE_T __SIZE_TYPE__
970 # elif defined size_t
971 # define YYSIZE_T size_t
972 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
973 || defined __cplusplus || defined _MSC_VER)
975 # define YYSIZE_T size_t
977 # define YYSIZE_T unsigned int
981 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
984 # if defined YYENABLE_NLS && YYENABLE_NLS
986 # include <libintl.h>
987 # define YY_(msgid) dgettext ("bison-runtime", msgid)
991 # define YY_(msgid) msgid
996 #if ! defined lint || defined __GNUC__
997 # define YYUSE(e) ((void) (e))
1004 # define YYID(n) (n)
1006 #if (defined __STDC__ || defined __C99__FUNC__ \
1007 || defined __cplusplus || defined _MSC_VER)
1020 #if ! defined yyoverflow || YYERROR_VERBOSE
1024 # ifdef YYSTACK_USE_ALLOCA
1025 # if YYSTACK_USE_ALLOCA
1027 # define YYSTACK_ALLOC __builtin_alloca
1028 # elif defined __BUILTIN_VA_ARG_INCR
1029 # include <alloca.h>
1031 # define YYSTACK_ALLOC __alloca
1032 # elif defined _MSC_VER
1033 # include <malloc.h>
1034 # define alloca _alloca
1036 # define YYSTACK_ALLOC alloca
1037 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
1038 || defined __cplusplus || defined _MSC_VER)
1039 # include <stdlib.h>
1041 # ifndef EXIT_SUCCESS
1042 # define EXIT_SUCCESS 0
1049 # ifdef YYSTACK_ALLOC
1051 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
1052 # ifndef YYSTACK_ALLOC_MAXIMUM
1057 # define YYSTACK_ALLOC_MAXIMUM 4032
1060 # define YYSTACK_ALLOC YYMALLOC
1061 # define YYSTACK_FREE YYFREE
1062 # ifndef YYSTACK_ALLOC_MAXIMUM
1063 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1065 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
1066 && ! ((defined YYMALLOC || defined malloc) \
1067 && (defined YYFREE || defined free)))
1068 # include <stdlib.h>
1069 # ifndef EXIT_SUCCESS
1070 # define EXIT_SUCCESS 0
1074 # define YYMALLOC malloc
1075 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
1076 || defined __cplusplus || defined _MSC_VER)
1081 # define YYFREE free
1082 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
1083 || defined __cplusplus || defined _MSC_VER)
1091 #if (! defined yyoverflow \
1092 && (! defined __cplusplus \
1093 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1103 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1107 # define YYSTACK_BYTES(N) \
1108 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1109 + YYSTACK_GAP_MAXIMUM)
1111 # define YYCOPY_NEEDED 1
1118 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1121 YYSIZE_T yynewbytes; \
1122 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1123 Stack = &yyptr->Stack_alloc; \
1124 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1125 yyptr += yynewbytes / sizeof (*yyptr); \
1131 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
1135 # if defined __GNUC__ && 1 < __GNUC__
1136 # define YYCOPY(Dst, Src, Count) \
1137 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
1139 # define YYCOPY(Dst, Src, Count) \
1143 for (yyi = 0; yyi < (Count); yyi++) \
1144 (Dst)[yyi] = (Src)[yyi]; \
1157 #define YYNTOKENS 105
1161 #define YYNRULES 186
1163 #define YYNSTATES 279
1166 #define YYUNDEFTOK 2
1167 #define YYMAXUTOK 353
1169 #define YYTRANSLATE(YYX) \
1170 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1175 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1176 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1177 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1178 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1179 2, 2, 2, 104, 2, 2, 2, 2, 2, 2,
1180 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1181 2, 101, 2, 2, 2, 2, 2, 2, 2, 2,
1182 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1183 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1184 2, 99, 2, 100, 2, 2, 2, 2, 2, 2,
1185 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1186 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1187 2, 2, 2, 102, 2, 103, 2, 2, 2, 2,
1188 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1189 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1190 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1191 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1192 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1193 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1194 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1195 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1196 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1197 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1198 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1199 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1200 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1201 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1202 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1203 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1204 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1205 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1206 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1207 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1208 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1209 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1218 0, 0, 3, 4, 7, 10, 12, 14, 16, 18,
1219 20, 22, 24, 26, 28, 30, 32, 34, 36, 38,
1220 40, 42, 44, 46, 48, 50, 52, 54, 56, 58,
1221 60, 62, 64, 66, 68, 70, 72, 74, 76, 79,
1222 82, 87, 92, 93, 95, 99, 100, 104, 106, 108,
1223 111, 113, 117, 121, 125, 129, 133, 137, 141, 145,
1224 147, 149, 151, 153, 159, 160, 163, 165, 167, 172,
1225 173, 176, 178, 180, 182, 184, 186, 188, 190, 192,
1226 194, 196, 198, 200, 202, 204, 206, 208, 210, 212,
1227 214, 217, 220, 223, 226, 229, 231, 233, 236, 238,
1228 240, 243, 245, 247, 249, 251, 253, 255, 257, 260,
1229 263, 266, 269, 274, 277, 280, 284, 289, 293, 298,
1230 302, 307, 311, 316, 321, 326, 329, 332, 334, 336,
1231 338, 341, 346, 348, 350, 352, 355, 358, 360, 362,
1232 364, 366, 368, 371, 373, 375, 377, 379, 381, 384,
1233 387, 390, 393, 396, 399, 405, 409, 410, 412, 414,
1234 416, 418, 422, 426, 428, 430, 433, 436, 440, 444,
1235 445, 447, 450, 453, 456, 461, 467, 469, 470, 472,
1236 476, 479, 481, 483, 485, 488, 490
1242 106, 0, -1, -1, 106, 1, -1, 106, 107, -1,
1243 110, -1, 115, -1, 123, -1, 126, -1, 150, -1,
1244 151, -1, 152, -1, 153, -1, 155, -1, 157, -1,
1245 158, -1, 161, -1, 163, -1, 164, -1, 165, -1,
1246 166, -1, 167, -1, 168, -1, 169, -1, 172, -1,
1247 174, -1, 175, -1, 176, -1, 177, -1, 181, -1,
1248 182, -1, 179, -1, 180, -1, 108, -1, 186, -1,
1249 11, -1, 5, -1, 111, -1, 9, 112, -1, 13,
1250 113, -1, 114, 184, 3, 109, -1, 114, 184, 122,
1251 109, -1, -1, 90, -1, 59, 116, 109, -1, -1,
1252 117, 119, 118, -1, 99, -1, 100, -1, 119, 120,
1253 -1, 120, -1, 92, 101, 5, -1, 93, 101, 5,
1254 -1, 94, 101, 5, -1, 96, 101, 5, -1, 95,
1255 101, 5, -1, 91, 101, 5, -1, 97, 101, 5,
1256 -1, 98, 101, 5, -1, 20, -1, 3, -1, 4,
1257 -1, 3, -1, 32, 20, 102, 124, 103, -1, -1,
1258 124, 125, -1, 108, -1, 111, -1, 33, 102, 127,
1259 103, -1, -1, 127, 128, -1, 108, -1, 129, -1,
1260 130, -1, 131, -1, 132, -1, 133, -1, 135, -1,
1261 137, -1, 139, -1, 140, -1, 141, -1, 142, -1,
1262 143, -1, 144, -1, 145, -1, 146, -1, 147, -1,
1263 148, -1, 149, -1, 77, 5, -1, 78, 5, -1,
1264 60, 5, -1, 61, 5, -1, 74, 134, -1, 76,
1265 -1, 75, -1, 63, 136, -1, 64, -1, 65, -1,
1266 66, 138, -1, 67, -1, 68, -1, 69, -1, 70,
1267 -1, 71, -1, 72, -1, 73, -1, 79, 5, -1,
1268 80, 160, -1, 81, 160, -1, 62, 5, -1, 82,
1269 102, 127, 103, -1, 83, 7, -1, 84, 7, -1,
1270 85, 7, 7, -1, 85, 7, 7, 7, -1, 86,
1271 7, 7, -1, 86, 7, 7, 7, -1, 87, 7,
1272 7, -1, 87, 7, 7, 7, -1, 88, 7, 7,
1273 -1, 88, 7, 7, 7, -1, 18, 3, 4, 3,
1274 -1, 19, 3, 4, 3, -1, 17, 184, -1, 34,
1275 154, -1, 35, -1, 36, -1, 37, -1, 38, 156,
1276 -1, 38, 55, 55, 3, -1, 52, -1, 53, -1,
1277 54, -1, 39, 159, -1, 40, 159, -1, 41, -1,
1278 42, -1, 43, -1, 3, -1, 4, -1, 44, 162,
1279 -1, 42, -1, 36, -1, 35, -1, 45, -1, 160,
1280 -1, 46, 160, -1, 47, 160, -1, 48, 160, -1,
1281 49, 5, -1, 50, 160, -1, 51, 160, -1, 21,
1282 121, 22, 8, 170, -1, 21, 3, 171, -1, -1,
1283 171, -1, 20, -1, 5, -1, 4, -1, 23, 173,
1284 5, -1, 23, 116, 5, -1, 20, -1, 6, -1,
1285 25, 5, -1, 26, 5, -1, 27, 178, 5, -1,
1286 28, 178, 5, -1, -1, 89, -1, 10, 5, -1,
1287 12, 5, -1, 29, 183, -1, 30, 183, 183, 183,
1288 -1, 30, 183, 183, 183, 183, -1, 7, -1, -1,
1289 185, -1, 184, 104, 185, -1, 184, 104, -1, 14,
1290 -1, 15, -1, 16, -1, 56, 187, -1, 57, -1,
1297 0, 829, 829, 830, 831, 835, 836, 837, 838, 839,
1298 840, 841, 842, 843, 844, 845, 846, 847, 848, 849,
1299 850, 851, 852, 853, 854, 855, 856, 857, 858, 859,
1300 860, 861, 862, 863, 864, 868, 872, 876, 883, 884,
1301 888, 903, 918, 919, 923, 938, 939, 946, 954, 961,
1302 962, 966, 972, 978, 984, 999, 1014, 1020, 1026, 1043,
1303 1044, 1048, 1049, 1056, 1079, 1081, 1085, 1086, 1098, 1125,
1304 1127, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139,
1305 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149,
1306 1153, 1162, 1171, 1182, 1191, 1199, 1200, 1204, 1212, 1213,
1307 1217, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1234, 1243,
1308 1253, 1261, 1270, 1279, 1287, 1295, 1302, 1313, 1320, 1331,
1309 1338, 1348, 1355, 1365, 1375, 1385, 1393, 1401, 1402, 1403,
1310 1407, 1431, 1452, 1453, 1454, 1458, 1466, 1474, 1475, 1476,
1311 1480, 1484, 1496, 1504, 1505, 1506, 1507, 1508, 1512, 1520,
1312 1528, 1536, 1544, 1552, 1560, 1594, 1612, 1613, 1617, 1618,
1313 1619, 1623, 1685, 1701, 1702, 1706, 1713, 1720, 1730, 1740,
1314 1741, 1745, 1753, 1764, 1772, 1780, 1792, 1801, 1802, 1803,
1315 1804, 1808, 1809, 1810, 1814, 1822, 1823
1319 #if YYDEBUG || YYERROR_VERBOSE || 1
1324 "$end",
"error",
"$undefined",
"\"<number>\"",
"\"<word>\"",
1325 "\"<string>\"",
"\"<string (non-greedy)>\"",
"\"#<hex>\"",
1326 "\"<RandR output>\"",
"TOKBINDCODE",
"TOKTERMINAL",
"\"<comment>\"",
1327 "\"font\"",
"\"bindsym\"",
"\"<modifier>\"",
"\"control\"",
"\"shift\"",
1328 "\"floating_modifier\"",
"\"floating_maximum_size\"",
1329 "\"floating_minimum_size\"",
"\"<quoted string>\"",
"\"workspace\"",
1330 "\"output\"",
"\"assign\"",
"TOKSET",
"\"ipc_socket\"",
1331 "\"restart_state\"",
"\"exec\"",
"\"exec_always\"",
"TOKSINGLECOLOR",
1332 "TOKCOLOR",
"\"\\342\\206\\222\"",
"\"mode\"",
"\"bar\"",
1333 "\"default_orientation\"",
"\"horizontal\"",
"\"vertical\"",
"\"auto\"",
1334 "\"workspace_layout\"",
"\"new_window\"",
"\"new_float\"",
"\"normal\"",
1335 "\"none\"",
"\"1pixel\"",
"\"hide_edge_borders\"",
"\"both\"",
1336 "\"focus_follows_mouse\"",
"\"force_focus_wrapping\"",
1337 "\"force_xinerama\"",
"\"fake_outputs\"",
1338 "\"workspace_auto_back_and_forth\"",
"\"workspace_bar\"",
"\"default\"",
1339 "\"stacking\"",
"\"tabbed\"",
"\"stack-limit\"",
1340 "\"popup_during_fullscreen\"",
"\"ignore\"",
"\"leave_fullscreen\"",
1341 "\"for_window\"",
"\"output (bar)\"",
"\"tray_output\"",
1342 "\"socket_path\"",
"\"mode (bar)\"",
"\"hide\"",
"\"dock\"",
1343 "\"modifier (bar)\"",
"\"shift (bar)\"",
"\"control (bar)\"",
"\"Mod1\"",
1344 "\"Mod2\"",
"\"Mod3\"",
"\"Mod4\"",
"\"Mod5\"",
"\"position\"",
1345 "\"bottom\"",
"\"top\"",
"\"status_command\"",
"\"i3bar_command\"",
1346 "\"font (bar)\"",
"\"workspace_buttons\"",
"\"verbose\"",
"\"colors\"",
1347 "\"background\"",
"\"statusline\"",
"\"focused_workspace\"",
1348 "\"active_workspace\"",
"\"inactive_workspace\"",
"\"urgent_workspace\"",
1349 "\"--no-startup-id\"",
"\"--release\"",
"\"mark\"",
"\"class\"",
1350 "\"instance\"",
"\"window_role\"",
"\"id\"",
"\"con_id\"",
"\"title\"",
1351 "\"urgent\"",
"'['",
"']'",
"'='",
"'{'",
"'}'",
"'+'",
"$accept",
1352 "lines",
"line",
"comment",
"command",
"bindline",
"binding",
"bindcode",
1353 "bindsym",
"optional_release",
"for_window",
"match",
"matchstart",
1354 "matchend",
"criteria",
"criterion",
"qstring_or_number",
1355 "word_or_number",
"mode",
"modelines",
"modeline",
"bar",
"barlines",
1356 "barline",
"bar_status_command",
"bar_i3bar_command",
"bar_output",
1357 "bar_tray_output",
"bar_position",
"bar_position_position",
"bar_mode",
1358 "bar_mode_mode",
"bar_modifier",
"bar_modifier_modifier",
"bar_font",
1359 "bar_workspace_buttons",
"bar_verbose",
"bar_socket_path",
"bar_colors",
1360 "bar_color_background",
"bar_color_statusline",
1361 "bar_color_focused_workspace",
"bar_color_active_workspace",
1362 "bar_color_inactive_workspace",
"bar_color_urgent_workspace",
1363 "floating_maximum_size",
"floating_minimum_size",
"floating_modifier",
1364 "orientation",
"direction",
"workspace_layout",
"layout_mode",
1365 "new_window",
"new_float",
"border_style",
"bool",
"hide_edge_borders",
1366 "edge_hiding_mode",
"focus_follows_mouse",
"force_focus_wrapping",
1367 "force_xinerama",
"fake_outputs",
"workspace_back_and_forth",
1368 "workspace_bar",
"workspace",
"optional_workspace_name",
1369 "workspace_name",
"assign",
"window_class",
"ipcsocket",
"restart_state",
1370 "exec",
"exec_always",
"optional_no_startup_id",
"terminal",
"font",
1371 "single_color",
"color",
"colorpixel",
"binding_modifiers",
1372 "binding_modifier",
"popup_during_fullscreen",
"popup_setting",
YY_NULL
1379 static const yytype_uint16 yytoknum[] =
1381 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1382 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1383 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1384 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1385 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1386 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1387 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1388 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1389 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1390 345, 346, 347, 348, 349, 350, 351, 352, 353, 91,
1391 93, 61, 123, 125, 43
1398 0, 105, 106, 106, 106, 107, 107, 107, 107, 107,
1399 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
1400 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
1401 107, 107, 107, 107, 107, 108, 109, 110, 111, 111,
1402 112, 113, 114, 114, 115, 116, 116, 117, 118, 119,
1403 119, 120, 120, 120, 120, 120, 120, 120, 120, 121,
1404 121, 122, 122, 123, 124, 124, 125, 125, 126, 127,
1405 127, 128, 128, 128, 128, 128, 128, 128, 128, 128,
1406 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
1407 129, 130, 131, 132, 133, 134, 134, 135, 136, 136,
1408 137, 138, 138, 138, 138, 138, 138, 138, 139, 140,
1409 141, 142, 143, 144, 145, 146, 146, 147, 147, 148,
1410 148, 149, 149, 150, 151, 152, 153, 154, 154, 154,
1411 155, 155, 156, 156, 156, 157, 158, 159, 159, 159,
1412 160, 160, 161, 162, 162, 162, 162, 162, 163, 164,
1413 165, 166, 167, 168, 169, 169, 170, 170, 171, 171,
1414 171, 172, 172, 173, 173, 174, 175, 176, 177, 178,
1415 178, 179, 180, 181, 182, 182, 183, 184, 184, 184,
1416 184, 185, 185, 185, 186, 187, 187
1422 0, 2, 0, 2, 2, 1, 1, 1, 1, 1,
1423 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1424 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1425 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
1426 4, 4, 0, 1, 3, 0, 3, 1, 1, 2,
1427 1, 3, 3, 3, 3, 3, 3, 3, 3, 1,
1428 1, 1, 1, 5, 0, 2, 1, 1, 4, 0,
1429 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1430 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1431 2, 2, 2, 2, 2, 1, 1, 2, 1, 1,
1432 2, 1, 1, 1, 1, 1, 1, 1, 2, 2,
1433 2, 2, 4, 2, 2, 3, 4, 3, 4, 3,
1434 4, 3, 4, 4, 4, 2, 2, 1, 1, 1,
1435 2, 4, 1, 1, 1, 2, 2, 1, 1, 1,
1436 1, 1, 2, 1, 1, 1, 1, 1, 2, 2,
1437 2, 2, 2, 2, 5, 3, 0, 1, 1, 1,
1438 1, 3, 3, 1, 1, 2, 2, 3, 3, 0,
1439 1, 2, 2, 2, 4, 5, 1, 0, 1, 3,
1448 2, 0, 1, 3, 42, 0, 35, 0, 42, 177,
1449 0, 0, 0, 45, 0, 0, 169, 169, 0, 0,
1450 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1451 0, 0, 0, 0, 45, 4, 33, 5, 37, 6,
1452 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1453 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1454 27, 28, 31, 32, 29, 30, 34, 43, 38, 177,
1455 171, 172, 39, 177, 181, 182, 183, 125, 178, 0,
1456 0, 60, 59, 0, 164, 163, 47, 0, 0, 0,
1457 165, 166, 170, 0, 0, 176, 173, 0, 0, 69,
1458 127, 128, 129, 126, 132, 133, 134, 0, 130, 137,
1459 138, 139, 135, 136, 140, 141, 145, 144, 143, 146,
1460 147, 142, 148, 149, 150, 151, 152, 153, 185, 186,
1461 184, 0, 0, 0, 180, 0, 0, 160, 159, 158,
1462 155, 0, 162, 0, 0, 0, 0, 0, 0, 0,
1463 0, 0, 50, 161, 167, 168, 0, 64, 0, 0,
1464 36, 44, 0, 62, 61, 0, 179, 123, 124, 156,
1465 0, 0, 0, 0, 0, 0, 0, 0, 48, 46,
1466 49, 174, 0, 0, 0, 0, 0, 0, 0, 0,
1467 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1468 0, 68, 71, 70, 72, 73, 74, 75, 76, 77,
1469 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
1470 88, 89, 131, 40, 41, 154, 157, 56, 51, 52,
1471 53, 55, 54, 57, 58, 175, 63, 66, 67, 65,
1472 92, 93, 111, 98, 99, 97, 101, 102, 103, 104,
1473 105, 106, 107, 100, 96, 95, 94, 90, 91, 108,
1474 109, 110, 69, 113, 114, 0, 0, 0, 0, 0,
1475 115, 117, 119, 121, 112, 116, 118, 120, 122
1481 -1, 1, 35, 202, 161, 37, 38, 68, 72, 69,
1482 39, 87, 88, 179, 151, 152, 83, 165, 40, 182,
1483 239, 41, 158, 203, 204, 205, 206, 207, 208, 256,
1484 209, 245, 210, 253, 211, 212, 213, 214, 215, 216,
1485 217, 218, 219, 220, 221, 42, 43, 44, 45, 103,
1486 46, 108, 47, 48, 112, 120, 49, 121, 50, 51,
1487 52, 53, 54, 55, 56, 225, 140, 57, 89, 58,
1488 59, 60, 61, 93, 62, 63, 64, 65, 96, 77,
1494 #define YYPACT_NINF -140
1497 -140, 161, -140, -140, -77, 20, -140, 22, -77, 46,
1498 48, 60, 8, 4, 63, 74, -9, -9, 77, 77,
1499 79, -4, 30, 0, 35, 35, 14, 44, 44, 44,
1500 95, 44, 44, 16, 2, -140, -140, -140, -140, -140,
1501 -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
1502 -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
1503 -140, -140, -140, -140, -140, -140, -140, -140, -140, 46,
1504 -140, -140, -140, 46, -140, -140, -140, -2, -140, 100,
1505 103, 17, -140, 86, -140, -140, -140, 105, -52, 106,
1506 -140, -140, -140, 112, 113, -140, -140, 77, 18, -140,
1507 -140, -140, -140, -140, -140, -140, -140, 66, -140, -140,
1508 -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
1509 -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
1510 -140, 117, 1, 5, 46, 120, 121, -140, -140, -140,
1511 -140, 118, -140, 24, 27, 28, 41, 42, 51, 52,
1512 54, -62, -140, -140, -140, -140, 77, -140, 9, 151,
1513 -140, -140, 117, -140, -140, 117, -140, -140, -140, 17,
1514 152, 153, 154, 155, 158, 159, 160, 163, -140, -140,
1515 -140, 77, 3, 170, 171, 172, -7, 78, 6, 178,
1516 180, 187, 44, 44, 94, 190, 191, 195, 196, 197,
1517 199, -140, -140, -140, -140, -140, -140, -140, -140, -140,
1518 -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
1519 -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
1520 -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
1521 -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
1522 -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
1523 -140, -140, -140, -140, -140, 206, 207, 208, 209, 53,
1524 211, 212, 214, 215, -140, -140, -140, -140, -140
1530 -140, -140, -140, -1, -139, -140, 43, -140, -140, 216,
1531 -140, 189, -140, -140, -140, 75, -140, -140, -140, -140,
1532 -140, -140, -35, -140, -140, -140, -140, -140, -140, -140,
1533 -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
1534 -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
1535 -140, -140, -140, -140, 203, -26, -140, -140, -140, -140,
1536 -140, -140, -140, -140, -140, -140, 61, -140, -140, -140,
1537 -140, -140, -140, 217, -140, -140, -140, -140, -12, -54,
1544 #define YYTABLE_NINF -1
1547 36, 122, 123, 124, 162, 126, 127, 97, 163, 164,
1548 84, 81, 4, 67, 6, 132, 8, 114, 115, 133,
1549 6, 137, 138, 223, 85, 70, 224, 71, 82, 143,
1550 144, 145, 146, 147, 148, 149, 150, 139, 178, 143,
1551 144, 145, 146, 147, 148, 149, 150, 114, 115, 116,
1552 117, 79, 104, 105, 106, 107, 118, 243, 244, 119,
1553 74, 75, 76, 80, 6, 100, 101, 102, 90, 183,
1554 184, 185, 186, 128, 129, 187, 109, 110, 111, 91,
1555 92, 254, 255, 188, 95, 156, 189, 190, 191, 192,
1556 193, 194, 195, 196, 197, 198, 199, 200, 99, 98,
1557 125, 86, 134, 86, 135, 134, 236, 136, 141, 134,
1558 142, 153, 201, 183, 184, 185, 186, 154, 155, 187,
1559 157, 159, 160, 167, 168, 170, 169, 188, 171, 172,
1560 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
1561 199, 200, 173, 174, 181, 246, 247, 248, 249, 250,
1562 251, 252, 175, 176, 222, 177, 274, 227, 228, 229,
1563 230, 2, 3, 231, 232, 233, 260, 261, 234, 235,
1564 4, 5, 6, 7, 8, 240, 241, 242, 9, 10,
1565 11, 237, 12, 257, 13, 258, 14, 15, 16, 17,
1566 18, 19, 259, 20, 21, 22, 262, 263, 264, 23,
1567 24, 25, 265, 266, 267, 26, 268, 27, 28, 29,
1568 30, 31, 32, 270, 271, 272, 273, 33, 275, 276,
1569 34, 277, 278, 131, 73, 238, 180, 269, 113, 0,
1573 #define yypact_value_is_default(yystate) \
1574 ((yystate) == (-140))
1576 #define yytable_value_is_error(yytable_value) \
1581 1, 27, 28, 29, 3, 31, 32, 19, 3, 4,
1582 6, 3, 9, 90, 11, 69, 13, 3, 4, 73,
1583 11, 4, 5, 162, 20, 5, 165, 5, 20, 91,
1584 92, 93, 94, 95, 96, 97, 98, 20, 100, 91,
1585 92, 93, 94, 95, 96, 97, 98, 3, 4, 35,
1586 36, 3, 52, 53, 54, 55, 42, 64, 65, 45,
1587 14, 15, 16, 3, 11, 35, 36, 37, 5, 60,
1588 61, 62, 63, 57, 58, 66, 41, 42, 43, 5,
1589 89, 75, 76, 74, 7, 97, 77, 78, 79, 80,
1590 81, 82, 83, 84, 85, 86, 87, 88, 102, 20,
1591 5, 99, 104, 99, 4, 104, 103, 4, 22, 104,
1592 5, 5, 103, 60, 61, 62, 63, 5, 5, 66,
1593 102, 55, 5, 3, 3, 101, 8, 74, 101, 101,
1594 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
1595 87, 88, 101, 101, 156, 67, 68, 69, 70, 71,
1596 72, 73, 101, 101, 3, 101, 103, 5, 5, 5,
1597 5, 0, 1, 5, 5, 5, 192, 193, 5, 181,
1598 9, 10, 11, 12, 13, 5, 5, 5, 17, 18,
1599 19, 182, 21, 5, 23, 5, 25, 26, 27, 28,
1600 29, 30, 5, 32, 33, 34, 102, 7, 7, 38,
1601 39, 40, 7, 7, 7, 44, 7, 46, 47, 48,
1602 49, 50, 51, 7, 7, 7, 7, 56, 7, 7,
1603 59, 7, 7, 34, 8, 182, 151, 262, 25, -1,
1604 169, 134, -1, -1, 17
1611 0, 106, 0, 1, 9, 10, 11, 12, 13, 17,
1612 18, 19, 21, 23, 25, 26, 27, 28, 29, 30,
1613 32, 33, 34, 38, 39, 40, 44, 46, 47, 48,
1614 49, 50, 51, 56, 59, 107, 108, 110, 111, 115,
1615 123, 126, 150, 151, 152, 153, 155, 157, 158, 161,
1616 163, 164, 165, 166, 167, 168, 169, 172, 174, 175,
1617 176, 177, 179, 180, 181, 182, 186, 90, 112, 114,
1618 5, 5, 113, 114, 14, 15, 16, 184, 185, 3,
1619 3, 3, 20, 121, 6, 20, 99, 116, 117, 173,
1620 5, 5, 89, 178, 178, 7, 183, 183, 20, 102,
1621 35, 36, 37, 154, 52, 53, 54, 55, 156, 41,
1622 42, 43, 159, 159, 3, 4, 35, 36, 42, 45,
1623 160, 162, 160, 160, 160, 5, 160, 160, 57, 58,
1624 187, 116, 184, 184, 104, 4, 4, 4, 5, 20,
1625 171, 22, 5, 91, 92, 93, 94, 95, 96, 97,
1626 98, 119, 120, 5, 5, 5, 183, 102, 127, 55,
1627 5, 109, 3, 3, 4, 122, 185, 3, 3, 8,
1628 101, 101, 101, 101, 101, 101, 101, 101, 100, 118,
1629 120, 183, 124, 60, 61, 62, 63, 66, 74, 77,
1630 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
1631 88, 103, 108, 128, 129, 130, 131, 132, 133, 135,
1632 137, 139, 140, 141, 142, 143, 144, 145, 146, 147,
1633 148, 149, 3, 109, 109, 170, 171, 5, 5, 5,
1634 5, 5, 5, 5, 5, 183, 103, 108, 111, 125,
1635 5, 5, 5, 64, 65, 136, 67, 68, 69, 70,
1636 71, 72, 73, 138, 75, 76, 134, 5, 5, 5,
1637 160, 160, 102, 7, 7, 7, 7, 7, 7, 127,
1638 7, 7, 7, 7, 103, 7, 7, 7, 7
1641 #define yyerrok (yyerrstatus = 0)
1642 #define yyclearin (yychar = YYEMPTY)
1643 #define YYEMPTY (-2)
1646 #define YYACCEPT goto yyacceptlab
1647 #define YYABORT goto yyabortlab
1648 #define YYERROR goto yyerrorlab
1658 #define YYFAIL goto yyerrlab
1666 #define YYRECOVERING() (!!yyerrstatus)
1668 #define YYBACKUP(Token, Value) \
1670 if (yychar == YYEMPTY) \
1674 YYPOPSTACK (yylen); \
1680 yyerror (YY_("syntax error: cannot back up")); \
1687 #define YYERRCODE 256
1693 #ifndef YYLLOC_DEFAULT
1694 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1698 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1699 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1700 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1701 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1705 (Current).first_line = (Current).last_line = \
1706 YYRHSLOC (Rhs, 0).last_line; \
1707 (Current).first_column = (Current).last_column = \
1708 YYRHSLOC (Rhs, 0).last_column; \
1713 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1719 #ifndef YY_LOCATION_PRINT
1720 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1727 # define YYLEX yylex (YYLEX_PARAM)
1729 # define YYLEX yylex (context)
1737 # define YYFPRINTF fprintf
1740 # define YYDPRINTF(Args) \
1746 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1750 YYFPRINTF (stderr, "%s ", Title); \
1751 yy_symbol_print (stderr, \
1753 YYFPRINTF (stderr, "\n"); \
1763 #if (defined __STDC__ || defined __C99__FUNC__ \
1764 || defined __cplusplus || defined _MSC_VER)
1772 YYSTYPE const * const yyvaluep;
1775 FILE *yyo = yyoutput;
1781 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1797 #if (defined __STDC__ || defined __C99__FUNC__ \
1798 || defined __cplusplus || defined _MSC_VER)
1806 YYSTYPE const * const yyvaluep;
1810 YYFPRINTF (yyoutput,
"token %s (", yytname[yytype]);
1812 YYFPRINTF (yyoutput,
"nterm %s (", yytname[yytype]);
1823 #if (defined __STDC__ || defined __C99__FUNC__ \
1824 || defined __cplusplus || defined _MSC_VER)
1830 yytype_int16 *yybottom;
1831 yytype_int16 *yytop;
1835 for (; yybottom <= yytop; yybottom++)
1837 int yybot = *yybottom;
1843 # define YY_STACK_PRINT(Bottom, Top) \
1846 yy_stack_print ((Bottom), (Top)); \
1854 #if (defined __STDC__ || defined __C99__FUNC__ \
1855 || defined __cplusplus || defined _MSC_VER)
1865 int yynrhs = yyr2[yyrule];
1867 unsigned long int yylno = yyrline[yyrule];
1868 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
1871 for (yyi = 0; yyi < yynrhs; yyi++)
1875 &(yyvsp[(yyi + 1) - (yynrhs)])
1881 # define YY_REDUCE_PRINT(Rule) \
1884 yy_reduce_print (yyvsp, Rule); \
1891 # define YYDPRINTF(Args)
1892 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1893 # define YY_STACK_PRINT(Bottom, Top)
1894 # define YY_REDUCE_PRINT(Rule)
1900 # define YYINITDEPTH 200
1911 # define YYMAXDEPTH 10000
1918 # if defined __GLIBC__ && defined _STRING_H
1919 # define yystrlen strlen
1922 #if (defined __STDC__ || defined __C99__FUNC__ \
1923 || defined __cplusplus || defined _MSC_VER)
1933 for (yylen = 0; yystr[yylen]; yylen++)
1941 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1942 # define yystpcpy stpcpy
1946 #if (defined __STDC__ || defined __C99__FUNC__ \
1947 || defined __cplusplus || defined _MSC_VER)
1949 yystpcpy (
char *yydest,
const char *yysrc)
1958 const char *yys = yysrc;
1960 while ((*yyd++ = *yys++) !=
'\0')
1982 char const *yyp = yystr;
1989 goto do_not_strip_quotes;
1993 goto do_not_strip_quotes;
2006 do_not_strip_quotes: ;
2012 return yystpcpy (yyres, yystr) - yyres;
2026 yytype_int16 *yyssp,
int yytoken)
2031 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
2033 const char *yyformat =
YY_NULL;
2035 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2069 int yyn = yypact[*yyssp];
2070 yyarg[yycount++] = yytname[yytoken];
2076 int yyxbegin = yyn < 0 ? -yyn : 0;
2078 int yychecklim =
YYLAST - yyn + 1;
2082 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2083 if (yycheck[yyx + yyn] == yyx && yyx !=
YYTERROR
2086 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2092 yyarg[yycount++] = yytname[yyx];
2094 if (! (yysize <= yysize1
2104 # define YYCASE_(N, S) \
2109 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
2110 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
2111 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
2112 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
2113 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
2117 yysize1 = yysize +
yystrlen (yyformat);
2122 if (*yymsg_alloc < yysize)
2124 *yymsg_alloc = 2 * yysize;
2125 if (! (yysize <= *yymsg_alloc
2137 while ((*yyp = *yyformat) !=
'\0')
2138 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
2158 #if (defined __STDC__ || defined __C99__FUNC__ \
2159 || defined __cplusplus || defined _MSC_VER)
2201 #ifdef YYPARSE_PARAM
2202 #if (defined __STDC__ || defined __C99__FUNC__ \
2203 || defined __cplusplus || defined _MSC_VER)
2209 void *YYPARSE_PARAM;
2212 #if (defined __STDC__ || defined __C99__FUNC__ \
2213 || defined __cplusplus || defined _MSC_VER)
2237 yytype_int16 *yyssp;
2257 char *yymsg = yymsgbuf;
2258 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
2261 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2272 YYDPRINTF ((stderr,
"Starting parse\n"));
2298 if (yyss + yystacksize - 1 <= yyssp)
2301 YYSIZE_T yysize = yyssp - yyss + 1;
2309 yytype_int16 *yyss1 = yyss;
2315 yyoverflow (
YY_(
"memory exhausted"),
2316 &yyss1, yysize *
sizeof (*yyssp),
2317 &yyvs1, yysize *
sizeof (*yyvsp),
2324 # ifndef YYSTACK_RELOCATE
2325 goto yyexhaustedlab;
2329 goto yyexhaustedlab;
2335 yytype_int16 *yyss1 = yyss;
2339 goto yyexhaustedlab;
2342 # undef YYSTACK_RELOCATE
2349 yyssp = yyss + yysize - 1;
2350 yyvsp = yyvs + yysize - 1;
2352 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
2353 (
unsigned long int) yystacksize));
2355 if (yyss + yystacksize - 1 <= yyssp)
2359 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
2375 yyn = yypact[yystate];
2384 YYDPRINTF ((stderr,
"Reading a token: "));
2388 if (yychar <=
YYEOF)
2390 yychar = yytoken =
YYEOF;
2391 YYDPRINTF ((stderr,
"Now at end of input.\n"));
2402 if (yyn < 0 ||
YYLAST < yyn || yycheck[yyn] != yytoken)
2434 yyn = yydefact[yystate];
2455 yyval = yyvsp[1-yylen];
2463 #line 877 "../i3-4.3/src/cfgparse.y"
2471 #line 883 "../i3-4.3/src/cfgparse.y"
2472 { (yyval.
binding) = (yyvsp[(2) - (2)].binding); }
2477 #line 884 "../i3-4.3/src/cfgparse.y"
2478 { (yyval.
binding) = (yyvsp[(2) - (2)].binding); }
2483 #line 889 "../i3-4.3/src/cfgparse.y"
2485 DLOG(
"bindcode: release = %d, mod = %d, key = %d, command = %s\n", (yyvsp[(1) - (4)].number), (yyvsp[(2) - (4)].number), (yyvsp[(3) - (4)].number), (yyvsp[(4) - (4)].
string));
2488 new->release = (yyvsp[(1) - (4)].
number);
2489 new->keycode = (yyvsp[(3) - (4)].
number);
2490 new->mods = (yyvsp[(2) - (4)].
number);
2491 new->command = (yyvsp[(4) - (4)].
string);
2499 #line 904 "../i3-4.3/src/cfgparse.y"
2501 DLOG(
"bindsym: release = %d, mod = %d, key = %s, command = %s\n", (yyvsp[(1) - (4)].number), (yyvsp[(2) - (4)].number), (yyvsp[(3) - (4)].
string), (yyvsp[(4) - (4)].
string));
2504 new->release = (yyvsp[(1) - (4)].
number);
2505 new->symbol = (yyvsp[(3) - (4)].
string);
2506 new->mods = (yyvsp[(2) - (4)].
number);
2507 new->command = (yyvsp[(4) - (4)].
string);
2515 #line 918 "../i3-4.3/src/cfgparse.y"
2516 { (yyval.
number) = B_UPON_KEYPRESS; }
2521 #line 919 "../i3-4.3/src/cfgparse.y"
2522 { (yyval.
number) = B_UPON_KEYRELEASE; }
2527 #line 924 "../i3-4.3/src/cfgparse.y"
2530 ELOG(
"Match is empty, ignoring this for_window statement\n");
2533 printf(
"\t should execute command %s for the criteria mentioned above\n", (yyvsp[(3) - (3)].
string));
2535 assignment->
type = A_COMMAND;
2544 #line 940 "../i3-4.3/src/cfgparse.y"
2546 printf(
"match parsed\n");
2552 #line 947 "../i3-4.3/src/cfgparse.y"
2561 #line 955 "../i3-4.3/src/cfgparse.y"
2563 printf(
"match specification finished\n");
2569 #line 967 "../i3-4.3/src/cfgparse.y"
2571 printf(
"criteria: class = %s\n", (yyvsp[(3) - (3)].
string));
2573 free((yyvsp[(3) - (3)].
string));
2579 #line 973 "../i3-4.3/src/cfgparse.y"
2581 printf(
"criteria: instance = %s\n", (yyvsp[(3) - (3)].
string));
2583 free((yyvsp[(3) - (3)].
string));
2589 #line 979 "../i3-4.3/src/cfgparse.y"
2591 printf(
"criteria: window_role = %s\n", (yyvsp[(3) - (3)].
string));
2593 free((yyvsp[(3) - (3)].
string));
2599 #line 985 "../i3-4.3/src/cfgparse.y"
2601 printf(
"criteria: id = %s\n", (yyvsp[(3) - (3)].
string));
2603 long parsed = strtol((yyvsp[(3) - (3)].
string), &end, 10);
2604 if (parsed == LONG_MIN ||
2605 parsed == LONG_MAX ||
2607 (end && *end !=
'\0')) {
2608 ELOG(
"Could not parse con id \"%s\"\n", (yyvsp[(3) - (3)].
string));
2611 printf(
"id as int = %p\n", current_match.
con_id);
2618 #line 1000 "../i3-4.3/src/cfgparse.y"
2620 printf(
"criteria: window id = %s\n", (yyvsp[(3) - (3)].
string));
2622 long parsed = strtol((yyvsp[(3) - (3)].
string), &end, 10);
2623 if (parsed == LONG_MIN ||
2624 parsed == LONG_MAX ||
2626 (end && *end !=
'\0')) {
2627 ELOG(
"Could not parse window id \"%s\"\n", (yyvsp[(3) - (3)].
string));
2629 current_match.
id = parsed;
2630 printf(
"window id as int = %d\n", current_match.
id);
2637 #line 1015 "../i3-4.3/src/cfgparse.y"
2639 printf(
"criteria: mark = %s\n", (yyvsp[(3) - (3)].
string));
2641 free((yyvsp[(3) - (3)].
string));
2647 #line 1021 "../i3-4.3/src/cfgparse.y"
2649 printf(
"criteria: title = %s\n", (yyvsp[(3) - (3)].
string));
2651 free((yyvsp[(3) - (3)].
string));
2657 #line 1027 "../i3-4.3/src/cfgparse.y"
2659 printf(
"criteria: urgent = %s\n", (yyvsp[(3) - (3)].
string));
2660 if (strcasecmp((yyvsp[(3) - (3)].
string),
"latest") == 0 ||
2661 strcasecmp((yyvsp[(3) - (3)].
string),
"newest") == 0 ||
2662 strcasecmp((yyvsp[(3) - (3)].
string),
"recent") == 0 ||
2663 strcasecmp((yyvsp[(3) - (3)].
string),
"last") == 0) {
2664 current_match.
urgent = U_LATEST;
2665 }
else if (strcasecmp((yyvsp[(3) - (3)].
string),
"oldest") == 0 ||
2666 strcasecmp((yyvsp[(3) - (3)].
string),
"first") == 0) {
2667 current_match.
urgent = U_OLDEST;
2669 free((yyvsp[(3) - (3)].
string));
2675 #line 1044 "../i3-4.3/src/cfgparse.y"
2681 #line 1050 "../i3-4.3/src/cfgparse.y"
2689 #line 1057 "../i3-4.3/src/cfgparse.y"
2691 if (strcasecmp((yyvsp[(2) - (5)].
string),
"default") == 0) {
2692 printf(
"You cannot use the name \"default\" for your mode\n");
2695 printf(
"\t now in mode %s\n", (yyvsp[(2) - (5)].
string));
2699 printf(
"got binding on mods %d, keycode %d, symbol %s, command %s\n",
2713 #line 1087 "../i3-4.3/src/cfgparse.y"
2726 #line 1099 "../i3-4.3/src/cfgparse.y"
2728 printf(
"\t new bar configuration finished, saving.\n");
2734 char *
x = current_bar.
id + strlen(
"bar-");
2735 while (*x !=
'\0') {
2736 *(x++) = (rand() % 26) +
'a';
2746 memcpy(bar_config, ¤t_bar,
sizeof(
Barconfig));
2749 memset(¤t_bar,
'\0',
sizeof(
Barconfig));
2755 #line 1154 "../i3-4.3/src/cfgparse.y"
2757 DLOG(
"should add status command %s\n", (yyvsp[(2) - (2)].
string));
2765 #line 1163 "../i3-4.3/src/cfgparse.y"
2767 DLOG(
"should add i3bar_command %s\n", (yyvsp[(2) - (2)].
string));
2775 #line 1172 "../i3-4.3/src/cfgparse.y"
2777 DLOG(
"bar output %s\n", (yyvsp[(2) - (2)].
string));
2787 #line 1183 "../i3-4.3/src/cfgparse.y"
2789 DLOG(
"tray %s\n", (yyvsp[(2) - (2)].
string));
2797 #line 1192 "../i3-4.3/src/cfgparse.y"
2799 DLOG(
"position %d\n", (yyvsp[(2) - (2)].number));
2806 #line 1199 "../i3-4.3/src/cfgparse.y"
2807 { (yyval.
number) = P_TOP; }
2812 #line 1200 "../i3-4.3/src/cfgparse.y"
2813 { (yyval.
number) = P_BOTTOM; }
2818 #line 1205 "../i3-4.3/src/cfgparse.y"
2820 DLOG(
"mode %d\n", (yyvsp[(2) - (2)].number));
2821 current_bar.
mode = (yyvsp[(2) - (2)].
number);
2827 #line 1212 "../i3-4.3/src/cfgparse.y"
2828 { (yyval.
number) = M_HIDE; }
2833 #line 1213 "../i3-4.3/src/cfgparse.y"
2834 { (yyval.
number) = M_DOCK; }
2839 #line 1218 "../i3-4.3/src/cfgparse.y"
2841 DLOG(
"modifier %d\n", (yyvsp[(2) - (2)].number));
2848 #line 1224 "../i3-4.3/src/cfgparse.y"
2849 { (yyval.
number) = M_CONTROL; }
2854 #line 1225 "../i3-4.3/src/cfgparse.y"
2855 { (yyval.
number) = M_SHIFT; }
2860 #line 1226 "../i3-4.3/src/cfgparse.y"
2861 { (yyval.
number) = M_MOD1; }
2866 #line 1227 "../i3-4.3/src/cfgparse.y"
2867 { (yyval.
number) = M_MOD2; }
2872 #line 1228 "../i3-4.3/src/cfgparse.y"
2873 { (yyval.
number) = M_MOD3; }
2878 #line 1229 "../i3-4.3/src/cfgparse.y"
2879 { (yyval.
number) = M_MOD4; }
2884 #line 1230 "../i3-4.3/src/cfgparse.y"
2885 { (yyval.
number) = M_MOD5; }
2890 #line 1235 "../i3-4.3/src/cfgparse.y"
2892 DLOG(
"font %s\n", (yyvsp[(2) - (2)].
string));
2894 current_bar.
font = (yyvsp[(2) - (2)].
string);
2900 #line 1244 "../i3-4.3/src/cfgparse.y"
2902 DLOG(
"workspace_buttons = %d\n", (yyvsp[(2) - (2)].number));
2911 #line 1254 "../i3-4.3/src/cfgparse.y"
2913 DLOG(
"verbose = %d\n", (yyvsp[(2) - (2)].number));
2920 #line 1262 "../i3-4.3/src/cfgparse.y"
2922 DLOG(
"socket_path = %s\n", (yyvsp[(2) - (2)].
string));
2930 #line 1271 "../i3-4.3/src/cfgparse.y"
2940 #line 1280 "../i3-4.3/src/cfgparse.y"
2942 DLOG(
"background = %s\n", (yyvsp[(2) - (2)].
string));
2949 #line 1288 "../i3-4.3/src/cfgparse.y"
2951 DLOG(
"statusline = %s\n", (yyvsp[(2) - (2)].
string));
2958 #line 1296 "../i3-4.3/src/cfgparse.y"
2961 DLOG(
"focused_ws = %s, %s (old)\n", (yyvsp[(2) - (3)].
string), (yyvsp[(3) - (3)].
string));
2969 #line 1303 "../i3-4.3/src/cfgparse.y"
2972 DLOG(
"focused_ws = %s, %s and %s\n", (yyvsp[(2) - (4)].
string), (yyvsp[(3) - (4)].
string), (yyvsp[(4) - (4)].
string));
2981 #line 1314 "../i3-4.3/src/cfgparse.y"
2984 DLOG(
"active_ws = %s, %s (old)\n", (yyvsp[(2) - (3)].
string), (yyvsp[(3) - (3)].
string));
2992 #line 1321 "../i3-4.3/src/cfgparse.y"
2995 DLOG(
"active_ws = %s, %s and %s\n", (yyvsp[(2) - (4)].
string), (yyvsp[(3) - (4)].
string), (yyvsp[(4) - (4)].
string));
3004 #line 1332 "../i3-4.3/src/cfgparse.y"
3007 DLOG(
"inactive_ws = %s, %s (old)\n", (yyvsp[(2) - (3)].
string), (yyvsp[(3) - (3)].
string));
3015 #line 1339 "../i3-4.3/src/cfgparse.y"
3017 DLOG(
"inactive_ws = %s, %s and %s\n", (yyvsp[(2) - (4)].
string), (yyvsp[(3) - (4)].
string), (yyvsp[(4) - (4)].
string));
3026 #line 1349 "../i3-4.3/src/cfgparse.y"
3029 DLOG(
"urgent_ws = %s, %s (old)\n", (yyvsp[(2) - (3)].
string), (yyvsp[(3) - (3)].
string));
3037 #line 1356 "../i3-4.3/src/cfgparse.y"
3039 DLOG(
"urgent_ws = %s, %s and %s\n", (yyvsp[(2) - (4)].
string), (yyvsp[(3) - (4)].
string), (yyvsp[(4) - (4)].
string));
3048 #line 1366 "../i3-4.3/src/cfgparse.y"
3050 printf(
"floating_maximum_width = %d\n", (yyvsp[(2) - (4)].number));
3051 printf(
"floating_maximum_height = %d\n", (yyvsp[(4) - (4)].number));
3059 #line 1376 "../i3-4.3/src/cfgparse.y"
3061 printf(
"floating_minimum_width = %d\n", (yyvsp[(2) - (4)].number));
3062 printf(
"floating_minimum_height = %d\n", (yyvsp[(4) - (4)].number));
3070 #line 1386 "../i3-4.3/src/cfgparse.y"
3072 DLOG(
"floating modifier = %d\n", (yyvsp[(2) - (2)].number));
3079 #line 1394 "../i3-4.3/src/cfgparse.y"
3081 DLOG(
"New containers should start with split direction %d\n", (yyvsp[(2) - (2)].number));
3088 #line 1401 "../i3-4.3/src/cfgparse.y"
3094 #line 1402 "../i3-4.3/src/cfgparse.y"
3100 #line 1403 "../i3-4.3/src/cfgparse.y"
3106 #line 1408 "../i3-4.3/src/cfgparse.y"
3108 DLOG(
"new containers will be in mode %d\n", (yyvsp[(2) - (2)].number));
3122 if (ws->table == NULL)
3124 switch_layout_mode(global_conn,
3134 #line 1432 "../i3-4.3/src/cfgparse.y"
3136 DLOG(
"stack-limit %d with val %d\n", (yyvsp[(3) - (4)].number), (yyvsp[(4) - (4)].number));
3144 if (ws->table == NULL)
3146 Container *con = ws->table[0][0];
3156 #line 1452 "../i3-4.3/src/cfgparse.y"
3157 { (yyval.
number) = L_DEFAULT; }
3162 #line 1453 "../i3-4.3/src/cfgparse.y"
3163 { (yyval.
number) = L_STACKED; }
3168 #line 1454 "../i3-4.3/src/cfgparse.y"
3169 { (yyval.
number) = L_TABBED; }
3174 #line 1459 "../i3-4.3/src/cfgparse.y"
3176 DLOG(
"new windows should start with border style %d\n", (yyvsp[(2) - (2)].number));
3183 #line 1467 "../i3-4.3/src/cfgparse.y"
3185 DLOG(
"new floating windows should start with border style %d\n", (yyvsp[(2) - (2)].number));
3192 #line 1474 "../i3-4.3/src/cfgparse.y"
3198 #line 1475 "../i3-4.3/src/cfgparse.y"
3204 #line 1476 "../i3-4.3/src/cfgparse.y"
3210 #line 1481 "../i3-4.3/src/cfgparse.y"
3212 (yyval.
number) = ((yyvsp[(1) - (1)].number) == 1);
3218 #line 1485 "../i3-4.3/src/cfgparse.y"
3220 DLOG(
"checking word \"%s\"\n", (yyvsp[(1) - (1)].
string));
3221 (yyval.
number) = (strcasecmp((yyvsp[(1) - (1)].
string),
"yes") == 0 ||
3222 strcasecmp((yyvsp[(1) - (1)].
string),
"true") == 0 ||
3223 strcasecmp((yyvsp[(1) - (1)].
string),
"on") == 0 ||
3224 strcasecmp((yyvsp[(1) - (1)].
string),
"enable") == 0 ||
3225 strcasecmp((yyvsp[(1) - (1)].
string),
"active") == 0);
3231 #line 1497 "../i3-4.3/src/cfgparse.y"
3233 DLOG(
"hide edge borders = %d\n", (yyvsp[(2) - (2)].number));
3240 #line 1504 "../i3-4.3/src/cfgparse.y"
3246 #line 1505 "../i3-4.3/src/cfgparse.y"
3252 #line 1506 "../i3-4.3/src/cfgparse.y"
3258 #line 1507 "../i3-4.3/src/cfgparse.y"
3264 #line 1508 "../i3-4.3/src/cfgparse.y"
3270 #line 1513 "../i3-4.3/src/cfgparse.y"
3272 DLOG(
"focus follows mouse = %d\n", (yyvsp[(2) - (2)].number));
3279 #line 1521 "../i3-4.3/src/cfgparse.y"
3281 DLOG(
"force focus wrapping = %d\n", (yyvsp[(2) - (2)].number));
3288 #line 1529 "../i3-4.3/src/cfgparse.y"
3290 DLOG(
"force xinerama = %d\n", (yyvsp[(2) - (2)].number));
3297 #line 1537 "../i3-4.3/src/cfgparse.y"
3299 DLOG(
"fake outputs = %s\n", (yyvsp[(2) - (2)].
string));
3306 #line 1545 "../i3-4.3/src/cfgparse.y"
3308 DLOG(
"automatic workspace back-and-forth = %d\n", (yyvsp[(2) - (2)].number));
3315 #line 1553 "../i3-4.3/src/cfgparse.y"
3317 DLOG(
"workspace bar = %d\n", (yyvsp[(2) - (2)].number));
3324 #line 1561 "../i3-4.3/src/cfgparse.y"
3326 char *ws_name = (yyvsp[(2) - (5)].
string);
3328 if ((yyvsp[(5) - (5)].
string) != NULL) {
3329 ELOG(
"The old (v3) syntax workspace <number> output <output> <name> is deprecated.\n");
3330 ELOG(
"Please use the new syntax: workspace \"<workspace>\" output <output>\n");
3331 ELOG(
"In your case, the following should work:\n");
3332 ELOG(
" workspace \"%s\" output %s\n", (yyvsp[(5) - (5)].
string), (yyvsp[(4) - (5)].
string));
3333 ws_name = (yyvsp[(5) - (5)].
string);
3337 DLOG(
"Assigning workspace \"%s\" to output \"%s\"\n", ws_name, (yyvsp[(4) - (5)].
string));
3342 bool duplicate =
false;
3344 if (strcasecmp(assignment->
name, ws_name) == 0) {
3345 ELOG(
"You have a duplicate workspace assignment for workspace \"%s\"\n",
3353 assignment->
name = ws_name;
3362 #line 1595 "../i3-4.3/src/cfgparse.y"
3364 int ws_num = (yyvsp[(2) - (3)].
number);
3366 DLOG(
"Invalid workspace assignment, workspace number %d out of range\n", ws_num);
3368 DLOG(
"workspace name to: %s\n", (yyvsp[(3) - (3)].
string));
3370 if ((yyvsp[(3) - (3)].
string) != NULL) {
3371 workspace_set_name(
workspace_get(ws_num - 1), (yyvsp[(3) - (3)].
string));
3372 free((yyvsp[(3) - (3)].
string));
3381 #line 1612 "../i3-4.3/src/cfgparse.y"
3382 { (yyval.
string) = NULL; }
3387 #line 1613 "../i3-4.3/src/cfgparse.y"
3388 { (yyval.
string) = (yyvsp[(1) - (1)].
string); }
3393 #line 1617 "../i3-4.3/src/cfgparse.y"
3394 { (yyval.
string) = (yyvsp[(1) - (1)].
string); }
3399 #line 1618 "../i3-4.3/src/cfgparse.y"
3400 { (yyval.
string) = (yyvsp[(1) - (1)].
string); }
3405 #line 1619 "../i3-4.3/src/cfgparse.y"
3406 { (yyval.
string) = (yyvsp[(1) - (1)].
string); }
3411 #line 1624 "../i3-4.3/src/cfgparse.y"
3416 ELOG(
"You are using the old assign syntax (without criteria). "
3417 "Please see the User's Guide for the new syntax and fix "
3418 "your config file.\n");
3420 printf(
"assignment of %s to *%s*\n", (yyvsp[(2) - (3)].
string), (yyvsp[(3) - (3)].
string));
3421 char *workspace = (yyvsp[(3) - (3)].
string);
3422 char *criteria = (yyvsp[(2) - (3)].
string);
3428 char *separator = NULL;
3429 if ((separator = strchr(criteria,
'/')) != NULL) {
3430 *(separator++) =
'\0';
3432 sasprintf(&pattern,
"(?i)%s", separator);
3435 printf(
" title = %s\n", separator);
3437 if (*criteria !=
'\0') {
3439 sasprintf(&pattern,
"(?i)%s", criteria);
3442 printf(
" class = %s\n", criteria);
3451 if (*workspace ==
'~') {
3453 if (*workspace ==
'\0') {
3455 assignment->
type = A_COMMAND;
3463 floating->
type = A_COMMAND;
3469 assignment->
type = A_TO_WORKSPACE;
3477 #line 1686 "../i3-4.3/src/cfgparse.y"
3480 ELOG(
"Match is empty, ignoring this assignment\n");
3483 printf(
"new assignment, using above criteria, to workspace %s\n", (yyvsp[(3) - (3)].
string));
3486 assignment->
type = A_TO_WORKSPACE;
3494 #line 1707 "../i3-4.3/src/cfgparse.y"
3502 #line 1714 "../i3-4.3/src/cfgparse.y"
3510 #line 1721 "../i3-4.3/src/cfgparse.y"
3513 new->command = (yyvsp[(3) - (3)].
string);
3514 new->no_startup_id = (yyvsp[(2) - (3)].
number);
3521 #line 1731 "../i3-4.3/src/cfgparse.y"
3524 new->command = (yyvsp[(3) - (3)].
string);
3525 new->no_startup_id = (yyvsp[(2) - (3)].
number);
3532 #line 1740 "../i3-4.3/src/cfgparse.y"
3533 { (yyval.
number) =
false; }
3538 #line 1741 "../i3-4.3/src/cfgparse.y"
3539 { (yyval.
number) =
true; }
3544 #line 1746 "../i3-4.3/src/cfgparse.y"
3546 ELOG(
"The terminal option is DEPRECATED and has no effect. "
3547 "Please remove it from your configuration file.\n");
3553 #line 1754 "../i3-4.3/src/cfgparse.y"
3557 printf(
"font %s\n", (yyvsp[(2) - (2)].
string));
3565 #line 1765 "../i3-4.3/src/cfgparse.y"
3568 *dest = (yyvsp[(2) - (2)].
number);
3574 #line 1773 "../i3-4.3/src/cfgparse.y"
3586 #line 1781 "../i3-4.3/src/cfgparse.y"
3599 #line 1793 "../i3-4.3/src/cfgparse.y"
3602 free((yyvsp[(1) - (1)].
string));
3608 #line 1801 "../i3-4.3/src/cfgparse.y"
3614 #line 1803 "../i3-4.3/src/cfgparse.y"
3615 { (yyval.
number) = (yyvsp[(1) - (3)].number) | (yyvsp[(3) - (3)].
number); }
3620 #line 1804 "../i3-4.3/src/cfgparse.y"
3621 { (yyval.
number) = (yyvsp[(1) - (2)].number); }
3626 #line 1808 "../i3-4.3/src/cfgparse.y"
3627 { (yyval.
number) = (yyvsp[(1) - (1)].number); }
3632 #line 1809 "../i3-4.3/src/cfgparse.y"
3638 #line 1810 "../i3-4.3/src/cfgparse.y"
3644 #line 1815 "../i3-4.3/src/cfgparse.y"
3646 DLOG(
"popup_during_fullscreen setting: %d\n", (yyvsp[(2) - (2)].number));
3653 #line 1822 "../i3-4.3/src/cfgparse.y"
3654 { (yyval.
number) = PDF_IGNORE; }
3659 #line 1823 "../i3-4.3/src/cfgparse.y"
3660 { (yyval.
number) = PDF_LEAVE_FULLSCREEN; }
3665 #line 3666 "src/cfgparse.tab.c"
3693 yystate = yypgoto[yyn -
YYNTOKENS] + *yyssp;
3694 if (0 <= yystate && yystate <=
YYLAST && yycheck[yystate] == *yyssp)
3695 yystate = yytable[yystate];
3714 #if ! YYERROR_VERBOSE
3717 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3720 char const *yymsgp =
YY_(
"syntax error");
3721 int yysyntax_error_status;
3723 if (yysyntax_error_status == 0)
3725 else if (yysyntax_error_status == 1)
3727 if (yymsg != yymsgbuf)
3733 yymsg_alloc =
sizeof yymsgbuf;
3734 yysyntax_error_status = 2;
3743 if (yysyntax_error_status == 2)
3744 goto yyexhaustedlab;
3746 # undef YYSYNTAX_ERROR
3752 if (yyerrstatus == 3)
3757 if (yychar <=
YYEOF)
3760 if (yychar ==
YYEOF)
3804 yyn = yypact[yystate];
3822 yystos[yystate], yyvsp);
3852 #if !defined yyoverflow || YYERROR_VERBOSE
3875 while (yyssp != yyss)
3878 yystos[*yyssp], yyvsp);
3886 if (yymsg != yymsgbuf)
3890 return YYID (yyresult);