zeroc-ice 3.8.0 → 3.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/dist/IceRuby/Operation.cpp +22 -6
- data/dist/IceRuby/Slice.cpp +1 -1
- data/dist/ice/cpp/include/Ice/Communicator.h +4 -4
- data/dist/ice/cpp/include/Ice/Config.h +2 -2
- data/dist/ice/cpp/include/Ice/Connection.h +3 -3
- data/dist/ice/cpp/include/Ice/Endpoint.h +2 -2
- data/dist/ice/cpp/include/Ice/Exception.h +1 -1
- data/dist/ice/cpp/include/Ice/Initialize.h +1 -1
- data/dist/ice/cpp/include/Ice/LocalExceptions.h +22 -1
- data/dist/ice/cpp/include/Ice/Logger.h +3 -3
- data/dist/ice/cpp/include/Ice/NativePropertiesAdmin.h +2 -0
- data/dist/ice/cpp/include/Ice/ObjectAdapter.h +3 -3
- data/dist/ice/cpp/include/Ice/ObserverHelper.h +1 -0
- data/dist/ice/cpp/include/Ice/OutputStream.h +27 -5
- data/dist/ice/cpp/include/Ice/Properties.h +3 -3
- data/dist/ice/cpp/include/Ice/Proxy.h +1 -1
- data/dist/ice/cpp/include/Ice/SSL/ClientAuthenticationOptions.h +10 -2
- data/dist/ice/cpp/include/Ice/SSL/ServerAuthenticationOptions.h +10 -2
- data/dist/ice/cpp/include/generated/Ice/BuiltinSequences.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Context.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/EndpointTypes.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Identity.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Locator.h +9 -11
- data/dist/ice/cpp/include/generated/Ice/LocatorRegistry.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Metrics.h +7 -7
- data/dist/ice/cpp/include/generated/Ice/OperationMode.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Process.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/PropertiesAdmin.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/PropertyDict.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/RemoteLogger.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/ReplyStatus.h +8 -4
- data/dist/ice/cpp/include/generated/Ice/Router.h +7 -7
- data/dist/ice/cpp/include/generated/Ice/SliceChecksumDict.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Version.h +2 -2
- data/dist/ice/cpp/include/generated/IceDiscovery/Lookup.h +2 -2
- data/dist/ice/cpp/include/generated/IceLocatorDiscovery/Lookup.h +2 -2
- data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +5 -3
- data/dist/ice/cpp/src/Ice/ConnectionFactory.h +8 -8
- data/dist/ice/cpp/src/Ice/ConnectionI.cpp +28 -11
- data/dist/ice/cpp/src/Ice/ConnectionI.h +1 -1
- data/dist/ice/cpp/src/Ice/Demangle.cpp +1 -0
- data/dist/ice/cpp/src/Ice/FileUtil.cpp +3 -67
- data/dist/ice/cpp/src/Ice/FileUtil.h +0 -3
- data/dist/ice/cpp/src/Ice/IPEndpointI.cpp +4 -0
- data/dist/ice/cpp/src/Ice/IncomingRequest.cpp +1 -1
- data/dist/ice/cpp/src/Ice/InputStream.cpp +28 -17
- data/dist/ice/cpp/src/Ice/LocalException.cpp +1 -1
- data/dist/ice/cpp/src/Ice/LocalExceptions.cpp +6 -0
- data/dist/ice/cpp/src/Ice/OutgoingAsync.cpp +1 -1
- data/dist/ice/cpp/src/Ice/OutgoingResponse.cpp +127 -127
- data/dist/ice/cpp/src/Ice/OutgoingResponseInternal.h +21 -0
- data/dist/ice/cpp/src/Ice/OutputStream.cpp +80 -115
- data/dist/ice/cpp/src/Ice/PropertyNames.cpp +3 -2
- data/dist/ice/cpp/src/Ice/ProxyFunctions.cpp +4 -4
- data/dist/ice/cpp/src/Ice/Reference.cpp +15 -15
- data/dist/ice/cpp/src/Ice/ReferenceFactory.cpp +16 -13
- data/dist/ice/cpp/src/Ice/ResourceConfig.h +2 -2
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.cpp +29 -20
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.h +1 -2
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.cpp +14 -3
- data/dist/ice/cpp/src/Ice/SSL/RFC2253.cpp +3 -3
- data/dist/ice/cpp/src/Ice/SSL/SSLEndpointI.cpp +1 -1
- data/dist/ice/cpp/src/Ice/SSL/SSLEngine.h +4 -10
- data/dist/ice/cpp/src/Ice/SSL/SSLUtil.cpp +21 -2
- data/dist/ice/cpp/src/Ice/SSL/SSLUtil.h +15 -1
- data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.cpp +67 -48
- data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.h +1 -5
- data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.cpp +14 -2
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.cpp +111 -15
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.h +7 -2
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.h +1 -1
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.cpp +3 -16
- data/dist/ice/cpp/src/Ice/SSL/TrustManager.cpp +12 -1
- data/dist/ice/cpp/src/Ice/ServantManager.h +1 -1
- data/dist/ice/cpp/src/Ice/StringConverter.cpp +4 -0
- data/dist/ice/cpp/src/Ice/TcpEndpointI.cpp +2 -2
- data/dist/ice/cpp/src/Ice/UdpEndpointI.cpp +2 -2
- data/dist/ice/cpp/src/Ice/WSAcceptor.cpp +8 -3
- data/dist/ice/cpp/src/Ice/WSAcceptor.h +5 -1
- data/dist/ice/cpp/src/Ice/WSEndpoint.cpp +45 -2
- data/dist/ice/cpp/src/Ice/WSTransceiver.cpp +118 -7
- data/dist/ice/cpp/src/Ice/WSTransceiver.h +12 -1
- data/dist/ice/cpp/src/Ice/generated/BuiltinSequences.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Context.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/EndpointTypes.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Identity.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Locator.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/LocatorRegistry.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Metrics.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/OperationMode.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Process.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/PropertiesAdmin.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/PropertyDict.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/RemoteLogger.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/ReplyStatus.cpp +4 -2
- data/dist/ice/cpp/src/Ice/generated/Router.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/SliceChecksumDict.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Version.cpp +2 -2
- data/dist/ice/cpp/src/IceDiscovery/LocatorI.cpp +2 -2
- data/dist/ice/cpp/src/IceDiscovery/LookupI.cpp +4 -3
- data/dist/ice/cpp/src/IceDiscovery/LookupI.h +2 -1
- data/dist/ice/cpp/src/IceDiscovery/generated/Lookup.cpp +2 -2
- data/dist/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +6 -18
- data/dist/ice/cpp/src/IceLocatorDiscovery/generated/Lookup.cpp +2 -2
- data/dist/ice/cpp/src/Slice/DocCommentParser.cpp +6 -6
- data/dist/ice/cpp/src/Slice/DocCommentParser.h +4 -2
- data/dist/ice/cpp/src/Slice/FileTracker.h +1 -0
- data/dist/ice/cpp/src/Slice/Grammar.cpp +261 -264
- data/dist/ice/cpp/src/Slice/MetadataValidation.cpp +39 -7
- data/dist/ice/cpp/src/Slice/MetadataValidation.h +3 -2
- data/dist/ice/cpp/src/Slice/Parser.cpp +192 -155
- data/dist/ice/cpp/src/Slice/Parser.h +44 -9
- data/dist/ice/cpp/src/Slice/Preprocessor.cpp +76 -20
- data/dist/ice/cpp/src/Slice/Preprocessor.h +0 -1
- data/dist/ice/cpp/src/Slice/Scanner.cpp +1 -1
- data/dist/ice/cpp/src/Slice/SliceUtil.cpp +44 -58
- data/dist/ice/cpp/src/Slice/StringLiteralUtil.cpp +3 -10
- data/dist/ice/cpp/src/Slice/Util.h +7 -3
- data/dist/ice/cpp/src/slice2rb/Main.cpp +2 -2
- data/dist/ice/cpp/src/slice2rb/Ruby.cpp +1 -1
- data/dist/ice/cpp/src/slice2rb/RubyUtil.cpp +10 -8
- data/dist/ice/cpp/src/slice2rb/RubyUtil.h +10 -13
- data/dist/ice/mcpp/directive.c +5 -2
- data/dist/ice/mcpp/mcpp_main.c +1 -1
- data/dist/ice/mcpp/support.c +6 -6
- data/dist/ice/mcpp/system.c +5 -5
- data/dist/ice/slice/Ice/Identity.ice +3 -0
- data/dist/ice/slice/Ice/Locator.ice +6 -5
- data/dist/ice/slice/Ice/LocatorRegistry.ice +3 -0
- data/dist/ice/slice/Ice/Metrics.ice +1 -1
- data/dist/ice/slice/Ice/OperationMode.ice +8 -0
- data/dist/ice/slice/Ice/Process.ice +3 -0
- data/dist/ice/slice/Ice/ReplyStatus.ice +13 -0
- data/dist/lib/Glacier2/Metrics.rb +1 -1
- data/dist/lib/Glacier2/PermissionsVerifier.rb +3 -3
- data/dist/lib/Glacier2/Router.rb +8 -8
- data/dist/lib/Glacier2/SSLInfo.rb +1 -1
- data/dist/lib/Glacier2/Session.rb +15 -15
- data/dist/lib/Ice/BuiltinSequences.rb +1 -1
- data/dist/lib/Ice/Context.rb +1 -1
- data/dist/lib/Ice/EndpointTypes.rb +1 -1
- data/dist/lib/Ice/Identity.rb +1 -1
- data/dist/lib/Ice/LocalExceptions.rb +3 -0
- data/dist/lib/Ice/Locator.rb +5 -5
- data/dist/lib/Ice/LocatorRegistry.rb +4 -4
- data/dist/lib/Ice/Metrics.rb +7 -7
- data/dist/lib/Ice/OperationMode.rb +1 -1
- data/dist/lib/Ice/Process.rb +3 -3
- data/dist/lib/Ice/PropertiesAdmin.rb +4 -4
- data/dist/lib/Ice/PropertyDict.rb +1 -1
- data/dist/lib/Ice/ProxyFunctions.rb +8 -4
- data/dist/lib/Ice/RemoteLogger.rb +6 -6
- data/dist/lib/Ice/ReplyStatus.rb +3 -2
- data/dist/lib/Ice/Router.rb +5 -5
- data/dist/lib/Ice/SliceChecksumDict.rb +1 -1
- data/dist/lib/Ice/Version.rb +1 -1
- data/dist/lib/IceBox/ServiceManager.rb +8 -8
- data/dist/lib/IceGrid/Admin.rb +83 -83
- data/dist/lib/IceGrid/Descriptor.rb +1 -1
- data/dist/lib/IceGrid/Exception.rb +1 -1
- data/dist/lib/IceGrid/FileParser.rb +2 -2
- data/dist/lib/IceGrid/Registry.rb +13 -13
- data/dist/lib/IceGrid/Session.rb +6 -6
- data/dist/lib/IceGrid/UserAccountMapper.rb +2 -2
- data/dist/lib/IceStorm/IceStorm.rb +16 -16
- data/dist/lib/IceStorm/Metrics.rb +1 -1
- data/ice.gemspec +1 -1
- metadata +2 -1
|
@@ -739,19 +739,19 @@ static const yytype_int16 yyrline[] =
|
|
|
739
739
|
327, 331, 335, 339, 343, 347, 351, 355, 359, 363,
|
|
740
740
|
367, 371, 381, 380, 398, 397, 462, 473, 472, 493,
|
|
741
741
|
501, 510, 521, 534, 540, 551, 568, 581, 592, 591,
|
|
742
|
-
618, 622, 633, 653, 665, 678, 677, 711,
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
1363, 1364, 1365, 1366, 1367, 1368, 1369,
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
1673, 1674, 1675, 1676, 1677, 1678, 1679, 1680,
|
|
754
|
-
1683, 1684, 1685, 1686, 1687, 1688
|
|
742
|
+
618, 622, 633, 653, 665, 678, 677, 711, 737, 746,
|
|
743
|
+
749, 757, 766, 769, 773, 781, 809, 843, 858, 864,
|
|
744
|
+
874, 878, 887, 917, 916, 948, 947, 970, 974, 985,
|
|
745
|
+
999, 998, 1032, 1042, 1052, 1057, 1067, 1071, 1080, 1089,
|
|
746
|
+
1092, 1096, 1104, 1114, 1129, 1140, 1157, 1170, 1186, 1185,
|
|
747
|
+
1210, 1211, 1215, 1224, 1236, 1253, 1259, 1275, 1287, 1300,
|
|
748
|
+
1308, 1322, 1323, 1329, 1330, 1336, 1340, 1349, 1352, 1360,
|
|
749
|
+
1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1374,
|
|
750
|
+
1378, 1383, 1388, 1398, 1402, 1487, 1493, 1501, 1511, 1526,
|
|
751
|
+
1535, 1544, 1579, 1586, 1593, 1605, 1619, 1624, 1632, 1644,
|
|
752
|
+
1649, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 1670,
|
|
753
|
+
1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 1680,
|
|
754
|
+
1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688
|
|
755
755
|
};
|
|
756
756
|
#endif
|
|
757
757
|
|
|
@@ -2523,57 +2523,55 @@ yyreduce:
|
|
|
2523
2523
|
{
|
|
2524
2524
|
auto scoped = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
2525
2525
|
ContainerPtr cont = currentUnit->currentContainer();
|
|
2526
|
-
|
|
2526
|
+
TypePtr resolvedType = cont->lookupType(scoped->v);
|
|
2527
2527
|
yyval = nullptr;
|
|
2528
|
-
if (
|
|
2528
|
+
if (resolvedType)
|
|
2529
2529
|
{
|
|
2530
|
-
auto cl = dynamic_pointer_cast<ClassDecl>(
|
|
2531
|
-
if (!cl)
|
|
2530
|
+
if (auto cl = dynamic_pointer_cast<ClassDecl>(resolvedType))
|
|
2532
2531
|
{
|
|
2533
|
-
|
|
2534
|
-
}
|
|
2535
|
-
else
|
|
2536
|
-
{
|
|
2537
|
-
ClassDefPtr def = cl->definition();
|
|
2538
|
-
if (!def)
|
|
2532
|
+
if (ClassDefPtr def = cl->definition())
|
|
2539
2533
|
{
|
|
2540
|
-
|
|
2534
|
+
cont->checkHasChangedMeaning(scoped->v);
|
|
2535
|
+
yyval = def;
|
|
2541
2536
|
}
|
|
2542
2537
|
else
|
|
2543
2538
|
{
|
|
2544
|
-
|
|
2545
|
-
yyval = def;
|
|
2539
|
+
currentUnit->error("'" + scoped->v + "' has been declared but not defined");
|
|
2546
2540
|
}
|
|
2547
2541
|
}
|
|
2542
|
+
else
|
|
2543
|
+
{
|
|
2544
|
+
currentUnit->error("'" + scoped->v + "' is not a class");
|
|
2545
|
+
}
|
|
2548
2546
|
}
|
|
2549
2547
|
}
|
|
2550
|
-
#line
|
|
2548
|
+
#line 2549 "src/Slice/Grammar.cpp"
|
|
2551
2549
|
break;
|
|
2552
2550
|
|
|
2553
2551
|
case 58: /* class_extends: %empty */
|
|
2554
|
-
#line
|
|
2552
|
+
#line 738 "src/Slice/Grammar.y"
|
|
2555
2553
|
{
|
|
2556
2554
|
yyval = nullptr;
|
|
2557
2555
|
}
|
|
2558
|
-
#line
|
|
2556
|
+
#line 2557 "src/Slice/Grammar.cpp"
|
|
2559
2557
|
break;
|
|
2560
2558
|
|
|
2561
2559
|
case 59: /* extends: "extends keyword" */
|
|
2562
|
-
#line
|
|
2560
|
+
#line 747 "src/Slice/Grammar.y"
|
|
2563
2561
|
{
|
|
2564
2562
|
}
|
|
2565
|
-
#line
|
|
2563
|
+
#line 2564 "src/Slice/Grammar.cpp"
|
|
2566
2564
|
break;
|
|
2567
2565
|
|
|
2568
2566
|
case 60: /* extends: ':' */
|
|
2569
|
-
#line
|
|
2567
|
+
#line 750 "src/Slice/Grammar.y"
|
|
2570
2568
|
{
|
|
2571
2569
|
}
|
|
2572
|
-
#line
|
|
2570
|
+
#line 2571 "src/Slice/Grammar.cpp"
|
|
2573
2571
|
break;
|
|
2574
2572
|
|
|
2575
2573
|
case 61: /* data_members: metadata data_member ';' data_members */
|
|
2576
|
-
#line
|
|
2574
|
+
#line 758 "src/Slice/Grammar.y"
|
|
2577
2575
|
{
|
|
2578
2576
|
auto metadata = dynamic_pointer_cast<MetadataListTok>(yyvsp[-3]);
|
|
2579
2577
|
auto contained = dynamic_pointer_cast<Contained>(yyvsp[-2]);
|
|
@@ -2582,33 +2580,33 @@ yyreduce:
|
|
|
2582
2580
|
contained->appendMetadata(std::move(metadata->v));
|
|
2583
2581
|
}
|
|
2584
2582
|
}
|
|
2585
|
-
#line
|
|
2583
|
+
#line 2584 "src/Slice/Grammar.cpp"
|
|
2586
2584
|
break;
|
|
2587
2585
|
|
|
2588
2586
|
case 62: /* data_members: error ';' data_members */
|
|
2589
|
-
#line
|
|
2587
|
+
#line 767 "src/Slice/Grammar.y"
|
|
2590
2588
|
{
|
|
2591
2589
|
}
|
|
2592
|
-
#line
|
|
2590
|
+
#line 2591 "src/Slice/Grammar.cpp"
|
|
2593
2591
|
break;
|
|
2594
2592
|
|
|
2595
2593
|
case 63: /* data_members: metadata data_member */
|
|
2596
|
-
#line
|
|
2594
|
+
#line 770 "src/Slice/Grammar.y"
|
|
2597
2595
|
{
|
|
2598
2596
|
currentUnit->error("';' missing after definition");
|
|
2599
2597
|
}
|
|
2600
|
-
#line
|
|
2598
|
+
#line 2599 "src/Slice/Grammar.cpp"
|
|
2601
2599
|
break;
|
|
2602
2600
|
|
|
2603
2601
|
case 64: /* data_members: %empty */
|
|
2604
|
-
#line
|
|
2602
|
+
#line 774 "src/Slice/Grammar.y"
|
|
2605
2603
|
{
|
|
2606
2604
|
}
|
|
2607
|
-
#line
|
|
2605
|
+
#line 2606 "src/Slice/Grammar.cpp"
|
|
2608
2606
|
break;
|
|
2609
2607
|
|
|
2610
2608
|
case 65: /* data_member: optional_type_id */
|
|
2611
|
-
#line
|
|
2609
|
+
#line 782 "src/Slice/Grammar.y"
|
|
2612
2610
|
{
|
|
2613
2611
|
auto def = dynamic_pointer_cast<OptionalDefTok>(yyvsp[0]);
|
|
2614
2612
|
DataMemberPtr dm;
|
|
@@ -2636,11 +2634,11 @@ yyreduce:
|
|
|
2636
2634
|
}
|
|
2637
2635
|
yyval = dm;
|
|
2638
2636
|
}
|
|
2639
|
-
#line
|
|
2637
|
+
#line 2638 "src/Slice/Grammar.cpp"
|
|
2640
2638
|
break;
|
|
2641
2639
|
|
|
2642
2640
|
case 66: /* data_member: optional_type_id '=' const_initializer */
|
|
2643
|
-
#line
|
|
2641
|
+
#line 810 "src/Slice/Grammar.y"
|
|
2644
2642
|
{
|
|
2645
2643
|
auto def = dynamic_pointer_cast<OptionalDefTok>(yyvsp[-2]);
|
|
2646
2644
|
auto value = dynamic_pointer_cast<ConstDefTok>(yyvsp[0]);
|
|
@@ -2669,11 +2667,11 @@ yyreduce:
|
|
|
2669
2667
|
}
|
|
2670
2668
|
yyval = dm;
|
|
2671
2669
|
}
|
|
2672
|
-
#line
|
|
2670
|
+
#line 2671 "src/Slice/Grammar.cpp"
|
|
2673
2671
|
break;
|
|
2674
2672
|
|
|
2675
2673
|
case 67: /* return_type: optional type */
|
|
2676
|
-
#line
|
|
2674
|
+
#line 844 "src/Slice/Grammar.y"
|
|
2677
2675
|
{
|
|
2678
2676
|
auto m = dynamic_pointer_cast<OptionalDefTok>(yyvsp[-1]);
|
|
2679
2677
|
m->type = dynamic_pointer_cast<Type>(yyvsp[0]);
|
|
@@ -2688,46 +2686,46 @@ yyreduce:
|
|
|
2688
2686
|
|
|
2689
2687
|
yyval = m;
|
|
2690
2688
|
}
|
|
2691
|
-
#line
|
|
2689
|
+
#line 2690 "src/Slice/Grammar.cpp"
|
|
2692
2690
|
break;
|
|
2693
2691
|
|
|
2694
2692
|
case 68: /* return_type: type */
|
|
2695
|
-
#line
|
|
2693
|
+
#line 859 "src/Slice/Grammar.y"
|
|
2696
2694
|
{
|
|
2697
2695
|
auto m = make_shared<OptionalDefTok>(-1);
|
|
2698
2696
|
m->type = dynamic_pointer_cast<Type>(yyvsp[0]);
|
|
2699
2697
|
yyval = m;
|
|
2700
2698
|
}
|
|
2701
|
-
#line
|
|
2699
|
+
#line 2700 "src/Slice/Grammar.cpp"
|
|
2702
2700
|
break;
|
|
2703
2701
|
|
|
2704
2702
|
case 69: /* return_type: "void keyword" */
|
|
2705
|
-
#line
|
|
2703
|
+
#line 865 "src/Slice/Grammar.y"
|
|
2706
2704
|
{
|
|
2707
2705
|
auto m = make_shared<OptionalDefTok>(-1);
|
|
2708
2706
|
yyval = m;
|
|
2709
2707
|
}
|
|
2710
|
-
#line
|
|
2708
|
+
#line 2709 "src/Slice/Grammar.cpp"
|
|
2711
2709
|
break;
|
|
2712
2710
|
|
|
2713
2711
|
case 70: /* idempotent_modifier: "idempotent keyword" */
|
|
2714
|
-
#line
|
|
2712
|
+
#line 875 "src/Slice/Grammar.y"
|
|
2715
2713
|
{
|
|
2716
2714
|
yyval = make_shared<BoolTok>(true);
|
|
2717
2715
|
}
|
|
2718
|
-
#line
|
|
2716
|
+
#line 2717 "src/Slice/Grammar.cpp"
|
|
2719
2717
|
break;
|
|
2720
2718
|
|
|
2721
2719
|
case 71: /* idempotent_modifier: %empty */
|
|
2722
|
-
#line
|
|
2720
|
+
#line 879 "src/Slice/Grammar.y"
|
|
2723
2721
|
{
|
|
2724
2722
|
yyval = make_shared<BoolTok>(false);
|
|
2725
2723
|
}
|
|
2726
|
-
#line
|
|
2724
|
+
#line 2725 "src/Slice/Grammar.cpp"
|
|
2727
2725
|
break;
|
|
2728
2726
|
|
|
2729
2727
|
case 72: /* operation_preamble: idempotent_modifier return_type definition_name_open */
|
|
2730
|
-
#line
|
|
2728
|
+
#line 888 "src/Slice/Grammar.y"
|
|
2731
2729
|
{
|
|
2732
2730
|
bool isIdempotent = dynamic_pointer_cast<BoolTok>(yyvsp[-2])->v;
|
|
2733
2731
|
auto returnType = dynamic_pointer_cast<OptionalDefTok>(yyvsp[-1]);
|
|
@@ -2751,11 +2749,11 @@ yyreduce:
|
|
|
2751
2749
|
yyval = nullptr;
|
|
2752
2750
|
}
|
|
2753
2751
|
}
|
|
2754
|
-
#line
|
|
2752
|
+
#line 2753 "src/Slice/Grammar.cpp"
|
|
2755
2753
|
break;
|
|
2756
2754
|
|
|
2757
2755
|
case 73: /* @6: %empty */
|
|
2758
|
-
#line
|
|
2756
|
+
#line 917 "src/Slice/Grammar.y"
|
|
2759
2757
|
{
|
|
2760
2758
|
if (yyvsp[-2])
|
|
2761
2759
|
{
|
|
@@ -2776,11 +2774,11 @@ yyreduce:
|
|
|
2776
2774
|
}
|
|
2777
2775
|
yyval = yyvsp[-2];
|
|
2778
2776
|
}
|
|
2779
|
-
#line
|
|
2777
|
+
#line 2778 "src/Slice/Grammar.cpp"
|
|
2780
2778
|
break;
|
|
2781
2779
|
|
|
2782
2780
|
case 74: /* operation: operation_preamble parameters ')' @6 throws */
|
|
2783
|
-
#line
|
|
2781
|
+
#line 938 "src/Slice/Grammar.y"
|
|
2784
2782
|
{
|
|
2785
2783
|
auto op = dynamic_pointer_cast<Operation>(yyvsp[-1]);
|
|
2786
2784
|
auto el = dynamic_pointer_cast<ExceptionListTok>(yyvsp[0]);
|
|
@@ -2790,11 +2788,11 @@ yyreduce:
|
|
|
2790
2788
|
op->setExceptionList(el->v);
|
|
2791
2789
|
}
|
|
2792
2790
|
}
|
|
2793
|
-
#line
|
|
2791
|
+
#line 2792 "src/Slice/Grammar.cpp"
|
|
2794
2792
|
break;
|
|
2795
2793
|
|
|
2796
2794
|
case 75: /* @7: %empty */
|
|
2797
|
-
#line
|
|
2795
|
+
#line 948 "src/Slice/Grammar.y"
|
|
2798
2796
|
{
|
|
2799
2797
|
if (yyvsp[-2])
|
|
2800
2798
|
{
|
|
@@ -2802,11 +2800,11 @@ yyreduce:
|
|
|
2802
2800
|
}
|
|
2803
2801
|
yyerrok;
|
|
2804
2802
|
}
|
|
2805
|
-
#line
|
|
2803
|
+
#line 2804 "src/Slice/Grammar.cpp"
|
|
2806
2804
|
break;
|
|
2807
2805
|
|
|
2808
2806
|
case 76: /* operation: operation_preamble error ')' @7 throws */
|
|
2809
|
-
#line
|
|
2807
|
+
#line 956 "src/Slice/Grammar.y"
|
|
2810
2808
|
{
|
|
2811
2809
|
auto op = dynamic_pointer_cast<Operation>(yyvsp[-1]);
|
|
2812
2810
|
auto el = dynamic_pointer_cast<ExceptionListTok>(yyvsp[0]);
|
|
@@ -2816,29 +2814,29 @@ yyreduce:
|
|
|
2816
2814
|
op->setExceptionList(el->v); // Dummy
|
|
2817
2815
|
}
|
|
2818
2816
|
}
|
|
2819
|
-
#line
|
|
2817
|
+
#line 2818 "src/Slice/Grammar.cpp"
|
|
2820
2818
|
break;
|
|
2821
2819
|
|
|
2822
2820
|
case 77: /* interface_id: "interface keyword" "identifier" */
|
|
2823
|
-
#line
|
|
2821
|
+
#line 971 "src/Slice/Grammar.y"
|
|
2824
2822
|
{
|
|
2825
2823
|
yyval = yyvsp[0];
|
|
2826
2824
|
}
|
|
2827
|
-
#line
|
|
2825
|
+
#line 2826 "src/Slice/Grammar.cpp"
|
|
2828
2826
|
break;
|
|
2829
2827
|
|
|
2830
2828
|
case 78: /* interface_id: "interface keyword" keyword */
|
|
2831
|
-
#line
|
|
2829
|
+
#line 975 "src/Slice/Grammar.y"
|
|
2832
2830
|
{
|
|
2833
2831
|
auto ident = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
2834
2832
|
currentUnit->error("keyword '" + ident->v + "' cannot be used as interface name");
|
|
2835
2833
|
yyval = yyvsp[0]; // Dummy
|
|
2836
2834
|
}
|
|
2837
|
-
#line
|
|
2835
|
+
#line 2836 "src/Slice/Grammar.cpp"
|
|
2838
2836
|
break;
|
|
2839
2837
|
|
|
2840
2838
|
case 79: /* interface_decl: interface_id */
|
|
2841
|
-
#line
|
|
2839
|
+
#line 986 "src/Slice/Grammar.y"
|
|
2842
2840
|
{
|
|
2843
2841
|
auto ident = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
2844
2842
|
auto cont = currentUnit->currentContainer();
|
|
@@ -2846,11 +2844,11 @@ yyreduce:
|
|
|
2846
2844
|
cont->checkHasChangedMeaning(ident->v, cl);
|
|
2847
2845
|
yyval = cl;
|
|
2848
2846
|
}
|
|
2849
|
-
#line
|
|
2847
|
+
#line 2848 "src/Slice/Grammar.cpp"
|
|
2850
2848
|
break;
|
|
2851
2849
|
|
|
2852
2850
|
case 80: /* @8: %empty */
|
|
2853
|
-
#line
|
|
2851
|
+
#line 999 "src/Slice/Grammar.y"
|
|
2854
2852
|
{
|
|
2855
2853
|
auto ident = dynamic_pointer_cast<StringTok>(yyvsp[-1]);
|
|
2856
2854
|
ContainerPtr cont = currentUnit->currentContainer();
|
|
@@ -2867,11 +2865,11 @@ yyreduce:
|
|
|
2867
2865
|
yyval = nullptr;
|
|
2868
2866
|
}
|
|
2869
2867
|
}
|
|
2870
|
-
#line
|
|
2868
|
+
#line 2869 "src/Slice/Grammar.cpp"
|
|
2871
2869
|
break;
|
|
2872
2870
|
|
|
2873
2871
|
case 81: /* interface_def: interface_id interface_extends @8 '{' operations '}' */
|
|
2874
|
-
#line
|
|
2872
|
+
#line 1016 "src/Slice/Grammar.y"
|
|
2875
2873
|
{
|
|
2876
2874
|
if (yyvsp[-3])
|
|
2877
2875
|
{
|
|
@@ -2883,11 +2881,11 @@ yyreduce:
|
|
|
2883
2881
|
yyval = nullptr;
|
|
2884
2882
|
}
|
|
2885
2883
|
}
|
|
2886
|
-
#line
|
|
2884
|
+
#line 2885 "src/Slice/Grammar.cpp"
|
|
2887
2885
|
break;
|
|
2888
2886
|
|
|
2889
2887
|
case 82: /* interface_list: interface_list ',' scoped_name */
|
|
2890
|
-
#line
|
|
2888
|
+
#line 1033 "src/Slice/Grammar.y"
|
|
2891
2889
|
{
|
|
2892
2890
|
auto interfaces = dynamic_pointer_cast<InterfaceListTok>(yyvsp[-2]);
|
|
2893
2891
|
auto scoped = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
@@ -2897,11 +2895,11 @@ yyreduce:
|
|
|
2897
2895
|
}
|
|
2898
2896
|
yyval = interfaces;
|
|
2899
2897
|
}
|
|
2900
|
-
#line
|
|
2898
|
+
#line 2899 "src/Slice/Grammar.cpp"
|
|
2901
2899
|
break;
|
|
2902
2900
|
|
|
2903
2901
|
case 83: /* interface_list: scoped_name */
|
|
2904
|
-
#line
|
|
2902
|
+
#line 1043 "src/Slice/Grammar.y"
|
|
2905
2903
|
{
|
|
2906
2904
|
auto interfaces = make_shared<InterfaceListTok>();
|
|
2907
2905
|
auto scoped = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
@@ -2911,45 +2909,45 @@ yyreduce:
|
|
|
2911
2909
|
}
|
|
2912
2910
|
yyval = interfaces;
|
|
2913
2911
|
}
|
|
2914
|
-
#line
|
|
2912
|
+
#line 2913 "src/Slice/Grammar.cpp"
|
|
2915
2913
|
break;
|
|
2916
2914
|
|
|
2917
2915
|
case 84: /* interface_list: "Object keyword" */
|
|
2918
|
-
#line
|
|
2916
|
+
#line 1053 "src/Slice/Grammar.y"
|
|
2919
2917
|
{
|
|
2920
2918
|
currentUnit->error("illegal inheritance from type Object");
|
|
2921
2919
|
yyval = make_shared<InterfaceListTok>(); // Dummy
|
|
2922
2920
|
}
|
|
2923
|
-
#line
|
|
2921
|
+
#line 2922 "src/Slice/Grammar.cpp"
|
|
2924
2922
|
break;
|
|
2925
2923
|
|
|
2926
2924
|
case 85: /* interface_list: "Value keyword" */
|
|
2927
|
-
#line
|
|
2925
|
+
#line 1058 "src/Slice/Grammar.y"
|
|
2928
2926
|
{
|
|
2929
2927
|
currentUnit->error("illegal inheritance from type Value");
|
|
2930
2928
|
yyval = make_shared<InterfaceListTok>(); // Dummy
|
|
2931
2929
|
}
|
|
2932
|
-
#line
|
|
2930
|
+
#line 2931 "src/Slice/Grammar.cpp"
|
|
2933
2931
|
break;
|
|
2934
2932
|
|
|
2935
2933
|
case 86: /* interface_extends: extends interface_list */
|
|
2936
|
-
#line
|
|
2934
|
+
#line 1068 "src/Slice/Grammar.y"
|
|
2937
2935
|
{
|
|
2938
2936
|
yyval = yyvsp[0];
|
|
2939
2937
|
}
|
|
2940
|
-
#line
|
|
2938
|
+
#line 2939 "src/Slice/Grammar.cpp"
|
|
2941
2939
|
break;
|
|
2942
2940
|
|
|
2943
2941
|
case 87: /* interface_extends: %empty */
|
|
2944
|
-
#line
|
|
2942
|
+
#line 1072 "src/Slice/Grammar.y"
|
|
2945
2943
|
{
|
|
2946
2944
|
yyval = make_shared<InterfaceListTok>();
|
|
2947
2945
|
}
|
|
2948
|
-
#line
|
|
2946
|
+
#line 2947 "src/Slice/Grammar.cpp"
|
|
2949
2947
|
break;
|
|
2950
2948
|
|
|
2951
2949
|
case 88: /* operations: metadata operation ';' operations */
|
|
2952
|
-
#line
|
|
2950
|
+
#line 1081 "src/Slice/Grammar.y"
|
|
2953
2951
|
{
|
|
2954
2952
|
auto metadata = dynamic_pointer_cast<MetadataListTok>(yyvsp[-3]);
|
|
2955
2953
|
auto contained = dynamic_pointer_cast<Contained>(yyvsp[-2]);
|
|
@@ -2958,33 +2956,33 @@ yyreduce:
|
|
|
2958
2956
|
contained->appendMetadata(std::move(metadata->v));
|
|
2959
2957
|
}
|
|
2960
2958
|
}
|
|
2961
|
-
#line
|
|
2959
|
+
#line 2960 "src/Slice/Grammar.cpp"
|
|
2962
2960
|
break;
|
|
2963
2961
|
|
|
2964
2962
|
case 89: /* operations: error ';' operations */
|
|
2965
|
-
#line
|
|
2963
|
+
#line 1090 "src/Slice/Grammar.y"
|
|
2966
2964
|
{
|
|
2967
2965
|
}
|
|
2968
|
-
#line
|
|
2966
|
+
#line 2967 "src/Slice/Grammar.cpp"
|
|
2969
2967
|
break;
|
|
2970
2968
|
|
|
2971
2969
|
case 90: /* operations: metadata operation */
|
|
2972
|
-
#line
|
|
2970
|
+
#line 1093 "src/Slice/Grammar.y"
|
|
2973
2971
|
{
|
|
2974
2972
|
currentUnit->error("';' missing after definition");
|
|
2975
2973
|
}
|
|
2976
|
-
#line
|
|
2974
|
+
#line 2975 "src/Slice/Grammar.cpp"
|
|
2977
2975
|
break;
|
|
2978
2976
|
|
|
2979
2977
|
case 91: /* operations: %empty */
|
|
2980
|
-
#line
|
|
2978
|
+
#line 1097 "src/Slice/Grammar.y"
|
|
2981
2979
|
{
|
|
2982
2980
|
}
|
|
2983
|
-
#line
|
|
2981
|
+
#line 2982 "src/Slice/Grammar.cpp"
|
|
2984
2982
|
break;
|
|
2985
2983
|
|
|
2986
2984
|
case 92: /* exception_list: exception_list ',' exception */
|
|
2987
|
-
#line
|
|
2985
|
+
#line 1105 "src/Slice/Grammar.y"
|
|
2988
2986
|
{
|
|
2989
2987
|
auto exceptionList = dynamic_pointer_cast<ExceptionListTok>(yyvsp[-2]);
|
|
2990
2988
|
auto exception = dynamic_pointer_cast<Exception>(yyvsp[0]);
|
|
@@ -2994,11 +2992,11 @@ yyreduce:
|
|
|
2994
2992
|
}
|
|
2995
2993
|
yyval = exceptionList;
|
|
2996
2994
|
}
|
|
2997
|
-
#line
|
|
2995
|
+
#line 2996 "src/Slice/Grammar.cpp"
|
|
2998
2996
|
break;
|
|
2999
2997
|
|
|
3000
2998
|
case 93: /* exception_list: exception */
|
|
3001
|
-
#line
|
|
2999
|
+
#line 1115 "src/Slice/Grammar.y"
|
|
3002
3000
|
{
|
|
3003
3001
|
auto exceptionList = make_shared<ExceptionListTok>();
|
|
3004
3002
|
auto exception = dynamic_pointer_cast<Exception>(yyvsp[0]);
|
|
@@ -3008,11 +3006,11 @@ yyreduce:
|
|
|
3008
3006
|
}
|
|
3009
3007
|
yyval = exceptionList;
|
|
3010
3008
|
}
|
|
3011
|
-
#line
|
|
3009
|
+
#line 3010 "src/Slice/Grammar.cpp"
|
|
3012
3010
|
break;
|
|
3013
3011
|
|
|
3014
3012
|
case 94: /* exception: scoped_name */
|
|
3015
|
-
#line
|
|
3013
|
+
#line 1130 "src/Slice/Grammar.y"
|
|
3016
3014
|
{
|
|
3017
3015
|
auto scoped = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
3018
3016
|
ContainerPtr cont = currentUnit->currentContainer();
|
|
@@ -3023,11 +3021,11 @@ yyreduce:
|
|
|
3023
3021
|
}
|
|
3024
3022
|
yyval = exception;
|
|
3025
3023
|
}
|
|
3026
|
-
#line
|
|
3024
|
+
#line 3025 "src/Slice/Grammar.cpp"
|
|
3027
3025
|
break;
|
|
3028
3026
|
|
|
3029
3027
|
case 95: /* exception: keyword */
|
|
3030
|
-
#line
|
|
3028
|
+
#line 1141 "src/Slice/Grammar.y"
|
|
3031
3029
|
{
|
|
3032
3030
|
auto ident = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
3033
3031
|
currentUnit->error("keyword '" + ident->v + "' cannot be used as a name");
|
|
@@ -3039,11 +3037,11 @@ yyreduce:
|
|
|
3039
3037
|
}
|
|
3040
3038
|
yyval = exception;
|
|
3041
3039
|
}
|
|
3042
|
-
#line
|
|
3040
|
+
#line 3041 "src/Slice/Grammar.cpp"
|
|
3043
3041
|
break;
|
|
3044
3042
|
|
|
3045
3043
|
case 96: /* sequence_def: "sequence keyword" '<' metadata type '>' definition_name */
|
|
3046
|
-
#line
|
|
3044
|
+
#line 1158 "src/Slice/Grammar.y"
|
|
3047
3045
|
{
|
|
3048
3046
|
auto ident = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
3049
3047
|
auto metadata = dynamic_pointer_cast<MetadataListTok>(yyvsp[-3]);
|
|
@@ -3051,11 +3049,11 @@ yyreduce:
|
|
|
3051
3049
|
ContainerPtr cont = currentUnit->currentContainer();
|
|
3052
3050
|
yyval = cont->createSequence(ident->v, type, std::move(metadata->v));
|
|
3053
3051
|
}
|
|
3054
|
-
#line
|
|
3052
|
+
#line 3053 "src/Slice/Grammar.cpp"
|
|
3055
3053
|
break;
|
|
3056
3054
|
|
|
3057
3055
|
case 97: /* dictionary_def: "dictionary keyword" '<' metadata type ',' metadata type '>' definition_name */
|
|
3058
|
-
#line
|
|
3056
|
+
#line 1171 "src/Slice/Grammar.y"
|
|
3059
3057
|
{
|
|
3060
3058
|
auto ident = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
3061
3059
|
auto keyMetadata = dynamic_pointer_cast<MetadataListTok>(yyvsp[-6]);
|
|
@@ -3065,11 +3063,11 @@ yyreduce:
|
|
|
3065
3063
|
ContainerPtr cont = currentUnit->currentContainer();
|
|
3066
3064
|
yyval = cont->createDictionary(ident->v, keyType, std::move(keyMetadata->v), valueType, std::move(valueMetadata->v));
|
|
3067
3065
|
}
|
|
3068
|
-
#line
|
|
3066
|
+
#line 3067 "src/Slice/Grammar.cpp"
|
|
3069
3067
|
break;
|
|
3070
3068
|
|
|
3071
3069
|
case 98: /* @9: %empty */
|
|
3072
|
-
#line
|
|
3070
|
+
#line 1186 "src/Slice/Grammar.y"
|
|
3073
3071
|
{
|
|
3074
3072
|
auto ident = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
3075
3073
|
ContainerPtr cont = currentUnit->currentContainer();
|
|
@@ -3078,11 +3076,11 @@ yyreduce:
|
|
|
3078
3076
|
currentUnit->pushContainer(en);
|
|
3079
3077
|
yyval = en;
|
|
3080
3078
|
}
|
|
3081
|
-
#line
|
|
3079
|
+
#line 3080 "src/Slice/Grammar.cpp"
|
|
3082
3080
|
break;
|
|
3083
3081
|
|
|
3084
3082
|
case 99: /* enum_def: "enum keyword" definition_name @9 '{' enumerators '}' */
|
|
3085
|
-
#line
|
|
3083
|
+
#line 1195 "src/Slice/Grammar.y"
|
|
3086
3084
|
{
|
|
3087
3085
|
auto en = dynamic_pointer_cast<Enum>(yyvsp[-3]);
|
|
3088
3086
|
auto enumerators = dynamic_pointer_cast<EnumeratorListTok>(yyvsp[-1]);
|
|
@@ -3093,27 +3091,27 @@ yyreduce:
|
|
|
3093
3091
|
currentUnit->popContainer();
|
|
3094
3092
|
yyval = en;
|
|
3095
3093
|
}
|
|
3096
|
-
#line
|
|
3094
|
+
#line 3095 "src/Slice/Grammar.cpp"
|
|
3097
3095
|
break;
|
|
3098
3096
|
|
|
3099
3097
|
case 101: /* enumerators: enumerator_list ',' */
|
|
3100
|
-
#line
|
|
3098
|
+
#line 1212 "src/Slice/Grammar.y"
|
|
3101
3099
|
{
|
|
3102
3100
|
yyval = yyvsp[-1];
|
|
3103
3101
|
}
|
|
3104
|
-
#line
|
|
3102
|
+
#line 3103 "src/Slice/Grammar.cpp"
|
|
3105
3103
|
break;
|
|
3106
3104
|
|
|
3107
3105
|
case 102: /* enumerators: %empty */
|
|
3108
|
-
#line
|
|
3106
|
+
#line 1216 "src/Slice/Grammar.y"
|
|
3109
3107
|
{
|
|
3110
3108
|
yyval = make_shared<EnumeratorListTok>(); // Empty list
|
|
3111
3109
|
}
|
|
3112
|
-
#line
|
|
3110
|
+
#line 3111 "src/Slice/Grammar.cpp"
|
|
3113
3111
|
break;
|
|
3114
3112
|
|
|
3115
3113
|
case 103: /* enumerator_list: enumerator_list ',' metadata enumerator */
|
|
3116
|
-
#line
|
|
3114
|
+
#line 1225 "src/Slice/Grammar.y"
|
|
3117
3115
|
{
|
|
3118
3116
|
auto enumeratorList = dynamic_pointer_cast<EnumeratorListTok>(yyvsp[-3]);
|
|
3119
3117
|
auto metadata = dynamic_pointer_cast<MetadataListTok>(yyvsp[-1]);
|
|
@@ -3125,11 +3123,11 @@ yyreduce:
|
|
|
3125
3123
|
enumeratorList->v.push_back(enumerator);
|
|
3126
3124
|
yyval = enumeratorList;
|
|
3127
3125
|
}
|
|
3128
|
-
#line
|
|
3126
|
+
#line 3127 "src/Slice/Grammar.cpp"
|
|
3129
3127
|
break;
|
|
3130
3128
|
|
|
3131
3129
|
case 104: /* enumerator_list: metadata enumerator */
|
|
3132
|
-
#line
|
|
3130
|
+
#line 1237 "src/Slice/Grammar.y"
|
|
3133
3131
|
{
|
|
3134
3132
|
auto enumeratorList = make_shared<EnumeratorListTok>();
|
|
3135
3133
|
auto metadata = dynamic_pointer_cast<MetadataListTok>(yyvsp[-1]);
|
|
@@ -3141,21 +3139,21 @@ yyreduce:
|
|
|
3141
3139
|
enumeratorList->v.push_back(enumerator);
|
|
3142
3140
|
yyval = enumeratorList;
|
|
3143
3141
|
}
|
|
3144
|
-
#line
|
|
3142
|
+
#line 3143 "src/Slice/Grammar.cpp"
|
|
3145
3143
|
break;
|
|
3146
3144
|
|
|
3147
3145
|
case 105: /* enumerator: "identifier" */
|
|
3148
|
-
#line
|
|
3146
|
+
#line 1254 "src/Slice/Grammar.y"
|
|
3149
3147
|
{
|
|
3150
3148
|
auto ident = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
3151
3149
|
EnumPtr cont = dynamic_pointer_cast<Enum>(currentUnit->currentContainer());
|
|
3152
3150
|
yyval = cont->createEnumerator(ident->v, nullopt);
|
|
3153
3151
|
}
|
|
3154
|
-
#line
|
|
3152
|
+
#line 3153 "src/Slice/Grammar.cpp"
|
|
3155
3153
|
break;
|
|
3156
3154
|
|
|
3157
3155
|
case 106: /* enumerator: "identifier" '=' integer_constant */
|
|
3158
|
-
#line
|
|
3156
|
+
#line 1260 "src/Slice/Grammar.y"
|
|
3159
3157
|
{
|
|
3160
3158
|
auto ident = dynamic_pointer_cast<StringTok>(yyvsp[-2]);
|
|
3161
3159
|
EnumPtr cont = dynamic_pointer_cast<Enum>(currentUnit->currentContainer());
|
|
@@ -3171,22 +3169,22 @@ yyreduce:
|
|
|
3171
3169
|
yyval = cont->createEnumerator(ident->v, nullopt); // Dummy
|
|
3172
3170
|
}
|
|
3173
3171
|
}
|
|
3174
|
-
#line
|
|
3172
|
+
#line 3173 "src/Slice/Grammar.cpp"
|
|
3175
3173
|
break;
|
|
3176
3174
|
|
|
3177
3175
|
case 107: /* enumerator: keyword */
|
|
3178
|
-
#line
|
|
3176
|
+
#line 1276 "src/Slice/Grammar.y"
|
|
3179
3177
|
{
|
|
3180
3178
|
auto ident = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
3181
3179
|
EnumPtr cont = dynamic_pointer_cast<Enum>(currentUnit->currentContainer());
|
|
3182
3180
|
currentUnit->error("keyword '" + ident->v + "' cannot be used as enumerator");
|
|
3183
3181
|
yyval = cont->createEnumerator(ident->v, nullopt); // Dummy
|
|
3184
3182
|
}
|
|
3185
|
-
#line
|
|
3183
|
+
#line 3184 "src/Slice/Grammar.cpp"
|
|
3186
3184
|
break;
|
|
3187
3185
|
|
|
3188
3186
|
case 108: /* parameter: optional_type_id */
|
|
3189
|
-
#line
|
|
3187
|
+
#line 1288 "src/Slice/Grammar.y"
|
|
3190
3188
|
{
|
|
3191
3189
|
auto tsp = dynamic_pointer_cast<OptionalDefTok>(yyvsp[0]);
|
|
3192
3190
|
ParameterPtr param;
|
|
@@ -3199,11 +3197,11 @@ yyreduce:
|
|
|
3199
3197
|
}
|
|
3200
3198
|
yyval = param;
|
|
3201
3199
|
}
|
|
3202
|
-
#line
|
|
3200
|
+
#line 3201 "src/Slice/Grammar.cpp"
|
|
3203
3201
|
break;
|
|
3204
3202
|
|
|
3205
3203
|
case 109: /* parameter: "out keyword" parameter */
|
|
3206
|
-
#line
|
|
3204
|
+
#line 1301 "src/Slice/Grammar.y"
|
|
3207
3205
|
{
|
|
3208
3206
|
if (auto param = dynamic_pointer_cast<Parameter>(yyvsp[0]))
|
|
3209
3207
|
{
|
|
@@ -3211,11 +3209,11 @@ yyreduce:
|
|
|
3211
3209
|
}
|
|
3212
3210
|
yyval = yyvsp[0];
|
|
3213
3211
|
}
|
|
3214
|
-
#line
|
|
3212
|
+
#line 3213 "src/Slice/Grammar.cpp"
|
|
3215
3213
|
break;
|
|
3216
3214
|
|
|
3217
3215
|
case 110: /* parameter: local_metadata parameter */
|
|
3218
|
-
#line
|
|
3216
|
+
#line 1309 "src/Slice/Grammar.y"
|
|
3219
3217
|
{
|
|
3220
3218
|
if (auto param = dynamic_pointer_cast<Parameter>(yyvsp[0]))
|
|
3221
3219
|
{
|
|
@@ -3224,144 +3222,144 @@ yyreduce:
|
|
|
3224
3222
|
}
|
|
3225
3223
|
yyval = yyvsp[0];
|
|
3226
3224
|
}
|
|
3227
|
-
#line
|
|
3225
|
+
#line 3226 "src/Slice/Grammar.cpp"
|
|
3228
3226
|
break;
|
|
3229
3227
|
|
|
3230
3228
|
case 115: /* throws: "throws keyword" exception_list */
|
|
3231
|
-
#line
|
|
3229
|
+
#line 1337 "src/Slice/Grammar.y"
|
|
3232
3230
|
{
|
|
3233
3231
|
yyval = yyvsp[0];
|
|
3234
3232
|
}
|
|
3235
|
-
#line
|
|
3233
|
+
#line 3234 "src/Slice/Grammar.cpp"
|
|
3236
3234
|
break;
|
|
3237
3235
|
|
|
3238
3236
|
case 116: /* throws: %empty */
|
|
3239
|
-
#line
|
|
3237
|
+
#line 1341 "src/Slice/Grammar.y"
|
|
3240
3238
|
{
|
|
3241
3239
|
yyval = make_shared<ExceptionListTok>();
|
|
3242
3240
|
}
|
|
3243
|
-
#line
|
|
3241
|
+
#line 3242 "src/Slice/Grammar.cpp"
|
|
3244
3242
|
break;
|
|
3245
3243
|
|
|
3246
3244
|
case 117: /* scoped_name: "identifier" */
|
|
3247
|
-
#line
|
|
3245
|
+
#line 1350 "src/Slice/Grammar.y"
|
|
3248
3246
|
{
|
|
3249
3247
|
}
|
|
3250
|
-
#line
|
|
3248
|
+
#line 3249 "src/Slice/Grammar.cpp"
|
|
3251
3249
|
break;
|
|
3252
3250
|
|
|
3253
3251
|
case 118: /* scoped_name: "scoped identifier" */
|
|
3254
|
-
#line
|
|
3252
|
+
#line 1353 "src/Slice/Grammar.y"
|
|
3255
3253
|
{
|
|
3256
3254
|
}
|
|
3257
|
-
#line
|
|
3255
|
+
#line 3256 "src/Slice/Grammar.cpp"
|
|
3258
3256
|
break;
|
|
3259
3257
|
|
|
3260
3258
|
case 119: /* builtin: "bool keyword" */
|
|
3261
|
-
#line
|
|
3259
|
+
#line 1360 "src/Slice/Grammar.y"
|
|
3262
3260
|
{}
|
|
3263
|
-
#line
|
|
3261
|
+
#line 3262 "src/Slice/Grammar.cpp"
|
|
3264
3262
|
break;
|
|
3265
3263
|
|
|
3266
3264
|
case 120: /* builtin: "byte keyword" */
|
|
3267
|
-
#line
|
|
3265
|
+
#line 1361 "src/Slice/Grammar.y"
|
|
3268
3266
|
{}
|
|
3269
|
-
#line
|
|
3267
|
+
#line 3268 "src/Slice/Grammar.cpp"
|
|
3270
3268
|
break;
|
|
3271
3269
|
|
|
3272
3270
|
case 121: /* builtin: "short keyword" */
|
|
3273
|
-
#line
|
|
3271
|
+
#line 1362 "src/Slice/Grammar.y"
|
|
3274
3272
|
{}
|
|
3275
|
-
#line
|
|
3273
|
+
#line 3274 "src/Slice/Grammar.cpp"
|
|
3276
3274
|
break;
|
|
3277
3275
|
|
|
3278
3276
|
case 122: /* builtin: "int keyword" */
|
|
3279
|
-
#line
|
|
3277
|
+
#line 1363 "src/Slice/Grammar.y"
|
|
3280
3278
|
{}
|
|
3281
|
-
#line
|
|
3279
|
+
#line 3280 "src/Slice/Grammar.cpp"
|
|
3282
3280
|
break;
|
|
3283
3281
|
|
|
3284
3282
|
case 123: /* builtin: "long keyword" */
|
|
3285
|
-
#line
|
|
3283
|
+
#line 1364 "src/Slice/Grammar.y"
|
|
3286
3284
|
{}
|
|
3287
|
-
#line
|
|
3285
|
+
#line 3286 "src/Slice/Grammar.cpp"
|
|
3288
3286
|
break;
|
|
3289
3287
|
|
|
3290
3288
|
case 124: /* builtin: "float keyword" */
|
|
3291
|
-
#line
|
|
3289
|
+
#line 1365 "src/Slice/Grammar.y"
|
|
3292
3290
|
{}
|
|
3293
|
-
#line
|
|
3291
|
+
#line 3292 "src/Slice/Grammar.cpp"
|
|
3294
3292
|
break;
|
|
3295
3293
|
|
|
3296
3294
|
case 125: /* builtin: "double keyword" */
|
|
3297
|
-
#line
|
|
3295
|
+
#line 1366 "src/Slice/Grammar.y"
|
|
3298
3296
|
{}
|
|
3299
|
-
#line
|
|
3297
|
+
#line 3298 "src/Slice/Grammar.cpp"
|
|
3300
3298
|
break;
|
|
3301
3299
|
|
|
3302
3300
|
case 126: /* builtin: "string keyword" */
|
|
3303
|
-
#line
|
|
3301
|
+
#line 1367 "src/Slice/Grammar.y"
|
|
3304
3302
|
{}
|
|
3305
|
-
#line
|
|
3303
|
+
#line 3304 "src/Slice/Grammar.cpp"
|
|
3306
3304
|
break;
|
|
3307
3305
|
|
|
3308
3306
|
case 127: /* builtin: "Object keyword" */
|
|
3309
|
-
#line
|
|
3307
|
+
#line 1368 "src/Slice/Grammar.y"
|
|
3310
3308
|
{}
|
|
3311
|
-
#line
|
|
3309
|
+
#line 3310 "src/Slice/Grammar.cpp"
|
|
3312
3310
|
break;
|
|
3313
3311
|
|
|
3314
3312
|
case 128: /* builtin: "Value keyword" */
|
|
3315
|
-
#line
|
|
3313
|
+
#line 1369 "src/Slice/Grammar.y"
|
|
3316
3314
|
{}
|
|
3317
|
-
#line
|
|
3315
|
+
#line 3316 "src/Slice/Grammar.cpp"
|
|
3318
3316
|
break;
|
|
3319
3317
|
|
|
3320
3318
|
case 129: /* type: "Object keyword" '*' */
|
|
3321
|
-
#line
|
|
3319
|
+
#line 1375 "src/Slice/Grammar.y"
|
|
3322
3320
|
{
|
|
3323
3321
|
yyval = currentUnit->createBuiltin(Builtin::KindObjectProxy);
|
|
3324
3322
|
}
|
|
3325
|
-
#line
|
|
3323
|
+
#line 3324 "src/Slice/Grammar.cpp"
|
|
3326
3324
|
break;
|
|
3327
3325
|
|
|
3328
3326
|
case 130: /* type: builtin */
|
|
3329
|
-
#line
|
|
3327
|
+
#line 1379 "src/Slice/Grammar.y"
|
|
3330
3328
|
{
|
|
3331
3329
|
auto typeName = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
3332
3330
|
yyval = currentUnit->createBuiltin(Builtin::kindFromString(typeName->v).value());
|
|
3333
3331
|
}
|
|
3334
|
-
#line
|
|
3332
|
+
#line 3333 "src/Slice/Grammar.cpp"
|
|
3335
3333
|
break;
|
|
3336
3334
|
|
|
3337
3335
|
case 131: /* type: scoped_name */
|
|
3338
|
-
#line
|
|
3336
|
+
#line 1384 "src/Slice/Grammar.y"
|
|
3339
3337
|
{
|
|
3340
3338
|
auto scoped = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
3341
3339
|
yyval = lookupTypeByName(scoped->v, false);
|
|
3342
3340
|
}
|
|
3343
|
-
#line
|
|
3341
|
+
#line 3342 "src/Slice/Grammar.cpp"
|
|
3344
3342
|
break;
|
|
3345
3343
|
|
|
3346
3344
|
case 132: /* type: scoped_name '*' */
|
|
3347
|
-
#line
|
|
3345
|
+
#line 1389 "src/Slice/Grammar.y"
|
|
3348
3346
|
{
|
|
3349
3347
|
auto scoped = dynamic_pointer_cast<StringTok>(yyvsp[-1]);
|
|
3350
3348
|
yyval = lookupTypeByName(scoped->v, true);
|
|
3351
3349
|
}
|
|
3352
|
-
#line
|
|
3350
|
+
#line 3351 "src/Slice/Grammar.cpp"
|
|
3353
3351
|
break;
|
|
3354
3352
|
|
|
3355
3353
|
case 133: /* integer_constant: "integer literal" */
|
|
3356
|
-
#line
|
|
3354
|
+
#line 1399 "src/Slice/Grammar.y"
|
|
3357
3355
|
{
|
|
3358
3356
|
yyval = yyvsp[0];
|
|
3359
3357
|
}
|
|
3360
|
-
#line
|
|
3358
|
+
#line 3359 "src/Slice/Grammar.cpp"
|
|
3361
3359
|
break;
|
|
3362
3360
|
|
|
3363
3361
|
case 134: /* integer_constant: scoped_name */
|
|
3364
|
-
#line
|
|
3362
|
+
#line 1403 "src/Slice/Grammar.y"
|
|
3365
3363
|
{
|
|
3366
3364
|
auto scoped = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
3367
3365
|
ContainerPtr cont = currentUnit->currentContainer();
|
|
@@ -3441,28 +3439,28 @@ yyreduce:
|
|
|
3441
3439
|
yyval = nullptr;
|
|
3442
3440
|
}
|
|
3443
3441
|
}
|
|
3444
|
-
#line
|
|
3442
|
+
#line 3443 "src/Slice/Grammar.cpp"
|
|
3445
3443
|
break;
|
|
3446
3444
|
|
|
3447
3445
|
case 135: /* string_literal: "string literal" string_literal */
|
|
3448
|
-
#line
|
|
3446
|
+
#line 1488 "src/Slice/Grammar.y"
|
|
3449
3447
|
{
|
|
3450
3448
|
auto str1 = dynamic_pointer_cast<StringTok>(yyvsp[-1]);
|
|
3451
3449
|
auto str2 = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
3452
3450
|
str1->v += str2->v;
|
|
3453
3451
|
}
|
|
3454
|
-
#line
|
|
3452
|
+
#line 3453 "src/Slice/Grammar.cpp"
|
|
3455
3453
|
break;
|
|
3456
3454
|
|
|
3457
3455
|
case 136: /* string_literal: "string literal" */
|
|
3458
|
-
#line
|
|
3456
|
+
#line 1494 "src/Slice/Grammar.y"
|
|
3459
3457
|
{
|
|
3460
3458
|
}
|
|
3461
|
-
#line
|
|
3459
|
+
#line 3460 "src/Slice/Grammar.cpp"
|
|
3462
3460
|
break;
|
|
3463
3461
|
|
|
3464
3462
|
case 137: /* metadata_list: metadata_list ',' string_literal */
|
|
3465
|
-
#line
|
|
3463
|
+
#line 1502 "src/Slice/Grammar.y"
|
|
3466
3464
|
{
|
|
3467
3465
|
auto str = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
3468
3466
|
auto metadataList = dynamic_pointer_cast<MetadataListTok>(yyvsp[-2]);
|
|
@@ -3472,11 +3470,11 @@ yyreduce:
|
|
|
3472
3470
|
|
|
3473
3471
|
yyval = metadataList;
|
|
3474
3472
|
}
|
|
3475
|
-
#line
|
|
3473
|
+
#line 3474 "src/Slice/Grammar.cpp"
|
|
3476
3474
|
break;
|
|
3477
3475
|
|
|
3478
3476
|
case 138: /* metadata_list: string_literal */
|
|
3479
|
-
#line
|
|
3477
|
+
#line 1512 "src/Slice/Grammar.y"
|
|
3480
3478
|
{
|
|
3481
3479
|
auto str = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
3482
3480
|
auto metadataList = make_shared<MetadataListTok>();
|
|
@@ -3486,11 +3484,11 @@ yyreduce:
|
|
|
3486
3484
|
|
|
3487
3485
|
yyval = metadataList;
|
|
3488
3486
|
}
|
|
3489
|
-
#line
|
|
3487
|
+
#line 3488 "src/Slice/Grammar.cpp"
|
|
3490
3488
|
break;
|
|
3491
3489
|
|
|
3492
3490
|
case 139: /* const_initializer: "integer literal" */
|
|
3493
|
-
#line
|
|
3491
|
+
#line 1527 "src/Slice/Grammar.y"
|
|
3494
3492
|
{
|
|
3495
3493
|
BuiltinPtr type = currentUnit->createBuiltin(Builtin::KindLong);
|
|
3496
3494
|
auto intVal = dynamic_pointer_cast<IntegerTok>(yyvsp[0]);
|
|
@@ -3499,11 +3497,11 @@ yyreduce:
|
|
|
3499
3497
|
auto def = make_shared<ConstDefTok>(type, sstr.str());
|
|
3500
3498
|
yyval = def;
|
|
3501
3499
|
}
|
|
3502
|
-
#line
|
|
3500
|
+
#line 3501 "src/Slice/Grammar.cpp"
|
|
3503
3501
|
break;
|
|
3504
3502
|
|
|
3505
3503
|
case 140: /* const_initializer: "floating-point literal" */
|
|
3506
|
-
#line
|
|
3504
|
+
#line 1536 "src/Slice/Grammar.y"
|
|
3507
3505
|
{
|
|
3508
3506
|
BuiltinPtr type = currentUnit->createBuiltin(Builtin::KindDouble);
|
|
3509
3507
|
auto floatVal = dynamic_pointer_cast<FloatingTok>(yyvsp[0]);
|
|
@@ -3512,11 +3510,11 @@ yyreduce:
|
|
|
3512
3510
|
auto def = make_shared<ConstDefTok>(type, sstr.str());
|
|
3513
3511
|
yyval = def;
|
|
3514
3512
|
}
|
|
3515
|
-
#line
|
|
3513
|
+
#line 3514 "src/Slice/Grammar.cpp"
|
|
3516
3514
|
break;
|
|
3517
3515
|
|
|
3518
3516
|
case 141: /* const_initializer: scoped_name */
|
|
3519
|
-
#line
|
|
3517
|
+
#line 1545 "src/Slice/Grammar.y"
|
|
3520
3518
|
{
|
|
3521
3519
|
auto scoped = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
3522
3520
|
ConstDefTokPtr def;
|
|
@@ -3551,44 +3549,44 @@ yyreduce:
|
|
|
3551
3549
|
}
|
|
3552
3550
|
yyval = def;
|
|
3553
3551
|
}
|
|
3554
|
-
#line
|
|
3552
|
+
#line 3553 "src/Slice/Grammar.cpp"
|
|
3555
3553
|
break;
|
|
3556
3554
|
|
|
3557
3555
|
case 142: /* const_initializer: "string literal" */
|
|
3558
|
-
#line
|
|
3556
|
+
#line 1580 "src/Slice/Grammar.y"
|
|
3559
3557
|
{
|
|
3560
3558
|
BuiltinPtr type = currentUnit->createBuiltin(Builtin::KindString);
|
|
3561
3559
|
auto literal = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
3562
3560
|
auto def = make_shared<ConstDefTok>(type, literal->v);
|
|
3563
3561
|
yyval = def;
|
|
3564
3562
|
}
|
|
3565
|
-
#line
|
|
3563
|
+
#line 3564 "src/Slice/Grammar.cpp"
|
|
3566
3564
|
break;
|
|
3567
3565
|
|
|
3568
3566
|
case 143: /* const_initializer: "false keyword" */
|
|
3569
|
-
#line
|
|
3567
|
+
#line 1587 "src/Slice/Grammar.y"
|
|
3570
3568
|
{
|
|
3571
3569
|
BuiltinPtr type = currentUnit->createBuiltin(Builtin::KindBool);
|
|
3572
3570
|
auto literal = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
3573
3571
|
auto def = make_shared<ConstDefTok>(type, "false");
|
|
3574
3572
|
yyval = def;
|
|
3575
3573
|
}
|
|
3576
|
-
#line
|
|
3574
|
+
#line 3575 "src/Slice/Grammar.cpp"
|
|
3577
3575
|
break;
|
|
3578
3576
|
|
|
3579
3577
|
case 144: /* const_initializer: "true keyword" */
|
|
3580
|
-
#line
|
|
3578
|
+
#line 1594 "src/Slice/Grammar.y"
|
|
3581
3579
|
{
|
|
3582
3580
|
BuiltinPtr type = currentUnit->createBuiltin(Builtin::KindBool);
|
|
3583
3581
|
auto literal = dynamic_pointer_cast<StringTok>(yyvsp[0]);
|
|
3584
3582
|
auto def = make_shared<ConstDefTok>(type, "true");
|
|
3585
3583
|
yyval = def;
|
|
3586
3584
|
}
|
|
3587
|
-
#line
|
|
3585
|
+
#line 3586 "src/Slice/Grammar.cpp"
|
|
3588
3586
|
break;
|
|
3589
3587
|
|
|
3590
3588
|
case 145: /* const_def: "const keyword" metadata type definition_name '=' const_initializer */
|
|
3591
|
-
#line
|
|
3589
|
+
#line 1606 "src/Slice/Grammar.y"
|
|
3592
3590
|
{
|
|
3593
3591
|
auto metadata = dynamic_pointer_cast<MetadataListTok>(yyvsp[-4]);
|
|
3594
3592
|
auto const_type = dynamic_pointer_cast<Type>(yyvsp[-3]);
|
|
@@ -3597,20 +3595,20 @@ yyreduce:
|
|
|
3597
3595
|
yyval = currentUnit->currentContainer()->createConst(ident->v, const_type, std::move(metadata->v), value->v,
|
|
3598
3596
|
value->valueAsString);
|
|
3599
3597
|
}
|
|
3600
|
-
#line
|
|
3598
|
+
#line 3599 "src/Slice/Grammar.cpp"
|
|
3601
3599
|
break;
|
|
3602
3600
|
|
|
3603
3601
|
case 146: /* definition_name: "identifier" */
|
|
3604
|
-
#line
|
|
3602
|
+
#line 1620 "src/Slice/Grammar.y"
|
|
3605
3603
|
{
|
|
3606
3604
|
// All good, this is a valid identifier.
|
|
3607
3605
|
yyval = yyvsp[0];
|
|
3608
3606
|
}
|
|
3609
|
-
#line
|
|
3607
|
+
#line 3608 "src/Slice/Grammar.cpp"
|
|
3610
3608
|
break;
|
|
3611
3609
|
|
|
3612
3610
|
case 147: /* definition_name: keyword */
|
|
3613
|
-
#line
|
|
3611
|
+
#line 1625 "src/Slice/Grammar.y"
|
|
3614
3612
|
{
|
|
3615
3613
|
// If an un-escaped keyword was used as an identifier, we emit an error,
|
|
3616
3614
|
// but continue along, pretending like the user escaped the keyword.
|
|
@@ -3618,31 +3616,31 @@ yyreduce:
|
|
|
3618
3616
|
currentUnit->error("keyword '" + ident->v + "' cannot be used as a name");
|
|
3619
3617
|
yyval = ident;
|
|
3620
3618
|
}
|
|
3621
|
-
#line
|
|
3619
|
+
#line 3620 "src/Slice/Grammar.cpp"
|
|
3622
3620
|
break;
|
|
3623
3621
|
|
|
3624
3622
|
case 148: /* definition_name: %empty */
|
|
3625
|
-
#line
|
|
3623
|
+
#line 1633 "src/Slice/Grammar.y"
|
|
3626
3624
|
{
|
|
3627
3625
|
// If the user forgot to give a name to a Slice definition, we emit an error,
|
|
3628
3626
|
// but continue along, returning an empty string instead of an identifier.
|
|
3629
3627
|
currentUnit->error("missing name");
|
|
3630
3628
|
yyval = make_shared<StringTok>();
|
|
3631
3629
|
}
|
|
3632
|
-
#line
|
|
3630
|
+
#line 3631 "src/Slice/Grammar.cpp"
|
|
3633
3631
|
break;
|
|
3634
3632
|
|
|
3635
3633
|
case 149: /* definition_name_open: "identifier(" */
|
|
3636
|
-
#line
|
|
3634
|
+
#line 1645 "src/Slice/Grammar.y"
|
|
3637
3635
|
{
|
|
3638
3636
|
// All good, this is a valid identifier.
|
|
3639
3637
|
yyval = yyvsp[0];
|
|
3640
3638
|
}
|
|
3641
|
-
#line
|
|
3639
|
+
#line 3640 "src/Slice/Grammar.cpp"
|
|
3642
3640
|
break;
|
|
3643
3641
|
|
|
3644
3642
|
case 150: /* definition_name_open: "keyword(" */
|
|
3645
|
-
#line
|
|
3643
|
+
#line 1650 "src/Slice/Grammar.y"
|
|
3646
3644
|
{
|
|
3647
3645
|
// If an un-escaped keyword was used as an identifier, we emit an error,
|
|
3648
3646
|
// but continue along, pretending like the user escaped the keyword.
|
|
@@ -3650,173 +3648,173 @@ yyreduce:
|
|
|
3650
3648
|
currentUnit->error("keyword '" + ident->v + "' cannot be used as a name");
|
|
3651
3649
|
yyval = ident;
|
|
3652
3650
|
}
|
|
3653
|
-
#line
|
|
3651
|
+
#line 3652 "src/Slice/Grammar.cpp"
|
|
3654
3652
|
break;
|
|
3655
3653
|
|
|
3656
3654
|
case 151: /* keyword: "module keyword" */
|
|
3657
|
-
#line
|
|
3655
|
+
#line 1662 "src/Slice/Grammar.y"
|
|
3658
3656
|
{}
|
|
3659
|
-
#line
|
|
3657
|
+
#line 3658 "src/Slice/Grammar.cpp"
|
|
3660
3658
|
break;
|
|
3661
3659
|
|
|
3662
3660
|
case 152: /* keyword: "class keyword" */
|
|
3663
|
-
#line
|
|
3661
|
+
#line 1663 "src/Slice/Grammar.y"
|
|
3664
3662
|
{}
|
|
3665
|
-
#line
|
|
3663
|
+
#line 3664 "src/Slice/Grammar.cpp"
|
|
3666
3664
|
break;
|
|
3667
3665
|
|
|
3668
3666
|
case 153: /* keyword: "interface keyword" */
|
|
3669
|
-
#line
|
|
3667
|
+
#line 1664 "src/Slice/Grammar.y"
|
|
3670
3668
|
{}
|
|
3671
|
-
#line
|
|
3669
|
+
#line 3670 "src/Slice/Grammar.cpp"
|
|
3672
3670
|
break;
|
|
3673
3671
|
|
|
3674
3672
|
case 154: /* keyword: "exception keyword" */
|
|
3675
|
-
#line
|
|
3673
|
+
#line 1665 "src/Slice/Grammar.y"
|
|
3676
3674
|
{}
|
|
3677
|
-
#line
|
|
3675
|
+
#line 3676 "src/Slice/Grammar.cpp"
|
|
3678
3676
|
break;
|
|
3679
3677
|
|
|
3680
3678
|
case 155: /* keyword: "struct keyword" */
|
|
3681
|
-
#line
|
|
3679
|
+
#line 1666 "src/Slice/Grammar.y"
|
|
3682
3680
|
{}
|
|
3683
|
-
#line
|
|
3681
|
+
#line 3682 "src/Slice/Grammar.cpp"
|
|
3684
3682
|
break;
|
|
3685
3683
|
|
|
3686
3684
|
case 156: /* keyword: "sequence keyword" */
|
|
3687
|
-
#line
|
|
3685
|
+
#line 1667 "src/Slice/Grammar.y"
|
|
3688
3686
|
{}
|
|
3689
|
-
#line
|
|
3687
|
+
#line 3688 "src/Slice/Grammar.cpp"
|
|
3690
3688
|
break;
|
|
3691
3689
|
|
|
3692
3690
|
case 157: /* keyword: "dictionary keyword" */
|
|
3693
|
-
#line
|
|
3691
|
+
#line 1668 "src/Slice/Grammar.y"
|
|
3694
3692
|
{}
|
|
3695
|
-
#line
|
|
3693
|
+
#line 3694 "src/Slice/Grammar.cpp"
|
|
3696
3694
|
break;
|
|
3697
3695
|
|
|
3698
3696
|
case 158: /* keyword: "enum keyword" */
|
|
3699
|
-
#line
|
|
3697
|
+
#line 1669 "src/Slice/Grammar.y"
|
|
3700
3698
|
{}
|
|
3701
|
-
#line
|
|
3699
|
+
#line 3700 "src/Slice/Grammar.cpp"
|
|
3702
3700
|
break;
|
|
3703
3701
|
|
|
3704
3702
|
case 159: /* keyword: "out keyword" */
|
|
3705
|
-
#line
|
|
3703
|
+
#line 1670 "src/Slice/Grammar.y"
|
|
3706
3704
|
{}
|
|
3707
|
-
#line
|
|
3705
|
+
#line 3706 "src/Slice/Grammar.cpp"
|
|
3708
3706
|
break;
|
|
3709
3707
|
|
|
3710
3708
|
case 160: /* keyword: "extends keyword" */
|
|
3711
|
-
#line
|
|
3709
|
+
#line 1671 "src/Slice/Grammar.y"
|
|
3712
3710
|
{}
|
|
3713
|
-
#line
|
|
3711
|
+
#line 3712 "src/Slice/Grammar.cpp"
|
|
3714
3712
|
break;
|
|
3715
3713
|
|
|
3716
3714
|
case 161: /* keyword: "throws keyword" */
|
|
3717
|
-
#line
|
|
3715
|
+
#line 1672 "src/Slice/Grammar.y"
|
|
3718
3716
|
{}
|
|
3719
|
-
#line
|
|
3717
|
+
#line 3718 "src/Slice/Grammar.cpp"
|
|
3720
3718
|
break;
|
|
3721
3719
|
|
|
3722
3720
|
case 162: /* keyword: "void keyword" */
|
|
3723
|
-
#line
|
|
3721
|
+
#line 1673 "src/Slice/Grammar.y"
|
|
3724
3722
|
{}
|
|
3725
|
-
#line
|
|
3723
|
+
#line 3724 "src/Slice/Grammar.cpp"
|
|
3726
3724
|
break;
|
|
3727
3725
|
|
|
3728
3726
|
case 163: /* keyword: "bool keyword" */
|
|
3729
|
-
#line
|
|
3727
|
+
#line 1674 "src/Slice/Grammar.y"
|
|
3730
3728
|
{}
|
|
3731
|
-
#line
|
|
3729
|
+
#line 3730 "src/Slice/Grammar.cpp"
|
|
3732
3730
|
break;
|
|
3733
3731
|
|
|
3734
3732
|
case 164: /* keyword: "byte keyword" */
|
|
3735
|
-
#line
|
|
3733
|
+
#line 1675 "src/Slice/Grammar.y"
|
|
3736
3734
|
{}
|
|
3737
|
-
#line
|
|
3735
|
+
#line 3736 "src/Slice/Grammar.cpp"
|
|
3738
3736
|
break;
|
|
3739
3737
|
|
|
3740
3738
|
case 165: /* keyword: "short keyword" */
|
|
3741
|
-
#line
|
|
3739
|
+
#line 1676 "src/Slice/Grammar.y"
|
|
3742
3740
|
{}
|
|
3743
|
-
#line
|
|
3741
|
+
#line 3742 "src/Slice/Grammar.cpp"
|
|
3744
3742
|
break;
|
|
3745
3743
|
|
|
3746
3744
|
case 166: /* keyword: "int keyword" */
|
|
3747
|
-
#line
|
|
3745
|
+
#line 1677 "src/Slice/Grammar.y"
|
|
3748
3746
|
{}
|
|
3749
|
-
#line
|
|
3747
|
+
#line 3748 "src/Slice/Grammar.cpp"
|
|
3750
3748
|
break;
|
|
3751
3749
|
|
|
3752
3750
|
case 167: /* keyword: "long keyword" */
|
|
3753
|
-
#line
|
|
3751
|
+
#line 1678 "src/Slice/Grammar.y"
|
|
3754
3752
|
{}
|
|
3755
|
-
#line
|
|
3753
|
+
#line 3754 "src/Slice/Grammar.cpp"
|
|
3756
3754
|
break;
|
|
3757
3755
|
|
|
3758
3756
|
case 168: /* keyword: "float keyword" */
|
|
3759
|
-
#line
|
|
3757
|
+
#line 1679 "src/Slice/Grammar.y"
|
|
3760
3758
|
{}
|
|
3761
|
-
#line
|
|
3759
|
+
#line 3760 "src/Slice/Grammar.cpp"
|
|
3762
3760
|
break;
|
|
3763
3761
|
|
|
3764
3762
|
case 169: /* keyword: "double keyword" */
|
|
3765
|
-
#line
|
|
3763
|
+
#line 1680 "src/Slice/Grammar.y"
|
|
3766
3764
|
{}
|
|
3767
|
-
#line
|
|
3765
|
+
#line 3766 "src/Slice/Grammar.cpp"
|
|
3768
3766
|
break;
|
|
3769
3767
|
|
|
3770
3768
|
case 170: /* keyword: "string keyword" */
|
|
3771
|
-
#line
|
|
3769
|
+
#line 1681 "src/Slice/Grammar.y"
|
|
3772
3770
|
{}
|
|
3773
|
-
#line
|
|
3771
|
+
#line 3772 "src/Slice/Grammar.cpp"
|
|
3774
3772
|
break;
|
|
3775
3773
|
|
|
3776
3774
|
case 171: /* keyword: "Object keyword" */
|
|
3777
|
-
#line
|
|
3775
|
+
#line 1682 "src/Slice/Grammar.y"
|
|
3778
3776
|
{}
|
|
3779
|
-
#line
|
|
3777
|
+
#line 3778 "src/Slice/Grammar.cpp"
|
|
3780
3778
|
break;
|
|
3781
3779
|
|
|
3782
3780
|
case 172: /* keyword: "const keyword" */
|
|
3783
|
-
#line
|
|
3781
|
+
#line 1683 "src/Slice/Grammar.y"
|
|
3784
3782
|
{}
|
|
3785
|
-
#line
|
|
3783
|
+
#line 3784 "src/Slice/Grammar.cpp"
|
|
3786
3784
|
break;
|
|
3787
3785
|
|
|
3788
3786
|
case 173: /* keyword: "false keyword" */
|
|
3789
|
-
#line
|
|
3787
|
+
#line 1684 "src/Slice/Grammar.y"
|
|
3790
3788
|
{}
|
|
3791
|
-
#line
|
|
3789
|
+
#line 3790 "src/Slice/Grammar.cpp"
|
|
3792
3790
|
break;
|
|
3793
3791
|
|
|
3794
3792
|
case 174: /* keyword: "true keyword" */
|
|
3795
|
-
#line
|
|
3793
|
+
#line 1685 "src/Slice/Grammar.y"
|
|
3796
3794
|
{}
|
|
3797
|
-
#line
|
|
3795
|
+
#line 3796 "src/Slice/Grammar.cpp"
|
|
3798
3796
|
break;
|
|
3799
3797
|
|
|
3800
3798
|
case 175: /* keyword: "idempotent keyword" */
|
|
3801
|
-
#line
|
|
3799
|
+
#line 1686 "src/Slice/Grammar.y"
|
|
3802
3800
|
{}
|
|
3803
|
-
#line
|
|
3801
|
+
#line 3802 "src/Slice/Grammar.cpp"
|
|
3804
3802
|
break;
|
|
3805
3803
|
|
|
3806
3804
|
case 176: /* keyword: "optional keyword" */
|
|
3807
|
-
#line
|
|
3805
|
+
#line 1687 "src/Slice/Grammar.y"
|
|
3808
3806
|
{}
|
|
3809
|
-
#line
|
|
3807
|
+
#line 3808 "src/Slice/Grammar.cpp"
|
|
3810
3808
|
break;
|
|
3811
3809
|
|
|
3812
3810
|
case 177: /* keyword: "Value keyword" */
|
|
3813
|
-
#line
|
|
3811
|
+
#line 1688 "src/Slice/Grammar.y"
|
|
3814
3812
|
{}
|
|
3815
|
-
#line
|
|
3813
|
+
#line 3814 "src/Slice/Grammar.cpp"
|
|
3816
3814
|
break;
|
|
3817
3815
|
|
|
3818
3816
|
|
|
3819
|
-
#line
|
|
3817
|
+
#line 3818 "src/Slice/Grammar.cpp"
|
|
3820
3818
|
|
|
3821
3819
|
default: break;
|
|
3822
3820
|
}
|
|
@@ -4045,7 +4043,7 @@ yyreturnlab:
|
|
|
4045
4043
|
return yyresult;
|
|
4046
4044
|
}
|
|
4047
4045
|
|
|
4048
|
-
#line
|
|
4046
|
+
#line 1691 "src/Slice/Grammar.y"
|
|
4049
4047
|
|
|
4050
4048
|
|
|
4051
4049
|
// NOLINTEND
|
|
@@ -4055,14 +4053,13 @@ namespace
|
|
|
4055
4053
|
TypePtr lookupTypeByName(const string& name, bool expectInterfaceType)
|
|
4056
4054
|
{
|
|
4057
4055
|
ContainerPtr cont = currentUnit->currentContainer();
|
|
4058
|
-
|
|
4059
|
-
if (
|
|
4056
|
+
TypePtr resolvedType = cont->lookupType(name);
|
|
4057
|
+
if (resolvedType == nullptr)
|
|
4060
4058
|
{
|
|
4061
4059
|
return nullptr;
|
|
4062
4060
|
}
|
|
4063
4061
|
|
|
4064
|
-
|
|
4065
|
-
auto interface = dynamic_pointer_cast<InterfaceDecl>(firstType);
|
|
4062
|
+
auto interface = dynamic_pointer_cast<InterfaceDecl>(resolvedType);
|
|
4066
4063
|
if (interface && !expectInterfaceType)
|
|
4067
4064
|
{
|
|
4068
4065
|
string msg = "add a '*' after the interface name to specify its proxy type: '" + name + "*'";
|
|
@@ -4075,7 +4072,7 @@ namespace
|
|
|
4075
4072
|
}
|
|
4076
4073
|
|
|
4077
4074
|
cont->checkHasChangedMeaning(name);
|
|
4078
|
-
return
|
|
4075
|
+
return resolvedType;
|
|
4079
4076
|
}
|
|
4080
4077
|
|
|
4081
4078
|
InterfaceDefPtr lookupInterfaceByName(const string& name)
|