diff options
Diffstat (limited to 'test/rlhc.d/case/mailbox3.cpp-C-F0--var-backend.exp')
-rw-r--r-- | test/rlhc.d/case/mailbox3.cpp-C-F0--var-backend.exp | 296 |
1 files changed, 296 insertions, 0 deletions
diff --git a/test/rlhc.d/case/mailbox3.cpp-C-F0--var-backend.exp b/test/rlhc.d/case/mailbox3.cpp-C-F0--var-backend.exp new file mode 100644 index 00000000..a93e0db9 --- /dev/null +++ b/test/rlhc.d/case/mailbox3.cpp-C-F0--var-backend.exp @@ -0,0 +1,296 @@ +#include <iostream> +#include <string.h> + +using std::cin; +using std::cout; +using std::cerr; +using std::endl; + + + +static const char _mailbox_actions [] = { 0, 1, 0, 1, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 11, 1, 12, 1, 14, 2, 1, 0, 2, 2, 6, 2, 2, 11, 2, 3, 6, 2, 3, 11, 2, 4, 6, 2, 4, 11, 2, 5, 6, 2, 5, 11, 2, 8, 14, 2, 9, 14, 2, 13, 14, 3, 6, 13, 14, 3, 7, 13, 14, 3, 10, 5, 14, 0 , }; +static const char _mailbox_trans_keys [] = { 1, 0, 27, 27, 26, 26, 25, 25, 3, 3, 1, 3, 1, 19, 1, 29, 1, 29, 1, 3, 1, 19, 1, 29, 1, 29, 1, 3, 1, 19, 1, 19, 1, 3, 1, 19, 1, 11, 1, 12, 1, 11, 1, 11, 1, 12, 1, 19, 1, 11, 1, 11, 1, 11, 1, 11, 1, 3, 1, 19, 1, 11, 1, 11, 1, 11, 1, 3, 1, 29, 1, 1, 1, 27, 1, 26, 1, 25, 1, 3, 1, 3, 1, 19, 1, 29, 1, 29, 1, 3, 1, 19, 1, 29, 1, 29, 1, 3, 1, 19, 1, 19, 1, 3, 1, 19, 1, 11, 1, 12, 1, 11, 1, 11, 1, 12, 1, 19, 1, 11, 1, 11, 1, 11, 1, 11, 1, 3, 1, 19, 1, 11, 1, 11, 1, 11, 1, 3, 1, 11, 1, 11, 1, 11, 1, 3, 1, 19, 1, 11, 1, 29, 1, 19, 1, 11, 1, 11, 1, 11, 1, 3, 1, 19, 1, 11, 1, 29, 1, 19, 1, 29, 1, 19, 1, 29, 1, 19, 1, 11, 1, 11, 1, 3, 1, 11, 1, 11, 1, 3, 1, 11, 1, 11, 4, 29, 1, 1, 1, 29, 4, 29, 4, 29, 4, 29, 4, 29, 0, 15, 0, 15, 0, 15, 1, 29, 4, 29, 4, 29, 4, 29, 4, 29, 4, 29, 4, 29, 4, 29, 1, 3, 1, 1, 0, 29, 0, 3, 4, 29, 4, 29, 0, 29, 5, 5, 0, 15, 6, 6, 8, 8, 14, 14, 0, 15, 0, 15, 0, 15, 0, 29, 17, 17, 1, 17, 0 , }; +static const char _mailbox_char_class [] = { 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 5, 4, 4, 4, 4, 6, 7, 8, 4, 9, 10, 9, 4, 4, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 4, 13, 4, 14, 4, 15, 16, 16, 16, 16, 16, 17, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 18, 19, 16, 16, 16, 16, 16, 16, 4, 4, 4, 4, 4, 4, 20, 21, 22, 20, 23, 20, 20, 20, 20, 24, 20, 20, 25, 20, 26, 20, 20, 27, 20, 28, 29, 20, 20, 20, 20, 20, 4, 4, 4, 4, 0 , }; +static const short _mailbox_index_offsets [] = { 0, 0, 1, 2, 3, 4, 7, 26, 55, 84, 87, 106, 135, 164, 167, 186, 205, 208, 227, 238, 250, 261, 272, 284, 303, 314, 325, 336, 347, 350, 369, 380, 391, 402, 405, 434, 435, 462, 488, 513, 516, 519, 538, 567, 596, 599, 618, 647, 676, 679, 698, 717, 720, 739, 750, 762, 773, 784, 796, 815, 826, 837, 848, 859, 862, 881, 892, 903, 914, 917, 928, 939, 950, 953, 972, 983, 1012, 1031, 1042, 1053, 1064, 1067, 1086, 1097, 1126, 1145, 1174, 1193, 1222, 1241, 1252, 1263, 1266, 1277, 1288, 1291, 1302, 1313, 1339, 1340, 1369, 1395, 1421, 1447, 1473, 1489, 1505, 1521, 1550, 1576, 1602, 1628, 1654, 1680, 1706, 1732, 1735, 1736, 1766, 1770, 1796, 1822, 1852, 1853, 1869, 1870, 1871, 1872, 1888, 1904, 1920, 1950, 1951, 0 , }; +static const short _mailbox_indicies [] = { 0, 2, 3, 4, 1, 4, 5, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 4, 9, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 10, 10, 10, 10, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 4, 13, 1, 4, 14, 4, 4, 4, 4, 4, 4, 4, 15, 4, 4, 4, 4, 10, 10, 10, 10, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 16, 4, 4, 4, 4, 6, 6, 6, 6, 1, 4, 17, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 18, 4, 4, 4, 4, 6, 6, 6, 6, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 19, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 20, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 21, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 22, 1, 4, 23, 4, 4, 4, 4, 4, 4, 4, 4, 24, 1, 4, 5, 4, 4, 4, 4, 4, 25, 4, 26, 4, 4, 4, 4, 27, 27, 27, 27, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 28, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 29, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 30, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 31, 1, 4, 32, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 33, 4, 4, 4, 4, 6, 6, 6, 6, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 34, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 35, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 36, 37, 4, 5, 38, 1, 1, 39, 39, 39, 39, 39, 39, 39, 39, 1, 39, 39, 39, 39, 40, 41, 42, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 44, 44, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 45, 44, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 46, 44, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 47, 44, 43, 48, 44, 48, 49, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 50, 50, 50, 50, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 44, 48, 53, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 54, 54, 54, 54, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 44, 48, 57, 44, 48, 58, 48, 48, 48, 48, 48, 48, 48, 59, 48, 48, 48, 48, 54, 54, 54, 54, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 60, 48, 48, 48, 48, 50, 50, 50, 50, 44, 48, 61, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 62, 48, 48, 48, 48, 50, 50, 50, 50, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 63, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 48, 64, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 65, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 66, 44, 48, 67, 48, 48, 48, 48, 48, 48, 48, 48, 68, 44, 48, 49, 48, 48, 48, 48, 48, 69, 48, 70, 48, 48, 48, 48, 71, 71, 71, 71, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 72, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 73, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 74, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 75, 44, 48, 76, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 77, 48, 48, 48, 48, 50, 50, 50, 50, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 78, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 79, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 80, 37, 48, 49, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 81, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 82, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 83, 37, 4, 84, 1, 4, 5, 4, 4, 4, 4, 4, 85, 4, 4, 4, 4, 4, 4, 86, 86, 86, 86, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 33, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 87, 87, 87, 87, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 36, 36, 36, 36, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 88, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 89, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 90, 37, 48, 91, 44, 48, 49, 48, 48, 48, 48, 48, 92, 48, 48, 48, 48, 48, 48, 93, 93, 93, 93, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 77, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 94, 94, 94, 94, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 80, 80, 80, 80, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 95, 95, 95, 95, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 31, 31, 31, 31, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 96, 96, 96, 96, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 75, 75, 75, 75, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 97, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 98, 1, 4, 23, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 99, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 100, 44, 48, 67, 1, 4, 5, 4, 4, 4, 4, 4, 4, 4, 16, 44, 48, 49, 48, 48, 48, 48, 48, 48, 48, 60, 101, 101, 101, 101, 101, 101, 101, 101, 102, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 104, 105, 1, 1, 101, 101, 101, 101, 101, 101, 101, 101, 1, 101, 101, 101, 101, 106, 107, 108, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 102, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 109, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 102, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 110, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 102, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 111, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 112, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 114, 115, 113, 114, 113, 116, 117, 118, 1, 113, 119, 113, 113, 120, 1, 1, 122, 123, 121, 122, 121, 124, 125, 126, 1, 121, 127, 121, 121, 128, 1, 129, 131, 132, 130, 131, 130, 133, 134, 135, 1, 130, 136, 130, 130, 137, 1, 1, 138, 1, 1, 139, 139, 139, 139, 139, 139, 139, 139, 1, 139, 139, 139, 139, 140, 141, 142, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 101, 101, 101, 101, 101, 101, 101, 101, 102, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 143, 101, 101, 101, 101, 101, 101, 101, 101, 102, 101, 101, 101, 101, 101, 101, 101, 101, 144, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 102, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 145, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 102, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 146, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 102, 101, 101, 101, 101, 101, 101, 101, 101, 101, 147, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 102, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 148, 101, 101, 101, 101, 101, 101, 101, 101, 101, 149, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 151, 150, 152, 151, 153, 138, 1, 153, 139, 139, 139, 139, 139, 139, 139, 139, 1, 139, 139, 139, 139, 140, 141, 142, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 153, 155, 154, 153, 101, 101, 101, 101, 101, 101, 101, 101, 102, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 156, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 157, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 131, 138, 1, 131, 139, 139, 139, 139, 139, 139, 139, 139, 1, 139, 139, 139, 139, 140, 141, 142, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 159, 122, 123, 160, 122, 160, 124, 125, 126, 1, 160, 127, 160, 160, 128, 1, 1, 159, 131, 163, 165, 166, 164, 165, 164, 167, 168, 169, 1, 164, 170, 164, 164, 171, 1, 1, 1, 1, 172, 1, 172, 1, 1, 1, 1, 172, 1, 172, 172, 1, 1, 1, 173, 174, 172, 173, 172, 175, 176, 177, 1, 172, 178, 172, 172, 179, 1, 1, 103, 105, 1, 103, 101, 101, 101, 101, 101, 101, 101, 101, 1, 101, 101, 101, 101, 106, 107, 108, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 180, 44, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 181, 0 , }; +static const short _mailbox_index_defaults [] = { 0, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 43, 43, 43, 43, 43, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 4, 4, 4, 4, 4, 4, 4, 4, 48, 48, 48, 48, 48, 48, 48, 48, 4, 4, 48, 48, 4, 4, 4, 48, 48, 48, 4, 48, 1, 103, 1, 1, 1, 1, 1, 113, 121, 130, 1, 1, 1, 1, 1, 1, 1, 1, 150, 150, 1, 154, 1, 1, 1, 158, 160, 161, 135, 162, 164, 172, 172, 1, 1, 43, 0 , }; +static const char _mailbox_trans_cond_spaces [] = { -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, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, -1, 0, 0, -1, -1, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0 , }; +static const short _mailbox_trans_offsets [] = { 0, 1, 2, 3, 4, 5, 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, 45, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 119, 120, 121, 122, 123, 124, 125, 127, 129, 131, 133, 135, 137, 139, 140, 142, 143, 144, 146, 148, 149, 150, 152, 154, 155, 156, 157, 158, 159, 160, 161, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 226, 228, 230, 232, 234, 236, 237, 238, 240, 242, 244, 246, 248, 250, 252, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, 276, 278, 280, 282, 283, 0 , }; +static const short _mailbox_cond_targs [] = { 2, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 95, 16, 17, 18, 19, 20, 21, 22, 23, 89, 24, 69, 85, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 132, 97, 100, 108, 119, 0, 35, 132, 2, 37, 3, 38, 4, 39, 5, 40, 6, 41, 7, 42, 8, 43, 9, 44, 10, 45, 11, 46, 12, 47, 13, 48, 14, 49, 15, 50, 95, 96, 16, 51, 17, 52, 18, 53, 19, 54, 20, 55, 21, 56, 22, 57, 23, 58, 89, 92, 24, 59, 69, 77, 85, 87, 25, 60, 26, 61, 27, 62, 28, 63, 29, 64, 30, 65, 31, 66, 32, 67, 33, 68, 70, 71, 72, 73, 74, 75, 76, 70, 78, 71, 79, 72, 80, 73, 81, 74, 82, 75, 83, 76, 84, 86, 86, 88, 90, 91, 90, 93, 91, 94, 97, 98, 0, 98, 99, 130, 132, 100, 108, 119, 101, 102, 103, 104, 0, 105, 0, 106, 107, 121, 0, 122, 0, 124, 0, 125, 0, 104, 0, 126, 0, 105, 0, 106, 107, 121, 0, 122, 0, 124, 0, 125, 0, 104, 0, 126, 0, 128, 0, 105, 0, 106, 107, 121, 0, 122, 0, 124, 0, 125, 0, 104, 0, 126, 132, 97, 100, 108, 119, 109, 110, 111, 112, 113, 114, 115, 0, 116, 107, 117, 0, 115, 0, 118, 0, 116, 107, 117, 120, 104, 0, 122, 0, 123, 0, 105, 0, 124, 0, 126, 0, 127, 0, 105, 0, 106, 107, 121, 0, 122, 0, 124, 0, 125, 0, 104, 0, 126, 0, 129, 0, 106, 107, 121, 0, 122, 0, 124, 0, 125, 0, 104, 0, 126, 1, 1, 36, 0 , }; +static const char _mailbox_cond_actions [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 63, 15, 15, 15, 15, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 50, 0, 47, 0, 11, 11, 11, 0, 47, 0, 47, 0, 11, 0, 44, 0, 47, 0, 0, 0, 5, 5, 5, 0, 29, 0, 29, 0, 5, 0, 26, 0, 29, 0, 0, 0, 17, 0, 0, 0, 0, 0, 17, 0, 17, 0, 0, 0, 13, 0, 17, 59, 13, 13, 13, 13, 0, 0, 0, 0, 0, 0, 67, 0, 1, 0, 0, 0, 0, 0, 0, 0, 23, 3, 3, 0, 53, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 35, 0, 7, 7, 7, 0, 35, 0, 35, 0, 7, 0, 32, 0, 35, 0, 0, 0, 9, 9, 9, 0, 41, 0, 41, 0, 9, 0, 38, 0, 41, 0, 0, 0, 0 , }; +static const char _mailbox_nfa_targs [] = { 0, 0 , }; +static const char _mailbox_nfa_offsets [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , }; +static const char _mailbox_nfa_push_actions [] = { 0, 0 , }; +static const char _mailbox_nfa_pop_trans [] = { 0, 0 , }; +static const int mailbox_start = 131; +static const int mailbox_first_final = 131; +static const int mailbox_error = 0; +static const int mailbox_en_main = 131; +#define BUFSIZE 8192 + +void test( const char *buf ) +{ + int cs, len = strlen( buf ); + const char /**preserve = 0,*/ *ws = 0; + int hlen = 0; + + + { + cs = ( int ) mailbox_start; + } + const char *p = buf; + const char *pe = p + len; + + { + unsigned int _trans = 0; + unsigned int _have = 0; + unsigned int _cont = 1; + unsigned int _cond = 0; + const char *_acts; + unsigned int _nacts; + const char *_keys; + const short *_inds; + int _cpc; + while ( _cont == 1 ) + { + + if ( cs == 0 ) + _cont = 0; + + _have = 0; + if ( p == pe ) + { + if ( _have == 0 ) + _cont = 0; + + } + + if ( _cont == 1 ) + { + if ( _have == 0 ) + { + _keys = _mailbox_trans_keys + (cs<<1); + _inds = _mailbox_indicies + _mailbox_index_offsets[cs]; + if ( ((*( p )) + )<= 126 && ((*( p )) + )>= 9 ) + { + int _ic = ( int ) _mailbox_char_class[( int ) ((*( p )) + )- 9]; + if ( _ic <= ( int ) (*( _keys+1 )) + && _ic >= ( int ) (*( _keys )) + ) + _trans = ( unsigned int ) (*( _inds + ( int ) (_ic - ( int ) (*( _keys )) + ) )) + ; + + else + _trans = ( unsigned int ) _mailbox_index_defaults[cs]; + + } + + else + { + _trans = ( unsigned int ) _mailbox_index_defaults[cs]; + } + + + _cond = ( unsigned int ) _mailbox_trans_offsets[_trans]; + _cpc = 0; + switch ( _mailbox_trans_cond_spaces[_trans] ) { + case 0 : + if ( (hlen++ < 50) ) + _cpc += 1; + + + break; + + } + _cond += ( unsigned int ) _cpc; + } + + if ( _cont == 1 ) + { + cs = ( int ) _mailbox_cond_targs[_cond]; + if ( _mailbox_cond_actions[_cond]!= 0 ) + { + _acts = _mailbox_actions + _mailbox_cond_actions[_cond]; + _nacts = ( unsigned int ) (*( _acts )) + ; + _acts += 1; + while ( _nacts > 0 ) + { + switch ( (*( _acts )) + ) { + case 0 : + { + cout << *p; + } + + break; + case 1 : + { + cout << ' '; + } + + break; + case 2 : + { + cout.write(ws, p-ws); cout << ' '; + } + + break; + case 3 : + { + cout << "| "; cout.write(ws+1, p-ws-2); + } + + break; + case 4 : + { + cout << "| "; cout.write(ws, p-ws); + } + + break; + case 5 : + { + cout << '\t'; + } + + break; + case 6 : + { + cout << '\n'; + } + + break; + case 7 : + { + cout << "------\n"; + } + + break; + case 8 : + { + cout << "FROM\n"; + } + + break; + case 9 : + { + cout << "TO\n"; + } + + break; + case 10 : + { + cout << "SUBJECT\n"; + } + + break; + case 11 : + { + ws = p; + } + + break; + case 12 : + { + + } + + break; + case 13 : + { + + } + + break; + case 14 : + { + hlen = 0; + } + + break; + + } + _nacts -= 1; + _acts += 1; + } + + } + + + if ( cs == 0 ) + _cont = 0; + + if ( _cont == 1 ) + p += 1; + + } + } + + } + + } + if ( cs < mailbox_first_final ) { + cout << endl << endl; + cout << "DID NOT FINISH IN A FINAL STATE" << endl; + } +} + +int main() +{ + test( + "From user@host.com Wed Nov 28 13:30:05 2001\n" + "From: \"Adrian D. Thurston\" <thurston@complang.org>\n" + "Subject: the squirrel has landed\n" + "\n" + "Message goes here. \n" + "From (trick from line).\n" + "From: not really a header\n" + "\n" + "From user2@host2.com Wed Nov 28 13:30:05 2001\n" + "To: \"(kill 1)\" Edgar Allen Poe <ep@net.com> (da man)\n" + "Subject: (no subject) this is a really long subject which should fail the length constraint \n" + "Other: 0123456789\n" + "\n" + "Message goes here. \n" + "\n" + ); + test( + "From user@host.com Wed Nov 28 13:30:05 2001\n" + "To: \"(kill 2)\" some guy <sg@net.com>\n" + "From: \"Adrian D. Thurston this name is far too long\" <thurston@complang.org>\n" + "Subject: the squirrel has landed\n" + "\n" + "From user2@host2.com Wed Nov 28 13:30:05 2001\n" + "To: Edgar Allen Poe <ep@net.com> (da man)\n" + "Subject: (no subject) \n" + "\n" + ); + test( + "From user@host.com Wed Nov 28 13:30:05 2001\n" + "To: \"(kill 3)\" some guy <sg@net.com>\n" + "From: \"Adrian D. Thurston This name is fore sure absolutely too long\" <t@cs.ca>\n" + "Subject: the squirrel has landed\n" + "\n" + ); + test( + "From user@host.com Wed Nov 28 13:30:05 2001\n" + "From: \"Adrian D. Thurston \" <t@cs.ca>\n" + "Subject: (kill 4) the squirrel has landed\n" + "Other: This is another header field, not interpreted, that is too long\n" + "\n" + ); + test( + "From user@host.com Wed Nov 28 13:30:05 2001\n" + "From: \"Adrian D. Thurston \" <t@cs.ca>\n" + "Subject: (kill 5)the squirrel has landed\n" + "\n" + "This message line is okay.\n" + "But this message line is far too long and will cause an error.\n" + ); + return 0; +} + |