POV-Ray : Newsgroups : povray.beta-test : bug with parse_string : bug with parse_string Server Time
30 Jul 2024 22:21:56 EDT (-0400)
  bug with parse_string  
From:
Date: 25 Sep 2001 06:15:41
Message: <9pk0rto8s07dnm320f5m503aqu43ak6g3p@4ax.com>
yesterday I promised bug and now I fund shortest version for report

platform: POV35b4 on PII233 128 MB with NT4 SP6

the bug is not connected with parse_string but with second inclusion
of the same file with different content (parse_string macro is example
of such usage)

here is script: for bug

//<SDL>
#include "strings.inc"
#macro Parse_Macro(Name,Params,Content)
  #local String=concat(
    "#macro ",Name,"(",Params,")\n",
      Content,
    "#end\n")
  Parse_String(String)
#end

Parse_Macro("Sphere","Center,Radius","sphere{Center,Radius}")
Sphere(0,1)
Parse_Macro("Box","P1,P2","box{P1,P2}")
Sphere(1,2)
//</SDL>

here is output:

File: parse_string.tmp  Line: 2
Warning: No pigment type given.

File: parse_string.tmp  Line: 1

Sphere(1,2)} <----ERROR

Parse Error: Expected 'object or directive', } found instead

there is no '}' char
it looks like first macro concatenated with second one
some kind of not cleared streams/string or something

anybody can confirm ?

ABX


Post a reply to this message

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