POV-Ray : Newsgroups : povray.general : Serializing a dictionary : Re: Serializing a dictionary Server Time
13 Jul 2025 12:16:44 EDT (-0400)
  Re: Serializing a dictionary  
From: kurtz le pirate
Date: 8 Jul 2025 04:08:56
Message: <686cd218$1@news.povray.org>
On 07/07/2025 18:43, jr wrote:
> "jr" <cre### [at] gmailcom> wrote:
>> "Bald Eagle" <cre### [at] netscapenet> wrote:
>>> ...
>>> Maybe someone can suggest a command-line script to grep opening and closing
>>> parentheses and give a count.
>>
>> not totally what you're after, ...(no time to write a script, sorry :-))
> 
> no script, but a (simple) re-purposed program (named "brace parenthesis bracket
> counts"), attached.  compile with:
> 
>    $ gcc -std=c99 -O2 -o bpbcounts bpbcounts.c
> 
> (sorry, no spreadsheet importer :-))
> 
> 
> enjoy, jr.


A long time ago, I started doing the same thing (but in Perl). I stopped 
because I got stuck on a problem: even if the number of pairs is 
correct, the syntax isn't necessarily right. You could be missing a 
brace in one place and have one too many in another. All in all, the 
count is good, but the syntax is not.


But indeed, this kind of script already gives good indications.



-- 
kurtz le pirate
compagnie de la banquise


Post a reply to this message


Attachments:
Download 'analyser.pl.zip' (3 KB)

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