POV-Ray : Newsgroups : povray.bugreports : unexpected end of file Server Time
23 Jun 2024 15:16:31 EDT (-0400)
  unexpected end of file (Message 1 to 3 of 3)  
From: ingo
Subject: unexpected end of file
Date: 27 Sep 1998 18:22:44
Message: <360eaca4.0@news.povray.org>
When I render the scene given below, I get the error message "unexpected end
of file". This only happens when there comes  absolutely nothing after
"#end". As soon as I put in a space or a new line the scene will render.

POV-ray for windows 3.1 r1
WinNT 4 & SP3
PII 233 64mb

regards,
ingo


#include "colors.inc"

light_source {
  <0, 500,-500>
  color rgb <1, 1, 1>
}

camera {
    location  <0.0, 1.0, -2.0>
    look_at   <0.0, 1.0, 0.0>
    angle 90
}

#declare Count= -2;
#while (Count<=2)
    cylinder {
        <0,0,0>,<0,2,0>,0.02
        translate <Count,0,0>
        texture {
            pigment {color White}
            finish {diffuse 1}
        }
    }
    #declare Count= Count+0.5;
#end


Post a reply to this message

From: Ron Parker
Subject: Re: unexpected end of file
Date: 28 Sep 1998 10:25:21
Message: <360f8e41.0@news.povray.org>
On Sun, 27 Sep 1998 23:22:38 +0200, ingo <ing### [at] ingodemonnl> wrote:
>When I render the scene given below, I get the error message "unexpected end
>of file". This only happens when there comes  absolutely nothing after
>"#end". As soon as I put in a space or a new line the scene will render.

This is a common problem for a lot of languages.  So much so, in fact, that
people in at least one other newsgroup will tell you that if your editor 
allows you to create a text file with no newline after the last line, then 
the flaw lies in your editor, not in the parser.  I tend to agree with them.


Post a reply to this message

From: Dan Connelly
Subject: Re: unexpected end of file
Date: 28 Sep 1998 20:59:27
Message: <361022E3.B51484EB@flash.net>
It is so easy to change a parser to check for this condition
that the fact it is a common problem doesn't make it not a problem,
however.

There are valid reasons that one might want to omit a newline
from a file end.   But I can think of no reason a parser
would not want to conclude EOF was a line terminator (unless
this is viewed as some sort of scheme to catch truncated
files)

So I agree with "ingo" that this is validly called a bug.

Dan

P.S. Thanks for the LINUX port, but that's for another group...

Ron Parker wrote:
> This is a common problem for a lot of languages.  So much so, in fact, that
> people in at least one other newsgroup will tell you that if your editor
> allows you to create a text file with no newline after the last line, then
> the flaw lies in your editor, not in the parser.  I tend to agree with them.

-- 
http://www.flash.net/~djconnel/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.