summaryrefslogtreecommitdiffstats
path: root/Source/cmExprLexer.in.l
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-12-14 14:52:05 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-12-14 14:52:05 (GMT)
commit788581883fef05820f3f83ec5d1456490bc2397f (patch)
tree00c32a850d1b6701a7ba7ad40ead0d27415b09c1 /Source/cmExprLexer.in.l
parent60e5f61917815289c80c31880e5c90bdf81eefb8 (diff)
parentc5df1f165c7f8f1e31e3144d326c6836af2e678d (diff)
downloadCMake-788581883fef05820f3f83ec5d1456490bc2397f.zip
CMake-788581883fef05820f3f83ec5d1456490bc2397f.tar.gz
CMake-788581883fef05820f3f83ec5d1456490bc2397f.tar.bz2
Merge topic 'rebuild-lexers'
c5df1f16 Regenerate lexer source code
Diffstat (limited to 'Source/cmExprLexer.in.l')
-rw-r--r--Source/cmExprLexer.in.l24
1 files changed, 8 insertions, 16 deletions
diff --git a/Source/cmExprLexer.in.l b/Source/cmExprLexer.in.l
index e32abd9..25ddba4 100644
--- a/Source/cmExprLexer.in.l
+++ b/Source/cmExprLexer.in.l
@@ -3,29 +3,21 @@
file Copyright.txt or https://cmake.org/licensing for details. */
/*
-This file must be translated to C and modified to build everywhere.
+This file must be translated to C++ and modified to build everywhere.
-Run flex like this:
+Run flex >= 2.6 like this:
- flex --prefix=cmExpr_yy --header-file=cmExprLexer.h -ocmExprLexer.cxx cmExprLexer.in.l
+ flex --nounistd -DFLEXINT_H --prefix=cmExpr_yy --header-file=cmExprLexer.h -ocmExprLexer.cxx cmExprLexer.in.l
Modify cmExprLexer.cxx:
- - remove TABs
- - remove use of the 'register' storage class specifier
- - remove "yyscanner" argument from these methods:
- yy_fatal_error, cmExpr_yyalloc, cmExpr_yyrealloc, cmExpr_yyfree
- - remove all YY_BREAK lines occurring right after return statements
- - change while ( 1 ) to for(;;)
-
-Modify cmExprLexer.h:
- - remove TABs
- - remove the yy_init_globals function
- - remove the block that includes unistd.h
- - remove #line directives (avoids bogus warning on old Sun)
+ - remove trailing whitespace: sed -i 's/\s*$//' cmExprLexer.h cmExprLexer.cxx
+ - remove blank lines at end of file
+ - #include "cmStandardLexer.h" at the top
+ - add cast in yy_scan_bytes for loop condition of _yybytes_len to size_t
*/
-#include "cmStandardLexer.h"
+/* IWYU pragma: no_forward_declare yyguts_t */
#include "cmExprParserHelper.h"