POV-Ray : Newsgroups : povray.bugreports : Parse Error: String too long. : Re: Parse Error: String too long. Server Time
19 Apr 2024 05:01:49 EDT (-0400)
  Re: Parse Error: String too long.  
From: Le Forgeron
Date: 30 Dec 2014 05:36:29
Message: <54a2802d$1@news.povray.org>
Le 30/12/2014 01:01, Thorsten Froehlich a écrit :
> Warp <war### [at] tagpovrayorg> wrote:
>> Thorsten Froehlich <nomail@nomail> wrote:
>>> The place where it is used is the core part of the tokenizer. Using a
>>> dynamically allocated string would significantly increase overhead in the most
>>> called place as the short string optimization won't work (it is frequently not
>>> more than 10/14 chars). Now consider the average POV token length, and you
>>> notice
>>> you get at least one additional memory allocation per token parsed.
>>
>> Does the part that parses tokens really need to use the exact same string
>> class as the part that parses and handles strings?
>
> No, and actually, checking the code, this part of the tokenizer uses the unbound
> string parsing. Which leaves the question how the original poster could get this
> error message. The problem most likely is an identifier longer than 255
> characters ... which is, well, really pointless to have.
>
>
Sorry dear, but a string literal (e.g.  "Povray is a nice program" in a 
#declare or #local) longer than 255 would lead to a parse error with the 
original parser.

Hence my patch in my master branch of hgpovray (made in May 2014).

I mean:

#declare MyString = "Povray is a nice program";

Now extends the string... and see povray fails to parse it when the 
limit is reached.
-- 
Just because nobody complains does not mean all parachutes are perfect.


Post a reply to this message

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