forked from jasder/antlr
Runtime Cpp: disable warnings and remove unnecessary files
Signed-off-by: Mike Lischke <mike@lischke-online.de>
This commit is contained in:
parent
0835c52a67
commit
5653be36fa
|
@ -89,7 +89,6 @@ MACRO(ADD_PRECOMPILED_HEADER _targetName _input )
|
|||
SET(_output "${_outdir}/${CMAKE_BUILD_TYPE}.c++")
|
||||
STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name)
|
||||
SET(_compiler_FLAGS ${${_flags_var_name}})
|
||||
|
||||
GET_DIRECTORY_PROPERTY(_directory_flags INCLUDE_DIRECTORIES)
|
||||
FOREACH(item ${_directory_flags})
|
||||
LIST(APPEND _compiler_FLAGS "-I${item}")
|
||||
|
@ -110,8 +109,14 @@ MACRO(ADD_PRECOMPILED_HEADER _targetName _input )
|
|||
ADD_DEPENDENCIES(${_targetName} ${_targetName}_gch)
|
||||
#SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-include ${_name} -Winvalid-pch -H")
|
||||
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include ${_name} -Winvalid-pch")
|
||||
GET_TARGET_PROPERTY(old_compile_flags ${_targetName} COMPILE_FLAGS)
|
||||
IF(old_compile_flags STREQUAL "old_compile_flags-NOTFOUND")
|
||||
SET(old_compile_flags "-include ${_name} -Winvalid-pch")
|
||||
ELSE()
|
||||
SET(old_compile_flags "${old_compile_flags} -include ${_name} -Winvalid-pch")
|
||||
ENDIF()
|
||||
SET_TARGET_PROPERTIES(${_targetName} PROPERTIES
|
||||
COMPILE_FLAGS "-include ${_name} -Winvalid-pch"
|
||||
COMPILE_FLAGS "${old_compile_flags}"
|
||||
)
|
||||
|
||||
ENDMACRO(ADD_PRECOMPILED_HEADER)
|
||||
|
|
|
@ -26,7 +26,7 @@ include_directories(
|
|||
|
||||
#file(GLOB antlr4-demo_SRC "${PROJECT_SOURCE_DIR}/demo/generated/*")
|
||||
set(antlr4-demo_SRC
|
||||
Linux/main.cpp
|
||||
${PROJECT_SOURCE_DIR}/demo/Linux/main.cpp
|
||||
${PROJECT_SOURCE_DIR}/demo/generated/TLexer.cpp
|
||||
${PROJECT_SOURCE_DIR}/demo/generated/TParser.cpp
|
||||
${PROJECT_SOURCE_DIR}/demo/generated/TParserBaseListener.cpp
|
||||
|
@ -35,6 +35,14 @@ set(antlr4-demo_SRC
|
|||
${PROJECT_SOURCE_DIR}/demo/generated/TParserVisitor.cpp
|
||||
)
|
||||
|
||||
foreach( src_file ${antlr4-demo_SRC} )
|
||||
set_source_files_properties(
|
||||
${src_file}
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS -Wno-overloaded-virtual
|
||||
)
|
||||
endforeach( src_file ${antlr4-demo_SRC} )
|
||||
|
||||
add_executable(antlr4-demo
|
||||
${antlr4-demo_SRC}
|
||||
)
|
||||
|
@ -44,15 +52,6 @@ add_dependencies(antlr4-demo GenerateParser)
|
|||
|
||||
target_link_libraries(antlr4-demo antlr4_static)
|
||||
|
||||
#foreach(src ${antlr4-demo_SRC})
|
||||
# get_source_file_property(old_compile_flags ${src} COMPILE_FLAGS)
|
||||
# if(old_compile_flags STREQUAL "NOTFOUND")
|
||||
# set(old_compile_flags "")
|
||||
# endif()
|
||||
# set_source_files_properties(${src} PROPERTIES COMPILE_FLAGS
|
||||
# "${old_compile_flags} -include \"${PROJECT_SOURCE_DIR}/runtime/src/antlrcpp-Prefix.h\"")
|
||||
#endforeach()
|
||||
|
||||
install(TARGETS antlr4-demo
|
||||
DESTINATION "share"
|
||||
COMPONENT dev
|
||||
|
|
|
@ -20,30 +20,42 @@ file(GLOB libantlrcpp_SRC
|
|||
"${PROJECT_SOURCE_DIR}/runtime/src/tree/pattern/*.cpp"
|
||||
)
|
||||
|
||||
list(REMOVE_ITEM libantlrcpp_SRC ${PROJECT_SOURCE_DIR}/runtime/src/misc/TestRig.cpp)
|
||||
|
||||
add_library(antlr4_shared SHARED ${libantlrcpp_SRC})
|
||||
add_library(antlr4_static STATIC ${libantlrcpp_SRC})
|
||||
add_precompiled_header(antlr4_shared ${PROJECT_SOURCE_DIR}/runtime/src/antlrcpp-Prefix.h)
|
||||
add_precompiled_header(antlr4_static ${PROJECT_SOURCE_DIR}/runtime/src/antlrcpp-Prefix.h)
|
||||
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
target_link_libraries(antlr4_shared ${UUID_LIBRARIES})
|
||||
target_link_libraries(antlr4_static ${UUID_LIBRARIES})
|
||||
elseif(APPLE)
|
||||
# target_link_libraries(antlr4 "-framework CoreFoundation")
|
||||
target_link_libraries(antlr4_shared ${COREFOUNDATION_LIBRARY})
|
||||
target_link_libraries(antlr4_static ${COREFOUNDATION_LIBRARY})
|
||||
|
||||
endif()
|
||||
|
||||
set(disabled_compile_warnings "-Wno-overloaded-virtual")
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
set(disabled_compile_warnings "${disabled_compile_warnings} -Wno-dollar-in-identifier-extension -Wno-four-char-constants")
|
||||
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
|
||||
set(disabled_compile_warnings "${disabled_compile_warnings} -Wno-multichar")
|
||||
endif()
|
||||
|
||||
|
||||
set_target_properties(antlr4_shared
|
||||
PROPERTIES VERSION ${ANTLR_VERSION}
|
||||
SOVERSION ${ANTLR_VERSION}
|
||||
OUTPUT_NAME antlr4)
|
||||
OUTPUT_NAME antlr4
|
||||
COMPILE_FLAGS "${disabled_compile_warnings}")
|
||||
|
||||
set_target_properties(antlr4_static
|
||||
PROPERTIES VERSION ${ANTLR_VERSION}
|
||||
SOVERSION ${ANTLR_VERSION}
|
||||
OUTPUT_NAME antlr4)
|
||||
OUTPUT_NAME antlr4
|
||||
COMPILE_FLAGS "${disabled_compile_warnings}")
|
||||
|
||||
add_precompiled_header(antlr4_shared ${PROJECT_SOURCE_DIR}/runtime/src/antlrcpp-Prefix.h)
|
||||
add_precompiled_header(antlr4_static ${PROJECT_SOURCE_DIR}/runtime/src/antlrcpp-Prefix.h)
|
||||
|
||||
install(TARGETS antlr4_shared
|
||||
DESTINATION lib)
|
||||
|
|
|
@ -34,4 +34,4 @@
|
|||
using namespace org::antlr::v4::runtime;
|
||||
|
||||
CharStream::~CharStream() {
|
||||
};
|
||||
}
|
||||
|
|
|
@ -164,7 +164,7 @@ std::wstring RuleContext::toString(const std::vector<std::wstring> &ruleNames, R
|
|||
|
||||
std::wstring RuleContext::toString() {
|
||||
return toString(nullptr);
|
||||
};
|
||||
}
|
||||
|
||||
std::wstring RuleContext::toString(Recognizer *recog) {
|
||||
return toString(recog, ParserRuleContext::EMPTY);
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* [The "BSD license"]
|
||||
* Copyright (c) 2016 Mike Lischke
|
||||
* Copyright (c) 2013 Terence Parr
|
||||
* Copyright (c) 2013 Dan McLaughlin
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "TokenFactory.h"
|
||||
|
||||
using namespace org::antlr::v4::runtime;
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* [The "BSD license"]
|
||||
* Copyright (c) 2016 Mike Lischke
|
||||
* Copyright (c) 2013 Terence Parr
|
||||
* Copyright (c) 2013 Dan McLaughlin
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "TokenSource.h"
|
||||
|
||||
using namespace org::antlr::v4::runtime;
|
|
@ -101,7 +101,7 @@ namespace runtime {
|
|||
/// </summary>
|
||||
/// <param name="factory"> The <seealso cref="TokenFactory"/> to use for creating tokens. </param>
|
||||
template<typename T1>
|
||||
void setTokenFactory(TokenFactory<T1> * /*factory*/) {};
|
||||
void setTokenFactory(TokenFactory<T1> */*factory*/) {}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <seealso cref="TokenFactory"/> this token source is currently using for
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* [The "BSD license"]
|
||||
* Copyright (c) 2016 Mike Lischke
|
||||
* Copyright (c) 2013 Terence Parr
|
||||
* Copyright (c) 2013 Dan McLaughlin
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "WritableToken.h"
|
||||
|
||||
using namespace org::antlr::v4::runtime;
|
|
@ -46,7 +46,7 @@ ATNState::~ATNState() {
|
|||
for (auto transition : transitions) {
|
||||
delete transition;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const std::vector<std::wstring> ATNState::serializationNames = {
|
||||
L"INVALID", L"BASIC", L"RULE_START", L"BLOCK_START",
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* [The "BSD license"]
|
||||
* Copyright (c) 2016 Mike Lischke
|
||||
* Copyright (c) 2013 Terence Parr
|
||||
* Copyright (c) 2013 Dan McLaughlin
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "ATNType.h"
|
||||
|
||||
using namespace org::antlr::v4::runtime::atn;
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* [The "BSD license"]
|
||||
* Copyright (c) 2016 Mike Lischke
|
||||
* Copyright (c) 2013 Terence Parr
|
||||
* Copyright (c) 2013 Sam Harwell
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "LexerActionType.h"
|
||||
|
||||
using namespace org::antlr::v4::runtime::atn;
|
|
@ -76,7 +76,7 @@ Ref<PredictionContext> PredictionContext::fromRuleContext(const ATN &atn, Ref<Ru
|
|||
|
||||
bool PredictionContext::operator != (const PredictionContext &o) const {
|
||||
return !(*this == o);
|
||||
};
|
||||
}
|
||||
|
||||
bool PredictionContext::isEmpty() const {
|
||||
return this == EMPTY.get();
|
||||
|
|
|
@ -56,11 +56,13 @@ size_t SingletonPredictionContext::size() const {
|
|||
|
||||
std::weak_ptr<PredictionContext> SingletonPredictionContext::getParent(size_t index) const {
|
||||
assert(index == 0);
|
||||
((void)(index)); // Make Release build happy
|
||||
return parent;
|
||||
}
|
||||
|
||||
int SingletonPredictionContext::getReturnState(size_t index) const {
|
||||
assert(index == 0);
|
||||
((void)(index)); // Make Release build happy
|
||||
return returnState;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* [The "BSD license"]
|
||||
* Copyright (c) 2016 Mike Lischke
|
||||
* Copyright (c) 2014 Terence Parr
|
||||
* Copyright (c) 2014 Dan McLaughlin
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "Predicate.h"
|
|
@ -88,7 +88,7 @@ namespace tree {
|
|||
/// The default implementation returns the result of
|
||||
/// <seealso cref="#defaultResult defaultResult"/>.
|
||||
/// </summary>
|
||||
virtual T* visitTerminal(TerminalNode * /*node*/) override {
|
||||
virtual T* visitTerminal(/* TerminalNode *node */) override {
|
||||
return defaultResult();
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ namespace tree {
|
|||
/// The default implementation returns the result of
|
||||
/// <seealso cref="#defaultResult defaultResult"/>.
|
||||
/// </summary>
|
||||
virtual T* visitErrorNode(ErrorNode * /*node*/) override {
|
||||
virtual T* visitErrorNode(/* ErrorNode *node */) override {
|
||||
return defaultResult();
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ namespace tree {
|
|||
/// a child node.
|
||||
/// </param>
|
||||
/// <returns> The updated aggregate result. </returns>
|
||||
virtual T* aggregateResult(T* /*aggregate*/, T* nextResult) {
|
||||
virtual T* aggregateResult(/* T* aggregate, */ T* nextResult) {
|
||||
return nextResult;
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ namespace tree {
|
|||
/// <returns> {@code true} to continue visiting children. Otherwise return
|
||||
/// {@code false} to stop visiting children and immediately return the
|
||||
/// current aggregate result from <seealso cref="#visitChildren"/>. </returns>
|
||||
virtual bool shouldVisitNextChild(RuleNode * /*node*/, T /*currentResult*/) {
|
||||
virtual bool shouldVisitNextChild(/*RuleNode *node, T currentResult*/) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* [The "BSD license"]
|
||||
* Copyright (c) 2016 Mike Lischke
|
||||
* Copyright (c) 2013 Terence Parr
|
||||
* Copyright (c) 2013 Dan McLaughlin
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "ParseTreeListener.h"
|
||||
|
||||
using namespace org::antlr::v4::runtime::tree;
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* [The "BSD license"]
|
||||
* Copyright (c) 2016 Mike Lischke
|
||||
* Copyright (c) 2013 Terence Parr
|
||||
* Copyright (c) 2013 Dan McLaughlin
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "ParseTreeProperty.h"
|
||||
|
||||
using namespace org::antlr::v4::runtime::tree;
|
Loading…
Reference in New Issue