summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-11-25 18:53:27 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-11-25 18:53:27 +0000
commit0f01df9a0a9217de380e1058f0085ef3c758f114 (patch)
tree8e7e8927f062a4cf2693360f2c62f0f32623af0d
parent1edfbf24cb7ff2f3e7d9258320eb5f23ff2d399b (diff)
downloadATCD-0f01df9a0a9217de380e1058f0085ef3c758f114.tar.gz
ChangeLogTag: Wed Nov 25 18:52:19 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--modules/TAO/ChangeLog12
-rw-r--r--modules/TAO/TAO_IDL/fe/idl.yy44
-rw-r--r--modules/TAO/TAO_IDL/fe/y.tab.cpp153
3 files changed, 104 insertions, 105 deletions
diff --git a/modules/TAO/ChangeLog b/modules/TAO/ChangeLog
index a68856d14c5..7e7ef92a7ea 100644
--- a/modules/TAO/ChangeLog
+++ b/modules/TAO/ChangeLog
@@ -1,10 +1,18 @@
+Wed Nov 25 18:52:19 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/fe/idl.yy:
+ * TAO_IDL/fe/y.tab.cpp:
+
+ Fixed typos and some discrepancies between idl.yy and a
+ hand-crafted y.tab.cpp, and regenerated.
+
Wed Nov 25 17:58:50 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu>
* TAO_IDL/include/fe_utils.h:
* TAO_IDL/fe/fe_utils.cpp:
* TAO_IDL/fe/y.tab.cpp:
* TAO_IDL/fe/idl.yy:
-
+
Added support for the 'const' formal template parameter type.
Wed Nov 25 01:35:38 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu>
@@ -13,7 +21,7 @@ Wed Nov 25 01:35:38 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu>
* TAO_IDL/util/utl_global.cpp:
* TAO_IDL/fe/y.tab.cpp:
* TAO_IDL/fe/idl.yy:
-
+
Fixed bugs in 'sequence<xxx>' template param checking.
Tue Nov 24 21:20:55 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu>
diff --git a/modules/TAO/TAO_IDL/fe/idl.yy b/modules/TAO/TAO_IDL/fe/idl.yy
index ba883f54205..469729158a5 100644
--- a/modules/TAO/TAO_IDL/fe/idl.yy
+++ b/modules/TAO/TAO_IDL/fe/idl.yy
@@ -542,7 +542,7 @@ fixed_module
{
// fixed_module : module_header
idl_global->set_parse_state (IDL_GlobalData::PS_ModuleIDSeen);
-
+
// The module_header rule is common to template module, fixed
// module and instantiated template module. In the last
// case, a fully scoped name is allowed, but here we
@@ -554,7 +554,7 @@ fixed_module
idl_global->err ()->syntax_error (
IDL_GlobalData::PS_ModuleIDSeen);
}
-
+
AST_Module *m = 0;
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -605,18 +605,18 @@ template_module
: template_module_header
{
// template_module : template_module_header
-
+
// The module_header rule is common to template module, fixed
// module and instantiated template module. In the last
// case, a fully scoped name is allowed, but here we
// allow only an identifier (a scoped name of length
// 1). If not satisfied, we output a parse error with
// the appropriate message.
- if ((tao_yyvsp[(1) - (1)].idlist)->length () != 1)
+ if ($1->length () != 1)
{
idl_global->err ()->syntax_error (
IDL_GlobalData::PS_ModuleIDSeen);
- }
+ }
}
at_least_one_formal_parameter
{
@@ -6025,10 +6025,10 @@ at_least_one_formal_parameter
{
delete $2;
$2 = 0;
-
+
idl_global->err ()->mismatch_seq_of_param (bad_id.c_str ());
}
-
+
$<plval>$ = $2;
}
;
@@ -6052,32 +6052,8 @@ formal_parameters
$1->enqueue_tail (*$4);
$<plval>$ = $1;
- bool so_far_so_good =
- idl_global->check_for_seq_of_param ($1,
- $4);
-
- if (so_far_so_good)
- {
- $1->enqueue_tail (*$4);
- $<plval>$ = $1;
- }
- else
- {
- delete $1;
- $1 = 0;
-
- idl_global->err ()->mismatch_seq_of_param (
- $4->name_.c_str ());
- }
-
delete $4;
$4 = 0;
-
- if (!so_far_so_good)
- {
- return 1;
- }
-
}
| /* EMPTY */
{
@@ -6094,18 +6070,18 @@ formal_parameter
ACE_NEW_RETURN ($<pival>$,
FE_Utils::T_Param_Info,
1);
-
+
AST_Decl::NodeType nt = $1;
$<pival>$->type_ = nt;
$<pival>$->name_ = $2;
-
+
if (nt == AST_Decl::NT_const)
{
$<pival>$->const_type_ = t_param_const_type;
$<pival>$->enum_const_type_decl_ =
tao_enum_constant_decl;
-
+
// Reset these values.
t_param_const_type = AST_Expression::EV_none;
tao_enum_constant_decl = 0;
diff --git a/modules/TAO/TAO_IDL/fe/y.tab.cpp b/modules/TAO/TAO_IDL/fe/y.tab.cpp
index e5715ed66a2..406ebd709aa 100644
--- a/modules/TAO/TAO_IDL/fe/y.tab.cpp
+++ b/modules/TAO/TAO_IDL/fe/y.tab.cpp
@@ -874,63 +874,63 @@ static const tao_yytype_int16 tao_yyrhs[] =
/* TAO_YYRLINE[TAO_YYN] -- source line where rule number TAO_YYN was defined. */
static const tao_yytype_uint16 tao_yyrline[] =
{
- 0, 355, 355, 358, 359, 363, 366, 369, 375, 379,
- 380, 385, 384, 395, 394, 405, 404, 415, 414, 425,
- 424, 435, 434, 445, 444, 455, 454, 465, 464, 475,
- 474, 485, 484, 495, 494, 505, 504, 515, 514, 529,
- 528, 541, 564, 569, 540, 585, 593, 598, 601, 619,
- 623, 592, 638, 642, 643, 647, 648, 653, 656, 659,
- 652, 668, 671, 667, 679, 680, 685, 724, 729, 684,
- 747, 746, 760, 798, 829, 863, 862, 874, 881, 882,
- 883, 884, 888, 899, 904, 948, 953, 903, 982, 1021,
- 1026, 980, 1045, 1043, 1083, 1082, 1096, 1102, 1109, 1116,
- 1123, 1149, 1176, 1241, 1242, 1246, 1247, 1248, 1254, 1253,
- 1261, 1260, 1270, 1271, 1276, 1275, 1286, 1285, 1296, 1295,
- 1306, 1305, 1316, 1315, 1326, 1325, 1336, 1335, 1346, 1345,
- 1359, 1372, 1370, 1400, 1407, 1418, 1417, 1445, 1443, 1470,
- 1482, 1528, 1556, 1587, 1592, 1597, 1602, 1586, 1655, 1656,
- 1657, 1658, 1659, 1660, 1661, 1673, 1678, 1753, 1755, 1757,
- 1758, 1772, 1773, 1787, 1788, 1801, 1802, 1812, 1825, 1826,
- 1836, 1849, 1850, 1860, 1870, 1883, 1884, 1894, 1904, 1917,
- 1952, 1953, 1962, 1967, 1974, 1982, 1987, 1992, 1998, 2003,
- 2008, 2016, 2088, 2087, 2097, 2102, 2107, 2112, 2139, 2148,
- 2147, 2218, 2219, 2223, 2231, 2232, 2260, 2261, 2262, 2263,
- 2264, 2265, 2266, 2267, 2271, 2272, 2273, 2277, 2278, 2279,
- 2283, 2284, 2288, 2301, 2299, 2329, 2336, 2337, 2341, 2354,
- 2352, 2382, 2389, 2406, 2425, 2426, 2430, 2435, 2440, 2448,
- 2453, 2458, 2466, 2471, 2476, 2484, 2498, 2503, 2511, 2519,
- 2527, 2535, 2544, 2543, 2559, 2593, 2598, 2558, 2617, 2620,
- 2621, 2625, 2625, 2635, 2640, 2634, 2703, 2702, 2717, 2716,
- 2731, 2736, 2741, 2746, 2793, 2798, 2730, 2822, 2830, 2844,
- 2854, 2862, 2863, 2971, 2974, 2975, 2980, 2985, 2979, 3021,
- 3020, 3034, 3045, 3067, 3075, 3074, 3090, 3095, 3089, 3112,
- 3111, 3164, 3188, 3213, 3218, 3251, 3256, 3212, 3282, 3287,
- 3285, 3292, 3296, 3333, 3338, 3331, 3405, 3460, 3470, 3459,
- 3485, 3490, 3483, 3531, 3557, 3567, 3572, 3565, 3602, 3627,
- 3636, 3635, 3671, 3682, 3704, 3712, 3717, 3711, 3754, 3755,
- 3760, 3765, 3770, 3775, 3759, 3844, 3849, 3854, 3859, 3843,
- 3937, 3942, 3972, 3977, 3936, 3995, 4000, 4053, 4058, 3993,
- 4095, 4101, 4108, 4115, 4116, 4128, 4134, 4176, 4127, 4198,
- 4197, 4208, 4207, 4220, 4225, 4223, 4230, 4235, 4240, 4234,
- 4281, 4280, 4291, 4290, 4303, 4308, 4306, 4313, 4318, 4323,
- 4317, 4370, 4378, 4379, 4380, 4485, 4490, 4495, 4504, 4509,
- 4503, 4521, 4529, 4534, 4528, 4546, 4554, 4559, 4553, 4571,
- 4579, 4584, 4578, 4596, 4603, 4616, 4614, 4642, 4649, 4678,
- 4716, 4717, 4721, 4751, 4791, 4796, 4750, 4815, 4820, 4813,
- 4862, 4861, 4872, 4879, 4880, 4885, 4884, 4895, 4894, 4905,
- 4904, 4915, 4914, 4925, 4924, 4935, 4934, 4945, 4944, 4956,
- 5015, 5022, 5046, 5120, 5130, 5136, 5142, 5189, 5236, 5285,
- 5284, 5334, 5339, 5344, 5349, 5354, 5359, 5333, 5413, 5412,
- 5423, 5430, 5437, 5445, 5450, 5444, 5462, 5463, 5467, 5469,
- 5468, 5479, 5478, 5493, 5529, 5491, 5563, 5599, 5561, 5631,
- 5632, 5633, 5637, 5638, 5642, 5670, 5701, 5746, 5751, 5699,
- 5768, 5778, 5797, 5809, 5808, 5848, 5898, 5903, 5846, 5920,
- 5925, 5933, 5938, 5943, 5948, 5953, 5958, 5963, 5968, 5973,
- 5981, 5999, 5998, 6041, 6048, 6059, 6073, 6080, 6104, 6111,
- 6122, 6127, 6132, 6137, 6121, 6152, 6159, 6164, 6171, 6170,
- 6179, 6178, 6189, 6258, 6308, 6312, 6313, 6317, 6331, 6336,
- 6341, 6335, 6401, 6406, 6400, 6421, 6425, 6426, 6431, 6430,
- 6441, 6440, 6451, 6450, 6461, 6460
+ 0, 356, 356, 359, 360, 364, 367, 370, 376, 380,
+ 381, 386, 385, 396, 395, 406, 405, 416, 415, 426,
+ 425, 436, 435, 446, 445, 456, 455, 466, 465, 476,
+ 475, 486, 485, 496, 495, 506, 505, 516, 515, 530,
+ 529, 542, 577, 582, 541, 598, 606, 622, 625, 643,
+ 647, 605, 662, 666, 667, 671, 672, 677, 680, 683,
+ 676, 692, 695, 691, 703, 704, 709, 748, 753, 708,
+ 771, 770, 784, 822, 853, 887, 886, 898, 905, 906,
+ 907, 908, 912, 923, 928, 972, 977, 927, 1006, 1045,
+ 1050, 1004, 1069, 1067, 1107, 1106, 1120, 1126, 1133, 1140,
+ 1147, 1173, 1200, 1265, 1266, 1270, 1271, 1272, 1278, 1277,
+ 1285, 1284, 1294, 1295, 1300, 1299, 1310, 1309, 1320, 1319,
+ 1330, 1329, 1340, 1339, 1350, 1349, 1360, 1359, 1370, 1369,
+ 1383, 1396, 1394, 1424, 1431, 1442, 1441, 1469, 1467, 1494,
+ 1506, 1552, 1580, 1611, 1616, 1621, 1626, 1610, 1679, 1680,
+ 1681, 1682, 1683, 1684, 1685, 1697, 1702, 1775, 1777, 1779,
+ 1780, 1794, 1795, 1809, 1810, 1823, 1824, 1834, 1847, 1848,
+ 1858, 1871, 1872, 1882, 1892, 1905, 1906, 1916, 1926, 1939,
+ 1974, 1975, 1984, 1989, 1996, 2004, 2009, 2014, 2020, 2025,
+ 2030, 2038, 2110, 2109, 2119, 2124, 2129, 2134, 2161, 2170,
+ 2169, 2240, 2241, 2245, 2253, 2254, 2282, 2283, 2284, 2285,
+ 2286, 2287, 2288, 2289, 2293, 2294, 2295, 2299, 2300, 2301,
+ 2305, 2306, 2310, 2323, 2321, 2351, 2358, 2359, 2363, 2376,
+ 2374, 2404, 2411, 2428, 2447, 2448, 2452, 2457, 2462, 2470,
+ 2475, 2480, 2488, 2493, 2498, 2506, 2520, 2525, 2533, 2541,
+ 2549, 2557, 2566, 2565, 2581, 2615, 2620, 2580, 2639, 2642,
+ 2643, 2647, 2647, 2657, 2662, 2656, 2725, 2724, 2739, 2738,
+ 2753, 2758, 2763, 2768, 2815, 2820, 2752, 2844, 2852, 2866,
+ 2876, 2884, 2885, 2993, 2996, 2997, 3002, 3007, 3001, 3043,
+ 3042, 3056, 3067, 3089, 3097, 3096, 3112, 3117, 3111, 3134,
+ 3133, 3186, 3210, 3235, 3240, 3273, 3278, 3234, 3304, 3309,
+ 3307, 3314, 3318, 3355, 3360, 3353, 3427, 3482, 3492, 3481,
+ 3507, 3512, 3505, 3553, 3579, 3589, 3594, 3587, 3624, 3649,
+ 3658, 3657, 3693, 3704, 3726, 3734, 3739, 3733, 3776, 3777,
+ 3782, 3787, 3792, 3797, 3781, 3866, 3871, 3876, 3881, 3865,
+ 3959, 3964, 3994, 3999, 3958, 4017, 4022, 4075, 4080, 4015,
+ 4117, 4123, 4130, 4137, 4138, 4150, 4156, 4198, 4149, 4220,
+ 4219, 4230, 4229, 4242, 4247, 4245, 4252, 4257, 4262, 4256,
+ 4303, 4302, 4313, 4312, 4325, 4330, 4328, 4335, 4340, 4345,
+ 4339, 4392, 4400, 4401, 4402, 4507, 4512, 4517, 4526, 4531,
+ 4525, 4543, 4551, 4556, 4550, 4568, 4576, 4581, 4575, 4593,
+ 4601, 4606, 4600, 4618, 4625, 4638, 4636, 4664, 4671, 4700,
+ 4738, 4739, 4743, 4773, 4813, 4818, 4772, 4837, 4842, 4835,
+ 4884, 4883, 4894, 4901, 4902, 4907, 4906, 4917, 4916, 4927,
+ 4926, 4937, 4936, 4947, 4946, 4957, 4956, 4967, 4966, 4978,
+ 5037, 5044, 5068, 5142, 5152, 5158, 5164, 5211, 5258, 5307,
+ 5306, 5356, 5361, 5366, 5371, 5376, 5381, 5355, 5435, 5434,
+ 5445, 5452, 5459, 5467, 5472, 5466, 5484, 5485, 5489, 5491,
+ 5490, 5501, 5500, 5515, 5551, 5513, 5585, 5621, 5583, 5653,
+ 5654, 5655, 5659, 5660, 5664, 5692, 5723, 5768, 5773, 5721,
+ 5790, 5800, 5819, 5831, 5830, 5870, 5920, 5925, 5868, 5942,
+ 5947, 5955, 5960, 5965, 5970, 5975, 5980, 5985, 5990, 5995,
+ 6004, 6038, 6037, 6059, 6066, 6090, 6104, 6111, 6135, 6142,
+ 6153, 6158, 6163, 6168, 6152, 6183, 6190, 6195, 6202, 6201,
+ 6210, 6209, 6220, 6289, 6339, 6343, 6344, 6348, 6362, 6367,
+ 6372, 6366, 6432, 6437, 6431, 6452, 6456, 6457, 6462, 6461,
+ 6472, 6471, 6482, 6481, 6492, 6491
};
#endif
@@ -2868,7 +2868,7 @@ tao_yyreduce:
{
// fixed_module : module_header
idl_global->set_parse_state (IDL_GlobalData::PS_ModuleIDSeen);
-
+
// The module_header rule is common to template module, fixed
// module and instantiated template module. In the last
// case, a fully scoped name is allowed, but here we
@@ -2880,7 +2880,7 @@ tao_yyreduce:
idl_global->err ()->syntax_error (
IDL_GlobalData::PS_ModuleIDSeen);
}
-
+
AST_Module *m = 0;
UTL_Scope *s = idl_global->scopes ().top_non_null ();
@@ -2940,7 +2940,18 @@ tao_yyreduce:
{
// template_module : template_module_header
- // Check that scoped name contains no delimitor.
+
+ // The module_header rule is common to template module, fixed
+ // module and instantiated template module. In the last
+ // case, a fully scoped name is allowed, but here we
+ // allow only an identifier (a scoped name of length
+ // 1). If not satisfied, we output a parse error with
+ // the appropriate message.
+ if ((tao_yyvsp[(1) - (1)].idlist)->length () != 1)
+ {
+ idl_global->err ()->syntax_error (
+ IDL_GlobalData::PS_ModuleIDSeen);
+ }
}
break;
@@ -4153,7 +4164,11 @@ tao_yyreduce:
AST_Decl *d =
s->lookup_by_name (sn, true);
- if (s != 0 && d != 0)
+ (tao_yyvsp[(1) - (1)].idlist)->destroy ();
+ delete (tao_yyvsp[(1) - (1)].idlist);
+ (tao_yyvsp[(1) - (1)].idlist) = 0;
+
+ if (s != 0 && d != 0)
{
/*
* Look through typedefs.
@@ -4199,7 +4214,7 @@ tao_yyreduce:
{
idl_global->err ()->lookup_error (sn);
}
-
+
sn->destroy ();
delete sn;
sn = 0;
@@ -8854,7 +8869,7 @@ tao_yyreduce:
case 520:
{
-// formal_parameter formal_parameters
+// at_least_one_formal_parameter : formal_parameter formal_parameters
if ((tao_yyvsp[(2) - (2)].plval) == 0)
{
ACE_NEW_RETURN ((tao_yyvsp[(2) - (2)].plval),
@@ -8865,7 +8880,7 @@ tao_yyreduce:
(tao_yyvsp[(2) - (2)].plval)->enqueue_head (*(tao_yyvsp[(1) - (2)].pival));
delete (tao_yyvsp[(1) - (2)].pival);
(tao_yyvsp[(1) - (2)].pival) = 0;
-
+
// The param added above is always the last one parsed,
// so we check for matches between sequence<T> & T here.
ACE_CString bad_id =
@@ -8905,7 +8920,7 @@ tao_yyreduce:
(tao_yyvsp[(1) - (4)].plval)->enqueue_tail (*(tao_yyvsp[(4) - (4)].pival));
(tao_yyval.plval) = (tao_yyvsp[(1) - (4)].plval);
-
+
delete (tao_yyvsp[(4) - (4)].pival);
(tao_yyvsp[(4) - (4)].pival) = 0;
}
@@ -8929,17 +8944,17 @@ tao_yyreduce:
1);
AST_Decl::NodeType nt = (tao_yyvsp[(1) - (2)].ntval);
-
+
(tao_yyval.pival)->type_ = nt;
(tao_yyval.pival)->name_ = (tao_yyvsp[(2) - (2)].strval);
-
+
if (nt == AST_Decl::NT_const)
{
(tao_yyval.pival)->const_type_ = t_param_const_type;
(tao_yyval.pival)->enum_const_type_decl_ =
tao_enum_constant_decl;
-
- // Reset these values.
+
+ // Reset these values.
t_param_const_type = AST_Expression::EV_none;
tao_enum_constant_decl = 0;
}