POV-Ray : Newsgroups : povray.bugreports : array mixed crashes in parser : Re: array mixed crashes in parser Server Time
25 Apr 2024 16:45:27 EDT (-0400)
  Re: array mixed crashes in parser  
From: TreeLimb Jim
Date: 11 Jul 2019 19:05:00
Message: <web.5d27beab3c87cc69799a5f510@news.povray.org>
Thanks for all your coaching so far. I'm not certain whether these are hints to
a solution or hints to a work-around.

One hint was array initialization. Another hint was about substitution. This
helped me deconstruct why my specific implementation may function or break:

Recall, this is the thrown error:
"Possible Parse Error: Uncategorized error thrown at
/Volumes/WDVrijstuk/PovRayUnofficial_3.8.0-alpha. 10013324-avx
source/source/parser/parser_tokenizer.cpp line 2413."

// ==== THIS FAILS ====
#declare SampleSystem2 = dictionary  {
 .LeftMain2515:  array mixed[3][4] {
  { 1001, 1, array[20][2],array[20][2] },
  { 1023, 1, array[10] {0,0,0,0,0,0,0,0,0,0}, array[10]{0,0,0,0,0,0,0,0,0,0}},
  { 1036, 1, array[10] {0,0,0,0,0,0,0,0,0,0}, array[10]{0,0,0,0,0,0,0,0,0,0}},
  }
 .RightMain2515: array mixed[3][4] {
  { 1016, 1, array[20][2] , array[20][2] },
  { 1023, 1, array[10]{0,0,0,0,0,0,0,0,0,0},array[10]{0,0,0,0,0,0,0,0,0,0}},
  { 1002, 1, array[20][2] , array[20][2] },
  }
 .Keyboard:   array[1] { 3212 }
};

// ==== THIS DOES NOT GENERATE ERROR  ====
#declare initVect20 = array[20][2] ;
#declare initZero5 = array[10]{0,0,0,0,0,0,0,0,0,0};
#declare SampleSystem2 = dictionary  {
 .LeftMain2515:  array mixed[3][4] {
  { 1001, 1, initVect20 , initVect20 },
  { 1023, 1,initZero10, initZero10 },
  { 1036, 1,initZero10, initZero10 },
  }
 .RightMain2515: array mixed[3][4] {
  { 1016, 1, initVect20 , initVect20 },
  { 1023, 1,initZero10, initZero10 },
  { 1002, 1, initVect20 , initVect20 },
  }
 .Keyboard:   array[1] { 3212 }
};


It doesn't stop there, but I think I'm describing the problem. My next post
will demonstrate further the complexity of implementing "mixed-type" elements.


Post a reply to this message

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