47 #define YYBISON_VERSION "2.6.1"
50 #define YYSKELETON_NAME "yacc.c"
66 #line 1 "../i3-4.4/src/cfgparse.y"
73 #define I3__FILE__ "cfgparse.y"
74 #include <sys/types.h>
115 ELOG(
"CONFIG: %s\n", error_message);
116 ELOG(
"CONFIG: in file \"%s\", line %d:\n",
123 ELOG(
"CONFIG: %s\n", buffer);
140 while (*walk !=
'\0') {
147 if (strncasecmp(line,
"bindcode", strlen(
"bindcode")) == 0 ||
148 strncasecmp(line,
"force_focus_wrapping", strlen(
"force_focus_wrapping")) == 0 ||
149 strncasecmp(line,
"# i3 config file (v4)", strlen(
"# i3 config file (v4)")) == 0 ||
150 strncasecmp(line,
"workspace_layout", strlen(
"workspace_layout")) == 0) {
151 printf(
"deciding for version 4 due to this line: %.*s\n", (
int)(walk-line), line);
156 if (strncasecmp(line,
"bind", strlen(
"bind")) == 0) {
157 char *bind = strchr(line,
' ');
160 while ((*bind ==
' ' || *bind ==
'\t') && *bind !=
'\0')
164 if ((bind = strchr(bind,
' ')) == NULL)
166 while ((*bind ==
' ' || *bind ==
'\t') && *bind !=
'\0')
170 if (strncasecmp(bind,
"layout", strlen(
"layout")) == 0 ||
171 strncasecmp(bind,
"floating", strlen(
"floating")) == 0 ||
172 strncasecmp(bind,
"workspace", strlen(
"workspace")) == 0 ||
173 strncasecmp(bind,
"focus left", strlen(
"focus left")) == 0 ||
174 strncasecmp(bind,
"focus right", strlen(
"focus right")) == 0 ||
175 strncasecmp(bind,
"focus up", strlen(
"focus up")) == 0 ||
176 strncasecmp(bind,
"focus down", strlen(
"focus down")) == 0 ||
177 strncasecmp(bind,
"border normal", strlen(
"border normal")) == 0 ||
178 strncasecmp(bind,
"border 1pixel", strlen(
"border 1pixel")) == 0 ||
179 strncasecmp(bind,
"border pixel", strlen(
"border pixel")) == 0 ||
180 strncasecmp(bind,
"border borderless", strlen(
"border borderless")) == 0 ||
181 strncasecmp(bind,
"--no-startup-id", strlen(
"--no-startup-id")) == 0 ||
182 strncasecmp(bind,
"bar", strlen(
"bar")) == 0) {
183 printf(
"deciding for version 4 due to this line: %.*s\n", (
int)(walk-line), line);
210 if (pipe(writepipe) != 0 ||
211 pipe(readpipe) != 0) {
212 warn(
"migrate_config: Could not create pipes");
218 warn(
"Could not fork()");
226 dup2(writepipe[0], 0);
230 dup2(readpipe[1], 1);
232 static char *argv[] = {
248 while (written < size) {
249 if ((ret = write(writepipe[1], input + written, size - written)) < 0) {
250 warn(
"Could not write to pipe");
261 int conv_size = 65535;
262 char *converted = malloc(conv_size);
265 if (read_bytes == conv_size) {
267 converted = realloc(converted, conv_size);
269 ret = read(readpipe[0], converted + read_bytes, conv_size - read_bytes);
271 warn(
"Cannot read from pipe");
281 if (!WIFEXITED(status)) {
282 fprintf(stderr,
"Child did not terminate normally, using old config file (will lead to broken behaviour)\n");
286 int returncode = WEXITSTATUS(status);
287 if (returncode != 0) {
288 fprintf(stderr,
"Migration process exit code was != 0\n");
289 if (returncode == 2) {
290 fprintf(stderr,
"could not start the migration script\n");
292 }
else if (returncode == 1) {
293 fprintf(stderr,
"This already was a v4 config. Please add the following line to your config file:\n");
294 fprintf(stderr,
"# i3 config file (v4)\n");
309 ev_child_stop(EV_A_ watcher);
316 if (!WIFEXITED(watcher->rstatus)) {
317 fprintf(stderr,
"ERROR: i3-nagbar did not exit normally.\n");
321 int exitcode = WEXITSTATUS(watcher->rstatus);
322 printf(
"i3-nagbar process exited with status %d\n", exitcode);
324 fprintf(stderr,
"ERROR: i3-nagbar could not be found. Is it correctly installed on your system?\n");
333 #if EV_VERSION_MAJOR >= 4
339 static void nagbar_cleanup(EV_P_ ev_cleanup *watcher,
int revent) {
353 int fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IXUSR);
355 warn(
"Could not create temporary script to store the nagbar command");
358 write(fd,
"#!/bin/sh\n", strlen(
"#!/bin/sh\n"));
359 write(fd, command, strlen(command));
375 fprintf(stderr,
"Starting i3-nagbar due to configuration errors\n");
390 warn(
"Could not fork()");
396 char *edit_command, *pager_command;
397 sasprintf(&edit_command,
"i3-sensible-editor \"%s\" && i3-msg reload\n", config_path);
413 "You have an error in your i3 config file!" :
414 "Your config is outdated. Please fix the warnings to make sure everything works."),
419 (context->
has_errors ?
"show errors" :
"show warnings"),
428 ev_child *child =
smalloc(
sizeof(ev_child));
435 #if EV_VERSION_MAJOR >= 4
438 ev_cleanup *cleanup =
smalloc(
sizeof(ev_cleanup));
439 ev_cleanup_init(cleanup, nagbar_cleanup);
458 warn(
"kill(configerror_nagbar) failed");
490 if ((bind->
symbol == NULL && current->
symbol != NULL) ||
496 if (bind->
symbol != NULL &&
509 ELOG(
"Duplicate keybinding in config file:\n modmask %d with keycode %d, command \"%s\"\n",
512 ELOG(
"Duplicate keybinding in config file:\n modmask %d with keysym %s, command \"%s\"\n",
520 ELOG(
"**********************************************************************\n");
521 ELOG(
"IGNORING exec command: %s\n", exec->
command);
522 ELOG(
"It contains \"i3bar\". Since i3 v4.1, i3bar will be automatically started\n");
523 ELOG(
"for each 'bar' configuration block in your i3 config. Please remove the exec\n");
524 ELOG(
"line and add the following to your i3 config:\n");
527 ELOG(
" status_command i3status\n");
529 ELOG(
"**********************************************************************\n");
546 int fd, ret, read_bytes = 0;
550 char buffer[1026], key[512], value[512];
552 if ((fd = open(f, O_RDONLY)) == -1)
553 die(
"Could not open configuration file: %s\n", strerror(errno));
555 if (fstat(fd, &stbuf) == -1)
556 die(
"Could not fstat file: %s\n", strerror(errno));
558 buf =
scalloc((stbuf.st_size + 1) *
sizeof(
char));
559 while (read_bytes < stbuf.st_size) {
560 if ((ret = read(fd, buf + read_bytes, (stbuf.st_size - read_bytes))) < 0)
561 die(
"Could not read(): %s\n", strerror(errno));
565 if (lseek(fd, 0, SEEK_SET) == (off_t)-1)
566 die(
"Could not lseek: %s\n", strerror(errno));
568 if ((fstr = fdopen(fd,
"r")) == NULL)
569 die(
"Could not fdopen: %s\n", strerror(errno));
571 while (!feof(fstr)) {
572 if (fgets(buffer, 1024, fstr) == NULL) {
575 die(
"Could not read configuration file\n");
579 if (sscanf(buffer,
"%s %[^\n]", key, value) < 1 ||
580 key[0] ==
'#' || strlen(key) < 3)
583 if (strcasecmp(key,
"set") == 0) {
584 if (value[0] !=
'$') {
585 ELOG(
"Malformed variable assignment, name has to start with $\n");
590 char *v_key = value, *v_value;
591 if (strstr(value,
" ") == NULL && strstr(value,
"\t") == NULL) {
592 ELOG(
"Malformed variable assignment, need a value\n");
596 if (!(v_value = strstr(value,
" ")))
597 v_value = strstr(value,
"\t");
600 while (*v_value ==
'\t' || *v_value ==
' ')
607 DLOG(
"Got new variable %s = %s\n", v_key, v_value);
622 int extra = (strlen(current->
value) - strlen(current->
key));
625 next < (bufcopy + stbuf.st_size) &&
626 (next = strcasestr(next, current->
key)) != NULL;
627 next += strlen(current->
key)) {
629 extra_bytes += extra;
636 char *walk = buf, *destwalk;
637 char *
new =
smalloc((stbuf.st_size + extra_bytes + 1) *
sizeof(
char));
639 while (walk < (buf + stbuf.st_size)) {
644 int distance = stbuf.st_size;
648 if ((current->
next_match - walk) < distance) {
653 if (nearest == NULL) {
655 strncpy(destwalk, walk, (buf + stbuf.st_size) - walk);
656 destwalk += (buf + stbuf.st_size) - walk;
661 strncpy(destwalk, walk, distance);
662 strncpy(destwalk + distance, nearest->
value, strlen(nearest->
value));
663 walk += distance + strlen(nearest->
key);
664 destwalk += distance + strlen(nearest->
value);
674 if (converted != NULL) {
676 ELOG(
"****************************************************************\n");
677 ELOG(
"NOTE: Automatically converted configuration file from v3 to v4.\n");
679 ELOG(
"Please convert your config file to v4. You can use this command:\n");
680 ELOG(
" mv %s %s.O\n", f, f);
681 ELOG(
" i3-migrate-config-to-v4 %s.O > %s\n", f, f);
682 ELOG(
"****************************************************************\n");
688 printf(
"**********************************************************************\n");
689 printf(
"ERROR: Could not convert config file. Maybe i3-migrate-config-to-v4\n");
690 printf(
"was not correctly installed on your system?\n");
691 printf(
"**********************************************************************\n");
697 context =
scalloc(
sizeof(
struct context));
704 fprintf(stderr,
"Could not parse configfile\n");
709 yajl_gen_free(config_output->
json_gen);
722 if (strstr(exec->
command,
"i3bar") != NULL) {
731 if (strstr(exec->
command,
"i3bar") != NULL) {
739 ELOG(
"FYI: You are using i3 version " I3_VERSION
"\n");
741 ELOG(
"Please convert your configfile first, then fix any remaining errors (see above).\n");
764 #line 765 "src/cfgparse.tab.c"
767 # if defined __cplusplus && 201103L <= __cplusplus
768 # define YY_NULL nullptr
775 #ifdef YYERROR_VERBOSE
776 # undef YYERROR_VERBOSE
777 # define YYERROR_VERBOSE 1
779 # define YYERROR_VERBOSE 1
784 #ifndef YY_SRC_CFGPARSE_TAB_H
785 # define YY_SRC_CFGPARSE_TAB_H
903 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
907 #line 701 "../i3-4.4/src/cfgparse.y"
918 #line 919 "src/cfgparse.tab.c"
920 # define YYSTYPE_IS_TRIVIAL 1
921 # define yystype YYSTYPE
922 # define YYSTYPE_IS_DECLARED 1
928 #if defined __STDC__ || defined __cplusplus
929 int yyparse (
void *YYPARSE_PARAM);
934 #if defined __STDC__ || defined __cplusplus
946 #line 947 "src/cfgparse.tab.c"
960 #elif (defined __STDC__ || defined __C99__FUNC__ \
961 || defined __cplusplus || defined _MSC_VER)
980 # ifdef __SIZE_TYPE__
981 # define YYSIZE_T __SIZE_TYPE__
982 # elif defined size_t
983 # define YYSIZE_T size_t
984 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
985 || defined __cplusplus || defined _MSC_VER)
987 # define YYSIZE_T size_t
989 # define YYSIZE_T unsigned int
993 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
996 # if defined YYENABLE_NLS && YYENABLE_NLS
998 # include <libintl.h>
999 # define YY_(msgid) dgettext ("bison-runtime", msgid)
1003 # define YY_(msgid) msgid
1008 #if ! defined lint || defined __GNUC__
1009 # define YYUSE(e) ((void) (e))
1016 # define YYID(n) (n)
1018 #if (defined __STDC__ || defined __C99__FUNC__ \
1019 || defined __cplusplus || defined _MSC_VER)
1032 #if ! defined yyoverflow || YYERROR_VERBOSE
1036 # ifdef YYSTACK_USE_ALLOCA
1037 # if YYSTACK_USE_ALLOCA
1039 # define YYSTACK_ALLOC __builtin_alloca
1040 # elif defined __BUILTIN_VA_ARG_INCR
1041 # include <alloca.h>
1043 # define YYSTACK_ALLOC __alloca
1044 # elif defined _MSC_VER
1045 # include <malloc.h>
1046 # define alloca _alloca
1048 # define YYSTACK_ALLOC alloca
1049 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
1050 || defined __cplusplus || defined _MSC_VER)
1051 # include <stdlib.h>
1053 # ifndef EXIT_SUCCESS
1054 # define EXIT_SUCCESS 0
1061 # ifdef YYSTACK_ALLOC
1063 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
1064 # ifndef YYSTACK_ALLOC_MAXIMUM
1069 # define YYSTACK_ALLOC_MAXIMUM 4032
1072 # define YYSTACK_ALLOC YYMALLOC
1073 # define YYSTACK_FREE YYFREE
1074 # ifndef YYSTACK_ALLOC_MAXIMUM
1075 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1077 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
1078 && ! ((defined YYMALLOC || defined malloc) \
1079 && (defined YYFREE || defined free)))
1080 # include <stdlib.h>
1081 # ifndef EXIT_SUCCESS
1082 # define EXIT_SUCCESS 0
1086 # define YYMALLOC malloc
1087 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
1088 || defined __cplusplus || defined _MSC_VER)
1093 # define YYFREE free
1094 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
1095 || defined __cplusplus || defined _MSC_VER)
1103 #if (! defined yyoverflow \
1104 && (! defined __cplusplus \
1105 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1115 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1119 # define YYSTACK_BYTES(N) \
1120 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1121 + YYSTACK_GAP_MAXIMUM)
1123 # define YYCOPY_NEEDED 1
1130 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1133 YYSIZE_T yynewbytes; \
1134 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1135 Stack = &yyptr->Stack_alloc; \
1136 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1137 yyptr += yynewbytes / sizeof (*yyptr); \
1143 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
1147 # if defined __GNUC__ && 1 < __GNUC__
1148 # define YYCOPY(Dst, Src, Count) \
1149 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
1151 # define YYCOPY(Dst, Src, Count) \
1155 for (yyi = 0; yyi < (Count); yyi++) \
1156 (Dst)[yyi] = (Src)[yyi]; \
1169 #define YYNTOKENS 108
1173 #define YYNRULES 193
1175 #define YYNSTATES 288
1178 #define YYUNDEFTOK 2
1179 #define YYMAXUTOK 356
1181 #define YYTRANSLATE(YYX) \
1182 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1187 0, 2, 2, 2, 2, 2, 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, 107, 2, 2, 2, 2, 2, 2,
1192 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1193 2, 104, 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, 102, 2, 103, 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, 105, 2, 106, 2, 2, 2, 2,
1200 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1201 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1202 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1203 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1204 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1205 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1206 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1207 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1208 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1209 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1210 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1211 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1212 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1213 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1214 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1215 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1216 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1217 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1218 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1219 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1220 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1221 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1222 95, 96, 97, 98, 99, 100, 101
1230 0, 0, 3, 4, 7, 10, 12, 14, 16, 18,
1231 20, 22, 24, 26, 28, 30, 32, 34, 36, 38,
1232 40, 42, 44, 46, 48, 50, 52, 54, 56, 58,
1233 60, 62, 64, 66, 68, 70, 72, 74, 76, 78,
1234 81, 84, 89, 94, 95, 97, 101, 102, 106, 108,
1235 110, 113, 115, 119, 123, 127, 131, 135, 139, 143,
1236 147, 149, 151, 153, 155, 157, 160, 166, 167, 170,
1237 172, 174, 179, 180, 183, 185, 187, 189, 191, 193,
1238 195, 197, 199, 201, 203, 205, 207, 209, 211, 213,
1239 215, 217, 219, 221, 224, 227, 230, 233, 236, 238,
1240 240, 243, 245, 247, 250, 252, 254, 256, 258, 260,
1241 262, 264, 267, 270, 273, 276, 281, 284, 287, 291,
1242 296, 300, 305, 309, 314, 318, 323, 328, 333, 336,
1243 339, 341, 343, 345, 348, 353, 355, 357, 359, 362,
1244 365, 368, 370, 372, 375, 377, 379, 382, 384, 386,
1245 388, 390, 392, 395, 398, 401, 404, 407, 410, 413,
1246 419, 423, 424, 426, 428, 430, 432, 436, 440, 442,
1247 444, 447, 450, 454, 458, 459, 461, 462, 464, 467,
1248 470, 473, 478, 484, 486, 487, 489, 493, 496, 498,
1255 109, 0, -1, -1, 109, 1, -1, 109, 110, -1,
1256 113, -1, 118, -1, 127, -1, 130, -1, 154, -1,
1257 155, -1, 156, -1, 157, -1, 159, -1, 161, -1,
1258 162, -1, 165, -1, 167, -1, 168, -1, 169, -1,
1259 170, -1, 172, -1, 171, -1, 173, -1, 174, -1,
1260 177, -1, 179, -1, 180, -1, 181, -1, 182, -1,
1261 187, -1, 188, -1, 185, -1, 186, -1, 111, -1,
1262 192, -1, 11, -1, 5, -1, 114, -1, 9, 115,
1263 -1, 13, 116, -1, 117, 190, 3, 112, -1, 117,
1264 190, 125, 112, -1, -1, 93, -1, 62, 119, 112,
1265 -1, -1, 120, 122, 121, -1, 102, -1, 103, -1,
1266 122, 123, -1, 123, -1, 95, 104, 5, -1, 96,
1267 104, 5, -1, 97, 104, 5, -1, 99, 104, 5,
1268 -1, 98, 104, 5, -1, 94, 104, 5, -1, 100,
1269 104, 5, -1, 101, 104, 5, -1, 20, -1, 3,
1270 -1, 4, -1, 3, -1, 3, -1, 3, 33, -1,
1271 32, 20, 105, 128, 106, -1, -1, 128, 129, -1,
1272 111, -1, 114, -1, 34, 105, 131, 106, -1, -1,
1273 131, 132, -1, 111, -1, 133, -1, 134, -1, 135,
1274 -1, 136, -1, 137, -1, 139, -1, 141, -1, 143,
1275 -1, 144, -1, 145, -1, 146, -1, 147, -1, 148,
1276 -1, 149, -1, 150, -1, 151, -1, 152, -1, 153,
1277 -1, 80, 5, -1, 81, 5, -1, 63, 5, -1,
1278 64, 5, -1, 77, 138, -1, 79, -1, 78, -1,
1279 66, 140, -1, 67, -1, 68, -1, 69, 142, -1,
1280 70, -1, 71, -1, 72, -1, 73, -1, 74, -1,
1281 75, -1, 76, -1, 82, 5, -1, 83, 164, -1,
1282 84, 164, -1, 65, 5, -1, 85, 105, 131, 106,
1283 -1, 86, 7, -1, 87, 7, -1, 88, 7, 7,
1284 -1, 88, 7, 7, 7, -1, 89, 7, 7, -1,
1285 89, 7, 7, 7, -1, 90, 7, 7, -1, 90,
1286 7, 7, 7, -1, 91, 7, 7, -1, 91, 7,
1287 7, 7, -1, 18, 3, 4, 3, -1, 19, 3,
1288 4, 3, -1, 17, 190, -1, 35, 158, -1, 36,
1289 -1, 37, -1, 38, -1, 39, 160, -1, 39, 58,
1290 58, 3, -1, 55, -1, 56, -1, 57, -1, 40,
1291 163, -1, 41, 163, -1, 42, 183, -1, 45, -1,
1292 43, -1, 44, 183, -1, 3, -1, 4, -1, 46,
1293 166, -1, 43, -1, 37, -1, 36, -1, 47, -1,
1294 164, -1, 48, 164, -1, 49, 164, -1, 50, 164,
1295 -1, 51, 5, -1, 52, 164, -1, 53, 126, -1,
1296 54, 164, -1, 21, 124, 22, 8, 175, -1, 21,
1297 3, 176, -1, -1, 176, -1, 20, -1, 5, -1,
1298 4, -1, 23, 178, 5, -1, 23, 119, 5, -1,
1299 20, -1, 6, -1, 25, 5, -1, 26, 5, -1,
1300 27, 184, 5, -1, 28, 184, 5, -1, -1, 3,
1301 -1, -1, 92, -1, 10, 5, -1, 12, 5, -1,
1302 29, 189, -1, 30, 189, 189, 189, -1, 30, 189,
1303 189, 189, 189, -1, 7, -1, -1, 191, -1, 190,
1304 107, 191, -1, 190, 107, -1, 14, -1, 15, -1,
1305 16, -1, 59, 193, -1, 60, -1, 61, -1
1311 0, 843, 843, 844, 845, 849, 850, 851, 852, 853,
1312 854, 855, 856, 857, 858, 859, 860, 861, 862, 863,
1313 864, 865, 866, 867, 868, 869, 870, 871, 872, 873,
1314 874, 875, 876, 877, 878, 879, 883, 887, 891, 898,
1315 899, 903, 918, 933, 934, 938, 953, 954, 961, 969,
1316 976, 977, 981, 987, 993, 999, 1014, 1029, 1035, 1041,
1317 1058, 1059, 1063, 1064, 1071, 1072, 1076, 1099, 1101, 1105,
1318 1106, 1118, 1145, 1147, 1151, 1152, 1153, 1154, 1155, 1156,
1319 1157, 1158, 1159, 1160, 1161, 1162, 1163, 1164, 1165, 1166,
1320 1167, 1168, 1169, 1173, 1182, 1191, 1202, 1211, 1219, 1220,
1321 1224, 1232, 1233, 1237, 1244, 1245, 1246, 1247, 1248, 1249,
1322 1250, 1254, 1263, 1273, 1281, 1290, 1299, 1307, 1315, 1322,
1323 1333, 1340, 1351, 1358, 1368, 1375, 1385, 1395, 1405, 1413,
1324 1421, 1422, 1423, 1427, 1451, 1472, 1473, 1474, 1478, 1486,
1325 1494, 1500, 1505, 1510, 1518, 1522, 1534, 1542, 1543, 1544,
1326 1545, 1546, 1550, 1558, 1566, 1574, 1582, 1590, 1598, 1606,
1327 1640, 1658, 1659, 1663, 1664, 1665, 1669, 1731, 1747, 1748,
1328 1752, 1759, 1766, 1776, 1786, 1787, 1791, 1792, 1796, 1804,
1329 1815, 1823, 1831, 1843, 1852, 1853, 1854, 1855, 1859, 1860,
1330 1861, 1865, 1873, 1874
1334 #if YYDEBUG || YYERROR_VERBOSE || 1
1339 "$end",
"error",
"$undefined",
"\"<number>\"",
"\"<word>\"",
1340 "\"<string>\"",
"\"<string (non-greedy)>\"",
"\"#<hex>\"",
1341 "\"<RandR output>\"",
"TOKBINDCODE",
"TOKTERMINAL",
"\"<comment>\"",
1342 "\"font\"",
"\"bindsym\"",
"\"<modifier>\"",
"\"control\"",
"\"shift\"",
1343 "\"floating_modifier\"",
"\"floating_maximum_size\"",
1344 "\"floating_minimum_size\"",
"\"<quoted string>\"",
"\"workspace\"",
1345 "\"output\"",
"\"assign\"",
"TOKSET",
"\"ipc_socket\"",
1346 "\"restart_state\"",
"\"exec\"",
"\"exec_always\"",
"TOKSINGLECOLOR",
1347 "TOKCOLOR",
"\"\\342\\206\\222\"",
"\"mode\"",
"\"ms\"",
"\"bar\"",
1348 "\"default_orientation\"",
"\"horizontal\"",
"\"vertical\"",
"\"auto\"",
1349 "\"workspace_layout\"",
"\"new_window\"",
"\"new_float\"",
"\"normal\"",
1350 "\"none\"",
"\"pixel\"",
"\"1pixel\"",
"\"hide_edge_borders\"",
1351 "\"both\"",
"\"focus_follows_mouse\"",
"\"force_focus_wrapping\"",
1352 "\"force_xinerama\"",
"\"fake_outputs\"",
1353 "\"workspace_auto_back_and_forth\"",
"\"force_display_urgency_hint\"",
1354 "\"workspace_bar\"",
"\"default\"",
"\"stacking\"",
"\"tabbed\"",
1355 "\"stack-limit\"",
"\"popup_during_fullscreen\"",
"\"ignore\"",
1356 "\"leave_fullscreen\"",
"\"for_window\"",
"\"output (bar)\"",
1357 "\"tray_output\"",
"\"socket_path\"",
"\"mode (bar)\"",
"\"hide\"",
1358 "\"dock\"",
"\"modifier (bar)\"",
"\"shift (bar)\"",
"\"control (bar)\"",
1359 "\"Mod1\"",
"\"Mod2\"",
"\"Mod3\"",
"\"Mod4\"",
"\"Mod5\"",
1360 "\"position\"",
"\"bottom\"",
"\"top\"",
"\"status_command\"",
1361 "\"i3bar_command\"",
"\"font (bar)\"",
"\"workspace_buttons\"",
1362 "\"verbose\"",
"\"colors\"",
"\"background\"",
"\"statusline\"",
1363 "\"focused_workspace\"",
"\"active_workspace\"",
1364 "\"inactive_workspace\"",
"\"urgent_workspace\"",
"\"--no-startup-id\"",
1365 "\"--release\"",
"\"mark\"",
"\"class\"",
"\"instance\"",
1366 "\"window_role\"",
"\"id\"",
"\"con_id\"",
"\"title\"",
"\"urgent\"",
1367 "'['",
"']'",
"'='",
"'{'",
"'}'",
"'+'",
"$accept",
"lines",
"line",
1368 "comment",
"command",
"bindline",
"binding",
"bindcode",
"bindsym",
1369 "optional_release",
"for_window",
"match",
"matchstart",
"matchend",
1370 "criteria",
"criterion",
"qstring_or_number",
"word_or_number",
1371 "duration",
"mode",
"modelines",
"modeline",
"bar",
"barlines",
1372 "barline",
"bar_status_command",
"bar_i3bar_command",
"bar_output",
1373 "bar_tray_output",
"bar_position",
"bar_position_position",
"bar_mode",
1374 "bar_mode_mode",
"bar_modifier",
"bar_modifier_modifier",
"bar_font",
1375 "bar_workspace_buttons",
"bar_verbose",
"bar_socket_path",
"bar_colors",
1376 "bar_color_background",
"bar_color_statusline",
1377 "bar_color_focused_workspace",
"bar_color_active_workspace",
1378 "bar_color_inactive_workspace",
"bar_color_urgent_workspace",
1379 "floating_maximum_size",
"floating_minimum_size",
"floating_modifier",
1380 "orientation",
"direction",
"workspace_layout",
"layout_mode",
1381 "new_window",
"new_float",
"border_style",
"bool",
"hide_edge_borders",
1382 "edge_hiding_mode",
"focus_follows_mouse",
"force_focus_wrapping",
1383 "force_xinerama",
"fake_outputs",
"workspace_back_and_forth",
1384 "force_display_urgency_hint",
"workspace_bar",
"workspace",
1385 "optional_workspace_name",
"workspace_name",
"assign",
"window_class",
1386 "ipcsocket",
"restart_state",
"exec",
"exec_always",
1387 "optional_border_width",
"optional_no_startup_id",
"terminal",
"font",
1388 "single_color",
"color",
"colorpixel",
"binding_modifiers",
1389 "binding_modifier",
"popup_during_fullscreen",
"popup_setting",
YY_NULL
1396 static const yytype_uint16 yytoknum[] =
1398 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1399 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1400 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1401 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1402 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1403 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1404 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1405 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1406 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1407 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1408 355, 356, 91, 93, 61, 123, 125, 43
1415 0, 108, 109, 109, 109, 110, 110, 110, 110, 110,
1416 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1417 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1418 110, 110, 110, 110, 110, 110, 111, 112, 113, 114,
1419 114, 115, 116, 117, 117, 118, 119, 119, 120, 121,
1420 122, 122, 123, 123, 123, 123, 123, 123, 123, 123,
1421 124, 124, 125, 125, 126, 126, 127, 128, 128, 129,
1422 129, 130, 131, 131, 132, 132, 132, 132, 132, 132,
1423 132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
1424 132, 132, 132, 133, 134, 135, 136, 137, 138, 138,
1425 139, 140, 140, 141, 142, 142, 142, 142, 142, 142,
1426 142, 143, 144, 145, 146, 147, 148, 149, 150, 150,
1427 151, 151, 152, 152, 153, 153, 154, 155, 156, 157,
1428 158, 158, 158, 159, 159, 160, 160, 160, 161, 162,
1429 163, 163, 163, 163, 164, 164, 165, 166, 166, 166,
1430 166, 166, 167, 168, 169, 170, 171, 172, 173, 174,
1431 174, 175, 175, 176, 176, 176, 177, 177, 178, 178,
1432 179, 180, 181, 182, 183, 183, 184, 184, 185, 186,
1433 187, 188, 188, 189, 190, 190, 190, 190, 191, 191,
1440 0, 2, 0, 2, 2, 1, 1, 1, 1, 1,
1441 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1442 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1443 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1444 2, 4, 4, 0, 1, 3, 0, 3, 1, 1,
1445 2, 1, 3, 3, 3, 3, 3, 3, 3, 3,
1446 1, 1, 1, 1, 1, 2, 5, 0, 2, 1,
1447 1, 4, 0, 2, 1, 1, 1, 1, 1, 1,
1448 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1449 1, 1, 1, 2, 2, 2, 2, 2, 1, 1,
1450 2, 1, 1, 2, 1, 1, 1, 1, 1, 1,
1451 1, 2, 2, 2, 2, 4, 2, 2, 3, 4,
1452 3, 4, 3, 4, 3, 4, 4, 4, 2, 2,
1453 1, 1, 1, 2, 4, 1, 1, 1, 2, 2,
1454 2, 1, 1, 2, 1, 1, 2, 1, 1, 1,
1455 1, 1, 2, 2, 2, 2, 2, 2, 2, 5,
1456 3, 0, 1, 1, 1, 1, 3, 3, 1, 1,
1457 2, 2, 3, 3, 0, 1, 0, 1, 2, 2,
1458 2, 4, 5, 1, 0, 1, 3, 2, 1, 1,
1467 2, 0, 1, 3, 43, 0, 36, 0, 43, 184,
1468 0, 0, 0, 46, 0, 0, 176, 176, 0, 0,
1469 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1470 0, 0, 0, 0, 0, 46, 4, 34, 5, 38,
1471 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1472 16, 17, 18, 19, 20, 22, 21, 23, 24, 25,
1473 26, 27, 28, 29, 32, 33, 30, 31, 35, 44,
1474 39, 184, 178, 179, 40, 184, 188, 189, 190, 128,
1475 185, 0, 0, 61, 60, 0, 169, 168, 48, 0,
1476 0, 0, 170, 171, 177, 0, 0, 183, 180, 0,
1477 0, 72, 130, 131, 132, 129, 135, 136, 137, 0,
1478 133, 174, 142, 174, 141, 138, 139, 144, 145, 149,
1479 148, 147, 150, 151, 146, 152, 153, 154, 155, 156,
1480 64, 157, 158, 192, 193, 191, 0, 0, 0, 187,
1481 0, 0, 165, 164, 163, 160, 0, 167, 0, 0,
1482 0, 0, 0, 0, 0, 0, 0, 51, 166, 172,
1483 173, 0, 67, 0, 0, 175, 140, 143, 65, 37,
1484 45, 0, 63, 62, 0, 186, 126, 127, 161, 0,
1485 0, 0, 0, 0, 0, 0, 0, 49, 47, 50,
1486 181, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1487 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1488 71, 74, 73, 75, 76, 77, 78, 79, 80, 81,
1489 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
1490 92, 134, 41, 42, 159, 162, 57, 52, 53, 54,
1491 56, 55, 58, 59, 182, 66, 69, 70, 68, 95,
1492 96, 114, 101, 102, 100, 104, 105, 106, 107, 108,
1493 109, 110, 103, 99, 98, 97, 93, 94, 111, 112,
1494 113, 72, 116, 117, 0, 0, 0, 0, 0, 118,
1495 120, 122, 124, 115, 119, 121, 123, 125
1501 -1, 1, 36, 211, 170, 38, 39, 70, 74, 71,
1502 40, 89, 90, 188, 156, 157, 85, 174, 131, 41,
1503 191, 248, 42, 163, 212, 213, 214, 215, 216, 217,
1504 265, 218, 254, 219, 262, 220, 221, 222, 223, 224,
1505 225, 226, 227, 228, 229, 230, 43, 44, 45, 46,
1506 105, 47, 110, 48, 49, 115, 123, 50, 124, 51,
1507 52, 53, 54, 55, 56, 57, 58, 234, 145, 59,
1508 91, 60, 61, 62, 63, 166, 95, 64, 65, 66,
1509 67, 98, 79, 80, 68, 135
1514 #define YYPACT_NINF -149
1517 -149, 170, -149, -149, -78, 20, -149, 49, -78, 46,
1518 24, 65, 8, 4, 64, 77, -9, -9, 78, 78,
1519 79, -5, 41, 0, 22, 22, 16, 44, 44, 44,
1520 100, 44, 107, 44, -10, 9, -149, -149, -149, -149,
1521 -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
1522 -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
1523 -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
1524 -149, 46, -149, -149, -149, 46, -149, -149, -149, 10,
1525 -149, 110, 112, 17, -149, 115, -149, -149, -149, 133,
1526 -55, 134, -149, -149, -149, 135, 136, -149, -149, 78,
1527 37, -149, -149, -149, -149, -149, -149, -149, -149, 85,
1528 -149, 142, -149, 142, -149, -149, -149, -149, -149, -149,
1529 -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
1530 113, -149, -149, -149, -149, -149, 144, 1, 5, 46,
1531 147, 148, -149, -149, -149, -149, 139, -149, 48, 50,
1532 51, 52, 53, 54, 55, 56, -65, -149, -149, -149,
1533 -149, 78, -149, 7, 150, -149, -149, -149, -149, -149,
1534 -149, 144, -149, -149, 144, -149, -149, -149, 17, 156,
1535 157, 158, 159, 160, 161, 162, 163, -149, -149, -149,
1536 78, 3, 164, 167, 168, 13, 60, -4, 169, 173,
1537 179, 44, 44, 80, 185, 187, 194, 196, 199, 200,
1538 -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
1539 -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
1540 -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
1541 -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
1542 -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
1543 -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
1544 -149, -149, -149, -149, 201, 205, 206, 207, 38, 208,
1545 210, 218, 219, -149, -149, -149, -149, -149
1551 -149, -149, -149, -1, -148, -149, 36, -149, -149, 178,
1552 -149, 193, -149, -149, -149, 74, -149, -149, -149, -149,
1553 -149, -149, -149, -40, -149, -149, -149, -149, -149, -149,
1554 -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
1555 -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
1556 -149, -149, -149, -149, -149, 209, -26, -149, -149, -149,
1557 -149, -149, -149, -149, -149, -149, -149, -149, 57, -149,
1558 -149, -149, -149, -149, -149, 120, 220, -149, -149, -149,
1559 -149, -13, -58, 97, -149, -149
1565 #define YYTABLE_NINF -1
1568 37, 125, 126, 127, 171, 129, 99, 132, 172, 173,
1569 86, 83, 4, 137, 6, 69, 8, 138, 6, 117,
1570 118, 142, 143, 232, 87, 72, 233, 81, 84, 148,
1571 149, 150, 151, 152, 153, 154, 155, 144, 187, 148,
1572 149, 150, 151, 152, 153, 154, 155, 117, 118, 6,
1573 133, 134, 119, 120, 73, 106, 107, 108, 109, 121,
1574 76, 77, 78, 122, 111, 112, 113, 114, 82, 92,
1575 192, 193, 194, 195, 263, 264, 196, 102, 103, 104,
1576 252, 253, 93, 94, 197, 97, 161, 198, 199, 200,
1577 201, 202, 203, 204, 205, 206, 207, 208, 209, 100,
1578 101, 192, 193, 194, 195, 128, 88, 196, 139, 245,
1579 130, 88, 139, 210, 140, 197, 141, 139, 198, 199,
1580 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
1581 255, 256, 257, 258, 259, 260, 261, 146, 147, 158,
1582 159, 160, 162, 164, 283, 165, 168, 178, 190, 169,
1583 176, 177, 179, 231, 180, 181, 182, 183, 184, 185,
1584 186, 236, 237, 238, 239, 240, 241, 242, 243, 249,
1585 2, 3, 250, 251, 266, 269, 270, 244, 267, 4,
1586 5, 6, 7, 8, 268, 271, 75, 9, 10, 11,
1587 246, 12, 272, 13, 273, 14, 15, 16, 17, 18,
1588 19, 274, 20, 275, 21, 22, 276, 277, 279, 23,
1589 24, 25, 280, 281, 282, 284, 26, 285, 27, 28,
1590 29, 30, 31, 32, 33, 286, 287, 247, 136, 34,
1591 189, 278, 35, 167, 116, 235, 175, 96
1594 #define yypact_value_is_default(yystate) \
1595 ((yystate) == (-149))
1597 #define yytable_value_is_error(yytable_value) \
1602 1, 27, 28, 29, 3, 31, 19, 33, 3, 4,
1603 6, 3, 9, 71, 11, 93, 13, 75, 11, 3,
1604 4, 4, 5, 171, 20, 5, 174, 3, 20, 94,
1605 95, 96, 97, 98, 99, 100, 101, 20, 103, 94,
1606 95, 96, 97, 98, 99, 100, 101, 3, 4, 11,
1607 60, 61, 36, 37, 5, 55, 56, 57, 58, 43,
1608 14, 15, 16, 47, 42, 43, 44, 45, 3, 5,
1609 63, 64, 65, 66, 78, 79, 69, 36, 37, 38,
1610 67, 68, 5, 92, 77, 7, 99, 80, 81, 82,
1611 83, 84, 85, 86, 87, 88, 89, 90, 91, 20,
1612 105, 63, 64, 65, 66, 5, 102, 69, 107, 106,
1613 3, 102, 107, 106, 4, 77, 4, 107, 80, 81,
1614 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
1615 70, 71, 72, 73, 74, 75, 76, 22, 5, 5,
1616 5, 5, 105, 58, 106, 3, 33, 8, 161, 5,
1617 3, 3, 104, 3, 104, 104, 104, 104, 104, 104,
1618 104, 5, 5, 5, 5, 5, 5, 5, 5, 5,
1619 0, 1, 5, 5, 5, 201, 202, 190, 5, 9,
1620 10, 11, 12, 13, 5, 105, 8, 17, 18, 19,
1621 191, 21, 7, 23, 7, 25, 26, 27, 28, 29,
1622 30, 7, 32, 7, 34, 35, 7, 7, 7, 39,
1623 40, 41, 7, 7, 7, 7, 46, 7, 48, 49,
1624 50, 51, 52, 53, 54, 7, 7, 191, 35, 59,
1625 156, 271, 62, 113, 25, 178, 139, 17
1632 0, 109, 0, 1, 9, 10, 11, 12, 13, 17,
1633 18, 19, 21, 23, 25, 26, 27, 28, 29, 30,
1634 32, 34, 35, 39, 40, 41, 46, 48, 49, 50,
1635 51, 52, 53, 54, 59, 62, 110, 111, 113, 114,
1636 118, 127, 130, 154, 155, 156, 157, 159, 161, 162,
1637 165, 167, 168, 169, 170, 171, 172, 173, 174, 177,
1638 179, 180, 181, 182, 185, 186, 187, 188, 192, 93,
1639 115, 117, 5, 5, 116, 117, 14, 15, 16, 190,
1640 191, 3, 3, 3, 20, 124, 6, 20, 102, 119,
1641 120, 178, 5, 5, 92, 184, 184, 7, 189, 189,
1642 20, 105, 36, 37, 38, 158, 55, 56, 57, 58,
1643 160, 42, 43, 44, 45, 163, 163, 3, 4, 36,
1644 37, 43, 47, 164, 166, 164, 164, 164, 5, 164,
1645 3, 126, 164, 60, 61, 193, 119, 190, 190, 107,
1646 4, 4, 4, 5, 20, 176, 22, 5, 94, 95,
1647 96, 97, 98, 99, 100, 101, 122, 123, 5, 5,
1648 5, 189, 105, 131, 58, 3, 183, 183, 33, 5,
1649 112, 3, 3, 4, 125, 191, 3, 3, 8, 104,
1650 104, 104, 104, 104, 104, 104, 104, 103, 121, 123,
1651 189, 128, 63, 64, 65, 66, 69, 77, 80, 81,
1652 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
1653 106, 111, 132, 133, 134, 135, 136, 137, 139, 141,
1654 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
1655 153, 3, 112, 112, 175, 176, 5, 5, 5, 5,
1656 5, 5, 5, 5, 189, 106, 111, 114, 129, 5,
1657 5, 5, 67, 68, 140, 70, 71, 72, 73, 74,
1658 75, 76, 142, 78, 79, 138, 5, 5, 5, 164,
1659 164, 105, 7, 7, 7, 7, 7, 7, 131, 7,
1660 7, 7, 7, 106, 7, 7, 7, 7
1663 #define yyerrok (yyerrstatus = 0)
1664 #define yyclearin (yychar = YYEMPTY)
1665 #define YYEMPTY (-2)
1668 #define YYACCEPT goto yyacceptlab
1669 #define YYABORT goto yyabortlab
1670 #define YYERROR goto yyerrorlab
1680 #define YYFAIL goto yyerrlab
1688 #define YYRECOVERING() (!!yyerrstatus)
1690 #define YYBACKUP(Token, Value) \
1692 if (yychar == YYEMPTY) \
1696 YYPOPSTACK (yylen); \
1702 yyerror (YY_("syntax error: cannot back up")); \
1709 #define YYERRCODE 256
1715 #ifndef YYLLOC_DEFAULT
1716 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1720 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1721 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1722 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1723 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1727 (Current).first_line = (Current).last_line = \
1728 YYRHSLOC (Rhs, 0).last_line; \
1729 (Current).first_column = (Current).last_column = \
1730 YYRHSLOC (Rhs, 0).last_column; \
1735 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1741 #ifndef YY_LOCATION_PRINT
1742 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1749 # define YYLEX yylex (YYLEX_PARAM)
1751 # define YYLEX yylex (context)
1759 # define YYFPRINTF fprintf
1762 # define YYDPRINTF(Args) \
1768 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1772 YYFPRINTF (stderr, "%s ", Title); \
1773 yy_symbol_print (stderr, \
1775 YYFPRINTF (stderr, "\n"); \
1785 #if (defined __STDC__ || defined __C99__FUNC__ \
1786 || defined __cplusplus || defined _MSC_VER)
1794 YYSTYPE const * const yyvaluep;
1797 FILE *yyo = yyoutput;
1803 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1819 #if (defined __STDC__ || defined __C99__FUNC__ \
1820 || defined __cplusplus || defined _MSC_VER)
1828 YYSTYPE const * const yyvaluep;
1832 YYFPRINTF (yyoutput,
"token %s (", yytname[yytype]);
1834 YYFPRINTF (yyoutput,
"nterm %s (", yytname[yytype]);
1845 #if (defined __STDC__ || defined __C99__FUNC__ \
1846 || defined __cplusplus || defined _MSC_VER)
1852 yytype_int16 *yybottom;
1853 yytype_int16 *yytop;
1857 for (; yybottom <= yytop; yybottom++)
1859 int yybot = *yybottom;
1865 # define YY_STACK_PRINT(Bottom, Top) \
1868 yy_stack_print ((Bottom), (Top)); \
1876 #if (defined __STDC__ || defined __C99__FUNC__ \
1877 || defined __cplusplus || defined _MSC_VER)
1887 int yynrhs = yyr2[yyrule];
1889 unsigned long int yylno = yyrline[yyrule];
1890 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
1893 for (yyi = 0; yyi < yynrhs; yyi++)
1897 &(yyvsp[(yyi + 1) - (yynrhs)])
1903 # define YY_REDUCE_PRINT(Rule) \
1906 yy_reduce_print (yyvsp, Rule); \
1913 # define YYDPRINTF(Args)
1914 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1915 # define YY_STACK_PRINT(Bottom, Top)
1916 # define YY_REDUCE_PRINT(Rule)
1922 # define YYINITDEPTH 200
1933 # define YYMAXDEPTH 10000
1940 # if defined __GLIBC__ && defined _STRING_H
1941 # define yystrlen strlen
1944 #if (defined __STDC__ || defined __C99__FUNC__ \
1945 || defined __cplusplus || defined _MSC_VER)
1955 for (yylen = 0; yystr[yylen]; yylen++)
1963 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1964 # define yystpcpy stpcpy
1968 #if (defined __STDC__ || defined __C99__FUNC__ \
1969 || defined __cplusplus || defined _MSC_VER)
1971 yystpcpy (
char *yydest,
const char *yysrc)
1980 const char *yys = yysrc;
1982 while ((*yyd++ = *yys++) !=
'\0')
2004 char const *yyp = yystr;
2011 goto do_not_strip_quotes;
2015 goto do_not_strip_quotes;
2028 do_not_strip_quotes: ;
2034 return yystpcpy (yyres, yystr) - yyres;
2048 yytype_int16 *yyssp,
int yytoken)
2053 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
2055 const char *yyformat =
YY_NULL;
2057 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2091 int yyn = yypact[*yyssp];
2092 yyarg[yycount++] = yytname[yytoken];
2098 int yyxbegin = yyn < 0 ? -yyn : 0;
2100 int yychecklim =
YYLAST - yyn + 1;
2104 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2105 if (yycheck[yyx + yyn] == yyx && yyx !=
YYTERROR
2108 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2114 yyarg[yycount++] = yytname[yyx];
2116 if (! (yysize <= yysize1
2126 # define YYCASE_(N, S) \
2131 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
2132 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
2133 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
2134 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
2135 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
2139 yysize1 = yysize +
yystrlen (yyformat);
2144 if (*yymsg_alloc < yysize)
2146 *yymsg_alloc = 2 * yysize;
2147 if (! (yysize <= *yymsg_alloc
2159 while ((*yyp = *yyformat) !=
'\0')
2160 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
2180 #if (defined __STDC__ || defined __C99__FUNC__ \
2181 || defined __cplusplus || defined _MSC_VER)
2223 #ifdef YYPARSE_PARAM
2224 #if (defined __STDC__ || defined __C99__FUNC__ \
2225 || defined __cplusplus || defined _MSC_VER)
2231 void *YYPARSE_PARAM;
2234 #if (defined __STDC__ || defined __C99__FUNC__ \
2235 || defined __cplusplus || defined _MSC_VER)
2259 yytype_int16 *yyssp;
2279 char *yymsg = yymsgbuf;
2280 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
2283 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2294 YYDPRINTF ((stderr,
"Starting parse\n"));
2320 if (yyss + yystacksize - 1 <= yyssp)
2323 YYSIZE_T yysize = yyssp - yyss + 1;
2331 yytype_int16 *yyss1 = yyss;
2337 yyoverflow (
YY_(
"memory exhausted"),
2338 &yyss1, yysize *
sizeof (*yyssp),
2339 &yyvs1, yysize *
sizeof (*yyvsp),
2346 # ifndef YYSTACK_RELOCATE
2347 goto yyexhaustedlab;
2351 goto yyexhaustedlab;
2357 yytype_int16 *yyss1 = yyss;
2361 goto yyexhaustedlab;
2364 # undef YYSTACK_RELOCATE
2371 yyssp = yyss + yysize - 1;
2372 yyvsp = yyvs + yysize - 1;
2374 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
2375 (
unsigned long int) yystacksize));
2377 if (yyss + yystacksize - 1 <= yyssp)
2381 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
2397 yyn = yypact[yystate];
2406 YYDPRINTF ((stderr,
"Reading a token: "));
2410 if (yychar <=
YYEOF)
2412 yychar = yytoken =
YYEOF;
2413 YYDPRINTF ((stderr,
"Now at end of input.\n"));
2424 if (yyn < 0 ||
YYLAST < yyn || yycheck[yyn] != yytoken)
2456 yyn = yydefact[yystate];
2477 yyval = yyvsp[1-yylen];
2485 #line 892 "../i3-4.4/src/cfgparse.y"
2493 #line 898 "../i3-4.4/src/cfgparse.y"
2494 { (yyval.
binding) = (yyvsp[(2) - (2)].binding); }
2499 #line 899 "../i3-4.4/src/cfgparse.y"
2500 { (yyval.
binding) = (yyvsp[(2) - (2)].binding); }
2505 #line 904 "../i3-4.4/src/cfgparse.y"
2507 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));
2510 new->release = (yyvsp[(1) - (4)].
number);
2511 new->keycode = (yyvsp[(3) - (4)].
number);
2512 new->mods = (yyvsp[(2) - (4)].
number);
2513 new->command = (yyvsp[(4) - (4)].
string);
2521 #line 919 "../i3-4.4/src/cfgparse.y"
2523 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));
2526 new->release = (yyvsp[(1) - (4)].
number);
2527 new->symbol = (yyvsp[(3) - (4)].
string);
2528 new->mods = (yyvsp[(2) - (4)].
number);
2529 new->command = (yyvsp[(4) - (4)].
string);
2537 #line 933 "../i3-4.4/src/cfgparse.y"
2538 { (yyval.
number) = B_UPON_KEYPRESS; }
2543 #line 934 "../i3-4.4/src/cfgparse.y"
2544 { (yyval.
number) = B_UPON_KEYRELEASE; }
2549 #line 939 "../i3-4.4/src/cfgparse.y"
2552 ELOG(
"Match is empty, ignoring this for_window statement\n");
2555 printf(
"\t should execute command %s for the criteria mentioned above\n", (yyvsp[(3) - (3)].
string));
2557 assignment->
type = A_COMMAND;
2566 #line 955 "../i3-4.4/src/cfgparse.y"
2568 printf(
"match parsed\n");
2574 #line 962 "../i3-4.4/src/cfgparse.y"
2583 #line 970 "../i3-4.4/src/cfgparse.y"
2585 printf(
"match specification finished\n");
2591 #line 982 "../i3-4.4/src/cfgparse.y"
2593 printf(
"criteria: class = %s\n", (yyvsp[(3) - (3)].
string));
2595 free((yyvsp[(3) - (3)].
string));
2601 #line 988 "../i3-4.4/src/cfgparse.y"
2603 printf(
"criteria: instance = %s\n", (yyvsp[(3) - (3)].
string));
2605 free((yyvsp[(3) - (3)].
string));
2611 #line 994 "../i3-4.4/src/cfgparse.y"
2613 printf(
"criteria: window_role = %s\n", (yyvsp[(3) - (3)].
string));
2615 free((yyvsp[(3) - (3)].
string));
2621 #line 1000 "../i3-4.4/src/cfgparse.y"
2623 printf(
"criteria: id = %s\n", (yyvsp[(3) - (3)].
string));
2625 long parsed = strtol((yyvsp[(3) - (3)].
string), &end, 10);
2626 if (parsed == LONG_MIN ||
2627 parsed == LONG_MAX ||
2629 (end && *end !=
'\0')) {
2630 ELOG(
"Could not parse con id \"%s\"\n", (yyvsp[(3) - (3)].
string));
2633 printf(
"id as int = %p\n", current_match.
con_id);
2640 #line 1015 "../i3-4.4/src/cfgparse.y"
2642 printf(
"criteria: window id = %s\n", (yyvsp[(3) - (3)].
string));
2644 long parsed = strtol((yyvsp[(3) - (3)].
string), &end, 10);
2645 if (parsed == LONG_MIN ||
2646 parsed == LONG_MAX ||
2648 (end && *end !=
'\0')) {
2649 ELOG(
"Could not parse window id \"%s\"\n", (yyvsp[(3) - (3)].
string));
2651 current_match.
id = parsed;
2652 printf(
"window id as int = %d\n", current_match.
id);
2659 #line 1030 "../i3-4.4/src/cfgparse.y"
2661 printf(
"criteria: mark = %s\n", (yyvsp[(3) - (3)].
string));
2663 free((yyvsp[(3) - (3)].
string));
2669 #line 1036 "../i3-4.4/src/cfgparse.y"
2671 printf(
"criteria: title = %s\n", (yyvsp[(3) - (3)].
string));
2673 free((yyvsp[(3) - (3)].
string));
2679 #line 1042 "../i3-4.4/src/cfgparse.y"
2681 printf(
"criteria: urgent = %s\n", (yyvsp[(3) - (3)].
string));
2682 if (strcasecmp((yyvsp[(3) - (3)].
string),
"latest") == 0 ||
2683 strcasecmp((yyvsp[(3) - (3)].
string),
"newest") == 0 ||
2684 strcasecmp((yyvsp[(3) - (3)].
string),
"recent") == 0 ||
2685 strcasecmp((yyvsp[(3) - (3)].
string),
"last") == 0) {
2686 current_match.
urgent = U_LATEST;
2687 }
else if (strcasecmp((yyvsp[(3) - (3)].
string),
"oldest") == 0 ||
2688 strcasecmp((yyvsp[(3) - (3)].
string),
"first") == 0) {
2689 current_match.
urgent = U_OLDEST;
2691 free((yyvsp[(3) - (3)].
string));
2697 #line 1059 "../i3-4.4/src/cfgparse.y"
2703 #line 1065 "../i3-4.4/src/cfgparse.y"
2711 #line 1071 "../i3-4.4/src/cfgparse.y"
2717 #line 1072 "../i3-4.4/src/cfgparse.y"
2723 #line 1077 "../i3-4.4/src/cfgparse.y"
2725 if (strcasecmp((yyvsp[(2) - (5)].
string),
"default") == 0) {
2726 printf(
"You cannot use the name \"default\" for your mode\n");
2729 printf(
"\t now in mode %s\n", (yyvsp[(2) - (5)].
string));
2733 printf(
"got binding on mods %d, keycode %d, symbol %s, command %s\n",
2747 #line 1107 "../i3-4.4/src/cfgparse.y"
2760 #line 1119 "../i3-4.4/src/cfgparse.y"
2762 printf(
"\t new bar configuration finished, saving.\n");
2768 char *
x = current_bar.
id + strlen(
"bar-");
2769 while (*x !=
'\0') {
2770 *(x++) = (rand() % 26) +
'a';
2780 memcpy(bar_config, ¤t_bar,
sizeof(
Barconfig));
2783 memset(¤t_bar,
'\0',
sizeof(
Barconfig));
2789 #line 1174 "../i3-4.4/src/cfgparse.y"
2791 DLOG(
"should add status command %s\n", (yyvsp[(2) - (2)].
string));
2799 #line 1183 "../i3-4.4/src/cfgparse.y"
2801 DLOG(
"should add i3bar_command %s\n", (yyvsp[(2) - (2)].
string));
2809 #line 1192 "../i3-4.4/src/cfgparse.y"
2811 DLOG(
"bar output %s\n", (yyvsp[(2) - (2)].
string));
2821 #line 1203 "../i3-4.4/src/cfgparse.y"
2823 DLOG(
"tray %s\n", (yyvsp[(2) - (2)].
string));
2831 #line 1212 "../i3-4.4/src/cfgparse.y"
2833 DLOG(
"position %d\n", (yyvsp[(2) - (2)].number));
2840 #line 1219 "../i3-4.4/src/cfgparse.y"
2841 { (yyval.
number) = P_TOP; }
2846 #line 1220 "../i3-4.4/src/cfgparse.y"
2847 { (yyval.
number) = P_BOTTOM; }
2852 #line 1225 "../i3-4.4/src/cfgparse.y"
2854 DLOG(
"mode %d\n", (yyvsp[(2) - (2)].number));
2855 current_bar.
mode = (yyvsp[(2) - (2)].
number);
2861 #line 1232 "../i3-4.4/src/cfgparse.y"
2862 { (yyval.
number) = M_HIDE; }
2867 #line 1233 "../i3-4.4/src/cfgparse.y"
2868 { (yyval.
number) = M_DOCK; }
2873 #line 1238 "../i3-4.4/src/cfgparse.y"
2875 DLOG(
"modifier %d\n", (yyvsp[(2) - (2)].number));
2882 #line 1244 "../i3-4.4/src/cfgparse.y"
2883 { (yyval.
number) = M_CONTROL; }
2888 #line 1245 "../i3-4.4/src/cfgparse.y"
2889 { (yyval.
number) = M_SHIFT; }
2894 #line 1246 "../i3-4.4/src/cfgparse.y"
2895 { (yyval.
number) = M_MOD1; }
2900 #line 1247 "../i3-4.4/src/cfgparse.y"
2901 { (yyval.
number) = M_MOD2; }
2906 #line 1248 "../i3-4.4/src/cfgparse.y"
2907 { (yyval.
number) = M_MOD3; }
2912 #line 1249 "../i3-4.4/src/cfgparse.y"
2913 { (yyval.
number) = M_MOD4; }
2918 #line 1250 "../i3-4.4/src/cfgparse.y"
2919 { (yyval.
number) = M_MOD5; }
2924 #line 1255 "../i3-4.4/src/cfgparse.y"
2926 DLOG(
"font %s\n", (yyvsp[(2) - (2)].
string));
2928 current_bar.
font = (yyvsp[(2) - (2)].
string);
2934 #line 1264 "../i3-4.4/src/cfgparse.y"
2936 DLOG(
"workspace_buttons = %d\n", (yyvsp[(2) - (2)].number));
2945 #line 1274 "../i3-4.4/src/cfgparse.y"
2947 DLOG(
"verbose = %d\n", (yyvsp[(2) - (2)].number));
2954 #line 1282 "../i3-4.4/src/cfgparse.y"
2956 DLOG(
"socket_path = %s\n", (yyvsp[(2) - (2)].
string));
2964 #line 1291 "../i3-4.4/src/cfgparse.y"
2974 #line 1300 "../i3-4.4/src/cfgparse.y"
2976 DLOG(
"background = %s\n", (yyvsp[(2) - (2)].
string));
2983 #line 1308 "../i3-4.4/src/cfgparse.y"
2985 DLOG(
"statusline = %s\n", (yyvsp[(2) - (2)].
string));
2992 #line 1316 "../i3-4.4/src/cfgparse.y"
2995 DLOG(
"focused_ws = %s, %s (old)\n", (yyvsp[(2) - (3)].
string), (yyvsp[(3) - (3)].
string));
3003 #line 1323 "../i3-4.4/src/cfgparse.y"
3006 DLOG(
"focused_ws = %s, %s and %s\n", (yyvsp[(2) - (4)].
string), (yyvsp[(3) - (4)].
string), (yyvsp[(4) - (4)].
string));
3015 #line 1334 "../i3-4.4/src/cfgparse.y"
3018 DLOG(
"active_ws = %s, %s (old)\n", (yyvsp[(2) - (3)].
string), (yyvsp[(3) - (3)].
string));
3026 #line 1341 "../i3-4.4/src/cfgparse.y"
3029 DLOG(
"active_ws = %s, %s and %s\n", (yyvsp[(2) - (4)].
string), (yyvsp[(3) - (4)].
string), (yyvsp[(4) - (4)].
string));
3038 #line 1352 "../i3-4.4/src/cfgparse.y"
3041 DLOG(
"inactive_ws = %s, %s (old)\n", (yyvsp[(2) - (3)].
string), (yyvsp[(3) - (3)].
string));
3049 #line 1359 "../i3-4.4/src/cfgparse.y"
3051 DLOG(
"inactive_ws = %s, %s and %s\n", (yyvsp[(2) - (4)].
string), (yyvsp[(3) - (4)].
string), (yyvsp[(4) - (4)].
string));
3060 #line 1369 "../i3-4.4/src/cfgparse.y"
3063 DLOG(
"urgent_ws = %s, %s (old)\n", (yyvsp[(2) - (3)].
string), (yyvsp[(3) - (3)].
string));
3071 #line 1376 "../i3-4.4/src/cfgparse.y"
3073 DLOG(
"urgent_ws = %s, %s and %s\n", (yyvsp[(2) - (4)].
string), (yyvsp[(3) - (4)].
string), (yyvsp[(4) - (4)].
string));
3082 #line 1386 "../i3-4.4/src/cfgparse.y"
3084 printf(
"floating_maximum_width = %d\n", (yyvsp[(2) - (4)].number));
3085 printf(
"floating_maximum_height = %d\n", (yyvsp[(4) - (4)].number));
3093 #line 1396 "../i3-4.4/src/cfgparse.y"
3095 printf(
"floating_minimum_width = %d\n", (yyvsp[(2) - (4)].number));
3096 printf(
"floating_minimum_height = %d\n", (yyvsp[(4) - (4)].number));
3104 #line 1406 "../i3-4.4/src/cfgparse.y"
3106 DLOG(
"floating modifier = %d\n", (yyvsp[(2) - (2)].number));
3113 #line 1414 "../i3-4.4/src/cfgparse.y"
3115 DLOG(
"New containers should start with split direction %d\n", (yyvsp[(2) - (2)].number));
3122 #line 1421 "../i3-4.4/src/cfgparse.y"
3128 #line 1422 "../i3-4.4/src/cfgparse.y"
3134 #line 1423 "../i3-4.4/src/cfgparse.y"
3140 #line 1428 "../i3-4.4/src/cfgparse.y"
3142 DLOG(
"new containers will be in mode %d\n", (yyvsp[(2) - (2)].number));
3156 if (ws->table == NULL)
3158 switch_layout_mode(global_conn,
3168 #line 1452 "../i3-4.4/src/cfgparse.y"
3170 DLOG(
"stack-limit %d with val %d\n", (yyvsp[(3) - (4)].number), (yyvsp[(4) - (4)].number));
3178 if (ws->table == NULL)
3180 Container *con = ws->table[0][0];
3190 #line 1472 "../i3-4.4/src/cfgparse.y"
3191 { (yyval.
number) = L_DEFAULT; }
3196 #line 1473 "../i3-4.4/src/cfgparse.y"
3197 { (yyval.
number) = L_STACKED; }
3202 #line 1474 "../i3-4.4/src/cfgparse.y"
3203 { (yyval.
number) = L_TABBED; }
3208 #line 1479 "../i3-4.4/src/cfgparse.y"
3210 DLOG(
"new windows should start with border style %d\n", (yyvsp[(2) - (2)].number));
3217 #line 1487 "../i3-4.4/src/cfgparse.y"
3219 DLOG(
"new floating windows should start with border style %d\n", (yyvsp[(2) - (2)].number));
3226 #line 1495 "../i3-4.4/src/cfgparse.y"
3236 #line 1501 "../i3-4.4/src/cfgparse.y"
3245 #line 1506 "../i3-4.4/src/cfgparse.y"
3254 #line 1511 "../i3-4.4/src/cfgparse.y"
3263 #line 1519 "../i3-4.4/src/cfgparse.y"
3265 (yyval.
number) = ((yyvsp[(1) - (1)].number) == 1);
3271 #line 1523 "../i3-4.4/src/cfgparse.y"
3273 DLOG(
"checking word \"%s\"\n", (yyvsp[(1) - (1)].
string));
3274 (yyval.
number) = (strcasecmp((yyvsp[(1) - (1)].
string),
"yes") == 0 ||
3275 strcasecmp((yyvsp[(1) - (1)].
string),
"true") == 0 ||
3276 strcasecmp((yyvsp[(1) - (1)].
string),
"on") == 0 ||
3277 strcasecmp((yyvsp[(1) - (1)].
string),
"enable") == 0 ||
3278 strcasecmp((yyvsp[(1) - (1)].
string),
"active") == 0);
3284 #line 1535 "../i3-4.4/src/cfgparse.y"
3286 DLOG(
"hide edge borders = %d\n", (yyvsp[(2) - (2)].number));
3293 #line 1542 "../i3-4.4/src/cfgparse.y"
3299 #line 1543 "../i3-4.4/src/cfgparse.y"
3305 #line 1544 "../i3-4.4/src/cfgparse.y"
3311 #line 1545 "../i3-4.4/src/cfgparse.y"
3317 #line 1546 "../i3-4.4/src/cfgparse.y"
3323 #line 1551 "../i3-4.4/src/cfgparse.y"
3325 DLOG(
"focus follows mouse = %d\n", (yyvsp[(2) - (2)].number));
3332 #line 1559 "../i3-4.4/src/cfgparse.y"
3334 DLOG(
"force focus wrapping = %d\n", (yyvsp[(2) - (2)].number));
3341 #line 1567 "../i3-4.4/src/cfgparse.y"
3343 DLOG(
"force xinerama = %d\n", (yyvsp[(2) - (2)].number));
3350 #line 1575 "../i3-4.4/src/cfgparse.y"
3352 DLOG(
"fake outputs = %s\n", (yyvsp[(2) - (2)].
string));
3359 #line 1583 "../i3-4.4/src/cfgparse.y"
3361 DLOG(
"automatic workspace back-and-forth = %d\n", (yyvsp[(2) - (2)].number));
3368 #line 1591 "../i3-4.4/src/cfgparse.y"
3370 DLOG(
"workspace urgency_timer = %f\n", atoi((yyvsp[(2) - (2)].
string)) / 1000.0);
3377 #line 1599 "../i3-4.4/src/cfgparse.y"
3379 DLOG(
"workspace bar = %d\n", (yyvsp[(2) - (2)].number));
3386 #line 1607 "../i3-4.4/src/cfgparse.y"
3388 char *ws_name = (yyvsp[(2) - (5)].
string);
3390 if ((yyvsp[(5) - (5)].
string) != NULL) {
3391 ELOG(
"The old (v3) syntax workspace <number> output <output> <name> is deprecated.\n");
3392 ELOG(
"Please use the new syntax: workspace \"<workspace>\" output <output>\n");
3393 ELOG(
"In your case, the following should work:\n");
3394 ELOG(
" workspace \"%s\" output %s\n", (yyvsp[(5) - (5)].
string), (yyvsp[(4) - (5)].
string));
3395 ws_name = (yyvsp[(5) - (5)].
string);
3399 DLOG(
"Assigning workspace \"%s\" to output \"%s\"\n", ws_name, (yyvsp[(4) - (5)].
string));
3404 bool duplicate =
false;
3406 if (strcasecmp(assignment->
name, ws_name) == 0) {
3407 ELOG(
"You have a duplicate workspace assignment for workspace \"%s\"\n",
3415 assignment->
name = ws_name;
3424 #line 1641 "../i3-4.4/src/cfgparse.y"
3426 int ws_num = (yyvsp[(2) - (3)].
number);
3428 DLOG(
"Invalid workspace assignment, workspace number %d out of range\n", ws_num);
3430 DLOG(
"workspace name to: %s\n", (yyvsp[(3) - (3)].
string));
3432 if ((yyvsp[(3) - (3)].
string) != NULL) {
3433 workspace_set_name(
workspace_get(ws_num - 1), (yyvsp[(3) - (3)].
string));
3434 free((yyvsp[(3) - (3)].
string));
3443 #line 1658 "../i3-4.4/src/cfgparse.y"
3444 { (yyval.
string) = NULL; }
3449 #line 1659 "../i3-4.4/src/cfgparse.y"
3450 { (yyval.
string) = (yyvsp[(1) - (1)].
string); }
3455 #line 1663 "../i3-4.4/src/cfgparse.y"
3456 { (yyval.
string) = (yyvsp[(1) - (1)].
string); }
3461 #line 1664 "../i3-4.4/src/cfgparse.y"
3462 { (yyval.
string) = (yyvsp[(1) - (1)].
string); }
3467 #line 1665 "../i3-4.4/src/cfgparse.y"
3468 { (yyval.
string) = (yyvsp[(1) - (1)].
string); }
3473 #line 1670 "../i3-4.4/src/cfgparse.y"
3478 ELOG(
"You are using the old assign syntax (without criteria). "
3479 "Please see the User's Guide for the new syntax and fix "
3480 "your config file.\n");
3482 printf(
"assignment of %s to *%s*\n", (yyvsp[(2) - (3)].
string), (yyvsp[(3) - (3)].
string));
3483 char *workspace = (yyvsp[(3) - (3)].
string);
3484 char *criteria = (yyvsp[(2) - (3)].
string);
3490 char *separator = NULL;
3491 if ((separator = strchr(criteria,
'/')) != NULL) {
3492 *(separator++) =
'\0';
3494 sasprintf(&pattern,
"(?i)%s", separator);
3497 printf(
" title = %s\n", separator);
3499 if (*criteria !=
'\0') {
3501 sasprintf(&pattern,
"(?i)%s", criteria);
3504 printf(
" class = %s\n", criteria);
3513 if (*workspace ==
'~') {
3515 if (*workspace ==
'\0') {
3517 assignment->
type = A_COMMAND;
3525 floating->
type = A_COMMAND;
3531 assignment->
type = A_TO_WORKSPACE;
3539 #line 1732 "../i3-4.4/src/cfgparse.y"
3542 ELOG(
"Match is empty, ignoring this assignment\n");
3545 printf(
"new assignment, using above criteria, to workspace %s\n", (yyvsp[(3) - (3)].
string));
3548 assignment->
type = A_TO_WORKSPACE;
3556 #line 1753 "../i3-4.4/src/cfgparse.y"
3564 #line 1760 "../i3-4.4/src/cfgparse.y"
3572 #line 1767 "../i3-4.4/src/cfgparse.y"
3575 new->command = (yyvsp[(3) - (3)].
string);
3576 new->no_startup_id = (yyvsp[(2) - (3)].
number);
3583 #line 1777 "../i3-4.4/src/cfgparse.y"
3586 new->command = (yyvsp[(3) - (3)].
string);
3587 new->no_startup_id = (yyvsp[(2) - (3)].
number);
3594 #line 1786 "../i3-4.4/src/cfgparse.y"
3600 #line 1787 "../i3-4.4/src/cfgparse.y"
3601 { (yyval.
number) = (yyvsp[(1) - (1)].number); }
3606 #line 1791 "../i3-4.4/src/cfgparse.y"
3607 { (yyval.
number) =
false; }
3612 #line 1792 "../i3-4.4/src/cfgparse.y"
3613 { (yyval.
number) =
true; }
3618 #line 1797 "../i3-4.4/src/cfgparse.y"
3620 ELOG(
"The terminal option is DEPRECATED and has no effect. "
3621 "Please remove it from your configuration file.\n");
3627 #line 1805 "../i3-4.4/src/cfgparse.y"
3631 printf(
"font %s\n", (yyvsp[(2) - (2)].
string));
3639 #line 1816 "../i3-4.4/src/cfgparse.y"
3642 *dest = (yyvsp[(2) - (2)].
number);
3648 #line 1824 "../i3-4.4/src/cfgparse.y"
3660 #line 1832 "../i3-4.4/src/cfgparse.y"
3673 #line 1844 "../i3-4.4/src/cfgparse.y"
3676 free((yyvsp[(1) - (1)].
string));
3682 #line 1852 "../i3-4.4/src/cfgparse.y"
3688 #line 1854 "../i3-4.4/src/cfgparse.y"
3689 { (yyval.
number) = (yyvsp[(1) - (3)].number) | (yyvsp[(3) - (3)].
number); }
3694 #line 1855 "../i3-4.4/src/cfgparse.y"
3695 { (yyval.
number) = (yyvsp[(1) - (2)].number); }
3700 #line 1859 "../i3-4.4/src/cfgparse.y"
3701 { (yyval.
number) = (yyvsp[(1) - (1)].number); }
3706 #line 1860 "../i3-4.4/src/cfgparse.y"
3712 #line 1861 "../i3-4.4/src/cfgparse.y"
3718 #line 1866 "../i3-4.4/src/cfgparse.y"
3720 DLOG(
"popup_during_fullscreen setting: %d\n", (yyvsp[(2) - (2)].number));
3727 #line 1873 "../i3-4.4/src/cfgparse.y"
3728 { (yyval.
number) = PDF_IGNORE; }
3733 #line 1874 "../i3-4.4/src/cfgparse.y"
3734 { (yyval.
number) = PDF_LEAVE_FULLSCREEN; }
3739 #line 3740 "src/cfgparse.tab.c"
3767 yystate = yypgoto[yyn -
YYNTOKENS] + *yyssp;
3768 if (0 <= yystate && yystate <=
YYLAST && yycheck[yystate] == *yyssp)
3769 yystate = yytable[yystate];
3788 #if ! YYERROR_VERBOSE
3791 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3794 char const *yymsgp =
YY_(
"syntax error");
3795 int yysyntax_error_status;
3797 if (yysyntax_error_status == 0)
3799 else if (yysyntax_error_status == 1)
3801 if (yymsg != yymsgbuf)
3807 yymsg_alloc =
sizeof yymsgbuf;
3808 yysyntax_error_status = 2;
3817 if (yysyntax_error_status == 2)
3818 goto yyexhaustedlab;
3820 # undef YYSYNTAX_ERROR
3826 if (yyerrstatus == 3)
3831 if (yychar <=
YYEOF)
3834 if (yychar ==
YYEOF)
3878 yyn = yypact[yystate];
3896 yystos[yystate], yyvsp);
3926 #if !defined yyoverflow || YYERROR_VERBOSE
3949 while (yyssp != yyss)
3952 yystos[*yyssp], yyvsp);
3960 if (yymsg != yymsgbuf)
3964 return YYID (yyresult);