Comments (1)
To follow up on the final paragraph of the issue, in order to strip comments, we'd need to understand the syntax involved. The complication, as always, is context: if it's in a string (though Fortran does not use that terminology) it should not be considered a comment indicator.
From the standard:
6.3.2.3 Free form commentary
The character “!” initiates a comment except where it appears within a character context. The comment extends to the end of the line. If the first nonblank character on a line is an “!”, the line is a comment line. Lines containing only blanks or containing no characters are also comment lines. Comments may appear anywhere in a program unit and may precede the first statement of a program unit or follow the last statement of a program unit. Comments have no effect on the interpretation of the program unit.
6.3.3.2 Fixed form commentary
The character “!” initiates a comment except where it appears within a character context or in character position 6. The comment extends to the end of the line. If the first nonblank character on a line is an “!” in any character position other than character position 6, the line is a comment line. Lines beginning with a “C” or “*” in character position 1 and lines containing only blanks are also comment lines. Comments may appear anywhere in a program unit and may precede the first statement of the program unit or follow the last statement of a program unit.
Note that the existing regex does not attempt to recognize the fixed form "C or * in column 1".
and
3.21 character context
within a character literal constant (7.4.4) or within a character string edit descriptor (13.3.2)
And for the scanner issue, which incolves inline statement termination, here's the wording:
6.3.2.5 Free form statement termination
If a statement is not continued, a comment or the end of the line terminates the statement.
A statement may alternatively be terminated by a “;” character that appears other than in a character context or in a comment. The “;” is not part of the statement. After a “;” terminator, another statement may appear on the same line, or begin on that line and be continued. A sequence consisting only of zero or more blanks and one or more “;” terminators, in any order, is equivalent to a single “;” terminator.
6.3.3.4 Fixed form statement termination
If a statement is not continued, a comment or the end of the line terminates the statement.
A statement may alternatively be terminated by a “;” character that appears other than in a character context, in a comment, or in character position 6. The “;” is not part of the statement. After a “;” terminator, another statement may begin on the same line, or begin on that line and be continued. A “;” shall not appear as the first nonblank character on an initial line. A sequence consisting only of zero or more blanks and one or more “;” terminators, in any order, is equivalent to a single “;” terminator.
from scons.
Related Issues (20)
- unittest import loop with pre-release Python HOT 3
- Add debug output showing sconscript being processed? HOT 1
- SCons.Util.Flatten doesn't work for nested sets, None HOT 7
- Remote backend for CacheDir HOT 3
- New pkgconfig integration HOT 4
- Add support for sources specified as pathlib.Path objects
- Increase granularity of SCons doc builds HOT 1
- Obnoxious auto-package fetching... HOT 2
- Standard C++ header names may conflict with target names
- run document test failed HOT 3
- Construction of DefaultEnvironment can be racy HOT 4
- Build as administrator is required on windows (sometimes?) HOT 18
- Make the new parallel scheduler the default
- 4.6.0 distfile: contains pycache files for Python 3.11 HOT 7
- Typo in user documentation HOT 10
- DependencyWarning is somewhat misused HOT 1
- Scanners need to be smarter about text they're scanning
- User Guide: scanner examples could be improved HOT 4
- Pseudo() global function missing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scons.