Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [photran] Slow 3.0 and missing editor class in 3.1 Beta

On 10/10/06, j brandon keith <jbrkeith@xxxxxxxxx> wrote:
Hi, I've been using the beta version and have noticed the default
lexer has troubles on *.f90 files with c preprocessor directives in
them.  For example, the error is
Lexer Error (file.f90, line 1760, col 1): Unexpected character #
Any way to make it automatically assume it's a preprocessor directive
(the most common case I'd imagine) and autmoatically parse it?

The problem is that it is not possible for a Fortran parser to parse
preprocessor
directives.  They aren't legal Fortran.  Normally, the preprocessor
takes them out
before the compiler sees them, but Photran is an editor, not just a parser, and
so we can't just take them out.

Alejandra Garrido figured out how to deal with the C preprocessor in a
refactoring
tool that she built for C as part of her PhD thesis.  It took her
about three years
to get all the details figured out.  She and Jeff shared an office for
a little, and Jeff
has read her thesis and sat though several talks that she has given,
so he thinks
he understands both the problem and her solution pretty well, and he might even
be able to improve on the solution.  Still, it will take awhile to
implement it.  Handling
preprocessor diretives is high on our to-do list, but it won't be done
this month.

-Ralph


Back to the top