diff --git a/direct/src/dcparser/dcLexer.cxx.prebuilt b/direct/src/dcparser/dcLexer.cxx.prebuilt index 53fc56631b..be40b50ab8 100644 --- a/direct/src/dcparser/dcLexer.cxx.prebuilt +++ b/direct/src/dcparser/dcLexer.cxx.prebuilt @@ -300,30 +300,30 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 47 -#define YY_END_OF_BUFFER 48 -static yyconst short int yy_accept[187] = +#define YY_NUM_RULES 48 +#define YY_END_OF_BUFFER 49 +static yyconst short int yy_accept[188] = { 0, - 0, 0, 48, 46, 2, 1, 43, 46, 46, 46, - 40, 40, 44, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 1, 0, 40, 42, - 4, 3, 42, 41, 45, 45, 45, 45, 45, 45, - 35, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 0, 3, 41, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 33, - 34, 45, 45, 45, 45, 45, 0, 42, 45, 22, - 45, 11, 45, 45, 45, 45, 7, 45, 45, 45, - 45, 12, 45, 45, 45, 45, 45, 45, 45, 45, + 0, 0, 49, 47, 2, 1, 44, 47, 47, 47, + 40, 40, 45, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 1, 0, 41, 43, + 4, 3, 43, 40, 42, 46, 46, 46, 46, 46, + 46, 35, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 0, 3, 42, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 33, 34, 46, 46, 46, 46, 46, 0, 43, 46, + 22, 46, 11, 46, 46, 46, 46, 7, 46, 46, + 46, 46, 12, 46, 46, 46, 46, 46, 46, 46, - 45, 45, 45, 45, 45, 45, 45, 13, 14, 15, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 16, 39, 23, 45, 37, 36, 5, 45, 8, 45, - 45, 45, 45, 45, 21, 6, 10, 45, 17, 18, - 19, 45, 45, 20, 45, 45, 45, 38, 45, 9, - 45, 45, 45, 45, 45, 45, 45, 45, 31, 45, - 45, 45, 45, 32, 45, 45, 24, 45, 45, 45, - 45, 25, 26, 45, 45, 45, 27, 28, 29, 45, - 45, 45, 45, 45, 30, 0 + 46, 46, 46, 46, 46, 46, 46, 46, 13, 14, + 15, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 16, 39, 23, 46, 37, 36, 5, 46, 8, + 46, 46, 46, 46, 46, 21, 6, 10, 46, 17, + 18, 19, 46, 46, 20, 46, 46, 46, 38, 46, + 9, 46, 46, 46, 46, 46, 46, 46, 46, 31, + 46, 46, 46, 46, 32, 46, 46, 24, 46, 46, + 46, 46, 25, 26, 46, 46, 46, 27, 28, 29, + 46, 46, 46, 46, 46, 30, 0 } ; static yyconst int yy_ec[256] = @@ -364,125 +364,127 @@ static yyconst int yy_meta[44] = 5, 5, 5, 5, 5, 5, 1, 6, 6, 7, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7 + 7, 8, 7 } ; -static yyconst short int yy_base[194] = +static yyconst short int yy_base[196] = { 0, - 0, 0, 223, 224, 224, 0, 224, 215, 0, 39, - 38, 214, 224, 0, 191, 16, 27, 27, 23, 23, - 178, 207, 35, 20, 174, 187, 0, 0, 208, 43, - 224, 0, 0, 0, 0, 178, 180, 179, 174, 27, - 0, 180, 176, 175, 173, 168, 173, 170, 172, 167, - 165, 171, 165, 166, 191, 0, 0, 171, 173, 173, - 168, 167, 166, 169, 168, 157, 154, 55, 149, 0, - 0, 146, 37, 146, 158, 144, 175, 174, 156, 166, - 153, 0, 153, 143, 137, 135, 0, 136, 156, 159, - 156, 147, 142, 137, 133, 141, 140, 138, 62, 121, + 0, 0, 230, 231, 231, 0, 231, 222, 0, 39, + 38, 39, 231, 0, 199, 18, 28, 28, 23, 24, + 186, 215, 36, 22, 182, 195, 0, 0, 216, 43, + 231, 0, 0, 0, 0, 0, 186, 188, 187, 182, + 28, 0, 188, 184, 183, 181, 176, 181, 178, 180, + 175, 173, 179, 173, 174, 199, 0, 0, 179, 181, + 181, 176, 175, 174, 177, 176, 165, 162, 57, 157, + 0, 0, 154, 37, 154, 166, 152, 183, 182, 164, + 174, 161, 0, 161, 151, 145, 143, 0, 144, 164, + 167, 164, 155, 150, 145, 141, 149, 148, 146, 67, - 149, 136, 118, 133, 119, 140, 116, 132, 131, 0, - 115, 118, 113, 121, 109, 118, 120, 129, 132, 129, - 120, 0, 0, 119, 0, 0, 0, 126, 0, 102, - 101, 100, 111, 109, 0, 0, 0, 107, 111, 30, - 0, 95, 93, 0, 93, 92, 106, 0, 102, 0, - 89, 88, 94, 86, 83, 99, 98, 75, 0, 81, - 80, 83, 93, 0, 70, 69, 0, 90, 89, 71, - 65, 0, 0, 64, 63, 89, 0, 0, 0, 82, - 58, 46, 58, 32, 0, 224, 80, 84, 68, 85, - 92, 95, 99 + 129, 157, 144, 126, 141, 127, 148, 124, 140, 139, + 0, 123, 126, 121, 129, 117, 126, 128, 137, 140, + 137, 128, 0, 0, 127, 0, 0, 0, 134, 0, + 110, 109, 108, 119, 117, 0, 0, 0, 115, 119, + 31, 0, 103, 101, 0, 101, 100, 114, 0, 110, + 0, 97, 96, 102, 94, 91, 107, 106, 83, 0, + 89, 88, 91, 101, 0, 78, 77, 0, 98, 97, + 79, 73, 0, 0, 71, 61, 81, 0, 0, 0, + 75, 49, 42, 54, 31, 0, 231, 83, 88, 66, + 90, 94, 102, 106, 110 } ; -static yyconst short int yy_def[194] = +static yyconst short int yy_def[196] = { 0, - 186, 1, 186, 186, 186, 187, 186, 188, 189, 186, - 188, 188, 186, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 187, 189, 188, 189, - 186, 191, 30, 192, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 193, 191, 192, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 193, 193, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 187, 1, 187, 187, 187, 188, 187, 189, 190, 187, + 191, 191, 187, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 188, 190, 189, 190, + 187, 193, 30, 12, 194, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 195, 193, 194, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 195, 195, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 0, 186, 186, 186, 186, - 186, 186, 186 + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 0, 187, 187, 187, + 187, 187, 187, 187, 187 } ; -static yyconst short int yy_nxt[268] = +static yyconst short int yy_nxt[275] = { 0, 4, 5, 6, 7, 4, 8, 9, 10, 11, 12, 12, 12, 12, 12, 12, 12, 13, 14, 14, 14, 15, 16, 17, 18, 14, 19, 14, 14, 20, 14, 14, 14, 21, 22, 14, 23, 24, 25, 26, 14, - 14, 14, 14, 31, 33, 37, 32, 39, 41, 42, - 152, 38, 43, 45, 46, 49, 40, 51, 44, 50, - 52, 55, 62, 63, 89, 95, 90, 55, 153, 91, - 92, 118, 30, 119, 185, 96, 120, 121, 184, 34, - 27, 183, 27, 27, 27, 27, 27, 29, 29, 35, - 35, 35, 56, 182, 56, 56, 56, 56, 56, 57, + 14, 14, 14, 31, 33, 33, 32, 38, 40, 42, + 43, 153, 44, 39, 46, 47, 50, 41, 45, 52, + 51, 56, 53, 63, 64, 96, 90, 56, 91, 154, + 30, 92, 93, 186, 185, 97, 119, 184, 120, 35, + 187, 121, 122, 27, 183, 27, 27, 27, 27, 27, + 27, 29, 29, 34, 34, 182, 181, 34, 36, 36, - 57, 78, 181, 78, 180, 179, 178, 177, 176, 175, - 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, - 164, 163, 162, 161, 160, 159, 158, 157, 156, 155, - 154, 151, 150, 149, 148, 147, 146, 145, 144, 143, - 142, 141, 140, 139, 138, 137, 136, 135, 134, 133, - 132, 131, 130, 129, 128, 127, 126, 125, 124, 123, - 122, 117, 116, 115, 114, 113, 112, 111, 110, 109, - 108, 107, 106, 105, 104, 103, 102, 101, 100, 186, - 186, 99, 98, 97, 94, 93, 88, 87, 86, 85, - 84, 83, 82, 81, 80, 79, 77, 76, 75, 74, + 36, 36, 57, 180, 57, 57, 57, 57, 57, 57, + 58, 58, 79, 179, 79, 178, 177, 176, 175, 174, + 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, + 163, 162, 161, 160, 159, 158, 157, 156, 155, 152, + 151, 150, 149, 148, 147, 146, 145, 144, 143, 142, + 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, + 131, 130, 129, 128, 127, 126, 125, 124, 123, 118, + 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, + 107, 106, 105, 104, 103, 102, 101, 187, 187, 100, + 99, 98, 95, 94, 89, 88, 87, 86, 85, 84, - 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, - 61, 60, 59, 58, 33, 54, 53, 48, 47, 36, - 33, 28, 186, 3, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186 + 83, 82, 81, 80, 78, 77, 76, 75, 74, 73, + 72, 71, 70, 69, 68, 67, 66, 65, 62, 61, + 60, 59, 33, 55, 54, 49, 48, 37, 28, 187, + 3, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187 } ; -static yyconst short int yy_chk[268] = +static yyconst short int yy_chk[275] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 10, 11, 16, 10, 17, 18, 18, - 140, 16, 19, 20, 20, 23, 17, 24, 19, 23, - 24, 30, 40, 40, 68, 73, 68, 30, 140, 68, - 68, 99, 189, 99, 184, 73, 99, 99, 183, 11, - 187, 182, 187, 187, 187, 187, 187, 188, 188, 190, - 190, 190, 191, 181, 191, 191, 191, 191, 191, 192, + 1, 1, 1, 10, 11, 12, 10, 16, 17, 18, + 18, 141, 19, 16, 20, 20, 23, 17, 19, 24, + 23, 30, 24, 41, 41, 74, 69, 30, 69, 141, + 190, 69, 69, 185, 184, 74, 100, 183, 100, 11, + 12, 100, 100, 188, 182, 188, 188, 188, 188, 188, + 188, 189, 189, 191, 191, 181, 177, 191, 192, 192, - 192, 193, 180, 193, 176, 175, 174, 171, 170, 169, - 168, 166, 165, 163, 162, 161, 160, 158, 157, 156, - 155, 154, 153, 152, 151, 149, 147, 146, 145, 143, - 142, 139, 138, 134, 133, 132, 131, 130, 128, 124, - 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, - 111, 109, 108, 107, 106, 105, 104, 103, 102, 101, - 100, 98, 97, 96, 95, 94, 93, 92, 91, 90, - 89, 88, 86, 85, 84, 83, 81, 80, 79, 78, - 77, 76, 75, 74, 72, 69, 67, 66, 65, 64, - 63, 62, 61, 60, 59, 58, 55, 54, 53, 52, + 192, 192, 193, 176, 193, 193, 193, 193, 193, 193, + 194, 194, 195, 175, 195, 172, 171, 170, 169, 167, + 166, 164, 163, 162, 161, 159, 158, 157, 156, 155, + 154, 153, 152, 150, 148, 147, 146, 144, 143, 140, + 139, 135, 134, 133, 132, 131, 129, 125, 122, 121, + 120, 119, 118, 117, 116, 115, 114, 113, 112, 110, + 109, 108, 107, 106, 105, 104, 103, 102, 101, 99, + 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, + 87, 86, 85, 84, 82, 81, 80, 79, 78, 77, + 76, 75, 73, 70, 68, 67, 66, 65, 64, 63, - 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, - 39, 38, 37, 36, 29, 26, 25, 22, 21, 15, - 12, 8, 3, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186 + 62, 61, 60, 59, 56, 55, 54, 53, 52, 51, + 50, 49, 48, 47, 46, 45, 44, 43, 40, 39, + 38, 37, 29, 26, 25, 22, 21, 15, 8, 3, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187 } ; static yy_state_type yy_last_accepting_state; @@ -797,7 +799,7 @@ inline void accept() { col_number += yyleng; } -#line 802 "lex.yy.c" +#line 804 "lex.yy.c" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -948,7 +950,7 @@ YY_DECL register char *yy_cp = NULL, *yy_bp = NULL; register int yy_act; -#line 307 "dcLexer.lxx" +#line 308 "dcLexer.lxx" @@ -959,7 +961,7 @@ YY_DECL } -#line 964 "lex.yy.c" +#line 966 "lex.yy.c" if ( yy_init ) { @@ -1010,13 +1012,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 187 ) + if ( yy_current_state >= 188 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 224 ); + while ( yy_base[yy_current_state] != 231 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1044,7 +1046,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 317 "dcLexer.lxx" +#line 318 "dcLexer.lxx" { // New line. Save a copy of the line so we can print it out for the // benefit of the user in case we get an error. @@ -1061,7 +1063,7 @@ YY_RULE_SETUP YY_BREAK case 2: YY_RULE_SETUP -#line 331 "dcLexer.lxx" +#line 332 "dcLexer.lxx" { // Eat whitespace. accept(); @@ -1069,7 +1071,7 @@ YY_RULE_SETUP YY_BREAK case 3: YY_RULE_SETUP -#line 336 "dcLexer.lxx" +#line 337 "dcLexer.lxx" { // Eat C++-style comments. accept(); @@ -1077,7 +1079,7 @@ YY_RULE_SETUP YY_BREAK case 4: YY_RULE_SETUP -#line 341 "dcLexer.lxx" +#line 342 "dcLexer.lxx" { // Eat C-style comments. accept(); @@ -1086,7 +1088,7 @@ YY_RULE_SETUP YY_BREAK case 5: YY_RULE_SETUP -#line 348 "dcLexer.lxx" +#line 349 "dcLexer.lxx" { accept(); return KW_DCLASS; @@ -1094,7 +1096,7 @@ YY_RULE_SETUP YY_BREAK case 6: YY_RULE_SETUP -#line 353 "dcLexer.lxx" +#line 354 "dcLexer.lxx" { accept(); return KW_STRUCT; @@ -1102,7 +1104,7 @@ YY_RULE_SETUP YY_BREAK case 7: YY_RULE_SETUP -#line 358 "dcLexer.lxx" +#line 359 "dcLexer.lxx" { accept(); return KW_FROM; @@ -1110,7 +1112,7 @@ YY_RULE_SETUP YY_BREAK case 8: YY_RULE_SETUP -#line 363 "dcLexer.lxx" +#line 364 "dcLexer.lxx" { accept(); return KW_IMPORT; @@ -1118,7 +1120,7 @@ YY_RULE_SETUP YY_BREAK case 9: YY_RULE_SETUP -#line 368 "dcLexer.lxx" +#line 369 "dcLexer.lxx" { accept(); return KW_TYPEDEF; @@ -1126,7 +1128,7 @@ YY_RULE_SETUP YY_BREAK case 10: YY_RULE_SETUP -#line 373 "dcLexer.lxx" +#line 374 "dcLexer.lxx" { accept(); return KW_SWITCH; @@ -1134,7 +1136,7 @@ YY_RULE_SETUP YY_BREAK case 11: YY_RULE_SETUP -#line 378 "dcLexer.lxx" +#line 379 "dcLexer.lxx" { accept(); return KW_CASE; @@ -1142,7 +1144,7 @@ YY_RULE_SETUP YY_BREAK case 12: YY_RULE_SETUP -#line 383 "dcLexer.lxx" +#line 384 "dcLexer.lxx" { accept(); return KW_INT8; @@ -1150,7 +1152,7 @@ YY_RULE_SETUP YY_BREAK case 13: YY_RULE_SETUP -#line 388 "dcLexer.lxx" +#line 389 "dcLexer.lxx" { accept(); return KW_INT16; @@ -1158,7 +1160,7 @@ YY_RULE_SETUP YY_BREAK case 14: YY_RULE_SETUP -#line 393 "dcLexer.lxx" +#line 394 "dcLexer.lxx" { accept(); return KW_INT32; @@ -1166,7 +1168,7 @@ YY_RULE_SETUP YY_BREAK case 15: YY_RULE_SETUP -#line 398 "dcLexer.lxx" +#line 399 "dcLexer.lxx" { accept(); return KW_INT64; @@ -1174,7 +1176,7 @@ YY_RULE_SETUP YY_BREAK case 16: YY_RULE_SETUP -#line 403 "dcLexer.lxx" +#line 404 "dcLexer.lxx" { accept(); return KW_UINT8; @@ -1182,7 +1184,7 @@ YY_RULE_SETUP YY_BREAK case 17: YY_RULE_SETUP -#line 408 "dcLexer.lxx" +#line 409 "dcLexer.lxx" { accept(); return KW_UINT16; @@ -1190,7 +1192,7 @@ YY_RULE_SETUP YY_BREAK case 18: YY_RULE_SETUP -#line 413 "dcLexer.lxx" +#line 414 "dcLexer.lxx" { accept(); return KW_UINT32; @@ -1198,7 +1200,7 @@ YY_RULE_SETUP YY_BREAK case 19: YY_RULE_SETUP -#line 418 "dcLexer.lxx" +#line 419 "dcLexer.lxx" { accept(); return KW_UINT64; @@ -1206,7 +1208,7 @@ YY_RULE_SETUP YY_BREAK case 20: YY_RULE_SETUP -#line 423 "dcLexer.lxx" +#line 424 "dcLexer.lxx" { accept(); return KW_FLOAT64; @@ -1214,7 +1216,7 @@ YY_RULE_SETUP YY_BREAK case 21: YY_RULE_SETUP -#line 428 "dcLexer.lxx" +#line 429 "dcLexer.lxx" { accept(); return KW_STRING; @@ -1222,7 +1224,7 @@ YY_RULE_SETUP YY_BREAK case 22: YY_RULE_SETUP -#line 433 "dcLexer.lxx" +#line 434 "dcLexer.lxx" { accept(); return KW_BLOB; @@ -1230,7 +1232,7 @@ YY_RULE_SETUP YY_BREAK case 23: YY_RULE_SETUP -#line 438 "dcLexer.lxx" +#line 439 "dcLexer.lxx" { accept(); return KW_BLOB32; @@ -1238,7 +1240,7 @@ YY_RULE_SETUP YY_BREAK case 24: YY_RULE_SETUP -#line 443 "dcLexer.lxx" +#line 444 "dcLexer.lxx" { accept(); return KW_INT8ARRAY; @@ -1246,7 +1248,7 @@ YY_RULE_SETUP YY_BREAK case 25: YY_RULE_SETUP -#line 448 "dcLexer.lxx" +#line 449 "dcLexer.lxx" { accept(); return KW_INT16ARRAY; @@ -1254,7 +1256,7 @@ YY_RULE_SETUP YY_BREAK case 26: YY_RULE_SETUP -#line 453 "dcLexer.lxx" +#line 454 "dcLexer.lxx" { accept(); return KW_INT32ARRAY; @@ -1262,7 +1264,7 @@ YY_RULE_SETUP YY_BREAK case 27: YY_RULE_SETUP -#line 458 "dcLexer.lxx" +#line 459 "dcLexer.lxx" { accept(); return KW_UINT8ARRAY; @@ -1270,7 +1272,7 @@ YY_RULE_SETUP YY_BREAK case 28: YY_RULE_SETUP -#line 463 "dcLexer.lxx" +#line 464 "dcLexer.lxx" { accept(); return KW_UINT16ARRAY; @@ -1278,7 +1280,7 @@ YY_RULE_SETUP YY_BREAK case 29: YY_RULE_SETUP -#line 468 "dcLexer.lxx" +#line 469 "dcLexer.lxx" { accept(); return KW_UINT32ARRAY; @@ -1286,7 +1288,7 @@ YY_RULE_SETUP YY_BREAK case 30: YY_RULE_SETUP -#line 473 "dcLexer.lxx" +#line 474 "dcLexer.lxx" { accept(); return KW_UINT32UINT8ARRAY; @@ -1294,7 +1296,7 @@ YY_RULE_SETUP YY_BREAK case 31: YY_RULE_SETUP -#line 478 "dcLexer.lxx" +#line 479 "dcLexer.lxx" { accept(); return KW_REQUIRED; @@ -1302,7 +1304,7 @@ YY_RULE_SETUP YY_BREAK case 32: YY_RULE_SETUP -#line 483 "dcLexer.lxx" +#line 484 "dcLexer.lxx" { accept(); return KW_BROADCAST; @@ -1310,7 +1312,7 @@ YY_RULE_SETUP YY_BREAK case 33: YY_RULE_SETUP -#line 488 "dcLexer.lxx" +#line 489 "dcLexer.lxx" { accept(); return KW_P2P; @@ -1318,7 +1320,7 @@ YY_RULE_SETUP YY_BREAK case 34: YY_RULE_SETUP -#line 493 "dcLexer.lxx" +#line 494 "dcLexer.lxx" { accept(); return KW_RAM; @@ -1326,7 +1328,7 @@ YY_RULE_SETUP YY_BREAK case 35: YY_RULE_SETUP -#line 498 "dcLexer.lxx" +#line 499 "dcLexer.lxx" { accept(); return KW_DB; @@ -1334,7 +1336,7 @@ YY_RULE_SETUP YY_BREAK case 36: YY_RULE_SETUP -#line 503 "dcLexer.lxx" +#line 504 "dcLexer.lxx" { accept(); return KW_CLSEND; @@ -1342,7 +1344,7 @@ YY_RULE_SETUP YY_BREAK case 37: YY_RULE_SETUP -#line 508 "dcLexer.lxx" +#line 509 "dcLexer.lxx" { accept(); return KW_CLRECV; @@ -1350,7 +1352,7 @@ YY_RULE_SETUP YY_BREAK case 38: YY_RULE_SETUP -#line 513 "dcLexer.lxx" +#line 514 "dcLexer.lxx" { accept(); return KW_OWNSEND; @@ -1358,7 +1360,7 @@ YY_RULE_SETUP YY_BREAK case 39: YY_RULE_SETUP -#line 518 "dcLexer.lxx" +#line 519 "dcLexer.lxx" { accept(); return KW_AIRECV; @@ -1366,13 +1368,40 @@ YY_RULE_SETUP YY_BREAK case 40: YY_RULE_SETUP -#line 523 "dcLexer.lxx" +#line 524 "dcLexer.lxx" { - // An integer number. + // An unsigned integer number. accept(); // atoll isn't fully portable, so we'll decode the integer by hand. - dcyylval.u.integer = 0; + dcyylval.str = dcyytext; + dcyylval.u.uint64 = 0; + const char *p = dcyytext; + while (*p != '\0') { + PN_uint64 next_value = dcyylval.u.uint64 * 10; + if (next_value < dcyylval.u.uint64) { + dcyyerror("Number out of range."); + dcyylval.u.uint64 = 1; + return UNSIGNED_INTEGER; + } + + dcyylval.u.uint64 = next_value + (*p - '0'); + ++p; + } + + return UNSIGNED_INTEGER; +} + YY_BREAK +case 41: +YY_RULE_SETUP +#line 547 "dcLexer.lxx" +{ + // A signed integer number. + accept(); + + // atoll isn't fully portable, so we'll decode the integer by hand. + dcyylval.str = dcyytext; + bool neg = false; const char *p = dcyytext; if (*p == '-') { @@ -1381,44 +1410,70 @@ YY_RULE_SETUP } else if (*p == '+') { ++p; } + + PN_uint64 value = 0; while (*p != '\0') { - dcyylval.u.integer = dcyylval.u.integer * 10 + (*p - '0'); + PN_uint64 next_value = value * 10; + if (next_value < value) { + dcyyerror("Number out of range."); + dcyylval.u.int64 = 1; + return SIGNED_INTEGER; + } + + value = next_value + (*p - '0'); ++p; } + if (neg) { - dcyylval.u.integer = -dcyylval.u.integer; - } + dcyylval.u.int64 = -(PN_int64)value; + if (dcyylval.u.int64 > 0) { + dcyyerror("Number out of range."); + dcyylval.u.int64 = 1; + } + } else { + dcyylval.u.int64 = (PN_int64)value; + if (dcyylval.u.int64 < 0) { + dcyyerror("Number out of range."); + dcyylval.u.int64 = 1; + } + } - dcyylval.str = dcyytext; - return INTEGER; + return SIGNED_INTEGER; } YY_BREAK -case 41: +case 42: YY_RULE_SETUP -#line 549 "dcLexer.lxx" +#line 593 "dcLexer.lxx" { // A hexadecimal integer number. accept(); // As above, we'll decode the hex string by hand. - dcyylval.u.integer = 0; + dcyylval.str = dcyytext; + dcyylval.u.uint64 = 0; const char *p = dcyytext + 2; while (*p != '\0') { + PN_uint64 next_value = dcyylval.u.uint64 * 16; + if (next_value < dcyylval.u.uint64) { + dcyyerror("Number out of range."); + dcyylval.u.uint64 = 1; + return UNSIGNED_INTEGER; + } + if (isalpha(*p)) { - dcyylval.u.integer = dcyylval.u.integer * 16 + (tolower(*p) - 'a' + 10); + dcyylval.u.uint64 = next_value + (tolower(*p) - 'a' + 10); } else { - dcyylval.u.integer = dcyylval.u.integer * 16 + (*p - '0'); + dcyylval.u.uint64 = next_value + (*p - '0'); } ++p; } - dcyylval.str = dcyytext; - return INTEGER; + return UNSIGNED_INTEGER; } YY_BREAK -case 42: +case 43: YY_RULE_SETUP -#line 569 "dcLexer.lxx" +#line 620 "dcLexer.lxx" { // A floating-point number. accept(); @@ -1427,9 +1482,9 @@ YY_RULE_SETUP return REAL; } YY_BREAK -case 43: +case 44: YY_RULE_SETUP -#line 577 "dcLexer.lxx" +#line 628 "dcLexer.lxx" { // Quoted string. accept(); @@ -1437,9 +1492,9 @@ YY_RULE_SETUP return STRING; } YY_BREAK -case 44: +case 45: YY_RULE_SETUP -#line 584 "dcLexer.lxx" +#line 635 "dcLexer.lxx" { // Long hex string. accept(); @@ -1447,9 +1502,9 @@ YY_RULE_SETUP return HEX_STRING; } YY_BREAK -case 45: +case 46: YY_RULE_SETUP -#line 591 "dcLexer.lxx" +#line 642 "dcLexer.lxx" { // Identifier. accept(); @@ -1457,21 +1512,21 @@ YY_RULE_SETUP return IDENTIFIER; } YY_BREAK -case 46: +case 47: YY_RULE_SETUP -#line 599 "dcLexer.lxx" +#line 650 "dcLexer.lxx" { // Send any other printable character as itself. accept(); return dcyytext[0]; } YY_BREAK -case 47: +case 48: YY_RULE_SETUP -#line 605 "dcLexer.lxx" +#line 656 "dcLexer.lxx" ECHO; YY_BREAK -#line 1476 "lex.yy.c" +#line 1531 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1763,7 +1818,7 @@ static yy_state_type yy_get_previous_state() while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 187 ) + if ( yy_current_state >= 188 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1798,11 +1853,11 @@ yy_state_type yy_current_state; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 187 ) + if ( yy_current_state >= 188 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 186); + yy_is_jam = (yy_current_state == 187); return yy_is_jam ? 0 : yy_current_state; } @@ -2352,4 +2407,4 @@ int main() return 0; } #endif -#line 605 "dcLexer.lxx" +#line 656 "dcLexer.lxx" diff --git a/direct/src/dcparser/dcLexer.lxx b/direct/src/dcparser/dcLexer.lxx index 51dd9843ce..f059b822e8 100644 --- a/direct/src/dcparser/dcLexer.lxx +++ b/direct/src/dcparser/dcLexer.lxx @@ -300,9 +300,10 @@ inline void accept() { %} -INTEGERNUM ([+-]?([0-9]+)) -HEXNUM 0x[0-9a-fA-F]* -REALNUM ([+-]?(([0-9]+[.])|([0-9]*[.][0-9]+))([eE][+-]?[0-9]+)?) +UNSIGNED_INTEGERNUM ([0-9]+) +SIGNED_INTEGERNUM ([+-]([0-9]+)) +UNSIGNED_HEXNUM (0x[0-9a-fA-F]*) +REALNUM ([+-]?(([0-9]+[.])|([0-9]*[.][0-9]+))([eE][+-]?[0-9]+)?) %% @@ -520,12 +521,36 @@ REALNUM ([+-]?(([0-9]+[.])|([0-9]*[.][0-9]+))([eE][+-]?[0-9]+)?) return KW_AIRECV; } -{INTEGERNUM} { - // An integer number. +{UNSIGNED_INTEGERNUM} { + // An unsigned integer number. accept(); // atoll isn't fully portable, so we'll decode the integer by hand. - dcyylval.u.integer = 0; + dcyylval.str = dcyytext; + dcyylval.u.uint64 = 0; + const char *p = dcyytext; + while (*p != '\0') { + PN_uint64 next_value = dcyylval.u.uint64 * 10; + if (next_value < dcyylval.u.uint64) { + dcyyerror("Number out of range."); + dcyylval.u.uint64 = 1; + return UNSIGNED_INTEGER; + } + + dcyylval.u.uint64 = next_value + (*p - '0'); + ++p; + } + + return UNSIGNED_INTEGER; +} + +{SIGNED_INTEGERNUM} { + // A signed integer number. + accept(); + + // atoll isn't fully portable, so we'll decode the integer by hand. + dcyylval.str = dcyytext; + bool neg = false; const char *p = dcyytext; if (*p == '-') { @@ -534,36 +559,62 @@ REALNUM ([+-]?(([0-9]+[.])|([0-9]*[.][0-9]+))([eE][+-]?[0-9]+)?) } else if (*p == '+') { ++p; } + + PN_uint64 value = 0; while (*p != '\0') { - dcyylval.u.integer = dcyylval.u.integer * 10 + (*p - '0'); + PN_uint64 next_value = value * 10; + if (next_value < value) { + dcyyerror("Number out of range."); + dcyylval.u.int64 = 1; + return SIGNED_INTEGER; + } + + value = next_value + (*p - '0'); ++p; } + if (neg) { - dcyylval.u.integer = -dcyylval.u.integer; - } + dcyylval.u.int64 = -(PN_int64)value; + if (dcyylval.u.int64 > 0) { + dcyyerror("Number out of range."); + dcyylval.u.int64 = 1; + } + } else { + dcyylval.u.int64 = (PN_int64)value; + if (dcyylval.u.int64 < 0) { + dcyyerror("Number out of range."); + dcyylval.u.int64 = 1; + } + } - dcyylval.str = dcyytext; - return INTEGER; + return SIGNED_INTEGER; } -{HEXNUM} { +{UNSIGNED_HEXNUM} { // A hexadecimal integer number. accept(); // As above, we'll decode the hex string by hand. - dcyylval.u.integer = 0; + dcyylval.str = dcyytext; + dcyylval.u.uint64 = 0; const char *p = dcyytext + 2; while (*p != '\0') { + PN_uint64 next_value = dcyylval.u.uint64 * 16; + if (next_value < dcyylval.u.uint64) { + dcyyerror("Number out of range."); + dcyylval.u.uint64 = 1; + return UNSIGNED_INTEGER; + } + if (isalpha(*p)) { - dcyylval.u.integer = dcyylval.u.integer * 16 + (tolower(*p) - 'a' + 10); + dcyylval.u.uint64 = next_value + (tolower(*p) - 'a' + 10); } else { - dcyylval.u.integer = dcyylval.u.integer * 16 + (*p - '0'); + dcyylval.u.uint64 = next_value + (*p - '0'); } ++p; } - dcyylval.str = dcyytext; - return INTEGER; + return UNSIGNED_INTEGER; } {REALNUM} { diff --git a/direct/src/dcparser/dcNumericRange.I b/direct/src/dcparser/dcNumericRange.I index d4806292f7..bec5260fb2 100644 --- a/direct/src/dcparser/dcNumericRange.I +++ b/direct/src/dcparser/dcNumericRange.I @@ -268,11 +268,19 @@ get_max(int n) const { template INLINE void DCNumericRange:: output_minmax(ostream &out, Number divisor, const MinMax &range) const { - if (range._min == range._max) { - out << (double)range._min / (double)divisor; + if (divisor == 1) { + if (range._min == range._max) { + out << range._min; + } else { + out << range._min << "-" << range._max; + } } else { - out << (double)range._min / (double)divisor - << "-" - << (double)range._max / (double)divisor; + if (range._min == range._max) { + out << (double)range._min / (double)divisor; + } else { + out << (double)range._min / (double)divisor + << "-" + << (double)range._max / (double)divisor; + } } } diff --git a/direct/src/dcparser/dcParser.cxx.prebuilt b/direct/src/dcparser/dcParser.cxx.prebuilt index e35c6b2efc..5ff94eb2b6 100644 --- a/direct/src/dcparser/dcParser.cxx.prebuilt +++ b/direct/src/dcparser/dcParser.cxx.prebuilt @@ -10,48 +10,49 @@ #define yychar dcyychar #define yydebug dcyydebug #define yynerrs dcyynerrs -# define INTEGER 257 -# define REAL 258 -# define STRING 259 -# define HEX_STRING 260 -# define IDENTIFIER 261 -# define KW_DCLASS 262 -# define KW_STRUCT 263 -# define KW_FROM 264 -# define KW_IMPORT 265 -# define KW_TYPEDEF 266 -# define KW_SWITCH 267 -# define KW_CASE 268 -# define KW_INT8 269 -# define KW_INT16 270 -# define KW_INT32 271 -# define KW_INT64 272 -# define KW_UINT8 273 -# define KW_UINT16 274 -# define KW_UINT32 275 -# define KW_UINT64 276 -# define KW_FLOAT64 277 -# define KW_STRING 278 -# define KW_BLOB 279 -# define KW_BLOB32 280 -# define KW_INT8ARRAY 281 -# define KW_INT16ARRAY 282 -# define KW_INT32ARRAY 283 -# define KW_UINT8ARRAY 284 -# define KW_UINT16ARRAY 285 -# define KW_UINT32ARRAY 286 -# define KW_UINT32UINT8ARRAY 287 -# define KW_REQUIRED 288 -# define KW_BROADCAST 289 -# define KW_P2P 290 -# define KW_RAM 291 -# define KW_DB 292 -# define KW_CLSEND 293 -# define KW_CLRECV 294 -# define KW_OWNSEND 295 -# define KW_AIRECV 296 -# define START_DC 297 -# define START_PARAMETER_VALUE 298 +# define UNSIGNED_INTEGER 257 +# define SIGNED_INTEGER 258 +# define REAL 259 +# define STRING 260 +# define HEX_STRING 261 +# define IDENTIFIER 262 +# define KW_DCLASS 263 +# define KW_STRUCT 264 +# define KW_FROM 265 +# define KW_IMPORT 266 +# define KW_TYPEDEF 267 +# define KW_SWITCH 268 +# define KW_CASE 269 +# define KW_INT8 270 +# define KW_INT16 271 +# define KW_INT32 272 +# define KW_INT64 273 +# define KW_UINT8 274 +# define KW_UINT16 275 +# define KW_UINT32 276 +# define KW_UINT64 277 +# define KW_FLOAT64 278 +# define KW_STRING 279 +# define KW_BLOB 280 +# define KW_BLOB32 281 +# define KW_INT8ARRAY 282 +# define KW_INT16ARRAY 283 +# define KW_INT32ARRAY 284 +# define KW_UINT8ARRAY 285 +# define KW_UINT16ARRAY 286 +# define KW_UINT32ARRAY 287 +# define KW_UINT32UINT8ARRAY 288 +# define KW_REQUIRED 289 +# define KW_BROADCAST 290 +# define KW_P2P 291 +# define KW_RAM 292 +# define KW_DB 293 +# define KW_CLSEND 294 +# define KW_CLRECV 295 +# define KW_OWNSEND 296 +# define KW_AIRECV 297 +# define START_DC 298 +# define START_PARAMETER_VALUE 299 #line 6 "dcParser.yxx" @@ -119,12 +120,12 @@ dc_cleanup_parser() { -#define YYFINAL 210 +#define YYFINAL 215 #define YYFLAG -32768 -#define YYNTBASE 59 +#define YYNTBASE 60 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ -#define YYTRANSLATE(x) ((unsigned)(x) <= 298 ? yytranslate[x] : 113) +#define YYTRANSLATE(x) ((unsigned)(x) <= 299 ? yytranslate[x] : 117) /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ static const char yytranslate[] = @@ -133,15 +134,15 @@ static const char yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 53, 54, 50, 2, 51, 56, 49, 48, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 52, 45, - 2, 55, 2, 2, 2, 2, 2, 2, 2, 2, + 54, 55, 51, 2, 52, 57, 50, 49, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 53, 46, + 2, 56, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 57, 2, 58, 2, 2, 2, 2, 2, 2, + 2, 58, 2, 59, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 46, 2, 47, 2, 2, 2, 2, + 2, 2, 2, 47, 2, 48, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -158,7 +159,7 @@ static const char yytranslate[] = 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44 + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 }; #if YYDEBUG @@ -170,60 +171,60 @@ static const short yyprhs[] = 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, 201, 205, - 211, 216, 218, 223, 225, 229, 234, 236, 238, 240, - 242, 244, 246, 247, 252, 253, 258, 259, 264, 268, - 272, 276, 278, 281, 283, 285, 287, 291, 293, 295, - 297, 299, 301, 303, 305, 307, 309, 311, 313, 315, - 317, 319, 321, 323, 325, 327, 329, 331, 334, 337, - 340, 343, 346, 349, 352, 355, 358, 359, 364, 366, - 368, 372, 374, 376, 377, 387, 389, 392, 395, 398, - 399, 404, 406, 409, 411 + 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, 249, 254, 255, 260, + 261, 266, 270, 274, 278, 282, 284, 287, 289, 291, + 293, 297, 299, 301, 303, 305, 307, 309, 311, 313, + 315, 317, 319, 321, 323, 325, 327, 329, 331, 333, + 335, 337, 340, 343, 346, 349, 352, 355, 358, 361, + 364, 365, 370, 372, 374, 378, 380, 382, 383, 393, + 395, 398, 401, 404, 405, 410, 412, 415, 417 }; static const short yyrhs[] = { - 43, 60, 0, 44, 92, 0, 112, 0, 60, 45, - 0, 60, 61, 0, 60, 67, 0, 60, 71, 0, - 0, 63, 7, 62, 72, 46, 74, 47, 0, 9, - 0, 8, 0, 7, 0, 7, 0, 65, 48, 7, - 0, 65, 0, 66, 49, 65, 0, 11, 66, 0, - 0, 10, 66, 11, 68, 69, 0, 70, 0, 50, - 0, 65, 0, 70, 51, 65, 0, 12, 85, 0, - 112, 0, 52, 73, 0, 64, 0, 73, 51, 64, - 0, 112, 0, 74, 45, 0, 74, 75, 0, 76, - 0, 101, 0, 106, 0, 84, 45, 0, 82, 0, - 0, 7, 53, 77, 78, 54, 100, 0, 112, 0, - 79, 0, 80, 0, 79, 51, 80, 0, 85, 0, - 0, 85, 55, 81, 92, 0, 0, 89, 83, 90, - 0, 89, 0, 82, 0, 84, 0, 99, 0, 99, - 53, 87, 54, 0, 99, 48, 3, 0, 99, 48, - 3, 53, 87, 54, 0, 99, 53, 87, 54, 48, - 3, 0, 7, 0, 112, 0, 91, 0, 91, 56, - 91, 0, 91, 91, 0, 87, 51, 91, 0, 87, - 51, 91, 56, 91, 0, 87, 51, 91, 91, 0, - 112, 0, 3, 0, 3, 56, 3, 0, 3, 3, - 0, 88, 51, 3, 0, 88, 51, 3, 56, 3, - 0, 88, 51, 3, 3, 0, 86, 0, 89, 57, - 88, 58, 0, 7, 0, 90, 48, 3, 0, 90, - 57, 88, 58, 0, 3, 0, 4, 0, 3, 0, - 4, 0, 5, 0, 6, 0, 0, 46, 93, 96, - 47, 0, 0, 57, 94, 96, 58, 0, 0, 53, - 95, 96, 54, 0, 3, 50, 3, 0, 4, 50, - 3, 0, 6, 50, 3, 0, 97, 0, 98, 97, - 0, 112, 0, 51, 0, 92, 0, 98, 51, 92, - 0, 15, 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, 112, - 0, 100, 34, 0, 100, 35, 0, 100, 36, 0, - 100, 37, 0, 100, 38, 0, 100, 39, 0, 100, - 40, 0, 100, 41, 0, 100, 42, 0, 0, 7, - 52, 102, 104, 0, 7, 0, 103, 0, 104, 51, - 103, 0, 112, 0, 7, 0, 0, 13, 105, 53, - 85, 54, 46, 107, 108, 47, 0, 112, 0, 108, - 45, 0, 108, 109, 0, 108, 111, 0, 0, 14, - 110, 92, 52, 0, 106, 0, 84, 45, 0, 82, - 0, 0 + 44, 61, 0, 45, 96, 0, 116, 0, 61, 46, + 0, 61, 62, 0, 61, 68, 0, 61, 72, 0, + 0, 64, 8, 63, 73, 47, 75, 48, 0, 10, + 0, 9, 0, 8, 0, 8, 0, 66, 49, 8, + 0, 66, 0, 67, 50, 66, 0, 12, 67, 0, + 0, 11, 67, 12, 69, 70, 0, 71, 0, 51, + 0, 66, 0, 71, 52, 66, 0, 13, 86, 0, + 116, 0, 53, 74, 0, 65, 0, 74, 52, 65, + 0, 116, 0, 75, 46, 0, 75, 76, 0, 77, + 0, 105, 0, 110, 0, 85, 46, 0, 83, 0, + 0, 8, 54, 78, 79, 55, 104, 0, 116, 0, + 80, 0, 81, 0, 80, 52, 81, 0, 86, 0, + 0, 86, 56, 82, 96, 0, 0, 90, 84, 91, + 0, 90, 0, 83, 0, 85, 0, 103, 0, 103, + 54, 88, 55, 0, 103, 49, 92, 0, 103, 49, + 92, 54, 88, 55, 0, 103, 54, 88, 55, 49, + 92, 0, 8, 0, 116, 0, 95, 0, 95, 57, + 95, 0, 95, 95, 0, 88, 52, 95, 0, 88, + 52, 95, 57, 95, 0, 88, 52, 95, 95, 0, + 116, 0, 92, 0, 92, 57, 92, 0, 89, 52, + 92, 0, 89, 52, 92, 57, 92, 0, 87, 0, + 90, 58, 89, 59, 0, 8, 0, 91, 49, 92, + 0, 91, 58, 89, 59, 0, 3, 0, 4, 0, + 3, 0, 94, 0, 93, 0, 5, 0, 93, 0, + 94, 0, 5, 0, 6, 0, 7, 0, 0, 47, + 97, 100, 48, 0, 0, 58, 98, 100, 59, 0, + 0, 54, 99, 100, 55, 0, 93, 51, 92, 0, + 94, 51, 92, 0, 5, 51, 92, 0, 7, 51, + 92, 0, 101, 0, 102, 101, 0, 116, 0, 52, + 0, 96, 0, 102, 52, 96, 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, 116, 0, 104, 35, 0, + 104, 36, 0, 104, 37, 0, 104, 38, 0, 104, + 39, 0, 104, 40, 0, 104, 41, 0, 104, 42, + 0, 104, 43, 0, 0, 8, 53, 106, 108, 0, + 8, 0, 107, 0, 108, 52, 107, 0, 116, 0, + 8, 0, 0, 14, 109, 54, 86, 55, 47, 111, + 112, 48, 0, 116, 0, 112, 46, 0, 112, 113, + 0, 112, 115, 0, 0, 15, 114, 96, 53, 0, + 110, 0, 85, 46, 0, 83, 0, 0 }; #endif @@ -232,21 +233,21 @@ static const short yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const short yyrline[] = { - 0, 137, 139, 142, 144, 145, 146, 147, 150, 150, - 166, 171, 177, 190, 192, 198, 200, 206, 211, 211, - 218, 220, 226, 231, 237, 253, 255, 258, 265, 273, - 275, 276, 284, 286, 287, 288, 292, 298, 298, 309, - 311, 314, 316, 319, 325, 325, 349, 349, 360, 364, - 366, 369, 374, 382, 393, 407, 421, 442, 447, 454, - 461, 470, 476, 482, 492, 497, 508, 519, 530, 538, - 546, 558, 560, 566, 572, 586, 592, 597, 600, 605, - 609, 613, 617, 617, 625, 625, 633, 633, 641, 647, - 653, 661, 663, 666, 668, 671, 673, 676, 681, 685, - 689, 693, 697, 701, 705, 709, 713, 717, 721, 725, - 729, 733, 737, 741, 745, 749, 755, 757, 761, 765, - 769, 773, 777, 781, 785, 789, 795, 795, 806, 822, - 829, 842, 847, 850, 850, 864, 866, 867, 868, 878, - 878, 894, 896, 900, 906 + 0, 141, 143, 146, 148, 149, 150, 151, 154, 154, + 170, 175, 181, 194, 196, 202, 204, 210, 215, 215, + 222, 224, 230, 235, 241, 257, 259, 262, 269, 277, + 279, 280, 288, 290, 291, 292, 296, 302, 302, 313, + 315, 318, 320, 323, 329, 329, 353, 353, 364, 368, + 370, 373, 378, 386, 397, 411, 425, 446, 451, 458, + 465, 474, 480, 486, 496, 501, 508, 515, 521, 529, + 531, 537, 543, 557, 563, 574, 578, 582, 587, 591, + 594, 599, 603, 607, 611, 615, 615, 623, 623, 631, + 631, 639, 645, 651, 657, 665, 667, 670, 672, 675, + 677, 680, 685, 689, 693, 697, 701, 705, 709, 713, + 717, 721, 725, 729, 733, 737, 741, 745, 749, 753, + 759, 761, 765, 769, 773, 777, 781, 785, 789, 793, + 799, 799, 810, 826, 833, 846, 851, 854, 854, 868, + 870, 871, 872, 882, 882, 898, 900, 904, 910 }; #endif @@ -256,25 +257,27 @@ static const short yyrline[] = /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ static const char *const yytname[] = { - "$", "error", "$undefined.", "INTEGER", "REAL", "STRING", "HEX_STRING", - "IDENTIFIER", "KW_DCLASS", "KW_STRUCT", "KW_FROM", "KW_IMPORT", - "KW_TYPEDEF", "KW_SWITCH", "KW_CASE", "KW_INT8", "KW_INT16", "KW_INT32", - "KW_INT64", "KW_UINT8", "KW_UINT16", "KW_UINT32", "KW_UINT64", - "KW_FLOAT64", "KW_STRING", "KW_BLOB", "KW_BLOB32", "KW_INT8ARRAY", - "KW_INT16ARRAY", "KW_INT32ARRAY", "KW_UINT8ARRAY", "KW_UINT16ARRAY", - "KW_UINT32ARRAY", "KW_UINT32UINT8ARRAY", "KW_REQUIRED", "KW_BROADCAST", - "KW_P2P", "KW_RAM", "KW_DB", "KW_CLSEND", "KW_CLRECV", "KW_OWNSEND", - "KW_AIRECV", "START_DC", "START_PARAMETER_VALUE", "';'", "'{'", "'}'", - "'/'", "'.'", "'*'", "','", "':'", "'('", "')'", "'='", "'-'", "'['", - "']'", "grammar", "dc", "dclass", "@1", "kw_struct_or_kw_dclass", + "$", "error", "$undefined.", "UNSIGNED_INTEGER", "SIGNED_INTEGER", "REAL", + "STRING", "HEX_STRING", "IDENTIFIER", "KW_DCLASS", "KW_STRUCT", + "KW_FROM", "KW_IMPORT", "KW_TYPEDEF", "KW_SWITCH", "KW_CASE", "KW_INT8", + "KW_INT16", "KW_INT32", "KW_INT64", "KW_UINT8", "KW_UINT16", + "KW_UINT32", "KW_UINT64", "KW_FLOAT64", "KW_STRING", "KW_BLOB", + "KW_BLOB32", "KW_INT8ARRAY", "KW_INT16ARRAY", "KW_INT32ARRAY", + "KW_UINT8ARRAY", "KW_UINT16ARRAY", "KW_UINT32ARRAY", + "KW_UINT32UINT8ARRAY", "KW_REQUIRED", "KW_BROADCAST", "KW_P2P", + "KW_RAM", "KW_DB", "KW_CLSEND", "KW_CLRECV", "KW_OWNSEND", "KW_AIRECV", + "START_DC", "START_PARAMETER_VALUE", "';'", "'{'", "'}'", "'/'", "'.'", + "'*'", "','", "':'", "'('", "')'", "'='", "'-'", "'['", "']'", + "grammar", "dc", "dclass", "@1", "kw_struct_or_kw_dclass", "dclass_name", "slash_identifier", "import_identifier", "import", "@2", "import_symbol_list_or_star", "import_symbol_list", "typedef_decl", "dclass_derivation", "base_list", "dclass_fields", "dclass_field", "atomic_field", "@3", "parameter_list", "nonempty_parameter_list", "atomic_element", "@4", "named_parameter", "@5", "unnamed_parameter", "parameter", "type_name", "double_range", "uint_range", - "type_definition", "parameter_definition", "number", "parameter_value", - "@6", "@7", "@8", "array", "maybe_comma", "array_def", "type_token", + "type_definition", "parameter_definition", "small_unsigned_integer", + "signed_integer", "unsigned_integer", "number", "parameter_value", "@6", + "@7", "@8", "array", "maybe_comma", "array_def", "type_token", "atomic_flags", "molecular_field", "@9", "atomic_name", "molecular_atom_list", "optional_name", "switch", "@10", "switch_fields", "switch_case", "@11", "switch_field", "empty", 0 @@ -284,21 +287,21 @@ static const char *const yytname[] = /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const short yyr1[] = { - 0, 59, 59, 60, 60, 60, 60, 60, 62, 61, - 63, 63, 64, 65, 65, 66, 66, 67, 68, 67, - 69, 69, 70, 70, 71, 72, 72, 73, 73, 74, - 74, 74, 75, 75, 75, 75, 75, 77, 76, 78, - 78, 79, 79, 80, 81, 80, 83, 82, 84, 85, - 85, 86, 86, 86, 86, 86, 86, 87, 87, 87, - 87, 87, 87, 87, 88, 88, 88, 88, 88, 88, - 88, 89, 89, 90, 90, 90, 91, 91, 92, 92, - 92, 92, 93, 92, 94, 92, 95, 92, 92, 92, - 92, 96, 96, 97, 97, 98, 98, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 102, 101, 103, 104, - 104, 105, 105, 107, 106, 108, 108, 108, 108, 110, - 109, 111, 111, 111, 112 + 0, 60, 60, 61, 61, 61, 61, 61, 63, 62, + 64, 64, 65, 66, 66, 67, 67, 68, 69, 68, + 70, 70, 71, 71, 72, 73, 73, 74, 74, 75, + 75, 75, 76, 76, 76, 76, 76, 78, 77, 79, + 79, 80, 80, 81, 82, 81, 84, 83, 85, 86, + 86, 87, 87, 87, 87, 87, 87, 88, 88, 88, + 88, 88, 88, 88, 89, 89, 89, 89, 89, 90, + 90, 91, 91, 91, 92, 93, 94, 95, 95, 95, + 96, 96, 96, 96, 96, 97, 96, 98, 96, 99, + 96, 96, 96, 96, 96, 100, 100, 101, 101, 102, + 102, 103, 103, 103, 103, 103, 103, 103, 103, 103, + 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, + 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, + 106, 105, 107, 108, 108, 109, 109, 111, 110, 112, + 112, 112, 112, 114, 113, 115, 115, 115, 116 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -310,15 +313,15 @@ static const short yyr2[] = 2, 2, 1, 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, 2, 3, 5, - 4, 1, 4, 1, 3, 4, 1, 1, 1, 1, - 1, 1, 0, 4, 0, 4, 0, 4, 3, 3, - 3, 1, 2, 1, 1, 1, 3, 1, 1, 1, + 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, 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, 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, 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 }; /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE @@ -326,132 +329,140 @@ static const short yyr2[] = error. */ static const short yydefact[] = { - 0, 144, 0, 1, 3, 78, 79, 80, 81, 82, - 86, 84, 2, 11, 10, 0, 0, 0, 4, 5, - 0, 6, 7, 0, 0, 0, 144, 144, 144, 13, - 15, 0, 17, 56, 97, 98, 99, 100, 101, 102, + 0, 148, 0, 1, 3, 76, 75, 82, 83, 84, + 85, 89, 87, 80, 81, 2, 11, 10, 0, 0, + 0, 4, 5, 0, 6, 7, 0, 0, 148, 148, + 148, 0, 0, 13, 15, 0, 17, 56, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 49, 50, 24, 71, 48, 51, 8, - 88, 89, 90, 94, 95, 0, 91, 144, 93, 0, - 0, 0, 18, 0, 144, 0, 0, 144, 144, 83, - 94, 92, 87, 85, 14, 0, 16, 65, 0, 64, - 73, 47, 53, 76, 77, 0, 58, 57, 0, 0, - 25, 96, 21, 22, 19, 20, 67, 0, 0, 72, - 0, 144, 144, 0, 52, 0, 60, 12, 27, 26, - 144, 0, 66, 68, 74, 0, 0, 61, 0, 59, - 0, 0, 29, 23, 70, 0, 75, 54, 0, 63, - 55, 28, 56, 144, 30, 9, 31, 32, 36, 0, - 33, 34, 69, 62, 126, 37, 132, 0, 131, 35, - 0, 144, 0, 128, 129, 127, 0, 40, 41, 43, - 39, 0, 0, 144, 0, 44, 0, 130, 38, 116, - 42, 0, 133, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 45, 144, 0, 135, 139, 136, 134, 143, - 0, 141, 137, 138, 0, 142, 0, 140, 0, 0, - 0 + 113, 114, 115, 116, 117, 118, 119, 49, 50, 24, + 69, 48, 51, 8, 74, 93, 94, 98, 99, 0, + 95, 148, 97, 0, 0, 91, 92, 0, 18, 0, + 148, 0, 0, 148, 148, 86, 98, 96, 90, 88, + 14, 0, 16, 0, 65, 64, 71, 47, 53, 79, + 0, 78, 77, 58, 57, 0, 0, 25, 100, 21, + 22, 19, 20, 0, 70, 0, 0, 148, 148, 0, + 52, 0, 60, 12, 27, 26, 148, 0, 67, 66, + 72, 0, 0, 61, 0, 59, 0, 0, 29, 23, + 0, 73, 54, 0, 63, 55, 28, 56, 148, 30, + 9, 31, 32, 36, 0, 33, 34, 68, 62, 130, + 37, 136, 0, 135, 35, 0, 148, 0, 132, 133, + 131, 0, 40, 41, 43, 39, 0, 0, 148, 0, + 44, 0, 134, 38, 120, 42, 0, 137, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 45, 148, 0, + 139, 143, 140, 138, 147, 0, 145, 141, 142, 0, + 146, 0, 144, 0, 0, 0 }; static const short yydefgoto[] = { - 208, 3, 19, 78, 20, 118, 30, 31, 21, 85, - 104, 105, 22, 99, 119, 131, 146, 147, 161, 166, - 167, 168, 181, 53, 75, 54, 169, 56, 95, 88, - 57, 91, 96, 64, 26, 28, 27, 65, 66, 67, - 58, 178, 150, 160, 164, 165, 157, 151, 193, 194, - 202, 204, 203, 68 + 213, 3, 22, 84, 23, 124, 34, 35, 24, 91, + 111, 112, 25, 106, 125, 137, 151, 152, 166, 171, + 172, 173, 186, 57, 81, 58, 174, 60, 100, 93, + 61, 97, 94, 13, 14, 103, 68, 28, 30, 29, + 69, 70, 71, 62, 183, 155, 165, 169, 170, 162, + 156, 198, 199, 207, 209, 208, 72 }; static const short yypact[] = { - 38,-32768, 9, 28,-32768, -23, -15,-32768, -8,-32768, - -32768,-32768,-32768,-32768,-32768, 18, 18, 189,-32768,-32768, - 39,-32768,-32768, 47, 58, 72, 3, 3, 3,-32768, - 59, -6, 57,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + 36,-32768, 19, 142,-32768,-32768,-32768, -21,-32768, -1, + -32768,-32768,-32768, 41, 46,-32768,-32768,-32768, 13, 13, + 227,-32768,-32768, 32,-32768,-32768, 29, 29, 11, 11, + 11, 29, 29,-32768, 25, 1, 20,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768,-32768,-32768,-32768, 17, -19,-32768, - -32768,-32768,-32768,-32768,-32768, 61,-32768, 60,-32768, 55, - 52, 105,-32768, 18, 116, 109, 117, 49, 69,-32768, - 9,-32768,-32768,-32768,-32768, 14, 59, 15, -28,-32768, - -32768, -26, 104,-32768,-32768, -10, 7,-32768, 118, 114, - -32768,-32768,-32768, 59,-32768, 108,-32768, 120, 158,-32768, - 159, 116, 49, 49, 119, 49,-32768,-32768,-32768, 115, - -32768, 18,-32768, 16,-32768, -25, -3, 13, 161,-32768, - 118, 111,-32768, 59,-32768, 162,-32768,-32768, 49,-32768, - -32768,-32768, 5, 163,-32768,-32768,-32768,-32768,-32768, 123, - -32768,-32768,-32768,-32768,-32768,-32768,-32768, 121,-32768,-32768, - 164, 189, 189,-32768,-32768, 122, 124, 125,-32768, 126, - -32768, 128, 164,-32768, 189,-32768, 131,-32768, 113,-32768, - -32768, 9,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768, 70,-32768,-32768,-32768,-32768,-32768, - 127,-32768,-32768,-32768, 9,-32768, 132,-32768, 169, 180, - -32768 + -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -32768, 4, -10,-32768,-32768,-32768,-32768,-32768,-32768, 52, + -32768, 59,-32768, 43, 55,-32768,-32768, 107,-32768, 13, + 29, 108, 29, 50, 64,-32768, 19,-32768,-32768,-32768, + -32768, 21, 25, -11, 65,-32768,-32768, -30, 70,-32768, + 23,-32768,-32768, 30,-32768, 117, 79,-32768,-32768,-32768, + 25,-32768, 97, 29,-32768, 29, 29, 29, 50, 50, + 109, 50,-32768,-32768,-32768, 104,-32768, 13, 100,-32768, + -32768, 0, 24, 33, 29,-32768, 117, 113,-32768, 25, + 29,-32768,-32768, 50,-32768,-32768,-32768, 35, 152,-32768, + -32768,-32768,-32768,-32768, 116,-32768,-32768,-32768,-32768,-32768, + -32768,-32768, 110,-32768,-32768, 155, 227, 227,-32768,-32768, + 114, 112, 118,-32768, 115,-32768, 119, 155,-32768, 227, + -32768, 122,-32768, 67,-32768,-32768, 19,-32768,-32768,-32768, + -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 194, + -32768,-32768,-32768,-32768,-32768, 126,-32768,-32768,-32768, 19, + -32768, 120,-32768, 165, 175,-32768 }; static const short yypgoto[] = { - -32768,-32768,-32768,-32768,-32768, 53, -53, 170,-32768,-32768, + -32768,-32768,-32768,-32768,-32768, 40, -71, 158,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768, 11,-32768, -129,-32768, -127, -16,-32768, 75, 78, - -32768,-32768, -68, -2,-32768,-32768,-32768, 77, 130,-32768, - -32768,-32768,-32768,-32768, 19,-32768,-32768, -4,-32768,-32768, - -32768,-32768,-32768, 2 + -32768, 3,-32768, -135,-32768, -131, -19,-32768, 60, 62, + -32768,-32768, -22, -76, -72, -20, -2,-32768,-32768,-32768, + 66, 121,-32768,-32768,-32768,-32768,-32768, 6,-32768,-32768, + -18,-32768,-32768,-32768,-32768,-32768, 2 }; -#define YYLAST 222 +#define YYLAST 261 static const short yytable[] = { - 12, 55, 148, 4, 149, 72, 5, 6, 7, 8, - 93, 94, 5, 6, 7, 8, 93, 94, 106, 134, - 86, 29, 110, 108, -46, 29, 108, 23, 116, 76, - 109, 111, 103, 136, 77, 24, 13, 14, 15, 16, - 17, 113, 25, 73, 114, 127, 59, 129, 113, 9, - 60, 137, 93, 94, 63, 9, 10, 154, 155, 139, - 11, 61, 10, 115, 102, 199, 11, 200, 133, 138, - 153, 107, 135, 18, 74, 62, 89, 33, 101, 97, - 100, 1, 2, 143, 196, 34, 35, 36, 37, 38, + 15, 59, 153, 4, 65, 66, 154, 101, 92, 75, + 76, 102, -46, 78, 5, 6, 7, 8, 9, 116, + 110, 33, 5, 6, 7, 8, 9, 101, 117, 33, + 26, 102, 64, 5, 6, 99, 5, 6, 99, 82, + 63, 113, 101, 101, 83, 101, 102, 102, 114, 102, + 27, 79, 113, 5, 6, 99, 139, 101, 10, 141, + 98, 102, 80, 67, 204, 11, 10, 101, 205, 12, + 79, 102, 109, 11, 77, 119, 119, 12, 120, 142, + 1, 2, 95, 122, 108, 104, 107, 121, 159, 160, + 143, 128, 31, 129, 130, 73, 74, 32, 88, 133, + 85, 135, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 86, 145, 144, 89, 90, 96, 105, 157, 95, + 104, 147, 115, 158, 118, 123, 126, 148, 138, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 69, 70, 73, 71, 79, 82, - 83, 80, 84, 89, 97, 197, 90, 198, 142, 87, - 92, 98, 132, 122, 143, 117, 34, 35, 36, 37, + 49, 50, 51, 52, 53, 54, 55, 56, 176, 127, + 163, 16, 17, 18, 19, 20, 136, 140, 134, 149, + 161, 150, 164, 168, 167, 214, 177, 178, 175, 187, + 179, 180, 210, 212, 181, 215, 146, 36, 132, 131, + 184, 206, 185, 182, 197, 0, 0, 0, 21, 0, + 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, + 200, 0, 37, 0, 0, 0, 0, 211, 148, 201, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 158, 171, 183, 184, 185, - 186, 187, 188, 189, 190, 191, 144, 112, 145, 121, - 120, 123, 124, 170, 140, 152, 130, 128, 159, 209, - 156, 163, 205, 172, 162, 179, 174, 182, 173, 192, - 210, 175, 176, 141, 207, 180, 32, 126, 0, 125, - 201, 177, 0, 0, 0, 195, 33, 81, 0, 0, - 0, 0, 206, 0, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52 + 48, 49, 50, 51, 52, 53, 54, 55, 56, 0, + 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, + 202, 0, 203, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56 }; static const short yycheck[] = { - 2, 17, 131, 1, 131, 11, 3, 4, 5, 6, - 3, 4, 3, 4, 5, 6, 3, 4, 3, 3, - 73, 7, 48, 51, 7, 7, 51, 50, 96, 48, - 58, 57, 85, 58, 53, 50, 8, 9, 10, 11, - 12, 51, 50, 49, 54, 113, 7, 115, 51, 46, - 3, 54, 3, 4, 51, 46, 53, 52, 53, 127, - 57, 3, 53, 56, 50, 194, 57, 194, 121, 56, - 138, 56, 56, 45, 57, 3, 74, 7, 80, 77, - 78, 43, 44, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 27, 28, 49, 48, 47, 54, - 58, 51, 7, 111, 112, 45, 7, 47, 7, 3, - 3, 52, 120, 3, 13, 7, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 143, 162, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 45, 53, 47, 51, - 46, 3, 3, 161, 3, 3, 51, 48, 45, 0, - 7, 7, 45, 51, 53, 173, 51, 46, 54, 181, - 0, 55, 54, 130, 52, 174, 16, 112, -1, 111, - 194, 172, -1, -1, -1, 193, 7, 67, -1, -1, - -1, -1, 204, -1, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33 + 2, 20, 137, 1, 26, 27, 137, 83, 79, 31, + 32, 83, 8, 12, 3, 4, 5, 6, 7, 49, + 91, 8, 3, 4, 5, 6, 7, 103, 58, 8, + 51, 103, 3, 3, 4, 5, 3, 4, 5, 49, + 8, 52, 118, 119, 54, 121, 118, 119, 59, 121, + 51, 50, 52, 3, 4, 5, 127, 133, 47, 59, + 82, 133, 58, 52, 199, 54, 47, 143, 199, 58, + 50, 143, 51, 54, 49, 52, 52, 58, 55, 55, + 44, 45, 80, 103, 86, 83, 84, 57, 53, 54, + 57, 113, 51, 115, 116, 29, 30, 51, 55, 119, + 48, 121, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 52, 134, 133, 59, 8, 8, 53, 140, 117, + 118, 8, 57, 143, 54, 8, 47, 14, 126, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 167, 52, + 148, 9, 10, 11, 12, 13, 52, 57, 49, 46, + 8, 48, 46, 8, 54, 0, 52, 55, 166, 47, + 52, 56, 46, 53, 55, 0, 136, 19, 118, 117, + 178, 199, 179, 177, 186, -1, -1, -1, 46, -1, + -1, -1, 71, -1, -1, -1, -1, -1, -1, -1, + 198, -1, 8, -1, -1, -1, -1, 209, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, -1, + -1, -1, -1, -1, -1, 8, -1, -1, -1, -1, + 46, -1, 48, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/share/bison/bison.simple" @@ -1161,7 +1172,7 @@ yyreduce: switch (yyn) { case 8: -#line 152 "dcParser.yxx" +#line 156 "dcParser.yxx" { current_class = new DCClass(yyvsp[0].str, yyvsp[-1].u.flag, false); if (!dc_file->add_class(current_class)) { @@ -1175,19 +1186,19 @@ case 8: } break; case 10: -#line 168 "dcParser.yxx" +#line 172 "dcParser.yxx" { yyval.u.flag = true; } break; case 11: -#line 172 "dcParser.yxx" +#line 176 "dcParser.yxx" { yyval.u.flag = false; } break; case 12: -#line 179 "dcParser.yxx" +#line 183 "dcParser.yxx" { DCClass *dclass = dc_file->get_class_by_name(yyvsp[0].str); if (dclass == (DCClass *)NULL) { @@ -1199,49 +1210,49 @@ case 12: } break; case 14: -#line 193 "dcParser.yxx" +#line 197 "dcParser.yxx" { yyval.str = yyvsp[-2].str + string("/") + yyvsp[0].str; } break; case 16: -#line 201 "dcParser.yxx" +#line 205 "dcParser.yxx" { yyval.str = yyvsp[-2].str + string(".") + yyvsp[0].str; } break; case 17: -#line 208 "dcParser.yxx" +#line 212 "dcParser.yxx" { dc_file->add_import_module(yyvsp[0].str); } break; case 18: -#line 212 "dcParser.yxx" +#line 216 "dcParser.yxx" { dc_file->add_import_module(yyvsp[-1].str); } break; case 21: -#line 221 "dcParser.yxx" +#line 225 "dcParser.yxx" { dc_file->add_import_symbol("*"); } break; case 22: -#line 228 "dcParser.yxx" -{ - dc_file->add_import_symbol(yyvsp[0].str); -} - break; -case 23: #line 232 "dcParser.yxx" +{ + dc_file->add_import_symbol(yyvsp[0].str); +} + break; +case 23: +#line 236 "dcParser.yxx" { dc_file->add_import_symbol(yyvsp[0].str); } break; case 24: -#line 239 "dcParser.yxx" +#line 243 "dcParser.yxx" { DCTypedef *dtypedef = new DCTypedef(yyvsp[0].u.parameter); @@ -1256,7 +1267,7 @@ case 24: } break; case 27: -#line 260 "dcParser.yxx" +#line 264 "dcParser.yxx" { if (yyvsp[0].u.dclass != (DCClass *)NULL) { current_class->add_parent(yyvsp[0].u.dclass); @@ -1264,7 +1275,7 @@ case 27: } break; case 28: -#line 266 "dcParser.yxx" +#line 270 "dcParser.yxx" { if (yyvsp[0].u.dclass != (DCClass *)NULL) { current_class->add_parent(yyvsp[0].u.dclass); @@ -1272,7 +1283,7 @@ case 28: } break; case 31: -#line 277 "dcParser.yxx" +#line 281 "dcParser.yxx" { if (!current_class->add_field(yyvsp[0].u.field)) { yyerror("Duplicate field name: " + yyvsp[0].u.field->get_name()); @@ -1280,45 +1291,45 @@ case 31: } break; case 35: -#line 289 "dcParser.yxx" +#line 293 "dcParser.yxx" { yyval.u.field = yyvsp[-1].u.parameter; } break; case 36: -#line 293 "dcParser.yxx" +#line 297 "dcParser.yxx" { yyval.u.field = yyvsp[0].u.parameter; } break; case 37: -#line 300 "dcParser.yxx" +#line 304 "dcParser.yxx" { current_atomic = new DCAtomicField(yyvsp[-1].str); } break; case 38: -#line 304 "dcParser.yxx" +#line 308 "dcParser.yxx" { yyval.u.field = current_atomic; } break; case 43: -#line 321 "dcParser.yxx" +#line 325 "dcParser.yxx" { atomic_element = DCAtomicField::ElementType(yyvsp[0].u.parameter); current_atomic->add_element(atomic_element); } break; case 44: -#line 326 "dcParser.yxx" +#line 330 "dcParser.yxx" { current_packer = &default_packer; current_packer->begin_pack(yyvsp[-1].u.parameter); } break; case 45: -#line 331 "dcParser.yxx" +#line 335 "dcParser.yxx" { bool is_valid = yyvsp[-3].u.parameter->is_valid(); atomic_element = DCAtomicField::ElementType(yyvsp[-3].u.parameter); @@ -1337,25 +1348,25 @@ case 45: } break; case 46: -#line 351 "dcParser.yxx" +#line 355 "dcParser.yxx" { current_parameter = yyvsp[0].u.parameter; } break; case 47: -#line 355 "dcParser.yxx" +#line 359 "dcParser.yxx" { yyval.u.parameter = yyvsp[0].u.parameter; } break; case 51: -#line 371 "dcParser.yxx" +#line 375 "dcParser.yxx" { yyval.u.parameter = new DCSimpleParameter(yyvsp[0].u.subatomic); } break; case 52: -#line 375 "dcParser.yxx" +#line 379 "dcParser.yxx" { DCSimpleParameter *simple_param = new DCSimpleParameter(yyvsp[-3].u.subatomic); if (!simple_param->set_range(double_range)) { @@ -1365,26 +1376,26 @@ case 52: } break; case 53: -#line 383 "dcParser.yxx" +#line 387 "dcParser.yxx" { DCSimpleParameter *simple_param = new DCSimpleParameter(yyvsp[-2].u.subatomic); - if (yyvsp[0].u.integer == 0) { + if (yyvsp[0].u.s_uint == 0) { yyerror("Invalid divisor."); - } else if (!simple_param->set_divisor((int)yyvsp[0].u.integer)) { + } else if (!simple_param->set_divisor(yyvsp[0].u.s_uint)) { yyerror("A divisor is only valid on a numeric type."); } yyval.u.parameter = simple_param; } break; case 54: -#line 394 "dcParser.yxx" +#line 398 "dcParser.yxx" { DCSimpleParameter *simple_param = new DCSimpleParameter(yyvsp[-5].u.subatomic); - if (yyvsp[-3].u.integer == 0) { + if (yyvsp[-3].u.s_uint == 0) { yyerror("Invalid divisor."); - } else if (!simple_param->set_divisor((int)yyvsp[-3].u.integer)) { + } else if (!simple_param->set_divisor(yyvsp[-3].u.s_uint)) { yyerror("A divisor is only valid on a numeric type."); } if (!simple_param->set_range(double_range)) { @@ -1394,13 +1405,13 @@ case 54: } break; case 55: -#line 408 "dcParser.yxx" +#line 412 "dcParser.yxx" { DCSimpleParameter *simple_param = new DCSimpleParameter(yyvsp[-5].u.subatomic); - if (yyvsp[0].u.integer == 0) { + if (yyvsp[0].u.s_uint == 0) { yyerror("Invalid divisor."); - } else if (!simple_param->set_divisor((int)yyvsp[0].u.integer)) { + } else if (!simple_param->set_divisor(yyvsp[0].u.s_uint)) { yyerror("A divisor is only valid on a numeric type."); } if (!simple_param->set_range(double_range)) { @@ -1410,7 +1421,7 @@ case 55: } break; case 56: -#line 422 "dcParser.yxx" +#line 426 "dcParser.yxx" { DCTypedef *dtypedef = dc_file->get_typedef_by_name(yyvsp[0].str); if (dtypedef == (DCTypedef *)NULL) { @@ -1431,13 +1442,13 @@ case 56: } break; case 57: -#line 444 "dcParser.yxx" +#line 448 "dcParser.yxx" { double_range.clear(); } break; case 58: -#line 448 "dcParser.yxx" +#line 452 "dcParser.yxx" { double_range.clear(); if (!double_range.add_range(yyvsp[0].u.real, yyvsp[0].u.real)) { @@ -1446,7 +1457,7 @@ case 58: } break; case 59: -#line 455 "dcParser.yxx" +#line 459 "dcParser.yxx" { double_range.clear(); if (!double_range.add_range(yyvsp[-2].u.real, yyvsp[0].u.real)) { @@ -1455,7 +1466,7 @@ case 59: } break; case 60: -#line 462 "dcParser.yxx" +#line 466 "dcParser.yxx" { double_range.clear(); if (yyvsp[0].u.real >= 0) { @@ -1466,7 +1477,7 @@ case 60: } break; case 61: -#line 471 "dcParser.yxx" +#line 475 "dcParser.yxx" { if (!double_range.add_range(yyvsp[0].u.real, yyvsp[0].u.real)) { yyerror("Overlapping range"); @@ -1474,7 +1485,7 @@ case 61: } break; case 62: -#line 477 "dcParser.yxx" +#line 481 "dcParser.yxx" { if (!double_range.add_range(yyvsp[-2].u.real, yyvsp[0].u.real)) { yyerror("Overlapping range"); @@ -1482,7 +1493,7 @@ case 62: } break; case 63: -#line 483 "dcParser.yxx" +#line 487 "dcParser.yxx" { if (yyvsp[0].u.real >= 0) { yyerror("Syntax error"); @@ -1492,389 +1503,382 @@ case 63: } break; case 64: -#line 494 "dcParser.yxx" +#line 498 "dcParser.yxx" { uint_range.clear(); } break; case 65: -#line 498 "dcParser.yxx" +#line 502 "dcParser.yxx" { - if (yyvsp[0].u.integer < 0) { - yyerror("Nonnegative values only"); - } else { - uint_range.clear(); - if (!uint_range.add_range((unsigned int)yyvsp[0].u.integer, (unsigned int)yyvsp[0].u.integer)) { - yyerror("Overlapping range"); - } + 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 509 "dcParser.yxx" { - if (yyvsp[-2].u.integer < 0 || yyvsp[0].u.integer < 0) { - yyerror("Nonnegative values only"); - } else { - uint_range.clear(); - if (!uint_range.add_range((unsigned int)yyvsp[-2].u.integer, (unsigned int)yyvsp[0].u.integer)) { - yyerror("Overlapping range"); - } + 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 520 "dcParser.yxx" +#line 516 "dcParser.yxx" { - uint_range.clear(); - if (yyvsp[0].u.integer >= 0) { - yyerror("Syntax error"); - } else if (yyvsp[-1].u.integer < 0) { - yyerror("Nonnegative values only"); - } else if (!uint_range.add_range((unsigned int)yyvsp[-1].u.integer, (unsigned int)-yyvsp[0].u.integer)) { + if (!uint_range.add_range(yyvsp[0].u.s_uint, yyvsp[0].u.s_uint)) { yyerror("Overlapping range"); } } break; case 68: -#line 531 "dcParser.yxx" +#line 522 "dcParser.yxx" { - if (yyvsp[0].u.integer < 0) { - yyerror("Nonnegative values only"); - } else if (!uint_range.add_range((unsigned int)yyvsp[0].u.integer, (unsigned int)yyvsp[0].u.integer)) { - yyerror("Overlapping range"); - } -} - break; -case 69: -#line 539 "dcParser.yxx" -{ - if (yyvsp[-2].u.integer < 0 || yyvsp[0].u.integer < 0) { - yyerror("Nonnegative values only"); - } else if (!uint_range.add_range((unsigned int)yyvsp[-2].u.integer, (unsigned int)yyvsp[0].u.integer)) { + if (!uint_range.add_range(yyvsp[-2].u.s_uint, yyvsp[0].u.s_uint)) { yyerror("Overlapping range"); } } break; case 70: -#line 547 "dcParser.yxx" -{ - if (yyvsp[0].u.integer >= 0) { - yyerror("Syntax error"); - } else if (yyvsp[-1].u.integer < 0) { - yyerror("Nonnegative values only"); - } else if (!uint_range.add_range((unsigned int)yyvsp[-1].u.integer, (unsigned int)-yyvsp[0].u.integer)) { - yyerror("Overlapping range"); - } -} - break; -case 72: -#line 561 "dcParser.yxx" +#line 532 "dcParser.yxx" { yyval.u.parameter = new DCArrayParameter(yyvsp[-3].u.parameter, uint_range); } break; -case 73: -#line 568 "dcParser.yxx" +case 71: +#line 539 "dcParser.yxx" { current_parameter->set_name(yyvsp[0].str); yyval.u.parameter = current_parameter; } break; -case 74: -#line 573 "dcParser.yxx" +case 72: +#line 544 "dcParser.yxx" { - if (yyvsp[0].u.integer == 0) { + if (yyvsp[0].u.s_uint == 0) { yyerror("Invalid divisor."); } else if (yyvsp[-2].u.parameter->as_simple_parameter() == NULL || yyvsp[-2].u.parameter->get_typedef() != (DCTypedef *)NULL) { yyerror("A divisor is only allowed on a primitive type."); } else { - if (!yyvsp[-2].u.parameter->as_simple_parameter()->set_divisor((int)yyvsp[0].u.integer)) { + if (!yyvsp[-2].u.parameter->as_simple_parameter()->set_divisor(yyvsp[0].u.s_uint)) { yyerror("A divisor is only valid on a numeric type."); } } } break; -case 75: -#line 587 "dcParser.yxx" +case 73: +#line 558 "dcParser.yxx" { yyval.u.parameter = new DCArrayParameter(yyvsp[-3].u.parameter, uint_range); } break; -case 76: -#line 594 "dcParser.yxx" +case 74: +#line 565 "dcParser.yxx" { - yyval.u.real = (double)yyvsp[0].u.integer; + yyval.u.s_uint = (unsigned int)yyvsp[0].u.uint64; + if (yyval.u.s_uint != yyvsp[0].u.uint64) { + yyerror("Number out of range."); + yyval.u.s_uint = 1; + } +} + break; +case 77: +#line 584 "dcParser.yxx" +{ + yyval.u.real = (double)yyvsp[0].u.uint64; } break; case 78: -#line 602 "dcParser.yxx" +#line 588 "dcParser.yxx" { - current_packer->pack_int64(yyvsp[0].u.integer); + yyval.u.real = (double)yyvsp[0].u.int64; } break; -case 79: -#line 606 "dcParser.yxx" +case 80: +#line 596 "dcParser.yxx" +{ + current_packer->pack_int64(yyvsp[0].u.int64); +} + break; +case 81: +#line 600 "dcParser.yxx" +{ + current_packer->pack_uint64(yyvsp[0].u.uint64); +} + break; +case 82: +#line 604 "dcParser.yxx" { current_packer->pack_double(yyvsp[0].u.real); } break; -case 80: -#line 610 "dcParser.yxx" +case 83: +#line 608 "dcParser.yxx" { current_packer->pack_string(yyvsp[0].str); } break; -case 81: -#line 614 "dcParser.yxx" +case 84: +#line 612 "dcParser.yxx" { current_packer->pack_literal_value(yyvsp[0].str); } break; -case 82: -#line 618 "dcParser.yxx" -{ - current_packer->push(); -} - break; -case 83: -#line 622 "dcParser.yxx" -{ - current_packer->pop(); -} - break; -case 84: -#line 626 "dcParser.yxx" -{ - current_packer->push(); -} - break; case 85: -#line 630 "dcParser.yxx" +#line 616 "dcParser.yxx" { - current_packer->pop(); + current_packer->push(); } break; case 86: -#line 634 "dcParser.yxx" -{ - current_packer->push(); -} - break; -case 87: -#line 638 "dcParser.yxx" +#line 620 "dcParser.yxx" { current_packer->pop(); } break; -case 88: -#line 642 "dcParser.yxx" +case 87: +#line 624 "dcParser.yxx" { - for (int i = 0; i < yyvsp[0].u.integer; i++) { - current_packer->pack_int64(yyvsp[-2].u.integer); - } + current_packer->push(); +} + break; +case 88: +#line 628 "dcParser.yxx" +{ + current_packer->pop(); } break; case 89: -#line 648 "dcParser.yxx" +#line 632 "dcParser.yxx" { - for (int i = 0; i < yyvsp[0].u.integer; i++) { + current_packer->push(); +} + break; +case 90: +#line 636 "dcParser.yxx" +{ + current_packer->pop(); +} + break; +case 91: +#line 640 "dcParser.yxx" +{ + for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) { + current_packer->pack_int64(yyvsp[-2].u.int64); + } +} + break; +case 92: +#line 646 "dcParser.yxx" +{ + for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) { + current_packer->pack_uint64(yyvsp[-2].u.uint64); + } +} + break; +case 93: +#line 652 "dcParser.yxx" +{ + for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) { current_packer->pack_double(yyvsp[-2].u.real); } } break; -case 90: -#line 654 "dcParser.yxx" +case 94: +#line 658 "dcParser.yxx" { - for (int i = 0; i < yyvsp[0].u.integer; i++) { + for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) { current_packer->pack_literal_value(yyvsp[-2].str); } } break; -case 97: -#line 678 "dcParser.yxx" +case 101: +#line 682 "dcParser.yxx" { yyval.u.subatomic = ST_int8; } break; -case 98: -#line 682 "dcParser.yxx" +case 102: +#line 686 "dcParser.yxx" { yyval.u.subatomic = ST_int16; } break; -case 99: -#line 686 "dcParser.yxx" +case 103: +#line 690 "dcParser.yxx" { yyval.u.subatomic = ST_int32; } break; -case 100: -#line 690 "dcParser.yxx" +case 104: +#line 694 "dcParser.yxx" { yyval.u.subatomic = ST_int64; } break; -case 101: -#line 694 "dcParser.yxx" +case 105: +#line 698 "dcParser.yxx" { yyval.u.subatomic = ST_uint8; } break; -case 102: -#line 698 "dcParser.yxx" +case 106: +#line 702 "dcParser.yxx" { yyval.u.subatomic = ST_uint16; } break; -case 103: -#line 702 "dcParser.yxx" +case 107: +#line 706 "dcParser.yxx" { yyval.u.subatomic = ST_uint32; } break; -case 104: -#line 706 "dcParser.yxx" +case 108: +#line 710 "dcParser.yxx" { yyval.u.subatomic = ST_uint64; } break; -case 105: -#line 710 "dcParser.yxx" +case 109: +#line 714 "dcParser.yxx" { yyval.u.subatomic = ST_float64; } break; -case 106: -#line 714 "dcParser.yxx" +case 110: +#line 718 "dcParser.yxx" { yyval.u.subatomic = ST_string; } break; -case 107: -#line 718 "dcParser.yxx" +case 111: +#line 722 "dcParser.yxx" { yyval.u.subatomic = ST_blob; } break; -case 108: -#line 722 "dcParser.yxx" +case 112: +#line 726 "dcParser.yxx" { yyval.u.subatomic = ST_blob32; } break; -case 109: -#line 726 "dcParser.yxx" +case 113: +#line 730 "dcParser.yxx" { yyval.u.subatomic = ST_int8array; } break; -case 110: -#line 730 "dcParser.yxx" +case 114: +#line 734 "dcParser.yxx" { yyval.u.subatomic = ST_int16array; } break; -case 111: -#line 734 "dcParser.yxx" +case 115: +#line 738 "dcParser.yxx" { yyval.u.subatomic = ST_int32array; } break; -case 112: -#line 738 "dcParser.yxx" +case 116: +#line 742 "dcParser.yxx" { yyval.u.subatomic = ST_uint8array; } break; -case 113: -#line 742 "dcParser.yxx" +case 117: +#line 746 "dcParser.yxx" { yyval.u.subatomic = ST_uint16array; } break; -case 114: -#line 746 "dcParser.yxx" +case 118: +#line 750 "dcParser.yxx" { yyval.u.subatomic = ST_uint32array; } break; -case 115: -#line 750 "dcParser.yxx" +case 119: +#line 754 "dcParser.yxx" { yyval.u.subatomic = ST_uint32uint8array; } break; -case 117: -#line 758 "dcParser.yxx" +case 121: +#line 762 "dcParser.yxx" { current_atomic->add_flag(DCAtomicField::F_required); } break; -case 118: -#line 762 "dcParser.yxx" +case 122: +#line 766 "dcParser.yxx" { current_atomic->add_flag(DCAtomicField::F_broadcast); } break; -case 119: -#line 766 "dcParser.yxx" +case 123: +#line 770 "dcParser.yxx" { current_atomic->add_flag(DCAtomicField::F_p2p); } break; -case 120: -#line 770 "dcParser.yxx" +case 124: +#line 774 "dcParser.yxx" { current_atomic->add_flag(DCAtomicField::F_ram); } break; -case 121: -#line 774 "dcParser.yxx" +case 125: +#line 778 "dcParser.yxx" { current_atomic->add_flag(DCAtomicField::F_db); } break; -case 122: -#line 778 "dcParser.yxx" +case 126: +#line 782 "dcParser.yxx" { current_atomic->add_flag(DCAtomicField::F_clsend); } break; -case 123: -#line 782 "dcParser.yxx" +case 127: +#line 786 "dcParser.yxx" { current_atomic->add_flag(DCAtomicField::F_clrecv); } break; -case 124: -#line 786 "dcParser.yxx" +case 128: +#line 790 "dcParser.yxx" { current_atomic->add_flag(DCAtomicField::F_ownsend); } break; -case 125: -#line 790 "dcParser.yxx" +case 129: +#line 794 "dcParser.yxx" { current_atomic->add_flag(DCAtomicField::F_airecv); } break; -case 126: -#line 797 "dcParser.yxx" +case 130: +#line 801 "dcParser.yxx" { current_molecular = new DCMolecularField(yyvsp[-1].str); } break; -case 127: -#line 801 "dcParser.yxx" +case 131: +#line 805 "dcParser.yxx" { yyval.u.field = current_molecular; } break; -case 128: -#line 808 "dcParser.yxx" +case 132: +#line 812 "dcParser.yxx" { DCField *field = current_class->get_field_by_name(yyvsp[0].str); yyval.u.atomic = (DCAtomicField *)NULL; @@ -1888,16 +1892,16 @@ case 128: } } break; -case 129: -#line 824 "dcParser.yxx" +case 133: +#line 828 "dcParser.yxx" { if (yyvsp[0].u.atomic != (DCAtomicField *)NULL) { current_molecular->add_atomic(yyvsp[0].u.atomic); } } break; -case 130: -#line 830 "dcParser.yxx" +case 134: +#line 834 "dcParser.yxx" { if (yyvsp[0].u.atomic != (DCAtomicField *)NULL) { current_molecular->add_atomic(yyvsp[0].u.atomic); @@ -1909,28 +1913,28 @@ case 130: } } break; -case 131: -#line 844 "dcParser.yxx" +case 135: +#line 848 "dcParser.yxx" { yyval.str = ""; } break; -case 133: -#line 852 "dcParser.yxx" +case 137: +#line 856 "dcParser.yxx" { yyval.u.field = current_switch; current_switch = new DCSwitch(yyvsp[-4].str, yyvsp[-2].u.parameter); } break; -case 134: -#line 857 "dcParser.yxx" +case 138: +#line 861 "dcParser.yxx" { yyval.u.field = current_switch; current_switch = (DCSwitch *)yyvsp[-2].u.parameter; } break; -case 138: -#line 869 "dcParser.yxx" +case 142: +#line 873 "dcParser.yxx" { if (current_switch->get_num_cases() == 0) { yyerror("case declaration required before first element"); @@ -1939,15 +1943,15 @@ case 138: } } break; -case 139: -#line 880 "dcParser.yxx" +case 143: +#line 884 "dcParser.yxx" { current_packer = &default_packer; current_packer->begin_pack(current_switch->get_switch_parameter()); } break; -case 140: -#line 885 "dcParser.yxx" +case 144: +#line 889 "dcParser.yxx" { if (!current_packer->end_pack()) { yyerror("Invalid value for switch parameter"); @@ -1956,14 +1960,14 @@ case 140: } } break; -case 142: -#line 897 "dcParser.yxx" +case 146: +#line 901 "dcParser.yxx" { yyval.u.field = yyvsp[-1].u.parameter; } break; -case 143: -#line 901 "dcParser.yxx" +case 147: +#line 905 "dcParser.yxx" { yyval.u.field = yyvsp[0].u.parameter; } @@ -2201,4 +2205,4 @@ yyreturn: #endif return yyresult; } -#line 909 "dcParser.yxx" +#line 913 "dcParser.yxx" diff --git a/direct/src/dcparser/dcParser.h.prebuilt b/direct/src/dcparser/dcParser.h.prebuilt index 08fde320bd..518511fecb 100644 --- a/direct/src/dcparser/dcParser.h.prebuilt +++ b/direct/src/dcparser/dcParser.h.prebuilt @@ -1,48 +1,49 @@ #ifndef BISON_Y_TAB_H # define BISON_Y_TAB_H -# define INTEGER 257 -# define REAL 258 -# define STRING 259 -# define HEX_STRING 260 -# define IDENTIFIER 261 -# define KW_DCLASS 262 -# define KW_STRUCT 263 -# define KW_FROM 264 -# define KW_IMPORT 265 -# define KW_TYPEDEF 266 -# define KW_SWITCH 267 -# define KW_CASE 268 -# define KW_INT8 269 -# define KW_INT16 270 -# define KW_INT32 271 -# define KW_INT64 272 -# define KW_UINT8 273 -# define KW_UINT16 274 -# define KW_UINT32 275 -# define KW_UINT64 276 -# define KW_FLOAT64 277 -# define KW_STRING 278 -# define KW_BLOB 279 -# define KW_BLOB32 280 -# define KW_INT8ARRAY 281 -# define KW_INT16ARRAY 282 -# define KW_INT32ARRAY 283 -# define KW_UINT8ARRAY 284 -# define KW_UINT16ARRAY 285 -# define KW_UINT32ARRAY 286 -# define KW_UINT32UINT8ARRAY 287 -# define KW_REQUIRED 288 -# define KW_BROADCAST 289 -# define KW_P2P 290 -# define KW_RAM 291 -# define KW_DB 292 -# define KW_CLSEND 293 -# define KW_CLRECV 294 -# define KW_OWNSEND 295 -# define KW_AIRECV 296 -# define START_DC 297 -# define START_PARAMETER_VALUE 298 +# define UNSIGNED_INTEGER 257 +# define SIGNED_INTEGER 258 +# define REAL 259 +# define STRING 260 +# define HEX_STRING 261 +# define IDENTIFIER 262 +# define KW_DCLASS 263 +# define KW_STRUCT 264 +# define KW_FROM 265 +# define KW_IMPORT 266 +# define KW_TYPEDEF 267 +# define KW_SWITCH 268 +# define KW_CASE 269 +# define KW_INT8 270 +# define KW_INT16 271 +# define KW_INT32 272 +# define KW_INT64 273 +# define KW_UINT8 274 +# define KW_UINT16 275 +# define KW_UINT32 276 +# define KW_UINT64 277 +# define KW_FLOAT64 278 +# define KW_STRING 279 +# define KW_BLOB 280 +# define KW_BLOB32 281 +# define KW_INT8ARRAY 282 +# define KW_INT16ARRAY 283 +# define KW_INT32ARRAY 284 +# define KW_UINT8ARRAY 285 +# define KW_UINT16ARRAY 286 +# define KW_UINT32ARRAY 287 +# define KW_UINT32UINT8ARRAY 288 +# define KW_REQUIRED 289 +# define KW_BROADCAST 290 +# define KW_P2P 291 +# define KW_RAM 292 +# define KW_DB 293 +# define KW_CLSEND 294 +# define KW_CLRECV 295 +# define KW_OWNSEND 296 +# define KW_AIRECV 297 +# define START_DC 298 +# define START_PARAMETER_VALUE 299 extern YYSTYPE dcyylval; diff --git a/direct/src/dcparser/dcParser.yxx b/direct/src/dcparser/dcParser.yxx index fb532e63a6..2f40b02727 100644 --- a/direct/src/dcparser/dcParser.yxx +++ b/direct/src/dcparser/dcParser.yxx @@ -64,7 +64,8 @@ dc_cleanup_parser() { %} -%token INTEGER +%token UNSIGNED_INTEGER +%token SIGNED_INTEGER %token REAL %token STRING HEX_STRING IDENTIFIER @@ -130,6 +131,9 @@ dc_cleanup_parser() { %type import_identifier %type slash_identifier %type optional_name +%type small_unsigned_integer +%type signed_integer +%type unsigned_integer %type number %% @@ -379,24 +383,24 @@ type_name: } $$ = simple_param; } - | type_token '/' INTEGER + | type_token '/' small_unsigned_integer { DCSimpleParameter *simple_param = new DCSimpleParameter($1); if ($3 == 0) { yyerror("Invalid divisor."); - } else if (!simple_param->set_divisor((int)$3)) { + } else if (!simple_param->set_divisor($3)) { yyerror("A divisor is only valid on a numeric type."); } $$ = simple_param; } - | type_token '/' INTEGER '(' double_range ')' + | type_token '/' small_unsigned_integer '(' double_range ')' { DCSimpleParameter *simple_param = new DCSimpleParameter($1); if ($3 == 0) { yyerror("Invalid divisor."); - } else if (!simple_param->set_divisor((int)$3)) { + } else if (!simple_param->set_divisor($3)) { yyerror("A divisor is only valid on a numeric type."); } if (!simple_param->set_range(double_range)) { @@ -404,13 +408,13 @@ type_name: } $$ = simple_param; } - | type_token '(' double_range ')' '/' INTEGER + | type_token '(' double_range ')' '/' small_unsigned_integer { DCSimpleParameter *simple_param = new DCSimpleParameter($1); if ($6 == 0) { yyerror("Invalid divisor."); - } else if (!simple_param->set_divisor((int)$6)) { + } else if (!simple_param->set_divisor($6)) { yyerror("A divisor is only valid on a numeric type."); } if (!simple_param->set_range(double_range)) { @@ -494,62 +498,29 @@ uint_range: { uint_range.clear(); } - | INTEGER -{ - if ($1 < 0) { - yyerror("Nonnegative values only"); - } else { - uint_range.clear(); - if (!uint_range.add_range((unsigned int)$1, (unsigned int)$1)) { - yyerror("Overlapping range"); - } - } -} - | INTEGER '-' INTEGER -{ - if ($1 < 0 || $3 < 0) { - yyerror("Nonnegative values only"); - } else { - uint_range.clear(); - if (!uint_range.add_range((unsigned int)$1, (unsigned int)$3)) { - yyerror("Overlapping range"); - } - } -} - | INTEGER INTEGER + | small_unsigned_integer { uint_range.clear(); - if ($2 >= 0) { - yyerror("Syntax error"); - } else if ($1 < 0) { - yyerror("Nonnegative values only"); - } else if (!uint_range.add_range((unsigned int)$1, (unsigned int)-$2)) { + if (!uint_range.add_range($1, $1)) { yyerror("Overlapping range"); } } - | uint_range ',' INTEGER + | small_unsigned_integer '-' small_unsigned_integer { - if ($3 < 0) { - yyerror("Nonnegative values only"); - } else if (!uint_range.add_range((unsigned int)$3, (unsigned int)$3)) { + uint_range.clear(); + if (!uint_range.add_range($1, $3)) { yyerror("Overlapping range"); } } - | uint_range ',' INTEGER '-' INTEGER + | uint_range ',' small_unsigned_integer { - if ($3 < 0 || $5 < 0) { - yyerror("Nonnegative values only"); - } else if (!uint_range.add_range((unsigned int)$3, (unsigned int)$5)) { + if (!uint_range.add_range($3, $3)) { yyerror("Overlapping range"); } } - | uint_range ',' INTEGER INTEGER + | uint_range ',' small_unsigned_integer '-' small_unsigned_integer { - if ($4 >= 0) { - yyerror("Syntax error"); - } else if ($3 < 0) { - yyerror("Nonnegative values only"); - } else if (!uint_range.add_range((unsigned int)$3, (unsigned int)-$4)) { + if (!uint_range.add_range($3, $5)) { yyerror("Overlapping range"); } } @@ -569,7 +540,7 @@ parameter_definition: current_parameter->set_name($1); $$ = current_parameter; } - | parameter_definition '/' INTEGER + | parameter_definition '/' small_unsigned_integer { if ($3 == 0) { yyerror("Invalid divisor."); @@ -578,7 +549,7 @@ parameter_definition: yyerror("A divisor is only allowed on a primitive type."); } else { - if (!$1->as_simple_parameter()->set_divisor((int)$3)) { + if (!$1->as_simple_parameter()->set_divisor($3)) { yyerror("A divisor is only valid on a numeric type."); } } @@ -589,8 +560,31 @@ parameter_definition: } ; +small_unsigned_integer: + UNSIGNED_INTEGER +{ + $$ = (unsigned int)$1; + if ($$ != $1) { + yyerror("Number out of range."); + $$ = 1; + } +} + ; + +signed_integer: + SIGNED_INTEGER + ; + +unsigned_integer: + UNSIGNED_INTEGER + ; + number: - INTEGER + unsigned_integer +{ + $$ = (double)$1; +} + | signed_integer { $$ = (double)$1; } @@ -598,9 +592,13 @@ number: ; parameter_value: - INTEGER + signed_integer { current_packer->pack_int64($1); +} + | unsigned_integer +{ + current_packer->pack_uint64($1); } | REAL { @@ -638,21 +636,27 @@ parameter_value: { current_packer->pop(); } - | INTEGER '*' INTEGER + | signed_integer '*' small_unsigned_integer { - for (int i = 0; i < $3; i++) { + for (unsigned int i = 0; i < $3; i++) { current_packer->pack_int64($1); } } - | REAL '*' INTEGER + | unsigned_integer '*' small_unsigned_integer { - for (int i = 0; i < $3; i++) { + for (unsigned int i = 0; i < $3; i++) { + current_packer->pack_uint64($1); + } +} + | REAL '*' small_unsigned_integer +{ + for (unsigned int i = 0; i < $3; i++) { current_packer->pack_double($1); } } - | HEX_STRING '*' INTEGER + | HEX_STRING '*' small_unsigned_integer { - for (int i = 0; i < $3; i++) { + for (unsigned int i = 0; i < $3; i++) { current_packer->pack_literal_value($1); } } diff --git a/direct/src/dcparser/dcParserDefs.h b/direct/src/dcparser/dcParserDefs.h index eab54d7ab8..d344b00963 100644 --- a/direct/src/dcparser/dcParserDefs.h +++ b/direct/src/dcparser/dcParserDefs.h @@ -45,7 +45,10 @@ int dcyyparse(); class DCTokenType { public: union U { - PN_int64 integer; + int s_int; + unsigned int s_uint; + PN_int64 int64; + PN_uint64 uint64; double real; bool flag; DCClass *dclass; diff --git a/direct/src/dcparser/dcSimpleParameter.cxx b/direct/src/dcparser/dcSimpleParameter.cxx index 81ac59a904..6f4380335b 100644 --- a/direct/src/dcparser/dcSimpleParameter.cxx +++ b/direct/src/dcparser/dcSimpleParameter.cxx @@ -31,7 +31,7 @@ DCSimpleParameter::Uint32Uint8Type *DCSimpleParameter::_uint32uint8_type = NULL; // Description: //////////////////////////////////////////////////////////////////// DCSimpleParameter:: -DCSimpleParameter(DCSubatomicType type, int divisor) : +DCSimpleParameter(DCSubatomicType type, unsigned int divisor) : _type(type), _divisor(1) { @@ -270,7 +270,7 @@ get_divisor() const { // accept a divisor. //////////////////////////////////////////////////////////////////// bool DCSimpleParameter:: -set_divisor(int divisor) { +set_divisor(unsigned int divisor) { if (_pack_type == PT_string || divisor == 0) { return false; } @@ -306,11 +306,11 @@ set_range(const DCDoubleRange &range) { case ST_int8array: _int_range.clear(); for (i = 0; i < num_ranges; i++) { - int min = (int)floor(range.get_min(i) * _divisor + 0.5); - int max = (int)floor(range.get_max(i) * _divisor + 0.5); - validate_int_limits(min, 8, range_error); - validate_int_limits(max, 8, range_error); - _int_range.add_range(min, max); + PN_int64 min = (PN_int64)floor(range.get_min(i) * _divisor + 0.5); + PN_int64 max = (PN_int64)floor(range.get_max(i) * _divisor + 0.5); + validate_int64_limits(min, 8, range_error); + validate_int64_limits(max, 8, range_error); + _int_range.add_range((int)min, (int)max); } break; @@ -318,11 +318,11 @@ set_range(const DCDoubleRange &range) { case ST_int16array: _int_range.clear(); for (i = 0; i < num_ranges; i++) { - int min = (int)floor(range.get_min(i) * _divisor + 0.5); - int max = (int)floor(range.get_max(i) * _divisor + 0.5); - validate_int_limits(min, 16, range_error); - validate_int_limits(max, 16, range_error); - _int_range.add_range(min, max); + PN_int64 min = (PN_int64)floor(range.get_min(i) * _divisor + 0.5); + PN_int64 max = (PN_int64)floor(range.get_max(i) * _divisor + 0.5); + validate_int64_limits(min, 16, range_error); + validate_int64_limits(max, 16, range_error); + _int_range.add_range((int)min, (int)max); } break; @@ -330,9 +330,11 @@ set_range(const DCDoubleRange &range) { case ST_int32array: _int_range.clear(); for (i = 0; i < num_ranges; i++) { - int min = (int)floor(range.get_min(i) * _divisor + 0.5); - int max = (int)floor(range.get_max(i) * _divisor + 0.5); - _int_range.add_range(min, max); + PN_int64 min = (PN_int64)floor(range.get_min(i) * _divisor + 0.5); + PN_int64 max = (PN_int64)floor(range.get_max(i) * _divisor + 0.5); + validate_int64_limits(min, 32, range_error); + validate_int64_limits(max, 32, range_error); + _int_range.add_range((int)min, (int)max); } break; @@ -349,11 +351,11 @@ set_range(const DCDoubleRange &range) { case ST_uint8array: _uint_range.clear(); for (i = 0; i < num_ranges; i++) { - unsigned int min = (unsigned int)floor(range.get_min(i) * _divisor + 0.5); - unsigned int max = (unsigned int)floor(range.get_max(i) * _divisor + 0.5); - validate_uint_limits(min, 8, range_error); - validate_uint_limits(max, 8, range_error); - _uint_range.add_range(min, max); + PN_uint64 min = (PN_uint64)floor(range.get_min(i) * _divisor + 0.5); + PN_uint64 max = (PN_uint64)floor(range.get_max(i) * _divisor + 0.5); + validate_uint64_limits(min, 8, range_error); + validate_uint64_limits(max, 8, range_error); + _uint_range.add_range((unsigned int)min, (unsigned int)max); } break; @@ -361,11 +363,11 @@ set_range(const DCDoubleRange &range) { case ST_uint16array: _uint_range.clear(); for (i = 0; i < num_ranges; i++) { - unsigned int min = (unsigned int)floor(range.get_min(i) * _divisor + 0.5); - unsigned int max = (unsigned int)floor(range.get_max(i) * _divisor + 0.5); - validate_uint_limits(min, 16, range_error); - validate_uint_limits(max, 16, range_error); - _uint_range.add_range(min, max); + PN_uint64 min = (PN_uint64)floor(range.get_min(i) * _divisor + 0.5); + PN_uint64 max = (PN_uint64)floor(range.get_max(i) * _divisor + 0.5); + validate_uint64_limits(min, 16, range_error); + validate_uint64_limits(max, 16, range_error); + _uint_range.add_range((unsigned int)min, (unsigned int)max); } break; @@ -373,9 +375,11 @@ set_range(const DCDoubleRange &range) { case ST_uint32array: _uint_range.clear(); for (i = 0; i < num_ranges; i++) { - unsigned int min = (unsigned int)floor(range.get_min(i) * _divisor + 0.5); - unsigned int max = (unsigned int)floor(range.get_max(i) * _divisor + 0.5); - _uint_range.add_range(min, max); + PN_uint64 min = (PN_uint64)floor(range.get_min(i) * _divisor + 0.5); + PN_uint64 max = (PN_uint64)floor(range.get_max(i) * _divisor + 0.5); + validate_uint64_limits(min, 32, range_error); + validate_uint64_limits(max, 32, range_error); + _uint_range.add_range((unsigned int)min, (unsigned int)max); } break; @@ -401,11 +405,11 @@ set_range(const DCDoubleRange &range) { case ST_blob: _uint_range.clear(); for (i = 0; i < num_ranges; i++) { - unsigned int min = (unsigned int)floor(range.get_min(i) * _divisor + 0.5); - unsigned int max = (unsigned int)floor(range.get_max(i) * _divisor + 0.5); - validate_uint_limits(min, 16, range_error); - validate_uint_limits(max, 16, range_error); - _uint_range.add_range(min, max); + PN_uint64 min = (PN_uint64)floor(range.get_min(i) * _divisor + 0.5); + PN_uint64 max = (PN_uint64)floor(range.get_max(i) * _divisor + 0.5); + validate_uint64_limits(min, 16, range_error); + validate_uint64_limits(max, 16, range_error); + _uint_range.add_range((unsigned int)min, (unsigned int)max); } if (_uint_range.has_one_value()) { // If we now have a fixed-length string requirement, we don't @@ -424,9 +428,11 @@ set_range(const DCDoubleRange &range) { case ST_blob32: _uint_range.clear(); for (i = 0; i < num_ranges; i++) { - unsigned int min = (unsigned int)floor(range.get_min(i) * _divisor + 0.5); - unsigned int max = (unsigned int)floor(range.get_max(i) * _divisor + 0.5); - _uint_range.add_range(min, max); + PN_uint64 min = (PN_uint64)floor(range.get_min(i) * _divisor + 0.5); + PN_uint64 max = (PN_uint64)floor(range.get_max(i) * _divisor + 0.5); + validate_uint64_limits(min, 32, range_error); + validate_uint64_limits(max, 32, range_error); + _uint_range.add_range((unsigned int)min, (unsigned int)max); } if (_uint_range.has_one_value()) { // If we now have a fixed-length string requirement, we don't @@ -1952,7 +1958,7 @@ generate_hash(HashGenerator &hashgen) const { // if it is not already created. //////////////////////////////////////////////////////////////////// DCSimpleParameter *DCSimpleParameter:: -create_nested_field(DCSubatomicType type, int divisor) { +create_nested_field(DCSubatomicType type, unsigned int divisor) { DivisorMap divisor_map = _nested_field_map[type]; DivisorMap::iterator di; di = divisor_map.find(divisor); diff --git a/direct/src/dcparser/dcSimpleParameter.h b/direct/src/dcparser/dcSimpleParameter.h index 86bd35cc50..584e578860 100644 --- a/direct/src/dcparser/dcSimpleParameter.h +++ b/direct/src/dcparser/dcSimpleParameter.h @@ -35,7 +35,7 @@ //////////////////////////////////////////////////////////////////// class EXPCL_DIRECT DCSimpleParameter : public DCParameter { public: - DCSimpleParameter(DCSubatomicType type, int divisor = 1); + DCSimpleParameter(DCSubatomicType type, unsigned int divisor = 1); DCSimpleParameter(const DCSimpleParameter ©); PUBLISHED: @@ -47,7 +47,7 @@ PUBLISHED: int get_divisor() const; public: - bool set_divisor(int divisor); + bool set_divisor(unsigned int divisor); bool set_range(const DCDoubleRange &range); virtual int calc_num_nested_fields(size_t length_bytes) const; @@ -87,12 +87,13 @@ public: virtual void generate_hash(HashGenerator &hashgen) const; private: - static DCSimpleParameter *create_nested_field(DCSubatomicType type, int divisor); + static DCSimpleParameter *create_nested_field(DCSubatomicType type, + unsigned int divisor); static DCPackerInterface *create_uint32uint8_type(); private: DCSubatomicType _type; - int _divisor; + unsigned int _divisor; DCSubatomicType _nested_type; DCPackerInterface *_nested_field; @@ -101,7 +102,7 @@ private: // The rest of this is to maintain the static list of // DCPackerInterface objects for _nested_field, above. We allocate // each possible object once, and don't delete it. - typedef pmap DivisorMap; + typedef pmap DivisorMap; typedef pmap NestedFieldMap; static NestedFieldMap _nested_field_map;