diff options
author | Brad King <brad.king@kitware.com> | 2017-05-01 13:18:00 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-05-01 13:18:06 (GMT) |
commit | e80e8eb609cc7dd8c4dca46b9c2819afd2293229 (patch) | |
tree | 0e4a244bc10180e3533ddb0364eb067610471e9e /Source | |
parent | 79f4a772dc268cdd5d2bc4ec51b5f57cf26b1751 (diff) | |
parent | 7f4eaf234820be3e62217c4a7597d7ef96179e97 (diff) | |
download | CMake-e80e8eb609cc7dd8c4dca46b9c2819afd2293229.zip CMake-e80e8eb609cc7dd8c4dca46b9c2819afd2293229.tar.gz CMake-e80e8eb609cc7dd8c4dca46b9c2819afd2293229.tar.bz2 |
Merge topic 'yacclex-clang-tidy'
7f4eaf23 LexerParser: disable clang-tidy checks
9bad0dfc LexerParser: move to custom directory
8927e913 CMakeLists: remove option to regenerate yacc/lex
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !775
Diffstat (limited to 'Source')
-rw-r--r-- | Source/.gitattributes | 18 | ||||
-rw-r--r-- | Source/CMakeLists.txt | 95 | ||||
-rw-r--r-- | Source/LexerParser/.clang-tidy | 6 | ||||
-rw-r--r-- | Source/LexerParser/.gitattributes | 17 | ||||
-rw-r--r-- | Source/LexerParser/cmCommandArgumentLexer.cxx (renamed from Source/cmCommandArgumentLexer.cxx) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmCommandArgumentLexer.h (renamed from Source/cmCommandArgumentLexer.h) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmCommandArgumentLexer.in.l (renamed from Source/cmCommandArgumentLexer.in.l) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmCommandArgumentParser.cxx (renamed from Source/cmCommandArgumentParser.cxx) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmCommandArgumentParser.y (renamed from Source/cmCommandArgumentParser.y) | 1 | ||||
-rw-r--r-- | Source/LexerParser/cmCommandArgumentParserTokens.h (renamed from Source/cmCommandArgumentParserTokens.h) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmDependsJavaLexer.cxx (renamed from Source/cmDependsJavaLexer.cxx) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmDependsJavaLexer.h (renamed from Source/cmDependsJavaLexer.h) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmDependsJavaLexer.in.l (renamed from Source/cmDependsJavaLexer.in.l) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmDependsJavaParser.cxx (renamed from Source/cmDependsJavaParser.cxx) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmDependsJavaParser.y (renamed from Source/cmDependsJavaParser.y) | 3 | ||||
-rw-r--r-- | Source/LexerParser/cmDependsJavaParserTokens.h (renamed from Source/cmDependsJavaParserTokens.h) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmExprLexer.cxx (renamed from Source/cmExprLexer.cxx) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmExprLexer.h (renamed from Source/cmExprLexer.h) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmExprLexer.in.l (renamed from Source/cmExprLexer.in.l) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmExprParser.cxx (renamed from Source/cmExprParser.cxx) | 1 | ||||
-rw-r--r-- | Source/LexerParser/cmExprParser.y (renamed from Source/cmExprParser.y) | 1 | ||||
-rw-r--r-- | Source/LexerParser/cmExprParserTokens.h (renamed from Source/cmExprParserTokens.h) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmFortranLexer.cxx (renamed from Source/cmFortranLexer.cxx) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmFortranLexer.h (renamed from Source/cmFortranLexer.h) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmFortranLexer.in.l (renamed from Source/cmFortranLexer.in.l) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmFortranParser.cxx (renamed from Source/cmFortranParser.cxx) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmFortranParser.y (renamed from Source/cmFortranParser.y) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmFortranParserTokens.h (renamed from Source/cmFortranParserTokens.h) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmListFileLexer.c (renamed from Source/cmListFileLexer.c) | 0 | ||||
-rw-r--r-- | Source/LexerParser/cmListFileLexer.in.l (renamed from Source/cmListFileLexer.in.l) | 0 |
30 files changed, 53 insertions, 89 deletions
diff --git a/Source/.gitattributes b/Source/.gitattributes index f69ad9d..0f829a3 100644 --- a/Source/.gitattributes +++ b/Source/.gitattributes @@ -1,20 +1,2 @@ -/cmCommandArgumentLexer.cxx generated -/cmCommandArgumentLexer.h generated -/cmCommandArgumentParser.cxx generated -/cmCommandArgumentParserTokens.h generated -/cmDependsJavaLexer.cxx generated -/cmDependsJavaLexer.h generated -/cmDependsJavaParser.cxx generated -/cmDependsJavaParserTokens.h generated -/cmExprLexer.cxx generated -/cmExprLexer.h generated -/cmExprParser.cxx generated -/cmExprParserTokens.h generated -/cmFortranLexer.cxx generated -/cmFortranLexer.h generated -/cmFortranParser.cxx generated -/cmFortranParserTokens.h generated -/cmListFileLexer.c generated - # Do not format third-party sources. /kwsys/** -format.clang-format diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 8d683cb3f..1ea75bf 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -78,6 +78,7 @@ configure_file( include_directories( "${CMake_BINARY_DIR}/Source" "${CMake_SOURCE_DIR}/Source" + "${CMake_SOURCE_DIR}/Source/LexerParser" ${CMAKE_ZLIB_INCLUDES} ${CMAKE_EXPAT_INCLUDES} ${CMAKE_TAR_INCLUDES} @@ -88,61 +89,6 @@ include_directories( # let cmake know it is supposed to use it add_definitions(-DCMAKE_BUILD_WITH_CMAKE) -option(CMAKE_REGENERATE_YACCLEX - "Regenerate YACC and LEXX files" OFF) -mark_as_advanced(CMAKE_REGENERATE_YACCLEX) -if(CMAKE_REGENERATE_YACCLEX) - set(parsersLexers cmFortran cmCommandArgument cmExpr) - find_program(YACC_EXECUTABLE - NAMES yacc bison - PATHS /usr/bin - DOC "Yacc or Bison executable") - find_program(FLEX_EXECUTABLE - NAMES flex - PATHS /usr/bin - DOC "Flex executable") - mark_as_advanced(YACC_EXECUTABLE FLEX_EXECUTABLE) - if(YACC_EXECUTABLE) - set(BISON_FLAGS) - if(YACC_EXECUTABLE MATCHES "bison") - set(BISON_FLAGS "--yacc") - endif() - set(yacc_files) - foreach(name ${parsersLexers}) - set(src "${CMAKE_CURRENT_SOURCE_DIR}/${name}Parser.y") - set(dst "${CMAKE_CURRENT_BINARY_DIR}/${name}Parser.cxx") - set(hdr "${CMAKE_CURRENT_BINARY_DIR}/${name}ParserTokens.h") - add_custom_command( - OUTPUT "${dst}" - DEPENDS "${src}" - COMMAND - ${YACC_EXECUTABLE} - --name-prefix=${name}_yy --defines=${hdr} -o${dst} ${src} - ) - set(yacc_files ${yacc_files} "${dst}") - endforeach() - add_custom_target(RerunYacc DEPENDS ${yacc_files}) - endif() - if(FLEX_EXECUTABLE) - set(lex_files) - foreach(name ${parsersLexers}) - set(src "${CMAKE_CURRENT_SOURCE_DIR}/${name}Lexer.in.l") - set(dst "${CMAKE_CURRENT_BINARY_DIR}/${name}Lexer.cxx") - set(hdr "${CMAKE_CURRENT_BINARY_DIR}/${name}Lexer.h") - add_custom_command( - OUTPUT "${dst}" - DEPENDS "${src}" - COMMAND - ${FLEX_EXECUTABLE} - --prefix=${name}_yy --header-file=${hdr} -o${dst} ${src} - ) - set(lex_files ${lex_files} "${dst}") - endforeach() - add_custom_target(RerunLex DEPENDS ${lex_files}) - endif() - -endif() - # Check if we can build the ELF parser. if(CMAKE_USE_ELF_PARSER) set(ELF_SRCS cmELF.h cmELF.cxx) @@ -157,14 +103,40 @@ endif() # Sources for CMakeLib # set(SRCS + # Lexers/Parsers + LexerParser/cmCommandArgumentLexer.cxx + LexerParser/cmCommandArgumentLexer.h + LexerParser/cmCommandArgumentLexer.in.l + LexerParser/cmCommandArgumentParser.cxx + LexerParser/cmCommandArgumentParserTokens.h + LexerParser/cmCommandArgumentParser.y + LexerParser/cmDependsJavaLexer.cxx + LexerParser/cmDependsJavaLexer.h + LexerParser/cmDependsJavaLexer.in.l + LexerParser/cmDependsJavaParser.cxx + LexerParser/cmDependsJavaParserTokens.h + LexerParser/cmDependsJavaParser.y + LexerParser/cmExprLexer.cxx + LexerParser/cmExprLexer.h + LexerParser/cmExprLexer.in.l + LexerParser/cmExprParser.cxx + LexerParser/cmExprParserTokens.h + LexerParser/cmExprParser.y + LexerParser/cmFortranLexer.cxx + LexerParser/cmFortranLexer.h + LexerParser/cmFortranLexer.in.l + LexerParser/cmFortranParser.cxx + LexerParser/cmFortranParserTokens.h + LexerParser/cmFortranParser.y + LexerParser/cmListFileLexer.c + LexerParser/cmListFileLexer.in.l + cmArchiveWrite.cxx cmBase32.cxx cmCacheManager.cxx cmCacheManager.h cmCLocaleEnvironmentScope.h cmCLocaleEnvironmentScope.cxx - cmCommandArgumentLexer.cxx - cmCommandArgumentParser.cxx cmCommandArgumentParserHelper.cxx cmCommonTargetGenerator.cxx cmCommonTargetGenerator.h @@ -196,8 +168,6 @@ set(SRCS cmDependsFortran.h cmDependsJava.cxx cmDependsJava.h - cmDependsJavaLexer.cxx - cmDependsJavaParser.cxx cmDependsJavaParserHelper.cxx cmDependsJavaParserHelper.h cmDocumentation.cxx @@ -206,8 +176,6 @@ set(SRCS cmDynamicLoader.cxx cmDynamicLoader.h ${ELF_SRCS} - cmExprLexer.cxx - cmExprParser.cxx cmExprParserHelper.cxx cmExportBuildAndroidMKGenerator.h cmExportBuildAndroidMKGenerator.cxx @@ -247,10 +215,6 @@ set(SRCS cmFilePathChecksum.h cmFileTimeComparison.cxx cmFileTimeComparison.h - cmFortranLexer.cxx - cmFortranLexer.h - cmFortranParser.cxx - cmFortranParser.h cmFortranParserImpl.cxx cmGeneratedFileStream.cxx cmGeneratorExpressionContext.cxx @@ -302,7 +266,6 @@ set(SRCS cmLinkLineDeviceComputer.h cmListFileCache.cxx cmListFileCache.h - cmListFileLexer.c cmLocalCommonGenerator.cxx cmLocalCommonGenerator.h cmLocalGenerator.cxx diff --git a/Source/LexerParser/.clang-tidy b/Source/LexerParser/.clang-tidy new file mode 100644 index 0000000..52b11bf --- /dev/null +++ b/Source/LexerParser/.clang-tidy @@ -0,0 +1,6 @@ +--- +# We want to disable all checks for generated code. However, clang-tidy will +# assume we did not configure it correctly. Just add one check that will never +# be found. +Checks: '-*,llvm-twine-local' +... diff --git a/Source/LexerParser/.gitattributes b/Source/LexerParser/.gitattributes new file mode 100644 index 0000000..47eedfb --- /dev/null +++ b/Source/LexerParser/.gitattributes @@ -0,0 +1,17 @@ +/cmCommandArgumentLexer.cxx generated +/cmCommandArgumentLexer.h generated +/cmCommandArgumentParser.cxx generated +/cmCommandArgumentParserTokens.h generated +/cmDependsJavaLexer.cxx generated +/cmDependsJavaLexer.h generated +/cmDependsJavaParser.cxx generated +/cmDependsJavaParserTokens.h generated +/cmExprLexer.cxx generated +/cmExprLexer.h generated +/cmExprParser.cxx generated +/cmExprParserTokens.h generated +/cmFortranLexer.cxx generated +/cmFortranLexer.h generated +/cmFortranParser.cxx generated +/cmFortranParserTokens.h generated +/cmListFileLexer.c generated diff --git a/Source/cmCommandArgumentLexer.cxx b/Source/LexerParser/cmCommandArgumentLexer.cxx index 12dce37..12dce37 100644 --- a/Source/cmCommandArgumentLexer.cxx +++ b/Source/LexerParser/cmCommandArgumentLexer.cxx diff --git a/Source/cmCommandArgumentLexer.h b/Source/LexerParser/cmCommandArgumentLexer.h index 82e87b5..82e87b5 100644 --- a/Source/cmCommandArgumentLexer.h +++ b/Source/LexerParser/cmCommandArgumentLexer.h diff --git a/Source/cmCommandArgumentLexer.in.l b/Source/LexerParser/cmCommandArgumentLexer.in.l index e3a8094..e3a8094 100644 --- a/Source/cmCommandArgumentLexer.in.l +++ b/Source/LexerParser/cmCommandArgumentLexer.in.l diff --git a/Source/cmCommandArgumentParser.cxx b/Source/LexerParser/cmCommandArgumentParser.cxx index aed0826..aed0826 100644 --- a/Source/cmCommandArgumentParser.cxx +++ b/Source/LexerParser/cmCommandArgumentParser.cxx diff --git a/Source/cmCommandArgumentParser.y b/Source/LexerParser/cmCommandArgumentParser.y index d6c8312..55a88df 100644 --- a/Source/cmCommandArgumentParser.y +++ b/Source/LexerParser/cmCommandArgumentParser.y @@ -189,4 +189,3 @@ void cmCommandArgument_yyerror(yyscan_t yyscanner, const char* message) { yyGetParser->Error(message); } - diff --git a/Source/cmCommandArgumentParserTokens.h b/Source/LexerParser/cmCommandArgumentParserTokens.h index 3172182..3172182 100644 --- a/Source/cmCommandArgumentParserTokens.h +++ b/Source/LexerParser/cmCommandArgumentParserTokens.h diff --git a/Source/cmDependsJavaLexer.cxx b/Source/LexerParser/cmDependsJavaLexer.cxx index 8159f47..8159f47 100644 --- a/Source/cmDependsJavaLexer.cxx +++ b/Source/LexerParser/cmDependsJavaLexer.cxx diff --git a/Source/cmDependsJavaLexer.h b/Source/LexerParser/cmDependsJavaLexer.h index ccadd70..ccadd70 100644 --- a/Source/cmDependsJavaLexer.h +++ b/Source/LexerParser/cmDependsJavaLexer.h diff --git a/Source/cmDependsJavaLexer.in.l b/Source/LexerParser/cmDependsJavaLexer.in.l index 8cb42b1..8cb42b1 100644 --- a/Source/cmDependsJavaLexer.in.l +++ b/Source/LexerParser/cmDependsJavaLexer.in.l diff --git a/Source/cmDependsJavaParser.cxx b/Source/LexerParser/cmDependsJavaParser.cxx index bc45d45..bc45d45 100644 --- a/Source/cmDependsJavaParser.cxx +++ b/Source/LexerParser/cmDependsJavaParser.cxx diff --git a/Source/cmDependsJavaParser.y b/Source/LexerParser/cmDependsJavaParser.y index 1137f39..f7eb228 100644 --- a/Source/cmDependsJavaParser.y +++ b/Source/LexerParser/cmDependsJavaParser.y @@ -242,7 +242,7 @@ jp_DECIMALINTEGERLITERAL yyGetParser->SetCurrentCombine(""); } | -jp_HEXINTEGERLITERAL +jp_HEXINTEGERLITERAL { jpElementStart(1); jpCheckEmpty(1); @@ -3212,4 +3212,3 @@ void cmDependsJava_yyerror(yyscan_t yyscanner, const char* message) { yyGetParser->Error(message); } - diff --git a/Source/cmDependsJavaParserTokens.h b/Source/LexerParser/cmDependsJavaParserTokens.h index 7f18f1d..7f18f1d 100644 --- a/Source/cmDependsJavaParserTokens.h +++ b/Source/LexerParser/cmDependsJavaParserTokens.h diff --git a/Source/cmExprLexer.cxx b/Source/LexerParser/cmExprLexer.cxx index fb6f0db..fb6f0db 100644 --- a/Source/cmExprLexer.cxx +++ b/Source/LexerParser/cmExprLexer.cxx diff --git a/Source/cmExprLexer.h b/Source/LexerParser/cmExprLexer.h index 835a7a3..835a7a3 100644 --- a/Source/cmExprLexer.h +++ b/Source/LexerParser/cmExprLexer.h diff --git a/Source/cmExprLexer.in.l b/Source/LexerParser/cmExprLexer.in.l index 25ddba4..25ddba4 100644 --- a/Source/cmExprLexer.in.l +++ b/Source/LexerParser/cmExprLexer.in.l diff --git a/Source/cmExprParser.cxx b/Source/LexerParser/cmExprParser.cxx index 19efca1..67664a5 100644 --- a/Source/cmExprParser.cxx +++ b/Source/LexerParser/cmExprParser.cxx @@ -1696,4 +1696,3 @@ void cmExpr_yyerror(yyscan_t yyscanner, const char* message) { cmExpr_yyget_extra(yyscanner)->Error(message); } - diff --git a/Source/cmExprParser.y b/Source/LexerParser/cmExprParser.y index 220f7c8..d1c3a97 100644 --- a/Source/cmExprParser.y +++ b/Source/LexerParser/cmExprParser.y @@ -162,4 +162,3 @@ void cmExpr_yyerror(yyscan_t yyscanner, const char* message) { cmExpr_yyget_extra(yyscanner)->Error(message); } - diff --git a/Source/cmExprParserTokens.h b/Source/LexerParser/cmExprParserTokens.h index 84b2bbd..84b2bbd 100644 --- a/Source/cmExprParserTokens.h +++ b/Source/LexerParser/cmExprParserTokens.h diff --git a/Source/cmFortranLexer.cxx b/Source/LexerParser/cmFortranLexer.cxx index 01c09ac..01c09ac 100644 --- a/Source/cmFortranLexer.cxx +++ b/Source/LexerParser/cmFortranLexer.cxx diff --git a/Source/cmFortranLexer.h b/Source/LexerParser/cmFortranLexer.h index ddda919..ddda919 100644 --- a/Source/cmFortranLexer.h +++ b/Source/LexerParser/cmFortranLexer.h diff --git a/Source/cmFortranLexer.in.l b/Source/LexerParser/cmFortranLexer.in.l index 1121210..1121210 100644 --- a/Source/cmFortranLexer.in.l +++ b/Source/LexerParser/cmFortranLexer.in.l diff --git a/Source/cmFortranParser.cxx b/Source/LexerParser/cmFortranParser.cxx index 2b3452f..2b3452f 100644 --- a/Source/cmFortranParser.cxx +++ b/Source/LexerParser/cmFortranParser.cxx diff --git a/Source/cmFortranParser.y b/Source/LexerParser/cmFortranParser.y index acfb40a..acfb40a 100644 --- a/Source/cmFortranParser.y +++ b/Source/LexerParser/cmFortranParser.y diff --git a/Source/cmFortranParserTokens.h b/Source/LexerParser/cmFortranParserTokens.h index 8d6a5fe..8d6a5fe 100644 --- a/Source/cmFortranParserTokens.h +++ b/Source/LexerParser/cmFortranParserTokens.h diff --git a/Source/cmListFileLexer.c b/Source/LexerParser/cmListFileLexer.c index 3dd3b85..3dd3b85 100644 --- a/Source/cmListFileLexer.c +++ b/Source/LexerParser/cmListFileLexer.c diff --git a/Source/cmListFileLexer.in.l b/Source/LexerParser/cmListFileLexer.in.l index 5152dbf..5152dbf 100644 --- a/Source/cmListFileLexer.in.l +++ b/Source/LexerParser/cmListFileLexer.in.l |