Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] updated separate Fortran lexer/parser


On Wed, 8 Nov 2006, Craig Rasmussen wrote:

> 
> 
> > - allow EOF (end-of-file) to occur in place of some T_EOS tokens.
> 
> I was able to document this was a problem.  By the way, do you know why some
> compilers warn you if you don't have a final carriage return?
> 

i believe it's because EOF is not a token in the language; in Fortran, 
newlines are tokens, in a sense, because they can be used to terminate 
statements.  compilers are at least nice enough to accept EOF before 
finding the end of a statement, but i think it's good if they warn you.  
most common editors (emacs and vi on linux, at least) will usually force a 
newline character at the end of the file, unless you override it, so this 
usually isn't an issue.

Chris



Back to the top