summaryrefslogtreecommitdiffstats
path: root/Source/cmListFileLexer.in.l
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-01-19 17:06:24 (GMT)
committerBrad King <brad.king@kitware.com>2005-01-19 17:06:24 (GMT)
commit89a8261f68dd06778e14fc02ccf051489cdb4381 (patch)
treee2e7ac402d5f21f5b273ad3b0a008deaf5f3ed9d /Source/cmListFileLexer.in.l
parent47ee00b7a589f7f80afbbcc5e7f65b66cada7d87 (diff)
downloadCMake-89a8261f68dd06778e14fc02ccf051489cdb4381.zip
CMake-89a8261f68dd06778e14fc02ccf051489cdb4381.tar.gz
CMake-89a8261f68dd06778e14fc02ccf051489cdb4381.tar.bz2
ENH: Mangled lexer symbols to begin in cmListFileLexer_yy instead of just yy to avoid conflict with other lexers that may be added.
Diffstat (limited to 'Source/cmListFileLexer.in.l')
-rw-r--r--Source/cmListFileLexer.in.l14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmListFileLexer.in.l b/Source/cmListFileLexer.in.l
index aefa7d6..7587871 100644
--- a/Source/cmListFileLexer.in.l
+++ b/Source/cmListFileLexer.in.l
@@ -21,7 +21,7 @@ This file must be translated to C and modified to build everywhere.
Run flex like this:
- flex -ocmListFileLexer.c cmListFileLexer.in.l
+ flex --prefix=cmListFileLexer_yy -ocmListFileLexer.c cmListFileLexer.in.l
Modify cmListFileLexer.c:
- remove TABs
@@ -40,7 +40,7 @@ Modify cmListFileLexer.c:
/* Setup the proper yylex declaration. */
#define YY_EXTRA_TYPE cmListFileLexer*
-#define YY_DECL int yylex (yyscan_t yyscanner, cmListFileLexer* lexer)
+#define YY_DECL int cmListFileLexer_yylex (yyscan_t yyscanner, cmListFileLexer* lexer)
/* Disable some warnings. */
#if defined(_MSC_VER)
@@ -83,7 +83,7 @@ static void cmListFileLexerDestroy(cmListFileLexer* lexer);
/* Replace the lexer input function. */
#undef YY_INPUT
#define YY_INPUT(buf, result, max_size) \
- { result = cmListFileLexerInput(yyget_extra(yyscanner), buf, max_size); }
+ { result = cmListFileLexerInput(cmListFileLexer_yyget_extra(yyscanner), buf, max_size); }
/*--------------------------------------------------------------------------*/
%}
@@ -285,8 +285,8 @@ static void cmListFileLexerInit(cmListFileLexer* lexer)
{
if(lexer->file || lexer->string_buffer)
{
- yylex_init(&lexer->scanner);
- yyset_extra(lexer, lexer->scanner);
+ cmListFileLexer_yylex_init(&lexer->scanner);
+ cmListFileLexer_yyset_extra(lexer, lexer->scanner);
}
}
@@ -295,7 +295,7 @@ static void cmListFileLexerDestroy(cmListFileLexer* lexer)
{
if(lexer->file || lexer->string_buffer)
{
- yylex_destroy(lexer->scanner);
+ cmListFileLexer_yylex_destroy(lexer->scanner);
if(lexer->file)
{
fclose(lexer->file);
@@ -380,7 +380,7 @@ cmListFileLexer_Token* cmListFileLexer_Scan(cmListFileLexer* lexer)
{
return 0;
}
- if(yylex(lexer->scanner, lexer))
+ if(cmListFileLexer_yylex(lexer->scanner, lexer))
{
return &lexer->token;
}