2009/3/13 Maik Beckmann <beckmann.m...@googlemail.com>:
> Brad King schrieb am Freitag 13 März 2009 um 16:51:
>> Actually, I cannot tell from a quick glance at the code how it ignores
>> 'USE' keywords that appear after a ';' separator.  It does not ignore
>> 'MODULE' after ';'.  Maik?
>
> If a piece of code is identifed by the _lexer_ as being a comment, it is just
> ignored.  ';' isn't considered at all.
>
> My impression is, that the code which identifies comment lines for fixed
> format is buggy.

[...]

I have a guess, but it is weird,

> {{{
> !.*\n                   { return EOSTMT; } /* Treat comments like */
> <fixed_fmt>^[cC*dD].*\n { return EOSTMT; } /* empty lines */
> }}}

I couldn't find any BEGIN(fixed_fmt) for the <fixed_fmt> start condition
(whereas there is for <str_sq> or <str_dq>)

in
http://public.kitware.com/cgi-bin/viewcvs.cgi/Source/cmDependsFortranLexer.in.l?root=CMake&view=markup

which makes me think that ALL <fixed_fmt> rules in the lexer are
currently ignored
because the start condition never gets activated.
i.e. there should be some code that's tell the lexer that it is lexing
a fixed format file.

Note that this is the same for <free_fmt> but this start condition is not used
in any rules of the lexer, it is only declared at the same line as the
<fixed_fmt> ??

I'm no flex/lex expert thus take my guess with care.

-- 
Erk
_______________________________________________
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