1350
1391
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1351
1392
static const yytype_uint16 yyrline[] =
1353
0, 877, 877, 878, 880, 881, 882, 883, 884, 885,
1354
886, 887, 888, 889, 891, 896, 901, 906, 910, 915,
1355
920, 921, 923, 929, 934, 943, 947, 952, 953, 955,
1356
955, 962, 967, 968, 970, 971, 972, 973, 974, 975,
1357
976, 977, 978, 980, 1019, 1020, 1022, 1029, 1030, 1031,
1394
0, 894, 894, 895, 897, 898, 899, 900, 901, 902,
1395
903, 904, 905, 906, 908, 913, 918, 923, 927, 932,
1396
937, 938, 940, 946, 951, 960, 964, 969, 970, 972,
1397
972, 979, 984, 985, 987, 988, 989, 990, 991, 992,
1398
993, 994, 995, 997, 1036, 1037, 1039, 1046, 1047, 1048,
1362
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1403
#if YYDEBUG || YYERROR_VERBOSE || 0
1363
1404
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1364
1405
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1365
1406
static const char *const yytname[] =
1555
1601
#define YYTERROR 1
1556
1602
#define YYERRCODE 256
1559
1604
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1560
1605
If N is 0, then set CURRENT to the empty location which ends
1561
1606
the previous symbol: RHS[0] (always defined). */
1608
#ifndef YYLLOC_DEFAULT
1609
# define YYLLOC_DEFAULT(Current, Rhs, N) \
1613
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1614
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1615
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1616
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1620
(Current).first_line = (Current).last_line = \
1621
YYRHSLOC (Rhs, 0).last_line; \
1622
(Current).first_column = (Current).last_column = \
1623
YYRHSLOC (Rhs, 0).last_column; \
1563
1628
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
1564
#ifndef YYLLOC_DEFAULT
1565
# define YYLLOC_DEFAULT(Current, Rhs, N) \
1569
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1570
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1571
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1572
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1576
(Current).first_line = (Current).last_line = \
1577
YYRHSLOC (Rhs, 0).last_line; \
1578
(Current).first_column = (Current).last_column = \
1579
YYRHSLOC (Rhs, 0).last_column; \
1585
/* YY_LOCATION_PRINT -- Print the location on the stream.
1586
This macro was not mandated originally: define only if we know
1587
we won't break user code: when these are the locations we know. */
1632
/* This macro is provided for backward compatibility. */
1589
1634
#ifndef YY_LOCATION_PRINT
1590
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1591
# define YY_LOCATION_PRINT(File, Loc) \
1592
fprintf (File, "%d.%d-%d.%d", \
1593
(Loc).first_line, (Loc).first_column, \
1594
(Loc).last_line, (Loc).last_column)
1596
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1635
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1892
/* Copy into YYRESULT an error message about the unexpected token
1893
YYCHAR while in state YYSTATE. Return the number of bytes copied,
1894
including the terminating null byte. If YYRESULT is null, do not
1895
copy anything; just return the number of bytes that would be
1896
copied. As a special case, return 0 if an ordinary "syntax error"
1897
message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1898
size calculation. */
1900
yysyntax_error (char *yyresult, int yystate, int yychar)
1931
/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1932
about the unexpected token YYTOKEN for the state stack whose top is
1935
Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1936
not large enough to hold the message. In that case, also set
1937
*YYMSG_ALLOC to the required number of bytes. Return 2 if the
1938
required number of bytes is too large to store. */
1940
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1941
yytype_int16 *yyssp, int yytoken)
1902
int yyn = yypact[yystate];
1904
if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1908
int yytype = YYTRANSLATE (yychar);
1909
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1910
YYSIZE_T yysize = yysize0;
1912
int yysize_overflow = 0;
1913
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1914
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1918
/* This is so xgettext sees the translatable formats that are
1919
constructed on the fly. */
1920
YY_("syntax error, unexpected %s");
1921
YY_("syntax error, unexpected %s, expecting %s");
1922
YY_("syntax error, unexpected %s, expecting %s or %s");
1923
YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1924
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1928
static char const yyunexpected[] = "syntax error, unexpected %s";
1929
static char const yyexpecting[] = ", expecting %s";
1930
static char const yyor[] = " or %s";
1931
char yyformat[sizeof yyunexpected
1932
+ sizeof yyexpecting - 1
1933
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1934
* (sizeof yyor - 1))];
1935
char const *yyprefix = yyexpecting;
1937
/* Start YYX at -YYN if negative to avoid negative indexes in
1939
int yyxbegin = yyn < 0 ? -yyn : 0;
1941
/* Stay within bounds of both yycheck and yytname. */
1942
int yychecklim = YYLAST - yyn + 1;
1943
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1946
yyarg[0] = yytname[yytype];
1947
yyfmt = yystpcpy (yyformat, yyunexpected);
1949
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1950
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1952
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1956
yyformat[sizeof yyunexpected - 1] = '\0';
1959
yyarg[yycount++] = yytname[yyx];
1960
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1961
yysize_overflow |= (yysize1 < yysize);
1963
yyfmt = yystpcpy (yyfmt, yyprefix);
1967
yyf = YY_(yyformat);
1968
yysize1 = yysize + yystrlen (yyf);
1969
yysize_overflow |= (yysize1 < yysize);
1972
if (yysize_overflow)
1973
return YYSIZE_MAXIMUM;
1977
/* Avoid sprintf, as that infringes on the user's name space.
1978
Don't have undefined behavior even if the translation
1979
produced a string with the wrong number of "%s"s. */
1980
char *yyp = yyresult;
1982
while ((*yyp = *yyf) != '\0')
1984
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1986
yyp += yytnamerr (yyp, yyarg[yyi++]);
1943
YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
1944
YYSIZE_T yysize = yysize0;
1946
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1947
/* Internationalized format string. */
1948
const char *yyformat = YY_NULL;
1949
/* Arguments of yyformat. */
1950
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1951
/* Number of reported tokens (one for the "unexpected", one per
1955
/* There are many possibilities here to consider:
1956
- Assume YYFAIL is not used. It's too flawed to consider. See
1957
<http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1958
for details. YYERROR is fine as it does not invoke this
1960
- If this state is a consistent state with a default action, then
1961
the only way this function was invoked is if the default action
1962
is an error action. In that case, don't check for expected
1963
tokens because there are none.
1964
- The only way there can be no lookahead present (in yychar) is if
1965
this state is a consistent state with a default action. Thus,
1966
detecting the absence of a lookahead is sufficient to determine
1967
that there is no unexpected or expected token to report. In that
1968
case, just report a simple "syntax error".
1969
- Don't assume there isn't a lookahead just because this state is a
1970
consistent state with a default action. There might have been a
1971
previous inconsistent state, consistent state with a non-default
1972
action, or user semantic action that manipulated yychar.
1973
- Of course, the expected token list depends on states to have
1974
correct lookahead information, and it depends on the parser not
1975
to perform extra reductions after fetching a lookahead from the
1976
scanner and before detecting a syntax error. Thus, state merging
1977
(from LALR or IELR) and default reductions corrupt the expected
1978
token list. However, the list is correct for canonical LR with
1979
one exception: it will still contain any token that will not be
1980
accepted due to an error action in a later state.
1982
if (yytoken != YYEMPTY)
1984
int yyn = yypact[*yyssp];
1985
yyarg[yycount++] = yytname[yytoken];
1986
if (!yypact_value_is_default (yyn))
1988
/* Start YYX at -YYN if negative to avoid negative indexes in
1989
YYCHECK. In other words, skip the first -YYN actions for
1990
this state because they are default actions. */
1991
int yyxbegin = yyn < 0 ? -yyn : 0;
1992
/* Stay within bounds of both yycheck and yytname. */
1993
int yychecklim = YYLAST - yyn + 1;
1994
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1997
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1998
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1999
&& !yytable_value_is_error (yytable[yyx + yyn]))
2001
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2007
yyarg[yycount++] = yytname[yyx];
2008
yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
2009
if (! (yysize <= yysize1
2010
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2019
# define YYCASE_(N, S) \
2023
YYCASE_(0, YY_("syntax error"));
2024
YYCASE_(1, YY_("syntax error, unexpected %s"));
2025
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
2026
YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
2027
YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
2028
YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
2032
yysize1 = yysize + yystrlen (yyformat);
2033
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2037
if (*yymsg_alloc < yysize)
2039
*yymsg_alloc = 2 * yysize;
2040
if (! (yysize <= *yymsg_alloc
2041
&& *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
2042
*yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
2046
/* Avoid sprintf, as that infringes on the user's name space.
2047
Don't have undefined behavior even if the translation
2048
produced a string with the wrong number of "%s"s. */
2052
while ((*yyp = *yyformat) != '\0')
2053
if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
2055
yyp += yytnamerr (yyp, yyarg[yyi++]);
1999
2066
#endif /* YYERROR_VERBOSE */
2002
2068
/*-----------------------------------------------.
2003
2069
| Release the memory associated to this symbol. |
2416
/* Line 1464 of yacc.c */
2417
#line 944 "loadkeys.y"
2467
/* Line 1813 of yacc.c */
2468
#line 961 "loadkeys.y"
2419
2470
compose((yyvsp[(2) - (6)]), (yyvsp[(3) - (6)]), (yyvsp[(5) - (6)]));
2425
/* Line 1464 of yacc.c */
2426
#line 948 "loadkeys.y"
2475
/* Line 1813 of yacc.c */
2476
#line 965 "loadkeys.y"
2428
2478
compose((yyvsp[(2) - (6)]), (yyvsp[(3) - (6)]), (yyvsp[(5) - (6)]));
2434
/* Line 1464 of yacc.c */
2435
#line 952 "loadkeys.y"
2483
/* Line 1813 of yacc.c */
2484
#line 969 "loadkeys.y"
2436
2485
{ (yyval) = (yyvsp[(1) - (1)]); }
2441
/* Line 1464 of yacc.c */
2442
#line 953 "loadkeys.y"
2489
/* Line 1813 of yacc.c */
2490
#line 970 "loadkeys.y"
2443
2491
{ (yyval) = (yyvsp[(1) - (1)]) ^ 0xf000; }
2448
/* Line 1464 of yacc.c */
2449
#line 955 "loadkeys.y"
2495
/* Line 1813 of yacc.c */
2496
#line 972 "loadkeys.y"
2457
/* Line 1464 of yacc.c */
2458
#line 959 "loadkeys.y"
2503
/* Line 1813 of yacc.c */
2504
#line 976 "loadkeys.y"
2460
2506
addkey((yyvsp[(4) - (7)]), mod, (yyvsp[(6) - (7)]));
2466
/* Line 1464 of yacc.c */
2467
#line 963 "loadkeys.y"
2511
/* Line 1813 of yacc.c */
2512
#line 980 "loadkeys.y"
2469
2514
addkey((yyvsp[(3) - (6)]), 0, (yyvsp[(5) - (6)]));
2475
/* Line 1464 of yacc.c */
2476
#line 970 "loadkeys.y"
2519
/* Line 1813 of yacc.c */
2520
#line 987 "loadkeys.y"
2477
2521
{ mod |= M_SHIFT; }
2482
/* Line 1464 of yacc.c */
2483
#line 971 "loadkeys.y"
2525
/* Line 1813 of yacc.c */
2526
#line 988 "loadkeys.y"
2484
2527
{ mod |= M_CTRL; }
2489
/* Line 1464 of yacc.c */
2490
#line 972 "loadkeys.y"
2531
/* Line 1813 of yacc.c */
2532
#line 989 "loadkeys.y"
2491
2533
{ mod |= M_ALT; }
2496
/* Line 1464 of yacc.c */
2497
#line 973 "loadkeys.y"
2537
/* Line 1813 of yacc.c */
2538
#line 990 "loadkeys.y"
2498
2539
{ mod |= M_ALTGR; }
2503
/* Line 1464 of yacc.c */
2504
#line 974 "loadkeys.y"
2543
/* Line 1813 of yacc.c */
2544
#line 991 "loadkeys.y"
2505
2545
{ mod |= M_SHIFTL; }
2510
/* Line 1464 of yacc.c */
2511
#line 975 "loadkeys.y"
2549
/* Line 1813 of yacc.c */
2550
#line 992 "loadkeys.y"
2512
2551
{ mod |= M_SHIFTR; }
2517
/* Line 1464 of yacc.c */
2518
#line 976 "loadkeys.y"
2555
/* Line 1813 of yacc.c */
2556
#line 993 "loadkeys.y"
2519
2557
{ mod |= M_CTRLL; }
2524
/* Line 1464 of yacc.c */
2525
#line 977 "loadkeys.y"
2561
/* Line 1813 of yacc.c */
2562
#line 994 "loadkeys.y"
2526
2563
{ mod |= M_CTRLR; }
2531
/* Line 1464 of yacc.c */
2532
#line 978 "loadkeys.y"
2567
/* Line 1813 of yacc.c */
2568
#line 995 "loadkeys.y"
2533
2569
{ mod |= M_CAPSSHIFT; }
2538
/* Line 1464 of yacc.c */
2539
#line 981 "loadkeys.y"
2573
/* Line 1813 of yacc.c */
2574
#line 998 "loadkeys.y"
2591
/* Line 1464 of yacc.c */
2592
#line 1029 "loadkeys.y"
2624
/* Line 1813 of yacc.c */
2625
#line 1046 "loadkeys.y"
2593
2626
{ (yyval) = convert_code((yyvsp[(1) - (1)]), TO_AUTO); }
2598
/* Line 1464 of yacc.c */
2599
#line 1030 "loadkeys.y"
2630
/* Line 1813 of yacc.c */
2631
#line 1047 "loadkeys.y"
2600
2632
{ (yyval) = add_capslock((yyvsp[(2) - (2)])); }
2605
/* Line 1464 of yacc.c */
2606
#line 1031 "loadkeys.y"
2636
/* Line 1813 of yacc.c */
2637
#line 1048 "loadkeys.y"
2607
2638
{ (yyval) = convert_code((yyvsp[(1) - (1)])^0xf000, TO_AUTO); }
2612
/* Line 1464 of yacc.c */
2613
#line 1032 "loadkeys.y"
2642
/* Line 1813 of yacc.c */
2643
#line 1049 "loadkeys.y"
2614
2644
{ (yyval) = add_capslock((yyvsp[(2) - (2)])^0xf000); }
2619
/* Line 1464 of yacc.c */
2620
#line 1033 "loadkeys.y"
2648
/* Line 1813 of yacc.c */
2649
#line 1050 "loadkeys.y"
2621
2650
{ (yyval) = (yyvsp[(1) - (1)]); }
2626
/* Line 1464 of yacc.c */
2627
#line 1034 "loadkeys.y"
2654
/* Line 1813 of yacc.c */
2655
#line 1051 "loadkeys.y"
2628
2656
{ (yyval) = add_capslock((yyvsp[(2) - (2)])); }
2633
/* Line 1464 of yacc.c */
2634
#line 2635 "loadkeys.c"
2660
/* Line 1813 of yacc.c */
2661
#line 2662 "loadkeys.c"
2635
2662
default: break;
2664
/* User semantic actions sometimes alter yychar, and that requires
2665
that yytoken be updated with the new translation. We take the
2666
approach of translating immediately before every use of yytoken.
2667
One alternative is translating here after every semantic action,
2668
but that translation would be missed if the semantic action invokes
2669
YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2670
if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2671
incorrect destructor might then be invoked immediately. In the
2672
case of YYERROR or YYBACKUP, subsequent parser actions might lead
2673
to an incorrect destructor call or verbose syntax error message
2674
before the lookahead is translated. */
2637
2675
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2639
2677
YYPOPSTACK (yylen);