POV-Ray : Newsgroups : povray.bugreports : The '#box' directive doesn't give error at parse time : Re: The '#box' directive doesn't give error at parse time Server Time
25 Apr 2024 17:51:55 EDT (-0400)
  Re: The '#box' directive doesn't give error at parse time  
From: Bald Eagle
Date: 8 Feb 2020 08:30:00
Message: <web.5e3eb6d0a33f4caa4eec112d0@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:

> I remember reading (in one of the newsgroup posts) about an issue/bug regarding
> the '#default {}' directive, which also works without the '#'.  fwiw:

Yes, and there was more than that as well.

see:
http://news.povray.org/povray.general/thread/%3Cweb.5d8f1cd3fe1f4a21e462584c0%40news.povray.org%3E/?mtop=428173&moff=5

3) And a lesson for me!
Saw #object (which you shouldn't need for the trace) and #cylinder;
Thought, "Does that really work?" It does! You can also stick '#' on the
end on some lines or code #declare CylinderZ = #cylinder {} and nary a
peep or problem from the parser - new or old versions. The usual and
recommended syntax is object {} and cylinder {}.

A declare without the leading # works too but we get:

File 'tmp.pov' line 40: Parse Warning: Should have '#' before 'declare'.
File 'tmp.pov' line 40: Possible Parse Error: 'declare' should be changed to
  '#declare'. Future versions may not support 'declare' and may require
  '#declare'.

Given this warning, I'd think we should be getting one on #object {} and
the like too as the other side of the syntax change push - now that I
understand there is another side.

Suppose this behavior related to Christoph's recommendation to me back
in February to use default {} rather than #default {} though it's the
latter which is still in the documentation. The idea, as I understand
it, is to get to where the #<token> is used only with SDL language
control elements.



and



If you have an example which results in an actual error at parse time,
I'd like to get it.

I have a collection of parser test cases and I spent time yesterday
capturing/creating parser test cases for these '#' variants. I didn't
come up with anything that generated an actual parse error - or render
problem - only the warnings above.

I did come up with a case with isolated #s ahead of a bare 'declare'
which did NOT generate the warnings above (I found a parser bug) though
the render result was still fine.

.....

Unsure if you were agreeing we should be getting such warnings, or
saying POV-Ray does generate such a warning. If the latter, I never saw
that while trying different things. If warnings for #Primitive_Name do
sometimes happen, I'd like an example test case for my collection.

Also had the thought last night, Does say '#accuracy 0.001' work..? It
does.



So, yes - there's still a lot of work that needs to be done with the parser.
And that may explain why clipka's locked himself in an isolation chamber for
quite some time now.   If that's what he's actually doing, then he may need
years of therapy...


Post a reply to this message

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