RSS/Atom feed Twitter
Site is read-only, email is disabled

"Error: unmatched parentheses: 1" in a Scheme Script that looks fine

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

"Error: unmatched parentheses: 1" in a Scheme Script that looks fine Shlomi Fish 10 Mar 10:43
  "Error: unmatched parentheses: 1" in a Scheme Script that looks fine saulgoode@flashingtwelve.brickfilms.com 10 Mar 17:49
  "Error: unmatched parentheses: 1" in a Scheme Script that looks fine Kevin Cozens 11 Mar 01:56
Shlomi Fish
2007-03-10 10:43:03 UTC (about 17 years ago)

"Error: unmatched parentheses: 1" in a Scheme Script that looks fine

Hi all!

I'm trying to load the following script using gimp-2.3.14-2mdv2007.1:

http://www.shlomifish.org/Files/files/code/gimp/fierysteel.scm

However, I'm getting the following errors on STDERR:

<<<<<<<<<<<<<<<<<<< script-fu-Warning: Error while executing (load "/home/shlomi/.gimp-2.3/scripts/fierysteel.scm")

Error: unmatched parentheses: 1

Now, the script looks fine too me, and the error is not descriptive enough for me to tell where the problem is exactly. Thus, two things are in order:

1. Tell me what's wrong with the script.

2. Fix script-fu or tiny-fu so it will give a more descriptive error in that case.

Regards,

Shlomi Fish

--------------------------------------------------------------------- Shlomi Fish shlomif@iglu.org.il Homepage: http://www.shlomifish.org/

Chuck Norris wrote a complete Perl 6 implementation in a day but then destroyed all evidence with his bare hands, so no one will know his secrets.

saulgoode@flashingtwelve.brickfilms.com
2007-03-10 17:49:21 UTC (about 17 years ago)

"Error: unmatched parentheses: 1" in a Scheme Script that looks fine

Quoting Shlomi Fish :

Hi all!

I'm trying to load the following script using gimp-2.3.14-2mdv2007.1:

http://www.shlomifish.org/Files/files/code/gimp/fierysteel.scm

...snipped...

1. Tell me what's wrong with the script.

2. Fix script-fu or tiny-fu so it will give a more descriptive error in that case.

1. That error would seem to be caused by the character encoding of the word, "ÄKSÖN". Particularly, the "Ö". I would recommend removing the word (as well as the word, "Äydx"; though that doesn't seem to cause problems).

There would seem to be a few other updates needed to make the script function. First, the following variables need to be reserved in the initial 'let*' statement:

(tmp-layer) (bump-layer)
(fire-layer)
(fire1-layer)
(fire2-layer)
(fire3-layer)
(turbul-layer)
(turbul2-layer)
(sendtog)

The 'verbose' function call should be commented out. (Perhaps Kevin Cozens should consider adding it to the list compatibility functions? even as a 'no op')

Finally, the two 'plug-in-displace' function calls need to have their last argument ("CARTESIAN") removed.

Even with the above changes, the script does not seem to produce the intended result; but it will execute.

Kevin Cozens
2007-03-11 01:56:22 UTC (about 17 years ago)

"Error: unmatched parentheses: 1" in a Scheme Script that looks fine

Shlomi Fish wrote:

I'm trying to load the following script using gimp-2.3.14-2mdv2007.1:

http://www.shlomifish.org/Files/files/code/gimp/fierysteel.scm

However, I'm getting the following errors on STDERR:

[snip]

Error: unmatched parentheses: 1

Now, the script looks fine too me, and the error is not descriptive enough for me to tell where the problem is exactly. Thus, two things are in order:

1. Tell me what's wrong with the script.

The script contains three accented characters that do not appear to be valid UTF-8 coded characters. Since they appear inside a comment block they shouldn't be the cause of the problem.

I think the issue might be related to a comment line right before a close parenthesis. I've seen that happen before but thought it was fixed in one of the TinyScheme updates. I suspect the root of the problem is due to token() calling itself when it gets to the end of a comment line. I plan to eliminate the recursive use of token() and see if the problem goes away (assuming I can reproduce the problem to start with).

2. Fix script-fu or tiny-fu so it will give a more descriptive error in that case.

If my proposed fix for 1. (above) fixes the problem, you won't see this error except when you really do have a mismatch in the number of ( and ) in a script.