|
 |
On 07/07/2025 18:43, jr wrote:
> "jr" <cre### [at] gmail com> wrote:
>> "Bald Eagle" <cre### [at] netscape net> 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)
|
 |