From d9879189cce1796c3459cea017ba55d685d65d09 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Wed, 20 Jul 2022 08:53:25 -0700 Subject: LEX_TABLE_FILE -> LEX_TABLES_FILE --- CHANGES.txt | 2 +- RELEASE.txt | 2 +- SCons/Tool/lex.py | 8 ++++---- SCons/Tool/lex.xml | 6 +++--- test/LEX/FLEXFLAGS.py | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0e54bad..5900fca 100755 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -211,7 +211,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Improvements to lex and yacc tools: better documentation of extra-file options, add test for extra-file behavior. - Two new construction variables are introduced for lex (LEX_HEADER_FILE - and LEX_TABLE_FILE) as the preferred way of specifying these extra-file + and LEX_TABLES_FILE) as the preferred way of specifying these extra-file options. - Two new construction variables are introduced for yacc (YACC_HEADER_FILE and YACC_GRAPH_FILE) as the preferred way of diff --git a/RELEASE.txt b/RELEASE.txt index 7e6ea9a..b7e5ceb 100755 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -46,7 +46,7 @@ NEW FUNCTIONALITY - Fortran: a new construction variable FORTRANCOMMONFLAGS is added which is applied to all Fortran dialects, to enable global (all-dialect) settings. - lex: two new construction variables are introduced (LEX_HEADER_ILE - and LEX_TABLE_FILE) as the preferred way of specifying extra files that + and LEX_TABLES_FILE) as the preferred way of specifying extra files that the tool can generate. - yacc: two new construction variables are introduced (YACC_HEADER_FILE and YACC_GRAPH_FILE) as the preferred way of specifying extra files that diff --git a/SCons/Tool/lex.py b/SCons/Tool/lex.py index 60ae4bd..3f1a3ad 100644 --- a/SCons/Tool/lex.py +++ b/SCons/Tool/lex.py @@ -86,11 +86,11 @@ def lexEmitter(target, source, env) -> tuple: # rewrite user-supplied file string with a node, we need later env.Replace(LEX_HEADER_FILE=env.File(lexheaderfile)) - lextablesfile = env.subst("$LEX_TABLE_FILE", target=target, source=source) + lextablesfile = env.subst("$LEX_TABLES_FILE", target=target, source=source) if lextablesfile: target.append(lextablesfile) # rewrite user-supplied file string with a node, we need later - env.Replace(LEX_TABLE_FILE=env.File(lextablesfile)) + env.Replace(LEX_TABLES_FILE=env.File(lextablesfile)) return target, source @@ -149,7 +149,7 @@ def generate(env) -> None: LEX=env.Detect(BINS), LEXFLAGS=CLVar(""), LEX_HEADER_FILE="", - LEX_TABLE_FILE="", + LEX_TABLES_FILE="", ) if sys.platform == 'win32': @@ -159,7 +159,7 @@ def generate(env) -> None: env["LEXCOM"] = "$LEX $LEXFLAGS $_LEX_HEADER $_LEX_TABLES -t $SOURCES > $TARGET" env['_LEX_HEADER'] = '${LEX_HEADER_FILE and "--header-file=" + str(LEX_HEADER_FILE)}' - env['_LEX_TABLES'] = '${LEX_TABLE_FILE and "--tables-file=" + str(LEX_TABLE_FILE)}' + env['_LEX_TABLES'] = '${LEX_TABLES_FILE and "--tables-file=" + str(LEX_TABLES_FILE)}' def exists(env) -> Optional[str]: diff --git a/SCons/Tool/lex.xml b/SCons/Tool/lex.xml index e68a2bf..391e429 100644 --- a/SCons/Tool/lex.xml +++ b/SCons/Tool/lex.xml @@ -61,7 +61,7 @@ Sets construction variables for the &lex; lexical analyser. LEXCOMSTR LEXFLAGS LEX_HEADER_FILE -LEX_TABLE_FILE +LEX_TABLES_FILE @@ -113,7 +113,7 @@ the output file is named by the option argument. Note that files specified by and may not be properly handled by &SCons; in all situations. Consider using -&cv-link-LEX_HEADER_FILE; and &cv-link-LEX_TABLE_FILE; instead. +&cv-link-LEX_HEADER_FILE; and &cv-link-LEX_TABLES_FILE; instead. @@ -129,7 +129,7 @@ command-line option. Use this in preference to including - + If supplied, write the lex tables to a file with the name diff --git a/test/LEX/FLEXFLAGS.py b/test/LEX/FLEXFLAGS.py index 1db9f42..b803ec7 100644 --- a/test/LEX/FLEXFLAGS.py +++ b/test/LEX/FLEXFLAGS.py @@ -79,7 +79,7 @@ env.CFile( target='aaa', source='aaa.l', LEX_HEADER_FILE='header.h', - LEX_TABLE_FILE='tables.t', + LEX_TABLES_FILE='tables.t', ) """) test.write(['sub2', 'aaa.l'], "aaa.l\nLEXFLAGS\n") -- cgit v0.12