From a56aa301e804b41cd4133a3462d9e7890896044f Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 30 Jun 2004 00:51:59 +0000 Subject: [PATCH] prebuild-bison --- direct/src/dcparser/dcParser.cxx.prebuilt | 952 +++++++++++----------- 1 file changed, 494 insertions(+), 458 deletions(-) diff --git a/direct/src/dcparser/dcParser.cxx.prebuilt b/direct/src/dcparser/dcParser.cxx.prebuilt index ef0a4db0eb..854f26fb31 100644 --- a/direct/src/dcparser/dcParser.cxx.prebuilt +++ b/direct/src/dcparser/dcParser.cxx.prebuilt @@ -65,6 +65,7 @@ #include "dcAtomicField.h" #include "dcMolecularField.h" #include "dcClassParameter.h" +#include "dcSwitchParameter.h" #include "dcArrayParameter.h" #include "dcSimpleParameter.h" #include "dcTypedef.h" @@ -121,7 +122,7 @@ dc_cleanup_parser() { -#define YYFINAL 220 +#define YYFINAL 221 #define YYFLAG -32768 #define YYNTBASE 61 @@ -167,68 +168,69 @@ static const char yytranslate[] = #if YYDEBUG static const short yyprhs[] = { - 0, 0, 3, 6, 8, 11, 14, 17, 20, 21, - 29, 31, 33, 35, 37, 41, 43, 47, 50, 51, - 57, 59, 61, 63, 67, 70, 72, 75, 77, 81, - 83, 86, 89, 91, 93, 95, 98, 100, 101, 108, - 110, 112, 114, 118, 120, 121, 126, 127, 131, 133, - 135, 137, 139, 144, 148, 155, 162, 164, 166, 168, - 172, 175, 179, 185, 190, 192, 194, 198, 202, 208, - 210, 215, 217, 221, 226, 228, 230, 232, 234, 236, - 238, 240, 242, 244, 246, 248, 250, 252, 254, 256, - 257, 262, 263, 268, 269, 274, 278, 282, 286, 290, - 292, 295, 297, 299, 301, 305, 307, 309, 311, 313, - 315, 317, 319, 321, 323, 325, 327, 329, 331, 333, - 335, 337, 339, 341, 343, 345, 347, 350, 353, 356, - 359, 362, 365, 368, 371, 374, 375, 380, 382, 384, - 388, 390, 392, 393, 403, 405, 408, 411, 414, 415, - 420, 422, 425, 427 + 0, 0, 3, 6, 8, 11, 14, 17, 20, 23, + 24, 32, 34, 36, 38, 40, 44, 46, 50, 53, + 54, 60, 62, 64, 66, 70, 73, 75, 78, 80, + 84, 86, 89, 92, 94, 96, 99, 101, 102, 109, + 111, 113, 115, 119, 121, 122, 127, 128, 132, 134, + 136, 138, 140, 145, 149, 156, 163, 165, 167, 169, + 171, 173, 177, 180, 184, 190, 195, 197, 199, 203, + 207, 213, 215, 220, 222, 226, 231, 233, 235, 237, + 239, 241, 243, 245, 247, 249, 251, 253, 255, 257, + 259, 261, 262, 267, 268, 273, 274, 279, 283, 287, + 291, 295, 297, 300, 302, 304, 306, 310, 312, 314, + 316, 318, 320, 322, 324, 326, 328, 330, 332, 334, + 336, 338, 340, 342, 344, 346, 348, 350, 352, 355, + 358, 361, 364, 367, 370, 373, 376, 379, 380, 385, + 387, 389, 393, 395, 397, 398, 408, 410, 413, 416, + 419, 420, 425, 428, 430 }; static const short yyrhs[] = { 45, 62, 0, 46, 99, 0, 119, 0, 62, 47, - 0, 62, 63, 0, 62, 69, 0, 62, 73, 0, - 0, 65, 8, 64, 74, 48, 76, 49, 0, 10, - 0, 9, 0, 8, 0, 8, 0, 67, 50, 8, - 0, 67, 0, 68, 51, 67, 0, 12, 68, 0, - 0, 11, 68, 12, 70, 71, 0, 72, 0, 52, - 0, 67, 0, 72, 53, 67, 0, 13, 87, 0, - 119, 0, 54, 75, 0, 66, 0, 75, 53, 66, - 0, 119, 0, 76, 47, 0, 76, 77, 0, 78, - 0, 108, 0, 113, 0, 86, 47, 0, 84, 0, - 0, 8, 55, 79, 80, 56, 107, 0, 119, 0, - 81, 0, 82, 0, 81, 53, 82, 0, 87, 0, - 0, 87, 57, 83, 99, 0, 0, 91, 85, 92, - 0, 91, 0, 84, 0, 86, 0, 106, 0, 106, - 55, 89, 56, 0, 106, 50, 94, 0, 106, 50, - 94, 55, 89, 56, 0, 106, 55, 89, 56, 50, - 94, 0, 8, 0, 119, 0, 98, 0, 98, 58, - 98, 0, 98, 97, 0, 89, 53, 98, 0, 89, - 53, 98, 58, 98, 0, 89, 53, 98, 97, 0, - 119, 0, 93, 0, 93, 58, 93, 0, 90, 53, - 93, 0, 90, 53, 93, 58, 93, 0, 88, 0, - 91, 59, 90, 60, 0, 8, 0, 92, 50, 94, - 0, 92, 59, 90, 60, 0, 6, 0, 94, 0, - 3, 0, 4, 0, 3, 0, 96, 0, 95, 0, - 5, 0, 6, 0, 97, 0, 95, 0, 96, 0, - 5, 0, 6, 0, 7, 0, 0, 48, 100, 103, - 49, 0, 0, 59, 101, 103, 60, 0, 0, 55, - 102, 103, 56, 0, 95, 52, 94, 0, 96, 52, - 94, 0, 5, 52, 94, 0, 7, 52, 94, 0, - 104, 0, 105, 104, 0, 119, 0, 53, 0, 99, - 0, 105, 53, 99, 0, 16, 0, 17, 0, 18, - 0, 19, 0, 20, 0, 21, 0, 22, 0, 23, - 0, 24, 0, 25, 0, 26, 0, 27, 0, 28, - 0, 29, 0, 30, 0, 31, 0, 32, 0, 33, - 0, 34, 0, 35, 0, 119, 0, 107, 36, 0, - 107, 37, 0, 107, 38, 0, 107, 39, 0, 107, - 40, 0, 107, 41, 0, 107, 42, 0, 107, 43, - 0, 107, 44, 0, 0, 8, 54, 109, 111, 0, - 8, 0, 110, 0, 111, 53, 110, 0, 119, 0, - 8, 0, 0, 14, 112, 55, 87, 56, 48, 114, - 115, 49, 0, 119, 0, 115, 47, 0, 115, 116, - 0, 115, 118, 0, 0, 15, 117, 99, 54, 0, - 113, 0, 86, 47, 0, 84, 0, 0 + 0, 62, 63, 0, 62, 113, 0, 62, 69, 0, + 62, 73, 0, 0, 65, 112, 64, 74, 48, 76, + 49, 0, 10, 0, 9, 0, 8, 0, 8, 0, + 67, 50, 8, 0, 67, 0, 68, 51, 67, 0, + 12, 68, 0, 0, 11, 68, 12, 70, 71, 0, + 72, 0, 52, 0, 67, 0, 72, 53, 67, 0, + 13, 87, 0, 119, 0, 54, 75, 0, 66, 0, + 75, 53, 66, 0, 119, 0, 76, 47, 0, 76, + 77, 0, 78, 0, 108, 0, 86, 47, 0, 84, + 0, 0, 8, 55, 79, 80, 56, 107, 0, 119, + 0, 81, 0, 82, 0, 81, 53, 82, 0, 87, + 0, 0, 87, 57, 83, 99, 0, 0, 91, 85, + 92, 0, 91, 0, 84, 0, 86, 0, 106, 0, + 106, 55, 89, 56, 0, 106, 50, 94, 0, 106, + 50, 94, 55, 89, 56, 0, 106, 55, 89, 56, + 50, 94, 0, 8, 0, 63, 0, 113, 0, 119, + 0, 98, 0, 98, 58, 98, 0, 98, 97, 0, + 89, 53, 98, 0, 89, 53, 98, 58, 98, 0, + 89, 53, 98, 97, 0, 119, 0, 93, 0, 93, + 58, 93, 0, 90, 53, 93, 0, 90, 53, 93, + 58, 93, 0, 88, 0, 91, 59, 90, 60, 0, + 8, 0, 92, 50, 94, 0, 92, 59, 90, 60, + 0, 6, 0, 94, 0, 3, 0, 4, 0, 3, + 0, 96, 0, 95, 0, 5, 0, 6, 0, 97, + 0, 95, 0, 96, 0, 5, 0, 6, 0, 7, + 0, 0, 48, 100, 103, 49, 0, 0, 59, 101, + 103, 60, 0, 0, 55, 102, 103, 56, 0, 95, + 52, 94, 0, 96, 52, 94, 0, 5, 52, 94, + 0, 7, 52, 94, 0, 104, 0, 105, 104, 0, + 119, 0, 53, 0, 99, 0, 105, 53, 99, 0, + 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, + 21, 0, 22, 0, 23, 0, 24, 0, 25, 0, + 26, 0, 27, 0, 28, 0, 29, 0, 30, 0, + 31, 0, 32, 0, 33, 0, 34, 0, 35, 0, + 119, 0, 107, 36, 0, 107, 37, 0, 107, 38, + 0, 107, 39, 0, 107, 40, 0, 107, 41, 0, + 107, 42, 0, 107, 43, 0, 107, 44, 0, 0, + 8, 54, 109, 111, 0, 8, 0, 110, 0, 111, + 53, 110, 0, 119, 0, 8, 0, 0, 14, 112, + 55, 87, 56, 48, 114, 115, 49, 0, 119, 0, + 115, 47, 0, 115, 116, 0, 115, 118, 0, 0, + 15, 117, 99, 54, 0, 86, 47, 0, 84, 0, + 0 }; #endif @@ -237,22 +239,22 @@ static const short yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const short yyrline[] = { - 0, 144, 146, 149, 151, 152, 153, 154, 157, 157, - 173, 178, 184, 197, 199, 205, 207, 213, 218, 218, - 225, 227, 233, 238, 244, 260, 262, 265, 272, 280, - 282, 283, 291, 293, 294, 295, 299, 305, 305, 316, - 318, 321, 323, 326, 332, 332, 356, 356, 367, 371, - 373, 376, 381, 389, 400, 414, 428, 449, 454, 461, - 468, 477, 483, 489, 499, 504, 511, 518, 524, 532, - 534, 540, 546, 560, 566, 576, 579, 590, 594, 598, - 603, 607, 610, 620, 624, 629, 633, 637, 641, 645, - 645, 653, 653, 661, 661, 669, 675, 681, 687, 695, - 697, 700, 702, 705, 707, 710, 715, 719, 723, 727, - 731, 735, 739, 743, 747, 751, 755, 759, 763, 767, - 771, 775, 779, 783, 787, 793, 795, 799, 803, 807, - 811, 815, 819, 823, 827, 833, 833, 844, 860, 867, - 880, 885, 888, 888, 902, 904, 905, 906, 916, 916, - 932, 934, 938, 944 + 0, 146, 148, 151, 153, 154, 165, 171, 172, 175, + 175, 188, 193, 199, 212, 214, 220, 222, 228, 233, + 233, 240, 242, 248, 253, 259, 275, 277, 280, 287, + 295, 297, 298, 306, 308, 309, 313, 319, 319, 330, + 332, 335, 337, 340, 346, 346, 371, 371, 382, 386, + 388, 391, 396, 404, 415, 429, 443, 469, 473, 479, + 484, 491, 498, 507, 513, 519, 529, 534, 541, 548, + 554, 562, 564, 570, 576, 590, 596, 606, 609, 620, + 624, 628, 633, 637, 640, 650, 654, 659, 663, 667, + 671, 675, 675, 683, 683, 691, 691, 699, 705, 711, + 717, 725, 727, 730, 732, 735, 737, 740, 745, 749, + 753, 757, 761, 765, 769, 773, 777, 781, 785, 789, + 793, 797, 801, 805, 809, 813, 817, 823, 825, 829, + 833, 837, 841, 845, 849, 853, 857, 863, 863, 874, + 890, 897, 910, 915, 918, 918, 932, 934, 935, 936, + 946, 946, 963, 968, 974 }; #endif @@ -293,43 +295,43 @@ static const char *const yytname[] = /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const short yyr1[] = { - 0, 61, 61, 62, 62, 62, 62, 62, 64, 63, - 65, 65, 66, 67, 67, 68, 68, 69, 70, 69, - 71, 71, 72, 72, 73, 74, 74, 75, 75, 76, - 76, 76, 77, 77, 77, 77, 77, 79, 78, 80, + 0, 61, 61, 62, 62, 62, 62, 62, 62, 64, + 63, 65, 65, 66, 67, 67, 68, 68, 69, 70, + 69, 71, 71, 72, 72, 73, 74, 74, 75, 75, + 76, 76, 76, 77, 77, 77, 77, 79, 78, 80, 80, 81, 81, 82, 83, 82, 85, 84, 86, 87, - 87, 88, 88, 88, 88, 88, 88, 89, 89, 89, - 89, 89, 89, 89, 90, 90, 90, 90, 90, 91, - 91, 92, 92, 92, 93, 93, 94, 95, 96, 97, - 97, 97, 98, 98, 99, 99, 99, 99, 99, 100, - 99, 101, 99, 102, 99, 99, 99, 99, 99, 103, - 103, 104, 104, 105, 105, 106, 106, 106, 106, 106, + 87, 88, 88, 88, 88, 88, 88, 88, 88, 89, + 89, 89, 89, 89, 89, 89, 90, 90, 90, 90, + 90, 91, 91, 92, 92, 92, 93, 93, 94, 95, + 96, 97, 97, 97, 98, 98, 99, 99, 99, 99, + 99, 100, 99, 101, 99, 102, 99, 99, 99, 99, + 99, 103, 103, 104, 104, 105, 105, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, - 106, 106, 106, 106, 106, 107, 107, 107, 107, 107, - 107, 107, 107, 107, 107, 109, 108, 110, 111, 111, - 112, 112, 114, 113, 115, 115, 115, 115, 117, 116, - 118, 118, 118, 119 + 106, 106, 106, 106, 106, 106, 106, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 109, 108, 110, + 111, 111, 112, 112, 114, 113, 115, 115, 115, 115, + 117, 116, 118, 118, 119 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const short yyr2[] = { - 0, 2, 2, 1, 2, 2, 2, 2, 0, 7, - 1, 1, 1, 1, 3, 1, 3, 2, 0, 5, - 1, 1, 1, 3, 2, 1, 2, 1, 3, 1, - 2, 2, 1, 1, 1, 2, 1, 0, 6, 1, + 0, 2, 2, 1, 2, 2, 2, 2, 2, 0, + 7, 1, 1, 1, 1, 3, 1, 3, 2, 0, + 5, 1, 1, 1, 3, 2, 1, 2, 1, 3, + 1, 2, 2, 1, 1, 2, 1, 0, 6, 1, 1, 1, 3, 1, 0, 4, 0, 3, 1, 1, - 1, 1, 4, 3, 6, 6, 1, 1, 1, 3, - 2, 3, 5, 4, 1, 1, 3, 3, 5, 1, - 4, 1, 3, 4, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, - 4, 0, 4, 0, 4, 3, 3, 3, 3, 1, - 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, + 1, 1, 4, 3, 6, 6, 1, 1, 1, 1, + 1, 3, 2, 3, 5, 4, 1, 1, 3, 3, + 5, 1, 4, 1, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 0, 4, 1, 1, 3, - 1, 1, 0, 9, 1, 2, 2, 2, 0, 4, - 1, 2, 1, 0 + 1, 0, 4, 0, 4, 0, 4, 3, 3, 3, + 3, 1, 2, 1, 1, 1, 3, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 0, 4, 1, + 1, 3, 1, 1, 0, 9, 1, 2, 2, 2, + 0, 4, 2, 1, 0 }; /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE @@ -337,150 +339,142 @@ static const short yyr2[] = error. */ static const short yydefact[] = { - 0, 153, 0, 1, 3, 78, 77, 86, 87, 88, - 89, 93, 91, 84, 85, 2, 11, 10, 0, 0, - 0, 4, 5, 0, 6, 7, 0, 0, 153, 153, - 153, 0, 0, 13, 15, 0, 17, 56, 105, 106, + 0, 154, 0, 1, 3, 80, 79, 88, 89, 90, + 91, 95, 93, 86, 87, 2, 12, 11, 0, 0, + 0, 154, 4, 5, 154, 7, 8, 6, 0, 0, + 154, 154, 154, 0, 0, 14, 16, 0, 18, 56, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 49, 50, - 24, 69, 48, 51, 8, 76, 97, 98, 102, 103, - 0, 99, 153, 101, 0, 0, 95, 96, 0, 18, - 0, 153, 0, 0, 153, 153, 90, 102, 100, 94, - 92, 14, 0, 16, 74, 0, 65, 75, 64, 71, - 47, 53, 81, 82, 0, 80, 79, 83, 58, 57, - 0, 0, 25, 104, 21, 22, 19, 20, 0, 70, - 0, 0, 153, 153, 0, 52, 0, 60, 12, 27, - 26, 153, 0, 67, 66, 72, 0, 0, 61, 0, - 59, 0, 0, 29, 23, 0, 73, 54, 0, 63, - 55, 28, 56, 153, 30, 9, 31, 32, 36, 0, - 33, 34, 68, 62, 135, 37, 141, 0, 140, 35, - 0, 153, 0, 137, 138, 136, 0, 40, 41, 43, - 39, 0, 0, 153, 0, 44, 0, 139, 38, 125, - 42, 0, 142, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 45, 153, 0, 144, 148, 145, 143, 152, - 0, 150, 146, 147, 0, 151, 0, 149, 0, 0, - 0 + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 57, 49, 50, 25, 71, 48, 51, 58, 143, 0, + 142, 9, 78, 99, 100, 104, 105, 0, 101, 154, + 103, 0, 0, 97, 98, 0, 19, 0, 154, 0, + 0, 154, 0, 154, 92, 104, 102, 96, 94, 15, + 0, 17, 76, 0, 67, 77, 66, 73, 47, 53, + 83, 84, 0, 82, 81, 85, 60, 59, 0, 0, + 0, 26, 106, 22, 23, 20, 21, 0, 72, 0, + 0, 154, 154, 0, 52, 0, 62, 0, 13, 28, + 27, 154, 0, 69, 68, 74, 0, 0, 63, 0, + 61, 144, 0, 0, 30, 24, 0, 75, 54, 0, + 65, 55, 154, 29, 56, 31, 10, 32, 33, 36, + 0, 34, 70, 64, 0, 146, 137, 37, 35, 150, + 147, 145, 153, 0, 148, 149, 0, 154, 0, 152, + 139, 140, 138, 0, 40, 41, 43, 39, 0, 0, + 154, 0, 44, 151, 141, 38, 127, 42, 0, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 45, 0, + 0, 0 }; static const short yydefgoto[] = { - 218, 3, 22, 85, 23, 129, 34, 35, 24, 92, - 116, 117, 25, 111, 130, 142, 156, 157, 171, 176, - 177, 178, 191, 58, 82, 59, 179, 61, 104, 95, - 62, 100, 96, 97, 13, 14, 107, 108, 69, 28, - 30, 29, 70, 71, 72, 63, 188, 160, 170, 174, - 175, 167, 161, 203, 204, 212, 214, 213, 73 + 219, 3, 60, 93, 24, 139, 36, 37, 25, 100, + 125, 126, 26, 120, 140, 153, 167, 168, 187, 193, + 194, 195, 208, 61, 89, 62, 196, 64, 112, 103, + 65, 108, 104, 105, 13, 14, 115, 116, 76, 30, + 32, 31, 77, 78, 79, 66, 205, 171, 186, 191, + 192, 69, 67, 162, 174, 184, 188, 185, 80 }; static const short yypact[] = { - 57,-32768, 17, 42,-32768,-32768,-32768, -15,-32768, -9, - -32768,-32768,-32768, 15, 22,-32768,-32768,-32768, 76, 76, - 267,-32768,-32768, 83,-32768,-32768, 47, 47, 9, 9, - 9, 47, 47,-32768, 59, 26, 60,-32768,-32768,-32768, + 57,-32768, 36, 87,-32768,-32768,-32768, 17,-32768, 19, + -32768,-32768,-32768, 25, 34,-32768,-32768,-32768, 41, 41, + 228, 80,-32768,-32768, 80,-32768,-32768,-32768, 101, 101, + 9, 9, 9, 101, 101,-32768, 40, -5, 72,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768, 0, 8,-32768,-32768,-32768,-32768,-32768,-32768, - 61,-32768, 62,-32768, 56, 53,-32768,-32768, 108,-32768, - 76, 72, 110, 47, 90, 65,-32768, 17,-32768,-32768, - -32768,-32768, 28, 59,-32768, -35, 63,-32768,-32768,-32768, - -10, 67,-32768,-32768, 44,-32768,-32768,-32768, 24,-32768, - 112, 75,-32768,-32768,-32768, 59,-32768, 73, 72,-32768, - 72, 47, 72, 90, 90, 77, 90,-32768,-32768,-32768, - 79,-32768, 76, 70,-32768,-32768, -21, 45, 30, 47, - -32768, 112, 233,-32768, 59, 72,-32768,-32768, 90,-32768, - -32768,-32768, 50, 121,-32768,-32768,-32768,-32768,-32768, 84, - -32768,-32768,-32768,-32768,-32768,-32768,-32768, 88,-32768,-32768, - 122, 267, 267,-32768,-32768, 91, 89, 93,-32768, 92, - -32768, 94, 122,-32768, 267,-32768, 99,-32768, 98,-32768, - -32768, 17,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768, 199,-32768,-32768,-32768,-32768,-32768, - 101,-32768,-32768,-32768, 17,-32768, 97,-32768, 152, 154, - -32768 + -32768,-32768,-32768,-32768,-32768, -3, 20,-32768,-32768, 71, + -32768,-32768,-32768,-32768,-32768,-32768,-32768, 76,-32768, 74, + -32768, 73, 68,-32768,-32768, 122,-32768, 41, 30, 123, + 101, 112, 228, 81,-32768, 36,-32768,-32768,-32768,-32768, + 24, 40,-32768, -23, 78,-32768,-32768,-32768, -30, 82, + -32768,-32768, 26,-32768,-32768,-32768, 14,-32768, 83, 130, + 92,-32768,-32768,-32768, 40,-32768, 88, 30,-32768, 30, + 101, 30, 112, 112, 93, 112,-32768, 96,-32768,-32768, + 94,-32768, 41, 91,-32768,-32768, -15, 27, 23, 101, + -32768,-32768, 130, 194,-32768, 40, 30,-32768,-32768, 112, + -32768,-32768,-32768,-32768, 65,-32768,-32768,-32768,-32768,-32768, + 98,-32768,-32768,-32768, 150,-32768,-32768,-32768,-32768,-32768, + -32768,-32768,-32768, 99,-32768,-32768, 140, 228, 36,-32768, + -32768,-32768, 97, 95, 100,-32768, 104,-32768, 102, 140, + -32768, 228,-32768,-32768,-32768, 70,-32768,-32768, 36,-32768, + -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 152, + 154,-32768 }; static const short yypgoto[] = { - -32768,-32768,-32768,-32768,-32768, 16, -61, 137,-32768,-32768, + -32768,-32768, 159,-32768,-32768, 3, -76, 138,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768, -26,-32768, -135,-32768, -131, -19,-32768, 36, 38, - -32768,-32768, -39, -22, -82, -78, -91, -34, -2,-32768, - -32768,-32768, 78, 95,-32768,-32768,-32768,-32768,-32768, -20, - -32768,-32768, -43,-32768,-32768,-32768,-32768,-32768, 2 + -32768, -14,-32768, -130,-32768, -119, -19,-32768, 58, 60, + -32768,-32768, -69, -25, -85, -81, -95, -74, -2,-32768, + -32768,-32768, 90, 110,-32768,-32768,-32768,-32768,-32768, -7, + -32768, 169, 191,-32768,-32768,-32768,-32768,-32768, 1 }; -#define YYLAST 302 +#define YYLAST 263 static const short yytable[] = { - 15, 60, 105, 4, 66, 67, 106, 158, -46, 76, - 77, 159, 5, 6, 7, 8, 9, 127, 118, 93, - 5, 6, 7, 8, 9, 119, 105, 5, 6, 102, - 106, 115, 118, 5, 6, 102, 33, 26, 79, 146, - 121, 105, 105, 27, 105, 106, 106, 149, 106, 122, - 65, 16, 17, 18, 19, 20, 105, 10, 83, 81, - 106, 101, 68, 84, 11, 10, 105, 31, 12, 209, - 106, 144, 11, 210, 32, 65, 12, 80, 94, 133, - 114, 134, 126, 98, 33, 113, 109, 112, 148, 21, - 138, 64, 140, 5, 6, 102, 103, 124, 124, 135, - 125, 147, 1, 2, 164, 165, 162, 74, 75, 78, - 86, 80, 89, 90, 163, 87, 91, 150, 99, 110, - 128, 120, 123, 131, 98, 109, 132, 139, 145, 166, - 173, 169, 141, 143, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 172, 182, 183, 184, 192, 215, 185, - 186, 217, 219, 181, 220, 168, 36, 151, 190, 137, - 136, 211, 187, 0, 0, 0, 0, 88, 0, 0, - 0, 0, 0, 180, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 189, 0, 0, 0, 202, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 205, 0, 37, 0, 0, - 0, 0, 216, 153, 206, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 0, 0, 0, 0, 0, - 0, 152, 0, 0, 0, 0, 207, 153, 208, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, - 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, - 154, 0, 155, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57 + 15, 63, 4, 73, 74, -46, 113, 86, 83, 84, + 114, 101, 5, 6, 7, 8, 9, 5, 6, 110, + 130, 136, 70, 169, 124, 70, 5, 6, 110, 131, + 127, 113, 35, 72, 170, 114, 102, 128, 127, 5, + 6, 7, 8, 9, 182, 157, 87, 113, 113, 35, + 113, 114, 114, 160, 114, 183, 88, 10, 143, 148, + 144, 150, 75, 113, 11, 109, 155, 114, 12, 28, + 90, 29, 135, 118, 113, 91, 123, 33, 114, 133, + 133, 159, 134, 158, 10, 173, 34, 172, 68, 106, + 85, 11, 117, 122, 121, 12, 16, 17, 18, 19, + 20, 21, 1, 2, 72, 145, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 5, 6, 110, 111, 176, + 177, 81, 82, 87, 161, 94, 92, 95, 98, 97, + 99, 107, 106, 117, 22, 119, 129, 132, 138, 137, + 141, 142, 154, 149, 151, 178, 189, 152, 190, 156, + 199, 200, 220, 201, 221, 163, 203, 38, 39, 16, + 17, 202, 23, 175, 21, 179, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 198, 207, 197, 96, + 147, 146, 204, 71, 27, 0, 0, 180, 0, 181, + 0, 206, 164, 16, 17, 0, 218, 0, 21, 0, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 0, 0, 0, 0, 0, 0, 39, 16, 17, 0, + 0, 165, 21, 166, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59 }; static const short yycheck[] = { - 2, 20, 84, 1, 26, 27, 84, 142, 8, 31, - 32, 142, 3, 4, 5, 6, 7, 108, 53, 80, - 3, 4, 5, 6, 7, 60, 108, 3, 4, 5, - 108, 92, 53, 3, 4, 5, 8, 52, 12, 60, - 50, 123, 124, 52, 126, 123, 124, 138, 126, 59, - 3, 9, 10, 11, 12, 13, 138, 48, 50, 59, - 138, 83, 53, 55, 55, 48, 148, 52, 59, 204, - 148, 132, 55, 204, 52, 3, 59, 51, 6, 118, - 52, 120, 58, 81, 8, 87, 84, 85, 58, 47, - 124, 8, 126, 3, 4, 5, 6, 53, 53, 121, - 56, 56, 45, 46, 54, 55, 145, 29, 30, 50, - 49, 51, 56, 60, 148, 53, 8, 139, 8, 54, - 8, 58, 55, 48, 122, 123, 53, 50, 58, 8, - 8, 47, 53, 131, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 55, 53, 56, 53, 48, 47, 57, - 56, 54, 0, 172, 0, 153, 19, 141, 184, 123, - 122, 204, 182, -1, -1, -1, -1, 72, -1, -1, - -1, -1, -1, 171, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 183, -1, -1, -1, 191, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 203, -1, 8, -1, -1, - -1, -1, 214, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, - -1, 8, -1, -1, -1, -1, 47, 14, 49, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, - -1, -1, -1, -1, -1, 8, -1, -1, -1, -1, - 47, -1, 49, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35 + 2, 20, 1, 28, 29, 8, 91, 12, 33, 34, + 91, 87, 3, 4, 5, 6, 7, 3, 4, 5, + 50, 116, 21, 153, 100, 24, 3, 4, 5, 59, + 53, 116, 8, 3, 153, 116, 6, 60, 53, 3, + 4, 5, 6, 7, 174, 60, 51, 132, 133, 8, + 135, 132, 133, 148, 135, 174, 59, 48, 127, 133, + 129, 135, 53, 148, 55, 90, 142, 148, 59, 52, + 50, 52, 58, 92, 159, 55, 52, 52, 159, 53, + 53, 58, 56, 56, 48, 159, 52, 156, 8, 88, + 50, 55, 91, 95, 93, 59, 9, 10, 11, 12, + 13, 14, 45, 46, 3, 130, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 3, 4, 5, 6, 54, + 55, 31, 32, 51, 149, 49, 55, 53, 60, 56, + 8, 8, 131, 132, 47, 54, 58, 55, 8, 56, + 48, 53, 141, 50, 48, 47, 47, 53, 8, 58, + 53, 56, 0, 53, 0, 152, 54, 19, 8, 9, + 10, 57, 3, 162, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 188, 201, 187, 79, + 132, 131, 199, 24, 3, -1, -1, 47, -1, 49, + -1, 200, 8, 9, 10, -1, 208, -1, 14, -1, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + -1, -1, -1, -1, -1, -1, 8, 9, 10, -1, + -1, 47, 14, 49, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/share/bison/bison.simple" @@ -1189,34 +1183,55 @@ yyreduce: switch (yyn) { -case 8: -#line 159 "dcParser.yxx" +case 5: +#line 155 "dcParser.yxx" { - current_class = new DCClass(yyvsp[0].str, yyvsp[-1].u.flag, false); - if (!dc_file->add_class(current_class)) { - DCClass *old_class = dc_file->get_class_by_name(current_class->get_name()); - if (old_class->is_bogus_class()) { - yyerror("Base class defined after its first reference: " + current_class->get_name()); + if (!dc_file->add_class(yyvsp[0].u.dclass)) { + DCClass *old_class = dc_file->get_class_by_name(yyvsp[0].u.dclass->get_name()); + if (old_class != (DCClass *)NULL && old_class->is_bogus_class()) { + yyerror("Base class defined after its first reference: " + yyvsp[0].u.dclass->get_name()); } else { - yyerror("Duplicate class name: " + current_class->get_name()); + yyerror("Duplicate class name: " + yyvsp[0].u.dclass->get_name()); } } } break; +case 6: +#line 166 "dcParser.yxx" +{ + if (!dc_file->add_switch(yyvsp[0].u.dswitch)) { + yyerror("Duplicate class name: " + yyvsp[0].u.dswitch->get_name()); + } +} + break; +case 9: +#line 177 "dcParser.yxx" +{ + yyval.u.dclass = current_class; + current_class = new DCClass(yyvsp[0].str, yyvsp[-1].u.flag, false); +} + break; case 10: -#line 175 "dcParser.yxx" +#line 182 "dcParser.yxx" +{ + yyval.u.dclass = current_class; + current_class = yyvsp[-4].u.dclass; +} + break; +case 11: +#line 190 "dcParser.yxx" { yyval.u.flag = true; } break; -case 11: -#line 179 "dcParser.yxx" +case 12: +#line 194 "dcParser.yxx" { yyval.u.flag = false; } break; -case 12: -#line 186 "dcParser.yxx" +case 13: +#line 201 "dcParser.yxx" { DCClass *dclass = dc_file->get_class_by_name(yyvsp[0].str); if (dclass == (DCClass *)NULL) { @@ -1227,50 +1242,50 @@ case 12: yyval.u.dclass = dclass; } break; -case 14: -#line 200 "dcParser.yxx" +case 15: +#line 215 "dcParser.yxx" { yyval.str = yyvsp[-2].str + string("/") + yyvsp[0].str; } break; -case 16: -#line 208 "dcParser.yxx" +case 17: +#line 223 "dcParser.yxx" { yyval.str = yyvsp[-2].str + string(".") + yyvsp[0].str; } break; -case 17: -#line 215 "dcParser.yxx" +case 18: +#line 230 "dcParser.yxx" { dc_file->add_import_module(yyvsp[0].str); } break; -case 18: -#line 219 "dcParser.yxx" +case 19: +#line 234 "dcParser.yxx" { dc_file->add_import_module(yyvsp[-1].str); } break; -case 21: -#line 228 "dcParser.yxx" +case 22: +#line 243 "dcParser.yxx" { dc_file->add_import_symbol("*"); } break; -case 22: -#line 235 "dcParser.yxx" -{ - dc_file->add_import_symbol(yyvsp[0].str); -} - break; case 23: -#line 239 "dcParser.yxx" +#line 250 "dcParser.yxx" { dc_file->add_import_symbol(yyvsp[0].str); } break; case 24: -#line 246 "dcParser.yxx" +#line 254 "dcParser.yxx" +{ + dc_file->add_import_symbol(yyvsp[0].str); +} + break; +case 25: +#line 261 "dcParser.yxx" { DCTypedef *dtypedef = new DCTypedef(yyvsp[0].u.parameter); @@ -1284,24 +1299,24 @@ case 24: } } break; -case 27: -#line 267 "dcParser.yxx" -{ - if (yyvsp[0].u.dclass != (DCClass *)NULL) { - current_class->add_parent(yyvsp[0].u.dclass); - } -} - break; case 28: -#line 273 "dcParser.yxx" +#line 282 "dcParser.yxx" { if (yyvsp[0].u.dclass != (DCClass *)NULL) { current_class->add_parent(yyvsp[0].u.dclass); } } break; -case 31: -#line 284 "dcParser.yxx" +case 29: +#line 288 "dcParser.yxx" +{ + if (yyvsp[0].u.dclass != (DCClass *)NULL) { + current_class->add_parent(yyvsp[0].u.dclass); + } +} + break; +case 32: +#line 299 "dcParser.yxx" { if (!current_class->add_field(yyvsp[0].u.field)) { yyerror("Duplicate field name: " + yyvsp[0].u.field->get_name()); @@ -1309,45 +1324,46 @@ case 31: } break; case 35: -#line 296 "dcParser.yxx" +#line 310 "dcParser.yxx" { yyval.u.field = yyvsp[-1].u.parameter; } break; case 36: -#line 300 "dcParser.yxx" +#line 314 "dcParser.yxx" { yyval.u.field = yyvsp[0].u.parameter; } break; case 37: -#line 307 "dcParser.yxx" +#line 321 "dcParser.yxx" { current_atomic = new DCAtomicField(yyvsp[-1].str); } break; case 38: -#line 311 "dcParser.yxx" +#line 325 "dcParser.yxx" { yyval.u.field = current_atomic; } break; case 43: -#line 328 "dcParser.yxx" +#line 342 "dcParser.yxx" { atomic_element = DCAtomicField::ElementType(yyvsp[0].u.parameter); current_atomic->add_element(atomic_element); } break; case 44: -#line 333 "dcParser.yxx" +#line 347 "dcParser.yxx" { current_packer = &default_packer; + current_packer->clear_data(); current_packer->begin_pack(yyvsp[-1].u.parameter); } break; case 45: -#line 338 "dcParser.yxx" +#line 353 "dcParser.yxx" { bool is_valid = yyvsp[-3].u.parameter->is_valid(); atomic_element = DCAtomicField::ElementType(yyvsp[-3].u.parameter); @@ -1366,25 +1382,25 @@ case 45: } break; case 46: -#line 358 "dcParser.yxx" +#line 373 "dcParser.yxx" { current_parameter = yyvsp[0].u.parameter; } break; case 47: -#line 362 "dcParser.yxx" +#line 377 "dcParser.yxx" { yyval.u.parameter = yyvsp[0].u.parameter; } break; case 51: -#line 378 "dcParser.yxx" +#line 393 "dcParser.yxx" { yyval.u.parameter = new DCSimpleParameter(yyvsp[0].u.subatomic); } break; case 52: -#line 382 "dcParser.yxx" +#line 397 "dcParser.yxx" { DCSimpleParameter *simple_param = new DCSimpleParameter(yyvsp[-3].u.subatomic); if (!simple_param->set_range(double_range)) { @@ -1394,7 +1410,7 @@ case 52: } break; case 53: -#line 390 "dcParser.yxx" +#line 405 "dcParser.yxx" { DCSimpleParameter *simple_param = new DCSimpleParameter(yyvsp[-2].u.subatomic); if (yyvsp[0].u.s_uint == 0) { @@ -1407,7 +1423,7 @@ case 53: } break; case 54: -#line 401 "dcParser.yxx" +#line 416 "dcParser.yxx" { DCSimpleParameter *simple_param = new DCSimpleParameter(yyvsp[-5].u.subatomic); if (yyvsp[-3].u.s_uint == 0) { @@ -1423,7 +1439,7 @@ case 54: } break; case 55: -#line 415 "dcParser.yxx" +#line 430 "dcParser.yxx" { DCSimpleParameter *simple_param = new DCSimpleParameter(yyvsp[-5].u.subatomic); if (yyvsp[0].u.s_uint == 0) { @@ -1439,7 +1455,7 @@ case 55: } break; case 56: -#line 429 "dcParser.yxx" +#line 444 "dcParser.yxx" { DCTypedef *dtypedef = dc_file->get_typedef_by_name(yyvsp[0].str); if (dtypedef == (DCTypedef *)NULL) { @@ -1449,8 +1465,15 @@ case 56: // Create an implicit typedef for this. dtypedef = new DCTypedef(new DCClassParameter(dclass), true); } else { - // It's an undefined typedef. Create a bogus forward reference. - dtypedef = new DCTypedef(yyvsp[0].str); + // Maybe it's a switch name. + DCSwitch *dswitch = dc_file->get_switch_by_name(yyvsp[0].str); + if (dswitch != (DCSwitch *)NULL) { + // This also gets an implicit typedef. + dtypedef = new DCTypedef(new DCSwitchParameter(dswitch), true); + } else { + // It's an undefined typedef. Create a bogus forward reference. + dtypedef = new DCTypedef(yyvsp[0].str); + } } dc_file->add_typedef(dtypedef); @@ -1460,58 +1483,70 @@ case 56: } break; case 57: -#line 451 "dcParser.yxx" +#line 470 "dcParser.yxx" { - double_range.clear(); + yyval.u.parameter = new DCClassParameter(yyvsp[0].u.dclass); } break; case 58: -#line 455 "dcParser.yxx" +#line 474 "dcParser.yxx" { - double_range.clear(); - if (!double_range.add_range(yyvsp[0].u.real, yyvsp[0].u.real)) { - yyerror("Overlapping range"); - } + yyval.u.parameter = new DCSwitchParameter(yyvsp[0].u.dswitch); } break; case 59: -#line 462 "dcParser.yxx" +#line 481 "dcParser.yxx" { double_range.clear(); - if (!double_range.add_range(yyvsp[-2].u.real, yyvsp[0].u.real)) { - yyerror("Overlapping range"); - } } break; case 60: -#line 469 "dcParser.yxx" +#line 485 "dcParser.yxx" { double_range.clear(); - if (yyvsp[0].u.real >= 0) { - yyerror("Syntax error"); - } else if (!double_range.add_range(yyvsp[-1].u.real, -yyvsp[0].u.real)) { + if (!double_range.add_range(yyvsp[0].u.real, yyvsp[0].u.real)) { yyerror("Overlapping range"); } } break; case 61: -#line 478 "dcParser.yxx" +#line 492 "dcParser.yxx" +{ + double_range.clear(); + if (!double_range.add_range(yyvsp[-2].u.real, yyvsp[0].u.real)) { + yyerror("Overlapping range"); + } +} + break; +case 62: +#line 499 "dcParser.yxx" +{ + double_range.clear(); + if (yyvsp[0].u.real >= 0) { + yyerror("Syntax error"); + } else if (!double_range.add_range(yyvsp[-1].u.real, -yyvsp[0].u.real)) { + yyerror("Overlapping range"); + } +} + break; +case 63: +#line 508 "dcParser.yxx" { if (!double_range.add_range(yyvsp[0].u.real, yyvsp[0].u.real)) { yyerror("Overlapping range"); } } break; -case 62: -#line 484 "dcParser.yxx" +case 64: +#line 514 "dcParser.yxx" { if (!double_range.add_range(yyvsp[-2].u.real, yyvsp[0].u.real)) { yyerror("Overlapping range"); } } break; -case 63: -#line 490 "dcParser.yxx" +case 65: +#line 520 "dcParser.yxx" { if (yyvsp[0].u.real >= 0) { yyerror("Syntax error"); @@ -1520,61 +1555,61 @@ case 63: } } break; -case 64: -#line 501 "dcParser.yxx" -{ - uint_range.clear(); -} - break; -case 65: -#line 505 "dcParser.yxx" -{ - uint_range.clear(); - if (!uint_range.add_range(yyvsp[0].u.s_uint, yyvsp[0].u.s_uint)) { - yyerror("Overlapping range"); - } -} - break; case 66: -#line 512 "dcParser.yxx" +#line 531 "dcParser.yxx" { uint_range.clear(); - if (!uint_range.add_range(yyvsp[-2].u.s_uint, yyvsp[0].u.s_uint)) { - yyerror("Overlapping range"); - } } break; case 67: -#line 519 "dcParser.yxx" +#line 535 "dcParser.yxx" { + uint_range.clear(); if (!uint_range.add_range(yyvsp[0].u.s_uint, yyvsp[0].u.s_uint)) { yyerror("Overlapping range"); } } break; case 68: -#line 525 "dcParser.yxx" +#line 542 "dcParser.yxx" +{ + uint_range.clear(); + if (!uint_range.add_range(yyvsp[-2].u.s_uint, yyvsp[0].u.s_uint)) { + yyerror("Overlapping range"); + } +} + break; +case 69: +#line 549 "dcParser.yxx" +{ + if (!uint_range.add_range(yyvsp[0].u.s_uint, yyvsp[0].u.s_uint)) { + yyerror("Overlapping range"); + } +} + break; +case 70: +#line 555 "dcParser.yxx" { if (!uint_range.add_range(yyvsp[-2].u.s_uint, yyvsp[0].u.s_uint)) { yyerror("Overlapping range"); } } break; -case 70: -#line 535 "dcParser.yxx" +case 72: +#line 565 "dcParser.yxx" { yyval.u.parameter = new DCArrayParameter(yyvsp[-3].u.parameter, uint_range); } break; -case 71: -#line 542 "dcParser.yxx" +case 73: +#line 572 "dcParser.yxx" { current_parameter->set_name(yyvsp[0].str); yyval.u.parameter = current_parameter; } break; -case 72: -#line 547 "dcParser.yxx" +case 74: +#line 577 "dcParser.yxx" { if (yyvsp[0].u.s_uint == 0) { yyerror("Invalid divisor."); @@ -1589,14 +1624,14 @@ case 72: } } break; -case 73: -#line 561 "dcParser.yxx" +case 75: +#line 591 "dcParser.yxx" { yyval.u.parameter = new DCArrayParameter(yyvsp[-3].u.parameter, uint_range); } break; -case 74: -#line 568 "dcParser.yxx" +case 76: +#line 598 "dcParser.yxx" { if (yyvsp[0].str.length() != 1) { yyerror("Single character required."); @@ -1606,8 +1641,8 @@ case 74: } } break; -case 76: -#line 581 "dcParser.yxx" +case 78: +#line 611 "dcParser.yxx" { yyval.u.s_uint = (unsigned int)yyvsp[0].u.uint64; if (yyval.u.s_uint != yyvsp[0].u.uint64) { @@ -1616,20 +1651,20 @@ case 76: } } break; -case 79: -#line 600 "dcParser.yxx" +case 81: +#line 630 "dcParser.yxx" { yyval.u.real = (double)yyvsp[0].u.uint64; } break; -case 80: -#line 604 "dcParser.yxx" +case 82: +#line 634 "dcParser.yxx" { yyval.u.real = (double)yyvsp[0].u.int64; } break; -case 82: -#line 612 "dcParser.yxx" +case 84: +#line 642 "dcParser.yxx" { if (yyvsp[0].str.length() != 1) { yyerror("Single character required."); @@ -1639,292 +1674,292 @@ case 82: } } break; -case 84: -#line 626 "dcParser.yxx" +case 86: +#line 656 "dcParser.yxx" { current_packer->pack_int64(yyvsp[0].u.int64); } break; -case 85: -#line 630 "dcParser.yxx" +case 87: +#line 660 "dcParser.yxx" { current_packer->pack_uint64(yyvsp[0].u.uint64); } break; -case 86: -#line 634 "dcParser.yxx" +case 88: +#line 664 "dcParser.yxx" { current_packer->pack_double(yyvsp[0].u.real); } break; -case 87: -#line 638 "dcParser.yxx" +case 89: +#line 668 "dcParser.yxx" { current_packer->pack_string(yyvsp[0].str); } break; -case 88: -#line 642 "dcParser.yxx" +case 90: +#line 672 "dcParser.yxx" { current_packer->pack_literal_value(yyvsp[0].str); } break; -case 89: -#line 646 "dcParser.yxx" -{ - current_packer->push(); -} - break; -case 90: -#line 650 "dcParser.yxx" -{ - current_packer->pop(); -} - break; case 91: -#line 654 "dcParser.yxx" +#line 676 "dcParser.yxx" { current_packer->push(); } break; case 92: -#line 658 "dcParser.yxx" +#line 680 "dcParser.yxx" { current_packer->pop(); } break; case 93: -#line 662 "dcParser.yxx" +#line 684 "dcParser.yxx" { current_packer->push(); } break; case 94: -#line 666 "dcParser.yxx" +#line 688 "dcParser.yxx" { current_packer->pop(); } break; case 95: -#line 670 "dcParser.yxx" +#line 692 "dcParser.yxx" +{ + current_packer->push(); +} + break; +case 96: +#line 696 "dcParser.yxx" +{ + current_packer->pop(); +} + break; +case 97: +#line 700 "dcParser.yxx" { for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) { current_packer->pack_int64(yyvsp[-2].u.int64); } } break; -case 96: -#line 676 "dcParser.yxx" +case 98: +#line 706 "dcParser.yxx" { for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) { current_packer->pack_uint64(yyvsp[-2].u.uint64); } } break; -case 97: -#line 682 "dcParser.yxx" +case 99: +#line 712 "dcParser.yxx" { for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) { current_packer->pack_double(yyvsp[-2].u.real); } } break; -case 98: -#line 688 "dcParser.yxx" +case 100: +#line 718 "dcParser.yxx" { for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) { current_packer->pack_literal_value(yyvsp[-2].str); } } break; -case 105: -#line 712 "dcParser.yxx" +case 107: +#line 742 "dcParser.yxx" { yyval.u.subatomic = ST_int8; } break; -case 106: -#line 716 "dcParser.yxx" +case 108: +#line 746 "dcParser.yxx" { yyval.u.subatomic = ST_int16; } break; -case 107: -#line 720 "dcParser.yxx" +case 109: +#line 750 "dcParser.yxx" { yyval.u.subatomic = ST_int32; } break; -case 108: -#line 724 "dcParser.yxx" +case 110: +#line 754 "dcParser.yxx" { yyval.u.subatomic = ST_int64; } break; -case 109: -#line 728 "dcParser.yxx" +case 111: +#line 758 "dcParser.yxx" { yyval.u.subatomic = ST_uint8; } break; -case 110: -#line 732 "dcParser.yxx" +case 112: +#line 762 "dcParser.yxx" { yyval.u.subatomic = ST_uint16; } break; -case 111: -#line 736 "dcParser.yxx" +case 113: +#line 766 "dcParser.yxx" { yyval.u.subatomic = ST_uint32; } break; -case 112: -#line 740 "dcParser.yxx" +case 114: +#line 770 "dcParser.yxx" { yyval.u.subatomic = ST_uint64; } break; -case 113: -#line 744 "dcParser.yxx" +case 115: +#line 774 "dcParser.yxx" { yyval.u.subatomic = ST_float64; } break; -case 114: -#line 748 "dcParser.yxx" +case 116: +#line 778 "dcParser.yxx" { yyval.u.subatomic = ST_string; } break; -case 115: -#line 752 "dcParser.yxx" +case 117: +#line 782 "dcParser.yxx" { yyval.u.subatomic = ST_blob; } break; -case 116: -#line 756 "dcParser.yxx" +case 118: +#line 786 "dcParser.yxx" { yyval.u.subatomic = ST_blob32; } break; -case 117: -#line 760 "dcParser.yxx" +case 119: +#line 790 "dcParser.yxx" { yyval.u.subatomic = ST_int8array; } break; -case 118: -#line 764 "dcParser.yxx" +case 120: +#line 794 "dcParser.yxx" { yyval.u.subatomic = ST_int16array; } break; -case 119: -#line 768 "dcParser.yxx" +case 121: +#line 798 "dcParser.yxx" { yyval.u.subatomic = ST_int32array; } break; -case 120: -#line 772 "dcParser.yxx" +case 122: +#line 802 "dcParser.yxx" { yyval.u.subatomic = ST_uint8array; } break; -case 121: -#line 776 "dcParser.yxx" +case 123: +#line 806 "dcParser.yxx" { yyval.u.subatomic = ST_uint16array; } break; -case 122: -#line 780 "dcParser.yxx" +case 124: +#line 810 "dcParser.yxx" { yyval.u.subatomic = ST_uint32array; } break; -case 123: -#line 784 "dcParser.yxx" +case 125: +#line 814 "dcParser.yxx" { yyval.u.subatomic = ST_uint32uint8array; } break; -case 124: -#line 788 "dcParser.yxx" +case 126: +#line 818 "dcParser.yxx" { yyval.u.subatomic = ST_char; } break; -case 126: -#line 796 "dcParser.yxx" +case 128: +#line 826 "dcParser.yxx" { current_atomic->add_flag(DCAtomicField::F_required); } break; -case 127: -#line 800 "dcParser.yxx" +case 129: +#line 830 "dcParser.yxx" { current_atomic->add_flag(DCAtomicField::F_broadcast); } break; -case 128: -#line 804 "dcParser.yxx" +case 130: +#line 834 "dcParser.yxx" { current_atomic->add_flag(DCAtomicField::F_p2p); } break; -case 129: -#line 808 "dcParser.yxx" +case 131: +#line 838 "dcParser.yxx" { current_atomic->add_flag(DCAtomicField::F_ram); } break; -case 130: -#line 812 "dcParser.yxx" +case 132: +#line 842 "dcParser.yxx" { current_atomic->add_flag(DCAtomicField::F_db); } break; -case 131: -#line 816 "dcParser.yxx" +case 133: +#line 846 "dcParser.yxx" { current_atomic->add_flag(DCAtomicField::F_clsend); } break; -case 132: -#line 820 "dcParser.yxx" +case 134: +#line 850 "dcParser.yxx" { current_atomic->add_flag(DCAtomicField::F_clrecv); } break; -case 133: -#line 824 "dcParser.yxx" +case 135: +#line 854 "dcParser.yxx" { current_atomic->add_flag(DCAtomicField::F_ownsend); } break; -case 134: -#line 828 "dcParser.yxx" +case 136: +#line 858 "dcParser.yxx" { current_atomic->add_flag(DCAtomicField::F_airecv); } break; -case 135: -#line 835 "dcParser.yxx" +case 137: +#line 865 "dcParser.yxx" { current_molecular = new DCMolecularField(yyvsp[-1].str); } break; -case 136: -#line 839 "dcParser.yxx" +case 138: +#line 869 "dcParser.yxx" { yyval.u.field = current_molecular; } break; -case 137: -#line 846 "dcParser.yxx" +case 139: +#line 876 "dcParser.yxx" { DCField *field = current_class->get_field_by_name(yyvsp[0].str); yyval.u.atomic = (DCAtomicField *)NULL; @@ -1938,16 +1973,16 @@ case 137: } } break; -case 138: -#line 862 "dcParser.yxx" +case 140: +#line 892 "dcParser.yxx" { if (yyvsp[0].u.atomic != (DCAtomicField *)NULL) { current_molecular->add_atomic(yyvsp[0].u.atomic); } } break; -case 139: -#line 868 "dcParser.yxx" +case 141: +#line 898 "dcParser.yxx" { if (yyvsp[0].u.atomic != (DCAtomicField *)NULL) { current_molecular->add_atomic(yyvsp[0].u.atomic); @@ -1959,28 +1994,28 @@ case 139: } } break; -case 140: -#line 882 "dcParser.yxx" +case 142: +#line 912 "dcParser.yxx" { yyval.str = ""; } break; -case 142: -#line 890 "dcParser.yxx" +case 144: +#line 920 "dcParser.yxx" { - yyval.u.field = current_switch; + yyval.u.dswitch = current_switch; current_switch = new DCSwitch(yyvsp[-4].str, yyvsp[-2].u.parameter); } break; -case 143: -#line 895 "dcParser.yxx" +case 145: +#line 925 "dcParser.yxx" { - yyval.u.field = current_switch; + yyval.u.dswitch = current_switch; current_switch = (DCSwitch *)yyvsp[-2].u.parameter; } break; -case 147: -#line 907 "dcParser.yxx" +case 149: +#line 937 "dcParser.yxx" { if (current_switch->get_num_cases() == 0) { yyerror("case declaration required before first element"); @@ -1989,15 +2024,16 @@ case 147: } } break; -case 148: -#line 918 "dcParser.yxx" +case 150: +#line 948 "dcParser.yxx" { current_packer = &default_packer; + current_packer->clear_data(); current_packer->begin_pack(current_switch->get_key_parameter()); } break; -case 149: -#line 923 "dcParser.yxx" +case 151: +#line 954 "dcParser.yxx" { if (!current_packer->end_pack()) { yyerror("Invalid value for switch parameter"); @@ -2006,14 +2042,14 @@ case 149: } } break; -case 151: -#line 935 "dcParser.yxx" +case 152: +#line 965 "dcParser.yxx" { yyval.u.field = yyvsp[-1].u.parameter; } break; -case 152: -#line 939 "dcParser.yxx" +case 153: +#line 969 "dcParser.yxx" { yyval.u.field = yyvsp[0].u.parameter; } @@ -2251,4 +2287,4 @@ yyreturn: #endif return yyresult; } -#line 947 "dcParser.yxx" +#line 977 "dcParser.yxx"