aboutsummaryrefslogtreecommitdiff
path: root/xkbcomp/xkbparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'xkbcomp/xkbparse.c')
-rw-r--r--xkbcomp/xkbparse.c386
1 files changed, 194 insertions, 192 deletions
diff --git a/xkbcomp/xkbparse.c b/xkbcomp/xkbparse.c
index 8c139ea02..9d3b8aa6c 100644
--- a/xkbcomp/xkbparse.c
+++ b/xkbcomp/xkbparse.c
@@ -200,7 +200,7 @@
/* Copy the first part of user declarations. */
-#line 93 "xkbparse.y"
+#line 91 "xkbparse.y"
#ifdef DEBUG
#define YYDEBUG 1
@@ -211,6 +211,7 @@
#include <X11/extensions/XKBgeom.h>
#include <stdlib.h>
+unsigned int parseDebug;
@@ -234,7 +235,7 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 111 "xkbparse.y"
+#line 110 "xkbparse.y"
{
int ival;
unsigned uval;
@@ -264,7 +265,7 @@ typedef union YYSTYPE
XkbFile *file;
}
/* Line 187 of yacc.c. */
-#line 268 "xkbparse.c"
+#line 269 "xkbparse.c"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -277,7 +278,7 @@ typedef union YYSTYPE
/* Line 216 of yacc.c. */
-#line 281 "xkbparse.c"
+#line 282 "xkbparse.c"
#ifdef short
# undef short
@@ -636,23 +637,23 @@ static const yytype_int16 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 169, 169, 171, 173, 177, 179, 183, 189, 190,
- 191, 194, 196, 200, 206, 211, 212, 213, 214, 215,
- 218, 219, 222, 223, 226, 227, 228, 229, 230, 231,
- 232, 233, 236, 238, 241, 246, 251, 256, 261, 266,
- 271, 276, 281, 286, 291, 296, 301, 306, 311, 323,
- 325, 327, 331, 342, 352, 356, 358, 362, 364, 368,
- 377, 379, 383, 385, 389, 395, 401, 403, 405, 408,
- 410, 412, 414, 416, 420, 422, 426, 430, 434, 438,
- 440, 444, 446, 454, 458, 460, 464, 466, 468, 470,
- 472, 476, 478, 482, 484, 488, 490, 494, 496, 500,
- 504, 509, 513, 517, 519, 523, 525, 527, 531, 533,
- 537, 547, 551, 552, 553, 554, 557, 558, 561, 563,
- 565, 567, 569, 571, 573, 575, 577, 579, 581, 585,
- 586, 589, 590, 591, 592, 593, 596, 597, 600, 602,
- 606, 608, 610, 612, 614, 616, 620, 622, 624, 626,
- 628, 630, 632, 634, 638, 640, 644, 648, 655, 663,
- 672, 683, 690, 697, 704, 715, 716, 719, 721, 725,
+ 0, 168, 168, 170, 172, 176, 178, 182, 188, 189,
+ 190, 193, 195, 199, 205, 210, 211, 212, 213, 214,
+ 217, 218, 221, 222, 225, 226, 227, 228, 229, 230,
+ 231, 232, 235, 237, 240, 245, 250, 255, 260, 265,
+ 270, 275, 280, 285, 290, 295, 300, 305, 310, 322,
+ 324, 326, 330, 341, 351, 355, 357, 361, 363, 367,
+ 376, 378, 382, 384, 388, 394, 400, 402, 404, 407,
+ 409, 411, 413, 415, 419, 421, 425, 429, 433, 437,
+ 439, 443, 445, 453, 457, 459, 463, 465, 467, 469,
+ 471, 475, 477, 481, 483, 487, 489, 493, 495, 499,
+ 503, 508, 512, 516, 518, 522, 524, 526, 530, 532,
+ 536, 546, 550, 551, 552, 553, 556, 557, 560, 562,
+ 564, 566, 568, 570, 572, 574, 576, 578, 580, 584,
+ 585, 588, 589, 590, 591, 592, 595, 596, 599, 601,
+ 605, 607, 609, 611, 613, 615, 619, 621, 623, 625,
+ 627, 629, 631, 633, 637, 639, 643, 647, 654, 662,
+ 671, 682, 689, 696, 703, 714, 715, 718, 720, 724,
739, 743, 750, 751, 754, 755, 758, 761, 764, 767,
768, 771, 774, 775, 778
};
@@ -1870,167 +1871,167 @@ yyreduce:
switch (yyn)
{
case 2:
-#line 170 "xkbparse.y"
+#line 169 "xkbparse.y"
{ (yyval.file)= rtrnValue= (yyvsp[(1) - (1)].file); }
break;
case 3:
-#line 172 "xkbparse.y"
+#line 171 "xkbparse.y"
{ (yyval.file)= rtrnValue= (yyvsp[(1) - (1)].file); }
break;
case 4:
-#line 174 "xkbparse.y"
+#line 173 "xkbparse.y"
{ (yyval.file)= rtrnValue= (yyvsp[(1) - (1)].file); }
break;
case 5:
-#line 178 "xkbparse.y"
+#line 177 "xkbparse.y"
{ (yyval.file)= (XkbFile *)AppendStmt(&(yyvsp[(1) - (2)].file)->common,&(yyvsp[(2) - (2)].file)->common); }
break;
case 6:
-#line 180 "xkbparse.y"
+#line 179 "xkbparse.y"
{ (yyval.file)= (yyvsp[(1) - (1)].file); }
break;
case 7:
-#line 186 "xkbparse.y"
+#line 185 "xkbparse.y"
{ (yyval.file)= CreateXKBFile((yyvsp[(2) - (7)].uval),(yyvsp[(3) - (7)].str),&(yyvsp[(5) - (7)].file)->common,(yyvsp[(1) - (7)].uval)); }
break;
case 8:
-#line 189 "xkbparse.y"
+#line 188 "xkbparse.y"
{ (yyval.uval)= XkmKeymapFile; }
break;
case 9:
-#line 190 "xkbparse.y"
+#line 189 "xkbparse.y"
{ (yyval.uval)= XkmSemanticsFile; }
break;
case 10:
-#line 191 "xkbparse.y"
+#line 190 "xkbparse.y"
{ (yyval.uval)= XkmLayoutFile; }
break;
case 11:
-#line 195 "xkbparse.y"
+#line 194 "xkbparse.y"
{ (yyval.file)= (XkbFile *)AppendStmt(&(yyvsp[(1) - (2)].file)->common,&(yyvsp[(2) - (2)].file)->common); }
break;
case 12:
-#line 197 "xkbparse.y"
+#line 196 "xkbparse.y"
{ (yyval.file)= (yyvsp[(1) - (1)].file); }
break;
case 13:
-#line 203 "xkbparse.y"
+#line 202 "xkbparse.y"
{ (yyval.file)= CreateXKBFile((yyvsp[(2) - (7)].uval),(yyvsp[(3) - (7)].str),(yyvsp[(5) - (7)].any),(yyvsp[(1) - (7)].uval)); }
break;
case 14:
-#line 207 "xkbparse.y"
+#line 206 "xkbparse.y"
{ (yyval.file)= CreateXKBFile((yyvsp[(2) - (4)].uval),(yyvsp[(3) - (4)].str),(yyvsp[(4) - (4)].any),(yyvsp[(1) - (4)].uval)); }
break;
case 15:
-#line 211 "xkbparse.y"
+#line 210 "xkbparse.y"
{ (yyval.uval)= XkmKeyNamesIndex; }
break;
case 16:
-#line 212 "xkbparse.y"
+#line 211 "xkbparse.y"
{ (yyval.uval)= XkmTypesIndex; }
break;
case 17:
-#line 213 "xkbparse.y"
+#line 212 "xkbparse.y"
{ (yyval.uval)= XkmCompatMapIndex; }
break;
case 18:
-#line 214 "xkbparse.y"
+#line 213 "xkbparse.y"
{ (yyval.uval)= XkmSymbolsIndex; }
break;
case 19:
-#line 215 "xkbparse.y"
+#line 214 "xkbparse.y"
{ (yyval.uval)= XkmGeometryIndex; }
break;
case 20:
-#line 218 "xkbparse.y"
+#line 217 "xkbparse.y"
{ (yyval.uval)= (yyvsp[(1) - (1)].uval); }
break;
case 21:
-#line 219 "xkbparse.y"
+#line 218 "xkbparse.y"
{ (yyval.uval)= 0; }
break;
case 22:
-#line 222 "xkbparse.y"
+#line 221 "xkbparse.y"
{ (yyval.uval)= (((yyvsp[(1) - (2)].uval))|((yyvsp[(2) - (2)].uval))); }
break;
case 23:
-#line 223 "xkbparse.y"
+#line 222 "xkbparse.y"
{ (yyval.uval)= (yyvsp[(1) - (1)].uval); }
break;
case 24:
-#line 226 "xkbparse.y"
+#line 225 "xkbparse.y"
{ (yyval.uval)= XkbLC_Partial; }
break;
case 25:
-#line 227 "xkbparse.y"
+#line 226 "xkbparse.y"
{ (yyval.uval)= XkbLC_Default; }
break;
case 26:
-#line 228 "xkbparse.y"
+#line 227 "xkbparse.y"
{ (yyval.uval)= XkbLC_Hidden; }
break;
case 27:
-#line 229 "xkbparse.y"
+#line 228 "xkbparse.y"
{ (yyval.uval)= XkbLC_AlphanumericKeys; }
break;
case 28:
-#line 230 "xkbparse.y"
+#line 229 "xkbparse.y"
{ (yyval.uval)= XkbLC_ModifierKeys; }
break;
case 29:
-#line 231 "xkbparse.y"
+#line 230 "xkbparse.y"
{ (yyval.uval)= XkbLC_KeypadKeys; }
break;
case 30:
-#line 232 "xkbparse.y"
+#line 231 "xkbparse.y"
{ (yyval.uval)= XkbLC_FunctionKeys; }
break;
case 31:
-#line 233 "xkbparse.y"
+#line 232 "xkbparse.y"
{ (yyval.uval)= XkbLC_AlternateGroup; }
break;
case 32:
-#line 237 "xkbparse.y"
+#line 236 "xkbparse.y"
{ (yyval.any)= AppendStmt((yyvsp[(1) - (2)].any),(yyvsp[(2) - (2)].any)); }
break;
case 33:
-#line 238 "xkbparse.y"
+#line 237 "xkbparse.y"
{ (yyval.any)= NULL; }
break;
case 34:
-#line 242 "xkbparse.y"
+#line 241 "xkbparse.y"
{
(yyvsp[(2) - (2)].var)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].var)->common,(yyvsp[(1) - (2)].uval));
(yyval.any)= &(yyvsp[(2) - (2)].var)->common;
@@ -2038,7 +2039,7 @@ yyreduce:
break;
case 35:
-#line 247 "xkbparse.y"
+#line 246 "xkbparse.y"
{
(yyvsp[(2) - (2)].vmod)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].vmod)->common,(yyvsp[(1) - (2)].uval));
(yyval.any)= &(yyvsp[(2) - (2)].vmod)->common;
@@ -2046,7 +2047,7 @@ yyreduce:
break;
case 36:
-#line 252 "xkbparse.y"
+#line 251 "xkbparse.y"
{
(yyvsp[(2) - (2)].interp)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].interp)->common,(yyvsp[(1) - (2)].uval));
(yyval.any)= &(yyvsp[(2) - (2)].interp)->common;
@@ -2054,7 +2055,7 @@ yyreduce:
break;
case 37:
-#line 257 "xkbparse.y"
+#line 256 "xkbparse.y"
{
(yyvsp[(2) - (2)].keyName)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].keyName)->common,(yyvsp[(1) - (2)].uval));
(yyval.any)= &(yyvsp[(2) - (2)].keyName)->common;
@@ -2062,7 +2063,7 @@ yyreduce:
break;
case 38:
-#line 262 "xkbparse.y"
+#line 261 "xkbparse.y"
{
(yyvsp[(2) - (2)].keyAlias)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].keyAlias)->common,(yyvsp[(1) - (2)].uval));
(yyval.any)= &(yyvsp[(2) - (2)].keyAlias)->common;
@@ -2070,7 +2071,7 @@ yyreduce:
break;
case 39:
-#line 267 "xkbparse.y"
+#line 266 "xkbparse.y"
{
(yyvsp[(2) - (2)].keyType)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].keyType)->common,(yyvsp[(1) - (2)].uval));
(yyval.any)= &(yyvsp[(2) - (2)].keyType)->common;
@@ -2078,7 +2079,7 @@ yyreduce:
break;
case 40:
-#line 272 "xkbparse.y"
+#line 271 "xkbparse.y"
{
(yyvsp[(2) - (2)].syms)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].syms)->common,(yyvsp[(1) - (2)].uval));
(yyval.any)= &(yyvsp[(2) - (2)].syms)->common;
@@ -2086,7 +2087,7 @@ yyreduce:
break;
case 41:
-#line 277 "xkbparse.y"
+#line 276 "xkbparse.y"
{
(yyvsp[(2) - (2)].modMask)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].modMask)->common,(yyvsp[(1) - (2)].uval));
(yyval.any)= &(yyvsp[(2) - (2)].modMask)->common;
@@ -2094,7 +2095,7 @@ yyreduce:
break;
case 42:
-#line 282 "xkbparse.y"
+#line 281 "xkbparse.y"
{
(yyvsp[(2) - (2)].groupCompat)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].groupCompat)->common,(yyvsp[(1) - (2)].uval));
(yyval.any)= &(yyvsp[(2) - (2)].groupCompat)->common;
@@ -2102,7 +2103,7 @@ yyreduce:
break;
case 43:
-#line 287 "xkbparse.y"
+#line 286 "xkbparse.y"
{
(yyvsp[(2) - (2)].ledMap)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].ledMap)->common,(yyvsp[(1) - (2)].uval));
(yyval.any)= &(yyvsp[(2) - (2)].ledMap)->common;
@@ -2110,7 +2111,7 @@ yyreduce:
break;
case 44:
-#line 292 "xkbparse.y"
+#line 291 "xkbparse.y"
{
(yyvsp[(2) - (2)].ledName)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].ledName)->common,(yyvsp[(1) - (2)].uval));
(yyval.any)= &(yyvsp[(2) - (2)].ledName)->common;
@@ -2118,7 +2119,7 @@ yyreduce:
break;
case 45:
-#line 297 "xkbparse.y"
+#line 296 "xkbparse.y"
{
(yyvsp[(2) - (2)].shape)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].shape)->common,(yyvsp[(1) - (2)].uval));
(yyval.any)= &(yyvsp[(2) - (2)].shape)->common;
@@ -2126,7 +2127,7 @@ yyreduce:
break;
case 46:
-#line 302 "xkbparse.y"
+#line 301 "xkbparse.y"
{
(yyvsp[(2) - (2)].section)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].section)->common,(yyvsp[(1) - (2)].uval));
(yyval.any)= &(yyvsp[(2) - (2)].section)->common;
@@ -2134,7 +2135,7 @@ yyreduce:
break;
case 47:
-#line 307 "xkbparse.y"
+#line 306 "xkbparse.y"
{
(yyvsp[(2) - (2)].doodad)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].doodad)->common,(yyvsp[(1) - (2)].uval));
(yyval.any)= &(yyvsp[(2) - (2)].doodad)->common;
@@ -2142,7 +2143,7 @@ yyreduce:
break;
case 48:
-#line 312 "xkbparse.y"
+#line 311 "xkbparse.y"
{
if ((yyvsp[(1) - (2)].uval)==MergeAltForm) {
yyerror("cannot use 'alternate' to include other maps");
@@ -2155,22 +2156,22 @@ yyreduce:
break;
case 49:
-#line 324 "xkbparse.y"
+#line 323 "xkbparse.y"
{ (yyval.var)= VarCreate((yyvsp[(1) - (4)].expr),(yyvsp[(3) - (4)].expr)); }
break;
case 50:
-#line 326 "xkbparse.y"
+#line 325 "xkbparse.y"
{ (yyval.var)= BoolVarCreate((yyvsp[(1) - (2)].sval),1); }
break;
case 51:
-#line 328 "xkbparse.y"
+#line 327 "xkbparse.y"
{ (yyval.var)= BoolVarCreate((yyvsp[(2) - (3)].sval),0); }
break;
case 52:
-#line 332 "xkbparse.y"
+#line 331 "xkbparse.y"
{
KeycodeDef *def;
@@ -2182,7 +2183,7 @@ yyreduce:
break;
case 53:
-#line 343 "xkbparse.y"
+#line 342 "xkbparse.y"
{
KeyAliasDef *def;
def= KeyAliasCreate((yyvsp[(2) - (5)].str),(yyvsp[(4) - (5)].str));
@@ -2193,32 +2194,32 @@ yyreduce:
break;
case 54:
-#line 353 "xkbparse.y"
+#line 352 "xkbparse.y"
{ (yyval.vmod)= (yyvsp[(2) - (3)].vmod); }
break;
case 55:
-#line 357 "xkbparse.y"
+#line 356 "xkbparse.y"
{ (yyval.vmod)= (VModDef *)AppendStmt(&(yyvsp[(1) - (3)].vmod)->common,&(yyvsp[(3) - (3)].vmod)->common); }
break;
case 56:
-#line 359 "xkbparse.y"
+#line 358 "xkbparse.y"
{ (yyval.vmod)= (yyvsp[(1) - (1)].vmod); }
break;
case 57:
-#line 363 "xkbparse.y"
+#line 362 "xkbparse.y"
{ (yyval.vmod)= VModCreate((yyvsp[(1) - (1)].sval),NULL); }
break;
case 58:
-#line 365 "xkbparse.y"
+#line 364 "xkbparse.y"
{ (yyval.vmod)= VModCreate((yyvsp[(1) - (3)].sval),(yyvsp[(3) - (3)].expr)); }
break;
case 59:
-#line 371 "xkbparse.y"
+#line 370 "xkbparse.y"
{
(yyvsp[(2) - (6)].interp)->def= (yyvsp[(4) - (6)].var);
(yyval.interp)= (yyvsp[(2) - (6)].interp);
@@ -2226,117 +2227,117 @@ yyreduce:
break;
case 60:
-#line 378 "xkbparse.y"
+#line 377 "xkbparse.y"
{ (yyval.interp)= InterpCreate((KeySym)(yyvsp[(1) - (3)].uval),(yyvsp[(3) - (3)].expr)); }
break;
case 61:
-#line 380 "xkbparse.y"
+#line 379 "xkbparse.y"
{ (yyval.interp)= InterpCreate((KeySym)(yyvsp[(1) - (1)].uval),NULL); }
break;
case 62:
-#line 384 "xkbparse.y"
+#line 383 "xkbparse.y"
{ (yyval.var)= (VarDef *)AppendStmt(&(yyvsp[(1) - (2)].var)->common,&(yyvsp[(2) - (2)].var)->common); }
break;
case 63:
-#line 386 "xkbparse.y"
+#line 385 "xkbparse.y"
{ (yyval.var)= (yyvsp[(1) - (1)].var); }
break;
case 64:
-#line 392 "xkbparse.y"
+#line 391 "xkbparse.y"
{ (yyval.keyType)= KeyTypeCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].var)); }
break;
case 65:
-#line 398 "xkbparse.y"
+#line 397 "xkbparse.y"
{ (yyval.syms)= SymbolsCreate((yyvsp[(2) - (6)].str),(ExprDef *)(yyvsp[(4) - (6)].var)); }
break;
case 66:
-#line 402 "xkbparse.y"
+#line 401 "xkbparse.y"
{ (yyval.var)= (VarDef *)AppendStmt(&(yyvsp[(1) - (3)].var)->common,&(yyvsp[(3) - (3)].var)->common); }
break;
case 67:
-#line 404 "xkbparse.y"
+#line 403 "xkbparse.y"
{ (yyval.var)= (yyvsp[(1) - (1)].var); }
break;
case 68:
-#line 405 "xkbparse.y"
+#line 404 "xkbparse.y"
{ (yyval.var)= NULL; }
break;
case 69:
-#line 409 "xkbparse.y"
+#line 408 "xkbparse.y"
{ (yyval.var)= VarCreate((yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
break;
case 70:
-#line 411 "xkbparse.y"
+#line 410 "xkbparse.y"
{ (yyval.var)= VarCreate((yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
break;
case 71:
-#line 413 "xkbparse.y"
+#line 412 "xkbparse.y"
{ (yyval.var)= BoolVarCreate((yyvsp[(1) - (1)].sval),1); }
break;
case 72:
-#line 415 "xkbparse.y"
+#line 414 "xkbparse.y"
{ (yyval.var)= BoolVarCreate((yyvsp[(2) - (2)].sval),0); }
break;
case 73:
-#line 417 "xkbparse.y"
+#line 416 "xkbparse.y"
{ (yyval.var)= VarCreate(NULL,(yyvsp[(1) - (1)].expr)); }
break;
case 74:
-#line 421 "xkbparse.y"
+#line 420 "xkbparse.y"
{ (yyval.expr)= (yyvsp[(2) - (3)].expr); }
break;
case 75:
-#line 423 "xkbparse.y"
+#line 422 "xkbparse.y"
{ (yyval.expr)= ExprCreateUnary(ExprActionList,TypeAction,(yyvsp[(2) - (3)].expr)); }
break;
case 76:
-#line 427 "xkbparse.y"
+#line 426 "xkbparse.y"
{ (yyval.groupCompat)= GroupCompatCreate((yyvsp[(2) - (5)].ival),(yyvsp[(4) - (5)].expr)); }
break;
case 77:
-#line 431 "xkbparse.y"
+#line 430 "xkbparse.y"
{ (yyval.modMask)= ModMapCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].expr)); }
break;
case 78:
-#line 435 "xkbparse.y"
+#line 434 "xkbparse.y"
{ (yyval.ledMap)= IndicatorMapCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].var)); }
break;
case 79:
-#line 439 "xkbparse.y"
+#line 438 "xkbparse.y"
{ (yyval.ledName)= IndicatorNameCreate((yyvsp[(2) - (5)].ival),(yyvsp[(4) - (5)].expr),False); }
break;
case 80:
-#line 441 "xkbparse.y"
+#line 440 "xkbparse.y"
{ (yyval.ledName)= IndicatorNameCreate((yyvsp[(3) - (6)].ival),(yyvsp[(5) - (6)].expr),True); }
break;
case 81:
-#line 445 "xkbparse.y"
+#line 444 "xkbparse.y"
{ (yyval.shape)= ShapeDeclCreate((yyvsp[(2) - (6)].sval),(OutlineDef *)&(yyvsp[(4) - (6)].outline)->common); }
break;
case 82:
-#line 447 "xkbparse.y"
+#line 446 "xkbparse.y"
{
OutlineDef *outlines;
outlines= OutlineCreate(None,(yyvsp[(4) - (6)].expr));
@@ -2345,92 +2346,92 @@ yyreduce:
break;
case 83:
-#line 455 "xkbparse.y"
+#line 454 "xkbparse.y"
{ (yyval.section)= SectionDeclCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].row)); }
break;
case 84:
-#line 459 "xkbparse.y"
+#line 458 "xkbparse.y"
{ (yyval.row)=(RowDef *)AppendStmt(&(yyvsp[(1) - (2)].row)->common,&(yyvsp[(2) - (2)].row)->common);}
break;
case 85:
-#line 461 "xkbparse.y"
+#line 460 "xkbparse.y"
{ (yyval.row)= (yyvsp[(1) - (1)].row); }
break;
case 86:
-#line 465 "xkbparse.y"
+#line 464 "xkbparse.y"
{ (yyval.row)= RowDeclCreate((yyvsp[(3) - (5)].key)); }
break;
case 87:
-#line 467 "xkbparse.y"
+#line 466 "xkbparse.y"
{ (yyval.row)= (RowDef *)(yyvsp[(1) - (1)].var); }
break;
case 88:
-#line 469 "xkbparse.y"
+#line 468 "xkbparse.y"
{ (yyval.row)= (RowDef *)(yyvsp[(1) - (1)].doodad); }
break;
case 89:
-#line 471 "xkbparse.y"
+#line 470 "xkbparse.y"
{ (yyval.row)= (RowDef *)(yyvsp[(1) - (1)].ledMap); }
break;
case 90:
-#line 473 "xkbparse.y"
+#line 472 "xkbparse.y"
{ (yyval.row)= (RowDef *)(yyvsp[(1) - (1)].overlay); }
break;
case 91:
-#line 477 "xkbparse.y"
+#line 476 "xkbparse.y"
{ (yyval.key)=(KeyDef *)AppendStmt(&(yyvsp[(1) - (2)].key)->common,&(yyvsp[(2) - (2)].key)->common);}
break;
case 92:
-#line 479 "xkbparse.y"
+#line 478 "xkbparse.y"
{ (yyval.key)= (yyvsp[(1) - (1)].key); }
break;
case 93:
-#line 483 "xkbparse.y"
+#line 482 "xkbparse.y"
{ (yyval.key)= (yyvsp[(3) - (5)].key); }
break;
case 94:
-#line 485 "xkbparse.y"
+#line 484 "xkbparse.y"
{ (yyval.key)= (KeyDef *)(yyvsp[(1) - (1)].var); }
break;
case 95:
-#line 489 "xkbparse.y"
+#line 488 "xkbparse.y"
{ (yyval.key)=(KeyDef *)AppendStmt(&(yyvsp[(1) - (3)].key)->common,&(yyvsp[(3) - (3)].key)->common);}
break;
case 96:
-#line 491 "xkbparse.y"
+#line 490 "xkbparse.y"
{ (yyval.key)= (yyvsp[(1) - (1)].key); }
break;
case 97:
-#line 495 "xkbparse.y"
+#line 494 "xkbparse.y"
{ (yyval.key)= KeyDeclCreate((yyvsp[(1) - (1)].str),NULL); }
break;
case 98:
-#line 497 "xkbparse.y"
+#line 496 "xkbparse.y"
{ (yyval.key)= KeyDeclCreate(NULL,(yyvsp[(2) - (3)].expr)); }
break;
case 99:
-#line 501 "xkbparse.y"
+#line 500 "xkbparse.y"
{ (yyval.overlay)= OverlayDeclCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].olKey)); }
break;
case 100:
-#line 505 "xkbparse.y"
+#line 504 "xkbparse.y"
{
(yyval.olKey)= (OverlayKeyDef *)
AppendStmt(&(yyvsp[(1) - (3)].olKey)->common,&(yyvsp[(3) - (3)].olKey)->common);
@@ -2438,52 +2439,52 @@ yyreduce:
break;
case 101:
-#line 510 "xkbparse.y"
+#line 509 "xkbparse.y"
{ (yyval.olKey)= (yyvsp[(1) - (1)].olKey); }
break;
case 102:
-#line 514 "xkbparse.y"
+#line 513 "xkbparse.y"
{ (yyval.olKey)= OverlayKeyCreate((yyvsp[(1) - (3)].str),(yyvsp[(3) - (3)].str)); }
break;
case 103:
-#line 518 "xkbparse.y"
+#line 517 "xkbparse.y"
{ (yyval.outline)=(OutlineDef *)AppendStmt(&(yyvsp[(1) - (3)].outline)->common,&(yyvsp[(3) - (3)].outline)->common);}
break;
case 104:
-#line 520 "xkbparse.y"
+#line 519 "xkbparse.y"
{ (yyval.outline)= (yyvsp[(1) - (1)].outline); }
break;
case 105:
-#line 524 "xkbparse.y"
+#line 523 "xkbparse.y"
{ (yyval.outline)= OutlineCreate(None,(yyvsp[(2) - (3)].expr)); }
break;
case 106:
-#line 526 "xkbparse.y"
+#line 525 "xkbparse.y"
{ (yyval.outline)= OutlineCreate((yyvsp[(1) - (5)].sval),(yyvsp[(4) - (5)].expr)); }
break;
case 107:
-#line 528 "xkbparse.y"
+#line 527 "xkbparse.y"
{ (yyval.outline)= OutlineCreate((yyvsp[(1) - (3)].sval),(yyvsp[(3) - (3)].expr)); }
break;
case 108:
-#line 532 "xkbparse.y"
+#line 531 "xkbparse.y"
{ (yyval.expr)= (ExprDef *)AppendStmt(&(yyvsp[(1) - (3)].expr)->common,&(yyvsp[(3) - (3)].expr)->common); }
break;
case 109:
-#line 534 "xkbparse.y"
+#line 533 "xkbparse.y"
{ (yyval.expr)= (yyvsp[(1) - (1)].expr); }
break;
case 110:
-#line 538 "xkbparse.y"
+#line 537 "xkbparse.y"
{
ExprDef *expr;
expr= ExprCreate(ExprCoord,TypeUnknown);
@@ -2494,237 +2495,237 @@ yyreduce:
break;
case 111:
-#line 548 "xkbparse.y"
+#line 547 "xkbparse.y"
{ (yyval.doodad)= DoodadCreate((yyvsp[(1) - (6)].uval),(yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].var)); }
break;
case 112:
-#line 551 "xkbparse.y"
+#line 550 "xkbparse.y"
{ (yyval.uval)= XkbTextDoodad; }
break;
case 113:
-#line 552 "xkbparse.y"
+#line 551 "xkbparse.y"
{ (yyval.uval)= XkbOutlineDoodad; }
break;
case 114:
-#line 553 "xkbparse.y"
+#line 552 "xkbparse.y"
{ (yyval.uval)= XkbSolidDoodad; }
break;
case 115:
-#line 554 "xkbparse.y"
+#line 553 "xkbparse.y"
{ (yyval.uval)= XkbLogoDoodad; }
break;
case 116:
-#line 557 "xkbparse.y"
+#line 556 "xkbparse.y"
{ (yyval.sval)= (yyvsp[(1) - (1)].sval); }
break;
case 117:
-#line 558 "xkbparse.y"
+#line 557 "xkbparse.y"
{ (yyval.sval)= (yyvsp[(1) - (1)].sval); }
break;
case 118:
-#line 562 "xkbparse.y"
+#line 561 "xkbparse.y"
{ (yyval.sval)= XkbInternAtom(NULL,"action",False); }
break;
case 119:
-#line 564 "xkbparse.y"
+#line 563 "xkbparse.y"
{ (yyval.sval)= XkbInternAtom(NULL,"interpret",False); }
break;
case 120:
-#line 566 "xkbparse.y"
+#line 565 "xkbparse.y"
{ (yyval.sval)= XkbInternAtom(NULL,"type",False); }
break;
case 121:
-#line 568 "xkbparse.y"
+#line 567 "xkbparse.y"
{ (yyval.sval)= XkbInternAtom(NULL,"key",False); }
break;
case 122:
-#line 570 "xkbparse.y"
+#line 569 "xkbparse.y"
{ (yyval.sval)= XkbInternAtom(NULL,"group",False); }
break;
case 123:
-#line 572 "xkbparse.y"
+#line 571 "xkbparse.y"
{(yyval.sval)=XkbInternAtom(NULL,"modifier_map",False);}
break;
case 124:
-#line 574 "xkbparse.y"
+#line 573 "xkbparse.y"
{ (yyval.sval)= XkbInternAtom(NULL,"indicator",False); }
break;
case 125:
-#line 576 "xkbparse.y"
+#line 575 "xkbparse.y"
{ (yyval.sval)= XkbInternAtom(NULL,"shape",False); }
break;
case 126:
-#line 578 "xkbparse.y"
+#line 577 "xkbparse.y"
{ (yyval.sval)= XkbInternAtom(NULL,"row",False); }
break;
case 127:
-#line 580 "xkbparse.y"
+#line 579 "xkbparse.y"
{ (yyval.sval)= XkbInternAtom(NULL,"section",False); }
break;
case 128:
-#line 582 "xkbparse.y"
+#line 581 "xkbparse.y"
{ (yyval.sval)= XkbInternAtom(NULL,"text",False); }
break;
case 129:
-#line 585 "xkbparse.y"
+#line 584 "xkbparse.y"
{ (yyval.uval)= (yyvsp[(1) - (1)].uval); }
break;
case 130:
-#line 586 "xkbparse.y"
+#line 585 "xkbparse.y"
{ (yyval.uval)= MergeDefault; }
break;
case 131:
-#line 589 "xkbparse.y"
+#line 588 "xkbparse.y"
{ (yyval.uval)= MergeDefault; }
break;
case 132:
-#line 590 "xkbparse.y"
+#line 589 "xkbparse.y"
{ (yyval.uval)= MergeAugment; }
break;
case 133:
-#line 591 "xkbparse.y"
+#line 590 "xkbparse.y"
{ (yyval.uval)= MergeOverride; }
break;
case 134:
-#line 592 "xkbparse.y"
+#line 591 "xkbparse.y"
{ (yyval.uval)= MergeReplace; }
break;
case 135:
-#line 593 "xkbparse.y"
+#line 592 "xkbparse.y"
{ (yyval.uval)= MergeAltForm; }
break;
case 136:
-#line 596 "xkbparse.y"
+#line 595 "xkbparse.y"
{ (yyval.expr)= (yyvsp[(1) - (1)].expr); }
break;
case 137:
-#line 597 "xkbparse.y"
+#line 596 "xkbparse.y"
{ (yyval.expr)= NULL; }
break;
case 138:
-#line 601 "xkbparse.y"
+#line 600 "xkbparse.y"
{ (yyval.expr)= (ExprDef *)AppendStmt(&(yyvsp[(1) - (3)].expr)->common,&(yyvsp[(3) - (3)].expr)->common); }
break;
case 139:
-#line 603 "xkbparse.y"
+#line 602 "xkbparse.y"
{ (yyval.expr)= (yyvsp[(1) - (1)].expr); }
break;
case 140:
-#line 607 "xkbparse.y"
+#line 606 "xkbparse.y"
{ (yyval.expr)= ExprCreateBinary(OpDivide,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
break;
case 141:
-#line 609 "xkbparse.y"
+#line 608 "xkbparse.y"
{ (yyval.expr)= ExprCreateBinary(OpAdd,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
break;
case 142:
-#line 611 "xkbparse.y"
+#line 610 "xkbparse.y"
{ (yyval.expr)= ExprCreateBinary(OpSubtract,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
break;
case 143:
-#line 613 "xkbparse.y"
+#line 612 "xkbparse.y"
{ (yyval.expr)= ExprCreateBinary(OpMultiply,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
break;
case 144:
-#line 615 "xkbparse.y"
+#line 614 "xkbparse.y"
{ (yyval.expr)= ExprCreateBinary(OpAssign,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
break;
case 145:
-#line 617 "xkbparse.y"
+#line 616 "xkbparse.y"
{ (yyval.expr)= (yyvsp[(1) - (1)].expr); }
break;
case 146:
-#line 621 "xkbparse.y"
+#line 620 "xkbparse.y"
{ (yyval.expr)= ExprCreateUnary(OpNegate,(yyvsp[(2) - (2)].expr)->type,(yyvsp[(2) - (2)].expr)); }
break;
case 147:
-#line 623 "xkbparse.y"
+#line 622 "xkbparse.y"
{ (yyval.expr)= ExprCreateUnary(OpUnaryPlus,(yyvsp[(2) - (2)].expr)->type,(yyvsp[(2) - (2)].expr)); }
break;
case 148:
-#line 625 "xkbparse.y"
+#line 624 "xkbparse.y"
{ (yyval.expr)= ExprCreateUnary(OpNot,TypeBoolean,(yyvsp[(2) - (2)].expr)); }
break;
case 149:
-#line 627 "xkbparse.y"
+#line 626 "xkbparse.y"
{ (yyval.expr)= ExprCreateUnary(OpInvert,(yyvsp[(2) - (2)].expr)->type,(yyvsp[(2) - (2)].expr)); }
break;
case 150:
-#line 629 "xkbparse.y"
+#line 628 "xkbparse.y"
{ (yyval.expr)= (yyvsp[(1) - (1)].expr); }
break;
case 151:
-#line 631 "xkbparse.y"
+#line 630 "xkbparse.y"
{ (yyval.expr)= ActionCreate((yyvsp[(1) - (4)].sval),(yyvsp[(3) - (4)].expr)); }
break;
case 152:
-#line 633 "xkbparse.y"
+#line 632 "xkbparse.y"
{ (yyval.expr)= (yyvsp[(1) - (1)].expr); }
break;
case 153:
-#line 635 "xkbparse.y"
+#line 634 "xkbparse.y"
{ (yyval.expr)= (yyvsp[(2) - (3)].expr); }
break;
case 154:
-#line 639 "xkbparse.y"
+#line 638 "xkbparse.y"
{ (yyval.expr)= (ExprDef *)AppendStmt(&(yyvsp[(1) - (3)].expr)->common,&(yyvsp[(3) - (3)].expr)->common); }
break;
case 155:
-#line 641 "xkbparse.y"
+#line 640 "xkbparse.y"
{ (yyval.expr)= (yyvsp[(1) - (1)].expr); }
break;
case 156:
-#line 645 "xkbparse.y"
+#line 644 "xkbparse.y"
{ (yyval.expr)= ActionCreate((yyvsp[(1) - (4)].sval),(yyvsp[(3) - (4)].expr)); }
break;
case 157:
-#line 649 "xkbparse.y"
+#line 648 "xkbparse.y"
{
ExprDef *expr;
expr= ExprCreate(ExprIdent,TypeUnknown);
@@ -2734,7 +2735,7 @@ yyreduce:
break;
case 158:
-#line 656 "xkbparse.y"
+#line 655 "xkbparse.y"
{
ExprDef *expr;
expr= ExprCreate(ExprFieldRef,TypeUnknown);
@@ -2745,7 +2746,7 @@ yyreduce:
break;
case 159:
-#line 664 "xkbparse.y"
+#line 663 "xkbparse.y"
{
ExprDef *expr;
expr= ExprCreate(ExprArrayRef,TypeUnknown);
@@ -2757,7 +2758,7 @@ yyreduce:
break;
case 160:
-#line 673 "xkbparse.y"
+#line 672 "xkbparse.y"
{
ExprDef *expr;
expr= ExprCreate(ExprArrayRef,TypeUnknown);
@@ -2769,7 +2770,7 @@ yyreduce:
break;
case 161:
-#line 684 "xkbparse.y"
+#line 683 "xkbparse.y"
{
ExprDef *expr;
expr= ExprCreate(ExprValue,TypeString);
@@ -2779,7 +2780,7 @@ yyreduce:
break;
case 162:
-#line 691 "xkbparse.y"
+#line 690 "xkbparse.y"
{
ExprDef *expr;
expr= ExprCreate(ExprValue,TypeInt);
@@ -2789,7 +2790,7 @@ yyreduce:
break;
case 163:
-#line 698 "xkbparse.y"
+#line 697 "xkbparse.y"
{
ExprDef *expr;
expr= ExprCreate(ExprValue,TypeFloat);
@@ -2799,7 +2800,7 @@ yyreduce:
break;
case 164:
-#line 705 "xkbparse.y"
+#line 704 "xkbparse.y"
{
ExprDef *expr;
expr= ExprCreate(ExprValue,TypeKeyName);
@@ -2811,35 +2812,36 @@ yyreduce:
break;
case 165:
-#line 715 "xkbparse.y"
+#line 714 "xkbparse.y"
{ (yyval.expr)= (yyvsp[(1) - (1)].expr); }
break;
case 166:
-#line 716 "xkbparse.y"
+#line 715 "xkbparse.y"
{ (yyval.expr)= NULL; }
break;
case 167:
-#line 720 "xkbparse.y"
+#line 719 "xkbparse.y"
{ (yyval.expr)= AppendKeysymList((yyvsp[(1) - (3)].expr),(KeySym)(yyvsp[(3) - (3)].uval)); }
break;
case 168:
-#line 722 "xkbparse.y"
+#line 721 "xkbparse.y"
{ (yyval.expr)= CreateKeysymList((KeySym)(yyvsp[(1) - (1)].uval)); }
break;
case 169:
-#line 726 "xkbparse.y"
+#line 725 "xkbparse.y"
{
KeySym sym;
if (LookupKeysym(scanStr,&sym))
(yyval.uval)= sym;
else {
char buf[120];
- sprintf(buf,"expected keysym, got %s",
- uStringText(scanStr));
+ snprintf(buf, sizeof(buf),
+ "expected keysym, got %s",
+ uStringText(scanStr));
yyerror(buf);
yynerrs++;
(yyval.uval)= NoSymbol;
@@ -2929,7 +2931,7 @@ yyreduce:
/* Line 1267 of yacc.c. */
-#line 2929 "xkbparse.c"
+#line 2931 "xkbparse.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);