Maik Beckmann wrote:
Brad King schrieb am Montag 16 März 2009 um 14:24:
Maik Beckmann wrote:
The _third_ option is to make the lexer format agnostic and handle
formats at the parser code.  This should work well, since we just have to
make sure that the valid MODULE und USE statements are catched.  Remeber,
so far the free format code processes fixed format code proper most of
time.
What happens if a 'C' appears at the beginning of a non-comment line in
free format?  If it appears on a module line then the build might break
because ordering among source files may be broken.


If lines like Something like
{{{
call Foo()
c = 1.0
}}}
are ignored, it doesn't hurt. This is only a problem if a line starts with "c" and contains a relevant MODULE or USE statement. Is this possible?

CALL FOO() ; MODULE mymod ! crazy, but possible

Perhaps it is simplest to use the file extension as a heuristic for now.
At least some compilers require special flags to build ".f" as free format.
If this becomes a real problem we can do something better later.

The question remains how to handle both formats in the lexer.  The original
makedepf90 code on which it is based handles things with the fixed_fmt state
plus support for strings of either format in the common quote states.  It
might just work if we invoke BEGIN(fixed_fmt) before parsing.

-Brad

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to