summaryrefslogtreecommitdiffstats
path: root/SCons/Tool/lex.py
Commit message (Collapse)AuthorAgeFilesLines
* LEX_TABLE_FILE -> LEX_TABLES_FILEWilliam Deegan2022-07-201-4/+4
|
* Move LEXHEADERFILE, LEXTABLEFILE, YACCHEADERFILE, YACCGRAPHFILE -> separated ↵William Deegan2022-07-201-10/+10
| | | | by underscores for readability
* Add lex/yacc filegen consvarsMats Wichmann2022-07-191-9/+28
| | | | | | | | | | | | | lex and yacc tools both got two new construction variables for specifying side-effect creation of additional files, this method avoids the user embedding the options in LEXFLAGS and YACCFLAGS - the latter lets the commands generate the files, but the paths would not be properly relocated by SCons, so if the build was initiated in a subdirectory, the generated files would go into the top directory instead. Fixes #4154 Signed-off-by: Mats Wichmann <mats@linux.com>
* Sider fixesMats Wichmann2022-06-301-1/+1
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Improvements to lex and yacc toolsMats Wichmann2022-06-301-23/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | The mocked tools mylex.py and myyacc.py now understand the file-generation options, and generate a dummy file with predictable contents, for checking. This allows more testing of the path through the SCons support for these two without needing live commands. New tests added which invoke the file-generation options, and make sure the extra files are created, and that SCons detects and tracks the added targets. Work is done in a subdirectory, which exposes some existing known inconsistent behavior (the regular generated file goes in the subdir per the LEXCOM and YACCOM generated line, while the ones generated from commandline options go in the topdir) - but we're going to allow that behavior to continue for backwards compat. Same fix applied to yacc tool that PR #4168 did for lex - do subst_list() instead of subst() to preserve spaces in paths. That fix left the lex tool unable to pass the new test, as it could not see the individual arguments in the FLAGS variable, which was solved by indexing into the subst'd list so we can iterate over the args again. Test and tool cleanup; add DefaultEnvironment calls, etc. Note this mentions, but does not address the problem described in issue 4154. Signed-off-by: Mats Wichmann <mats@linux.com>
* updated blurb in CHANGES.txt and RELEASE.txt to indicate more specifically ↵William Deegan2022-06-251-5/+8
| | | | what's fixed. Address a few lint issues in the lex.py file
* Updated lex emitter to respect escaped spaces when climbing out of a the ↵Daniel Moody2022-06-061-1/+1
| | | | SCosncript dir
* Fix some imports and other checker warningsMats Wichmann2021-05-051-14/+14
| | | | | | | | | | | | | * Removed a number of imports reported as unused. * Reorganize imports in a few places. * Checker reported warnings problems ("Instantiating an exception, but not raising it, has no effect"): serveral tool modules instantiated a warning class thinking (?) it would issue the warning; changed these to the standard use - calling the warn() function with the warnclass as an arg. * Tool modules that were touched had the copyright header munging applied. * Removed irritating "####" lines from gettext and msgfmt tools. Signed-off-by: Mats Wichmann <mats@linux.com>
* Change Warning to SConsWarningMats Wichmann2020-07-071-1/+1
| | | | | | avoid potential overlap with Python's own Warnng class. Signed-off-by: Mats Wichmann <mats@linux.com>
* Reorganize the repo. Moved src/engine/SCons to ./SCons to be more in line ↵William Deegan2020-05-061-0/+141
with current python packaging practices