diff --git a/runtime/Cpp/runtime/antlr4cpp-vs2019.vcxproj b/runtime/Cpp/runtime/antlr4cpp-vs2019.vcxproj
new file mode 100644
index 000000000..b93d8f641
--- /dev/null
+++ b/runtime/Cpp/runtime/antlr4cpp-vs2019.vcxproj
@@ -0,0 +1,651 @@
+
+
+
+
+ Debug Static
+ Win32
+
+
+ Debug Static
+ x64
+
+
+ Debug DLL
+ Win32
+
+
+ Debug DLL
+ x64
+
+
+ Release Static
+ Win32
+
+
+ Release Static
+ x64
+
+
+ Release DLL
+ Win32
+
+
+ Release DLL
+ x64
+
+
+
+ {83BE66CD-9C4F-4F84-B72A-DD1855C8FC8A}
+ Win32Proj
+ antlr4cpp
+ 10.0
+
+
+
+ DynamicLibrary
+ true
+ Unicode
+ v142
+
+
+ StaticLibrary
+ true
+ Unicode
+ v142
+
+
+ DynamicLibrary
+ true
+ Unicode
+ v142
+
+
+ StaticLibrary
+ true
+ Unicode
+ v142
+
+
+ DynamicLibrary
+ false
+ true
+ Unicode
+ v142
+
+
+ StaticLibrary
+ false
+ true
+ Unicode
+ v142
+
+
+ DynamicLibrary
+ false
+ true
+ Unicode
+ v142
+
+
+ StaticLibrary
+ false
+ true
+ Unicode
+ v142
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ $(SolutionDir)bin\vs-2019\$(PlatformTarget)\$(Configuration)\
+ $(SolutionDir)obj\$(PlatformTarget)\$(Configuration)\$(ProjectName)\
+ antlr4-runtime
+
+
+ true
+ $(SolutionDir)bin\vs-2019\$(PlatformTarget)\$(Configuration)\
+ $(SolutionDir)obj\$(PlatformTarget)\$(Configuration)\$(ProjectName)\
+ antlr4-runtime
+
+
+ true
+ $(SolutionDir)bin\vs-2019\$(PlatformTarget)\$(Configuration)\
+ $(SolutionDir)obj\$(PlatformTarget)\$(Configuration)\$(ProjectName)\
+ antlr4-runtime
+
+
+ true
+ $(SolutionDir)bin\vs-2019\$(PlatformTarget)\$(Configuration)\
+ $(SolutionDir)obj\$(PlatformTarget)\$(Configuration)\$(ProjectName)\
+ antlr4-runtime
+
+
+ false
+ $(SolutionDir)bin\vs-2019\$(PlatformTarget)\$(Configuration)\
+ $(SolutionDir)obj\$(PlatformTarget)\$(Configuration)\$(ProjectName)\
+ antlr4-runtime
+
+
+ false
+ $(SolutionDir)bin\vs-2019\$(PlatformTarget)\$(Configuration)\
+ $(SolutionDir)obj\$(PlatformTarget)\$(Configuration)\$(ProjectName)\
+ antlr4-runtime
+
+
+ false
+ $(SolutionDir)bin\vs-2019\$(PlatformTarget)\$(Configuration)\
+ $(SolutionDir)obj\$(PlatformTarget)\$(Configuration)\$(ProjectName)\
+ antlr4-runtime
+
+
+ false
+ $(SolutionDir)bin\vs-2019\$(PlatformTarget)\$(Configuration)\
+ $(SolutionDir)obj\$(PlatformTarget)\$(Configuration)\$(ProjectName)\
+ antlr4-runtime
+
+
+
+ Level4
+ Disabled
+ ANTLR4CPP_EXPORTS;%(PreprocessorDefinitions)
+ src;%(AdditionalIncludeDirectories)
+
+
+
+
+ 4251
+ true
+ false
+
+
+ Windows
+ true
+
+
+
+
+ Level4
+ Disabled
+ ANTLR4CPP_EXPORTS;%(PreprocessorDefinitions)
+ src;%(AdditionalIncludeDirectories)
+
+
+
+
+ 4251
+ true
+ false
+
+
+ Windows
+ true
+
+
+
+
+ Level4
+ Disabled
+ ANTLR4CPP_EXPORTS;%(PreprocessorDefinitions)
+ src;%(AdditionalIncludeDirectories)
+
+
+
+
+ 4251
+ true
+ false
+
+
+ Windows
+ true
+
+
+
+
+ Level4
+ Disabled
+ ANTLR4CPP_STATIC;%(PreprocessorDefinitions)
+ src;%(AdditionalIncludeDirectories)
+
+
+
+
+ 4251
+ true
+ false
+
+
+ Windows
+ true
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ANTLR4CPP_DLL;ANTLR4CPP_EXPORTS;%(PreprocessorDefinitions)
+ src;%(AdditionalIncludeDirectories)
+
+
+
+
+ 4251
+ true
+
+
+ Windows
+ true
+ true
+ true
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ANTLR4CPP_EXPORTS;%(PreprocessorDefinitions)
+ src;%(AdditionalIncludeDirectories)
+
+
+
+
+ 4251
+ true
+
+
+ Windows
+ true
+ true
+ true
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ANTLR4CPP_DLL;ANTLR4CPP_EXPORTS;%(PreprocessorDefinitions)
+ src;%(AdditionalIncludeDirectories)
+
+
+
+
+ 4251
+ true
+
+
+ Windows
+ true
+ true
+ true
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ANTLR4CPP_STATIC;%(PreprocessorDefinitions)
+ src;%(AdditionalIncludeDirectories)
+
+
+
+
+ 4251
+ true
+
+
+ Windows
+ true
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/runtime/Cpp/runtime/antlr4cpp-vs2019.vcxproj.filters b/runtime/Cpp/runtime/antlr4cpp-vs2019.vcxproj.filters
new file mode 100644
index 000000000..eb3b687be
--- /dev/null
+++ b/runtime/Cpp/runtime/antlr4cpp-vs2019.vcxproj.filters
@@ -0,0 +1,987 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hpp;hxx;hm;inl;inc;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
+
+
+ {587a2726-4856-4d21-937a-fbaebaa90232}
+
+
+ {2662156f-1508-4dad-b991-a8298a6db9bf}
+
+
+ {5b1e59b1-7fa5-46a5-8d92-965bd709cca0}
+
+
+ {9de9fe74-5d67-441d-a972-3cebe6dfbfcc}
+
+
+ {89fd3896-0ab1-476d-8d64-a57f10a5e73b}
+
+
+ {23939d7b-8e11-421e-80eb-b2cfdfdd64e9}
+
+
+ {05f2bacb-b5b2-4ca3-abe1-ca9a7239ecaa}
+
+
+ {d3b2ae2d-836b-4c73-8180-aca4ebb7d658}
+
+
+ {6674a0f0-c65d-4a00-a9e5-1f243b89d0a2}
+
+
+ {1893fffe-7a2b-4708-8ce5-003aa9b749f7}
+
+
+ {053a0632-27bc-4043-b5e8-760951b3b5b9}
+
+
+ {048c180d-44cf-49ca-a7aa-d0053fea07f5}
+
+
+ {3181cae5-cc15-4050-8c45-22af44a823de}
+
+
+ {290632d2-c56e-4005-a417-eb83b9531e1a}
+
+
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\dfa
+
+
+ Header Files\dfa
+
+
+ Header Files\dfa
+
+
+ Header Files\dfa
+
+
+ Header Files\misc
+
+
+ Header Files\misc
+
+
+ Header Files\misc
+
+
+ Header Files\support
+
+
+ Header Files\support
+
+
+ Header Files\support
+
+
+ Header Files\support
+
+
+ Header Files\support
+
+
+ Header Files\tree
+
+
+ Header Files\tree
+
+
+ Header Files\tree
+
+
+ Header Files\tree
+
+
+ Header Files\tree
+
+
+ Header Files\tree
+
+
+ Header Files\tree
+
+
+ Header Files\tree
+
+
+ Header Files\tree
+
+
+ Header Files\tree
+
+
+ Header Files\tree
+
+
+ Header Files\tree
+
+
+ Header Files\tree
+
+
+ Header Files\tree\pattern
+
+
+ Header Files\tree\pattern
+
+
+ Header Files\tree\pattern
+
+
+ Header Files\tree\pattern
+
+
+ Header Files\tree\pattern
+
+
+ Header Files\tree\pattern
+
+
+ Header Files\tree\pattern
+
+
+ Header Files\tree\pattern
+
+
+ Header Files\tree\xpath
+
+
+ Header Files
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\atn
+
+
+ Header Files\misc
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files\support
+
+
+ Header Files\tree\xpath
+
+
+ Header Files\tree\xpath
+
+
+ Header Files\tree\xpath
+
+
+ Header Files\tree\xpath
+
+
+ Header Files\tree\xpath
+
+
+ Header Files\tree\xpath
+
+
+ Header Files\tree\xpath
+
+
+ Header Files\tree\xpath
+
+
+ Header Files\tree\xpath
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files\tree
+
+
+ Header Files
+
+
+ Header Files\support
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\dfa
+
+
+ Source Files\dfa
+
+
+ Source Files\dfa
+
+
+ Source Files\dfa
+
+
+ Source Files\misc
+
+
+ Source Files\misc
+
+
+ Source Files\misc
+
+
+ Source Files\support
+
+
+ Source Files\support
+
+
+ Source Files\support
+
+
+ Source Files\tree
+
+
+ Source Files\tree
+
+
+ Source Files\tree
+
+
+ Source Files\tree
+
+
+ Source Files\tree\pattern
+
+
+ Source Files\tree\pattern
+
+
+ Source Files\tree\pattern
+
+
+ Source Files\tree\pattern
+
+
+ Source Files\tree\pattern
+
+
+ Source Files\tree\pattern
+
+
+ Source Files\tree\pattern
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files\support
+
+
+ Source Files\tree\xpath
+
+
+ Source Files\tree\xpath
+
+
+ Source Files\tree\xpath
+
+
+ Source Files\tree\xpath
+
+
+ Source Files\tree\xpath
+
+
+ Source Files\tree\xpath
+
+
+ Source Files\tree\xpath
+
+
+ Source Files\tree\xpath
+
+
+ Source Files\tree\xpath
+
+
+ Source Files\tree\xpath
+
+
+ Source Files
+
+
+ Source Files\tree
+
+
+ Source Files\tree
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files\atn
+
+
+ Source Files\atn
+
+
+ Source Files\misc
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files\support
+
+
+ Source Files\tree
+
+
+ Source Files\tree
+
+
+ Source Files\tree
+
+
+ Source Files\tree
+
+
+ Source Files\tree\pattern
+
+
+
\ No newline at end of file
diff --git a/runtime/Cpp/runtime/antlrcpp.xcodeproj/xcshareddata/xcschemes/antlr4.xcscheme b/runtime/Cpp/runtime/antlrcpp.xcodeproj/xcshareddata/xcschemes/antlr4.xcscheme
index f2e132436..dc8e3432a 100644
--- a/runtime/Cpp/runtime/antlrcpp.xcodeproj/xcshareddata/xcschemes/antlr4.xcscheme
+++ b/runtime/Cpp/runtime/antlrcpp.xcodeproj/xcshareddata/xcschemes/antlr4.xcscheme
@@ -29,8 +29,6 @@
shouldUseLaunchSchemeArgsEnv = "YES">
-
-
-
-
> XPath::split(const std::string &path) {
@@ -134,14 +133,16 @@ std::vector XPath::evaluate(ParseTree *t) {
std::vector work = { &dummyRoot };
size_t i = 0;
- while (i < _elements.size()) {
+ std::vector> elements = split(_path);
+
+ while (i < elements.size()) {
std::vector next;
for (auto node : work) {
if (!node->children.empty()) {
// only try to match next element if it has children
// e.g., //func/*/stat might have a token node for which
// we can't go looking for stat nodes.
- auto matching = _elements[i]->evaluate(node);
+ auto matching = elements[i]->evaluate(node);
next.insert(next.end(), matching.begin(), matching.end());
}
}
diff --git a/runtime/Cpp/runtime/src/tree/xpath/XPath.h b/runtime/Cpp/runtime/src/tree/xpath/XPath.h
index 0360c3861..e38d482d5 100755
--- a/runtime/Cpp/runtime/src/tree/xpath/XPath.h
+++ b/runtime/Cpp/runtime/src/tree/xpath/XPath.h
@@ -73,7 +73,6 @@ namespace xpath {
protected:
std::string _path;
- std::vector> _elements;
Parser *_parser;
/// Convert word like {@code *} or {@code ID} or {@code expr} to a path