diff --git a/direct/src/dcparser/dcLexer.cxx.prebuilt b/direct/src/dcparser/dcLexer.cxx.prebuilt index 434f64e961..fa33bfc5a2 100644 --- a/direct/src/dcparser/dcLexer.cxx.prebuilt +++ b/direct/src/dcparser/dcLexer.cxx.prebuilt @@ -300,31 +300,31 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 50 -#define YY_END_OF_BUFFER 51 -static yyconst short int yy_accept[192] = +#define YY_NUM_RULES 52 +#define YY_END_OF_BUFFER 53 +static yyconst short int yy_accept[201] = { 0, - 0, 0, 51, 49, 2, 1, 45, 46, 49, 49, - 49, 41, 41, 47, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 1, 0, 42, - 44, 4, 3, 44, 41, 43, 48, 48, 48, 48, - 48, 48, 48, 36, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 0, 3, 43, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 34, 35, 48, 48, 48, 48, 48, - 0, 44, 48, 22, 48, 11, 31, 48, 48, 48, - 48, 7, 48, 48, 48, 48, 12, 48, 48, 48, + 0, 0, 53, 51, 2, 1, 47, 48, 51, 51, + 51, 43, 43, 49, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 1, 0, 44, + 46, 4, 3, 46, 43, 45, 50, 50, 50, 50, + 50, 50, 50, 38, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 0, 3, + 45, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 36, 37, 50, 50, + 50, 50, 50, 0, 46, 50, 24, 50, 50, 11, + 33, 50, 50, 50, 50, 50, 7, 50, 50, 50, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 13, 14, 15, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 16, 40, 23, 48, 38, - 37, 5, 48, 8, 48, 48, 48, 48, 48, 21, - 6, 10, 48, 17, 18, 19, 48, 48, 20, 48, - 48, 48, 39, 48, 9, 48, 48, 48, 48, 48, - 48, 48, 48, 32, 48, 48, 48, 48, 33, 48, - 48, 24, 48, 48, 48, 48, 25, 26, 48, 48, - 48, 27, 28, 29, 48, 48, 48, 48, 48, 30, - 0 + 50, 14, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 13, 50, 50, 50, 50, 50, 50, 50, 15, + 16, 17, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 18, 42, 25, 50, 40, 39, 5, 50, + 50, 8, 50, 50, 50, 50, 50, 23, 6, 10, + 50, 19, 20, 21, 50, 50, 12, 22, 50, 50, + 50, 41, 50, 9, 50, 50, 50, 50, 50, 50, + 50, 50, 34, 50, 50, 50, 50, 35, 50, 50, + 26, 50, 50, 50, 50, 27, 28, 50, 50, 50, + 29, 30, 31, 50, 50, 50, 50, 50, 32, 0 } ; @@ -341,9 +341,9 @@ static yyconst int yy_ec[256] = 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 1, 1, 1, 1, 21, 1, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 21, 21, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 21, 1, 1, 1, 1, 1, 1, 1, 1, + 26, 27, 28, 29, 30, 21, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 21, 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, @@ -360,133 +360,137 @@ static yyconst int yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst int yy_meta[45] = +static yyconst int yy_meta[46] = { 0, 1, 1, 2, 1, 1, 1, 3, 4, 1, 5, 5, 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, 8, 7 + 7, 7, 7, 8, 7 } ; -static yyconst short int yy_base[200] = +static yyconst short int yy_base[209] = { 0, - 0, 0, 234, 235, 235, 0, 235, 235, 225, 0, - 39, 38, 39, 235, 0, 202, 18, 28, 28, 23, - 29, 189, 218, 41, 14, 185, 198, 0, 0, 219, - 38, 235, 0, 0, 0, 0, 0, 189, 191, 190, - 185, 200, 28, 0, 190, 186, 185, 183, 178, 183, - 180, 182, 177, 175, 181, 175, 176, 201, 0, 0, - 181, 183, 183, 178, 166, 176, 175, 178, 177, 166, - 163, 57, 158, 0, 0, 155, 39, 155, 167, 153, - 184, 183, 165, 175, 162, 0, 0, 162, 152, 146, - 144, 0, 145, 165, 168, 165, 156, 151, 146, 142, + 0, 0, 244, 245, 245, 0, 245, 245, 235, 0, + 40, 39, 40, 245, 0, 212, 18, 29, 29, 22, + 29, 198, 228, 42, 26, 194, 208, 0, 0, 229, + 39, 245, 0, 0, 0, 0, 0, 198, 200, 41, + 195, 211, 32, 0, 200, 204, 195, 194, 192, 187, + 192, 189, 191, 186, 184, 191, 184, 185, 211, 0, + 0, 191, 193, 193, 192, 187, 174, 185, 184, 187, + 186, 185, 173, 170, 61, 165, 0, 0, 162, 45, + 162, 175, 160, 192, 191, 173, 183, 164, 169, 0, + 0, 169, 158, 152, 149, 149, 0, 150, 171, 174, - 150, 149, 147, 67, 130, 158, 145, 127, 142, 128, - 149, 125, 141, 140, 0, 124, 127, 122, 130, 118, - 127, 129, 138, 141, 138, 129, 0, 0, 128, 0, - 0, 0, 135, 0, 111, 110, 109, 120, 118, 0, - 0, 0, 116, 120, 49, 0, 104, 102, 0, 102, - 101, 115, 0, 111, 0, 98, 97, 103, 95, 92, - 108, 107, 84, 0, 90, 89, 92, 102, 0, 79, - 78, 0, 98, 88, 64, 58, 0, 0, 47, 44, - 70, 0, 0, 0, 64, 48, 40, 54, 31, 0, - 235, 89, 94, 67, 96, 100, 108, 112, 116 + 171, 162, 157, 152, 147, 156, 155, 153, 74, 135, + 164, 0, 151, 132, 148, 133, 139, 154, 129, 146, + 145, 0, 128, 131, 126, 135, 122, 132, 134, 143, + 146, 143, 134, 0, 0, 133, 0, 0, 0, 114, + 139, 0, 114, 113, 112, 124, 122, 0, 0, 0, + 120, 124, 51, 0, 107, 105, 0, 0, 105, 104, + 119, 0, 115, 0, 101, 100, 107, 98, 95, 112, + 111, 87, 0, 93, 92, 95, 106, 0, 82, 81, + 0, 103, 101, 73, 61, 0, 0, 60, 49, 72, + 0, 0, 0, 66, 44, 43, 58, 34, 0, 245, + 92, 97, 52, 99, 103, 111, 115, 119 } ; -static yyconst short int yy_def[200] = +static yyconst short int yy_def[209] = { 0, - 191, 1, 191, 191, 191, 192, 191, 191, 193, 194, - 191, 195, 195, 191, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 192, 194, 193, - 194, 191, 197, 31, 13, 198, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 199, 197, 198, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 199, 199, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 200, 1, 200, 200, 200, 201, 200, 200, 202, 203, + 200, 204, 204, 200, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 201, 203, 202, + 203, 200, 206, 31, 13, 207, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 208, 206, + 207, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 208, 208, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 0, 191, 191, 191, 191, 191, 191, 191, 191 + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 0, + 200, 200, 200, 200, 200, 200, 200, 200 } ; -static yyconst short int yy_nxt[280] = +static yyconst short int yy_nxt[291] = { 0, 4, 5, 6, 7, 8, 4, 9, 10, 11, 12, 13, 13, 13, 13, 13, 13, 13, 14, 15, 15, 15, 16, 17, 18, 19, 15, 20, 15, 15, 21, - 15, 15, 15, 22, 23, 15, 24, 25, 26, 27, - 15, 15, 15, 15, 32, 34, 34, 33, 39, 41, - 44, 45, 54, 46, 40, 55, 42, 58, 43, 47, - 48, 49, 52, 58, 66, 67, 53, 94, 100, 95, - 157, 31, 96, 97, 190, 189, 188, 123, 101, 124, - 36, 191, 125, 126, 187, 186, 185, 184, 158, 28, - 183, 28, 28, 28, 28, 28, 28, 30, 30, 35, + 15, 15, 15, 15, 22, 23, 15, 24, 25, 26, + 27, 15, 15, 15, 15, 32, 34, 34, 33, 39, + 41, 44, 45, 47, 46, 40, 31, 42, 59, 48, + 43, 49, 50, 53, 59, 55, 64, 54, 56, 68, + 69, 99, 166, 100, 105, 65, 101, 102, 199, 198, + 197, 196, 36, 200, 130, 106, 131, 195, 194, 132, + 133, 167, 28, 193, 28, 28, 28, 28, 28, 28, - 35, 182, 181, 35, 37, 37, 37, 37, 59, 180, - 59, 59, 59, 59, 59, 59, 60, 60, 82, 179, - 82, 178, 177, 176, 175, 174, 173, 172, 171, 170, - 169, 168, 167, 166, 165, 164, 163, 162, 161, 160, - 159, 156, 155, 154, 153, 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, 122, 121, 120, 119, 118, 117, 116, 115, 114, - 113, 112, 111, 110, 109, 108, 107, 106, 105, 191, - 191, 104, 103, 102, 99, 98, 93, 92, 91, 90, + 30, 30, 35, 35, 192, 191, 35, 37, 37, 37, + 37, 60, 190, 60, 60, 60, 60, 60, 60, 61, + 61, 85, 189, 85, 188, 187, 186, 185, 184, 183, + 182, 181, 180, 179, 178, 177, 176, 175, 174, 173, + 172, 171, 170, 169, 168, 165, 164, 163, 162, 161, + 160, 159, 158, 157, 156, 155, 154, 153, 152, 151, + 150, 149, 148, 147, 146, 145, 144, 143, 142, 141, + 140, 139, 138, 137, 136, 135, 134, 129, 128, 127, + 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, + 116, 115, 114, 113, 112, 111, 110, 200, 200, 109, - 89, 88, 87, 86, 85, 84, 83, 81, 80, 79, - 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, - 68, 65, 64, 63, 62, 61, 34, 57, 56, 51, - 50, 38, 29, 191, 3, 191, 191, 191, 191, 191, - 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, - 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, - 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, - 191, 191, 191, 191, 191, 191, 191, 191, 191 + 108, 107, 104, 103, 98, 97, 96, 95, 94, 93, + 92, 91, 90, 89, 88, 87, 86, 84, 83, 82, + 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, + 71, 70, 67, 66, 63, 62, 34, 58, 57, 52, + 51, 38, 29, 200, 3, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, 200, 200 } ; -static yyconst short int yy_chk[280] = +static yyconst short int yy_chk[291] = { 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, 1, 11, 12, 13, 11, 17, 18, - 19, 19, 25, 20, 17, 25, 18, 31, 18, 20, - 21, 21, 24, 31, 43, 43, 24, 72, 77, 72, - 145, 194, 72, 72, 189, 188, 187, 104, 77, 104, - 12, 13, 104, 104, 186, 185, 181, 180, 145, 192, - 179, 192, 192, 192, 192, 192, 192, 193, 193, 195, + 1, 1, 1, 1, 1, 11, 12, 13, 11, 17, + 18, 19, 19, 20, 19, 17, 203, 18, 31, 20, + 18, 21, 21, 24, 31, 25, 40, 24, 25, 43, + 43, 75, 153, 75, 80, 40, 75, 75, 198, 197, + 196, 195, 12, 13, 109, 80, 109, 194, 190, 109, + 109, 153, 201, 189, 201, 201, 201, 201, 201, 201, - 195, 176, 175, 195, 196, 196, 196, 196, 197, 174, - 197, 197, 197, 197, 197, 197, 198, 198, 199, 173, - 199, 171, 170, 168, 167, 166, 165, 163, 162, 161, - 160, 159, 158, 157, 156, 154, 152, 151, 150, 148, - 147, 144, 143, 139, 138, 137, 136, 135, 133, 129, - 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, - 116, 114, 113, 112, 111, 110, 109, 108, 107, 106, - 105, 103, 102, 101, 100, 99, 98, 97, 96, 95, - 94, 93, 91, 90, 89, 88, 85, 84, 83, 82, - 81, 80, 79, 78, 76, 73, 71, 70, 69, 68, + 202, 202, 204, 204, 188, 185, 204, 205, 205, 205, + 205, 206, 184, 206, 206, 206, 206, 206, 206, 207, + 207, 208, 183, 208, 182, 180, 179, 177, 176, 175, + 174, 172, 171, 170, 169, 168, 167, 166, 165, 163, + 161, 160, 159, 156, 155, 152, 151, 147, 146, 145, + 144, 143, 141, 140, 136, 133, 132, 131, 130, 129, + 128, 127, 126, 125, 124, 123, 121, 120, 119, 118, + 117, 116, 115, 114, 113, 111, 110, 108, 107, 106, + 105, 104, 103, 102, 101, 100, 99, 98, 96, 95, + 94, 93, 92, 89, 88, 87, 86, 85, 84, 83, - 67, 66, 65, 64, 63, 62, 61, 58, 57, 56, - 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, - 45, 42, 41, 40, 39, 38, 30, 27, 26, 23, - 22, 16, 9, 3, 191, 191, 191, 191, 191, 191, - 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, - 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, - 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, - 191, 191, 191, 191, 191, 191, 191, 191, 191 + 82, 81, 79, 76, 74, 73, 72, 71, 70, 69, + 68, 67, 66, 65, 64, 63, 62, 59, 58, 57, + 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, + 46, 45, 42, 41, 39, 38, 30, 27, 26, 23, + 22, 16, 9, 3, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, 200, 200 } ; static yy_state_type yy_last_accepting_state; @@ -899,7 +903,7 @@ inline void accept() { col_number += yyleng; } -#line 904 "lex.yy.c" +#line 908 "lex.yy.c" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1061,7 +1065,7 @@ YY_DECL } -#line 1066 "lex.yy.c" +#line 1070 "lex.yy.c" if ( yy_init ) { @@ -1112,13 +1116,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 >= 192 ) + if ( yy_current_state >= 201 ) 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] != 235 ); + while ( yy_base[yy_current_state] != 245 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1247,7 +1251,7 @@ YY_RULE_SETUP #line 482 "dcLexer.lxx" { accept(); - return KW_INT8; + return KW_DEFAULT; } YY_BREAK case 13: @@ -1255,7 +1259,7 @@ YY_RULE_SETUP #line 487 "dcLexer.lxx" { accept(); - return KW_INT16; + return KW_BREAK; } YY_BREAK case 14: @@ -1263,7 +1267,7 @@ YY_RULE_SETUP #line 492 "dcLexer.lxx" { accept(); - return KW_INT32; + return KW_INT8; } YY_BREAK case 15: @@ -1271,7 +1275,7 @@ YY_RULE_SETUP #line 497 "dcLexer.lxx" { accept(); - return KW_INT64; + return KW_INT16; } YY_BREAK case 16: @@ -1279,7 +1283,7 @@ YY_RULE_SETUP #line 502 "dcLexer.lxx" { accept(); - return KW_UINT8; + return KW_INT32; } YY_BREAK case 17: @@ -1287,7 +1291,7 @@ YY_RULE_SETUP #line 507 "dcLexer.lxx" { accept(); - return KW_UINT16; + return KW_INT64; } YY_BREAK case 18: @@ -1295,7 +1299,7 @@ YY_RULE_SETUP #line 512 "dcLexer.lxx" { accept(); - return KW_UINT32; + return KW_UINT8; } YY_BREAK case 19: @@ -1303,7 +1307,7 @@ YY_RULE_SETUP #line 517 "dcLexer.lxx" { accept(); - return KW_UINT64; + return KW_UINT16; } YY_BREAK case 20: @@ -1311,7 +1315,7 @@ YY_RULE_SETUP #line 522 "dcLexer.lxx" { accept(); - return KW_FLOAT64; + return KW_UINT32; } YY_BREAK case 21: @@ -1319,7 +1323,7 @@ YY_RULE_SETUP #line 527 "dcLexer.lxx" { accept(); - return KW_STRING; + return KW_UINT64; } YY_BREAK case 22: @@ -1327,7 +1331,7 @@ YY_RULE_SETUP #line 532 "dcLexer.lxx" { accept(); - return KW_BLOB; + return KW_FLOAT64; } YY_BREAK case 23: @@ -1335,7 +1339,7 @@ YY_RULE_SETUP #line 537 "dcLexer.lxx" { accept(); - return KW_BLOB32; + return KW_STRING; } YY_BREAK case 24: @@ -1343,7 +1347,7 @@ YY_RULE_SETUP #line 542 "dcLexer.lxx" { accept(); - return KW_INT8ARRAY; + return KW_BLOB; } YY_BREAK case 25: @@ -1351,7 +1355,7 @@ YY_RULE_SETUP #line 547 "dcLexer.lxx" { accept(); - return KW_INT16ARRAY; + return KW_BLOB32; } YY_BREAK case 26: @@ -1359,7 +1363,7 @@ YY_RULE_SETUP #line 552 "dcLexer.lxx" { accept(); - return KW_INT32ARRAY; + return KW_INT8ARRAY; } YY_BREAK case 27: @@ -1367,7 +1371,7 @@ YY_RULE_SETUP #line 557 "dcLexer.lxx" { accept(); - return KW_UINT8ARRAY; + return KW_INT16ARRAY; } YY_BREAK case 28: @@ -1375,7 +1379,7 @@ YY_RULE_SETUP #line 562 "dcLexer.lxx" { accept(); - return KW_UINT16ARRAY; + return KW_INT32ARRAY; } YY_BREAK case 29: @@ -1383,7 +1387,7 @@ YY_RULE_SETUP #line 567 "dcLexer.lxx" { accept(); - return KW_UINT32ARRAY; + return KW_UINT8ARRAY; } YY_BREAK case 30: @@ -1391,7 +1395,7 @@ YY_RULE_SETUP #line 572 "dcLexer.lxx" { accept(); - return KW_UINT32UINT8ARRAY; + return KW_UINT16ARRAY; } YY_BREAK case 31: @@ -1399,7 +1403,7 @@ YY_RULE_SETUP #line 577 "dcLexer.lxx" { accept(); - return KW_CHAR; + return KW_UINT32ARRAY; } YY_BREAK case 32: @@ -1407,7 +1411,7 @@ YY_RULE_SETUP #line 582 "dcLexer.lxx" { accept(); - return KW_REQUIRED; + return KW_UINT32UINT8ARRAY; } YY_BREAK case 33: @@ -1415,7 +1419,7 @@ YY_RULE_SETUP #line 587 "dcLexer.lxx" { accept(); - return KW_BROADCAST; + return KW_CHAR; } YY_BREAK case 34: @@ -1423,7 +1427,7 @@ YY_RULE_SETUP #line 592 "dcLexer.lxx" { accept(); - return KW_P2P; + return KW_REQUIRED; } YY_BREAK case 35: @@ -1431,7 +1435,7 @@ YY_RULE_SETUP #line 597 "dcLexer.lxx" { accept(); - return KW_RAM; + return KW_BROADCAST; } YY_BREAK case 36: @@ -1439,7 +1443,7 @@ YY_RULE_SETUP #line 602 "dcLexer.lxx" { accept(); - return KW_DB; + return KW_P2P; } YY_BREAK case 37: @@ -1447,7 +1451,7 @@ YY_RULE_SETUP #line 607 "dcLexer.lxx" { accept(); - return KW_CLSEND; + return KW_RAM; } YY_BREAK case 38: @@ -1455,7 +1459,7 @@ YY_RULE_SETUP #line 612 "dcLexer.lxx" { accept(); - return KW_CLRECV; + return KW_DB; } YY_BREAK case 39: @@ -1463,7 +1467,7 @@ YY_RULE_SETUP #line 617 "dcLexer.lxx" { accept(); - return KW_OWNSEND; + return KW_CLSEND; } YY_BREAK case 40: @@ -1471,12 +1475,28 @@ YY_RULE_SETUP #line 622 "dcLexer.lxx" { accept(); - return KW_AIRECV; + return KW_CLRECV; } YY_BREAK case 41: YY_RULE_SETUP #line 627 "dcLexer.lxx" +{ + accept(); + return KW_OWNSEND; +} + YY_BREAK +case 42: +YY_RULE_SETUP +#line 632 "dcLexer.lxx" +{ + accept(); + return KW_AIRECV; +} + YY_BREAK +case 43: +YY_RULE_SETUP +#line 637 "dcLexer.lxx" { // An unsigned integer number. accept(); @@ -1500,9 +1520,9 @@ YY_RULE_SETUP return UNSIGNED_INTEGER; } YY_BREAK -case 42: +case 44: YY_RULE_SETUP -#line 650 "dcLexer.lxx" +#line 660 "dcLexer.lxx" { // A signed integer number. accept(); @@ -1549,9 +1569,9 @@ YY_RULE_SETUP return SIGNED_INTEGER; } YY_BREAK -case 43: +case 45: YY_RULE_SETUP -#line 696 "dcLexer.lxx" +#line 706 "dcLexer.lxx" { // A hexadecimal integer number. accept(); @@ -1579,9 +1599,9 @@ YY_RULE_SETUP return UNSIGNED_INTEGER; } YY_BREAK -case 44: +case 46: YY_RULE_SETUP -#line 723 "dcLexer.lxx" +#line 733 "dcLexer.lxx" { // A floating-point number. accept(); @@ -1590,9 +1610,9 @@ YY_RULE_SETUP return REAL; } YY_BREAK -case 45: +case 47: YY_RULE_SETUP -#line 731 "dcLexer.lxx" +#line 741 "dcLexer.lxx" { // Quoted string. accept(); @@ -1600,9 +1620,9 @@ YY_RULE_SETUP return STRING; } YY_BREAK -case 46: +case 48: YY_RULE_SETUP -#line 738 "dcLexer.lxx" +#line 748 "dcLexer.lxx" { // Single-quoted string. accept(); @@ -1610,9 +1630,9 @@ YY_RULE_SETUP return STRING; } YY_BREAK -case 47: +case 49: YY_RULE_SETUP -#line 745 "dcLexer.lxx" +#line 755 "dcLexer.lxx" { // Long hex string. accept(); @@ -1620,9 +1640,9 @@ YY_RULE_SETUP return HEX_STRING; } YY_BREAK -case 48: +case 50: YY_RULE_SETUP -#line 752 "dcLexer.lxx" +#line 762 "dcLexer.lxx" { // Identifier. accept(); @@ -1630,21 +1650,21 @@ YY_RULE_SETUP return IDENTIFIER; } YY_BREAK -case 49: +case 51: YY_RULE_SETUP -#line 760 "dcLexer.lxx" +#line 770 "dcLexer.lxx" { // Send any other printable character as itself. accept(); return dcyytext[0]; } YY_BREAK -case 50: +case 52: YY_RULE_SETUP -#line 766 "dcLexer.lxx" +#line 776 "dcLexer.lxx" ECHO; YY_BREAK -#line 1649 "lex.yy.c" +#line 1669 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1936,7 +1956,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 >= 192 ) + if ( yy_current_state >= 201 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1971,11 +1991,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 >= 192 ) + if ( yy_current_state >= 201 ) 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 == 191); + yy_is_jam = (yy_current_state == 200); return yy_is_jam ? 0 : yy_current_state; } @@ -2525,4 +2545,4 @@ int main() return 0; } #endif -#line 766 "dcLexer.lxx" +#line 776 "dcLexer.lxx" diff --git a/direct/src/dcparser/dcParser.cxx.prebuilt b/direct/src/dcparser/dcParser.cxx.prebuilt index 90481d45ef..6d5205f14e 100644 --- a/direct/src/dcparser/dcParser.cxx.prebuilt +++ b/direct/src/dcparser/dcParser.cxx.prebuilt @@ -23,38 +23,40 @@ # 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_CHAR 289 -# define KW_REQUIRED 290 -# define KW_BROADCAST 291 -# define KW_P2P 292 -# define KW_RAM 293 -# define KW_DB 294 -# define KW_CLSEND 295 -# define KW_CLRECV 296 -# define KW_OWNSEND 297 -# define KW_AIRECV 298 -# define START_DC 299 -# define START_PARAMETER_VALUE 300 -# define START_PARAMETER_DESCRIPTION 301 +# define KW_DEFAULT 270 +# define KW_BREAK 271 +# define KW_INT8 272 +# define KW_INT16 273 +# define KW_INT32 274 +# define KW_INT64 275 +# define KW_UINT8 276 +# define KW_UINT16 277 +# define KW_UINT32 278 +# define KW_UINT64 279 +# define KW_FLOAT64 280 +# define KW_STRING 281 +# define KW_BLOB 282 +# define KW_BLOB32 283 +# define KW_INT8ARRAY 284 +# define KW_INT16ARRAY 285 +# define KW_INT32ARRAY 286 +# define KW_UINT8ARRAY 287 +# define KW_UINT16ARRAY 288 +# define KW_UINT32ARRAY 289 +# define KW_UINT32UINT8ARRAY 290 +# define KW_CHAR 291 +# define KW_REQUIRED 292 +# define KW_BROADCAST 293 +# define KW_P2P 294 +# define KW_RAM 295 +# define KW_DB 296 +# define KW_CLSEND 297 +# define KW_CLRECV 298 +# define KW_OWNSEND 299 +# define KW_AIRECV 300 +# define START_DC 301 +# define START_PARAMETER_VALUE 302 +# define START_PARAMETER_DESCRIPTION 303 #line 6 "dcParser.yxx" @@ -137,12 +139,12 @@ dc_cleanup_parser() { -#define YYFINAL 271 +#define YYFINAL 279 #define YYFLAG -32768 -#define YYNTBASE 63 +#define YYNTBASE 65 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ -#define YYTRANSLATE(x) ((unsigned)(x) <= 301 ? yytranslate[x] : 137) +#define YYTRANSLATE(x) ((unsigned)(x) <= 303 ? yytranslate[x] : 142) /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ static const char yytranslate[] = @@ -150,16 +152,16 @@ static const char yytranslate[] = 0, 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, 2, 2, 59, 2, 2, - 56, 57, 51, 2, 52, 60, 50, 49, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 55, 48, - 2, 58, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 61, 2, 2, + 58, 59, 53, 2, 54, 62, 52, 51, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 57, 50, + 2, 60, 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, 61, 2, 62, 2, 2, 2, 2, 2, 2, + 2, 63, 2, 64, 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, 2, 54, 2, 2, 2, 2, + 2, 2, 2, 55, 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, 2, 2, 2, 2, 2, @@ -177,7 +179,7 @@ static const char yytranslate[] = 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, 45, - 46, 47 + 46, 47, 48, 49 }; #if YYDEBUG @@ -190,73 +192,74 @@ static const short yyprhs[] = 117, 119, 121, 124, 126, 130, 132, 135, 138, 141, 144, 148, 151, 152, 158, 160, 162, 164, 168, 170, 171, 175, 177, 179, 180, 185, 187, 188, 193, 195, - 197, 199, 201, 204, 207, 210, 212, 217, 221, 225, - 227, 229, 231, 233, 235, 237, 241, 244, 248, 254, - 259, 261, 263, 267, 270, 274, 280, 285, 287, 292, - 294, 298, 302, 307, 309, 311, 313, 315, 317, 319, + 197, 199, 201, 203, 205, 208, 211, 214, 216, 221, + 225, 229, 231, 233, 235, 237, 239, 241, 245, 248, + 252, 258, 263, 265, 267, 271, 274, 278, 284, 289, + 291, 296, 298, 302, 306, 311, 313, 315, 317, 319, 321, 323, 325, 327, 329, 331, 333, 335, 337, 339, - 340, 345, 346, 351, 352, 357, 361, 365, 369, 373, - 375, 378, 380, 382, 384, 388, 390, 392, 394, 396, + 341, 343, 344, 349, 350, 355, 356, 361, 365, 369, + 373, 377, 379, 382, 384, 386, 388, 392, 394, 396, 398, 400, 402, 404, 406, 408, 410, 412, 414, 416, - 418, 420, 422, 424, 426, 428, 430, 433, 436, 439, - 442, 445, 448, 451, 454, 457, 459, 460, 465, 467, - 469, 473, 475, 477, 478, 488, 490, 493, 496, 499, - 500, 505, 508, 510 + 418, 420, 422, 424, 426, 428, 430, 432, 434, 437, + 440, 443, 446, 449, 452, 455, 458, 461, 463, 464, + 469, 471, 473, 477, 479, 481, 482, 492, 494, 497, + 500, 503, 506, 509, 510, 515, 518, 521, 524, 526 }; static const short yyrhs[] = { - 45, 64, 0, 46, 115, 0, 47, 101, 0, 136, - 0, 64, 48, 0, 64, 72, 0, 64, 130, 0, - 64, 67, 0, 64, 71, 0, 8, 0, 65, 49, - 8, 0, 65, 0, 66, 50, 65, 0, 12, 66, - 0, 0, 11, 66, 12, 68, 69, 0, 70, 0, - 51, 0, 65, 0, 70, 52, 65, 0, 13, 100, - 0, 73, 0, 80, 0, 0, 9, 129, 74, 76, - 53, 78, 54, 0, 8, 0, 136, 0, 55, 77, - 0, 75, 0, 77, 52, 75, 0, 136, 0, 78, - 48, 0, 78, 79, 0, 87, 123, 0, 125, 124, - 0, 97, 123, 48, 0, 95, 123, 0, 0, 10, - 129, 81, 83, 53, 85, 54, 0, 8, 0, 136, - 0, 55, 84, 0, 82, 0, 84, 52, 82, 0, - 136, 0, 85, 48, 0, 85, 86, 0, 87, 124, - 0, 125, 124, 0, 97, 124, 48, 0, 95, 124, - 0, 0, 129, 56, 88, 89, 57, 0, 136, 0, - 90, 0, 91, 0, 90, 52, 91, 0, 100, 0, - 0, 106, 93, 107, 0, 106, 0, 92, 0, 0, - 92, 58, 96, 115, 0, 94, 0, 0, 94, 58, - 98, 115, 0, 92, 0, 94, 0, 95, 0, 97, - 0, 87, 124, 0, 97, 124, 0, 95, 124, 0, - 122, 0, 102, 56, 104, 57, 0, 102, 49, 109, - 0, 102, 59, 113, 0, 102, 0, 8, 0, 80, - 0, 130, 0, 136, 0, 114, 0, 114, 60, 114, - 0, 114, 113, 0, 104, 52, 114, 0, 104, 52, - 114, 60, 114, 0, 104, 52, 114, 113, 0, 136, - 0, 108, 0, 108, 60, 108, 0, 108, 110, 0, - 105, 52, 108, 0, 105, 52, 108, 60, 108, 0, - 105, 52, 108, 110, 0, 103, 0, 106, 61, 105, - 62, 0, 8, 0, 107, 49, 109, 0, 107, 59, - 113, 0, 107, 61, 105, 62, 0, 6, 0, 109, - 0, 3, 0, 4, 0, 4, 0, 3, 0, 112, - 0, 111, 0, 5, 0, 6, 0, 113, 0, 111, - 0, 112, 0, 5, 0, 6, 0, 7, 0, 0, - 53, 116, 119, 54, 0, 0, 61, 117, 119, 62, - 0, 0, 56, 118, 119, 57, 0, 111, 51, 109, - 0, 112, 51, 109, 0, 5, 51, 109, 0, 7, - 51, 109, 0, 120, 0, 121, 120, 0, 136, 0, - 52, 0, 115, 0, 121, 52, 115, 0, 16, 0, - 17, 0, 18, 0, 19, 0, 20, 0, 21, 0, + 47, 66, 0, 48, 118, 0, 49, 104, 0, 141, + 0, 66, 50, 0, 66, 74, 0, 66, 133, 0, + 66, 69, 0, 66, 73, 0, 8, 0, 67, 51, + 8, 0, 67, 0, 68, 52, 67, 0, 12, 68, + 0, 0, 11, 68, 12, 70, 71, 0, 72, 0, + 53, 0, 67, 0, 72, 54, 67, 0, 13, 102, + 0, 75, 0, 82, 0, 0, 9, 132, 76, 78, + 55, 80, 56, 0, 8, 0, 141, 0, 57, 79, + 0, 77, 0, 79, 54, 77, 0, 141, 0, 80, + 50, 0, 80, 81, 0, 89, 126, 0, 128, 127, + 0, 99, 126, 50, 0, 97, 126, 0, 0, 10, + 132, 83, 85, 55, 87, 56, 0, 8, 0, 141, + 0, 57, 86, 0, 84, 0, 86, 54, 84, 0, + 141, 0, 87, 50, 0, 87, 88, 0, 89, 127, + 0, 128, 127, 0, 99, 127, 50, 0, 97, 127, + 0, 0, 132, 58, 90, 91, 59, 0, 141, 0, + 92, 0, 93, 0, 92, 54, 93, 0, 102, 0, + 0, 109, 95, 110, 0, 109, 0, 94, 0, 0, + 94, 60, 98, 118, 0, 96, 0, 0, 96, 60, + 100, 118, 0, 94, 0, 96, 0, 97, 0, 99, + 0, 101, 0, 89, 0, 89, 127, 0, 99, 127, + 0, 97, 127, 0, 125, 0, 105, 58, 107, 59, + 0, 105, 51, 112, 0, 105, 61, 116, 0, 105, + 0, 8, 0, 82, 0, 133, 0, 141, 0, 117, + 0, 117, 62, 117, 0, 117, 116, 0, 107, 54, + 117, 0, 107, 54, 117, 62, 117, 0, 107, 54, + 117, 116, 0, 141, 0, 111, 0, 111, 62, 111, + 0, 111, 113, 0, 108, 54, 111, 0, 108, 54, + 111, 62, 111, 0, 108, 54, 111, 113, 0, 106, + 0, 109, 63, 108, 64, 0, 8, 0, 110, 51, + 112, 0, 110, 61, 116, 0, 110, 63, 108, 64, + 0, 6, 0, 112, 0, 3, 0, 4, 0, 4, + 0, 3, 0, 115, 0, 114, 0, 5, 0, 6, + 0, 116, 0, 114, 0, 115, 0, 5, 0, 6, + 0, 7, 0, 0, 55, 119, 122, 56, 0, 0, + 63, 120, 122, 64, 0, 0, 58, 121, 122, 59, + 0, 114, 53, 112, 0, 115, 53, 112, 0, 5, + 53, 112, 0, 7, 53, 112, 0, 123, 0, 124, + 123, 0, 141, 0, 54, 0, 118, 0, 124, 54, + 118, 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, 136, 0, - 123, 36, 0, 123, 37, 0, 123, 38, 0, 123, - 39, 0, 123, 40, 0, 123, 41, 0, 123, 42, - 0, 123, 43, 0, 123, 44, 0, 123, 0, 0, - 8, 55, 126, 128, 0, 8, 0, 127, 0, 128, - 52, 127, 0, 136, 0, 8, 0, 0, 14, 129, - 56, 99, 57, 53, 131, 132, 54, 0, 136, 0, - 132, 48, 0, 132, 133, 0, 132, 135, 0, 0, - 15, 134, 115, 55, 0, 97, 48, 0, 95, 0, - 0 + 32, 0, 33, 0, 34, 0, 35, 0, 36, 0, + 37, 0, 141, 0, 126, 38, 0, 126, 39, 0, + 126, 40, 0, 126, 41, 0, 126, 42, 0, 126, + 43, 0, 126, 44, 0, 126, 45, 0, 126, 46, + 0, 126, 0, 0, 8, 57, 129, 131, 0, 8, + 0, 130, 0, 131, 54, 130, 0, 141, 0, 8, + 0, 0, 14, 132, 58, 103, 59, 55, 134, 135, + 56, 0, 141, 0, 135, 50, 0, 135, 136, 0, + 135, 138, 0, 135, 139, 0, 135, 140, 0, 0, + 15, 137, 118, 57, 0, 16, 57, 0, 17, 50, + 0, 99, 50, 0, 97, 0, 0 }; #endif @@ -265,25 +268,25 @@ static const short yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const short yyrline[] = { - 0, 172, 174, 175, 181, 183, 184, 195, 201, 202, - 205, 207, 213, 215, 221, 226, 226, 233, 235, 241, - 246, 252, 270, 272, 275, 275, 288, 311, 313, 316, - 323, 336, 338, 339, 351, 362, 363, 371, 380, 380, - 393, 416, 418, 421, 428, 436, 438, 439, 449, 457, - 458, 462, 468, 468, 481, 483, 486, 488, 491, 500, - 500, 511, 515, 517, 517, 545, 547, 547, 575, 577, - 580, 582, 585, 590, 594, 600, 605, 614, 630, 644, - 646, 678, 694, 712, 717, 724, 731, 740, 746, 752, - 762, 767, 774, 781, 788, 794, 800, 808, 810, 820, - 826, 841, 856, 862, 872, 875, 886, 900, 904, 908, - 913, 917, 920, 930, 934, 939, 943, 947, 951, 955, - 955, 963, 963, 971, 971, 979, 985, 991, 997, 1005, - 1007, 1010, 1012, 1015, 1017, 1020, 1025, 1029, 1033, 1037, - 1041, 1045, 1049, 1053, 1057, 1061, 1065, 1069, 1073, 1077, - 1081, 1085, 1089, 1093, 1097, 1103, 1108, 1112, 1116, 1120, - 1124, 1128, 1132, 1136, 1140, 1146, 1156, 1156, 1167, 1183, - 1190, 1203, 1208, 1211, 1211, 1225, 1227, 1228, 1229, 1241, - 1241, 1258, 1263, 1269 + 0, 175, 177, 178, 184, 186, 187, 198, 204, 205, + 208, 210, 216, 218, 224, 229, 229, 236, 238, 244, + 249, 255, 273, 275, 278, 278, 291, 314, 316, 319, + 326, 339, 341, 342, 354, 365, 366, 374, 383, 383, + 396, 419, 421, 424, 431, 439, 441, 442, 452, 460, + 461, 465, 471, 471, 490, 492, 495, 497, 500, 509, + 509, 520, 524, 526, 526, 554, 556, 556, 584, 586, + 589, 591, 594, 599, 605, 610, 614, 620, 625, 634, + 650, 664, 666, 698, 714, 732, 737, 744, 751, 760, + 766, 772, 782, 787, 794, 801, 808, 814, 820, 828, + 830, 840, 846, 861, 876, 882, 892, 895, 906, 920, + 924, 928, 933, 937, 940, 950, 954, 959, 963, 967, + 971, 975, 975, 983, 983, 991, 991, 999, 1005, 1011, + 1017, 1025, 1027, 1030, 1032, 1035, 1037, 1040, 1045, 1049, + 1053, 1057, 1061, 1065, 1069, 1073, 1077, 1081, 1085, 1089, + 1093, 1097, 1101, 1105, 1109, 1113, 1117, 1123, 1128, 1132, + 1136, 1140, 1144, 1148, 1152, 1156, 1160, 1166, 1176, 1176, + 1187, 1203, 1210, 1223, 1228, 1231, 1231, 1245, 1247, 1248, + 1249, 1250, 1251, 1263, 1263, 1284, 1293, 1300, 1305, 1311 }; #endif @@ -295,11 +298,11 @@ static const char *const yytname[] = { "$", "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_FROM", "KW_IMPORT", "KW_TYPEDEF", "KW_SWITCH", "KW_CASE", + "KW_DEFAULT", "KW_BREAK", "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_CHAR", "KW_REQUIRED", "KW_BROADCAST", "KW_P2P", "KW_RAM", "KW_DB", "KW_CLSEND", "KW_CLRECV", "KW_OWNSEND", "KW_AIRECV", "START_DC", "START_PARAMETER_VALUE", @@ -314,40 +317,41 @@ static const char *const yytname[] = "@4", "parameter_list", "nonempty_parameter_list", "atomic_element", "named_parameter", "@5", "unnamed_parameter", "named_parameter_with_default", "@6", "unnamed_parameter_with_default", - "@7", "parameter", "parameter_with_default", "parameter_description", - "simple_type_name", "type_name", "double_range", "uint_range", - "type_definition", "parameter_definition", "char_or_uint", - "small_unsigned_integer", "small_negative_integer", "signed_integer", - "unsigned_integer", "number", "char_or_number", "parameter_value", "@8", - "@9", "@10", "array", "maybe_comma", "array_def", "type_token", - "server_flags", "no_server_flags", "molecular_field", "@11", - "atomic_name", "molecular_atom_list", "optional_name", "switch", "@12", - "switch_fields", "switch_case", "@13", "switch_field", "empty", 0 + "@7", "parameter", "parameter_with_default", "parameter_or_atomic", + "parameter_description", "simple_type_name", "type_name", + "double_range", "uint_range", "type_definition", "parameter_definition", + "char_or_uint", "small_unsigned_integer", "small_negative_integer", + "signed_integer", "unsigned_integer", "number", "char_or_number", + "parameter_value", "@8", "@9", "@10", "array", "maybe_comma", + "array_def", "type_token", "server_flags", "no_server_flags", + "molecular_field", "@11", "atomic_name", "molecular_atom_list", + "optional_name", "switch", "@12", "switch_fields", "switch_case", "@13", + "switch_default", "switch_break", "switch_field", "empty", 0 }; #endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const short yyr1[] = { - 0, 63, 63, 63, 64, 64, 64, 64, 64, 64, - 65, 65, 66, 66, 67, 68, 67, 69, 69, 70, - 70, 71, 72, 72, 74, 73, 75, 76, 76, 77, - 77, 78, 78, 78, 79, 79, 79, 79, 81, 80, - 82, 83, 83, 84, 84, 85, 85, 85, 86, 86, - 86, 86, 88, 87, 89, 89, 90, 90, 91, 93, - 92, 94, 95, 96, 95, 97, 98, 97, 99, 99, - 100, 100, 101, 101, 101, 102, 102, 102, 102, 103, - 103, 103, 103, 104, 104, 104, 104, 104, 104, 104, - 105, 105, 105, 105, 105, 105, 105, 106, 106, 107, - 107, 107, 107, 108, 108, 109, 110, 111, 112, 113, - 113, 113, 114, 114, 115, 115, 115, 115, 115, 116, - 115, 117, 115, 118, 115, 115, 115, 115, 115, 119, - 119, 120, 120, 121, 121, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 123, 123, 123, 123, 123, - 123, 123, 123, 123, 123, 124, 126, 125, 127, 128, - 128, 129, 129, 131, 130, 132, 132, 132, 132, 134, - 133, 135, 135, 136 + 0, 65, 65, 65, 66, 66, 66, 66, 66, 66, + 67, 67, 68, 68, 69, 70, 69, 71, 71, 72, + 72, 73, 74, 74, 76, 75, 77, 78, 78, 79, + 79, 80, 80, 80, 81, 81, 81, 81, 83, 82, + 84, 85, 85, 86, 86, 87, 87, 87, 88, 88, + 88, 88, 90, 89, 91, 91, 92, 92, 93, 95, + 94, 96, 97, 98, 97, 99, 100, 99, 101, 101, + 102, 102, 103, 103, 104, 104, 104, 105, 105, 105, + 105, 106, 106, 106, 106, 107, 107, 107, 107, 107, + 107, 107, 108, 108, 108, 108, 108, 108, 108, 109, + 109, 110, 110, 110, 110, 111, 111, 112, 113, 114, + 115, 116, 116, 116, 117, 117, 118, 118, 118, 118, + 118, 119, 118, 120, 118, 121, 118, 118, 118, 118, + 118, 122, 122, 123, 123, 124, 124, 125, 125, 125, + 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, + 125, 125, 125, 125, 125, 125, 125, 126, 126, 126, + 126, 126, 126, 126, 126, 126, 126, 127, 129, 128, + 130, 131, 131, 132, 132, 134, 133, 135, 135, 135, + 135, 135, 135, 137, 136, 138, 139, 140, 140, 141 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -360,18 +364,18 @@ static const short yyr2[] = 1, 1, 2, 1, 3, 1, 2, 2, 2, 2, 3, 2, 0, 5, 1, 1, 1, 3, 1, 0, 3, 1, 1, 0, 4, 1, 0, 4, 1, 1, - 1, 1, 2, 2, 2, 1, 4, 3, 3, 1, - 1, 1, 1, 1, 1, 3, 2, 3, 5, 4, - 1, 1, 3, 2, 3, 5, 4, 1, 4, 1, - 3, 3, 4, 1, 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, 1, 1, 2, 2, 2, 1, 4, 3, + 3, 1, 1, 1, 1, 1, 1, 3, 2, 3, + 5, 4, 1, 1, 3, 2, 3, 5, 4, 1, + 4, 1, 3, 3, 4, 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, 1, 0, 4, 1, 1, - 3, 1, 1, 0, 9, 1, 2, 2, 2, 0, - 4, 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, 1, 0, 4, + 1, 1, 3, 1, 1, 0, 9, 1, 2, 2, + 2, 2, 2, 0, 4, 2, 2, 2, 1, 0 }; /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE @@ -379,139 +383,140 @@ static const short yyr2[] = error. */ static const short yydefact[] = { - 0, 183, 0, 183, 1, 4, 108, 107, 116, 117, - 118, 119, 123, 121, 114, 115, 2, 80, 183, 183, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 81, 183, 62, 65, 183, 183, 3, 79, 97, 61, - 75, 0, 82, 171, 183, 0, 0, 0, 5, 8, - 9, 6, 22, 23, 7, 0, 0, 183, 183, 183, - 0, 0, 172, 38, 0, 165, 72, 155, 63, 66, - 74, 73, 0, 183, 0, 183, 0, 52, 24, 10, - 12, 0, 14, 80, 70, 71, 21, 105, 127, 128, - 132, 133, 0, 129, 183, 131, 0, 0, 125, 126, - 183, 0, 156, 157, 158, 159, 160, 161, 162, 163, - 164, 0, 0, 77, 111, 112, 0, 110, 109, 113, - 84, 83, 78, 103, 0, 91, 104, 90, 99, 60, - 183, 183, 0, 15, 0, 120, 132, 130, 124, 122, - 0, 0, 41, 68, 69, 0, 64, 67, 0, 76, - 0, 86, 0, 98, 106, 0, 93, 0, 0, 183, - 0, 55, 56, 58, 54, 0, 0, 27, 11, 0, - 13, 134, 40, 43, 42, 183, 0, 87, 85, 94, - 92, 100, 101, 0, 53, 0, 26, 29, 28, 183, - 18, 19, 16, 17, 0, 183, 45, 173, 0, 89, - 0, 96, 102, 57, 0, 183, 31, 0, 44, 80, - 46, 39, 47, 183, 183, 183, 183, 183, 88, 95, - 30, 32, 25, 33, 183, 183, 183, 183, 20, 166, - 48, 51, 0, 49, 0, 175, 34, 37, 0, 35, - 0, 50, 179, 176, 174, 182, 0, 177, 178, 36, - 168, 169, 167, 0, 181, 0, 0, 170, 180, 0, - 0, 0 + 0, 189, 0, 189, 1, 4, 110, 109, 118, 119, + 120, 121, 125, 123, 116, 117, 2, 82, 189, 189, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 83, 189, 62, 65, 189, 189, 3, 81, 99, 61, + 77, 0, 84, 173, 189, 0, 0, 0, 5, 8, + 9, 6, 22, 23, 7, 0, 0, 189, 189, 189, + 0, 0, 174, 38, 0, 167, 74, 157, 63, 66, + 76, 75, 0, 189, 0, 189, 0, 52, 24, 10, + 12, 0, 14, 82, 70, 71, 21, 107, 129, 130, + 134, 135, 0, 131, 189, 133, 0, 0, 127, 128, + 189, 189, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 0, 0, 79, 113, 114, 0, 112, 111, 115, + 86, 85, 80, 105, 0, 93, 106, 92, 101, 60, + 189, 189, 0, 15, 0, 122, 134, 132, 126, 124, + 0, 0, 41, 73, 68, 69, 72, 0, 64, 67, + 0, 78, 0, 88, 0, 100, 108, 0, 95, 0, + 0, 189, 0, 55, 56, 58, 54, 0, 0, 27, + 11, 0, 13, 136, 40, 43, 42, 189, 0, 89, + 87, 96, 94, 102, 103, 0, 53, 0, 26, 29, + 28, 189, 18, 19, 16, 17, 0, 189, 45, 175, + 0, 91, 0, 98, 104, 57, 0, 189, 31, 0, + 44, 82, 46, 39, 47, 189, 189, 189, 189, 189, + 90, 97, 30, 32, 25, 33, 189, 189, 189, 189, + 20, 168, 48, 51, 0, 49, 0, 177, 34, 37, + 0, 35, 0, 50, 183, 0, 0, 178, 176, 188, + 0, 179, 180, 181, 182, 36, 170, 171, 169, 0, + 185, 186, 187, 0, 0, 172, 184, 0, 0, 0 }; static const short yydefgoto[] = { - 269, 4, 90, 91, 59, 179, 202, 203, 60, 61, - 62, 141, 197, 176, 198, 215, 233, 40, 110, 183, - 151, 184, 205, 222, 41, 140, 170, 171, 172, 42, - 86, 43, 94, 121, 95, 122, 155, 173, 46, 47, - 48, 126, 134, 49, 139, 135, 136, 166, 14, 15, - 129, 130, 101, 67, 69, 68, 102, 103, 104, 50, - 75, 76, 226, 250, 261, 262, 51, 52, 227, 244, - 257, 263, 258, 77 + 277, 4, 90, 91, 59, 181, 204, 205, 60, 61, + 62, 141, 199, 178, 200, 217, 235, 40, 110, 185, + 151, 186, 207, 224, 41, 140, 172, 173, 174, 42, + 86, 43, 94, 121, 95, 122, 156, 175, 157, 46, + 47, 48, 126, 134, 49, 139, 135, 136, 168, 14, + 15, 129, 130, 101, 67, 69, 68, 102, 103, 104, + 50, 75, 76, 228, 252, 267, 268, 51, 52, 229, + 246, 261, 269, 262, 263, 264, 77 }; static const short yypact[] = { - 62,-32768, 65, 365, 129,-32768,-32768,-32768, -17,-32768, - -13,-32768,-32768,-32768, -10, 11,-32768, 9, 55, 55, + 33,-32768, 31, 371, 118,-32768,-32768,-32768, -29,-32768, + -20,-32768,-32768,-32768, 5, 19,-32768, 2, 83, 83, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768, 47, 72,-32768,-32768,-32768, -19,-32768, 5, - -32768, 76,-32768,-32768, 55, 125, 125, 393,-32768,-32768, - -32768,-32768,-32768,-32768,-32768, 131, 131, 45, 45, 45, - 131, 131,-32768,-32768, 79, 126,-32768,-32768,-32768,-32768, - -32768,-32768, 131, 119, 109, 29, 137,-32768,-32768,-32768, - 88, 43, 96,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768, 104,-32768, 107,-32768, 103, 110,-32768,-32768, - 116, 393,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768, 65, 65,-32768,-32768,-32768, 37,-32768,-32768,-32768, - 13,-32768,-32768,-32768, -6, 20,-32768,-32768,-32768, -16, - 393, 118, 166,-32768, 125,-32768, 65,-32768,-32768,-32768, - 167, 127,-32768,-32768,-32768, 121,-32768,-32768, 119,-32768, - 119,-32768, 29,-32768,-32768, 29,-32768, 131, 109, 29, - 122, 130,-32768,-32768,-32768, 173, 134,-32768,-32768, 28, - 88,-32768,-32768,-32768, 136,-32768, 138, 18,-32768, 24, - -32768,-32768,-32768, 2,-32768, 393,-32768,-32768, 141,-32768, - -32768, 88,-32768, 142, 167, 287,-32768,-32768, 119,-32768, - 29,-32768,-32768,-32768, 173, 326,-32768, 125,-32768, 44, + -32768,-32768, 54, 56,-32768,-32768,-32768, 64,-32768, 35, + -32768, 46,-32768,-32768, 83, 113, 113, 401,-32768,-32768, + -32768,-32768,-32768,-32768,-32768, 140, 140, 8, 8, 8, + 140, 140,-32768,-32768, 106, 111,-32768,-32768,-32768,-32768, + -32768,-32768, 140, 104, 155, 67, 159,-32768,-32768,-32768, + 119, 4, 117,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -32768,-32768, 115,-32768, 120,-32768, 114, 108,-32768,-32768, + 122, 371,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -32768, 31, 31,-32768,-32768,-32768, 10,-32768,-32768,-32768, + 26,-32768,-32768,-32768, -10, 16,-32768,-32768,-32768, -6, + 401, 123, 167,-32768, 113,-32768, 31,-32768,-32768,-32768, + 168, 126,-32768,-32768,-32768,-32768,-32768, 124,-32768,-32768, + 104,-32768, 104,-32768, 67,-32768,-32768, 67,-32768, 140, + 155, 67, 125, 128,-32768,-32768,-32768, 169, 134,-32768, + -32768, 24, 119,-32768,-32768,-32768, 136,-32768, 137, 37, + -32768, 17,-32768,-32768,-32768, -5,-32768, 401,-32768,-32768, + 139,-32768,-32768, 119,-32768, 141, 168, 293,-32768,-32768, + 104,-32768, 67,-32768,-32768,-32768, 169, 332,-32768, 113, + -32768, 44,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 88,-32768, - -32768,-32768, 147,-32768, 248,-32768, 126, 126, 113,-32768, - 181,-32768,-32768,-32768,-32768,-32768, 148,-32768,-32768,-32768, - -32768,-32768, 146, 65,-32768, 181, 135,-32768,-32768, 199, - 200,-32768 + 119,-32768,-32768,-32768, 146,-32768, 254,-32768, 111, 111, + 96,-32768, 183,-32768,-32768, 143, 147,-32768,-32768,-32768, + 148,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 149, 31, + -32768,-32768,-32768, 183, 144,-32768,-32768, 202, 204,-32768 }; static const short yypgoto[] = { - -32768,-32768, -135, 145,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768, -12,-32768,-32768,-32768,-32768, 203,-32768, 4, - -32768,-32768,-32768,-32768, -148,-32768,-32768,-32768, 8, 98, - -32768, 99, -1,-32768, 0,-32768,-32768, 154,-32768,-32768, - -32768,-32768, 48,-32768,-32768, -123, -51, 27, -77, -72, - -83, -131, -2,-32768,-32768,-32768, 34, 114,-32768,-32768, - -107, -40, 6,-32768, -52,-32768, 41, 215,-32768,-32768, - -32768,-32768,-32768, 7 + -32768,-32768, -135, 153,-32768,-32768,-32768,-32768,-32768,-32768, + -32768,-32768, -11,-32768,-32768,-32768,-32768, 206,-32768, 6, + -32768,-32768,-32768,-32768, -94,-32768,-32768,-32768, 14, 102, + -32768, 107, -1,-32768, 0,-32768,-32768, 158,-32768,-32768, + -32768,-32768,-32768, 48,-32768,-32768, -116, -43, 29, -77, + -65, -83, -110, -2,-32768,-32768,-32768, 97, 121,-32768, + -32768, -75, -40, 9,-32768, -52,-32768, 49, 218,-32768, + -32768,-32768,-32768,-32768,-32768,-32768, 7 }; -#define YYLAST 428 +#define YYLAST 438 static const short yytable[] = { - 16, 132, 44, 45, 80, 81, 127, 127, 5, 180, - 53, 128, 128, -59, 98, 99, 6, 7, 124, 108, - 109, 6, 7, 124, 164, 53, 53, 187, 164, 188, - 82, 123, 97, 167, 65, 133, 89, 83, 66, 189, - 84, 70, 190, 168, 201, 169, 162, 161, 6, 7, - 8, 9, 10, 127, 162, 143, 163, 223, 128, 73, - 74, 53, 71, 72, 212, -172, 85, 234, 6, 7, - 8, 9, 10, 160, 105, 105, 105, 228, 208, 200, - 165, 127, 238, 127, 210, 192, 128, 229, 128, 158, - 131, 127, 137, 144, 159, 88, 128, 100, 11, 239, - -172, 12, 106, 107, 209, 78, 13, 1, 2, 3, - 127, 105, 6, 7, 124, 128, 191, 152, 11, 156, - 157, 12, 6, 7, 124, 125, 13, 246, 247, 248, - 79, 127, 87, 89, 97, 111, 128, 142, 54, 18, - 55, 56, 57, 19, 181, 138, 144, 174, 177, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 145, 146, - 148, 259, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 150, 149, 175, 178, 182, 137, 58, 186, 194, - 185, 196, 195, 240, 241, 242, 243, 199, 204, 260, - 268, 207, 206, 214, 217, 251, 264, 249, 265, 270, - 271, 92, 230, 213, 224, 225, 216, 63, 218, 153, - 154, 96, 53, 267, 235, 236, 211, 193, 147, 64, - 0, 237, 53, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 245, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 256, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 93, 0, 18, 0, - 0, 266, 19, 252, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 219, 253, 18, 0, 0, - 0, 19, 254, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 219, 220, 18, 0, 0, 0, - 19, 221, 20, 21, 22, 23, 24, 25, 26, 27, + 16, 132, 44, 45, 80, 81, 127, 127, 5, 182, + 53, 6, 7, 8, 9, 10, 143, 153, 128, 128, + 166, 166, 98, 99, 65, 53, 53, 108, 109, 6, + 7, 124, 89, 66, 6, 7, 8, 9, 10, 123, + 6, 7, 124, -59, 164, 169, 203, 163, 191, 164, + 189, 192, 190, 127, 165, 170, 144, 171, 70, 214, + -174, 53, 100, 11, 160, 128, 12, 73, 74, 161, + 97, 13, 71, 133, 105, 105, 105, 202, 167, 212, + 1, 2, 3, 127, 240, 127, 11, 194, 162, 12, + 131, 72, 137, 127, 13, 128, 231, 128, 85, 210, + 230, 241, -174, 88, 87, 128, 211, 6, 7, 124, + 125, 105, 127, 225, 78, 82, 79, 152, 53, 158, + 159, 89, 83, 236, 128, 84, 193, 54, 18, 55, + 56, 57, 19, 127, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 97, 183, 128, 265, 176, 179, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 6, 7, + 124, 248, 249, 250, 111, 106, 107, 138, 58, 144, + 142, 145, 149, 148, 146, 180, 184, 198, 137, 150, + 177, 187, 197, 188, 196, 242, 243, 244, 245, 201, + 206, 266, 209, 216, 208, 219, 253, 271, 272, 251, + 270, 276, 278, 273, 279, 232, 226, 227, 218, 92, + 63, 215, 220, 154, 53, 96, 237, 238, 155, 195, + 213, 275, 64, 0, 53, 147, 239, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 247, 0, 0, 0, + 0, 0, 0, 0, 0, 259, 260, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 93, 0, 18, 0, 0, 274, 19, 254, + 255, 256, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 17, 231, 18, 0, 0, 0, 19, - 232, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 0, 221, 0, 18, 257, 0, 0, 19, 0, 0, + 258, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 93, 0, 18, 0, 0, 0, 19, 0, 20, + 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 221, 0, 18, 222, 0, 0, 19, 0, 0, 223, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, + 0, 18, 233, 0, 0, 19, 0, 0, 234, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 93, + 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 }; @@ -519,48 +524,49 @@ static const short yytable[] = static const short yycheck[] = { 2, 84, 3, 3, 44, 45, 83, 84, 1, 144, - 3, 83, 84, 8, 65, 66, 3, 4, 5, 70, - 71, 3, 4, 5, 4, 18, 19, 158, 4, 160, - 49, 82, 3, 49, 51, 6, 8, 56, 51, 162, - 59, 51, 165, 59, 179, 61, 52, 130, 3, 4, - 5, 6, 7, 130, 52, 12, 62, 205, 130, 18, - 19, 54, 51, 8, 62, 56, 61, 215, 3, 4, - 5, 6, 7, 60, 67, 68, 69, 208, 60, 51, - 60, 158, 217, 160, 60, 168, 158, 210, 160, 52, - 83, 168, 85, 50, 57, 54, 168, 52, 53, 55, - 56, 56, 68, 69, 187, 58, 61, 45, 46, 47, - 187, 104, 3, 4, 5, 187, 167, 110, 53, 121, - 122, 56, 3, 4, 5, 6, 61, 234, 235, 236, - 58, 208, 56, 8, 3, 56, 208, 49, 9, 10, - 11, 12, 13, 14, 146, 8, 50, 140, 141, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 54, 52, - 57, 48, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 55, 62, 55, 8, 8, 169, 48, 57, 57, - 53, 8, 52, 223, 224, 225, 226, 53, 52, 8, - 55, 53, 185, 52, 52, 48, 48, 237, 52, 0, - 0, 56, 214, 195, 205, 205, 199, 4, 204, 111, - 111, 57, 205, 265, 215, 215, 189, 169, 104, 4, - -1, 215, 215, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 227, -1, -1, -1, -1, -1, - -1, -1, -1, 244, 244, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 8, -1, 10, -1, - -1, 263, 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, - -1, -1, -1, -1, -1, 8, 48, 10, -1, -1, - -1, 14, 54, 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, -1, - -1, -1, -1, -1, 8, 48, 10, -1, -1, -1, - 14, 54, 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, -1, -1, - -1, -1, -1, 8, 48, 10, -1, -1, -1, 14, - 54, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 8, -1, 10, -1, -1, -1, 14, -1, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35 + 3, 3, 4, 5, 6, 7, 12, 111, 83, 84, + 4, 4, 65, 66, 53, 18, 19, 70, 71, 3, + 4, 5, 8, 53, 3, 4, 5, 6, 7, 82, + 3, 4, 5, 8, 54, 51, 181, 130, 164, 54, + 160, 167, 162, 130, 64, 61, 52, 63, 53, 64, + 58, 54, 54, 55, 54, 130, 58, 18, 19, 59, + 3, 63, 53, 6, 67, 68, 69, 53, 62, 62, + 47, 48, 49, 160, 219, 162, 55, 170, 62, 58, + 83, 8, 85, 170, 63, 160, 212, 162, 63, 62, + 210, 57, 58, 54, 58, 170, 189, 3, 4, 5, + 6, 104, 189, 207, 60, 51, 60, 110, 111, 121, + 122, 8, 58, 217, 189, 61, 169, 9, 10, 11, + 12, 13, 14, 210, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 3, 146, 210, 50, 140, 141, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 3, 4, + 5, 236, 237, 238, 58, 68, 69, 8, 50, 52, + 51, 56, 64, 59, 54, 8, 8, 8, 171, 57, + 57, 55, 54, 59, 59, 225, 226, 227, 228, 55, + 54, 8, 55, 54, 187, 54, 50, 50, 50, 239, + 57, 57, 0, 54, 0, 216, 207, 207, 201, 56, + 4, 197, 206, 111, 207, 57, 217, 217, 111, 171, + 191, 273, 4, -1, 217, 104, 217, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 229, -1, -1, -1, + -1, -1, -1, -1, -1, 246, 246, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 8, -1, 10, -1, -1, 269, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 8, -1, 10, 50, -1, -1, 14, -1, -1, + 56, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 8, -1, 10, 50, -1, -1, 14, -1, -1, 56, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, + -1, 10, 50, -1, -1, 14, -1, -1, 56, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 8, + -1, 10, -1, -1, -1, 14, -1, -1, -1, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/share/bison/bison.simple" @@ -1270,13 +1276,13 @@ yyreduce: switch (yyn) { case 3: -#line 176 "dcParser.yxx" +#line 179 "dcParser.yxx" { parameter_description = yyvsp[0].u.field; } break; case 6: -#line 185 "dcParser.yxx" +#line 188 "dcParser.yxx" { if (!dc_file->add_class(yyvsp[0].u.dclass)) { DCClass *old_class = dc_file->get_class_by_name(yyvsp[0].u.dclass->get_name()); @@ -1289,7 +1295,7 @@ case 6: } break; case 7: -#line 196 "dcParser.yxx" +#line 199 "dcParser.yxx" { if (!dc_file->add_switch(yyvsp[0].u.dswitch)) { yyerror("Duplicate class name: " + yyvsp[0].u.dswitch->get_name()); @@ -1297,49 +1303,49 @@ case 7: } break; case 11: -#line 208 "dcParser.yxx" +#line 211 "dcParser.yxx" { yyval.str = yyvsp[-2].str + string("/") + yyvsp[0].str; } break; case 13: -#line 216 "dcParser.yxx" +#line 219 "dcParser.yxx" { yyval.str = yyvsp[-2].str + string(".") + yyvsp[0].str; } break; case 14: -#line 223 "dcParser.yxx" +#line 226 "dcParser.yxx" { dc_file->add_import_module(yyvsp[0].str); } break; case 15: -#line 227 "dcParser.yxx" +#line 230 "dcParser.yxx" { dc_file->add_import_module(yyvsp[-1].str); } break; case 18: -#line 236 "dcParser.yxx" +#line 239 "dcParser.yxx" { dc_file->add_import_symbol("*"); } break; case 19: -#line 243 "dcParser.yxx" +#line 246 "dcParser.yxx" { dc_file->add_import_symbol(yyvsp[0].str); } break; case 20: -#line 247 "dcParser.yxx" +#line 250 "dcParser.yxx" { dc_file->add_import_symbol(yyvsp[0].str); } break; case 21: -#line 254 "dcParser.yxx" +#line 257 "dcParser.yxx" { if (yyvsp[0].u.parameter != (DCParameter *)NULL) { DCTypedef *dtypedef = new DCTypedef(yyvsp[0].u.parameter); @@ -1356,21 +1362,21 @@ case 21: } break; case 24: -#line 277 "dcParser.yxx" +#line 280 "dcParser.yxx" { yyval.u.dclass = current_class; current_class = new DCClass(dc_file, yyvsp[0].str, false, false); } break; case 25: -#line 282 "dcParser.yxx" +#line 285 "dcParser.yxx" { yyval.u.dclass = current_class; current_class = yyvsp[-4].u.dclass; } break; case 26: -#line 290 "dcParser.yxx" +#line 293 "dcParser.yxx" { if (dc_file == (DCFile *)NULL) { yyerror("No DCFile available, so no class names are predefined."); @@ -1392,7 +1398,7 @@ case 26: } break; case 29: -#line 318 "dcParser.yxx" +#line 321 "dcParser.yxx" { if (yyvsp[0].u.dclass != (DCClass *)NULL) { current_class->add_parent(yyvsp[0].u.dclass); @@ -1400,7 +1406,7 @@ case 29: } break; case 30: -#line 324 "dcParser.yxx" +#line 327 "dcParser.yxx" { if (!dc_multiple_inheritance) { yyerror("Multiple inheritance is not supported without \"dc-multiple-inheritance 1\" in your Config.prc file."); @@ -1413,7 +1419,7 @@ case 30: } break; case 33: -#line 340 "dcParser.yxx" +#line 343 "dcParser.yxx" { if (yyvsp[0].u.field == (DCField *)NULL) { // Pass this error up. @@ -1425,7 +1431,7 @@ case 33: } break; case 34: -#line 353 "dcParser.yxx" +#line 356 "dcParser.yxx" { if (yyvsp[-1].u.field != (DCField *)NULL) { if (yyvsp[-1].u.field->get_name().empty()) { @@ -1437,7 +1443,7 @@ case 34: } break; case 36: -#line 364 "dcParser.yxx" +#line 367 "dcParser.yxx" { yyerror("Unnamed parameters are not allowed on a dclass"); if (yyvsp[-2].u.parameter != (DCField *)NULL) { @@ -1447,7 +1453,7 @@ case 36: } break; case 37: -#line 372 "dcParser.yxx" +#line 375 "dcParser.yxx" { if (yyvsp[-1].u.parameter != (DCField *)NULL) { yyvsp[-1].u.parameter->set_flags(yyvsp[0].u.s_int); @@ -1456,21 +1462,21 @@ case 37: } break; case 38: -#line 382 "dcParser.yxx" +#line 385 "dcParser.yxx" { yyval.u.dclass = current_class; current_class = new DCClass(dc_file, yyvsp[0].str, true, false); } break; case 39: -#line 387 "dcParser.yxx" +#line 390 "dcParser.yxx" { yyval.u.dclass = current_class; current_class = yyvsp[-4].u.dclass; } break; case 40: -#line 395 "dcParser.yxx" +#line 398 "dcParser.yxx" { if (dc_file == (DCFile *)NULL) { yyerror("No DCFile available, so no struct names are predefined."); @@ -1492,7 +1498,7 @@ case 40: } break; case 43: -#line 423 "dcParser.yxx" +#line 426 "dcParser.yxx" { if (yyvsp[0].u.dclass != (DCClass *)NULL) { current_class->add_parent(yyvsp[0].u.dclass); @@ -1500,7 +1506,7 @@ case 43: } break; case 44: -#line 429 "dcParser.yxx" +#line 432 "dcParser.yxx" { if (yyvsp[0].u.dclass != (DCClass *)NULL) { current_class->add_parent(yyvsp[0].u.dclass); @@ -1508,7 +1514,7 @@ case 44: } break; case 47: -#line 440 "dcParser.yxx" +#line 443 "dcParser.yxx" { if (yyvsp[0].u.field == (DCField *)NULL) { // Pass this error up. @@ -1518,7 +1524,7 @@ case 47: } break; case 48: -#line 451 "dcParser.yxx" +#line 454 "dcParser.yxx" { if (yyvsp[-1].u.field->get_name().empty()) { yyerror("Field name required."); @@ -1527,33 +1533,39 @@ case 48: } break; case 50: -#line 459 "dcParser.yxx" +#line 462 "dcParser.yxx" { yyval.u.field = yyvsp[-2].u.parameter; } break; case 51: -#line 463 "dcParser.yxx" +#line 466 "dcParser.yxx" { yyval.u.field = yyvsp[-1].u.parameter; } break; case 52: -#line 470 "dcParser.yxx" +#line 473 "dcParser.yxx" { yyval.u.field = current_atomic; - current_atomic = new DCAtomicField(yyvsp[-1].str, current_class); + if (current_class == (DCClass *)NULL) { + yyerror("Cannot define a method outside of a struct or class."); + DCClass *temp_class = new DCClass(dc_file, "temp", false, false); // memory leak. + current_atomic = new DCAtomicField(yyvsp[-1].str, temp_class); + } else { + current_atomic = new DCAtomicField(yyvsp[-1].str, current_class); + } } break; case 53: -#line 475 "dcParser.yxx" +#line 484 "dcParser.yxx" { yyval.u.field = current_atomic; current_atomic = yyvsp[-2].u.atomic; } break; case 58: -#line 493 "dcParser.yxx" +#line 502 "dcParser.yxx" { if (yyvsp[0].u.parameter != (DCParameter *)NULL) { current_atomic->add_element(yyvsp[0].u.parameter); @@ -1561,19 +1573,19 @@ case 58: } break; case 59: -#line 502 "dcParser.yxx" +#line 511 "dcParser.yxx" { current_parameter = yyvsp[0].u.parameter; } break; case 60: -#line 506 "dcParser.yxx" +#line 515 "dcParser.yxx" { yyval.u.parameter = yyvsp[0].u.parameter; } break; case 63: -#line 518 "dcParser.yxx" +#line 527 "dcParser.yxx" { current_packer = &default_packer; current_packer->clear_data(); @@ -1583,7 +1595,7 @@ case 63: } break; case 64: -#line 526 "dcParser.yxx" +#line 535 "dcParser.yxx" { bool is_valid = false; if (yyvsp[-3].u.parameter != (DCField *)NULL) { @@ -1603,7 +1615,7 @@ case 64: } break; case 66: -#line 548 "dcParser.yxx" +#line 557 "dcParser.yxx" { current_packer = &default_packer; current_packer->clear_data(); @@ -1613,7 +1625,7 @@ case 66: } break; case 67: -#line 556 "dcParser.yxx" +#line 565 "dcParser.yxx" { bool is_valid = false; if (yyvsp[-3].u.parameter != (DCField *)NULL) { @@ -1633,31 +1645,43 @@ case 67: } break; case 72: -#line 587 "dcParser.yxx" +#line 596 "dcParser.yxx" +{ + yyval.u.field = yyvsp[0].u.parameter; +} + break; +case 73: +#line 600 "dcParser.yxx" +{ + yyval.u.field = yyvsp[0].u.field; +} + break; +case 74: +#line 607 "dcParser.yxx" { yyval.u.field = yyvsp[-1].u.field; } break; -case 73: -#line 591 "dcParser.yxx" -{ - yyval.u.field = yyvsp[-1].u.parameter; -} - break; -case 74: -#line 595 "dcParser.yxx" -{ - yyval.u.field = yyvsp[-1].u.parameter; -} - break; case 75: -#line 602 "dcParser.yxx" +#line 611 "dcParser.yxx" +{ + yyval.u.field = yyvsp[-1].u.parameter; +} + break; +case 76: +#line 615 "dcParser.yxx" +{ + yyval.u.field = yyvsp[-1].u.parameter; +} + break; +case 77: +#line 622 "dcParser.yxx" { yyval.u.parameter = new DCSimpleParameter(yyvsp[0].u.subatomic); } break; -case 76: -#line 606 "dcParser.yxx" +case 78: +#line 626 "dcParser.yxx" { DCSimpleParameter *simple_param = yyvsp[-3].u.parameter->as_simple_parameter(); nassertr(simple_param != (DCSimpleParameter *)NULL, 0); @@ -1667,8 +1691,8 @@ case 76: yyval.u.parameter = simple_param; } break; -case 77: -#line 615 "dcParser.yxx" +case 79: +#line 635 "dcParser.yxx" { DCSimpleParameter *simple_param = yyvsp[-2].u.parameter->as_simple_parameter(); nassertr(simple_param != (DCSimpleParameter *)NULL, 0); @@ -1685,8 +1709,8 @@ case 77: yyval.u.parameter = simple_param; } break; -case 78: -#line 631 "dcParser.yxx" +case 80: +#line 651 "dcParser.yxx" { DCSimpleParameter *simple_param = yyvsp[-2].u.parameter->as_simple_parameter(); nassertr(simple_param != (DCSimpleParameter *)NULL, 0); @@ -1699,8 +1723,8 @@ case 78: yyval.u.parameter = simple_param; } break; -case 80: -#line 647 "dcParser.yxx" +case 82: +#line 667 "dcParser.yxx" { if (dc_file == (DCFile *)NULL) { yyerror("Invalid type."); @@ -1733,8 +1757,8 @@ case 80: } } break; -case 81: -#line 679 "dcParser.yxx" +case 83: +#line 699 "dcParser.yxx" { // This is an inline struct definition. if (yyvsp[0].u.dclass == (DCClass *)NULL) { @@ -1751,8 +1775,8 @@ case 81: } } break; -case 82: -#line 695 "dcParser.yxx" +case 84: +#line 715 "dcParser.yxx" { // This is an inline switch definition. if (yyvsp[0].u.dswitch == (DCSwitch *)NULL) { @@ -1769,59 +1793,59 @@ case 82: } } break; -case 83: -#line 714 "dcParser.yxx" -{ - double_range.clear(); -} - break; -case 84: -#line 718 "dcParser.yxx" -{ - double_range.clear(); - if (!double_range.add_range(yyvsp[0].u.real, yyvsp[0].u.real)) { - yyerror("Overlapping range"); - } -} - break; case 85: -#line 725 "dcParser.yxx" +#line 734 "dcParser.yxx" { double_range.clear(); - if (!double_range.add_range(yyvsp[-2].u.real, yyvsp[0].u.real)) { - yyerror("Overlapping range"); - } } break; case 86: -#line 732 "dcParser.yxx" +#line 738 "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 87: -#line 741 "dcParser.yxx" +#line 745 "dcParser.yxx" +{ + double_range.clear(); + if (!double_range.add_range(yyvsp[-2].u.real, yyvsp[0].u.real)) { + yyerror("Overlapping range"); + } +} + break; +case 88: +#line 752 "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 89: +#line 761 "dcParser.yxx" { if (!double_range.add_range(yyvsp[0].u.real, yyvsp[0].u.real)) { yyerror("Overlapping range"); } } break; -case 88: -#line 747 "dcParser.yxx" +case 90: +#line 767 "dcParser.yxx" { if (!double_range.add_range(yyvsp[-2].u.real, yyvsp[0].u.real)) { yyerror("Overlapping range"); } } break; -case 89: -#line 753 "dcParser.yxx" +case 91: +#line 773 "dcParser.yxx" { if (yyvsp[0].u.real >= 0) { yyerror("Syntax error"); @@ -1830,65 +1854,65 @@ case 89: } } break; -case 90: -#line 764 "dcParser.yxx" -{ - uint_range.clear(); -} - break; -case 91: -#line 768 "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 92: -#line 775 "dcParser.yxx" +#line 784 "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 93: -#line 782 "dcParser.yxx" +#line 788 "dcParser.yxx" { uint_range.clear(); - if (!uint_range.add_range(yyvsp[-1].u.s_uint, yyvsp[0].u.s_uint)) { + if (!uint_range.add_range(yyvsp[0].u.s_uint, yyvsp[0].u.s_uint)) { yyerror("Overlapping range"); } } break; case 94: -#line 789 "dcParser.yxx" +#line 795 "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 95: +#line 802 "dcParser.yxx" +{ + uint_range.clear(); + if (!uint_range.add_range(yyvsp[-1].u.s_uint, yyvsp[0].u.s_uint)) { + yyerror("Overlapping range"); + } +} + break; +case 96: +#line 809 "dcParser.yxx" { if (!uint_range.add_range(yyvsp[0].u.s_uint, yyvsp[0].u.s_uint)) { yyerror("Overlapping range"); } } break; -case 95: -#line 795 "dcParser.yxx" +case 97: +#line 815 "dcParser.yxx" { if (!uint_range.add_range(yyvsp[-2].u.s_uint, yyvsp[0].u.s_uint)) { yyerror("Overlapping range"); } } break; -case 96: -#line 801 "dcParser.yxx" +case 98: +#line 821 "dcParser.yxx" { if (!uint_range.add_range(yyvsp[-1].u.s_uint, yyvsp[0].u.s_uint)) { yyerror("Overlapping range"); } } break; -case 98: -#line 811 "dcParser.yxx" +case 100: +#line 831 "dcParser.yxx" { if (yyvsp[-3].u.parameter == (DCParameter *)NULL) { yyval.u.parameter = NULL; @@ -1897,15 +1921,15 @@ case 98: } } break; -case 99: -#line 822 "dcParser.yxx" +case 101: +#line 842 "dcParser.yxx" { current_parameter->set_name(yyvsp[0].str); yyval.u.parameter = current_parameter; } break; -case 100: -#line 827 "dcParser.yxx" +case 102: +#line 847 "dcParser.yxx" { DCSimpleParameter *simple_param = yyvsp[-2].u.parameter->as_simple_parameter(); if (simple_param == NULL || simple_param->get_typedef() != (DCTypedef *)NULL) { @@ -1921,8 +1945,8 @@ case 100: } } break; -case 101: -#line 842 "dcParser.yxx" +case 103: +#line 862 "dcParser.yxx" { DCSimpleParameter *simple_param = yyvsp[-2].u.parameter->as_simple_parameter(); if (simple_param == NULL || simple_param->get_typedef() != (DCTypedef *)NULL) { @@ -1938,14 +1962,14 @@ case 101: } } break; -case 102: -#line 857 "dcParser.yxx" +case 104: +#line 877 "dcParser.yxx" { yyval.u.parameter = yyvsp[-3].u.parameter->append_array_specification(uint_range); } break; -case 103: -#line 864 "dcParser.yxx" +case 105: +#line 884 "dcParser.yxx" { if (yyvsp[0].str.length() != 1) { yyerror("Single character required."); @@ -1955,8 +1979,8 @@ case 103: } } break; -case 105: -#line 877 "dcParser.yxx" +case 107: +#line 897 "dcParser.yxx" { yyval.u.s_uint = (unsigned int)yyvsp[0].u.uint64; if (yyval.u.s_uint != yyvsp[0].u.uint64) { @@ -1965,8 +1989,8 @@ case 105: } } break; -case 106: -#line 888 "dcParser.yxx" +case 108: +#line 908 "dcParser.yxx" { yyval.u.s_uint = (unsigned int)-yyvsp[0].u.int64; if (yyvsp[0].u.int64 >= 0) { @@ -1978,20 +2002,20 @@ case 106: } } break; -case 109: -#line 910 "dcParser.yxx" +case 111: +#line 930 "dcParser.yxx" { yyval.u.real = (double)yyvsp[0].u.uint64; } break; -case 110: -#line 914 "dcParser.yxx" +case 112: +#line 934 "dcParser.yxx" { yyval.u.real = (double)yyvsp[0].u.int64; } break; -case 112: -#line 922 "dcParser.yxx" +case 114: +#line 942 "dcParser.yxx" { if (yyvsp[0].str.length() != 1) { yyerror("Single character required."); @@ -2001,286 +2025,286 @@ case 112: } } break; -case 114: -#line 936 "dcParser.yxx" +case 116: +#line 956 "dcParser.yxx" { current_packer->pack_int64(yyvsp[0].u.int64); } break; -case 115: -#line 940 "dcParser.yxx" +case 117: +#line 960 "dcParser.yxx" { current_packer->pack_uint64(yyvsp[0].u.uint64); } break; -case 116: -#line 944 "dcParser.yxx" +case 118: +#line 964 "dcParser.yxx" { current_packer->pack_double(yyvsp[0].u.real); } break; -case 117: -#line 948 "dcParser.yxx" +case 119: +#line 968 "dcParser.yxx" { current_packer->pack_string(yyvsp[0].str); } break; -case 118: -#line 952 "dcParser.yxx" +case 120: +#line 972 "dcParser.yxx" { current_packer->pack_literal_value(yyvsp[0].str); } break; -case 119: -#line 956 "dcParser.yxx" -{ - current_packer->push(); -} - break; -case 120: -#line 960 "dcParser.yxx" -{ - current_packer->pop(); -} - break; case 121: -#line 964 "dcParser.yxx" +#line 976 "dcParser.yxx" { current_packer->push(); } break; case 122: -#line 968 "dcParser.yxx" +#line 980 "dcParser.yxx" { current_packer->pop(); } break; case 123: -#line 972 "dcParser.yxx" +#line 984 "dcParser.yxx" { current_packer->push(); } break; case 124: -#line 976 "dcParser.yxx" +#line 988 "dcParser.yxx" { current_packer->pop(); } break; case 125: -#line 980 "dcParser.yxx" +#line 992 "dcParser.yxx" +{ + current_packer->push(); +} + break; +case 126: +#line 996 "dcParser.yxx" +{ + current_packer->pop(); +} + break; +case 127: +#line 1000 "dcParser.yxx" { for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) { current_packer->pack_int64(yyvsp[-2].u.int64); } } break; -case 126: -#line 986 "dcParser.yxx" +case 128: +#line 1006 "dcParser.yxx" { for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) { current_packer->pack_uint64(yyvsp[-2].u.uint64); } } break; -case 127: -#line 992 "dcParser.yxx" +case 129: +#line 1012 "dcParser.yxx" { for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) { current_packer->pack_double(yyvsp[-2].u.real); } } break; -case 128: -#line 998 "dcParser.yxx" +case 130: +#line 1018 "dcParser.yxx" { for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) { current_packer->pack_literal_value(yyvsp[-2].str); } } break; -case 135: -#line 1022 "dcParser.yxx" +case 137: +#line 1042 "dcParser.yxx" { yyval.u.subatomic = ST_int8; } break; -case 136: -#line 1026 "dcParser.yxx" +case 138: +#line 1046 "dcParser.yxx" { yyval.u.subatomic = ST_int16; } break; -case 137: -#line 1030 "dcParser.yxx" +case 139: +#line 1050 "dcParser.yxx" { yyval.u.subatomic = ST_int32; } break; -case 138: -#line 1034 "dcParser.yxx" +case 140: +#line 1054 "dcParser.yxx" { yyval.u.subatomic = ST_int64; } break; -case 139: -#line 1038 "dcParser.yxx" +case 141: +#line 1058 "dcParser.yxx" { yyval.u.subatomic = ST_uint8; } break; -case 140: -#line 1042 "dcParser.yxx" +case 142: +#line 1062 "dcParser.yxx" { yyval.u.subatomic = ST_uint16; } break; -case 141: -#line 1046 "dcParser.yxx" +case 143: +#line 1066 "dcParser.yxx" { yyval.u.subatomic = ST_uint32; } break; -case 142: -#line 1050 "dcParser.yxx" +case 144: +#line 1070 "dcParser.yxx" { yyval.u.subatomic = ST_uint64; } break; -case 143: -#line 1054 "dcParser.yxx" +case 145: +#line 1074 "dcParser.yxx" { yyval.u.subatomic = ST_float64; } break; -case 144: -#line 1058 "dcParser.yxx" +case 146: +#line 1078 "dcParser.yxx" { yyval.u.subatomic = ST_string; } break; -case 145: -#line 1062 "dcParser.yxx" +case 147: +#line 1082 "dcParser.yxx" { yyval.u.subatomic = ST_blob; } break; -case 146: -#line 1066 "dcParser.yxx" +case 148: +#line 1086 "dcParser.yxx" { yyval.u.subatomic = ST_blob32; } break; -case 147: -#line 1070 "dcParser.yxx" +case 149: +#line 1090 "dcParser.yxx" { yyval.u.subatomic = ST_int8array; } break; -case 148: -#line 1074 "dcParser.yxx" +case 150: +#line 1094 "dcParser.yxx" { yyval.u.subatomic = ST_int16array; } break; -case 149: -#line 1078 "dcParser.yxx" +case 151: +#line 1098 "dcParser.yxx" { yyval.u.subatomic = ST_int32array; } break; -case 150: -#line 1082 "dcParser.yxx" +case 152: +#line 1102 "dcParser.yxx" { yyval.u.subatomic = ST_uint8array; } break; -case 151: -#line 1086 "dcParser.yxx" +case 153: +#line 1106 "dcParser.yxx" { yyval.u.subatomic = ST_uint16array; } break; -case 152: -#line 1090 "dcParser.yxx" +case 154: +#line 1110 "dcParser.yxx" { yyval.u.subatomic = ST_uint32array; } break; -case 153: -#line 1094 "dcParser.yxx" +case 155: +#line 1114 "dcParser.yxx" { yyval.u.subatomic = ST_uint32uint8array; } break; -case 154: -#line 1098 "dcParser.yxx" +case 156: +#line 1118 "dcParser.yxx" { yyval.u.subatomic = ST_char; } break; -case 155: -#line 1105 "dcParser.yxx" +case 157: +#line 1125 "dcParser.yxx" { yyval.u.s_int = 0; } break; -case 156: -#line 1109 "dcParser.yxx" +case 158: +#line 1129 "dcParser.yxx" { yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_required; } break; -case 157: -#line 1113 "dcParser.yxx" +case 159: +#line 1133 "dcParser.yxx" { yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_broadcast; } break; -case 158: -#line 1117 "dcParser.yxx" +case 160: +#line 1137 "dcParser.yxx" { yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_p2p; } break; -case 159: -#line 1121 "dcParser.yxx" +case 161: +#line 1141 "dcParser.yxx" { yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_ram; } break; -case 160: -#line 1125 "dcParser.yxx" +case 162: +#line 1145 "dcParser.yxx" { yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_db; } break; -case 161: -#line 1129 "dcParser.yxx" +case 163: +#line 1149 "dcParser.yxx" { yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_clsend; } break; -case 162: -#line 1133 "dcParser.yxx" +case 164: +#line 1153 "dcParser.yxx" { yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_clrecv; } break; -case 163: -#line 1137 "dcParser.yxx" +case 165: +#line 1157 "dcParser.yxx" { yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_ownsend; } break; -case 164: -#line 1141 "dcParser.yxx" +case 166: +#line 1161 "dcParser.yxx" { yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_airecv; } break; -case 165: -#line 1148 "dcParser.yxx" +case 167: +#line 1168 "dcParser.yxx" { if (yyvsp[0].u.s_int != 0) { yyerror("Server flags are not allowed here."); @@ -2288,20 +2312,20 @@ case 165: yyval.u.s_int = yyvsp[0].u.s_int; } break; -case 166: -#line 1158 "dcParser.yxx" +case 168: +#line 1178 "dcParser.yxx" { current_molecular = new DCMolecularField(yyvsp[-1].str, current_class); } break; -case 167: -#line 1162 "dcParser.yxx" +case 169: +#line 1182 "dcParser.yxx" { yyval.u.field = current_molecular; } break; -case 168: -#line 1169 "dcParser.yxx" +case 170: +#line 1189 "dcParser.yxx" { DCField *field = current_class->get_field_by_name(yyvsp[0].str); yyval.u.atomic = (DCAtomicField *)NULL; @@ -2315,16 +2339,16 @@ case 168: } } break; -case 169: -#line 1185 "dcParser.yxx" +case 171: +#line 1205 "dcParser.yxx" { if (yyvsp[0].u.atomic != (DCAtomicField *)NULL) { current_molecular->add_atomic(yyvsp[0].u.atomic); } } break; -case 170: -#line 1191 "dcParser.yxx" +case 172: +#line 1211 "dcParser.yxx" { if (yyvsp[0].u.atomic != (DCAtomicField *)NULL) { current_molecular->add_atomic(yyvsp[0].u.atomic); @@ -2336,30 +2360,30 @@ case 170: } } break; -case 171: -#line 1205 "dcParser.yxx" +case 173: +#line 1225 "dcParser.yxx" { yyval.str = ""; } break; -case 173: -#line 1213 "dcParser.yxx" +case 175: +#line 1233 "dcParser.yxx" { yyval.u.dswitch = current_switch; - current_switch = new DCSwitch(yyvsp[-4].str, yyvsp[-2].u.parameter); + current_switch = new DCSwitch(yyvsp[-4].str, yyvsp[-2].u.field); } break; -case 174: -#line 1218 "dcParser.yxx" +case 176: +#line 1238 "dcParser.yxx" { yyval.u.dswitch = current_switch; current_switch = (DCSwitch *)yyvsp[-2].u.parameter; } break; -case 178: -#line 1230 "dcParser.yxx" +case 182: +#line 1252 "dcParser.yxx" { - if (current_switch->get_num_cases() == 0) { + if (!current_switch->is_field_valid()) { yyerror("case declaration required before first element"); } else if (yyvsp[0].u.field != (DCField *)NULL) { if (!current_switch->add_field(yyvsp[0].u.field)) { @@ -2368,32 +2392,50 @@ case 178: } } break; -case 179: -#line 1243 "dcParser.yxx" +case 183: +#line 1265 "dcParser.yxx" { current_packer = &default_packer; current_packer->clear_data(); current_packer->begin_pack(current_switch->get_key_parameter()); } break; -case 180: -#line 1249 "dcParser.yxx" +case 184: +#line 1271 "dcParser.yxx" { if (!current_packer->end_pack()) { yyerror("Invalid value for switch parameter"); + current_switch->add_invalid_case(); } else { - current_switch->add_case(current_packer->get_string()); + int case_index = current_switch->add_case(current_packer->get_string()); + if (case_index == -1) { + yyerror("Duplicate case value"); + } } } break; -case 181: -#line 1260 "dcParser.yxx" +case 185: +#line 1286 "dcParser.yxx" +{ + if (!current_switch->add_default()) { + yyerror("Default case already defined"); + } +} + break; +case 186: +#line 1295 "dcParser.yxx" +{ + current_switch->add_break(); +} + break; +case 187: +#line 1302 "dcParser.yxx" { yyval.u.field = yyvsp[-1].u.parameter; } break; -case 182: -#line 1264 "dcParser.yxx" +case 188: +#line 1306 "dcParser.yxx" { yyval.u.field = yyvsp[0].u.parameter; } @@ -2631,4 +2673,4 @@ yyreturn: #endif return yyresult; } -#line 1272 "dcParser.yxx" +#line 1314 "dcParser.yxx" diff --git a/direct/src/dcparser/dcParser.h.prebuilt b/direct/src/dcparser/dcParser.h.prebuilt index ba4f214af3..0362b3d840 100644 --- a/direct/src/dcparser/dcParser.h.prebuilt +++ b/direct/src/dcparser/dcParser.h.prebuilt @@ -14,38 +14,40 @@ # 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_CHAR 289 -# define KW_REQUIRED 290 -# define KW_BROADCAST 291 -# define KW_P2P 292 -# define KW_RAM 293 -# define KW_DB 294 -# define KW_CLSEND 295 -# define KW_CLRECV 296 -# define KW_OWNSEND 297 -# define KW_AIRECV 298 -# define START_DC 299 -# define START_PARAMETER_VALUE 300 -# define START_PARAMETER_DESCRIPTION 301 +# define KW_DEFAULT 270 +# define KW_BREAK 271 +# define KW_INT8 272 +# define KW_INT16 273 +# define KW_INT32 274 +# define KW_INT64 275 +# define KW_UINT8 276 +# define KW_UINT16 277 +# define KW_UINT32 278 +# define KW_UINT64 279 +# define KW_FLOAT64 280 +# define KW_STRING 281 +# define KW_BLOB 282 +# define KW_BLOB32 283 +# define KW_INT8ARRAY 284 +# define KW_INT16ARRAY 285 +# define KW_INT32ARRAY 286 +# define KW_UINT8ARRAY 287 +# define KW_UINT16ARRAY 288 +# define KW_UINT32ARRAY 289 +# define KW_UINT32UINT8ARRAY 290 +# define KW_CHAR 291 +# define KW_REQUIRED 292 +# define KW_BROADCAST 293 +# define KW_P2P 294 +# define KW_RAM 295 +# define KW_DB 296 +# define KW_CLSEND 297 +# define KW_CLRECV 298 +# define KW_OWNSEND 299 +# define KW_AIRECV 300 +# define START_DC 301 +# define START_PARAMETER_VALUE 302 +# define START_PARAMETER_DESCRIPTION 303 extern YYSTYPE dcyylval;