POV-Ray : Newsgroups : povray.bugreports : array mixed crashes in parser : Re: array mixed crashes in parser Server Time
19 Apr 2024 17:08:39 EDT (-0400)
  Re: array mixed crashes in parser  
From: TreeLimb Jim
Date: 11 Jul 2019 20:40:00
Message: <web.5d27cc333c87cc69799a5f510@news.povray.org>
Time to change the Subject line

Again, I'm not going to peruse the code. That's above my pay grade and those
that are gefingerpoken it will sort it out. [Ref:
https://en.wikipedia.org/wiki/Blinkenlights]

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 GENERATES ERROR ====
#declare ColorDictionary = array mixed[2] {
 dictionary  { // Upper
  ["0"      ]: array[10] { 0,0,0,0,0, 0,0,0,0,0 }
  ["1001"]: array[10] { 0,0,0,0,0, 0,0,0,0,0 }
  ["1002"]: array[10] { 0,0,0,0,0, 0,0,0,0,0 }
//  ["0"      ]: initZero10  // Do you think this would?
//  ["1001"]: initZero10  // And why was it a workaround
//  ["1002"]: initZero10  // In my previous post
 },
 dictionary {  // Lower
  ["0"      ]: array[10] { 0,0,0,0,0, 0,0,0,0,0 }
  ["1001"]: array[10] { 0,0,0,0,0, 0,0,0,0,0 }
//  ["0"      ]: initZero10  // Ibidem
//  ["1001"]: initZero10  // That's ibidem-way in Pig Latin
 }
};


//==== Que Voila? THIS DOES NOT GENERATE ERROR
#declare ColorDictionary = array[2] { dictionary, dictionary };

#macro initARPSliderCapColorDictionary()
 #declare ARPSliderCapColorDictionary[0] = dictionary  { // Upper
  ["0"      ]: array[10] { 0,0,0,0,0, 0,0,0,0,0 }
  ["1001"]: array[10] { 0,0,0,0,0, 0,0,0,0,0 }
  ["1002"]: array[10] { 0,0,0,0,0, 0,0,0,0,0 }
//  ["0"      ]: initZero10
//  ["1001"]: initZero10 // But this does when used ---
//            ^^^^^^^ Parse Error: Expected 'numeric expression',
string literal found instead
//  ["1002"]: initZero10 //
// };

 #declare ColorDictionary[1] = dictionary {  // Lower
  ["0"      ]: array[10] { 0,0,0,0,0, 0,0,0,0,0 }
  ["1001"]: array[10] { 0,0,0,0,0, 0,0,0,0,0 }
//  ["0"      ]: initZero10  // As above
//  ["1001"]: initZero10
// So <Return> is not necessarily the terminating character for dictionary
containers
 };
#end

initARPSliderCapColorDictionary()



So, consume these experiments in all their richness while I re-code the project.
The next chapter is to find out what is generating a hard crash in
3.8.0-alpha.10013324 but not in 3.8.0-alpha.9844500


Post a reply to this message

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