1 /* A Bison parser, made from gram.y, by GNU bison 1.75. */
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 /* As a special exception, when this file is copied by Bison into a
22 Bison output file, you may use that output file without restriction.
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
26 /* Written by Richard Stallman by simplifying the original so called
27 ``semantic'' parser. */
29 /* All symbols defined below should begin with yy or YY, to avoid
30 infringing on user name space. This should be done even for local
31 variables, as they might otherwise be expanded by user macros.
32 There are some unavoidable exceptions within include files to
33 define necessary library symbols; they are noted "INFRINGES ON
34 USER NAME SPACE" below. */
36 /* Identify Bison output. */
42 /* Using locations. */
43 #define YYLSP_NEEDED 0
50 /* Put the tokens into the symbol table, so that GDB and other debuggers
122 T_RATNUMLISTVAR = 327,
123 T_RANGELISTVAR = 328,
129 T_BARSTLISTVAR = 334,
186 T_NOWHERE_SLIDE = 391,
211 #define T_BLOCKHEAD 262
214 #define T_SEMICOLON 265
215 #define T_NEWLINE 266
218 #define T_LBRACKET 269
219 #define T_RBRACKET 270
222 #define T_VARIABLE 273
233 #define T_MULTIWHOLE 284
240 #define T_AMPERSAND 291
243 #define T_DBLFLAT 294
251 #define T_HEADSHAPES 302
253 #define T_SWINGUNIT 304
254 #define T_POSTSCRIPT 305
255 #define T_SCOREFEED 306
256 #define T_BARTYPE 307
259 #define T_QUESTION 310
260 #define T_LINETYPE 311
267 #define T_PRINTTYPE 318
269 #define T_STAFFLINES 320
270 #define T_FFAMILY 321
271 #define T_PARAGRAPH 322
272 #define T_PARATYPE 323
274 #define T_FNUMVAR 325
275 #define T_2FNUMVAR 326
276 #define T_RATNUMLISTVAR 327
277 #define T_RANGELISTVAR 328
278 #define T_TIMEUNIT 329
279 #define T_FONTVAR 330
281 #define T_CLEFVAR 332
283 #define T_BARSTLISTVAR 334
284 #define T_SCORESEP 335
292 #define T_MULTIREST 343
293 #define T_YESNOVAR 344
297 #define T_INVISBAR 348
301 #define T_WHEREUSED 352
303 #define T_VCOMBINE 354
304 #define T_VCOMBVAL 355
305 #define T_SCOREPAD 356
310 #define T_ENDENDING 361
312 #define T_ENDSTYLE 363
313 #define T_ENDTYPE 364
314 #define T_SLASHMARK 365
317 #define T_REHEARSAL 368
321 #define T_TRANSPOSE 372
322 #define T_XPOS_INT 373
326 #define T_L_ANGLE 377
327 #define T_MODIFIER 378
328 #define T_R_ANGLE 379
331 #define T_PEDSTYLE 382
332 #define T_PEDSTAR 383
333 #define T_HIDECHANGES 384
336 #define T_CENTIMETERS 387
337 #define T_UNITTYPE 388
340 #define T_NOWHERE_SLIDE 391
343 #define T_OTHERTEXT 394
345 #define T_GRIDPLACE 396
346 #define T_GRPLVALUE 397
351 #define T_REH_STYLE 402
352 #define T_REHTYPE 403
353 #define T_L_DBLANGLE 404
354 #define T_R_DBLANGLE 405
357 #define T_PAGESIZE 408
358 #define T_ORIENTATION 409
363 /* Copy the first part of user declarations. */
367 /* Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
368 * 2005, 2006 by Arkkra Enterprises */
369 /* All rights reserved */
371 /* parser for music publication program. Uses lex to get tokens. */
374 #include "rational.h"
382 /* how many items to allocate at a time for
383 * "with" list, and location lists, etc */
387 static struct MAINLL *Currstruct_p; /* main list struct being filled in */
388 static struct BLOCKHEAD *Currblock_p; /* current block, if non-zero */
390 static struct INPCOORD *Curr_loc_info_p; /* location info being collected */
393 static short Gotheader, Gotfooter; /* boolean: to make sure each is defined only once */
394 static short Gothead2, Gotfoot2;
395 static short Getting_tup_dur; /* YES if currently collection tuplet
396 * duration rather than GRPSYL dur */
398 static struct GRPSYL *Curr_grpsyl_p; /* current GRPSYL struct being filled in */
399 static struct GRPSYL *Last_grpsyl_p; /* previous GRPSYL struct filled in (contains
400 * defaults for the current one */
401 static struct TIMELIST *Extra_time_p; /* If user enters times to be added
402 * together, like 2.+16 this points to
403 * a linked list of the extra times */
404 static struct TIMELIST *Curr_timelist_p;/* current additive time, used to know
405 * where to link items to the list */
406 static struct TIMELIST *Last_alloced_timelist_p; /* Most recently allocated
407 * list. Keeping track of this lets us
408 * avoid trying to free the list
409 * when Extra_time_p is pointing
410 * to a list from an SSV. */
411 static struct GRPSYL *Prev_grpsyl_p; /* Like Last_grpsyl_p except in the
412 * case of additive times,
413 * in which case it points to the
414 * first group. This is needed in case
415 * the following group is to get its
416 * time value by defaulting to that
417 * of its previous group. */
418 static int Extra_basictime; /* for saving basictime, when doing
420 static int Doing_timeunit = NO; /* YES if gathering timeunit param */
421 static struct GRPSYL *Lyrics_p; /* pointer to current list of lyrics */
422 static char **Curr_marklist; /* current "with" list */
423 static struct PRINTDATA **Next_print_link_p_p; /* points to where to attach next
424 * print command that we get */
425 static int Item_count; /* items in current list */
426 static int Max_items; /* current amount of space in lists
427 * "with" list, curve locations, etc) */
429 static int Plus_minus; /* if 1 add, if -1 subtract offset */
430 static int Defining_multiple = NO; /* if defining multiple voices at once */
431 static int Chord_at_a_time = NO; /* YES for chord-at-a-time,
432 * NO for voice-at-a-time */
433 static short Endingloc; /* if current bar starts or ends an
434 * ending, etc (STARTITEM, ENDITEM, etc) */
435 static short Got_ending; /* YES if got ending on this bar */
437 static int Til_bars; /* number of bars in "til" clause */
438 static int Dist; /* dist for a specific STUFF */
439 static int Dist_usage; /* meaning of Dist field */
440 static short User_meas_time; /* YES if user specified a time for
441 * an 'm' item. Only valid on mr */
442 static int Order_place; /* PL_* for markorder in SSV */
443 static int Order_prio; /* value in markorder in SSV */
444 static int Gracebackup; /* how many grace notes to back up
445 * before starting a "stuff" */
446 static float Til_offset; /* beat count in "til" clause */
447 static int Slurstyle; /* L_DOTTED, L_DASHED, or L_NORMAL */
449 static char *String1, *String2; /* to temporarily keep track
450 * of labels and other temporary
452 static char Tmpbuff[20]; /* temporary buffer for converting
454 static char Stringbuff[100]; /* temporary string storage */
455 static int Titlefont, Titlesize; /* font/size for title command */
456 static double Extra; /* extra vertical space for prints */
457 static short Good_till_canceled = NO; /* if [] things should be continued
458 * until turned off */
459 static short Curr_paratype = J_JUSTPARA; /* current paragraph type */
460 static struct TIMEDSSV *Curr_tssv_p; /* current mid-measure param change */
461 static char Timerep[MAXTSLEN]; /* Internal representation of time
462 * signature being collected */
463 static int Tsig_offset; /* Current place in Timerep while
464 * collecting a time signature */
465 static char *Alt_timesig_list; /* If user specified alternating
466 * time signatures, this points to
467 * the beginning of the list, for
468 * when we need to wrap around */
469 static char *Next_alt_timesig; /* If user specified alternating
470 * time signatures, this points to
471 * the one for the next measure */
472 static short Tsig_visibility; /* If EACHMEAS, alternating
473 * time signatures will be done
474 * by explicitly printing
475 * the appropriate time signature at
476 * the beginning of every measure,
477 * rather than printing them all just
478 * once at the beginning of the run
479 * of measures that alternate. */
481 /* Row index values must match the PS_* value definitions in defines.h.
482 * Column [0] is height in portrait mode, and column [1] is height. */
483 double pagesztbl[7][2] = {
484 { 8.5, 11.0 }, /* PS_LETTER */
485 { 8.5, 14.0 }, /* PS_LEGAL */
486 { 8.5, 13.0 }, /* PS_FLSA */
487 { 5.5, 8.5 }, /* PS_HALFLETTER */
488 { 8.26, 11.69 }, /* PS_A4 */
489 { 5.84, 8.26 }, /* PS_A5 */
490 { 4.12, 5.84 } /* PS_A6 */
495 /* static functions */
496 static char *stripquotes P((char *string)); /* rmv double quotes
498 static void chkdup_headfoot P((int flag, char *which));
499 static void end_prev_context P((void));
500 static void var_valid P((void)); /* check if okay to set location var */
501 static void proc_printcmd P((int justifytype, struct INPCOORD *inpc_p,
502 char *str, int font, int size, int got_nl,
503 int isPostScript, double extra));
504 static double extra_needed P((int font, int size, char *string));
505 static void keyword_notes P((char *str));
506 static void free_extra_time P((void));
507 static void tsig_item P((int item));
512 /* Enabling traces. */
517 /* Enabling verbose error messages. */
518 #ifdef YYERROR_VERBOSE
519 # undef YYERROR_VERBOSE
520 # define YYERROR_VERBOSE 1
522 # define YYERROR_VERBOSE 0
528 int intval; /* for tokens/nonterminals that return int values */
529 char *stringval; /* for tokens/nonterminals that return strings */
530 float floatval; /* for nonterminals that return floats */
531 RATIONAL ratval; /* for nonterminals that return rational numbers */
532 struct INPCOORD *inpcoord_p; /* for nonterminals that return coord info */
534 /* Line 193 of /usr/share/bison/yacc.c. */
536 # define YYSTYPE yystype
537 # define YYSTYPE_IS_TRIVIAL 1
541 typedef struct yyltype
548 # define YYLTYPE yyltype
549 # define YYLTYPE_IS_TRIVIAL 1
552 /* Copy the second part of user declarations. */
555 /* Line 213 of /usr/share/bison/yacc.c. */
558 #if ! defined (yyoverflow) || YYERROR_VERBOSE
560 /* The parser invokes alloca or malloc; define the necessary symbols. */
562 # if YYSTACK_USE_ALLOCA
563 # define YYSTACK_ALLOC alloca
565 # ifndef YYSTACK_USE_ALLOCA
566 # if defined (alloca) || defined (_ALLOCA_H)
567 # define YYSTACK_ALLOC alloca
570 # define YYSTACK_ALLOC __builtin_alloca
576 # ifdef YYSTACK_ALLOC
577 /* Pacify GCC's `empty if-body' warning. */
578 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
580 # if defined (__STDC__) || defined (__cplusplus)
581 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
582 # define YYSIZE_T size_t
584 # define YYSTACK_ALLOC malloc
585 # define YYSTACK_FREE free
587 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
590 #if (! defined (yyoverflow) \
591 && (! defined (__cplusplus) \
592 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
594 /* A type that is properly aligned for any stack member. */
601 /* The size of the maximum gap between one aligned stack and the next. */
602 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
604 /* The size of an array large to enough to hold all stacks, each with
606 # define YYSTACK_BYTES(N) \
607 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
610 /* Copy COUNT objects from FROM to TO. The source and destination do
614 # define YYCOPY(To, From, Count) \
615 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
617 # define YYCOPY(To, From, Count) \
620 register YYSIZE_T yyi; \
621 for (yyi = 0; yyi < (Count); yyi++) \
622 (To)[yyi] = (From)[yyi]; \
628 /* Relocate STACK from its old location to the new one. The
629 local variables YYSIZE and YYSTACKSIZE give the old and new number of
630 elements in the stack, and YYPTR gives the new location of the
631 stack. Advance YYPTR to a properly aligned location for the next
633 # define YYSTACK_RELOCATE(Stack) \
636 YYSIZE_T yynewbytes; \
637 YYCOPY (&yyptr->Stack, Stack, yysize); \
638 Stack = &yyptr->Stack; \
639 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
640 yyptr += yynewbytes / sizeof (*yyptr); \
646 #if defined (__STDC__) || defined (__cplusplus)
647 typedef signed char yysigned_char;
649 typedef short yysigned_char;
652 /* YYFINAL -- State number of the termination state. */
656 /* YYNTOKENS -- Number of terminals. */
657 #define YYNTOKENS 155
658 /* YYNNTS -- Number of nonterminals. */
660 /* YYNRULES -- Number of rules. */
662 /* YYNRULES -- Number of states. */
663 #define YYNSTATES 914
665 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
667 #define YYMAXUTOK 409
669 #define YYTRANSLATE(X) \
670 ((unsigned)(X) <= YYMAXUTOK ? yytranslate[X] : YYUNDEFTOK)
672 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
673 static const unsigned char yytranslate[] =
675 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
676 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
677 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
678 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
679 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
680 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
681 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
682 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
683 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
684 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
685 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
686 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
687 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
688 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
689 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
690 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
691 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
692 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
693 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
694 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
695 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
696 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
697 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
698 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
699 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
700 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
701 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
702 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
703 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
704 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
705 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
706 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
707 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
708 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
709 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
710 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
711 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
712 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
713 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
714 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
715 145, 146, 147, 148, 149, 150, 151, 152, 153, 154
719 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
721 static const unsigned short yyprhs[] =
723 0, 0, 3, 5, 8, 10, 12, 14, 16, 19,
724 22, 24, 28, 30, 33, 35, 37, 39, 41, 44,
725 47, 51, 56, 58, 59, 61, 63, 65, 69, 71,
726 73, 75, 77, 80, 82, 84, 89, 92, 96, 102,
727 107, 108, 113, 118, 123, 129, 134, 139, 143, 147,
728 151, 155, 159, 163, 167, 171, 175, 178, 179, 184,
729 188, 193, 198, 202, 206, 210, 216, 220, 224, 226,
730 228, 230, 231, 233, 235, 236, 237, 239, 241, 243,
731 247, 251, 252, 257, 262, 264, 265, 267, 268, 271,
732 274, 276, 278, 279, 280, 282, 286, 290, 291, 294,
733 295, 300, 301, 304, 306, 307, 308, 310, 314, 317,
734 319, 321, 325, 329, 331, 333, 335, 337, 339, 341,
735 343, 345, 347, 350, 352, 353, 357, 359, 360, 365,
736 367, 369, 373, 377, 379, 381, 385, 387, 388, 390,
737 391, 393, 397, 401, 404, 407, 409, 414, 416, 419,
738 424, 425, 427, 428, 430, 432, 434, 436, 437, 440,
739 443, 444, 448, 450, 453, 454, 456, 457, 460, 461,
740 463, 465, 467, 469, 471, 472, 474, 476, 479, 481,
741 483, 490, 493, 494, 496, 497, 499, 500, 504, 506,
742 509, 513, 521, 522, 524, 526, 528, 530, 532, 534,
743 536, 538, 540, 542, 544, 546, 548, 550, 552, 554,
744 556, 558, 560, 562, 564, 566, 568, 570, 572, 574,
745 576, 578, 580, 582, 586, 591, 595, 597, 598, 600,
746 602, 604, 607, 611, 613, 615, 617, 621, 623, 627,
747 629, 631, 634, 636, 638, 642, 645, 646, 649, 652,
748 657, 658, 661, 663, 666, 668, 674, 675, 677, 679,
749 682, 687, 689, 691, 693, 695, 699, 703, 707, 710,
750 712, 717, 724, 725, 729, 730, 735, 736, 737, 739,
751 741, 745, 749, 751, 753, 755, 757, 761, 764, 767,
752 770, 773, 775, 777, 780, 781, 783, 784, 786, 788,
753 792, 794, 798, 801, 804, 807, 808, 809, 811, 813,
754 817, 819, 821, 823, 825, 827, 829, 831, 833, 835,
755 837, 839, 841, 843, 846, 848, 850, 851, 853, 854,
756 858, 860, 862, 863, 866, 871, 872, 873, 875, 876,
757 879, 881, 885, 886, 888, 890, 892, 895, 898, 899,
758 901, 904, 907, 911, 914, 917, 919, 920, 923, 926,
759 927, 931, 933, 934, 938, 940, 942, 944, 947, 949,
760 951, 953, 955, 957, 959, 961, 965, 968, 974, 980,
761 984, 990, 998, 1003, 1008, 1015, 1020, 1026, 1031, 1032,
762 1034, 1036, 1037, 1039, 1040, 1042, 1044, 1046, 1048, 1050,
763 1052, 1054, 1056, 1058, 1060, 1063, 1065, 1068, 1073, 1075,
764 1076, 1078, 1080, 1082, 1085, 1088, 1091, 1093, 1095, 1097,
765 1099, 1101, 1103, 1105, 1107, 1109, 1118, 1119, 1121, 1123,
766 1125, 1127, 1129, 1130, 1132, 1133, 1136, 1141, 1145, 1147,
767 1148, 1150, 1152, 1154, 1158, 1161, 1162, 1165, 1168, 1169,
768 1170, 1176, 1178, 1180, 1182, 1186, 1189, 1190, 1193, 1194,
769 1197, 1198, 1200, 1202, 1205, 1208, 1212, 1214, 1220, 1221,
770 1223, 1225, 1228, 1231, 1237, 1240, 1242, 1244, 1245, 1249,
771 1251, 1252, 1255, 1259, 1260, 1262, 1263, 1265, 1267, 1269,
772 1273, 1274, 1278, 1279, 1282, 1284, 1287, 1289, 1291, 1295,
773 1299, 1303, 1311, 1314, 1316, 1317, 1319, 1321, 1323, 1325,
774 1332, 1333, 1336, 1338, 1342, 1344, 1346, 1348, 1350, 1351,
775 1354, 1357, 1359, 1361, 1363, 1366, 1369, 1371, 1375, 1377,
776 1379, 1381, 1382, 1385, 1388, 1390, 1392, 1396, 1399, 1400,
777 1402, 1404, 1406, 1414, 1415, 1416, 1418, 1419, 1424, 1432,
778 1433, 1436, 1439, 1441, 1445, 1447, 1451, 1454, 1456, 1460,
779 1467, 1474, 1477, 1479, 1481, 1483, 1485, 1488, 1490, 1492,
780 1494, 1496, 1498, 1499, 1503, 1504, 1506, 1507, 1510, 1513,
781 1517, 1518, 1520, 1522, 1525, 1531, 1534, 1535, 1540, 1541,
782 1546, 1547, 1549, 1551, 1552, 1555, 1558, 1559, 1562, 1563,
783 1566, 1572, 1573, 1575, 1577, 1580, 1582, 1585, 1586, 1589,
784 1593, 1596, 1600, 1604, 1608, 1610, 1612, 1613, 1615
787 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
788 static const short yyrhs[] =
790 156, 0, -1, 157, -1, 156, 157, -1, 158, -1,
791 170, -1, 229, -1, 235, -1, 239, 11, -1, 359,
792 11, -1, 165, -1, 353, 358, 11, -1, 11, -1,
793 1, 11, -1, 159, -1, 162, -1, 164, -1, 166,
794 -1, 163, 161, -1, 3, 160, -1, 4, 167, 160,
795 -1, 5, 167, 168, 160, -1, 161, -1, -1, 7,
796 -1, 46, -1, 6, -1, 238, 238, 11, -1, 47,
797 -1, 169, -1, 169, -1, 8, -1, 172, 171, -1,
798 10, -1, 11, -1, 69, 9, 296, 169, -1, 69,
799 9, -1, 70, 9, 382, -1, 71, 9, 382, 13,
800 382, -1, 152, 9, 220, 221, -1, -1, 99, 9,
801 173, 222, -1, 42, 9, 296, 382, -1, 78, 9,
802 169, 176, -1, 72, 9, 177, 178, 184, -1, 73,
803 9, 185, 186, -1, 79, 9, 192, 193, -1, 195,
804 9, 196, -1, 83, 9, 209, -1, 84, 9, 199,
805 -1, 65, 9, 210, -1, 75, 9, 81, -1, 107,
806 9, 66, -1, 77, 9, 87, -1, 89, 9, 215,
807 -1, 96, 9, 175, -1, 98, 237, -1, -1, 74,
808 9, 174, 182, -1, 49, 9, 183, -1, 80, 9,
809 216, 217, -1, 101, 9, 218, 219, -1, 108, 9,
810 224, -1, 147, 9, 148, -1, 127, 9, 227, -1,
811 117, 9, 225, 228, 169, -1, 131, 9, 133, -1,
812 76, 9, 238, -1, 97, -1, 40, -1, 37, -1,
813 -1, 34, -1, 40, -1, -1, -1, 179, -1, 182,
814 -1, 180, -1, 179, 13, 182, -1, 179, 13, 180,
815 -1, -1, 43, 181, 179, 44, -1, 288, 293, 289,
816 292, -1, 30, -1, -1, 182, -1, -1, 31, 32,
817 -1, 32, 31, -1, 32, -1, 31, -1, -1, -1,
818 187, -1, 186, 13, 187, -1, 169, 188, 189, -1,
819 -1, 19, 169, -1, -1, 43, 191, 190, 44, -1,
820 -1, 13, 191, -1, 238, -1, -1, -1, 194, -1,
821 193, 13, 194, -1, 169, 188, -1, 140, -1, 197,
822 -1, 196, 13, 197, -1, 196, 36, 197, -1, 198,
823 -1, 121, -1, 94, -1, 139, -1, 123, -1, 41,
824 -1, 105, -1, 113, -1, 119, -1, 200, 207, -1,
825 202, -1, -1, 200, 201, 202, -1, 204, -1, -1,
826 202, 20, 203, 204, -1, 85, -1, 86, -1, 205,
827 82, 169, -1, 205, 20, 29, -1, 29, -1, 206,
828 -1, 205, 20, 206, -1, 169, -1, -1, 215, -1,
829 -1, 37, -1, 169, 313, 226, -1, 310, 311, 226,
830 -1, 169, 208, -1, 169, 143, -1, 134, -1, 134,
831 43, 211, 44, -1, 212, -1, 211, 212, -1, 310,
832 213, 214, 312, -1, -1, 313, -1, -1, 135, -1,
833 40, -1, 37, -1, 169, -1, -1, 13, 169, -1,
834 296, 169, -1, -1, 13, 296, 169, -1, 153, -1,
835 310, 169, -1, -1, 154, -1, -1, 254, 223, -1,
836 -1, 100, -1, 109, -1, 7, -1, 103, -1, 104,
837 -1, -1, 118, -1, 57, -1, 111, 128, -1, 128,
838 -1, 118, -1, 112, 230, 233, 234, 358, 11, -1,
839 232, 231, -1, -1, 81, -1, -1, 66, -1, -1,
840 43, 169, 44, -1, 238, -1, 238, 238, -1, 238,
841 238, 238, -1, 236, 67, 230, 233, 238, 358, 11,
842 -1, -1, 68, -1, 69, -1, 89, -1, 80, -1,
843 65, -1, 74, -1, 49, -1, 42, -1, 79, -1,
844 70, -1, 71, -1, 131, -1, 108, -1, 147, -1,
845 127, -1, 78, -1, 99, -1, 101, -1, 73, -1,
846 140, -1, 83, -1, 84, -1, 117, -1, 72, -1,
847 96, -1, 76, -1, 75, -1, 107, -1, 77, -1,
848 145, -1, 238, 20, 145, -1, 240, 241, 250, 256,
849 -1, 88, 169, 358, -1, 330, -1, -1, 247, -1,
850 242, -1, 243, -1, 242, 243, -1, 244, 246, 245,
851 -1, 14, -1, 15, -1, 247, -1, 246, 10, 247,
852 -1, 249, -1, 247, 248, 249, -1, 36, -1, 251,
853 -1, 251, 254, -1, 12, -1, 252, -1, 251, 13,
854 252, -1, 167, 253, -1, -1, 19, 167, -1, 168,
855 255, -1, 168, 19, 168, 255, -1, -1, 13, 254,
856 -1, 257, -1, 256, 257, -1, 324, -1, 258, 264,
857 297, 274, 10, -1, -1, 259, -1, 260, -1, 259,
858 260, -1, 149, 261, 262, 150, -1, 3, -1, 4,
859 -1, 5, -1, 263, -1, 262, 10, 263, -1, 77,
860 9, 87, -1, 69, 9, 169, -1, 265, 286, -1,
861 268, -1, 14, 19, 15, 268, -1, 14, 268, 269,
862 15, 266, 267, -1, -1, 28, 28, 28, -1, -1,
863 267, 14, 269, 15, -1, -1, -1, 270, -1, 271,
864 -1, 269, 10, 271, -1, 23, 277, 279, -1, 322,
865 -1, 283, -1, 294, -1, 284, -1, 69, 296, 169,
866 -1, 146, 272, -1, 48, 238, -1, 137, 382, -1,
867 110, 169, -1, 20, -1, 19, -1, 273, 382, -1,
868 -1, 374, -1, -1, 275, -1, 276, -1, 275, 13,
869 276, -1, 285, -1, 151, 296, 382, -1, 111, 169,
870 -1, 130, 278, -1, 62, 278, -1, -1, -1, 284,
871 -1, 280, -1, 279, 13, 280, -1, 281, -1, 282,
872 -1, 238, -1, 28, -1, 19, -1, 124, -1, 53,
873 -1, 24, -1, 25, -1, 27, -1, 26, -1, 103,
874 -1, 104, -1, 90, 287, -1, 91, -1, 92, -1,
875 -1, 182, -1, -1, 23, 4, 21, -1, 29, -1,
876 169, -1, -1, 289, 290, -1, 374, 291, 288, 293,
877 -1, -1, -1, 30, -1, -1, 293, 28, -1, 295,
878 -1, 42, 296, 382, -1, -1, 19, -1, 303, -1,
879 298, -1, 299, 302, -1, 300, 301, -1, -1, 55,
880 -1, 54, 278, -1, 9, 323, -1, 53, 310, 312,
881 -1, 53, 82, -1, 48, 238, -1, 317, -1, -1,
882 302, 301, -1, 306, 304, -1, -1, 305, 306, 21,
883 -1, 23, -1, -1, 306, 307, 302, -1, 308, -1,
884 31, -1, 32, -1, 33, 32, -1, 144, -1, 52,
885 -1, 25, -1, 109, -1, 68, -1, 73, -1, 87,
886 -1, 43, 308, 44, -1, 310, 309, -1, 310, 43,
887 313, 44, 312, -1, 310, 43, 314, 44, 309, -1,
888 310, 43, 310, -1, 310, 313, 214, 312, 309, -1,
889 310, 313, 214, 43, 314, 44, 309, -1, 310, 313,
890 43, 310, -1, 310, 135, 312, 309, -1, 310, 135,
891 43, 314, 44, 309, -1, 310, 314, 311, 309, -1,
892 310, 314, 43, 313, 44, -1, 310, 314, 43, 310,
893 -1, -1, 238, -1, 34, -1, -1, 313, -1, -1,
894 314, -1, 35, -1, 36, -1, 37, -1, 38, -1,
895 39, -1, 169, -1, 315, -1, 316, -1, 19, -1,
896 315, 19, -1, 20, -1, 316, 20, -1, 318, 319,
897 124, 278, -1, 122, -1, -1, 136, -1, 320, -1,
898 321, -1, 320, 321, -1, 310, 312, -1, 9, 323,
899 -1, 40, -1, 34, -1, 30, -1, 31, -1, 32,
900 -1, 33, -1, 37, -1, 38, -1, 45, -1, 326,
901 256, 327, 328, 169, 325, 329, 10, -1, -1, 37,
902 -1, 114, -1, 40, -1, 16, -1, 17, -1, -1,
903 21, -1, -1, 13, 182, -1, 41, 331, 12, 344,
904 -1, 332, 334, 337, -1, 333, -1, -1, 21, -1,
905 335, -1, 22, -1, 334, 13, 335, -1, 169, 336,
906 -1, -1, 19, 169, -1, 36, 169, -1, -1, -1,
907 337, 10, 21, 338, 334, -1, 340, -1, 34, -1,
908 341, -1, 340, 13, 341, -1, 169, 342, -1, -1,
909 19, 169, -1, -1, 345, 351, -1, -1, 346, -1,
910 347, -1, 346, 347, -1, 348, 10, -1, 343, 286,
911 350, -1, 349, -1, 326, 346, 327, 169, 329, -1,
912 -1, 32, -1, 352, -1, 351, 352, -1, 238, 10,
913 -1, 14, 339, 15, 238, 10, -1, 360, 362, -1,
914 386, -1, 390, -1, -1, 51, 354, 355, -1, 424,
915 -1, -1, 355, 356, -1, 70, 357, 382, -1, -1,
916 9, -1, -1, 10, -1, 397, -1, 418, -1, 388,
917 361, 52, -1, -1, 43, 52, 44, -1, -1, 362,
918 363, -1, 295, -1, 9, 323, -1, 364, -1, 129,
919 -1, 116, 9, 169, -1, 115, 9, 238, -1, 114,
920 9, 169, -1, 113, 365, 232, 231, 403, 366, 405,
921 -1, 105, 238, -1, 106, -1, -1, 238, -1, 116,
922 -1, 114, -1, 115, -1, 43, 368, 369, 13, 376,
923 44, -1, -1, 370, 372, -1, 375, -1, 385, 28,
924 371, -1, 373, -1, 40, -1, 38, -1, 34, -1,
925 -1, 372, 373, -1, 374, 375, -1, 20, -1, 19,
926 -1, 382, -1, 84, 382, -1, 377, 379, -1, 381,
927 -1, 385, 28, 378, -1, 37, -1, 32, -1, 40,
928 -1, -1, 379, 380, -1, 374, 381, -1, 382, -1,
929 169, -1, 169, 28, 383, -1, 28, 384, -1, -1,
930 384, -1, 8, -1, 323, -1, 388, 57, 387, 367,
931 58, 367, 389, -1, -1, -1, 56, -1, -1, 23,
932 230, 233, 238, -1, 388, 61, 391, 396, 58, 396,
933 392, -1, -1, 58, 393, -1, 60, 394, -1, 396,
934 -1, 393, 58, 396, -1, 395, -1, 394, 13, 395,
935 -1, 296, 382, -1, 367, -1, 398, 12, 408, -1,
936 401, 403, 404, 333, 334, 405, -1, 388, 120, 403,
937 333, 334, 405, -1, 399, 400, -1, 126, -1, 247,
938 -1, 22, -1, 402, -1, 232, 81, -1, 122, -1,
939 124, -1, 119, -1, 121, -1, 94, -1, -1, 43,
940 169, 44, -1, -1, 123, -1, -1, 69, 406, -1,
941 169, 407, -1, 19, 169, 407, -1, -1, 138, -1,
942 409, -1, 408, 409, -1, 410, 412, 413, 414, 10,
943 -1, 382, 411, -1, -1, 43, 19, 169, 44, -1,
944 -1, 14, 374, 382, 15, -1, -1, 59, -1, 238,
945 -1, -1, 125, 415, -1, 382, 416, -1, -1, 30,
946 417, -1, -1, 20, 382, -1, 95, 419, 420, 12,
947 423, -1, -1, 103, -1, 104, -1, 421, 422, -1,
948 167, -1, 167, 168, -1, -1, 58, 167, -1, 58,
949 167, 168, -1, 382, 10, -1, 423, 382, 10, -1,
950 426, 427, 238, -1, 425, 427, 238, -1, 50, -1,
951 63, -1, -1, 64, -1, 367, -1
954 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
955 static const unsigned short yyrline[] =
957 0, 245, 245, 247, 251, 253, 256, 259, 262, 275,
958 278, 281, 284, 290, 302, 308, 314, 318, 322, 338,
959 343, 351, 361, 367, 374, 533, 538, 545, 560, 569,
960 572, 578, 583, 586, 588, 592, 610, 625, 631, 637,
961 647, 646, 650, 657, 663, 673, 679, 685, 693, 696,
962 702, 707, 713, 719, 734, 740, 743, 773, 772, 785,
963 795, 800, 805, 815, 826, 836, 867, 873, 879, 889,
964 903, 912, 918, 931, 944, 950, 953, 957, 963, 966,
965 972, 977, 976, 982, 1037, 1054, 1060, 1064, 1070, 1076,
966 1082, 1088, 1094, 1101, 1104, 1107, 1111, 1119, 1125, 1137,
967 1143, 1150, 1156, 1163, 1166, 1172, 1175, 1178, 1182, 1190,
968 1209, 1217, 1225, 1233, 1244, 1250, 1256, 1262, 1281, 1287,
969 1293, 1299, 1305, 1327, 1331, 1330, 1336, 1342, 1341, 1347,
970 1353, 1359, 1382, 1394, 1402, 1405, 1409, 1426, 1432, 1438,
971 1443, 1452, 1462, 1501, 1507, 1513, 1523, 1530, 1536, 1543,
972 1551, 1556, 1564, 1570, 1582, 1591, 1597, 1609, 1627, 1638,
973 1651, 1669, 1681, 1684, 1709, 1715, 1722, 1728, 1736, 1742,
974 1749, 1755, 1765, 1770, 1776, 1781, 1798, 1803, 1809, 1815,
975 1818, 1822, 1841, 1846, 1852, 1857, 1862, 1867, 1873, 1881,
976 1901, 1920, 2010, 2018, 2025, 2028, 2031, 2034, 2037, 2040,
977 2043, 2046, 2049, 2052, 2055, 2058, 2061, 2064, 2067, 2070,
978 2073, 2076, 2079, 2082, 2085, 2088, 2091, 2094, 2097, 2100,
979 2103, 2106, 2110, 2120, 2134, 2152, 2187, 2193, 2198, 2203,
980 2210, 2212, 2216, 2219, 2224, 2229, 2234, 2241, 2247, 2251,
981 2258, 2265, 2274, 2282, 2284, 2291, 2299, 2305, 2315, 2328,
982 2350, 2353, 2359, 2361, 2365, 2368, 2412, 2415, 2419, 2422,
983 2426, 2435, 2441, 2447, 2454, 2457, 2461, 2471, 2488, 2491,
984 2506, 2512, 2517, 2522, 2528, 2532, 2540, 2547, 2554, 2558,
985 2560, 2564, 2570, 2573, 2576, 2579, 2595, 2611, 2622, 2649,
986 2660, 2683, 2689, 2695, 2709, 2715, 2721, 2723, 2727, 2730,
987 2734, 2737, 2750, 2771, 2786, 2799, 2809, 2814, 2821, 2823,
988 2827, 2841, 2849, 2853, 2860, 2867, 2874, 2881, 2891, 2904,
989 2914, 2925, 2931, 2937, 2965, 2971, 3001, 3010, 3021, 3026,
990 3043, 3069, 3108, 3114, 3118, 3132, 3154, 3159, 3172, 3177,
991 3184, 3204, 3209, 3215, 3222, 3234, 3239, 3243, 3247, 3266,
992 3282, 3300, 3332, 3350, 3363, 3382, 3386, 3388, 3392, 3398,
993 3404, 3429, 3435, 3443, 3450, 3452, 3459, 3471, 3483, 3498,
994 3518, 3525, 3537, 3548, 3560, 3572, 3578, 3588, 3597, 3606,
995 3622, 3628, 3637, 3653, 3659, 3665, 3674, 3680, 3694, 3699,
996 3717, 3723, 3729, 3734, 3740, 3745, 3751, 3757, 3764, 3771,
997 3777, 3783, 3795, 3806, 3811, 3818, 3823, 3830, 3837, 3844,
998 3853, 3860, 3864, 3867, 3871, 3883, 3893, 3898, 3906, 3913,
999 3920, 3927, 3934, 3941, 3948, 3954, 3960, 3966, 3973, 3980,
1000 3992, 3998, 4003, 4008, 4017, 4024, 4030, 4034, 4039, 4043,
1001 4050, 4056, 4058, 4068, 4072, 4079, 4086, 4096, 4103, 4107,
1002 4106, 4110, 4115, 4126, 4131, 4136, 4144, 4150, 4156, 4166,
1003 4177, 4183, 4187, 4189, 4193, 4196, 4217, 4222, 4228, 4234,
1004 4241, 4243, 4247, 4258, 4264, 4356, 4359, 4364, 4362, 4436,
1005 4440, 4443, 4447, 4474, 4476, 4480, 4482, 4486, 4489, 4493,
1006 4545, 4551, 4561, 4563, 4567, 4575, 4586, 4618, 4629, 4636,
1007 4642, 4647, 4657, 4665, 4677, 4687, 4694, 4703, 4712, 4721,
1008 4726, 4736, 4742, 4744, 4756, 4761, 4769, 4775, 4785, 4787,
1009 4790, 4793, 4798, 4804, 4809, 4824, 4827, 4829, 4842, 4847,
1010 4853, 4863, 4865, 4869, 4873, 4880, 4885, 4891, 4897, 4903,
1011 4907, 4912, 4915, 4936, 4943, 4948, 4952, 4958, 4964, 4975,
1012 4988, 4991, 4995, 4997, 5001, 5004, 5008, 5025, 5062, 5069,
1013 5076, 5090, 5099, 5106, 5109, 5116, 5125, 5149, 5161, 5167,
1014 5173, 5179, 5186, 5192, 5198, 5203, 5209, 5215, 5228, 5234,
1015 5247, 5252, 5258, 5261, 5265, 5272, 5280, 5285, 5291, 5296,
1016 5302, 5307, 5319, 5325, 5329, 5334, 5352, 5357, 5363, 5368,
1017 5374, 5377, 5382, 5389, 5396, 5400, 5407, 5414, 5416, 5423,
1018 5430, 5436, 5442, 5452, 5463, 5469, 5472, 5479, 5486
1022 #if YYDEBUG || YYERROR_VERBOSE
1023 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1024 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1025 static const char *const yytname[] =
1027 "$end", "error", "$undefined", "T_SCORE", "T_STAFF", "T_VOICE", "T_GRIDS",
1028 "T_BLOCKHEAD", "T_NUMBER", "T_EQUAL", "T_SEMICOLON", "T_NEWLINE",
1029 "T_COLON", "T_COMMA", "T_LBRACKET", "T_RBRACKET", "T_LBRACE",
1030 "T_RBRACE", "T_VARIABLE", "T_DASH", "T_PLUS", "T_PLACE", "T_ALL",
1031 "T_WITH", "T_CUE", "T_GRACE", "T_XNOTE", "T_DIAM", "T_DOT",
1032 "T_MULTIWHOLE", "T_LET_M", "T_LET_R", "T_LET_S", "T_LET_U", "T_PITCH",
1033 "T_SHARP", "T_AMPERSAND", "T_LET_N", "T_LET_X", "T_DBLFLAT", "T_LETTER",
1034 "T_LYRICS", "T_PAD", "T_LPAREN", "T_RPAREN", "T_LVAR", "T_MUSIC",
1035 "T_HEADSHAPES", "T_HS", "T_SWINGUNIT", "T_POSTSCRIPT", "T_SCOREFEED",
1036 "T_BARTYPE", "T_HAT", "T_TILDE", "T_QUESTION", "T_LINETYPE", "T_LINE",
1037 "T_TO", "T_STAR", "T_BULGE", "T_CURVE", "T_TIE", "T_PRINTTYPE", "T_NL",
1038 "T_STAFFLINES", "T_FFAMILY", "T_PARAGRAPH", "T_PARATYPE", "T_NUMVAR",
1039 "T_FNUMVAR", "T_2FNUMVAR", "T_RATNUMLISTVAR", "T_RANGELISTVAR",
1040 "T_TIMEUNIT", "T_FONTVAR", "T_STRVAR", "T_CLEFVAR", "T_VVAR",
1041 "T_BARSTLISTVAR", "T_SCORESEP", "T_FONT", "T_SLASH", "T_KEY", "T_TIME",
1042 "T_CUT", "T_COMMON", "T_CLEF", "T_MULTIREST", "T_YESNOVAR", "T_BM",
1043 "T_ESBM", "T_EBM", "T_INVISBAR", "T_OCTAVE", "T_ROLL", "T_VISVAR",
1044 "T_WHEREUSED", "T_UNSET", "T_VCOMBINE", "T_VCOMBVAL", "T_SCOREPAD",
1045 "T_WORD", "T_UP", "T_DOWN", "T_ENDING", "T_ENDENDING", "T_FAMILY",
1046 "T_ENDSTYLE", "T_ENDTYPE", "T_SLASHMARK", "T_ALT", "T_TITLE",
1047 "T_REHEARSAL", "T_NUM", "T_LET", "T_MNUM", "T_TRANSPOSE", "T_XPOS_INT",
1048 "T_PEDAL", "T_PHRASE", "T_MUSSYM", "T_L_ANGLE", "T_MODIFIER",
1049 "T_R_ANGLE", "T_TIL", "T_MIDI", "T_PEDSTYLE", "T_PEDSTAR",
1050 "T_HIDECHANGES", "T_SLUR", "T_UNITS", "T_CENTIMETERS", "T_UNITTYPE",
1051 "T_TAB", "T_TICKS", "T_NOWHERE_SLIDE", "T_LEN", "T_EXCLAM",
1052 "T_OTHERTEXT", "T_ORDER", "T_GRIDPLACE", "T_GRPLVALUE", "T_DRUM",
1053 "T_RPT", "T_STRING", "T_HO", "T_REH_STYLE", "T_REHTYPE", "T_L_DBLANGLE",
1054 "T_R_DBLANGLE", "T_SLOPE", "T_PSVAR", "T_PAGESIZE", "T_ORIENTATION",
1055 "$accept", "song", "item", "context", "ssv_context", "alloc_ssv",
1056 "new_context", "blockhead_context", "music_context", "grid_context",
1057 "stringpair", "headshape_context", "staffnum", "voicenum", "num",
1058 "assignment", "terminator", "assign", "@1", "@2", "visval",
1059 "vschemetype", "allocbeamlist", "ratnumlist", "nonempty_ratnumlist",
1060 "subbeam", "@3", "time_item", "swing_time", "opt_rs", "alloc_rangelist",
1061 "rangelist", "rangeitem", "rangetail", "grplabel", "optlabel2",
1062 "glabel", "alloc_barstlist", "barstlist", "barst_item", "mark_order",
1063 "orderlist", "orderitem", "marktype", "timesig", "tsiglist", "@4",
1064 "meas_tsig", "@5", "fraction", "numerator", "numerator_value",
1065 "opt_ts_visibility", "opt_n", "keyspec", "stafflinedef",
1066 "tab_string_list", "tab_item", "opt_str_acc", "opt_ticks", "flagval",
1067 "minscsep", "maxscsep", "minscpad", "maxscpad", "pagesize",
1068 "orientation", "vcombine_value", "opt_vcombine_qualifier", "end_type",
1069 "updown", "majmin", "pedstyle", "transpose_interval", "title", "tfont",
1070 "title_font", "font_family", "title_size", "titleA", "paragraph",
1071 "opt_paratype", "paramname", "string", "noteinfo", "init_staff",
1072 "sv_spec", "sv_map_list", "sv_map_entry", "map_start", "map_finish",
1073 "sv_map_item_list", "voice_id", "sv_and", "sv_item", "notecolon",
1074 "grp_stafflist", "grp_staff_item", "grp_staff_range", "voice_spec",
1075 "voice_tail", "groupinfo", "groupdata", "mid_meas_param",
1076 "mid_meas_list", "mid_meas_item", "mm_context", "mm_params",
1077 "mm_param_item", "grp_attributes", "styleinfo", "gtc",
1078 "extra_styleinfo", "alloc_grpsyl", "marklist", "marklistA", "markitem",
1079 "hor_offset", "opt_plus_or_minus", "other_attr", "attr_list",
1080 "attr_item", "alloc_marklist", "opt_dir", "marks", "mark", "mark_item",
1081 "shorthand_mark", "notetype", "dir", "beammark", "time_val",
1082 "crossbeam", "basic_time_val", "opt_more_time", "more_time_item",
1083 "alloc_timelist", "opt_m", "dots", "padding", "padspec", "opt_minus",
1084 "group", "special_group", "extra_attr", "spec_grp_alloc", "extra_item",
1085 "note_opts", "notelist", "opt_other_staff", "css_with", "some_notes",
1086 "notedata", "notedata1", "opt_bend", "pitch", "opt_accidental",
1087 "opt_octave", "acc_symbol", "octave", "minuslist", "pluslist",
1088 "slur_item", "start_slur", "slurlist", "fullslurlist", "slurnote",
1089 "grp_locsave", "loc_variable", "ntuplet", "printtup", "start_tuplet",
1090 "rbrace", "opt_side", "opt_time", "lyricinfo", "lyric_id",
1091 "lyr_opt_place", "opt_place", "staff_list", "staff_item", "staff_range",
1092 "more_lyric_ids", "@6", "verse_spec", "verselist", "verse_item",
1093 "verse_range", "alloc_lyr_grpsyl", "lyricdata", "lyr_tlist",
1094 "lyrics_timelist", "lyr_time_item", "lyr_tm", "lyrtuplet", "opt_space",
1095 "lyr_verse", "verse_string", "os_directive", "@7", "opt_temp_margin",
1096 "temp_margin", "opt_equals", "opt_semi", "directive", "barinfo",
1097 "precbartype", "bar_items", "bar_opt", "ending_info", "chk_dup_reh",
1098 "rehearsal_mark", "location", "alloc_loc", "xcoord", "xterm",
1099 "east_or_west", "xoffsetlist", "xoffset", "plus_or_minus", "xoffsetval",
1100 "ycoord", "yterm", "north_or_south", "yoffsetlist", "yoffset",
1101 "yoffsetval", "floatnum", "opt_decimal_part", "numstr", "variable",
1102 "line", "line_alloc", "linetype", "opt_line_str", "curve",
1103 "curve_alloc", "curve_tail", "loc_list", "bulgelist", "bulge_value",
1104 "curve_loc", "stuff_info", "stuff_header", "midi", "midi_staff",
1105 "stuff_id", "stuff_type", "opt_size", "opt_modifier", "opt_dist",
1106 "stuff_dist", "opt_exclam", "stufflist", "stuff_item", "beat_offset",
1107 "gracebackup", "steps_offset", "opt_string", "til_clause", "til_val",
1108 "til_suffix", "til_offset", "roll_cmd", "opt_roll_dir", "roll_extent",
1109 "roll_start", "roll_end", "roll_offsetlist", "printcmd", "postscript",
1110 "printtype", "opt_loc", 0
1115 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1117 static const unsigned short yytoknum[] =
1119 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1120 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1121 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1122 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1123 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1124 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1125 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1126 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1127 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1128 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1129 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1130 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1131 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1132 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1133 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1134 405, 406, 407, 408, 409
1138 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1139 static const unsigned short yyr1[] =
1141 0, 155, 156, 156, 157, 157, 157, 157, 157, 157,
1142 157, 157, 157, 157, 158, 158, 158, 158, 158, 159,
1143 159, 159, 160, 161, 162, 163, 164, 165, 166, 167,
1144 168, 169, 170, 171, 171, 172, 172, 172, 172, 172,
1145 173, 172, 172, 172, 172, 172, 172, 172, 172, 172,
1146 172, 172, 172, 172, 172, 172, 172, 174, 172, 172,
1147 172, 172, 172, 172, 172, 172, 172, 172, 175, 175,
1148 175, 176, 176, 176, 177, 178, 178, 179, 179, 179,
1149 179, 181, 180, 182, 182, 183, 183, 184, 184, 184,
1150 184, 184, 185, 186, 186, 186, 187, 188, 188, 189,
1151 189, 190, 190, 191, 192, 193, 193, 193, 194, 195,
1152 196, 196, 196, 197, 198, 198, 198, 198, 198, 198,
1153 198, 198, 199, 200, 201, 200, 202, 203, 202, 204,
1154 204, 204, 204, 204, 205, 205, 206, 207, 207, 208,
1155 208, 209, 209, 210, 210, 210, 210, 211, 211, 212,
1156 213, 213, 214, 214, 215, 215, 216, 217, 217, 218,
1157 219, 219, 220, 220, 221, 221, 222, 222, 223, 223,
1158 224, 224, 225, 225, 226, 226, 227, 227, 227, 228,
1159 229, 230, 231, 231, 232, 232, 233, 233, 234, 234,
1160 234, 235, 236, 236, 237, 237, 237, 237, 237, 237,
1161 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1162 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1163 237, 237, 238, 238, 239, 239, 239, 240, 241, 241,
1164 242, 242, 243, 244, 245, 246, 246, 247, 247, 248,
1165 249, 249, 250, 251, 251, 252, 253, 253, 254, 254,
1166 255, 255, 256, 256, 257, 257, 258, 258, 259, 259,
1167 260, 261, 261, 261, 262, 262, 263, 263, 264, 265,
1168 265, 265, 266, 266, 267, 267, 268, 269, 269, 270,
1169 270, 271, 271, 271, 271, 271, 271, 271, 271, 271,
1170 271, 272, 272, 272, 273, 273, 274, 274, 275, 275,
1171 276, 276, 276, 276, 276, 277, 278, 278, 279, 279,
1172 280, 281, 281, 282, 282, 282, 282, 283, 283, 283,
1173 283, 284, 284, 285, 285, 285, 286, 286, 287, 287,
1174 288, 288, 289, 289, 290, 291, 292, 292, 293, 293,
1175 294, 295, 296, 296, 297, 297, 298, 299, 300, 301,
1176 301, 301, 301, 301, 301, 301, 302, 302, 303, 304,
1177 304, 305, 306, 306, 307, 307, 307, 307, 307, 307,
1178 307, 307, 307, 307, 307, 307, 308, 308, 308, 308,
1179 308, 308, 308, 308, 308, 308, 308, 308, 309, 309,
1180 310, 311, 311, 312, 312, 313, 313, 313, 313, 313,
1181 314, 314, 314, 315, 315, 316, 316, 317, 318, 319,
1182 319, 319, 320, 320, 321, 322, 323, 323, 323, 323,
1183 323, 323, 323, 323, 323, 324, 325, 325, 325, 325,
1184 326, 327, 328, 328, 329, 329, 330, 331, 332, 333,
1185 333, 334, 334, 334, 335, 336, 336, 336, 337, 338,
1186 337, 339, 339, 340, 340, 341, 342, 342, 343, 344,
1187 345, 345, 346, 346, 347, 348, 348, 349, 350, 350,
1188 351, 351, 352, 352, 353, 353, 353, 354, 353, 353,
1189 355, 355, 356, 357, 357, 358, 358, 359, 359, 360,
1190 361, 361, 362, 362, 363, 363, 363, 363, 363, 363,
1191 363, 363, 364, 364, 365, 366, 366, 366, 366, 367,
1192 368, 369, 370, 370, 370, 371, 371, 371, 372, 372,
1193 373, 374, 374, 375, 375, 376, 377, 377, 378, 378,
1194 378, 379, 379, 380, 381, 382, 382, 382, 383, 383,
1195 384, 385, 386, 387, 388, 388, 389, 389, 390, 391,
1196 392, 392, 393, 393, 394, 394, 395, 396, 397, 398,
1197 398, 398, 399, 400, 400, 401, 402, 402, 402, 402,
1198 402, 402, 403, 403, 404, 404, 405, 405, 406, 406,
1199 407, 407, 408, 408, 409, 410, 411, 411, 412, 412,
1200 413, 413, 413, 414, 414, 415, 416, 416, 417, 417,
1201 418, 419, 419, 419, 420, 421, 421, 422, 422, 422,
1202 423, 423, 424, 424, 425, 426, 427, 427, 427
1205 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1206 static const unsigned char yyr2[] =
1208 0, 2, 1, 2, 1, 1, 1, 1, 2, 2,
1209 1, 3, 1, 2, 1, 1, 1, 1, 2, 2,
1210 3, 4, 1, 0, 1, 1, 1, 3, 1, 1,
1211 1, 1, 2, 1, 1, 4, 2, 3, 5, 4,
1212 0, 4, 4, 4, 5, 4, 4, 3, 3, 3,
1213 3, 3, 3, 3, 3, 3, 2, 0, 4, 3,
1214 4, 4, 3, 3, 3, 5, 3, 3, 1, 1,
1215 1, 0, 1, 1, 0, 0, 1, 1, 1, 3,
1216 3, 0, 4, 4, 1, 0, 1, 0, 2, 2,
1217 1, 1, 0, 0, 1, 3, 3, 0, 2, 0,
1218 4, 0, 2, 1, 0, 0, 1, 3, 2, 1,
1219 1, 3, 3, 1, 1, 1, 1, 1, 1, 1,
1220 1, 1, 2, 1, 0, 3, 1, 0, 4, 1,
1221 1, 3, 3, 1, 1, 3, 1, 0, 1, 0,
1222 1, 3, 3, 2, 2, 1, 4, 1, 2, 4,
1223 0, 1, 0, 1, 1, 1, 1, 0, 2, 2,
1224 0, 3, 1, 2, 0, 1, 0, 2, 0, 1,
1225 1, 1, 1, 1, 0, 1, 1, 2, 1, 1,
1226 6, 2, 0, 1, 0, 1, 0, 3, 1, 2,
1227 3, 7, 0, 1, 1, 1, 1, 1, 1, 1,
1228 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1229 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1230 1, 1, 1, 3, 4, 3, 1, 0, 1, 1,
1231 1, 2, 3, 1, 1, 1, 3, 1, 3, 1,
1232 1, 2, 1, 1, 3, 2, 0, 2, 2, 4,
1233 0, 2, 1, 2, 1, 5, 0, 1, 1, 2,
1234 4, 1, 1, 1, 1, 3, 3, 3, 2, 1,
1235 4, 6, 0, 3, 0, 4, 0, 0, 1, 1,
1236 3, 3, 1, 1, 1, 1, 3, 2, 2, 2,
1237 2, 1, 1, 2, 0, 1, 0, 1, 1, 3,
1238 1, 3, 2, 2, 2, 0, 0, 1, 1, 3,
1239 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1240 1, 1, 1, 2, 1, 1, 0, 1, 0, 3,
1241 1, 1, 0, 2, 4, 0, 0, 1, 0, 2,
1242 1, 3, 0, 1, 1, 1, 2, 2, 0, 1,
1243 2, 2, 3, 2, 2, 1, 0, 2, 2, 0,
1244 3, 1, 0, 3, 1, 1, 1, 2, 1, 1,
1245 1, 1, 1, 1, 1, 3, 2, 5, 5, 3,
1246 5, 7, 4, 4, 6, 4, 5, 4, 0, 1,
1247 1, 0, 1, 0, 1, 1, 1, 1, 1, 1,
1248 1, 1, 1, 1, 2, 1, 2, 4, 1, 0,
1249 1, 1, 1, 2, 2, 2, 1, 1, 1, 1,
1250 1, 1, 1, 1, 1, 8, 0, 1, 1, 1,
1251 1, 1, 0, 1, 0, 2, 4, 3, 1, 0,
1252 1, 1, 1, 3, 2, 0, 2, 2, 0, 0,
1253 5, 1, 1, 1, 3, 2, 0, 2, 0, 2,
1254 0, 1, 1, 2, 2, 3, 1, 5, 0, 1,
1255 1, 2, 2, 5, 2, 1, 1, 0, 3, 1,
1256 0, 2, 3, 0, 1, 0, 1, 1, 1, 3,
1257 0, 3, 0, 2, 1, 2, 1, 1, 3, 3,
1258 3, 7, 2, 1, 0, 1, 1, 1, 1, 6,
1259 0, 2, 1, 3, 1, 1, 1, 1, 0, 2,
1260 2, 1, 1, 1, 2, 2, 1, 3, 1, 1,
1261 1, 0, 2, 2, 1, 1, 3, 2, 0, 1,
1262 1, 1, 7, 0, 0, 1, 0, 4, 7, 0,
1263 2, 2, 1, 3, 1, 3, 2, 1, 3, 6,
1264 6, 2, 1, 1, 1, 1, 2, 1, 1, 1,
1265 1, 1, 0, 3, 0, 1, 0, 2, 2, 3,
1266 0, 1, 1, 2, 5, 2, 0, 4, 0, 4,
1267 0, 1, 1, 0, 2, 2, 0, 2, 0, 2,
1268 5, 0, 1, 1, 2, 1, 2, 0, 2, 3,
1269 2, 3, 3, 3, 1, 1, 0, 1, 1
1272 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1273 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1274 means the default is an error. */
1275 static const unsigned short yydefact[] =
1277 0, 0, 23, 0, 0, 26, 24, 12, 439, 0,
1278 25, 28, 0, 614, 477, 545, 615, 0, 185, 193,
1279 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1280 0, 0, 0, 0, 0, 0, 571, 601, 0, 0,
1281 0, 0, 0, 0, 184, 0, 569, 570, 567, 568,
1282 562, 0, 0, 109, 222, 0, 0, 0, 2, 4,
1283 14, 15, 23, 16, 10, 17, 5, 0, 0, 6,
1284 0, 7, 0, 0, 0, 0, 226, 485, 0, 492,
1285 475, 490, 476, 487, 0, 0, 572, 565, 488, 479,
1286 616, 616, 13, 19, 22, 31, 23, 29, 0, 440,
1287 0, 0, 438, 342, 85, 480, 0, 36, 0, 0,
1288 74, 92, 57, 0, 0, 0, 0, 104, 0, 0,
1289 0, 485, 0, 602, 603, 0, 0, 200, 199, 197,
1290 194, 202, 203, 216, 211, 198, 219, 218, 221, 208,
1291 201, 196, 213, 214, 195, 217, 209, 210, 220, 205,
1292 215, 207, 204, 212, 206, 56, 40, 342, 0, 0,
1293 186, 182, 0, 0, 0, 0, 0, 1, 3, 18,
1294 33, 34, 32, 0, 566, 184, 0, 0, 8, 233,
1295 246, 0, 229, 230, 0, 228, 237, 240, 243, 486,
1296 0, 9, 474, 0, 543, 549, 572, 0, 0, 564,
1297 563, 561, 0, 574, 510, 617, 618, 0, 0, 20,
1298 23, 30, 458, 442, 445, 448, 441, 343, 0, 330,
1299 84, 331, 86, 59, 338, 478, 145, 139, 50, 0,
1300 0, 535, 37, 0, 75, 93, 0, 51, 67, 53,
1301 71, 105, 156, 157, 390, 0, 48, 391, 133, 129,
1302 130, 136, 49, 124, 123, 126, 0, 134, 225, 155,
1303 154, 54, 605, 0, 607, 70, 69, 68, 55, 166,
1304 160, 0, 52, 171, 170, 62, 0, 0, 183, 181,
1305 172, 173, 0, 176, 0, 178, 64, 66, 63, 162,
1306 164, 0, 118, 115, 119, 120, 121, 114, 117, 116,
1307 47, 110, 113, 186, 223, 27, 0, 245, 242, 256,
1308 231, 0, 235, 239, 0, 0, 250, 241, 11, 0,
1309 342, 0, 503, 504, 0, 0, 0, 497, 494, 493,
1310 496, 0, 0, 0, 439, 489, 586, 558, 582, 588,
1311 0, 575, 439, 0, 613, 612, 21, 430, 458, 326,
1312 436, 0, 458, 462, 0, 466, 0, 0, 444, 0,
1313 437, 42, 332, 483, 481, 0, 140, 144, 143, 35,
1314 540, 537, 538, 0, 81, 87, 76, 78, 77, 97,
1315 45, 94, 58, 72, 73, 43, 97, 46, 106, 0,
1316 60, 395, 396, 397, 398, 399, 174, 174, 392, 0,
1317 122, 138, 127, 0, 0, 606, 0, 0, 604, 41,
1318 168, 342, 61, 159, 0, 485, 188, 179, 0, 177,
1319 165, 39, 163, 0, 0, 0, 247, 0, 256, 252,
1320 276, 257, 258, 254, 256, 0, 234, 232, 238, 244,
1321 0, 0, 248, 418, 419, 420, 421, 417, 422, 423,
1322 416, 424, 495, 0, 502, 184, 0, 0, 0, 491,
1323 0, 557, 0, 0, 0, 585, 583, 0, 590, 573,
1324 0, 522, 521, 0, 541, 0, 518, 514, 0, 512,
1325 523, 0, 458, 327, 468, 0, 0, 459, 470, 463,
1326 464, 446, 447, 443, 0, 339, 336, 484, 0, 0,
1327 147, 150, 536, 539, 38, 0, 91, 90, 44, 0,
1328 0, 99, 0, 108, 0, 158, 175, 141, 142, 125,
1329 0, 132, 135, 131, 0, 600, 608, 169, 167, 0,
1330 187, 0, 189, 65, 111, 112, 485, 261, 262, 263,
1331 0, 253, 276, 362, 326, 269, 259, 256, 236, 251,
1332 250, 341, 182, 500, 499, 498, 0, 0, 576, 0,
1333 0, 591, 592, 593, 576, 524, 0, 511, 520, 0,
1334 431, 0, 469, 465, 452, 456, 0, 451, 453, 472,
1335 471, 449, 337, 333, 83, 335, 482, 146, 148, 152,
1336 151, 0, 88, 89, 80, 79, 98, 0, 96, 95,
1337 107, 128, 610, 0, 609, 161, 180, 190, 0, 0,
1338 0, 0, 264, 0, 277, 296, 345, 356, 0, 344,
1339 359, 268, 432, 249, 572, 546, 0, 0, 560, 0,
1340 0, 0, 0, 559, 0, 531, 526, 534, 0, 519,
1341 517, 516, 515, 513, 434, 0, 455, 0, 0, 0,
1342 0, 153, 393, 82, 101, 103, 611, 191, 0, 0,
1343 0, 260, 276, 0, 305, 317, 318, 320, 319, 0,
1344 342, 321, 322, 0, 0, 294, 0, 278, 279, 283,
1345 285, 284, 340, 282, 306, 328, 324, 325, 0, 306,
1346 342, 0, 297, 298, 300, 346, 0, 0, 0, 306,
1347 349, 408, 347, 355, 409, 361, 370, 365, 366, 0,
1348 0, 369, 372, 373, 374, 371, 368, 358, 362, 356,
1349 364, 388, 433, 0, 0, 184, 542, 0, 342, 548,
1350 0, 580, 577, 587, 589, 596, 594, 584, 509, 525,
1351 0, 0, 467, 457, 0, 454, 450, 338, 403, 405,
1352 400, 149, 394, 401, 402, 0, 0, 267, 266, 265,
1353 270, 415, 0, 288, 0, 290, 289, 292, 291, 287,
1354 0, 295, 0, 272, 304, 307, 0, 323, 302, 303,
1355 0, 255, 0, 357, 351, 354, 353, 393, 350, 410,
1356 393, 0, 411, 412, 367, 0, 0, 363, 0, 393,
1357 389, 376, 152, 391, 426, 507, 508, 506, 505, 576,
1358 186, 550, 552, 0, 551, 554, 580, 581, 578, 598,
1359 595, 0, 532, 529, 528, 530, 527, 435, 473, 334,
1360 404, 406, 102, 100, 314, 313, 316, 315, 312, 281,
1361 308, 310, 311, 286, 293, 280, 0, 274, 0, 301,
1362 299, 352, 414, 306, 413, 375, 360, 379, 0, 0,
1363 0, 388, 0, 393, 0, 388, 427, 429, 428, 434,
1364 501, 0, 0, 556, 342, 579, 0, 597, 533, 0,
1365 0, 271, 329, 407, 393, 388, 0, 383, 382, 0,
1366 388, 387, 0, 385, 0, 547, 553, 555, 599, 309,
1367 273, 277, 377, 378, 388, 0, 380, 386, 425, 0,
1371 /* YYDEFGOTO[NTERM-NUM]. */
1372 static const short yydefgoto[] =
1374 -1, 57, 58, 59, 60, 93, 94, 61, 62, 63,
1375 64, 65, 180, 316, 231, 66, 172, 67, 269, 236,
1376 268, 385, 234, 375, 376, 377, 505, 378, 223, 508,
1377 235, 380, 381, 511, 598, 756, 654, 241, 387, 388,
1378 68, 300, 301, 302, 252, 253, 399, 254, 520, 255,
1379 256, 257, 400, 368, 246, 228, 499, 500, 589, 652,
1380 261, 243, 390, 270, 412, 290, 421, 409, 528, 275,
1381 282, 517, 286, 418, 69, 160, 279, 161, 277, 415,
1382 71, 72, 155, 800, 74, 75, 181, 182, 183, 184,
1383 437, 311, 185, 314, 186, 309, 187, 188, 307, 317,
1384 442, 428, 429, 430, 431, 432, 540, 611, 612, 543,
1385 544, 847, 881, 545, 676, 677, 678, 769, 770, 691,
1386 692, 693, 762, 774, 839, 840, 841, 842, 679, 775,
1387 694, 484, 777, 224, 496, 583, 650, 584, 362, 681,
1388 682, 813, 615, 616, 617, 618, 783, 695, 619, 717,
1389 718, 620, 719, 720, 801, 721, 397, 751, 398, 752,
1390 753, 754, 703, 704, 791, 792, 793, 683, 474, 433,
1391 869, 348, 571, 723, 742, 76, 100, 101, 102, 215,
1392 216, 358, 360, 649, 576, 577, 578, 646, 349, 350,
1393 351, 352, 353, 354, 355, 573, 487, 488, 77, 105,
1394 225, 364, 498, 190, 78, 79, 197, 192, 329, 330,
1395 455, 809, 461, 343, 475, 476, 643, 567, 477, 478,
1396 479, 634, 635, 826, 739, 822, 636, 336, 502, 371,
1397 481, 80, 332, 81, 726, 82, 333, 729, 811, 814,
1398 815, 462, 83, 84, 85, 201, 86, 87, 203, 342,
1399 628, 732, 818, 337, 338, 339, 465, 468, 563, 632,
1400 736, 820, 877, 88, 125, 263, 264, 408, 525, 89,
1404 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1406 #define YYPACT_NINF -693
1407 static const short yypact[] =
1409 997, 49, -693, 101, 101, -693, -693, -693, 43, 116,
1410 -693, -693, 143, -693, -693, -693, -693, 158, -693, -693,
1411 199, 215, 254, 284, 296, 315, 372, 401, 410, 419,
1412 421, 422, 424, 426, 101, 427, -693, 244, 431, 732,
1413 432, 433, 435, 436, 236, 438, -693, -693, -693, -693,
1414 -693, 439, 440, -693, -693, 441, 443, 847, -693, -693,
1415 -693, -693, -693, -693, -693, -693, -693, 378, 445, -693,
1416 123, -693, 324, 26, 384, 309, -693, 446, 447, -693,
1417 -693, 69, -693, -693, 451, 245, 414, -693, -693, -693,
1418 32, 32, -693, -693, -693, -693, -693, -693, 101, -693,
1419 454, 278, -693, 449, 210, -693, 41, 190, 182, 182,
1420 -693, -693, -693, 381, 314, 383, 101, -693, 101, 70,
1421 51, 446, 225, -693, -693, 101, 57, -693, -693, -693,
1422 -693, -693, -693, -693, -693, -693, -693, -693, -693, -693,
1423 -693, -693, -693, -693, -693, -693, -693, -693, -693, -693,
1424 -693, -693, -693, -693, -693, -693, -693, 449, 405, 44,
1425 430, 393, 295, 94, 344, 333, 29, -693, -693, -693,
1426 -693, -693, -693, 371, -693, 236, 335, 68, -693, -693,
1427 464, 489, 490, -693, 101, 467, -693, 353, -693, -693,
1428 494, -693, 114, 456, -693, -693, 414, 462, 182, -693,
1429 467, -693, 101, 390, -693, -693, -693, 314, 314, -693,
1430 -693, -693, 28, -693, 124, 502, -693, -693, 182, -693,
1431 -693, -693, -693, -693, -693, 448, 473, 15, -693, 101,
1432 511, 493, -693, 507, 207, 101, 210, -693, 504, -693,
1433 293, 101, -693, 512, -693, 492, -693, 492, -693, -693,
1434 -693, -693, -693, 332, 515, -693, 50, -693, -693, -693,
1435 -693, -693, 101, 520, 479, -693, -693, -693, -693, 101,
1436 525, 101, -693, -693, -693, -693, 101, 314, -693, -693,
1437 -693, -693, 425, -693, 411, -693, -693, -693, -693, -693,
1438 395, 101, -693, -693, -693, -693, -693, -693, -693, -693,
1439 56, -693, -693, 430, -693, -693, 101, -693, -693, 21,
1440 -693, 358, 467, -693, 101, 101, 338, -693, -693, 575,
1441 449, 314, -693, -693, 544, 549, 551, -693, -693, -693,
1442 -693, 519, 521, 521, 43, -693, 522, 182, -693, 552,
1443 526, -693, 43, 514, 504, 504, -693, -693, 553, 210,
1444 -693, 24, 31, -693, 561, -693, 101, 101, -693, 101,
1445 562, -693, 545, 565, -693, 550, -693, -693, -693, -693,
1446 -693, -693, 511, 182, -693, 377, 572, -693, -693, 567,
1447 581, -693, -693, -693, -693, -693, 567, 587, -693, 101,
1448 -693, -693, -693, -693, -693, -693, 484, 484, -693, 51,
1449 -693, -693, -693, 85, 101, -693, 182, 101, -693, -693,
1450 503, 449, -693, -693, 566, 446, 26, -693, 101, -693,
1451 -693, -693, -693, 371, 371, 314, -693, 374, 25, -693,
1452 597, 465, -693, -693, 21, 101, -693, -693, -693, -693,
1453 101, 101, -693, -693, -693, -693, -693, -693, -693, -693,
1454 -693, -693, -693, 182, 504, 236, 101, 314, 101, -693,
1455 558, -693, 560, 278, 598, -693, -693, 386, -5, -693,
1456 278, -693, -693, 182, -693, 606, -693, -693, 103, -693,
1457 -693, 594, 397, -693, 591, 73, 234, 24, -693, -693,
1458 -693, -693, -693, -693, 604, -693, 289, -693, 182, 253,
1459 -693, 492, -693, -693, -693, 207, 595, 599, -693, 207,
1460 101, 583, 101, -693, 101, -693, -693, -693, -693, 515,
1461 51, -693, -693, -693, 618, 182, 101, -693, -693, 101,
1462 -693, 620, 26, -693, -693, -693, 286, -693, -693, -693,
1463 33, -693, 610, 80, 210, -693, -693, 17, 467, -693,
1464 619, -693, 393, -693, 504, -693, 521, 521, 52, 101,
1465 182, -693, 504, 508, 52, -693, 559, 386, -693, 336,
1466 -693, 101, -693, -693, -693, 615, 621, 622, -693, -693,
1467 -693, -693, -693, -693, -693, -693, -693, -693, -693, 505,
1468 -693, 61, -693, -693, -693, -693, -693, 314, -693, -693,
1469 -693, -693, -693, 627, -693, -693, -693, 504, 628, 629,
1470 632, 22, -693, 633, 138, 273, -693, -693, 91, -693,
1471 307, -693, 623, -693, 414, 630, 276, 198, -693, 608,
1472 635, 182, 644, -693, 612, -693, -693, -693, 631, -693,
1473 -693, -693, -693, -693, 645, 101, -693, 314, 101, 278,
1474 100, -693, 227, -693, 647, 504, -693, -693, 101, 570,
1475 33, -693, -693, 575, -693, -693, -693, -693, -693, 314,
1476 449, -693, -693, 101, 182, 398, 375, -693, -693, -693,
1477 -693, -693, -693, -693, 318, 638, -693, -693, 101, 318,
1478 449, 652, 650, -693, -693, 91, 575, 314, 37, 318,
1479 -693, -693, -693, -693, 19, -693, -693, -693, -693, 634,
1480 550, -693, -693, -693, -693, -693, -693, -693, -693, -693,
1481 -693, 48, -693, 101, 162, 236, -693, 521, 449, -693,
1482 101, 527, -693, -693, -693, 637, -693, -693, -693, 386,
1483 312, 210, -693, -693, 308, -693, 502, -693, -693, -693,
1484 -693, -693, -693, 649, 651, 314, 625, -693, -693, -693,
1485 -693, -693, 71, 504, 101, -693, -693, 193, 195, -693,
1486 182, -693, 138, 636, -693, -693, 668, -693, -693, -693,
1487 182, -693, 273, -693, -693, 504, -693, 227, -693, -693,
1488 227, 554, 550, -693, -693, 639, 258, 91, 542, 237,
1489 504, -693, 14, 450, 36, -693, -693, -693, 504, 605,
1490 430, 617, -693, 182, 664, -693, 527, -693, -693, 660,
1491 -693, 182, -693, -693, -693, -693, -693, -693, -693, 545,
1492 -693, -693, -693, -693, -693, -693, -693, -693, 504, 671,
1493 -693, -693, -693, -693, -693, -693, 653, -693, 665, -693,
1494 -693, -693, -693, 318, -693, -693, -693, -693, 643, 646,
1495 227, 314, 550, 252, 461, 314, -693, -693, -693, 645,
1496 -693, 314, 521, -693, 449, -693, 182, -693, -693, 71,
1497 663, 674, -693, -693, 227, 314, 648, -693, -693, 227,
1498 314, -693, 654, -693, 683, 504, -693, -693, -693, -693,
1499 -693, 138, -693, -693, 314, 655, -693, -693, -693, 382,
1500 -693, 314, -693, -693
1503 /* YYPGOTO[NTERM-NUM]. */
1504 static const short yypgoto[] =
1506 -693, -693, 640, -693, -693, -53, 641, -693, -693, -693,
1507 -693, -693, 16, -83, -3, -693, -693, -693, -693, -693,
1508 -693, -693, -693, -693, 189, 186, -693, -98, -693, -693,
1509 -693, -693, 184, 316, -693, -693, -55, -693, -693, 191,
1510 -693, -693, 3, -693, -693, -693, -693, 305, -693, 187,
1511 -693, 303, -693, -693, -693, -693, -693, 209, -693, -93,
1512 457, -693, -693, -693, -693, -693, -693, -693, -693, -693,
1513 -693, 317, -693, -693, -693, -168, 159, 9, -298, -693,
1514 -693, -693, -693, 4, -693, -693, -693, -693, 530, -693,
1515 -693, -693, -64, -693, 399, -693, -693, 400, -693, -244,
1516 166, 283, -370, -693, -693, 288, -693, -693, 63, -693,
1517 -693, -693, -693, -503, -180, -693, -48, -693, -693, -693,
1518 -693, -57, -693, -659, -693, -153, -693, -693, -693, -587,
1519 -693, 185, -693, 81, -693, -693, -693, -693, -15, -693,
1520 541, -95, -693, -693, -693, -693, 117, 18, -693, -693,
1521 -693, 23, -693, 30, -591, -116, -69, -599, -243, -692,
1522 -693, -693, -693, -693, -693, -693, -56, -693, -303, -693,
1523 -693, -286, 192, -693, -127, -693, -693, -693, -13, -435,
1524 385, -693, -693, -693, -693, -693, 95, -693, -693, -693,
1525 -693, 402, -304, -693, -693, -693, -693, 260, -693, -693,
1526 -693, -693, -693, -111, -693, -693, -693, -693, -693, -693,
1527 -693, -693, -77, -693, -693, -693, -693, -693, 178, -441,
1528 271, -693, -693, -693, -693, -693, -70, -91, -693, 380,
1529 188, -693, -693, -693, -693, -693, -693, -693, -693, -693,
1530 -121, -535, -693, -693, -693, -693, -693, -693, -185, -693,
1531 -540, -693, -61, -693, 420, -693, -693, -693, -693, -693,
1532 -693, -693, -693, -693, -693, -693, -693, -693, -693, -693,
1536 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1537 positive, shift that token. If negative, reduce the rule which
1538 number is the opposite. If zero, do what YYDEFACT says.
1539 If YYTABLE_NINF, parse error. */
1540 #define YYTABLE_NINF -545
1541 static const short yytable[] =
1543 97, 97, 396, 247, 73, 425, 222, 303, 218, 70,
1544 258, 334, 229, 206, 206, 210, 452, 232, 233, 96,
1545 98, 200, 626, 434, 633, 410, 560, 680, 558, 803,
1546 779, 121, 660, 347, 570, 564, -224, 347, 485, 614,
1547 788, 347, -460, 209, 347, -461, 176, 347, 489, 95,
1548 291, 273, 366, 244, 561, 585, 95, 862, 541, 95,
1549 92, 73, 271, 244, 99, 359, 70, 748, 749, 423,
1550 403, 244, 97, 866, 509, 204, 867, 177, 95, 305,
1551 248, 95, 97, 391, 392, 393, 394, 395, 176, -348,
1552 834, 798, 424, 95, 265, 211, 205, 266, 214, 835,
1553 696, 221, 609, 227, 244, 653, 859, 574, 95, 95,
1554 610, 95, 193, 240, 521, 242, 245, 251, 238, 786,
1555 312, 627, 97, 319, 836, 103, 194, 361, -348, 219,
1556 195, 230, 404, -348, -348, -348, 249, 250, 382, 697,
1557 54, 262, 434, 356, 698, 699, 700, 663, 434, 651,
1558 868, 283, 104, 274, 267, 789, 320, 346, 367, 760,
1559 357, 664, 665, 666, 667, 668, 427, 106, 886, 54,
1560 427, 54, 661, -460, 427, 226, -461, 541, 489, 405,
1561 320, 97, 289, 799, 211, 680, 669, 473, 851, 196,
1562 95, 852, 812, 54, 883, 837, 549, 905, -342, 340,
1563 861, -522, -348, -521, 174, 284, 95, 670, 107, 217,
1564 230, 344, 345, 701, 746, 95, 54, 730, 95, 321,
1565 322, -522, 285, -521, 108, 453, 369, 323, 324, 325,
1566 326, 221, 379, 221, 771, 95, 219, 220, 386, 219,
1567 220, 671, 672, 327, 579, 95, 748, 749, 673, 501,
1568 374, 483, 480, 95, 176, 460, 748, 749, 590, 211,
1569 95, 434, 259, 109, 890, 260, 211, 199, 413, 870,
1570 887, 748, 749, 414, 893, 674, 805, 806, 807, 856,
1571 860, 416, 504, 706, 675, 902, 95, 244, 422, 707,
1572 708, 709, 244, 110, 903, 889, 189, 587, 821, 906,
1573 213, 710, 18, 97, 531, 111, 176, 54, 471, 472,
1574 711, 97, 97, 910, 680, 524, 529, 95, 828, 582,
1575 913, 463, 426, 179, 112, 454, 712, 383, 176, 470,
1576 705, 713, 706, 384, 727, 684, 728, 896, 707, 708,
1577 709, 244, -137, -137, 823, 714, 221, 123, 124, 824,
1578 710, 440, 825, 491, 492, 486, 214, 441, 550, 711,
1579 761, 95, 551, 685, 686, 687, 315, 715, 435, 259,
1580 640, 548, 260, 436, 641, 712, 642, 537, 538, 539,
1581 713, 113, 565, 501, 688, 772, 515, 480, 170, 171,
1582 773, 175, 772, 784, 714, 178, 251, 912, 280, 281,
1583 251, 523, 716, 689, 97, 471, 472, 586, 506, 507,
1584 114, 595, 292, 347, 570, 533, 715, 767, 768, 115,
1585 532, 671, 672, 526, 690, 608, 534, 535, 116, 536,
1586 117, 118, 97, 119, 603, 120, 122, 211, 211, 724,
1587 126, 156, 157, 604, 158, 159, 483, 162, 163, 164,
1588 165, 716, 166, 553, 173, 555, 189, 202, 191, 54,
1589 214, 554, 237, 198, 552, 293, 212, 214, 217, 630,
1590 239, 272, 562, 276, 278, 637, 294, 287, 802, 625,
1591 304, 288, 575, 306, 295, 391, 392, 393, 394, 395,
1592 296, 486, 297, 864, 298, 244, 391, 392, 393, 394,
1593 395, 308, 221, 313, 179, 318, 221, 596, 331, 379,
1594 299, 386, 871, 341, 335, 359, 365, 251, 363, 370,
1595 373, 372, 95, 211, 176, 389, 605, 391, 392, 393,
1596 394, 395, 406, 471, 472, 402, 607, 407, 411, 419,
1597 735, 221, 230, 417, 443, 444, 445, 446, 447, 420,
1598 95, 448, 449, 456, 450, 858, 629, 810, 457, 451,
1599 458, 748, 749, 459, 204, 464, 467, 95, 644, 347,
1600 469, 490, 494, 495, 497, 764, 244, 391, 392, 393,
1601 394, 395, 787, 766, 244, 509, 510, 230, 790, 443,
1602 444, 445, 446, 447, 512, 780, 448, 449, 473, 450,
1603 514, 655, 516, 527, 451, 443, 444, 445, 446, 447,
1604 530, 542, 448, 449, 427, 450, 556, 559, 557, 566,
1605 451, 892, 569, 572, 731, 581, 597, 592, 602, 613,
1606 593, 606, 440, 631, 645, 648, 647, 656, 658, 657,
1607 651, 659, 743, 827, 722, 575, 214, 221, 662, 750,
1608 734, 744, 733, 725, 737, 757, 738, 758, 741, 740,
1609 755, 776, 781, 782, 846, 817, 794, 819, 830, 833,
1610 765, 831, 848, 763, 627, 872, 790, 874, 853, 844,
1611 876, 880, 857, 855, 879, 778, 882, 884, 901, 849,
1612 885, 900, 904, 908, 591, 594, 599, 168, 907, 911,
1613 832, 785, 513, 169, 519, 600, 522, 601, 588, 863,
1614 401, 624, 310, 438, 518, 439, 623, 547, 750, 546,
1615 804, 909, 873, 759, 845, 850, 899, 816, 808, 621,
1616 637, 747, 829, 328, 865, 702, 854, 797, 221, 622,
1617 795, 796, 894, 745, 493, 639, 888, 580, 891, 568,
1618 482, 878, 503, 897, 638, 875, 0, 466, 208, 655,
1619 0, 843, 0, 0, 0, 0, 838, 0, 0, 0,
1620 0, 0, 0, 0, 127, 0, 0, 0, 0, 0,
1621 0, 128, 0, 0, 750, 898, 0, 750, 0, 0,
1622 0, 0, 0, 0, 0, 750, 750, 129, 0, 0,
1623 0, 130, 131, 132, 133, 134, 135, 136, 137, 138,
1624 139, 140, 141, 0, 0, 142, 143, 0, 0, 0,
1625 0, 144, 0, 0, 0, 0, 0, 0, 145, 0,
1626 0, 146, 0, 147, 0, 0, 0, 0, 0, 148,
1627 149, 0, 0, 0, 0, 0, 0, 167, 1, 150,
1628 2, 3, 4, 5, 6, -227, 0, 750, 7, 151,
1629 750, -227, 0, 152, 0, 0, 0, 0, 0, 0,
1630 0, 0, 153, 0, 0, 895, 0, 0, 0, 154,
1631 0, 750, 0, 838, 0, 0, 750, 0, 8, 9,
1632 -544, 0, 0, 10, 11, 0, 12, 13, 14, -544,
1633 0, 0, 0, 15, -544, 0, 0, 0, -544, 0,
1634 16, 0, 17, 18, -192, 19, 20, 21, 22, 23,
1635 24, 25, 26, 27, 28, 29, 30, 31, -184, 0,
1636 32, 33, 0, 0, 0, 34, 35, 0, 0, 0,
1637 0, 36, 37, 38, 0, 39, 40, 0, 41, 0,
1638 0, 0, 0, 0, 42, 43, 0, 0, 0, 44,
1639 0, 0, 0, 0, 45, 0, 46, -544, 47, 48,
1640 0, 49, 0, 50, 51, 0, 0, 0, 52, 0,
1641 0, 0, 0, 0, 0, 0, 0, 53, 0, 0,
1642 0, 0, 54, 0, 55, 0, 0, 0, 1, 56,
1643 2, 3, 4, 5, 6, -227, 0, 0, 7, 0,
1644 0, -227, 0, 0, 0, 0, 0, 0, 0, 0,
1645 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1646 0, 0, 0, 0, 0, 0, 0, 0, 8, 9,
1647 -544, 0, 0, 10, 11, 0, 12, 13, 14, -544,
1648 0, 0, 0, 15, -544, 0, 0, 0, -544, 0,
1649 16, 0, 17, 18, -192, 19, 20, 21, 22, 23,
1650 24, 25, 26, 27, 28, 29, 30, 31, -184, 0,
1651 32, 33, 0, 0, 0, 34, 35, 0, 0, 0,
1652 0, 36, 37, 38, 0, 39, 40, 0, 41, 0,
1653 0, 0, 0, 0, 42, 43, 0, 0, 0, 44,
1654 0, 0, 0, 0, 45, 0, 46, -544, 47, 48,
1655 0, 49, 0, 50, 51, 0, 0, 0, 52, 0,
1656 0, 0, 0, 0, 0, 0, 0, 53, 0, 0,
1657 0, 0, 54, 0, 55, 0, 0, 0, 0, 56
1660 static const short yycheck[] =
1662 3, 4, 245, 119, 0, 303, 104, 175, 103, 0,
1663 121, 196, 107, 90, 91, 98, 319, 108, 109, 3,
1664 4, 85, 557, 309, 564, 269, 467, 614, 463, 721,
1665 689, 34, 10, 16, 17, 470, 11, 16, 14, 542,
1666 699, 16, 14, 96, 16, 14, 20, 16, 352, 8,
1667 166, 7, 37, 34, 59, 496, 8, 43, 428, 8,
1668 11, 57, 157, 34, 21, 13, 57, 19, 20, 13,
1669 20, 34, 75, 37, 13, 43, 40, 73, 8, 11,
1670 29, 8, 85, 35, 36, 37, 38, 39, 20, 9,
1671 19, 43, 36, 8, 37, 98, 64, 40, 101, 28,
1672 9, 104, 69, 106, 34, 44, 798, 34, 8, 8,
1673 77, 8, 43, 116, 29, 118, 119, 120, 114, 82,
1674 184, 69, 125, 9, 53, 9, 57, 218, 48, 29,
1675 61, 28, 82, 53, 54, 55, 85, 86, 236, 48,
1676 145, 125, 428, 19, 53, 54, 55, 9, 434, 135,
1677 114, 57, 9, 109, 97, 136, 42, 210, 143, 662,
1678 36, 23, 24, 25, 26, 27, 149, 9, 860, 145,
1679 149, 145, 150, 145, 149, 134, 145, 547, 482, 262,
1680 42, 184, 153, 135, 187, 772, 48, 84, 787, 120,
1681 8, 790, 727, 145, 853, 124, 440, 889, 8, 202,
1682 799, 8, 122, 8, 81, 111, 8, 69, 9, 19,
1683 28, 207, 208, 122, 649, 8, 145, 19, 8, 105,
1684 106, 28, 128, 28, 9, 320, 229, 113, 114, 115,
1685 116, 234, 235, 236, 675, 8, 29, 30, 241, 29,
1686 30, 103, 104, 129, 10, 8, 19, 20, 110, 365,
1687 43, 349, 343, 8, 20, 332, 19, 20, 501, 262,
1688 8, 547, 37, 9, 863, 40, 269, 22, 271, 809,
1689 861, 19, 20, 276, 865, 137, 114, 115, 116, 21,
1690 43, 277, 373, 25, 146, 884, 8, 34, 291, 31,
1691 32, 33, 34, 9, 885, 43, 10, 44, 739, 890,
1692 22, 43, 66, 306, 415, 9, 20, 145, 19, 20,
1693 52, 314, 315, 904, 901, 406, 411, 8, 10, 30,
1694 911, 334, 306, 14, 9, 321, 68, 34, 20, 342,
1695 23, 73, 25, 40, 58, 62, 60, 872, 31, 32,
1696 33, 34, 10, 11, 32, 87, 349, 103, 104, 37,
1697 43, 13, 40, 356, 357, 351, 359, 19, 441, 52,
1698 663, 8, 453, 90, 91, 92, 13, 109, 10, 37,
1699 34, 435, 40, 15, 38, 68, 40, 3, 4, 5,
1700 73, 9, 473, 499, 111, 10, 389, 478, 10, 11,
1701 15, 67, 10, 696, 87, 11, 399, 15, 103, 104,
1702 403, 404, 144, 130, 407, 19, 20, 498, 31, 32,
1703 9, 509, 41, 16, 17, 418, 109, 19, 20, 9,
1704 416, 103, 104, 407, 151, 536, 423, 424, 9, 425,
1705 9, 9, 435, 9, 525, 9, 9, 440, 441, 624,
1706 9, 9, 9, 526, 9, 9, 544, 9, 9, 9,
1707 9, 144, 9, 456, 9, 458, 10, 43, 11, 145,
1708 463, 457, 81, 12, 455, 94, 12, 470, 19, 560,
1709 87, 66, 468, 43, 81, 566, 105, 133, 721, 556,
1710 145, 148, 485, 19, 113, 35, 36, 37, 38, 39,
1711 119, 487, 121, 43, 123, 34, 35, 36, 37, 38,
1712 39, 12, 505, 36, 14, 11, 509, 510, 52, 512,
1713 139, 514, 810, 123, 52, 13, 43, 520, 70, 8,
1714 13, 28, 8, 526, 20, 13, 529, 35, 36, 37,
1715 38, 39, 12, 19, 20, 20, 532, 58, 13, 128,
1716 631, 544, 28, 118, 30, 31, 32, 33, 34, 154,
1717 8, 37, 38, 9, 40, 798, 559, 725, 9, 45,
1718 9, 19, 20, 44, 43, 43, 14, 8, 571, 16,
1719 44, 10, 10, 28, 9, 670, 34, 35, 36, 37,
1720 38, 39, 698, 674, 34, 13, 19, 28, 704, 30,
1721 31, 32, 33, 34, 13, 690, 37, 38, 84, 40,
1722 13, 597, 118, 100, 45, 30, 31, 32, 33, 34,
1723 44, 14, 37, 38, 149, 40, 58, 19, 58, 13,
1724 45, 864, 28, 32, 627, 21, 43, 32, 10, 19,
1725 31, 11, 13, 125, 19, 13, 15, 10, 9, 11,
1726 135, 9, 645, 741, 21, 648, 649, 650, 15, 652,
1727 15, 647, 44, 23, 10, 658, 44, 87, 13, 28,
1728 13, 23, 10, 13, 28, 138, 32, 30, 19, 44,
1729 673, 20, 4, 669, 69, 58, 792, 13, 124, 770,
1730 20, 28, 798, 44, 13, 688, 21, 44, 14, 780,
1731 44, 28, 44, 10, 505, 509, 512, 57, 44, 44,
1732 755, 697, 386, 62, 399, 514, 403, 520, 499, 802,
1733 253, 552, 182, 314, 397, 315, 550, 434, 721, 431,
1734 723, 901, 813, 660, 772, 782, 879, 730, 724, 544,
1735 821, 650, 747, 192, 803, 618, 792, 719, 741, 547,
1736 710, 718, 869, 648, 359, 567, 862, 487, 864, 478,
1737 348, 821, 372, 874, 566, 816, -1, 337, 91, 755,
1738 -1, 764, -1, -1, -1, -1, 762, -1, -1, -1,
1739 -1, -1, -1, -1, 42, -1, -1, -1, -1, -1,
1740 -1, 49, -1, -1, 787, 876, -1, 790, -1, -1,
1741 -1, -1, -1, -1, -1, 798, 799, 65, -1, -1,
1742 -1, 69, 70, 71, 72, 73, 74, 75, 76, 77,
1743 78, 79, 80, -1, -1, 83, 84, -1, -1, -1,
1744 -1, 89, -1, -1, -1, -1, -1, -1, 96, -1,
1745 -1, 99, -1, 101, -1, -1, -1, -1, -1, 107,
1746 108, -1, -1, -1, -1, -1, -1, 0, 1, 117,
1747 3, 4, 5, 6, 7, 8, -1, 860, 11, 127,
1748 863, 14, -1, 131, -1, -1, -1, -1, -1, -1,
1749 -1, -1, 140, -1, -1, 871, -1, -1, -1, 147,
1750 -1, 884, -1, 879, -1, -1, 889, -1, 41, 42,
1751 43, -1, -1, 46, 47, -1, 49, 50, 51, 52,
1752 -1, -1, -1, 56, 57, -1, -1, -1, 61, -1,
1753 63, -1, 65, 66, 67, 68, 69, 70, 71, 72,
1754 73, 74, 75, 76, 77, 78, 79, 80, 81, -1,
1755 83, 84, -1, -1, -1, 88, 89, -1, -1, -1,
1756 -1, 94, 95, 96, -1, 98, 99, -1, 101, -1,
1757 -1, -1, -1, -1, 107, 108, -1, -1, -1, 112,
1758 -1, -1, -1, -1, 117, -1, 119, 120, 121, 122,
1759 -1, 124, -1, 126, 127, -1, -1, -1, 131, -1,
1760 -1, -1, -1, -1, -1, -1, -1, 140, -1, -1,
1761 -1, -1, 145, -1, 147, -1, -1, -1, 1, 152,
1762 3, 4, 5, 6, 7, 8, -1, -1, 11, -1,
1763 -1, 14, -1, -1, -1, -1, -1, -1, -1, -1,
1764 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1765 -1, -1, -1, -1, -1, -1, -1, -1, 41, 42,
1766 43, -1, -1, 46, 47, -1, 49, 50, 51, 52,
1767 -1, -1, -1, 56, 57, -1, -1, -1, 61, -1,
1768 63, -1, 65, 66, 67, 68, 69, 70, 71, 72,
1769 73, 74, 75, 76, 77, 78, 79, 80, 81, -1,
1770 83, 84, -1, -1, -1, 88, 89, -1, -1, -1,
1771 -1, 94, 95, 96, -1, 98, 99, -1, 101, -1,
1772 -1, -1, -1, -1, 107, 108, -1, -1, -1, 112,
1773 -1, -1, -1, -1, 117, -1, 119, 120, 121, 122,
1774 -1, 124, -1, 126, 127, -1, -1, -1, 131, -1,
1775 -1, -1, -1, -1, -1, -1, -1, 140, -1, -1,
1776 -1, -1, 145, -1, 147, -1, -1, -1, -1, 152
1779 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1780 symbol of state STATE-NUM. */
1781 static const unsigned short yystos[] =
1783 0, 1, 3, 4, 5, 6, 7, 11, 41, 42,
1784 46, 47, 49, 50, 51, 56, 63, 65, 66, 68,
1785 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
1786 79, 80, 83, 84, 88, 89, 94, 95, 96, 98,
1787 99, 101, 107, 108, 112, 117, 119, 121, 122, 124,
1788 126, 127, 131, 140, 145, 147, 152, 156, 157, 158,
1789 159, 162, 163, 164, 165, 166, 170, 172, 195, 229,
1790 232, 235, 236, 238, 239, 240, 330, 353, 359, 360,
1791 386, 388, 390, 397, 398, 399, 401, 402, 418, 424,
1792 425, 426, 11, 160, 161, 8, 167, 169, 167, 21,
1793 331, 332, 333, 9, 9, 354, 9, 9, 9, 9,
1794 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
1795 9, 169, 9, 103, 104, 419, 9, 42, 49, 65,
1796 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
1797 79, 80, 83, 84, 89, 96, 99, 101, 107, 108,
1798 117, 127, 131, 140, 147, 237, 9, 9, 9, 9,
1799 230, 232, 9, 9, 9, 9, 9, 0, 157, 161,
1800 10, 11, 171, 9, 81, 67, 20, 238, 11, 14,
1801 167, 241, 242, 243, 244, 247, 249, 251, 252, 10,
1802 358, 11, 362, 43, 57, 61, 120, 361, 12, 22,
1803 247, 400, 43, 403, 43, 64, 367, 427, 427, 160,
1804 168, 169, 12, 22, 169, 334, 335, 19, 296, 29,
1805 30, 169, 182, 183, 288, 355, 134, 169, 210, 296,
1806 28, 169, 382, 382, 177, 185, 174, 81, 238, 87,
1807 169, 192, 169, 216, 34, 169, 209, 310, 29, 85,
1808 86, 169, 199, 200, 202, 204, 205, 206, 358, 37,
1809 40, 215, 167, 420, 421, 37, 40, 97, 175, 173,
1810 218, 296, 66, 7, 109, 224, 43, 233, 81, 231,
1811 103, 104, 225, 57, 111, 128, 227, 133, 148, 153,
1812 220, 310, 41, 94, 105, 113, 119, 121, 123, 139,
1813 196, 197, 198, 230, 145, 11, 19, 253, 12, 250,
1814 243, 246, 247, 36, 248, 13, 168, 254, 11, 9,
1815 42, 105, 106, 113, 114, 115, 116, 129, 295, 363,
1816 364, 52, 387, 391, 403, 52, 382, 408, 409, 410,
1817 169, 123, 404, 368, 238, 238, 160, 16, 326, 343,
1818 344, 345, 346, 347, 348, 349, 19, 36, 336, 13,
1819 337, 382, 293, 70, 356, 43, 37, 143, 208, 169,
1820 8, 384, 28, 13, 43, 178, 179, 180, 182, 169,
1821 186, 187, 182, 34, 40, 176, 169, 193, 194, 13,
1822 217, 35, 36, 37, 38, 39, 313, 311, 313, 201,
1823 207, 215, 20, 20, 82, 168, 12, 58, 422, 222,
1824 254, 13, 219, 169, 169, 234, 238, 118, 228, 128,
1825 154, 221, 169, 13, 36, 233, 167, 149, 256, 257,
1826 258, 259, 260, 324, 326, 10, 15, 245, 249, 252,
1827 13, 19, 255, 30, 31, 32, 33, 34, 37, 38,
1828 40, 45, 323, 296, 238, 365, 9, 9, 9, 44,
1829 367, 367, 396, 333, 43, 411, 409, 14, 412, 44,
1830 333, 19, 20, 84, 323, 369, 370, 373, 374, 375,
1831 382, 385, 346, 182, 286, 14, 238, 351, 352, 347,
1832 10, 169, 169, 335, 10, 28, 289, 9, 357, 211,
1833 212, 310, 383, 384, 382, 181, 31, 32, 184, 13,
1834 19, 188, 13, 188, 13, 169, 118, 226, 226, 202,
1835 203, 29, 206, 169, 382, 423, 167, 100, 223, 296,
1836 44, 358, 238, 169, 197, 197, 238, 3, 4, 5,
1837 261, 257, 14, 264, 265, 268, 260, 256, 247, 254,
1838 168, 382, 232, 169, 238, 169, 58, 58, 334, 19,
1839 374, 59, 238, 413, 334, 382, 13, 372, 375, 28,
1840 17, 327, 32, 350, 34, 169, 339, 340, 341, 10,
1841 352, 21, 30, 290, 292, 374, 382, 44, 212, 213,
1842 313, 179, 32, 31, 180, 182, 169, 43, 189, 187,
1843 194, 204, 10, 382, 168, 169, 11, 238, 358, 69,
1844 77, 262, 263, 19, 268, 297, 298, 299, 300, 303,
1845 306, 286, 327, 255, 231, 367, 396, 69, 405, 169,
1846 382, 125, 414, 405, 376, 377, 381, 382, 385, 373,
1847 34, 38, 40, 371, 169, 19, 342, 15, 13, 338,
1848 291, 135, 214, 44, 191, 238, 10, 11, 9, 9,
1849 10, 150, 15, 9, 23, 24, 25, 26, 27, 48,
1850 69, 103, 104, 110, 137, 146, 269, 270, 271, 283,
1851 284, 294, 295, 322, 62, 90, 91, 92, 111, 130,
1852 151, 274, 275, 276, 285, 302, 9, 48, 53, 54,
1853 55, 122, 301, 317, 318, 23, 25, 31, 32, 33,
1854 43, 52, 68, 73, 87, 109, 144, 304, 305, 307,
1855 308, 310, 21, 328, 403, 23, 389, 58, 60, 392,
1856 19, 169, 406, 44, 15, 382, 415, 10, 44, 379,
1857 28, 13, 329, 169, 238, 341, 334, 288, 19, 20,
1858 169, 312, 314, 315, 316, 13, 190, 169, 87, 263,
1859 268, 323, 277, 238, 296, 169, 382, 19, 20, 272,
1860 273, 374, 10, 15, 278, 284, 23, 287, 169, 278,
1861 296, 10, 13, 301, 323, 238, 82, 310, 278, 136,
1862 310, 319, 320, 321, 32, 308, 306, 302, 43, 135,
1863 238, 309, 313, 314, 169, 114, 115, 116, 238, 366,
1864 230, 393, 396, 296, 394, 395, 169, 138, 407, 30,
1865 416, 374, 380, 32, 37, 40, 378, 182, 10, 293,
1866 19, 20, 191, 44, 19, 28, 53, 124, 238, 279,
1867 280, 281, 282, 169, 382, 271, 28, 266, 4, 382,
1868 276, 312, 312, 124, 321, 44, 21, 310, 313, 314,
1869 43, 312, 43, 214, 43, 311, 37, 40, 114, 325,
1870 405, 233, 58, 382, 13, 407, 20, 417, 381, 13,
1871 28, 267, 21, 278, 44, 44, 314, 309, 310, 43,
1872 312, 310, 313, 309, 329, 238, 396, 395, 382, 280,
1873 28, 14, 312, 309, 44, 314, 309, 44, 10, 269,
1877 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
1878 # define YYSIZE_T __SIZE_TYPE__
1880 #if ! defined (YYSIZE_T) && defined (size_t)
1881 # define YYSIZE_T size_t
1883 #if ! defined (YYSIZE_T)
1884 # if defined (__STDC__) || defined (__cplusplus)
1885 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1886 # define YYSIZE_T size_t
1889 #if ! defined (YYSIZE_T)
1890 # define YYSIZE_T unsigned int
1893 #define yyerrok (yyerrstatus = 0)
1894 #define yyclearin (yychar = YYEMPTY)
1898 #define YYACCEPT goto yyacceptlab
1899 #define YYABORT goto yyabortlab
1900 #define YYERROR goto yyerrlab1
1902 /* Like YYERROR except do call yyerror. This remains here temporarily
1903 to ease the transition to the new meaning of YYERROR, for GCC.
1904 Once GCC version 2 has supplanted version 1, this can go. */
1906 #define YYFAIL goto yyerrlab
1908 #define YYRECOVERING() (!!yyerrstatus)
1910 #define YYBACKUP(Token, Value) \
1912 if (yychar == YYEMPTY && yylen == 1) \
1916 yychar1 = YYTRANSLATE (yychar); \
1922 yyerror ("syntax error: cannot back up"); \
1928 #define YYERRCODE 256
1930 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
1933 #ifndef YYLLOC_DEFAULT
1934 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1935 Current.first_line = Rhs[1].first_line; \
1936 Current.first_column = Rhs[1].first_column; \
1937 Current.last_line = Rhs[N].last_line; \
1938 Current.last_column = Rhs[N].last_column;
1941 /* YYLEX -- calling `yylex' with the right arguments. */
1943 #define YYLEX yylex ()
1945 /* Enable debugging if requested. */
1949 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1950 # define YYFPRINTF fprintf
1953 # define YYDPRINTF(Args) \
1958 # define YYDSYMPRINT(Args) \
1963 /* Nonzero means print parse trace. It is left uninitialized so that
1964 multiple parsers can coexist. */
1966 #else /* !YYDEBUG */
1967 # define YYDPRINTF(Args)
1968 # define YYDSYMPRINT(Args)
1969 #endif /* !YYDEBUG */
1971 /* YYINITDEPTH -- initial size of the parser's stacks. */
1973 # define YYINITDEPTH 200
1976 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1977 if the built-in stack extension method is used).
1979 Do not make this value too large; the results are undefined if
1980 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
1981 evaluated with infinite-precision integer arithmetic. */
1988 # define YYMAXDEPTH 10000
1996 # if defined (__GLIBC__) && defined (_STRING_H)
1997 # define yystrlen strlen
1999 /* Return the length of YYSTR. */
2001 # if defined (__STDC__) || defined (__cplusplus)
2002 yystrlen (const char *yystr)
2008 register const char *yys = yystr;
2010 while (*yys++ != '\0')
2013 return yys - yystr - 1;
2019 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
2020 # define yystpcpy stpcpy
2022 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
2025 # if defined (__STDC__) || defined (__cplusplus)
2026 yystpcpy (char *yydest, const char *yysrc)
2028 yystpcpy (yydest, yysrc)
2033 register char *yyd = yydest;
2034 register const char *yys = yysrc;
2036 while ((*yyd++ = *yys++) != '\0')
2044 #endif /* !YYERROR_VERBOSE */
2049 /*-----------------------------.
2050 | Print this symbol on YYOUT. |
2051 `-----------------------------*/
2054 #if defined (__STDC__) || defined (__cplusplus)
2055 yysymprint (FILE* yyout, int yytype, YYSTYPE yyvalue)
2057 yysymprint (yyout, yytype, yyvalue)
2063 /* Pacify ``unused variable'' warnings. */
2066 if (yytype < YYNTOKENS)
2068 YYFPRINTF (yyout, "token %s (", yytname[yytype]);
2070 YYPRINT (yyout, yytoknum[yytype], yyvalue);
2074 YYFPRINTF (yyout, "nterm %s (", yytname[yytype]);
2081 YYFPRINTF (yyout, ")");
2083 #endif /* YYDEBUG. */
2086 /*-----------------------------------------------.
2087 | Release the memory associated to this symbol. |
2088 `-----------------------------------------------*/
2091 #if defined (__STDC__) || defined (__cplusplus)
2092 yydestruct (int yytype, YYSTYPE yyvalue)
2094 yydestruct (yytype, yyvalue)
2099 /* Pacify ``unused variable'' warnings. */
2111 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
2112 into yyparse. The argument should have type void *.
2113 It should actually point to an object.
2114 Grammar actions can access the variable by casting it
2115 to the proper pointer type. */
2117 #ifdef YYPARSE_PARAM
2118 # if defined (__STDC__) || defined (__cplusplus)
2119 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
2120 # define YYPARSE_PARAM_DECL
2122 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
2123 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
2125 #else /* !YYPARSE_PARAM */
2126 # define YYPARSE_PARAM_ARG
2127 # define YYPARSE_PARAM_DECL
2128 #endif /* !YYPARSE_PARAM */
2130 /* Prevent warning if -Wstrict-prototypes. */
2132 # ifdef YYPARSE_PARAM
2133 int yyparse (void *);
2140 /* The lookahead symbol. */
2143 /* The semantic value of the lookahead symbol. */
2146 /* Number of parse errors so far. */
2151 yyparse (YYPARSE_PARAM_ARG)
2155 register int yystate;
2158 /* Number of tokens to shift before error messages enabled. */
2160 /* Lookahead token as an internal (translated) token number. */
2163 /* Three stacks and their tools:
2164 `yyss': related to states,
2165 `yyvs': related to semantic values,
2166 `yyls': related to locations.
2168 Refer to the stacks thru separate pointers, to allow yyoverflow
2169 to reallocate them elsewhere. */
2171 /* The state stack. */
2172 short yyssa[YYINITDEPTH];
2173 short *yyss = yyssa;
2174 register short *yyssp;
2176 /* The semantic value stack. */
2177 YYSTYPE yyvsa[YYINITDEPTH];
2178 YYSTYPE *yyvs = yyvsa;
2179 register YYSTYPE *yyvsp;
2183 #define YYPOPSTACK (yyvsp--, yyssp--)
2185 YYSIZE_T yystacksize = YYINITDEPTH;
2187 /* The variables used to return semantic value and location from the
2192 /* When reducing, the number of symbols on the RHS of the reduced
2196 YYDPRINTF ((stderr, "Starting parse\n"));
2201 yychar = YYEMPTY; /* Cause a token to be read. */
2203 /* Initialize stack pointers.
2204 Waste one element of value and location stack
2205 so that they stay on the same level as the state stack.
2206 The wasted elements are never initialized. */
2213 /*------------------------------------------------------------.
2214 | yynewstate -- Push a new state, which is found in yystate. |
2215 `------------------------------------------------------------*/
2217 /* In all cases, when you get here, the value and location stacks
2218 have just been pushed. so pushing a state here evens the stacks.
2225 if (yyssp >= yyss + yystacksize - 1)
2227 /* Get the current used size of the three stacks, in elements. */
2228 YYSIZE_T yysize = yyssp - yyss + 1;
2232 /* Give user a chance to reallocate the stack. Use copies of
2233 these so that the &'s don't force the real ones into
2235 YYSTYPE *yyvs1 = yyvs;
2236 short *yyss1 = yyss;
2239 /* Each stack pointer address is followed by the size of the
2240 data in use in that stack, in bytes. This used to be a
2241 conditional around just the two extra args, but that might
2242 be undefined if yyoverflow is a macro. */
2243 yyoverflow ("parser stack overflow",
2244 &yyss1, yysize * sizeof (*yyssp),
2245 &yyvs1, yysize * sizeof (*yyvsp),
2252 #else /* no yyoverflow */
2253 # ifndef YYSTACK_RELOCATE
2256 /* Extend the stack our own way. */
2257 if (yystacksize >= YYMAXDEPTH)
2260 if (yystacksize > YYMAXDEPTH)
2261 yystacksize = YYMAXDEPTH;
2264 short *yyss1 = yyss;
2265 union yyalloc *yyptr =
2266 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2269 YYSTACK_RELOCATE (yyss);
2270 YYSTACK_RELOCATE (yyvs);
2272 # undef YYSTACK_RELOCATE
2274 YYSTACK_FREE (yyss1);
2277 #endif /* no yyoverflow */
2279 yyssp = yyss + yysize - 1;
2280 yyvsp = yyvs + yysize - 1;
2283 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2284 (unsigned long int) yystacksize));
2286 if (yyssp >= yyss + yystacksize - 1)
2290 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2299 /* Do appropriate processing given the current state. */
2300 /* Read a lookahead token if we need one and don't already have one. */
2303 /* First try to decide what to do without reference to lookahead token. */
2305 yyn = yypact[yystate];
2306 if (yyn == YYPACT_NINF)
2309 /* Not known => get a lookahead token if don't already have one. */
2311 /* yychar is either YYEMPTY or YYEOF
2312 or a valid token in external form. */
2314 if (yychar == YYEMPTY)
2316 YYDPRINTF ((stderr, "Reading a token: "));
2320 /* Convert token to internal form (in yychar1) for indexing tables with. */
2322 if (yychar <= 0) /* This means end of input. */
2325 yychar = YYEOF; /* Don't call YYLEX any more. */
2327 YYDPRINTF ((stderr, "Now at end of input.\n"));
2331 yychar1 = YYTRANSLATE (yychar);
2333 /* We have to keep this `#if YYDEBUG', since we use variables
2334 which are defined only if `YYDEBUG' is set. */
2335 YYDPRINTF ((stderr, "Next token is "));
2336 YYDSYMPRINT ((stderr, yychar1, yylval));
2337 YYDPRINTF ((stderr, "\n"));
2340 /* If the proper action on seeing token YYCHAR1 is to reduce or to
2341 detect an error, take that action. */
2343 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yychar1)
2348 if (yyn == 0 || yyn == YYTABLE_NINF)
2357 /* Shift the lookahead token. */
2358 YYDPRINTF ((stderr, "Shifting token %d (%s), ",
2359 yychar, yytname[yychar1]));
2361 /* Discard the token being shifted unless it is eof. */
2362 if (yychar != YYEOF)
2368 /* Count tokens shifted since error; after three, turn off error
2377 /*-----------------------------------------------------------.
2378 | yydefault -- do the default action for the current state. |
2379 `-----------------------------------------------------------*/
2381 yyn = yydefact[yystate];
2387 /*-----------------------------.
2388 | yyreduce -- Do a reduction. |
2389 `-----------------------------*/
2391 /* yyn is the number of a rule to reduce with. */
2394 /* If YYLEN is nonzero, implement the default value of the action:
2397 Otherwise, the following line sets YYVAL to garbage.
2398 This behavior is undocumented and Bison
2399 users should not rely upon it. Assigning to YYVAL
2400 unconditionally makes the parser a bit smaller, and it avoids a
2401 GCC warning that YYVAL may be used uninitialized. */
2402 yyval = yyvsp[1-yylen];
2407 /* We have to keep this `#if YYDEBUG', since we use variables which
2408 are defined only if `YYDEBUG' is set. */
2413 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
2414 yyn - 1, yyrline[yyn]);
2416 /* Print the symbols being reduced, and their result. */
2417 for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++)
2418 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
2419 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
2427 (void) contextcheck(C_MUSIC, "music information");
2429 /* reset flags for next voice */
2430 Defining_multiple = NO;
2431 Curr_grpsyl_p = (struct GRPSYL *) 0;
2432 Good_till_canceled = NO;
2441 /* for blank lines -- nothing to do */
2448 /* to keep going after stumbling on an input error */
2449 Getting_tup_dur = NO;
2450 Good_till_canceled = NO;
2451 Defining_multiple = NO;
2452 Curr_grpsyl_p = (struct GRPSYL *) 0;
2453 Last_grpsyl_p = (struct GRPSYL *) 0;
2454 Prev_grpsyl_p = (struct GRPSYL *) 0;
2461 /* fill in context field of the SSV struct */
2462 Currstruct_p->u.ssv_p->context = (short) Context;
2469 Curr_family = Score.fontfamily;
2486 /* have lots of separate structs in music context, so
2487 * mark that we have no current struct */
2488 Currstruct_p = (struct MAINLL *) 0;
2490 /* make sure at least 1 staff is visible. Not good to
2491 * check when user sets visible, because it would be
2492 * nice to first set everything invisible and later
2493 * turn one on. So if we wait till now to check,
2494 * user doesn't have to switch back and forth from
2495 * score to staff to get 1 voice visible. */
2496 check_at_least1visible();
2510 (void) rangecheck(yyvsp[-1].intval, MINSTAFFS, Score.staffs, "staff number");
2512 Currstruct_p->u.ssv_p->staffno = yyvsp[-1].intval;
2519 (void) rangecheck(yyvsp[-2].intval, MINSTAFFS, Score.staffs, "staff number");
2520 (void) rangecheck(yyvsp[-1].intval, MINVOICES, MAXVOICES, "voice number");
2522 Currstruct_p->u.ssv_p->staffno = yyvsp[-2].intval;
2523 Currstruct_p->u.ssv_p->voiceno = yyvsp[-1].intval;
2530 /* allocate an SSV struct */
2531 Currstruct_p = newMAINLLstruct(S_SSV, yylineno);
2538 /* entering new context, if we have a current struct,
2539 * we were in a different context, so add its info to the list */
2547 struct FEED *feed_p; /* where to attach blocks */
2548 int calloced; /* YES if dynamically alloced */
2551 Currstruct_p = (struct MAINLL *) 0;
2552 Context = yyvsp[0].intval;
2555 switch (yyvsp[0].intval) {
2557 /* We only allow one of these */
2558 chkdup_headfoot(Gotheader++, "header");
2559 Currblock_p = &Header;
2562 chkdup_headfoot(Gothead2++, "header2");
2563 Currblock_p = &Header2;
2566 chkdup_headfoot(Gotfooter++, "footer");
2567 Currblock_p = &Footer;
2570 chkdup_headfoot(Gotfoot2++, "foot2");
2571 Currblock_p = &Footer2;
2579 CALLOC(BLOCKHEAD, Currblock_p, 1);
2583 pfatal("Unknown block-type context");
2587 set_win_coord(Currblock_p->c);
2588 /* Remember where to start attaching "print" commands */
2589 Next_print_link_p_p = &(Currblock_p->printdata_p);
2591 /* The dynamically allocated blocks
2592 * (not the static head/foot blocks)
2593 * need extra processing to populate
2594 * the main list properly with FEEDs.
2596 if (calloced == YES) {
2597 if (Mainlltc_p == 0 || Mainlltc_p->str != S_FEED) {
2598 /* User had not specified a feed
2599 * right before this block, so we need
2600 * to add one for them implicitly.
2601 * Create a new FEED and add it
2602 * to the end of the main list.
2604 insertMAINLL(newMAINLLstruct(S_FEED, yylineno),
2607 feed_p = Mainlltc_p->u.feed_p;
2609 /* Normally, top/top2/bot/bot2 result in a pagefeed.
2610 * But we have a special case for backward
2611 * compatiblity and for flexibility.
2612 * User can get a separate
2613 * "title" page if they really want to,
2614 * by using an explicit newpage at the beginning.
2615 * But in the normal case, they'd want to declare
2616 * top/bot that will go on the first page without
2617 * that causing a newpage. So if there hasn't been
2618 * any music or block yet, we won't set newpage=YES
2619 * for top/top2/bot/bot2, but otherwise we will.
2621 if (Context & (C_TOP|C_TOP2|C_BOT|C_BOT2)) {
2623 for (m_p = Mainlltc_p->prev; m_p != 0;
2625 if (m_p->str == S_BAR ||
2626 m_p->str == S_BLOCKHEAD) {
2627 /* There was music or block,
2629 * at very beginning,
2630 * so no special case:
2631 * there will be new page.
2633 feed_p->pagefeed = YES;
2639 /* Now check for redefined blocks and
2640 * attach the BLOCKHEAD onto the FEED or the
2641 * main list, as appropriate.
2645 if (feed_p->top_p != 0) {
2646 warning("top redefined before being used");
2648 feed_p->top_p = Currblock_p;
2651 if (feed_p->top2_p != 0) {
2652 warning("top2 redefined before being used");
2654 feed_p->top2_p = Currblock_p;
2657 if (feed_p->bot_p != 0) {
2658 warning("bot redefined before being used");
2660 feed_p->bot_p = Currblock_p;
2663 if (feed_p->bot2_p != 0) {
2664 warning("bot2 redefined before being used");
2666 feed_p->bot2_p = Currblock_p;
2669 insertMAINLL(newMAINLLstruct(S_BLOCKHEAD, yylineno),
2671 Mainlltc_p->u.blockhead_p = Currblock_p;
2672 /* These blocks count like "music" for purposes
2673 * of things that can only be set
2674 * before any "music"
2676 Got_some_data = YES;
2682 /* These are static, not in main list,
2683 * so nothing needs to be done with them.
2687 pfatal("unexpected context (0x%x) for block", Context);
2692 /* We need a feed after a block.
2693 * Use -1 as lineno to mark it as internally generated.
2694 * That way if user puts their own explicit feed
2695 * next in the input, we can know we can
2696 * discard this internally generated one.
2698 if (Context & C_BLOCK) {
2699 insertMAINLL(newMAINLLstruct(S_FEED, -1), Mainlltc_p);
2716 Currstruct_p = (struct MAINLL *) 0;
2724 if (Context == C_GRIDS) {
2725 add_grid(yyvsp[-2].stringval, yyvsp[-1].stringval);
2727 else if (Context == C_HEADSHAPES) {
2728 /* skip past the font/size bytes */
2729 add_shape(yyvsp[-2].stringval + 2, yyvsp[-1].stringval + 2);
2732 yyerror("unexpected strings");
2741 Currstruct_p = (struct MAINLL *) 0;
2742 Context = C_HEADSHAPES;
2749 yyval.intval = yyvsp[0].intval;
2750 /* later on we check for being within current range */
2757 yyval.intval = atoi(yytext);
2764 /* Only a few things are allowed to have a negative number.
2765 * Other code assumes that that restriction is enforced here,
2766 * so we only honor the minus if it is legal. */
2767 if (yyvsp[-1].intval == -1) {
2768 if (yyvsp[-3].intval != STAFFPAD && yyvsp[-3].intval != SYLPOSITION) {
2769 yyerror("negative value not allowed");
2772 assign_int(yyvsp[-3].intval, -(yyvsp[0].intval), Currstruct_p);
2776 assign_int(yyvsp[-3].intval, yyvsp[0].intval, Currstruct_p);
2784 /* only restcombine and gridfret can be set to empty */
2785 if (yyvsp[-1].intval == RESTCOMBINE) {
2786 assign_int(yyvsp[-1].intval, NORESTCOMBINE, Currstruct_p);
2788 else if (yyvsp[-1].intval == GRIDFRET) {
2789 assign_int(yyvsp[-1].intval, NOGRIDFRET, Currstruct_p);
2792 yyerror("parameter value required");
2800 assign_float(yyvsp[-2].intval, yyvsp[0].floatval, Currstruct_p);
2807 assign_2floats(yyvsp[-4].intval, yyvsp[-2].floatval, yyvsp[0].floatval, Currstruct_p);
2815 multiplier = (Score.units == INCHES ? 1.0 : CMPERINCH);
2816 assign_float(PAGEWIDTH, pagesztbl[yyvsp[-1].intval][yyvsp[0].intval] * multiplier, Currstruct_p);
2817 assign_float(PAGEHEIGHT, pagesztbl[yyvsp[-1].intval][yyvsp[0].intval ^ 1] * multiplier, Currstruct_p);
2823 { begin_range(PL_UNKNOWN); }
2834 /* specified in stepsizes, stored in inches */
2835 assign_float(PAD, yyvsp[-1].intval * yyvsp[0].floatval * STEPSIZE, Currstruct_p);
2842 assign_vscheme (yyvsp[-1].intval, yyvsp[0].intval, Currstruct_p);
2849 set_beamlist(Currstruct_p);
2850 if (Currstruct_p != 0 && Currstruct_p->u.ssv_p != 0) {
2851 Currstruct_p->u.ssv_p->beamrests = (yyvsp[0].intval & 0x1);
2852 Currstruct_p->u.ssv_p->beamspaces = ((yyvsp[0].intval >> 1) & 0x1);
2860 set_staffset(yyvsp[-3].intval, Currstruct_p);
2867 set_barstlist(Currstruct_p);
2874 if (Currstruct_p != 0) {
2875 chk_order(Currstruct_p->u.ssv_p, Order_place);
2883 /* all the work for this is done in timesig */
2896 set_font(yyvsp[-2].intval, yyvsp[0].intval, Currstruct_p);
2903 set_font(yyvsp[-2].intval, yyvsp[0].intval, Currstruct_p);
2910 if (contextcheck(C_SCORE|C_STAFF,"clef parameter") == YES) {
2911 used_check(Currstruct_p, CLEF, "clef");
2912 if (Context == C_STAFF &&
2913 is_tab_staff(Currstruct_p->u.ssv_p->staffno)) {
2914 yyerror("can't set clef on tab staff");
2916 Currstruct_p->u.ssv_p->clef = yyvsp[0].intval;
2917 Currstruct_p->u.ssv_p->used[CLEF] = YES;
2918 asgnssv(Currstruct_p->u.ssv_p);
2926 assign_int(yyvsp[-2].intval, yyvsp[0].intval, Currstruct_p);
2933 if (contextcheck(C_STAFF|C_VOICE, "unset") == YES) {
2934 if (yyvsp[0].intval < 0 || yyvsp[0].intval >= NUMFLDS) {
2935 pfatal("invalid parameter index %d", yyvsp[0].intval);
2937 if (Currstruct_p->u.ssv_p->used[yyvsp[0].intval] == YES) {
2938 warning("unsetting parameter overrides previous setting");
2940 /* Note that if user tries to unset something that
2941 * can't be set in the current context, we silently
2942 * ignore that. We figure that since it's already unset,
2943 * it doesn't hurt anything to unset it again,
2944 * and it's easier to not bother to check.
2947 Currstruct_p->u.ssv_p->used[yyvsp[0].intval] = UNSET;
2949 /* special case: scoresep controls two fields */
2950 if (yyvsp[0].intval == MINSCSEP) {
2951 Currstruct_p->u.ssv_p->used[MAXSCSEP] = UNSET;
2954 /* Assign, just in case there are new interactions */
2955 asgnssv(Currstruct_p->u.ssv_p);
2962 { Doing_timeunit = YES; }
2968 if ( contextcheck(C_SSV, "timeunit parameter") == YES ) {
2969 used_check(Currstruct_p, TIMEUNIT, "timeunit");
2970 Currstruct_p->u.ssv_p->timeunit = yyvsp[0].ratval;
2971 Currstruct_p->u.ssv_p->timelist_p = Extra_time_p;
2973 Doing_timeunit = NO;
2974 Currstruct_p->u.ssv_p->used[TIMEUNIT] = YES;
2982 if ( contextcheck(C_SSV, "swingunit parameter") == YES ) {
2983 used_check(Currstruct_p, SWINGUNIT, "swingunit");
2984 Currstruct_p->u.ssv_p->swingunit = yyvsp[0].ratval;
2985 Currstruct_p->u.ssv_p->used[SWINGUNIT] = YES;
3005 if ( contextcheck(C_SCORE, "endingstyle parameter") == YES ) {
3006 used_check(Currstruct_p, ENDINGSTYLE, "endingstyle");
3007 Currstruct_p->u.ssv_p->endingstyle = yyvsp[0].intval;
3008 Currstruct_p->u.ssv_p->used[ENDINGSTYLE] = YES;
3016 if (contextcheck(C_SCORE | C_STAFF, "rehstyle parameter") == YES ) {
3017 used_check(Currstruct_p, REHSTYLE, "rehstyle");
3018 Currstruct_p->u.ssv_p->rehstyle = yyvsp[0].intval;
3019 Currstruct_p->u.ssv_p->used[REHSTYLE] = YES;
3028 if ( contextcheck(C_SCORE | C_STAFF, "pedstyle parameter") == YES ) {
3029 used_check(Currstruct_p, PEDSTYLE, "pedstyle");
3030 Currstruct_p->u.ssv_p->pedstyle = yyvsp[0].intval;
3031 Currstruct_p->u.ssv_p->used[PEDSTYLE] = YES;
3040 trans_name = (yyvsp[-4].intval == TRANSPOSITION ?
3041 "transpose" : "addtranspose");
3042 if (contextcheck(C_SCORE|C_STAFF, trans_name) == YES) {
3043 used_check(Currstruct_p, yyvsp[-4].intval, trans_name);
3044 chk_interval(yyvsp[-1].intval, yyvsp[0].intval);
3045 if (yyvsp[-4].intval == TRANSPOSITION) {
3046 Currstruct_p->u.ssv_p->inttype = yyvsp[-1].intval;
3047 Currstruct_p->u.ssv_p->intnum = yyvsp[-2].intval * yyvsp[0].intval;
3050 Currstruct_p->u.ssv_p->addinttype = yyvsp[-1].intval;
3051 Currstruct_p->u.ssv_p->addintnum = yyvsp[-2].intval * yyvsp[0].intval;
3053 Currstruct_p->u.ssv_p->used[yyvsp[-4].intval] = YES;
3054 if (Context == C_STAFF &&
3055 is_tab_staff(Currstruct_p->u.ssv_p->staffno)
3057 l_yyerror(Curr_filename, yylineno,
3058 "%s not allowed on tablature staff",
3062 asgnssv(Currstruct_p->u.ssv_p);
3071 assign_unit(yyvsp[0].intval, Currstruct_p);
3078 assign_string(yyvsp[-2].intval, yyvsp[0].stringval, Currstruct_p);
3085 /* whereused is not allowed on voice, just score and staff */
3086 if (contextcheck(C_SCORE|C_STAFF, "visible=whereused") == YES) {
3087 assign_int(VISIBLE, YES, Currstruct_p);
3088 Currstruct_p->u.ssv_p->hidesilent = YES;
3096 /* only valid letter is y */
3097 if (*yytext != 'y') {
3098 yyerror("visible value must be y, n, or whereused");
3100 else if (contextcheck(C_SSV, "visible parameter")
3102 assign_int(VISIBLE, YES, Currstruct_p);
3103 Currstruct_p->u.ssv_p->hidesilent = NO;
3111 if (contextcheck(C_SSV, "visible parameter") == YES) {
3112 assign_int(VISIBLE, NO, Currstruct_p);
3113 Currstruct_p->u.ssv_p->hidesilent = NO;
3121 /* none specified */
3129 /* only valid value here is 'f' */
3130 if (*yytext == 'f') {
3131 yyval.intval = V_2FREESTEM;
3134 yyerror("invalid voice qualifier: must be f or o");
3143 /* only valid value here is 'o' */
3144 if (*yytext == 'o') {
3145 yyval.intval = V_2OPSTEM;
3148 yyerror("invalid voice qualifier: must be f or o");
3149 yyval.intval = (int) V_1;
3157 /* NULL token for allocating a new beamlist */
3165 add_beamlist(yyvsp[0].ratval);
3172 add_beamlist(yyvsp[0].ratval);
3178 { begin_subbeam(); }
3191 yyval.ratval = calcfulltime(yyvsp[-3].ratval, yyvsp[-2].intval);
3193 /* if filling in a GRPSYL struct, need to fill in dots.
3194 * Could also be here due to beamstyle
3195 * or timeunit or location time offset,
3196 * in which case the Curr_grpsyl_p will be NULL,
3197 * or while getting tuplet duration. */
3198 if (Curr_grpsyl_p != (struct GRPSYL *) 0
3199 && Getting_tup_dur == NO) {
3200 Curr_grpsyl_p->dots = yyvsp[-2].intval;
3203 struct TIMELIST *timelist_p; /* walk thru list */
3204 struct TIMELIST *next_p;/* save next to delete curr */
3205 RATIONAL totaltime; /* sum of extra times */
3207 /* Start with first time value (which was calculated
3208 * above and is now in $$), then add on the added
3210 totaltime = yyval.ratval;
3211 for (timelist_p = Extra_time_p; timelist_p != 0;
3212 timelist_p = next_p) {
3213 next_p = timelist_p->next;
3214 totaltime = radd(totaltime, timelist_p->fulltime);
3215 if (Doing_timeunit == NO) {
3216 /* For things like swingunit
3217 * or tuplet time, we just need the
3218 * resulting time, not the individual
3219 * time units and arithmetic. */
3223 if (Extra_time_p != 0 && LE(totaltime, Zero)) {
3224 yyerror("Time values must add up to more than zero");
3226 /* Current timelist is finished; can't append any
3227 * more items to it. */
3228 Curr_timelist_p = 0;
3229 if (Doing_timeunit == YES) {
3230 /* For timeunit, we return the initial
3231 * timeunit, but also preserve
3232 * Extra_time_p for putting in SSV.
3234 yyval.ratval = calcfulltime(yyvsp[-3].ratval, yyvsp[-2].intval);
3237 /* the list has been freed above */
3239 yyval.ratval = totaltime;
3248 yyval.ratval.n = (svpath(1, TIME))->time.n;
3249 yyval.ratval.d = (svpath(1, TIME))->time.d;
3250 if (Curr_grpsyl_p != (struct GRPSYL *) 0
3251 && Getting_tup_dur == NO) {
3252 /* use whole note symbol as default */
3253 Curr_grpsyl_p->basictime = 1;
3254 Curr_grpsyl_p->is_meas = YES;
3255 User_meas_time = NO;
3258 yyerror("'m' is not valid here");
3266 yyval.ratval = Zero;
3280 yyval.intval = (YES | (YES << 1));
3287 yyval.intval = ((YES << 1) | YES);
3294 yyval.intval = (YES << 1);
3308 /* null token for the purpose of allocating a new rangelist
3309 * to be filled in with user data */
3317 /* save information about this range in the list */
3318 /* if only a single number, not a range, rangetail will be
3319 * 0, so use num as both beginning and end of range */
3320 add_staffset( yyvsp[-2].intval, (yyvsp[-1].intval > 0 ? yyvsp[-1].intval : yyvsp[-2].intval), String1, String2);
3327 /* no end of range, so return 0 as flag that there was only 1 number */
3335 /* make sure isn't 0, because that it illegal and would be used
3336 * later as though there were no range. Other error checking
3337 * on this number will be done later. */
3338 if (yyvsp[0].intval == 0) {
3339 yyerror("second number of range may not be zero");
3341 yyval.intval = yyvsp[0].intval;
3349 String1 = String2 = (char *) 0;
3357 String1 = yyvsp[-2].stringval;
3364 /* no second label */
3365 String2 = (char *) 0;
3372 /* save label2 for later use */
3373 String2 = yyvsp[0].stringval;
3380 /* NULL token for allocating space for a bar style list */
3388 /* if only 1 number, not range, rangetail will be 0, so use
3389 * same number for beginning and end */
3390 add_barst(yyvsp[-1].intval, (yyvsp[0].intval == 0 ? yyvsp[-1].intval : yyvsp[0].intval) );
3397 Order_place = yyvsp[0].intval;
3399 if (Currstruct_p != 0) {
3400 switch (yyvsp[0].intval) {
3402 Currstruct_p->u.ssv_p->used[ABOVEORDER] = YES;
3405 Currstruct_p->u.ssv_p->used[BELOWORDER] = YES;
3408 Currstruct_p->u.ssv_p->used[BETWEENORDER] = YES;
3418 if (Currstruct_p != 0) {
3419 Currstruct_p->u.ssv_p->markorder[Order_place][yyvsp[0].intval] = Order_prio;
3427 if (Currstruct_p != 0) {
3428 Currstruct_p->u.ssv_p->markorder[Order_place][yyvsp[0].intval] = ++Order_prio;
3436 if (Currstruct_p != 0) {
3437 Currstruct_p->u.ssv_p->markorder[Order_place][yyvsp[0].intval] = Order_prio;
3445 if (Currstruct_p != 0) {
3446 if (Currstruct_p->u.ssv_p->markorder[Order_place][yyvsp[0].intval] != 0) {
3447 l_yyerror(Curr_filename, yylineno,
3448 "order item %s specified more than once", yyvsp[0].intval);
3451 yyval.intval = yyvsp[0].intval;
3458 yyval.intval = MK_MUSSYM;
3465 yyval.intval = MK_OCTAVE;
3472 yyval.intval = MK_OTHERTEXT;
3479 switch (yyvsp[0].intval) {
3481 yyval.intval = MK_CHORD;
3484 yyval.intval = MK_DYN;
3487 yyerror("invalid text modifier in order list");
3488 /* set to something valid, since $$ will be used
3489 * as an array subscript. */
3490 yyval.intval = MK_CHORD;
3499 yyval.intval = MK_LYRICS;
3506 yyval.intval = MK_ENDING;
3513 yyval.intval = MK_REHEARSAL;
3520 yyval.intval = MK_PEDAL;
3528 if (Currstruct_p != 0 && Currstruct_p->u.ssv_p != 0) {
3529 MALLOCA(char, Currstruct_p->u.ssv_p->timerep, Tsig_offset);
3530 strcpy(Currstruct_p->u.ssv_p->timerep, Timerep);
3531 assign_timesig(Currstruct_p, yyvsp[0].intval, &Next_alt_timesig);
3532 Tsig_visibility = yyvsp[0].intval;
3533 /* If there are alternating time signatures,
3534 * need to save pointer to this list */
3535 if (Next_alt_timesig != 0) {
3536 Alt_timesig_list = Timerep;
3539 Alt_timesig_list = 0;
3542 /* Reset for next time signature usage, if any */
3549 { tsig_item(TSR_ALTERNATING); }
3555 /* this is for alternating time signature */
3567 { tsig_item(TSR_ADD); }
3573 /* This would be for things like 2/4 + 3/8 */
3587 tsig_item(TSR_COMMON);
3594 tsig_item(TSR_SLASH);
3595 if (yyvsp[0].intval < MINDENOMINATOR) {
3596 l_yyerror(Curr_filename, yylineno,
3597 "time signature denominator cannot be less than %d",
3599 yyvsp[0].intval = MINDENOMINATOR;
3601 else if (yyvsp[0].intval > MAXDENOMINATOR) {
3602 l_yyerror(Curr_filename, yylineno,
3603 "time signature denominator cannot be greater than %d",
3605 yyvsp[0].intval = MAXDENOMINATOR;
3607 else if (power_of2check(yyvsp[0].intval, "time signature denominator") == NO) {
3608 yyvsp[0].intval = 1 << drmo(yyvsp[0].intval);
3611 tsig_item(yyvsp[0].intval);
3618 /* this is something like 3+1/4 where the 1/4 get interpreted
3619 * by lexer as quadwhole, but it's really 1 for numerator
3620 * and 4 for denominator.
3623 tsig_item(TSR_SLASH);
3624 tsig_item(yyvsp[0].intval);
3632 tsig_item(TSR_SLASH);
3633 tsig_item(yyvsp[0].intval);
3640 if (yyvsp[0].intval < MINNUMERATOR) {
3641 l_yyerror(Curr_filename, yylineno,
3642 "time signature numerator cannot be less than %d",
3644 yyvsp[0].intval = MINNUMERATOR;
3646 else if (yyvsp[0].intval > MAXNUMERATOR) {
3647 l_yyerror(Curr_filename, yylineno,
3648 "time signature numerator cannot be greater than %d",
3650 yyvsp[0].intval = MAXNUMERATOR;
3652 tsig_item(yyvsp[0].intval);
3659 yyval.intval = PTS_ONCE;
3666 yyval.intval = (yyvsp[0].intval == YES ? PTS_ALWAYS : PTS_NEVER);
3680 /* 'n' is used in various places to mean do NOT
3681 * print something that would normally be printed,
3682 * so YES means we do want to inhibit the normal printing. */
3690 if ( (yyvsp[-1].intval != '#') && (yyvsp[-1].intval != '&') ) {
3691 yyerror("key signature must include # or &");
3694 assign_key(yyvsp[-2].intval, yyvsp[-1].intval, yyvsp[0].intval, Currstruct_p);
3704 /* Get number of sharps for the pitch letter */
3705 sharps = strchr(Circle, yyvsp[-2].intval) - Circle - 1;
3707 /* adjust for sharp/flat */
3708 if (yyvsp[-1].intval == '#') {
3711 else if (yyvsp[-1].intval == '&') {
3714 else if (yyvsp[-1].intval != 0) {
3715 yyerror("key letter can only be followed by # or &");
3716 /* set to some ridiculous value, so will fail below */
3720 /* Adjust if needed for minor */
3721 if (yyvsp[0].intval == YES) {
3725 /* disallow illegal keys, like f& */
3726 if (abs(sharps) > 7) {
3727 /* print error unless already printed one above */
3729 yyerror("invalid key--too many sharps or flats");
3733 assign_key(abs(sharps), (sharps >= 0 ? '#' : '&'),
3734 yyvsp[0].intval, Currstruct_p);
3742 asgn_stafflines(yyvsp[-1].intval, yyvsp[0].intval == YES ? SS_NOTHING : SS_NORMAL, Currstruct_p);
3749 asgn_stafflines(yyvsp[-1].intval, SS_DRUM, Currstruct_p);
3756 /* use default tablature */
3757 if (Currstruct_p != 0) {
3758 Currstruct_p->u.ssv_p->strinfo = Guitar;
3759 asgn_stafflines(DEFTABLINES, NO, Currstruct_p);
3767 /* user-specified tablature */
3768 asgn_stafflines(yyvsp[-1].intval, NO, Currstruct_p);
3782 /* count up the number of strings */
3783 yyval.intval = yyvsp[-1].intval + 1;
3790 /* save info about this tablature string */
3791 if (Currstruct_p != 0) {
3792 add_tab_string_info(yyvsp[-3].intval, yyvsp[-2].intval, yyvsp[-1].intval, yyvsp[0].intval, Currstruct_p->u.ssv_p);
3807 if (yyvsp[0].intval != '&' && yyvsp[0].intval != '#') {
3808 yyerror("accidental on string can only be & or #");
3824 /* limit number of ticks. Has to match the number of bits
3825 * used by TMP_NTICKS in grpsyl.c */
3826 if (yyvsp[0].intval > MAXTICKS) {
3827 l_yyerror(Curr_filename, yylineno,
3828 "too many ' marks (%d max)", MAXTICKS);
3829 yyvsp[0].intval = MAXTICKS;
3837 /* only valid letter is y */
3838 if (*yytext != 'y') {
3839 yyerror("flag value must be y or n");
3855 if (Currstruct_p == 0) {
3856 yyerror("wrong context for setting scoresep");
3859 /* Assign the value of minimum vertical space
3860 * between scores. */
3861 assign_int(MINSCSEP, yyvsp[0].intval, Currstruct_p);
3869 if (Currstruct_p != 0) {
3870 /* if user set minimum greater than default maximum,
3871 * adjust maximum to equal the minimum
3872 * they specified. */
3873 if (Currstruct_p->u.ssv_p->minscsep
3874 > Currstruct_p->u.ssv_p->maxscsep) {
3875 Currstruct_p->u.ssv_p->maxscsep
3876 = Currstruct_p->u.ssv_p->minscsep;
3879 /* fill in default */
3880 assign_int(MAXSCSEP, DEFMAXSCSEP, Currstruct_p);
3889 if (Currstruct_p != 0) {
3890 if (Currstruct_p->u.ssv_p->minscsep > yyvsp[0].intval) {
3891 yyerror("scoresep maximum smaller than minimum");
3893 assign_int(MAXSCSEP, yyvsp[0].intval, Currstruct_p);
3901 if (Currstruct_p == 0) {
3902 yyerror("wrong context for setting scorepad");
3905 /* Assign the value of minimum vertical space
3906 * between scores. */
3907 assign_int(MINSCPAD, yyvsp[-1].intval * yyvsp[0].intval, Currstruct_p);
3915 if (Currstruct_p != 0) {
3916 /* If user set minimum greater than default maximum,
3917 * adjust maximum to equal the minimum
3918 * they specified. */
3919 if (Currstruct_p->u.ssv_p->minscpad
3920 > Currstruct_p->u.ssv_p->maxscpad) {
3921 Currstruct_p->u.ssv_p->maxscpad
3922 = Currstruct_p->u.ssv_p->minscpad;
3925 /* fill in default */
3926 assign_int(MAXSCPAD, DEFMAXSCPAD, Currstruct_p);
3935 if (Currstruct_p != 0) {
3936 if (Currstruct_p->u.ssv_p->minscpad > yyvsp[-1].intval * yyvsp[0].intval) {
3937 yyerror("scorepad maximum smaller than minimum");
3939 assign_int(MAXSCPAD, yyvsp[-1].intval * yyvsp[0].intval, Currstruct_p);
3947 if (yyvsp[-1].intval == (int) 'a' && yyvsp[0].intval >= 4 && yyvsp[0].intval <= 6) {
3948 switch (yyvsp[0].intval) {
3950 yyval.intval = PS_A4;
3953 yyval.intval = PS_A5;
3956 yyval.intval = PS_A6;
3959 pfatal("impossible pagesize");
3964 yyerror("unsupported pagesize");
3979 yyval.intval = (yyvsp[0].intval == O_PORTRAIT ? 0 : 1);
3986 assign_vcombine(VC_NOOVERLAP, Currstruct_p);
3993 assign_vcombine(yyvsp[0].intval, Currstruct_p);
3994 Defining_multiple = NO;
4001 yyval.intval = VC_NOOVERLAP;
4008 yyval.intval = yyvsp[0].intval;
4015 yyval.intval = yyvsp[0].intval;
4022 if (yyvsp[0].intval != C_TOP) {
4023 l_yyerror(Curr_filename, yylineno,
4024 "%s not valid here", yytext);
4026 yyval.intval = ENDING_TOP;
4054 switch (yyvsp[0].intval) {
4063 yyerror("must be major or minor");
4072 yyval.intval = P_LINE;
4079 yyval.intval = P_ALTPEDSTAR;
4086 yyval.intval = P_PEDSTAR;
4099 if (yyvsp[0].intval == FONT_UNKNOWN) {
4100 yyvsp[0].intval = Curr_font;
4102 if (yyvsp[-1].intval == FAMILY_DFLT) {
4103 /* user didn't specify a family. Use the current
4104 * family, unless we don't have one yet, in which
4105 * case look it up */
4106 if (Curr_family == FAMILY_DFLT) {
4107 Curr_family = Score.fontfamily;
4109 Titlefont = Curr_family + yyvsp[0].intval;
4112 Titlefont = yyvsp[-1].intval + yyvsp[0].intval;
4120 yyval.intval = FONT_UNKNOWN;
4127 yyval.intval = yyvsp[0].intval;
4134 yyval.intval = FAMILY_DFLT;
4141 yyval.intval = yyvsp[0].intval;
4148 Titlesize = Curr_size;
4155 Titlesize = yyvsp[-1].intval;
4162 Extra = extra_needed(Titlefont, Titlesize, yyvsp[0].stringval);
4163 proc_printcmd(J_CENTER, (struct INPCOORD *) 0, yyvsp[0].stringval,
4164 Titlefont, Titlesize, YES, NO, Extra);
4173 /* if one is taller than the default for the font/size,
4174 * figure out how much more to add on */
4175 /* can't use MAX passing extra_needed() as arguments because
4176 * it would get executed multiple times, which is a problem */
4177 Extra = extra_needed(Titlefont, Titlesize, yyvsp[-1].stringval);
4178 tmp_extra = extra_needed(Titlefont, Titlesize, yyvsp[0].stringval);
4179 Extra = MAX(Extra, tmp_extra);
4182 proc_printcmd(J_LEFT, (struct INPCOORD *) 0, yyvsp[-1].stringval,
4183 Titlefont, Titlesize, YES, NO, Extra);
4184 proc_printcmd(J_RIGHT, (struct INPCOORD *) 0, yyvsp[0].stringval,
4185 Titlefont, Titlesize, NO, NO, (double) 0.0);
4194 Extra = extra_needed(Titlefont, Titlesize, yyvsp[-2].stringval);
4195 tmp_extra = extra_needed(Titlefont, Titlesize, yyvsp[-1].stringval);
4196 Extra = MAX(Extra, tmp_extra);
4197 tmp_extra = extra_needed(Titlefont, Titlesize, yyvsp[0].stringval);
4198 Extra = MAX(Extra, tmp_extra);
4200 proc_printcmd(J_LEFT, (struct INPCOORD *) 0, yyvsp[-2].stringval,
4201 Titlefont, Titlesize, YES, NO, Extra);
4202 proc_printcmd(J_CENTER, (struct INPCOORD *) 0, yyvsp[-1].stringval,
4203 Titlefont, Titlesize, NO, NO, (double) 0.0);
4204 proc_printcmd(J_RIGHT, (struct INPCOORD *) 0, yyvsp[0].stringval,
4205 Titlefont, Titlesize, NO, NO, (double) 0.0);
4212 char *p; /* pointer through the string */
4213 int backslash_count; /* how many backslashes in a row */
4214 int font, size; /* at end of \n-delimited segment */
4215 char *string_start; /* where current segment begins */
4217 /* Convert unescaped input newlines to spaces.
4218 * The +2 in the 'for' initialization is to skip font/size.
4220 backslash_count = 0;
4221 string_start = yyvsp[-2].stringval;
4222 /* If we are running on a file using \r or \r\n for
4223 * line separator, normalize to \n instead */
4224 for (p = string_start + 2; *p != 0; p++) {
4226 if ( *(p+1) != '\n') {
4227 /* \r by itself. Use \n instead */
4233 for (src = p + 1, dest = p; ; src++, dest++) {
4245 for (p = string_start + 2; *p != 0; p++) {
4246 /* Real newlines not preceeded by an odd number
4247 * of backslashes are converted to spaces. */
4248 if (*p == '\n' && (backslash_count & 0x1) == 0) {
4252 /* Count up number of consecutive backslashes.
4253 * Also, if user explicitly uses \n, split into
4258 if (((backslash_count & 0x1) == 1)
4259 && ( *(p+1) == 'n') ) {
4261 * Terminate the current string
4262 * where we are in it, and process it,
4263 * then arrange to continue processing
4264 * on the rest of the string.
4267 (void) fix_string(string_start,
4269 Curr_filename, yylineno);
4270 proc_printcmd(yyvsp[-6].intval, (struct INPCOORD*) 0,
4271 string_start, font, size,
4274 /* The user could change font/size
4275 * in mid-string with \f() and/or \s().
4276 * so we have to determine what they
4277 * are at the end of the current segment
4278 * and use that for making the copy
4279 * of the remainder of the string.
4280 * The original copy of the remainder
4281 * of the string gets "memory leaked,"
4282 * but this is a rare case, so not
4283 * worth worrying about.
4285 end_fontsize(string_start, &font, &size);
4286 string_start = copy_string(p+2, font, size);
4287 p = string_start + 2;
4291 backslash_count = 0;
4294 (void) fix_string(string_start, font, size,
4295 Curr_filename, yylineno);
4296 proc_printcmd(yyvsp[-6].intval, (struct INPCOORD*) 0, string_start,
4297 font, size, YES, NO, 0.0);
4304 /* Use same paragraph time as last time (or default if
4305 * this is the first paragraph ever in this song.) */
4306 yyval.intval = Curr_paratype;
4313 Curr_paratype = yyvsp[0].intval;
4314 yyval.intval = yyvsp[0].intval;
4321 /* strip the quotes from the string and make a copy for later use */
4322 if (Curr_family == FAMILY_DFLT) {
4323 Curr_family = Score.fontfamily;
4325 yyval.stringval = copy_string(stripquotes(yytext), Curr_family + Curr_font,
4335 /* append new string part to existing part */
4336 old_string = yyvsp[-2].stringval;
4337 /* new string part has quotes, so subtract 2 from needed length,
4338 * but need space for null, so overall need 1 less. */
4339 MALLOCA(char, yyval.stringval, strlen(old_string) + strlen(yytext) - 1);
4340 sprintf(yyval.stringval, "%s%s", old_string, stripquotes(yytext));
4348 /* Here's the deal: the staff/voice specification
4349 * could be lists of staff ranges and/or voices.
4350 * We need a separate copy of the groupinfo
4351 * for each staff/voice. So as we parse the sv_spec,
4352 * we remember which staffs and voices are specified,
4353 * and keep a pointer to the first STAFF in the measure.
4354 * Then after collecting the groupinfo,
4355 * we make copies of the group info for each staff/voice given.
4356 * It has to be copies rather than just a pointer to the
4357 * same stuff, because the coordinates will be different
4358 * for each staff/voice. */
4360 /* attach the groupinfo to each of the STAFF structs */
4368 add_multirest(yyvsp[-1].intval);
4369 /* If there are alternating time signatures, figure out
4370 * which one should be in effect at the end of the multirest */
4371 if (Alt_timesig_list != 0) {
4374 /* The Next_alt_timesig is already pointing to
4375 * the value for after the first measure in the
4376 * multirest, so have to subtract 1 here */
4377 for (m = 0; m < yyvsp[-1].intval - 1; m++) {
4378 if (Next_alt_timesig == 0) {
4379 /* Shouldn't really ever get here,
4380 * since other code should do the
4381 * wrap-around, but just in case... */
4382 Next_alt_timesig = Alt_timesig_list;
4387 if (*Next_alt_timesig == TSR_END) {
4388 Next_alt_timesig = Alt_timesig_list;
4391 } while (*Next_alt_timesig != TSR_ALTERNATING);
4393 if (*Next_alt_timesig == TSR_ALTERNATING) {
4397 Currstruct_p = (struct MAINLL *) 0;
4411 begin_range(PL_UNKNOWN);
4418 Chord_at_a_time = NO;
4425 Chord_at_a_time = YES;
4454 Defining_multiple = YES;
4461 /* initialize grpsyl info */
4462 Curr_grpsyl_p = Last_grpsyl_p = (struct GRPSYL *) 0;
4469 /* prepare for a new set of ranges */
4471 Defining_multiple = YES;
4478 /* data is for staff with only one voice */
4479 save_vno_range(1, 1);
4487 if (yyvsp[0].intval == YES) {
4496 /* set flag as to whether we are processing tab staff
4497 * information or normal staff info */
4498 Doing_tab_staff = is_tab_range();
4505 /* several staffs have the same note data */
4506 Defining_multiple = YES;
4513 /* remember which staffs we are currently getting data for */
4514 /* if only a single number, not a range, staff_range will be
4515 * 0, so use staffnum as high and low of range */
4516 save_staff_range(yyvsp[-1].intval, (yyvsp[0].intval == 0 ? yyvsp[-1].intval : yyvsp[0].intval));
4523 /* empty - no range, just a single number */
4531 Defining_multiple = YES;
4532 yyval.intval = yyvsp[0].intval;
4533 if (yyvsp[0].intval == 0) {
4534 yyerror("staff of 0 is illegal");
4542 /* note data applies to a single voice */
4543 if (rangecheck(yyvsp[-1].intval, MINVOICES, MAXVOICES, "voice") == YES) {
4544 save_vno_range(yyvsp[-1].intval, yyvsp[-1].intval);
4556 /* note data applies to range of voices */
4557 if (rangecheck(yyvsp[-3].intval, MINVOICES, MAXVOICES, "voice") == YES &&
4558 rangecheck(yyvsp[-1].intval, MINVOICES, MAXVOICES, "voice") == YES) {
4559 if (yyvsp[-1].intval < yyvsp[-3].intval) {
4560 l_yyerror(Curr_filename, yylineno,
4561 "end of voice range is smaller than beginning");
4565 save_vno_range(yyvsp[-3].intval, yyvsp[-1].intval);
4566 Defining_multiple = YES;
4579 Defining_multiple = YES;
4586 /* Associate any TIMEDSSVs with this group */
4587 if (Curr_tssv_p != 0) {
4588 tssv_setgrpsyl(Curr_grpsyl_p);
4592 /* if no custom beaming indicated, fill in based on previous. */
4593 if ( Curr_grpsyl_p->beamloc == NOITEM) {
4594 setbeamloc(Curr_grpsyl_p, Last_grpsyl_p);
4597 /* later we check that if there is an 'm', it is
4598 * the only thing in the measure */
4600 link_notegroup(Curr_grpsyl_p, Last_grpsyl_p);
4602 /* Save pointer to this group, in case there are additive
4603 * times, and the next group gets its time value from this
4604 * group. In that case, we need this group, not the last one
4605 * of the added groups. */
4606 Prev_grpsyl_p = Curr_grpsyl_p;
4607 /* Add groups if there were additive time values. */
4608 if (Extra_time_p != 0) {
4609 Curr_grpsyl_p = expandgrp(Curr_grpsyl_p, Extra_time_p);
4610 /* If there was a custom beam ebm on something with
4611 * additive time, we need make sure ENDITEM is on only
4612 * the last of the expanded groups. */
4613 if (Curr_grpsyl_p != Prev_grpsyl_p
4614 && Prev_grpsyl_p->beamloc == ENDITEM) {
4616 for (g_p = Prev_grpsyl_p; g_p != Curr_grpsyl_p;
4618 g_p->beamloc = INITEM;
4620 Curr_grpsyl_p->beamloc = ENDITEM;
4622 Last_grpsyl_p = Curr_grpsyl_p->prev;
4624 Curr_timelist_p = 0;
4631 if (Chord_at_a_time == YES) {
4632 yyerror("mid-measure changes not allowed on chord-at-a-time input");
4640 Curr_tssv_p = tssv_create(C_SCORE);
4647 Curr_tssv_p = tssv_create(C_STAFF);
4654 Curr_tssv_p = tssv_create(C_VOICE);
4661 if (Curr_grpsyl_p != 0 && Curr_grpsyl_p->grpsyl == GS_GROUP
4662 && Curr_grpsyl_p->grpvalue == GV_ZERO) {
4663 yyerror("mid-measure clef change not allowed after grace note\n");
4665 tssv_update(Curr_tssv_p, yyvsp[-2].intval, yyvsp[0].intval);
4672 switch (yyvsp[-2].intval) {
4676 tssv_update(Curr_tssv_p, yyvsp[-2].intval, yyvsp[0].intval);
4680 yyerror("parameter type cannot be changed mid-measure");
4689 if (Good_till_canceled == NO) {
4690 /* use default attributes */
4691 Curr_grpsyl_p->grpvalue = GV_NORMAL;
4692 Curr_grpsyl_p->grpsize = GS_NORMAL;
4693 Curr_grpsyl_p->headshape = HS_UNKNOWN;
4696 /* re-use previous style */
4697 copy_attributes(Curr_grpsyl_p, Last_grpsyl_p);
4705 Good_till_canceled = NO;
4718 Good_till_canceled = NO;
4725 Good_till_canceled = YES;
4738 if (Good_till_canceled == YES) {
4739 yyerror("can't use ... and more than one [] on same chord");
4747 /* NULL token to cause allocation of a GRPSYL struct */
4748 Last_grpsyl_p = Curr_grpsyl_p;
4749 Curr_grpsyl_p = newGRPSYL(GS_GROUP);
4756 /* an empty marklist means we should use
4757 * the same attributes as the last time */
4758 copy_attributes(Curr_grpsyl_p, Last_grpsyl_p);
4765 Curr_grpsyl_p->nwith = (short) Item_count;
4766 Curr_grpsyl_p->withlist = Curr_marklist;
4773 if (Curr_grpsyl_p->stemdir != UNKNOWN &&
4774 Curr_grpsyl_p->stemdir != yyvsp[0].intval) {
4775 l_warning(Curr_filename, yylineno,
4776 "both stem directions specified; using last instance");
4778 if (Doing_tab_staff == YES) {
4779 yyerror("stem direction specification not allowed on tab staff");
4782 Curr_grpsyl_p->stemdir = yyvsp[0].intval;
4790 if (yyvsp[-2].intval != DIST) {
4791 yyerror("unexpected parameter name");
4794 if (Curr_grpsyl_p->restdist != NORESTDIST &&
4795 Curr_grpsyl_p->restdist != yyvsp[-1].intval * yyvsp[0].intval) {
4796 l_warning(Curr_filename, yylineno,
4797 "more than one dist value specified; using last instance");
4799 Curr_grpsyl_p->restdist = yyvsp[-1].intval * yyvsp[0].intval;
4807 if (Curr_grpsyl_p->ho_usage != HO_NONE &&
4808 Curr_grpsyl_p->ho_usage != yyvsp[0].intval) {
4809 l_warning(Curr_filename, yylineno,
4810 "More than one ho type specified; last instance used");
4812 Curr_grpsyl_p->ho_usage = yyvsp[0].intval;
4819 if (Curr_grpsyl_p != 0) {
4820 if (Curr_grpsyl_p->headshape != HS_UNKNOWN) {
4821 l_warning(Curr_filename, yylineno,
4822 "multiple head shapes specified, using last");
4824 /* +2 to skip past extraneous font/size */
4825 if (Doing_tab_staff == YES && strcmp(yyvsp[0].stringval + 2, "allx") != 0) {
4826 yyerror("allx is the only headshape allowed on tab staffs");
4828 if ((Curr_grpsyl_p->headshape = get_shape_num(yyvsp[0].stringval + 2))
4830 l_yyerror(Curr_filename, yylineno,
4831 "'%s' is not a valid head shape name",
4832 ascii_str(yyvsp[0].stringval, YES, NO, TM_NONE));
4836 pfatal("Curr_grpsyl_p was null for setting hs");
4838 /* We don't need the name anymore; we have its corresponding
4839 * number that we use internally. */
4840 FREE(yyvsp[0].stringval);
4847 if (Curr_grpsyl_p->stemlen != STEMLEN_UNKNOWN &&
4848 fabs(Curr_grpsyl_p->stemlen - yyvsp[0].floatval * STEPSIZE) > 0.0001) {
4849 l_warning(Curr_filename, yylineno,
4850 "more than one len specified; using last instance");
4852 Curr_grpsyl_p->stemlen = yyvsp[0].floatval * STEPSIZE;
4859 if (yyvsp[0].intval <= 0) {
4860 yyerror("slash number must be > 0");
4862 else if (yyvsp[0].intval > 8) {
4863 /* we decided 8 slashes would be at least 256th note
4864 * or shorter, and 256th is the shortest note we
4865 * support, 8 slashes is plenty */
4866 yyerror("slash number must be <= 8");
4868 if (Curr_grpsyl_p->slash_alt > 0 &&
4869 Curr_grpsyl_p->slash_alt != yyvsp[0].intval) {
4870 l_warning(Curr_filename, yylineno,
4871 "more than one slash value specified; using last instance");
4873 if (Curr_grpsyl_p->slash_alt < 0) {
4874 yyerror("only one slash/alt allowed per group");
4876 Curr_grpsyl_p->slash_alt = yyvsp[0].intval;
4883 yyval.intval = HO_RIGHT;
4890 yyval.intval = HO_LEFT;
4897 /* We want to silently accept identical values specified
4898 * more than once, so use fuzzy compare to deal with roundoff */
4899 if (Curr_grpsyl_p->ho_usage == HO_VALUE &&
4900 fabs(Curr_grpsyl_p->ho_value - yyvsp[-1].intval * yyvsp[0].floatval) > 0.0001) {
4901 l_warning(Curr_filename, yylineno,
4902 "More than one ho value specified; last instance used");
4904 Curr_grpsyl_p->ho_value = yyvsp[-1].intval * yyvsp[0].floatval;
4905 yyval.intval = HO_VALUE;
4919 yyval.intval = yyvsp[0].intval;
4926 yyvsp[0].floatval *= yyvsp[-1].intval;
4927 if (fabs(Curr_grpsyl_p->beamslope - NOBEAMANGLE) > 0.01) {
4928 l_warning(Curr_filename, yylineno,
4929 "multiple slope values specified; using last one");
4931 if (frangecheck(yyvsp[0].floatval, MINBEAMANGLE, MAXBEAMANGLE, "slope") == YES) {
4932 Curr_grpsyl_p->beamslope = yyvsp[0].floatval;
4940 if (yyvsp[0].intval <= 0) {
4941 yyerror("alt number must be > 0");
4943 if (Curr_grpsyl_p->slash_alt != 0) {
4944 yyerror("only one slash/alt allowed per group");
4946 if (Doing_tab_staff == YES) {
4947 yyerror("alt not allowed on tablature staff");
4949 /* Keep small enough that 1 shifted left by this still
4950 * fits in a 16-bit int. Should be more than enough! */
4951 if (yyvsp[0].intval > 15) {
4952 warning("alt value too large");
4953 yyvsp[0].intval = 15;
4955 Curr_grpsyl_p->slash_alt = -yyvsp[0].intval;
4964 /* add a slur to each note in the chord. Don't know
4965 * which pitch to slur to yet, just that it will be to
4966 * the "matching" note in the next chord, so use
4967 * special magic pitch of 'M' to convey this */
4968 for (n = 0; n < Curr_grpsyl_p->nnotes; n++) {
4969 add_slurto(Curr_grpsyl_p, 'M', USE_DFLT_OCTAVE, n, yyvsp[-1].intval);
4970 set_slurdir(Curr_grpsyl_p, -1, yyvsp[0].intval);
4980 Curr_grpsyl_p->tie = YES;
4981 for (n = 0; n < Curr_grpsyl_p->nnotes; n++) {
4982 Curr_grpsyl_p->notelist[n].tie = YES;
4983 Curr_grpsyl_p->notelist[n].tiestyle = yyvsp[-1].intval;
4984 Curr_grpsyl_p->notelist[n].tiedir = yyvsp[0].intval;
4992 if (Curr_marklist == 0) {
4993 /* allocate space for a list of marks */
4994 MALLOCA(char *, Curr_marklist, ITEMS);
5004 yyval.intval = UNKNOWN;
5011 yyval.intval = yyvsp[0].intval;
5018 /* if too many items, get some more space */
5019 if (Item_count >= Max_items) {
5021 if ((Curr_marklist = (char **) realloc(Curr_marklist,
5022 Max_items * sizeof(char **)))
5024 l_no_mem(__FILE__, __LINE__);
5027 Curr_marklist[Item_count++] = yyvsp[0].stringval;
5034 MALLOCA(char, yyval.stringval, strlen(yyvsp[0].stringval) + 3);
5035 yyval.stringval[0] = FONT_TR;
5036 yyval.stringval[1] = DFLT_SIZE;
5037 sprintf(yyval.stringval + 2, yyvsp[0].stringval);
5044 yyval.stringval = (Curr_grpsyl_p->grpsize == GS_NORMAL
5045 ? "\\(dot)" : "\\(smdot)");
5052 yyval.stringval = (Curr_grpsyl_p->grpsize == GS_NORMAL
5053 ? "\\(leg)" : "\\(smleg)");
5060 yyval.stringval = (Curr_grpsyl_p->grpsize == GS_NORMAL
5061 ? "\\(acc_gt)" : "\\(smacc_gt)");
5068 yyval.stringval = (Curr_grpsyl_p->grpsize == GS_NORMAL
5069 ? "\\(acc_hat)" : "\\(smacc_hat)");
5076 if (Curr_grpsyl_p->grpvalue == GV_ZERO) {
5077 l_warning(Curr_filename, yylineno,
5078 "both grace and cue specified; using last instance");
5080 Curr_grpsyl_p->grpvalue = GV_NORMAL;
5081 Curr_grpsyl_p->grpsize = GS_SMALL;
5088 if (Curr_grpsyl_p->grpsize == GS_SMALL
5089 && Curr_grpsyl_p->grpvalue != GV_ZERO) {
5090 l_warning(Curr_filename, yylineno,
5091 "both cue and grace specified; using last instance");
5094 Curr_grpsyl_p->grpsize = GS_SMALL;
5095 Curr_grpsyl_p->grpvalue = GV_ZERO;
5102 if (Curr_grpsyl_p->headshape != HS_UNKNOWN) {
5103 l_warning(Curr_filename, yylineno,
5104 "diam is overriding previous headshapes specification");
5106 Curr_grpsyl_p->headshape = get_shape_num("diam");
5113 if (Curr_grpsyl_p->headshape != HS_UNKNOWN) {
5114 l_warning(Curr_filename, yylineno,
5115 "xnote is overriding previous headshapes specification");
5117 Curr_grpsyl_p->headshape = get_shape_num(
5118 Doing_tab_staff == YES ? "allx" : "x");
5132 yyval.intval = DOWN;
5139 /* custom beaming cannot be nested */
5140 struct GRPSYL *prev_like_gs_p;
5141 /* Find previous group with same grace-ness. Can't use
5142 * prevsimilar() here, since it looks at grpcont too. */
5143 for (prev_like_gs_p = Last_grpsyl_p; prev_like_gs_p != 0 &&
5144 prev_like_gs_p->grpvalue != Curr_grpsyl_p->grpvalue;
5145 prev_like_gs_p = prev_like_gs_p->prev) {
5148 if (prev_like_gs_p != 0 &&
5149 ((prev_like_gs_p->beamloc == STARTITEM)
5150 || (prev_like_gs_p->beamloc == INITEM)) ) {
5151 yyerror("custom beaming may not be nested");
5153 /* Non-custom beaming, if any, is done later, in do_bar() */
5155 /* begin custom beaming */
5156 Curr_grpsyl_p->beamloc = STARTITEM;
5157 if (Curr_grpsyl_p->basictime < 8 && yyvsp[0].intval == CS_SAME) {
5158 yyerror("beamed notes must be 8th or shorter");
5161 Curr_grpsyl_p->beamto = yyvsp[0].intval;
5168 Curr_grpsyl_p->breakbeam = YES;
5175 struct GRPSYL *last_nongrace_p;
5177 /* find the previous group, skipping grace groups */
5178 for (last_nongrace_p = Last_grpsyl_p;
5179 last_nongrace_p != (struct GRPSYL *) 0
5180 && last_nongrace_p->grpvalue == GV_ZERO;
5181 last_nongrace_p = last_nongrace_p->prev) {
5185 /* check that a custom beam is in progress */
5186 if ((last_nongrace_p == (struct GRPSYL *) 0)
5187 || ((last_nongrace_p != (struct GRPSYL *) 0)
5188 && (last_nongrace_p->beamloc != STARTITEM)
5189 && (last_nongrace_p->beamloc != INITEM) )) {
5190 yyerror("'ebm' unexpected: no custom beaming in progress");
5193 Curr_grpsyl_p->beamloc = ENDITEM;
5194 Curr_grpsyl_p->beamto = last_nongrace_p->beamto;
5195 if (Curr_grpsyl_p->basictime < 8
5196 && Last_grpsyl_p->beamto == CS_SAME) {
5197 yyerror("beamed notes must be 8th or shorter");
5206 /* Use the same as last time or default timeunit.
5207 * If that involves additive time values,
5208 * save pointer to that info in Extra_time_p for later use. */
5209 Extra_time_p = copy_timeunit(Curr_grpsyl_p, Prev_grpsyl_p,
5217 if (Curr_grpsyl_p->is_meas == YES) {
5218 Curr_grpsyl_p->fulltime = Score.time;
5221 Curr_grpsyl_p->fulltime = yyvsp[0].ratval;
5229 yyval.intval = CS_SAME;
5237 switch (yyvsp[0].intval) {
5239 yyval.intval = CS_ABOVE;
5242 yyval.intval = CS_BELOW;
5245 yyerror("bm with staff must be 'above' or 'below'");
5246 yyval.intval = CS_SAME;
5254 yyval.ratval.n = yyvsp[0].intval;
5257 /* if filling in a GRPSYL struct, need to fill in basic time,
5258 * could also be here due to beamstyle, in which case the
5259 * Curr_grpsyl_p will be NULL, or when getting tuplet duration,
5260 * in which case flag will be set */
5261 if (Curr_grpsyl_p != (struct GRPSYL *) 0
5262 && Getting_tup_dur == NO) {
5263 /* If we are gathering basictime as part of a list
5264 * of additive times, we will save the value a few
5265 * lines down from here. But in the normal case,
5266 * we set basictime in the current GRPSYL. */
5267 if (Extra_time_p == 0) {
5268 /* 1/2 is 0 internally. 1/4 is -1 internally */
5269 Curr_grpsyl_p->basictime = (yyvsp[0].intval == 2 ? 0 : -1);
5272 /* If doing additive times, need to save value. */
5273 if (Extra_time_p != 0) {
5274 Extra_basictime = (yyvsp[0].intval == 2 ? 0 : -1);
5282 /* check that a power of two from 1 to MAXBASICTIME */
5283 if (power_of2check(yyvsp[0].intval, "note basic time value") == NO) {
5284 /* force to a power to two, so that other code
5285 * (like in expandgrp) that expect a sane value
5286 * to not blow up. This may lead to a somewhat
5287 * misleading "time does not add up to time * signature message, but we don't know what
5288 * time they really meant, and this is better
5289 * than pfataling. */
5290 yyvsp[0].intval = 2;
5292 /* can't use rangecheck here because the error message would
5293 * say 0 and -1 are valid times, which is only true internally--
5294 * the user has to use 1/2, 1/4 or m. */
5295 if (yyvsp[0].intval < MINBASICTIME || yyvsp[0].intval > MAXBASICTIME) {
5296 l_yyerror(Curr_filename, yylineno,
5297 "time value must be between 1 and %d, or 1/2 or 1/4 or m",
5301 /* avoid division by zero */
5302 if (yyvsp[0].intval == 0) {
5303 yyvsp[0].intval = 1;
5305 yyval.ratval.d = yyvsp[0].intval;
5306 if (Curr_grpsyl_p != (struct GRPSYL *) 0
5307 && Getting_tup_dur == NO) {
5308 if (Curr_timelist_p == 0) {
5309 Curr_grpsyl_p->basictime = yyvsp[0].intval;
5312 /* If doing additive times, need to save value */
5313 if (Extra_time_p != 0) {
5314 Extra_basictime = yyvsp[0].intval;
5329 /* Set basictime to what we saved in basic_time_val rule,
5330 * then calculate fulltime from that and number of dots. */
5331 Curr_timelist_p->basictime = Extra_basictime;
5332 Curr_timelist_p->fulltime = calcfulltime(yyvsp[-1].ratval, yyvsp[0].intval);
5333 /* handle subtracted times by negating the fulltime */
5334 if (yyvsp[-3].intval == -1) {
5335 Curr_timelist_p->fulltime = rneg(Curr_timelist_p->fulltime);
5343 struct TIMELIST *timelist_p;
5345 MALLOC(TIMELIST, timelist_p, 1);
5346 /* Add to end of linked list */
5347 timelist_p->next = 0;
5348 /* Init fulltime to something to avoid garbage if there
5349 * in a user input error */
5350 timelist_p->fulltime = Zero;
5351 if (Extra_time_p == 0) {
5352 Last_alloced_timelist_p = Extra_time_p = timelist_p;
5355 Curr_timelist_p->next = timelist_p;
5357 /* Keep track of where to append next item to list, if any */
5358 Curr_timelist_p = timelist_p;
5365 User_meas_time = NO;
5372 if (Curr_grpsyl_p != (struct GRPSYL *) 0
5373 && Getting_tup_dur == NO) {
5374 Curr_grpsyl_p->is_meas = YES;
5375 User_meas_time = YES;
5378 yyerror("'m' is not valid here");
5393 /* count up the number of dots */
5394 yyval.intval = yyvsp[-1].intval + 1;
5401 /* We can't distinguish between the default 0.0 and
5402 * if user explicitly sets to 0.0, so if they set to 0.0
5403 * then to something else, we won't catch that as setting
5404 * twice, but that shouldn't be common. Besides, if they
5405 * expect them to be additive, adding to zero will work
5406 * as they expect... Because of roundoff, we can't do
5407 * exact compare for specifying the same value more than once,
5408 * so treat as identical if pretty close. */
5409 if (Curr_grpsyl_p->padding != 0.0 &&
5410 fabs(Curr_grpsyl_p->padding - (yyvsp[0].floatval * STEPSIZE))
5412 l_warning(Curr_filename, yylineno,
5413 "padding specified more than once; using last instance");
5415 Curr_grpsyl_p->padding = yyvsp[0].floatval * STEPSIZE;
5422 yyval.floatval = (float) yyvsp[-1].intval * yyvsp[0].floatval;
5429 /* no sign--must be a positive number */
5437 /* user wants a negative number */
5445 Curr_grpsyl_p->grpcont = GC_NOTES;
5446 if (yyvsp[0].intval == 0) {
5447 /* no notes listed, use same as previous group */
5448 copy_notes(Curr_grpsyl_p, Last_grpsyl_p);
5451 resize_notelist(Curr_grpsyl_p);
5459 /* allocate GRPSYL for the case where everything is defaulted
5460 * from the previous group, with just an extra attribute
5461 * like ? or ~ specified. */
5462 if (Curr_grpsyl_p == (struct GRPSYL *) 0) {
5463 /* shouldn't ever happen, but just in case... */
5464 Curr_grpsyl_p = newGRPSYL(GS_GROUP);
5466 if (Last_grpsyl_p != (struct GRPSYL *) 0 &&
5467 Last_grpsyl_p->nnotes >= 1) {
5468 copy_notes(Curr_grpsyl_p, Last_grpsyl_p);
5470 else if (Last_grpsyl_p != (struct GRPSYL *) 0 &&
5471 Last_grpsyl_p->grpcont == GC_REST) {
5472 Curr_grpsyl_p->grpcont = GC_REST;
5480 if (Curr_grpsyl_p->grpcont == GC_NOTES &&
5481 Curr_grpsyl_p->nnotes > 0) {
5482 Curr_grpsyl_p->notelist[Curr_grpsyl_p->nnotes - 1]
5483 .notesize = GS_SMALL;
5485 else if (Curr_grpsyl_p->grpcont == GC_REST) {
5486 Curr_grpsyl_p->grpsize = GS_SMALL;
5489 yyerror("no note specified for '?'");
5497 if (Curr_grpsyl_p->grpcont != GC_NOTES) {
5498 yyerror("can't tie a rest or space");
5500 else if (Curr_grpsyl_p->nnotes > 0) {
5502 n_p = &(Curr_grpsyl_p->notelist[Curr_grpsyl_p->nnotes - 1]);
5504 n_p->tiestyle = yyvsp[-1].intval;
5505 n_p->tiedir = yyvsp[0].intval;
5508 yyerror("no note specified for '~'");
5516 if (Curr_grpsyl_p->nnotes > 0) {
5517 switch (Curr_grpsyl_p->notelist
5518 [Curr_grpsyl_p->nnotes - 1].letter) {
5522 case PP_NO_PITCH: /* this one not really possible */
5523 addsym(yyvsp[0].stringval, Curr_grpsyl_p->c, CT_GRPSYL);
5526 addsym(yyvsp[0].stringval, Curr_grpsyl_p->notelist
5527 [Curr_grpsyl_p->nnotes - 1].c, CT_NOTE);
5532 else if (Curr_grpsyl_p->grpcont == GC_REST) {
5533 /* This should really never be hit anymore since
5534 * chord-at-a-time code was added, but shouldn't
5535 * hurt to leave it, just in case. */
5536 addsym(yyvsp[0].stringval, Curr_grpsyl_p->c, CT_GRPSYL);
5540 l_yyerror(Curr_filename, yylineno,
5541 "no note specified for location tag '%s'", yyvsp[0].stringval);
5549 /* this is for bend on a non-tablature staff */
5550 if (Doing_tab_staff == YES) {
5551 yyerror("^ bend not allowed on tablature staff; use quoted bend string");
5554 add_slurto(Curr_grpsyl_p, yyvsp[-1].intval, yyvsp[0].intval,
5555 Curr_grpsyl_p->nnotes - 1, L_NORMAL);
5556 if (Curr_grpsyl_p->nnotes > 0) {
5557 Curr_grpsyl_p->notelist
5558 [Curr_grpsyl_p->nnotes - 1]
5568 /* this is for a small bend (1/4 step) on a non-tab staff */
5569 if (Doing_tab_staff == YES) {
5570 yyerror("^/ not allowed on tablature staff; use quoted bend string");
5572 else if (Curr_grpsyl_p != 0 && Curr_grpsyl_p->nnotes > 0) {
5573 Curr_grpsyl_p->notelist[Curr_grpsyl_p->nnotes - 1]
5582 if (Curr_grpsyl_p->grpcont == GC_NOTES &&
5583 Curr_grpsyl_p->nnotes > 0) {
5584 if ((Curr_grpsyl_p->notelist[Curr_grpsyl_p->nnotes - 1]
5585 .headshape = get_shape_num(yyvsp[0].stringval + 2))
5587 l_yyerror(Curr_filename, yylineno,
5588 "'%s' is not a valid head shape name",
5589 ascii_str(yyvsp[0].stringval, YES, NO, TM_NONE));
5593 yyerror("no note specified for headshape");
5595 FREE(yyvsp[0].stringval);
5602 yyval.intval = yyvsp[-1].intval + yyvsp[0].intval; /* total number of notes */
5616 switch (yyvsp[0].intval) {
5618 Curr_grpsyl_p->stemto = CS_ABOVE;
5621 Curr_grpsyl_p->stemto = CS_BELOW;
5624 yyerror("cross staff stem must be with 'above' or 'below'");
5625 Curr_grpsyl_p->stemto = CS_SAME;
5627 if (yyvsp[-1].intval == 0) {
5628 /* Maybe this wouldn't really hurt to allow,
5629 * but it's rather silly--why would user bother to go
5630 * to the trouble of saying there are cross staff stem
5631 * notes, but then not list any?
5633 yyerror("cross-staff stem note list is empty");
5635 yyval.intval = yyvsp[-1].intval;
5643 Curr_grpsyl_p->stemto_idx = Curr_grpsyl_p->nnotes;
5650 /* No notes. If this is for the list of "normal" staff notes,
5651 * and there are no "other" staff notes (for cross-staff stems),
5652 * this means use the same notes as the last group. */
5660 /* return number of notes in notelist */
5661 yyval.intval = yyvsp[-2].intval + 1;
5668 add_note(Curr_grpsyl_p, (int) PP_REST, 0, USE_DFLT_OCTAVE,
5676 /* temporarily stash uncompressibility (NO in this case)
5677 * in the octave field */
5678 add_note(Curr_grpsyl_p, (int) PP_SPACE, 0, NO,
5680 if (Curr_grpsyl_p->is_meas == YES && User_meas_time == YES) {
5681 yyerror("cannot specify time value on measure space");
5689 /* temporarily stash uncompressibility (YES in this case)
5690 * in the octave field */
5691 add_note(Curr_grpsyl_p, (int) PP_SPACE, 0, YES,
5693 if (Curr_grpsyl_p->is_meas == YES && User_meas_time == YES) {
5694 yyerror("cannot specify time value on measure uncompressible space");
5702 if (Curr_grpsyl_p->is_meas == YES) {
5703 if (User_meas_time == YES) {
5704 yyerror("cannot specify time value on m rpt");
5708 yyerror("rpt can only be used with m");
5710 add_note(Curr_grpsyl_p, (int) PP_RPT, 0, USE_DFLT_OCTAVE,
5718 if (yyvsp[0].intval == SINGLEBAR) {
5719 /* lexer thinks this is 'bar'
5720 * but is really 'b' 'a' 'r' */
5721 keyword_notes(yytext);
5723 else if (yyvsp[0].intval == ENDBAR) {
5724 /* lexer thinks this is 'endbar'
5725 * but is really 'en' 'd' 'b' 'a' 'r' */
5726 add_note(Curr_grpsyl_p, (int) 'e', 'n',
5727 USE_DFLT_OCTAVE, 0, NO, (char *) 0);
5728 keyword_notes(yytext + 2);
5731 yyerror("bar type not valid here");
5739 /* lexer thinks this is 'grace' but really 'g' 'r' 'a' 'c' 'e' */
5740 keyword_notes(yytext);
5747 if (yyvsp[0].intval == ENDING_BARRED) {
5748 keyword_notes(yytext);
5751 l_yyerror(Curr_filename, yylineno,
5752 "%s not valid here", yytext);
5760 if (yyvsp[0].intval == J_RAGPARA) {
5761 keyword_notes(yytext);
5764 l_yyerror(Curr_filename, yylineno,
5765 "%s not valid here", yytext);
5773 if (yyvsp[0].intval == BRACELIST) {
5774 keyword_notes(yytext);
5777 l_yyerror(Curr_filename, yylineno,
5778 "%s not valid here", yytext);
5786 if (yyvsp[0].intval == BASS) {
5787 keyword_notes(yytext);
5790 l_yyerror(Curr_filename, yylineno,
5791 "%s not valid here", yytext);
5799 Curr_grpsyl_p->notelist[Curr_grpsyl_p->nnotes - 1].note_has_paren = YES;
5806 if (Doing_tab_staff == YES) {
5807 add_note(Curr_grpsyl_p, yyvsp[-1].intval, 0, NOFRET, 0, NO, yyvsp[0].stringval);
5810 add_note(Curr_grpsyl_p, yyvsp[-1].intval, 0, USE_DFLT_OCTAVE, 0, NO, yyvsp[0].stringval);
5818 if (Doing_tab_staff == YES) {
5819 yyerror("extraneous parentheses around accidental");
5821 add_note(Curr_grpsyl_p, yyvsp[-4].intval, yyvsp[-2].intval, yyvsp[0].intval, 0, YES, (char *) 0);
5828 if (Doing_tab_staff == NO) {
5829 yyerror("extraneous parentheses around octave");
5831 add_note(Curr_grpsyl_p, yyvsp[-4].intval, 0, yyvsp[-2].intval, 0, YES, yyvsp[0].stringval);
5838 /* Whoops! The left paren was really for a new note,
5839 * which happens to be parenthesized. But beause yacc only
5840 * looks ahead one token, it finds out too late. So we
5841 * catch it here, push the parenthesis and pitch back into
5842 * the input and return back to the parent grammar rule,
5843 * since we now have complete note. */
5844 pushback(yytext[0]);
5846 add_note(Curr_grpsyl_p, yyvsp[-2].intval, 0,
5847 (Doing_tab_staff ? NOFRET : USE_DFLT_OCTAVE),
5855 add_note(Curr_grpsyl_p, yyvsp[-4].intval, yyvsp[-3].intval, yyvsp[-1].intval, yyvsp[-2].intval, NO, yyvsp[0].stringval);
5862 if (Doing_tab_staff == NO) {
5863 yyerror("extraneous parentheses around octave");
5865 add_note(Curr_grpsyl_p, yyvsp[-6].intval, yyvsp[-5].intval, yyvsp[-2].intval, yyvsp[-4].intval, YES, yyvsp[0].stringval);
5872 /* Whoops! The left paren was really for a new note,
5873 * which happens to be parenthesized. But beause yacc only
5874 * looks ahead one token, it finds out too late. So we
5875 * catch it here, push the parenthesis and pitch back into
5876 * the input and return back to the parent grammar rule,
5877 * since we now have complete note. */
5878 pushback(yytext[0]);
5880 add_note(Curr_grpsyl_p, yyvsp[-3].intval, yyvsp[-2].intval,
5881 (Doing_tab_staff ? NOFRET : USE_DFLT_OCTAVE),
5889 add_note(Curr_grpsyl_p, yyvsp[-3].intval, 0, yyvsp[-1].intval, yyvsp[-2].intval, NO, yyvsp[0].stringval);
5896 add_note(Curr_grpsyl_p, yyvsp[-5].intval, 0, yyvsp[-2].intval, yyvsp[-4].intval, YES, yyvsp[0].stringval);
5903 if (Doing_tab_staff == YES && yyvsp[-1].intval != '\0') {
5904 yyerror("accidental must be before fret number");
5906 add_note(Curr_grpsyl_p, yyvsp[-3].intval, yyvsp[-1].intval, yyvsp[-2].intval, 0, NO, yyvsp[0].stringval);
5913 add_note(Curr_grpsyl_p, yyvsp[-4].intval, yyvsp[-1].intval, yyvsp[-3].intval, 0, YES, (char *) 0);
5920 /* Whoops! The left paren was really for a new note,
5921 * which happens to be parenthesized. But beause yacc only
5922 * looks ahead one token, it finds out too late. So we
5923 * catch it here, push the parenthesis and pitch back into
5924 * the input and return back to the parent grammar rule,
5925 * since we now have complete note. */
5926 pushback(yytext[0]);
5928 add_note(Curr_grpsyl_p, yyvsp[-3].intval, 0, yyvsp[-2].intval, 0, NO, (char *) 0);
5935 yyval.stringval = (char *) 0;
5942 if (Doing_tab_staff == NO) {
5943 /* try to give helpful error message */
5944 if (get_shape_num(yyvsp[0].stringval + 2) != HS_UNKNOWN) {
5945 yyerror("missing 'hs' before headshape string");
5947 else if (strcmp(yyvsp[0].stringval + 2, "full") == 0 || isdigit(yyvsp[0].stringval[2])) {
5948 yyerror("bend string not allowed on non-tablature staff; use ^");
5951 yyerror("unexpected string");
5953 yyval.stringval = (char *) 0;
5961 /* return 'a' to 'g' value */
5962 yyval.intval = (int) *yytext;
5983 /* no octave or fret designation */
5984 yyval.intval = (Doing_tab_staff ? NOFRET : USE_DFLT_OCTAVE);
6034 yyval.intval = yyvsp[0].intval;
6041 /* we can't really fill in the actual octave yet, because
6042 * it may be different on different staffs or voices, so
6043 * we store the relative octave and fill in actual value
6046 /* this will be a negative number */
6047 yyval.intval = yyvsp[0].intval;
6054 /* we can't really fill in the actual octave yet, because
6055 * it may be different on different staffs or voices, so
6056 * we store the relative octave and fill in actual value
6059 yyval.intval = USE_DFLT_OCTAVE + yyvsp[0].intval;
6073 /* count up the number of minus signs */
6074 yyval.intval = yyvsp[-1].intval - 1;
6088 /* count up the number of plus signs */
6089 yyval.intval = yyvsp[-1].intval + 1;
6096 set_slurdir(Curr_grpsyl_p, Curr_grpsyl_p->nnotes - 1, yyvsp[0].intval);
6103 Slurstyle = yyvsp[0].intval;
6104 begin_slur(Curr_grpsyl_p, Curr_grpsyl_p->nnotes - 1);
6111 /* empty list. Only allowed if only one note in following
6112 * group. However, we don't know that yet, so marked pitch
6113 * as 'U' for unknown */
6114 add_slurto(Curr_grpsyl_p, 'U', USE_DFLT_OCTAVE,
6115 Curr_grpsyl_p->nnotes - 1, Slurstyle);
6122 add_slurto(Curr_grpsyl_p, 0, yyvsp[0].intval, Curr_grpsyl_p->nnotes - 1,
6130 if (Doing_tab_staff == YES) {
6131 yyerror("cannot specify string inside <> on tab staffs");
6134 add_slurto(Curr_grpsyl_p, yyvsp[-1].intval, yyvsp[0].intval,
6135 Curr_grpsyl_p->nnotes - 1, Slurstyle);
6143 /* save address associated with entire group */
6144 if ( yyvsp[0].stringval != (char *) 0) {
6145 addsym(yyvsp[0].stringval, Curr_grpsyl_p->c, CT_GRPSYL);
6154 yyval.stringval = strcpy(Stringbuff, yytext);
6161 /* a-g are usually pitches, but in this context, they
6162 * are 1-character variable names. */
6163 yyval.stringval = strcpy(Stringbuff, yytext);
6170 /* usually m means measure, but here it is the variable m */
6171 yyval.stringval = strcpy(Stringbuff, yytext);
6178 /* usually rest, here variable r */
6179 yyval.stringval = strcpy(Stringbuff, yytext);
6186 /* usually space, here variable s */
6187 yyval.stringval = strcpy(Stringbuff, yytext);
6194 /* usually uncompressible, here variable u */
6195 yyval.stringval = strcpy(Stringbuff, yytext);
6202 /* usually natural, here variable n */
6203 yyval.stringval = strcpy(Stringbuff, yytext);
6210 /* usually double sharp, here variable x */
6211 yyval.stringval = strcpy(Stringbuff, yytext);
6218 /* longer variable -- one with more than one character name */
6219 yyval.stringval = strcpy(Stringbuff, yytext);
6226 end_tuplet(yyvsp[-3].intval, yyvsp[-1].ratval, yyvsp[-2].intval, yyvsp[-4].intval);
6227 Getting_tup_dur = NO;
6234 /* nothing -- use default of when to print tuplet number/bracket */
6235 yyval.intval = PT_DEFAULT;
6242 /* don't print tuplet or bracket */
6243 yyval.intval = PT_NEITHER;
6250 /* print number only */
6251 yyval.intval = PT_NUMBER;
6258 if (*yytext == 'y') {
6259 yyval.intval = PT_BOTH;
6262 yyerror("tuplet number/bracket qualifier must be y or n or num");
6277 Getting_tup_dur = YES;
6284 yyval.intval = PL_UNKNOWN;
6291 if (yylval.intval == PL_BETWEEN) {
6292 yyerror("between not allowed for tuplet side");
6293 yyval.intval = PL_UNKNOWN;
6301 /* optional time value is missing */
6310 yyval.ratval = yyvsp[0].ratval;
6323 Last_grpsyl_p = Curr_grpsyl_p = (struct GRPSYL *) 0;
6336 /* empty, use default */
6337 begin_range(PL_UNKNOWN);
6338 yyval.intval = PL_UNKNOWN;
6345 begin_range(yyvsp[0].intval);
6352 /* means goes above or below all the staffs, regardless if
6353 * some happen to be invisible at the moment, so find top
6354 * or bottom visible staff as appropriate,and save that
6355 * away as the staff range */
6363 /* if staff_range == 0, then only one staff specified, so
6364 * use first staff number for both beginning and end of range */
6365 save_staff_range(yyvsp[-1].intval, (yyvsp[0].intval == 0 ? yyvsp[-1].intval : yyvsp[0].intval) );
6382 yyval.intval = yyvsp[0].intval;
6383 if (yyvsp[0].intval == 0) {
6384 yyerror("staff of 0 is illegal");
6392 chk_range_type(YES);
6393 yyval.intval = yyvsp[0].intval;
6399 { Place = yyvsp[0].intval; }
6411 if (*yytext != 'c') {
6412 yyerror("verse must be 'c' or number(s)");
6415 save_vno_range(0, 0);
6435 /* if end of range is 0, not really a range, use first number
6436 * for both beginning and end */
6437 lyr_verse(yyvsp[-1].intval, (yyvsp[0].intval == 0 ? yyvsp[-1].intval : yyvsp[0].intval));
6452 yyval.intval = yyvsp[0].intval;
6459 /* null token to allocate a GRPSYL for a lyric */
6460 Last_grpsyl_p = Curr_grpsyl_p;
6461 Curr_grpsyl_p = newGRPSYL(GS_SYLLABLE);
6462 if (Last_grpsyl_p == (struct GRPSYL *) 0) {
6463 Lyrics_p = Curr_grpsyl_p;
6471 /* If user didn't specify a place, fix that. */
6472 if (Place == PL_UNKNOWN) {
6475 /* copies of the lyrics info has been made for all staffs/verses
6476 * at this point, so get rid of master copy */
6477 free_grpsyls(Lyrics_p);
6484 /* empty -- need to derive times from music */
6485 Lyrics_p = derive_lyrtime();
6492 link_notegroup(Curr_grpsyl_p, Last_grpsyl_p);
6493 /* Save pointer to current GRPSYL in case the next
6494 * group gets its time value based on this one,
6495 * and there are additive times on this one. */
6496 Prev_grpsyl_p = Curr_grpsyl_p;
6497 /* If there are additive times, add those in.
6498 * We don't need to make extra groups for lyrics, because we
6499 * don't need to tie groups together--the lyrics time
6500 * can hold any legal RATIONAL, even those that aren't
6501 * specifiable with a single time value. */
6502 if (Extra_time_p != 0) {
6503 struct TIMELIST *timelist_p;
6504 for (timelist_p = Extra_time_p; timelist_p != 0;
6505 timelist_p = timelist_p->next) {
6506 Curr_grpsyl_p->fulltime = radd(Curr_grpsyl_p->fulltime, timelist_p->fulltime);
6521 end_tuplet(yyvsp[-1].intval, yyvsp[0].ratval, NO, PL_UNKNOWN);
6522 Getting_tup_dur = NO;
6529 /* empty, will fill in an actual syllable later */
6530 Curr_grpsyl_p->syl = (char *) 0;
6537 /* space, not a lyric, so mark for later use */
6538 Curr_grpsyl_p->grpcont = GC_SPACE;
6545 /* If no [verseno] is specified, use -1 as special flag
6546 * to be resolved later to "one more than previous",
6547 * or if there wasn't a previous, to verse 1.
6550 proc_lyrics(Lyrics_p, yyvsp[-1].stringval);
6557 proc_lyrics(Lyrics_p, yyvsp[-1].stringval);
6564 Currstruct_p = (struct MAINLL *) 0;
6565 /* If there are alternating time signature,
6566 * add an implicit time signature SSV for the
6567 * next time signature in the list.
6569 if (Alt_timesig_list != 0) {
6572 Currstruct_p = newMAINLLstruct(S_SSV, -1);
6573 Currstruct_p->u.ssv_p->context = Context;
6574 if (Tsig_visibility == PTS_ALWAYS &&
6575 Next_alt_timesig != Alt_timesig_list) {
6576 /* If user wants alternating time signatures
6577 * printed on every measure, if there is
6578 * a multirest, we will print multiple
6579 * time signatures there, and might have to
6580 * wrap around to the beginning of the list.
6581 * So make a copy of the entire list,
6582 * starting from wherever we are now,
6583 * wrapping around to the beginning,
6584 * and ending just before where we are now.
6586 * there probably won't be a multirest,
6587 * so this will be a waste, but unfortunately,
6588 * we don't know yet whether there will be
6589 * one or not, so need to do the whole list
6592 * Calculate length of the two pieces:
6593 * from where we are to end, and from
6594 * beginning to where we are.
6598 remlength = strlen(Next_alt_timesig);
6599 wraplength = strlen(Alt_timesig_list)
6601 /* need one more for terminator. */
6602 MALLOCA(char, Currstruct_p->u.ssv_p->timerep,
6603 remlength + wraplength + 1);
6605 /* copy remainder into beginning */
6606 strcpy(Currstruct_p->u.ssv_p->timerep,
6608 /* copy the wrap-around part of list,
6609 * but move the TSR_ALTERNATING from the
6610 * end of that part to between the two parts */
6611 Currstruct_p->u.ssv_p->timerep[remlength]
6613 strncpy(Currstruct_p->u.ssv_p->timerep +
6614 remlength + 1, Alt_timesig_list,
6616 /* Add the terminator */
6617 Currstruct_p->u.ssv_p->timerep
6618 [remlength + wraplength]
6621 assign_timesig(Currstruct_p, PTS_ALWAYS,
6625 /* Make this new copy the new
6626 * head of the list */
6628 Currstruct_p->u.ssv_p->timerep;
6631 /* make a copy of the remaining alternating
6632 * signatures and assign that */
6633 MALLOCA(char, Currstruct_p->u.ssv_p->timerep,
6634 strlen(Next_alt_timesig) + 1);
6635 strcpy(Currstruct_p->u.ssv_p->timerep,
6637 assign_timesig(Currstruct_p,
6638 (Tsig_visibility == PTS_ALWAYS ?
6639 PTS_ALWAYS : PTS_NEVER),
6642 /* If we reached end of list, start over */
6643 if (Next_alt_timesig == 0) {
6644 Next_alt_timesig = Alt_timesig_list;
6648 asgnssv(Currstruct_p->u.ssv_p);
6658 struct MAINLL * mll_p;
6662 name = (yylval.intval == YES ? "newpage" : "newscore");
6664 (void) contextcheck(C_MUSIC | C_BLOCK, name);
6665 Currstruct_p = newMAINLLstruct(S_FEED, yylineno);
6666 Currstruct_p->u.feed_p->pagefeed = yyvsp[0].intval;
6668 /* make sure we're not in the middle of a measure. Go
6669 * backwards in main list. If we hit STAFF before a BAR,
6670 * then there is a problem.
6672 for (mll_p = Mainlltc_p; mll_p != (struct MAINLL *) 0;
6673 mll_p = mll_p->prev) {
6675 if (mll_p->str == S_BAR) {
6678 else if (mll_p->str == S_STAFF) {
6679 l_yyerror(Curr_filename, yylineno,
6680 "%s not allowed in middle of measure",
6684 else if (mll_p->str == S_FEED) {
6685 if (mll_p->prev != 0 &&
6686 mll_p->prev->str == S_BLOCKHEAD) {
6687 /* This is a feed following a block.
6688 * If it was an implicit feed,
6689 * we can get rid of it, because
6690 * user now put an explicit one.
6692 if (mll_p->inputlineno == -1) {
6693 unlinkMAINLL(mll_p);
6696 /* We must be in block context,
6697 * so no need to check farther back.
6702 l_yyerror(Curr_filename, yylineno,
6703 "consecutive newscore/newpage not allowed");
6708 insertMAINLL(Currstruct_p, Mainlltc_p);
6710 /* If this is inside a block, we need to create a new block
6711 * and feed after it.
6713 if (Context == C_BLOCK) {
6714 CALLOC(BLOCKHEAD, Currblock_p, 1);
6715 set_win_coord(Currblock_p->c);
6716 Next_print_link_p_p = &(Currblock_p->printdata_p);
6717 insertMAINLL(newMAINLLstruct(S_BLOCKHEAD, yylineno),
6719 Mainlltc_p->u.blockhead_p = Currblock_p;
6720 insertMAINLL(newMAINLLstruct(S_FEED, -1), Mainlltc_p);
6729 Currstruct_p = (struct MAINLL *) 0;
6736 yyvsp[0].floatval = adjust2inches(yyvsp[0].floatval); /* in case we are in centimeter mode */
6737 if (yyvsp[-2].intval == RIGHTMARGIN) {
6738 if (Currstruct_p->u.feed_p->rightmargin >= 0) {
6739 l_warning(Curr_filename, yylineno,
6740 "rightmargin specified more than once, using last instance");
6741 /* fall through to override the previous */
6743 Currstruct_p->u.feed_p->rightmargin = yyvsp[0].floatval;
6745 else if (yyvsp[-2].intval == LEFTMARGIN) {
6746 if (Currstruct_p->u.feed_p->leftmargin >= 0) {
6747 l_warning(Curr_filename, yylineno,
6748 "leftmargin specified more than once, using last instance");
6749 /* fall through to override the previous */
6751 Currstruct_p->u.feed_p->leftmargin = yyvsp[0].floatval;
6754 yyerror("unexpected parameter; only 'leftmargin' or 'rightmargin' allowed here");
6756 chkmargin(Score.topmargin, Score.botmargin,
6757 Currstruct_p->u.feed_p->leftmargin,
6758 Currstruct_p->u.feed_p->rightmargin);
6766 /* build a BAR struct and add it to the main list */
6767 if (contextcheck(C_MUSIC, "bar") == YES) {
6769 Currstruct_p = newMAINLLstruct(S_BAR, yylineno);
6770 Currstruct_p->u.bar_p->bartype = (short) yylval.intval;
6771 Currstruct_p->u.bar_p->endingloc = Endingloc;
6772 if (yyvsp[-2].intval != L_NORMAL) {
6773 if (yyvsp[-2].intval != L_DASHED && yyvsp[-2].intval != L_DOTTED) {
6774 yyerror("bar modifier can only be 'dashed' or 'dotted'");
6776 else if (yyvsp[0].intval != SINGLEBAR && yyvsp[0].intval != DOUBLEBAR) {
6777 yyerror("only 'bar' or 'dblbar' can be dashed or dotted");
6780 Currstruct_p->u.bar_p->linetype = yyvsp[-2].intval;
6781 insertMAINLL(Currstruct_p, Mainlltc_p);
6782 Currstruct_p->u.bar_p->timedssv_p = tssv_sort();
6784 /* re-order things in the bar,
6785 * make sure they are all consistent, etc */
6786 do_bar(yyvsp[0].intval);
6790 if (yyvsp[0].intval == RESTART && Endingloc != NOITEM) {
6791 yyerror("restart cannot be used inside an ending");
6794 /* User can specify bar type to use on preceeding staff when
6795 * a repeatstart gets moved to the next scores's pseudo-bar */
6796 if (yyvsp[-1].intval != -1) {
6797 if (yyvsp[0].intval != REPEATSTART) {
6798 yyerror("bar type for preceeding score only allowed on repeatstart");
6800 if (Currstruct_p != 0 && Currstruct_p->u.bar_p != 0) {
6801 Currstruct_p->u.bar_p->precbartype = yyvsp[-1].intval;
6805 /* Default is single bar. It could be argued that in
6806 * the case of a key change on this bar, it really
6807 * should be a dblbar, but user can force that
6808 * if they want it. */
6809 if (Currstruct_p != 0 && Currstruct_p->u.bar_p != 0) {
6810 Currstruct_p->u.bar_p->precbartype = SINGLEBAR;
6819 yyval.intval = -1; /* special value to mean "none specified" */
6826 /* Parens wouldn't be strictly necessary to be able to parse,
6827 * but seem useful semantically to make it clear this is
6828 * optional, only applying when repeatstart is moved to
6829 * next score's pseudo bar. */
6830 yyval.intval = yyvsp[-1].intval;
6837 if (Currstruct_p != (struct MAINLL *) 0) {
6838 Currstruct_p->u.bar_p->padding += yyvsp[0].floatval * STEPSIZE;
6846 if (Currstruct_p != (struct MAINLL *) 0) {
6847 /* fill in location info */
6848 if (yyvsp[0].stringval != (char *) 0) {
6849 addsym(yyvsp[0].stringval, Currstruct_p->u.bar_p->c, CT_BAR);
6858 if (Got_ending == YES) {
6859 yyerror("Only one ending allowed per bar");
6863 if (Currstruct_p != (struct MAINLL *) 0) {
6864 if (Currstruct_p->u.bar_p->bartype == RESTART) {
6865 yyerror("ending not allowed on restart");
6867 /* fill in ending label if any */
6868 Currstruct_p->u.bar_p->endinglabel = yyvsp[0].stringval;
6869 Currstruct_p->u.bar_p->endingloc = Endingloc;
6870 ped_endings(Endingloc);
6872 /* for next time around, figure out what endingloc will
6873 * be if user doesn't specify something different */
6874 switch (Endingloc) {
6891 if (Currstruct_p != 0) {
6892 if (Currstruct_p->u.bar_p->bartype == RESTART) {
6893 yyerror("hidechanges not allowed on restart");
6895 Currstruct_p->u.bar_p->hidechanges = YES;
6903 if (Currstruct_p != 0) {
6904 set_mnum(Currstruct_p->u.bar_p, yyvsp[0].intval);
6912 /* +2 to skip font/size */
6913 init_reh(-1, yyvsp[0].stringval + 2, Currstruct_p);
6920 init_reh(yyvsp[0].intval, (char *)0, Currstruct_p);
6927 if (Currstruct_p != (struct MAINLL *) 0) {
6928 set_reh_string(Currstruct_p->u.bar_p, yyvsp[-4].intval, yyvsp[-3].intval, yyvsp[-2].intval, yyvsp[-1].stringval);
6929 Currstruct_p->u.bar_p->dist = Dist;
6930 Currstruct_p->u.bar_p->dist_usage = Dist_usage;
6938 yyval.stringval = yyvsp[0].stringval;
6939 (void) fix_string(yyvsp[0].stringval, FONT_TR, DFLT_SIZE, Curr_filename, yylineno);
6940 Endingloc = STARTITEM;
6947 if (Endingloc == NOITEM) {
6948 yyerror("no ending in progress");
6951 Endingloc = ENDITEM;
6953 yyval.stringval = (char *) 0;
6960 /* null token to check for more than one rehearsal mark
6962 if (Currstruct_p != (struct MAINLL *) 0 &&
6963 Currstruct_p->u.bar_p->reh_type != REH_NONE) {
6964 yyerror("only one rehearsal mark allowed per bar");
6972 if (Currstruct_p != (struct MAINLL *) 0) {
6973 Currstruct_p->u.bar_p->reh_type = REH_STRING;
6981 if (Currstruct_p != (struct MAINLL *) 0) {
6982 Currstruct_p->u.bar_p->reh_type = REH_MNUM;
6984 yyval.stringval = (char *) 0;
6991 if (Currstruct_p != (struct MAINLL *) 0) {
6992 Currstruct_p->u.bar_p->reh_type = REH_NUM;
6994 yyval.stringval = (char *) 0;
7001 if (Currstruct_p != (struct MAINLL *) 0) {
7002 Currstruct_p->u.bar_p->reh_type = REH_LET;
7004 yyval.stringval = (char *) 0;
7011 yyval.inpcoord_p = yyvsp[-4].inpcoord_p;
7018 /* null token to allocate an INPCOORD */
7019 CALLOC(INPCOORD, Curr_loc_info_p, 1);
7020 yyval.inpcoord_p = Curr_loc_info_p;
7021 /* set to positive in case input starts with an absolute
7030 /* reset sign to positive in case y coordinate is absolute */
7038 /* only 1 of these allowed per location */
7039 if (Curr_loc_info_p->hor_p != (float *) 0) {
7040 pfatal("only one horizontal location variable allowed per coordinate");
7042 /* fill in the coord address and type */
7043 Curr_loc_info_p->hor_p = symval(yyvsp[-2].stringval, &(Curr_loc_info_p->hor_p));
7044 Curr_loc_info_p->htype = yyvsp[0].intval;
7051 /* only valid letters is w */
7052 if (*yytext != 'w') {
7053 yyerror("invalid direction: must be x, w, or e");
7069 /* only valid value is e */
7070 if (*yytext != 'e') {
7071 yyerror("invalid direction: must be x, w, or e");
7080 yyval.intval = Plus_minus = 1;
7087 yyval.intval = Plus_minus = -1;
7094 Curr_loc_info_p->hsteps += yyvsp[0].floatval * (float) Plus_minus;
7101 if (Curr_loc_info_p->hor_p == (float *) 0) {
7102 yyerror("must specify location before giving time offset");
7104 /* add or subtract time value from horizontal */
7105 if (Plus_minus == 1) {
7106 Curr_loc_info_p->counts += yyvsp[0].floatval;
7109 Curr_loc_info_p->counts -= yyvsp[0].floatval;
7117 /* only one of these allowed per location */
7118 if (Curr_loc_info_p->vert_p != (float *) 0) {
7119 pfatal("only one vertical location variable allowed per coordinate");
7121 /* fill in the coord address and type */
7122 Curr_loc_info_p->vert_p = symval(yyvsp[-2].stringval, &(Curr_loc_info_p->vert_p));
7123 Curr_loc_info_p->vtype = yyvsp[0].intval;
7145 /* only valid value here is y */
7146 if (*yytext != 'y') {
7147 yyerror("invalid direction: must be y, n, or s");
7162 /* this is number of steps up (or down if negative) */
7163 Curr_loc_info_p->vsteps += yyvsp[0].floatval * (float) Plus_minus;
7170 yyval.floatval = (float) yyvsp[0].intval;
7177 sprintf(Tmpbuff,"%d.%s", yyvsp[-2].intval, yyvsp[0].stringval);
7178 yyval.floatval = (float) atof(Tmpbuff);
7185 sprintf(Tmpbuff,"0.%s", yyvsp[0].stringval);
7186 yyval.floatval = (float) atof(Tmpbuff);
7193 /* no decimal fraction part of float number */
7194 yyval.stringval = "";
7201 yyval.stringval = yytext;
7208 Currstruct_p->u.line_p->linetype = yyvsp[-6].intval;
7209 Currstruct_p->u.line_p->start = *(yyvsp[-3].inpcoord_p);
7210 Currstruct_p->u.line_p->end = *(yyvsp[-1].inpcoord_p);
7211 rep_inpcoord(yyvsp[-3].inpcoord_p, &(Currstruct_p->u.line_p->start));
7212 rep_inpcoord(yyvsp[-1].inpcoord_p, &(Currstruct_p->u.line_p->end));
7213 Currstruct_p->u.line_p->string = yyvsp[0].stringval;
7215 /* copies of the location info went into the LINE struct,
7216 * so we can free the original copy of the information */
7217 if (yyvsp[-3].inpcoord_p) {
7218 FREE(yyvsp[-3].inpcoord_p);
7220 if (yyvsp[-1].inpcoord_p) {
7221 FREE(yyvsp[-1].inpcoord_p);
7223 insertMAINLL(Currstruct_p, Mainlltc_p);
7224 Currstruct_p = (struct MAINLL *) 0;
7231 /* null token to cause allocation of LINE struct */
7232 (void) contextcheck(C_MUSIC, "line");
7233 Currstruct_p = newMAINLLstruct(S_LINE, yylineno);
7240 yyval.intval = L_NORMAL;
7247 yyval.stringval = 0;
7254 yyval.stringval = fix_string(yyvsp[0].stringval, Titlefont, Titlesize, Curr_filename, yylineno);
7261 if (yyvsp[-6].intval == L_WAVY) {
7262 l_yyerror(Curr_filename, yylineno,
7263 "wavy curve not allowed");
7265 Currstruct_p->u.curve_p->curvetype = yyvsp[-6].intval;
7266 insertMAINLL(Currstruct_p, Mainlltc_p);
7267 Currstruct_p = (struct MAINLL *) 0;
7274 (void) contextcheck(C_MUSIC, "curve");
7275 Currstruct_p = newMAINLLstruct(S_CURVE, yylineno);
7277 /* get space for a list of locations and mark it as empty */
7279 Currstruct_p->u.curve_p->ncoord = (short) Item_count;
7280 Currstruct_p->u.curve_p->nbulge = (short) Item_count;
7281 MALLOC(INPCOORD, Currstruct_p->u.curve_p->coordlist, ITEMS);
7289 /* get enough space to store some values if don't have enough */
7290 if (Currstruct_p->u.curve_p->nbulge == 0) {
7291 MALLOCA(float, Currstruct_p->u.curve_p->bulgelist, ITEMS);
7293 else if ( (Currstruct_p->u.curve_p->nbulge % ITEMS) == 0) {
7294 REALLOCA(float, Currstruct_p->u.curve_p->bulgelist,
7295 Currstruct_p->u.curve_p->nbulge + ITEMS);
7298 /* fill in the value and increment the count of how many */
7299 Currstruct_p->u.curve_p->bulgelist[Currstruct_p->u.curve_p->nbulge] = yyvsp[-1].intval * yyvsp[0].floatval;
7300 (Currstruct_p->u.curve_p->nbulge)++;
7307 struct INPCOORD *curve_inpcoord_p;
7309 /* If ran off end of list, make list bigger.
7310 * We cannot use REALLOC here, since we need to update
7311 * the tag reference information on each individual array
7312 * element, so we alloc all new space, copy the existing data,
7313 * and update the tag references, then free the old space,
7314 * and redirect the pointer to the new space. */
7315 if (Currstruct_p->u.curve_p->ncoord >= Max_items) {
7316 struct INPCOORD *newlist_p;
7319 MALLOC(INPCOORD, newlist_p, Max_items);
7320 for (n = 0; n < Currstruct_p->u.curve_p->ncoord; n++) {
7321 newlist_p[n] = Currstruct_p->u.curve_p->coordlist[n];
7323 &(Currstruct_p->u.curve_p->coordlist[n]),
7326 FREE(Currstruct_p->u.curve_p->coordlist);
7327 Currstruct_p->u.curve_p->coordlist = newlist_p;
7330 /* Add this entry to the end of the list, update the
7331 * tag reference to point to this permanent copy rather
7332 * the temporary one we will be deleting, and update the
7333 * count of how many elements in the list. */
7334 curve_inpcoord_p = &(Currstruct_p->u.curve_p->coordlist
7335 [Currstruct_p->u.curve_p->ncoord]);
7336 *curve_inpcoord_p = *(yyvsp[0].inpcoord_p);
7337 rep_inpcoord(yyvsp[0].inpcoord_p, curve_inpcoord_p);
7338 (Currstruct_p->u.curve_p->ncoord)++;
7339 FREE(yyvsp[0].inpcoord_p);
7348 Defining_multiple = NO;
7355 chk_stuff_header(yyvsp[-4].intval, yyvsp[-3].intval, yyvsp[-2].intval, Dist_usage);
7363 /* Separate rule for phrase because it has the linetype
7364 * modifier in front, unlike any other STUFF. The size,
7365 * and dist are not really allowed, but we match them
7366 * if they are there in order to give more clear error
7367 * message than just "syntax error," since there was
7368 * already code elsewhere to check for these errors.
7370 set_stuff_type(ST_PHRASE);
7371 chk_stuff_header(yyvsp[-3].intval, yyvsp[-5].intval, yyvsp[-2].intval, Dist_usage);
7379 /* need a separate rule for midi, because it can include
7380 * a voice as well as staff. It also cannot have the chord,
7381 * size or place, although those are checked elsewhere anyway */
7382 chk_stuff_header(-1, NO, PL_UNKNOWN, SD_NONE);
7389 set_stuff_type(ST_MIDI);
7390 begin_range(PL_UNKNOWN);
7405 /* dummy token for sole purpose of saving away current
7406 * stuff type. We have to do this in order to have it in
7407 * time to figure out the default place for "all" */
7408 set_stuff_type(yyvsp[0].intval);
7415 Curr_family = yyvsp[-1].intval;
7417 switch (yyvsp[0].intval) {
7419 yyval.intval = ST_ROM;
7422 yyval.intval = ST_ITAL;
7425 yyval.intval = ST_BOLD;
7428 yyval.intval = ST_BOLDITAL;
7431 pfatal("unknown font");
7440 if (yyvsp[0].intval != L_NORMAL) {
7441 /* user used 'dotted' or 'dashed' which applies only
7442 * to use of T_L_ANGLE for slurs. Use generic error
7443 * message so looks like any other similar error. */
7444 yyerror("syntax error");
7446 yyval.intval = ST_CRESC;
7453 yyval.intval = ST_DECRESC;
7460 yyval.intval = ST_PEDAL;
7467 yyval.intval = ST_MUSSYM;
7474 yyval.intval = ST_OCTAVE;
7481 /* use -1 to indicate user didn't specify so must use default */
7489 yyval.intval = yyvsp[-1].intval;
7496 yyval.intval = TM_NONE;
7503 yyval.intval = yyvsp[0].intval;
7511 Dist_usage = SD_NONE;
7518 if (yyvsp[-1].intval != DIST) {
7519 yyerror("unexpected parameter name instead of 'dist'");
7522 if (rangecheck(yyvsp[0].intval, -MAXDIST, MAXDIST, "dist") == YES) {
7523 Dist = yyvsp[0].intval;
7532 yyval.intval = yyvsp[-1].intval;
7539 if (Dist_usage != SD_FORCE) {
7540 l_warning(Curr_filename, yylineno,
7541 "negative dist requires !, setting to 0");
7545 yyval.intval = - yyvsp[-1].intval;
7553 Dist_usage = SD_MIN;
7560 Dist_usage = SD_FORCE;
7567 add_stuff_item(yyvsp[-4].floatval, yyvsp[-3].floatval, Gracebackup, yyvsp[-2].stringval, Til_bars, Til_offset,
7577 yyval.floatval = yyvsp[-1].floatval;
7591 Gracebackup = yyvsp[-1].intval;
7598 yyval.floatval = 0.0;
7605 yyval.floatval = yyvsp[-1].floatval * (float) yyvsp[-2].intval;
7612 yyval.stringval = (char *) 0;
7619 if (get_stuff_type() != ST_PEDAL) {
7620 yyerror("'*' only valid with pedal");
7622 MALLOCA(char, yyval.stringval, 12);
7623 yyval.stringval[0] = FONT_MUSIC;
7624 yyval.stringval[1] = DFLT_SIZE;
7625 sprintf(yyval.stringval + 2, "\\(endped)");
7632 yyval.stringval = yyvsp[0].stringval;
7651 /** if there is a non-empty til_suffix, the floatnum better
7652 ** have been an integer, and is really the number
7654 if (yyvsp[0].intval == YES) {
7655 Til_bars = (int) yyvsp[-1].floatval;
7656 if (yyvsp[-1].floatval - Til_bars != 0.0) {
7657 yyerror("number of measures in til clause must be a whole number");
7661 /* only a number, that means it was really a beat offset */
7662 Til_offset = yyvsp[-1].floatval;
7691 Til_offset = yyvsp[0].floatval;
7721 /* save staffnum and voice 1 for start of roll */
7722 rollparam(yyvsp[0].intval, 1, -1, -1);
7729 /* save staff and voice for start of roll */
7730 rollparam(yyvsp[-1].intval, yyvsp[0].intval, -1, -1);
7737 /* save staffnum, voice 1 for end of roll */
7738 rollparam(-1, -1, yyvsp[0].intval, 1);
7745 /* save staffnum and voice for end of roll */
7746 rollparam(-1, -1, yyvsp[-1].intval, yyvsp[0].intval);
7753 rolloffset( (double) yyvsp[-1].floatval);
7760 rolloffset( (double) yyvsp[-1].floatval);
7767 if (Curr_family == FAMILY_DFLT) {
7768 Curr_family = Score.fontfamily;
7770 Extra = extra_needed(Curr_family + Curr_font, Curr_size, yyvsp[0].stringval);
7771 proc_printcmd(yyvsp[-2].intval, Curr_loc_info_p, yyvsp[0].stringval, Curr_family + Curr_font,
7772 Curr_size, yyvsp[-1].intval, NO, (yyvsp[-1].intval == YES ? Extra : (double) 0.0));
7779 if (yyvsp[-1].intval == YES) {
7780 warning("nl ignored for postscript");
7782 proc_printcmd(J_NONE, Curr_loc_info_p, yyvsp[0].stringval, FONT_UNKNOWN,
7783 DFLT_SIZE, NO, YES, (double) 0.0);
7798 /* this means print at default location */
7799 Curr_loc_info_p = (struct INPCOORD *) 0;
7807 Curr_loc_info_p = (struct INPCOORD *) 0;
7822 /* Line 1016 of /usr/share/bison/yacc.c. */
7823 #line 7824 "y.tab.c"
7832 short *yyssp1 = yyss - 1;
7833 YYFPRINTF (stderr, "state stack now");
7834 while (yyssp1 != yyssp)
7835 YYFPRINTF (stderr, " %d", *++yyssp1);
7836 YYFPRINTF (stderr, "\n");
7843 /* Now `shift' the result of the reduction. Determine what state
7844 that goes to, based on the state we popped back to and the rule
7845 number reduced by. */
7849 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7850 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7851 yystate = yytable[yystate];
7853 yystate = yydefgoto[yyn - YYNTOKENS];
7858 /*------------------------------------.
7859 | yyerrlab -- here on detecting error |
7860 `------------------------------------*/
7862 /* If not already recovering from an error, report this error. */
7867 yyn = yypact[yystate];
7869 if (YYPACT_NINF < yyn && yyn < YYLAST)
7871 YYSIZE_T yysize = 0;
7872 int yytype = YYTRANSLATE (yychar);
7877 /* Start YYX at -YYN if negative to avoid negative indexes in
7879 for (yyx = yyn < 0 ? -yyn : 0;
7880 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
7881 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
7882 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
7883 yysize += yystrlen ("parse error, unexpected ") + 1;
7884 yysize += yystrlen (yytname[yytype]);
7885 yymsg = (char *) YYSTACK_ALLOC (yysize);
7888 char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
7889 yyp = yystpcpy (yyp, yytname[yytype]);
7894 for (yyx = yyn < 0 ? -yyn : 0;
7895 yyx < (int) (sizeof (yytname) / sizeof (char *));
7897 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
7899 const char *yyq = ! yycount ? ", expecting " : " or ";
7900 yyp = yystpcpy (yyp, yyq);
7901 yyp = yystpcpy (yyp, yytname[yyx]);
7906 YYSTACK_FREE (yymsg);
7909 yyerror ("parse error; also virtual memory exhausted");
7912 #endif /* YYERROR_VERBOSE */
7913 yyerror ("parse error");
7918 /*----------------------------------------------------.
7919 | yyerrlab1 -- error raised explicitly by an action. |
7920 `----------------------------------------------------*/
7922 if (yyerrstatus == 3)
7924 /* If just tried and failed to reuse lookahead token after an
7925 error, discard it. */
7927 /* Return failure if at end of input. */
7928 if (yychar == YYEOF)
7930 /* Pop the error token. */
7932 /* Pop the rest of the stack. */
7933 while (yyssp > yyss)
7935 YYDPRINTF ((stderr, "Error: popping "));
7936 YYDSYMPRINT ((stderr,
7939 YYDPRINTF ((stderr, "\n"));
7940 yydestruct (yystos[*yyssp], *yyvsp);
7946 YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
7947 yychar, yytname[yychar1]));
7948 yydestruct (yychar1, yylval);
7952 /* Else will try to reuse lookahead token after shifting the error
7955 yyerrstatus = 3; /* Each real token shifted decrements this. */
7959 yyn = yypact[yystate];
7960 if (yyn != YYPACT_NINF)
7963 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
7971 /* Pop the current state because it cannot handle the error token. */
7975 YYDPRINTF ((stderr, "Error: popping "));
7976 YYDSYMPRINT ((stderr,
7977 yystos[*yyssp], *yyvsp));
7978 YYDPRINTF ((stderr, "\n"));
7980 yydestruct (yystos[yystate], *yyvsp);
7988 short *yyssp1 = yyss - 1;
7989 YYFPRINTF (stderr, "Error: state stack now");
7990 while (yyssp1 != yyssp)
7991 YYFPRINTF (stderr, " %d", *++yyssp1);
7992 YYFPRINTF (stderr, "\n");
8000 YYDPRINTF ((stderr, "Shifting error token, "));
8009 /*-------------------------------------.
8010 | yyacceptlab -- YYACCEPT comes here. |
8011 `-------------------------------------*/
8016 /*-----------------------------------.
8017 | yyabortlab -- YYABORT comes here. |
8018 `-----------------------------------*/
8024 /*----------------------------------------------.
8025 | yyoverflowlab -- parser overflow comes here. |
8026 `----------------------------------------------*/
8028 yyerror ("parser stack overflow");
8036 YYSTACK_FREE (yyss);
8048 /* print error message along with current filename and line number */
8056 if (strncmp(msg, "syntax error", 12) == 0 ||
8057 strncmp(msg, "parse error", 11) == 0) {
8058 /* beef up yacc's default syntax error message */
8059 if (*yytext == '\n') {
8060 l_yyerror(Curr_filename, yylineno,
8061 "error detected at end of line (maybe missing semicolon or other required element?)");
8064 l_yyerror(Curr_filename, yylineno,
8065 "error detected at '%s'", yytext);
8069 l_yyerror(Curr_filename, yylineno, "%s", msg);
8072 /* return something to keep lint happy */
8077 /* if argument is surrounded by double quotes, remove them and return the
8078 * unquoted string. Actually just NULL out the end quote and return a
8079 * pointer to beyond the leading quote */
8089 p = string + strlen(string) - 1;
8093 return( *string == '"' ? string + 1 : string);
8097 /* make sure each header/footer type specified only once */
8100 chkdup_headfoot(flag, which)
8102 int flag; /* if non-zero, had gotten this head/foot before */
8103 char *which; /* header, footer, header2 or footer2 */
8107 l_yyerror(Curr_filename, yylineno,
8108 "%s context specified more than once", which);
8113 /* when entering new context, need to save away everything about current one */
8119 struct MAINLL *place_p; /* where to insert SSV in main list */
8122 /* assume we will place at the end of main list. Later we'll set
8123 * the right value if that assumption is wrong */
8124 place_p = Mainlltc_p;
8126 /* If current main list item hasn't been added to list yet,
8128 if (Currstruct_p != (struct MAINLL *) 0 && Currstruct_p != place_p) {
8130 if (Currstruct_p->str == S_SSV) {
8132 if (List_of_staffs_p != (struct MAINLL *) 0) {
8133 yyerror("can't change context inside a measure");
8134 Currstruct_p = (struct MAINLL *) 0;
8138 /* if is an SSV struct, we also need to set the
8139 * correct values at this point, because the
8140 * parser needs to know current values of some
8141 * things (like font and point size) */
8142 asgnssv(Currstruct_p->u.ssv_p);
8144 /* if this SSV is after a FEED, we have to move it
8145 * before the FEED in order to follow the rules of
8146 * what comes when on the main list */
8147 for ( ; place_p != (struct MAINLL *) 0 &&
8148 place_p->str == S_FEED;
8149 place_p = place_p->prev) {
8153 insertMAINLL(Currstruct_p, place_p);
8156 if (Currstruct_p != 0 && Currstruct_p->str == S_SSV) {
8157 /* memorize or recall beamstyle and timeunit if appropriate */
8158 remember_tsig_params(Currstruct_p);
8161 Curr_grpsyl_p = (struct GRPSYL *) 0;
8162 Currblock_p = (struct BLOCKHEAD *) 0;
8167 /* if defining more than one voice at the moment, not valid to set
8168 * a location variable. Print message and reset flag so we don't
8169 * give any more of the same message this measure */
8175 if (Defining_multiple == YES) {
8176 yyerror("location tag is only allowed when defining a single voice");
8177 Defining_multiple = NO;
8179 else if (Chord_at_a_time == YES) {
8180 yyerror("location tag not allowed with chord-at-a-time input");
8185 /* do a print command like left, right, or center. Allocate a PRINTDATA
8186 * struct and fill in all the information about what to print and where
8190 proc_printcmd(justifytype, inpc_p, str, font, size, got_nl, isPostScript, extra)
8192 int justifytype; /* J_LEFT, etc */
8193 struct INPCOORD *inpc_p; /* where to print */
8194 char *str; /* the string to print */
8197 int got_nl; /* YES if should go to next line before printing */
8198 int isPostScript; /* YES if is raw PostScript rather than normal print */
8199 double extra; /* how much extra vetical padding to add */
8202 struct PRINTDATA *curr_print_p;
8205 (void) contextcheck(C_MUSIC | C_BLOCKHEAD, "print");
8207 /* save all the info in a PRINTDATA struct */
8208 MALLOC(PRINTDATA, curr_print_p, 1);
8210 if (inpc_p == (struct INPCOORD *) 0) {
8212 /* print at default location */
8213 curr_print_p->location.vert_p = symval("_cur", (float **) 0);
8215 switch (justifytype) {
8219 /* default x is relative to _win.w */
8220 curr_print_p->location.hor_p = symval("_win", (float **) 0);
8221 curr_print_p->location.htype = AW;
8224 /* default x is relative to _win.e */
8225 curr_print_p->location.hor_p = symval("_win", (float **) 0);
8226 curr_print_p->location.htype = AE;
8229 /* default x is relative to _win.x */
8230 curr_print_p->location.hor_p = symval("_win", (float **) 0);
8231 curr_print_p->location.htype = AX;
8235 /* default is at current location */
8236 curr_print_p->location.hor_p = symval("_cur", (float **) 0);
8237 curr_print_p->location.htype = AX;
8241 curr_print_p->location.hsteps = 0.0;
8242 curr_print_p->location.counts = 0.0;
8243 curr_print_p->location.vtype = AY;
8244 curr_print_p->location.vsteps = -extra;
8246 /* If this is the first print command in a block,
8247 * we implicitly go down by the font ascent. */
8248 if (isPostScript == NO && Currblock_p != 0
8249 && Next_print_link_p_p
8250 == &(Currblock_p->printdata_p) ) {
8251 curr_print_p->location.vsteps -= fontascent(font, size)
8258 curr_print_p->location = *(inpc_p);
8259 rep_inpcoord(inpc_p, &(curr_print_p->location) );
8263 curr_print_p->isPostScript = isPostScript;
8264 if (isPostScript == YES) {
8265 curr_print_p->width = 0.0;
8268 curr_print_p->width = strwidth(str);
8270 curr_print_p->justifytype = (short) justifytype;
8271 curr_print_p->string = str;
8272 curr_print_p->inputfile = Curr_filename;
8273 curr_print_p->inputlineno = (short) yylineno;
8275 /* special case of user asking that this be printed
8276 * on the next line. In this case we go down by the
8277 * current point size */
8279 curr_print_p->location.vsteps -=
8280 fontheight(font, size) / STEPSIZE;
8283 /* Now link onto proper list -- could be in BLOCKHEAD
8284 * context or doing a PRHEAD. If we are in BLOCKHEAD context, we
8285 * definitely have something in the main list to attach to.
8286 * If in C_MUSIC, we may or may not depending on whether
8287 * this is the first in a series of print commands. */
8288 if ( ((Context & C_BLOCKHEAD) != 0)
8289 || ((Currstruct_p != (struct MAINLL *) 0) &&
8290 (Currstruct_p->str == S_PRHEAD) ) ) {
8291 if (Next_print_link_p_p == (struct PRINTDATA **) 0) {
8292 pfatal("Next_print_link_p_p is null");
8294 /* this means the value of Next_print_link_p_p
8295 * is valid and will tell us where to link */
8296 *Next_print_link_p_p = curr_print_p;
8299 /* We must be in music context, but the last
8300 * thing we saw wasn't a print command, so
8301 * we have to allocate a PRHEAD and put it
8302 * in the main list and attach to that. */
8303 /* allocate a new struct, put on main list and attach
8304 * the print command to it */
8305 Currstruct_p = newMAINLLstruct(S_PRHEAD, yylineno);
8306 insertMAINLL(Currstruct_p, Mainlltc_p);
8307 Currstruct_p->u.prhead_p->printdata_p = curr_print_p;
8308 Currstruct_p = (struct MAINLL *) 0;
8311 /* in any case, if we get another print command right away, it
8312 * should be linked onto this one, so remember where we are */
8313 Next_print_link_p_p = &(curr_print_p->next);
8314 curr_print_p->next = (struct PRINTDATA *) 0;
8318 /* if the given string has a higher ascent than the given font/size, return
8319 * the amount is it higher, in stepsizes */
8322 extra_needed(font, size, string)
8324 int font; /* default font for this string */
8325 int size; /* default size for this string */
8326 char *string; /* string, which might contain \s(xx) to make it bigger
8330 double usual_ascent;
8331 double this_string_ascent;
8334 /* get expected ascent for this font/size and actual for string */
8335 usual_ascent = fontascent(font, size);
8336 (void) fix_string(string, font, size, Curr_filename, yylineno);
8337 this_string_ascent = strascent(string);
8339 /* if this string is too tall, return by how much it is too tall */
8340 if (this_string_ascent > usual_ascent) {
8341 return (this_string_ascent - usual_ascent) / STEPSIZE;
8349 /* Sometimes lexer will recognize something as a keyword, but it's
8350 * really a bunch of note letters, due to context. This function turns
8351 * the mistaken keyword into notes. It handles a through g and r and s, but
8352 * not n and u which would also be troublesome.
8361 for ( ; *str != '\0'; str++) {
8362 /* On the last letter, if it's a true pitch, have to
8363 * push it back into input, because it could be followed
8364 * by an accidental or octave mark or tick or something. */
8365 if (*(str+1) == '\0' && *str >= 'a' && *str <= 'g') {
8369 add_note(Curr_grpsyl_p, (int) *str, 0, USE_DFLT_OCTAVE,
8376 /* Free up the current additive time list, if any */
8381 struct TIMELIST *tl_p;
8383 /* If this was the most recently allocated list, we can free it.
8384 * We can't free otherwise, since Extra_time_p might be
8385 * pointing to one from an SSV, which must be kept around. */
8386 if (Extra_time_p == Last_alloced_timelist_p) {
8387 while (Extra_time_p != 0) {
8388 tl_p = Extra_time_p->next;
8390 Extra_time_p = tl_p;
8394 Last_alloced_timelist_p = 0;
8395 Curr_timelist_p = 0;
8399 /* Add an item to the internal representation of the time signature
8400 * currently being collected */
8405 int item; /* the byte to add to timerep */
8408 if (Tsig_offset >= MAXTSLEN - 1) {
8409 l_ufatal(Curr_filename, yylineno,
8410 "time signature is too complicated");
8412 Timerep[Tsig_offset++] = (char) item;