diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-15 11:15:28 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-15 11:15:28 +0900 |
commit | 4aa4e498d10e343b3b2a49e06195f62a49120002 (patch) | |
tree | ff9645788017052b9d83d196cc25bddcfcf1708b /vhdlparser | |
parent | fd5021ef77ddac91004a2b9c549e08ea952bce89 (diff) | |
download | doxygen-4aa4e498d10e343b3b2a49e06195f62a49120002.tar.gz doxygen-4aa4e498d10e343b3b2a49e06195f62a49120002.tar.bz2 doxygen-4aa4e498d10e343b3b2a49e06195f62a49120002.zip |
Imported Upstream version 1.9.0upstream/1.9.0
Diffstat (limited to 'vhdlparser')
-rw-r--r-- | vhdlparser/CMakeLists.txt | 17 | ||||
-rw-r--r-- | vhdlparser/VhdlParser.cc | 2 | ||||
-rw-r--r-- | vhdlparser/vhdl_adj.py | 25 | ||||
-rwxr-xr-x | vhdlparser/vhdlparser.jj | 2 |
4 files changed, 39 insertions, 7 deletions
diff --git a/vhdlparser/CMakeLists.txt b/vhdlparser/CMakeLists.txt index 53983f5..b610f5c 100644 --- a/vhdlparser/CMakeLists.txt +++ b/vhdlparser/CMakeLists.txt @@ -21,21 +21,28 @@ if (JAVACC_FOUND) else() add_custom_command( - COMMAND ${JAVACC_EXECUTABLE} ${JAVACC_FLAGS} -OUTPUT_DIRECTORY=${CMAKE_SOURCE_DIR}/vhdlparser ${CMAKE_SOURCE_DIR}/vhdlparser/vhdlparser.jj - DEPENDS ${CMAKE_SOURCE_DIR}/vhdlparser/vhdlparser.jj - OUTPUT ${CMAKE_SOURCE_DIR}/vhdlparser/CharStream.cc ${CMAKE_SOURCE_DIR}/vhdlparser/CharStream.h ${CMAKE_SOURCE_DIR}/vhdlparser/ErrorHandler.h ${CMAKE_SOURCE_DIR}/vhdlparser/ParseException.cc ${CMAKE_SOURCE_DIR}/vhdlparser/ParseException.h ${CMAKE_SOURCE_DIR}/vhdlparser/Token.cc ${CMAKE_SOURCE_DIR}/vhdlparser/Token.h ${CMAKE_SOURCE_DIR}/vhdlparser/TokenManager.h ${CMAKE_SOURCE_DIR}/vhdlparser/TokenMgrError.cc ${CMAKE_SOURCE_DIR}/vhdlparser/TokenMgrError.h ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParser.cc ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParser.h ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParserConstants.h ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParserTokenManager.cc ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParserTokenManager.h + COMMAND ${JAVACC_EXECUTABLE} ${JAVACC_FLAGS} -OUTPUT_DIRECTORY=${PROJECT_SOURCE_DIR}/vhdlparser ${PROJECT_SOURCE_DIR}/vhdlparser/vhdlparser.jj + DEPENDS ${PROJECT_SOURCE_DIR}/vhdlparser/vhdlparser.jj + OUTPUT ${PROJECT_SOURCE_DIR}/vhdlparser/CharStream.cc ${PROJECT_SOURCE_DIR}/vhdlparser/CharStream.h ${PROJECT_SOURCE_DIR}/vhdlparser/ErrorHandler.h ${PROJECT_SOURCE_DIR}/vhdlparser/ParseException.cc ${PROJECT_SOURCE_DIR}/vhdlparser/ParseException.h ${PROJECT_SOURCE_DIR}/vhdlparser/Token.cc ${PROJECT_SOURCE_DIR}/vhdlparser/Token.h ${PROJECT_SOURCE_DIR}/vhdlparser/TokenManager.h ${PROJECT_SOURCE_DIR}/vhdlparser/TokenMgrError.cc ${PROJECT_SOURCE_DIR}/vhdlparser/TokenMgrError.h ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParser.cc ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParser.h ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParserConstants.h ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParserTokenManager.cc ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParserTokenManager.h ) endif() endif() -include_directories(${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/qtools ${GENERATED_SRC}) +add_custom_command( + COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/vhdlparser/vhdl_adj.py ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParser.cc ${GENERATED_SRC}/VhdlParser_adj.cc + DEPENDS ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParser.cc ${PROJECT_SOURCE_DIR}/vhdlparser/vhdl_adj.py + OUTPUT ${GENERATED_SRC}/VhdlParser_adj.cc +) +set_source_files_properties(${GENERATED_SRC}/VhdlParser_adj.cc PROPERTIES GENERATED 1) + +include_directories(${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/qtools ${PROJECT_SOURCE_DIR}/vhdlparser ${GENERATED_SRC}) add_library(vhdlparser STATIC CharStream.cc ParseException.cc Token.cc TokenMgrError.cc -VhdlParser.cc +${GENERATED_SRC}/VhdlParser_adj.cc VhdlParserTokenManager.cc ) add_dependencies(vhdlparser diff --git a/vhdlparser/VhdlParser.cc b/vhdlparser/VhdlParser.cc index 3c0fe35..e039b33 100644 --- a/vhdlparser/VhdlParser.cc +++ b/vhdlparser/VhdlParser.cc @@ -4541,7 +4541,7 @@ assert(false); } -QCString VhdlParser::instantiation_unit() {QCString s,s1,s2;Token *tok; +QCString VhdlParser::instantiation_unit() {QCString s,s1,s2; switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { case COMPONENT_T: case BASIC_IDENTIFIER: diff --git a/vhdlparser/vhdl_adj.py b/vhdlparser/vhdl_adj.py new file mode 100644 index 0000000..a431970 --- /dev/null +++ b/vhdlparser/vhdl_adj.py @@ -0,0 +1,25 @@ +#!/usr/bin/python +# python script to generate configoptions.cpp and config.doc from config.xml +# +# Copyright (C) 1997-2020 by Dimitri van Heesch. +# +# Permission to use, copy, modify, and distribute this software and its +# documentation under the terms of the GNU General Public License is hereby +# granted. No representations are made about the suitability of this software +# for any purpose. It is provided "as is" without express or implied warranty. +# See the GNU General Public License for more details. +# +# Documents produced by Doxygen are derivative works derived from the +# input used in their production; they are not affected by this license. + +import sys + +def main(): + inputFile = open(sys.argv[1], 'r') + outputFile = open(sys.argv[2], 'w') + for line in inputFile: + outputFile.write(line.replace("assert(false);","assert(false);return \"\";")) + +if __name__ == '__main__': + main() + diff --git a/vhdlparser/vhdlparser.jj b/vhdlparser/vhdlparser.jj index 177b5f4..e263289 100755 --- a/vhdlparser/vhdlparser.jj +++ b/vhdlparser/vhdlparser.jj @@ -1404,7 +1404,7 @@ QCString index_subtype_definition() : {QCString s;} s=type_mark() <RANGE_T> <BOX_T> { return s+" range <> ";} } -QCString instantiation_unit() : {QCString s,s1,s2;Token *tok;} +QCString instantiation_unit() : {QCString s,s1,s2;} { [ <COMPONENT_T> ] s=identifier() {s1="component "; return s; } | <ENTITY_T> [LOOKAHEAD(2)<BASIC_IDENTIFIER> <DOT_T>] s2=name() {s="entity|"+s2;} [ <LPAREN_T> s1=identifier() <RPAREN_T> {s+="(";s+=s1;s+=")" ;}] { return s;} |