POV-Ray : Newsgroups : povray.advanced-users : Parse weirdness : Re: Parse weirdness Server Time
28 Jul 2024 18:27:12 EDT (-0400)
  Re: Parse weirdness  
From: stephen parkinson
Date: 8 Jun 2004 16:47:03
Message: <40c625c7$1@news.povray.org>
Andrew C on Mozilla wrote:
> Here's an interesting one for you...
> 
> I've got a scene that won't parse; I get an error message half way 
> through one of the include files. Here's a snippet of the source:
> 
> -----
> #declare Thingy =
> object
> {
>   sphere...
> -----
> 
> I get an error on the line with the open bracket. The error reads
> 
> Parse Error: Expected 'object or directive', { found instead.
> 
> ....ok, so that's strange.
> 
> But is gets stranger... if I comment out a certain macro call, the error 
> dissapears! :-0 (The scene renders correctly. Trouble is, the bit I have 
> to comment out is the main animation control function!)
> 
> * * *
> 
> OK, so I've now spent about 2 hours trying to find a cause for this 
> bizzare behaviour... I eventually tracked down the source; there was an 
> #fclose command without a file handle.
> 
> This is really irritating. Why can't POV-Ray just issue and error 
> message if you reach the #end of a macro and the target for #fclose 
> hasn't been reached yet?

cos it might not be in that macro, but in another macro?
'missing argument to fclose' might be a better message though
or maybe 'fclose missing argument defaulting to handle NNN'
> 
> Andrew @ home.

that suggests a bracket mismatch in what you've commented out
maybe a ) instead of a } ??
easy to do

whats the syntax hi-lighting like in the editor you use?
try re-indenting that section ?

stephen


Post a reply to this message

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