POV-Ray : Newsgroups : povray.general : subtle change of semi-colon use in v3.8xx : Re: subtle change of semi-colon use in v3.8xx Server Time: 17 Jan 2021 06:18:12 GMT
  Re: subtle change of semi-colon use in v3.8xx  
From: William F Pokorny
Date: 30 Oct 2020 10:09:12
On 10/28/20 12:40 AM, Kenneth wrote:
> I recently came across a subtle problem with semi-colon placement, when used in
> *particular* v3.8 development versions (in Windows). It took me some time to
> track down, and to figure out a simple test to reproduce it:
> ---------------
> #version 3.8;
> global_settings{assumed_gamma 1.0}
> 
> #declare VEC = <.3,.5,.7>;
> 
> #macro MY_MACRO(FOO)
> #local BAR = FOO;
> <BAR.x,BAR.y,BAR.z>;
> #end
> 
> #declare XYZ_POS = MY_MACRO(VEC);
> ---------------
...
> 
> Maybe the later development versions 'tightened up' the rules of semi-colon use
> in general?
> 
My guess is double semicolons are no longer allowed after Christoph's 
parser performance changes in v3.8.

One thing done was to implement a fast scan ahead which looks for the 
end of if blocks for example so they can be digested / skipped in 
chunks. Here I think it scans ahead for the required trailing ; finding 
the last one, but what is just prior isn't what's expected, but rather a 
semicolon preceding the last found.

I suspect your test case could be just

#declare VEC = <.3,.5,.7>;;

Bill P.


Post a reply to this message

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