POV-Ray : Newsgroups : povray.beta-test : Updated parser. Standard include warning noise. Server Time
29 Mar 2024 08:53:40 EDT (-0400)
  Updated parser. Standard include warning noise. (Message 1 to 4 of 4)  
From: William F Pokorny
Subject: Updated parser. Standard include warning noise.
Date: 7 Feb 2019 09:56:59
Message: <5c5c473b$1@news.povray.org>
Not sure the particular type of warning introduced with the new parser 
or just post v3.7. Also not sure what might be done to lesson the 
warning noise other than update the shipped includes all to version 3.8 
in the master branch.

Anyway, while running the updated parser code (my branches merged off 
master commit 054e75c), noticing warning messages where scenes (and the 
default statement) are at version 3.8. Warnings of the form:

File
'/dev/shm/tmpDir/tmpUser/MyP380/share/povray-3.8/include/colors.inc' 
line 13:
Parse Warning: Scene language version changed after a 'default' 
statement. The changes in defaults normally associated with the language 
version change are not applied.

Any scene with something like:

//---
#version 3.8;
global_settings{ assumed_gamma 1.0 ... }
#default { ... }

...
#include "colors.inc"
...
//---

where the include drops back to an earlier version triggers them and, 
depending on scene construction, makes for quite a bit of useless 
warning noise.

Bill P.


Post a reply to this message

From: clipka
Subject: Re: Updated parser. Standard include warning noise.
Date: 7 Feb 2019 10:33:42
Message: <5c5c4fd6@news.povray.org>
Am 07.02.2019 um 15:56 schrieb William F Pokorny:
> Not sure the particular type of warning introduced with the new parser 
> or just post v3.7. Also not sure what might be done to lesson the 
> warning noise other than update the shipped includes all to version 3.8 
> in the master branch.
...

This is a general v3.8 thing.

> Any scene with something like:
> 
> //---
> #version 3.8;
> global_settings{ assumed_gamma 1.0 ... }
> #default { ... }
> 
> ....
> #include "colors.inc"
> ....
> //---
> 
> where the include drops back to an earlier version triggers them and, 
> depending on scene construction, makes for quite a bit of useless 
> warning noise.

There are two ways to address this issue:

(1) Educate users that includes should be placed before any `default` 
statement.

(2) Update the include files (which btw. won't be delivered before the 
beta phase).

Another approach to reduce the number of such warnings might be to not 
trigger them when a `#version` statement is encountered, but only when 
defaults are actually accessed; but that would be some work in the parser.


(BTW, I have an aversion to the `#default` notation, and think `default` 
- without the `#` - should be considered the canonical one; the reason 
being that I think the concept of default values is more at home among 
the "raw" descriptive portions of the SDL, than the slapped-on 
imperative programming portion that is the set of `#` directives.)


Post a reply to this message

From: William F Pokorny
Subject: Re: Updated parser. Standard include warning noise.
Date: 7 Feb 2019 11:47:13
Message: <5c5c6111$1@news.povray.org>
On 2/7/19 10:33 AM, clipka wrote:
> Am 07.02.2019 um 15:56 schrieb William F Pokorny:
....
> 
> There are two ways to address this issue:
> 
> (1) Educate users that includes should be placed before any `default` 
> statement.
> 
> (2) Update the include files (which btw. won't be delivered before the 
> beta phase).
> 
> Another approach to reduce the number of such warnings might be to not 
> trigger them when a `#version` statement is encountered, but only when 
> defaults are actually accessed; but that would be some work in the parser.
> 

Most desirable I suppose, but yeah. (1) & (2) Perhaps good enough in 
practice.

> 
> (BTW, I have an aversion to the `#default` notation, and think `default` 
> - without the `#` - should be considered the canonical one; the reason 
> being that I think the concept of default values is more at home among 
> the "raw" descriptive portions of the SDL, than the slapped-on 
> imperative programming portion that is the set of `#` directives.)

Thanks & I agree! It's never registered with me default {} was OK 
syntax. Should we update:

    http://wiki.povray.org/content/Reference:Default_Directive

?

Bill P.


Post a reply to this message

From: Cousin Ricky
Subject: Re: Updated parser. Standard include warning noise.
Date: 12 Feb 2019 08:15:00
Message: <web.5c62c5c6e703f3cf93ab27150@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
>
> (1) Educate users that includes should be placed before any `default`
> statement.

What if the #default directive is in the include file?  That is the case with my
prefab render rig.  So far, I've just been ignoring the warning, pending parsing
out what it means; I've seen no unexpected results in my scenes.


Post a reply to this message

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