From: Marcin Tustin
Subject: Could be a stupid question: Cmucl failing to compile
Date: 
Message-ID: <9l4efb$9l2$1@newsg1.svr.pol.co.uk>
I've got a file which did compile, but since I added material at the end,
cmucl complains about end-of-file in the middle of the file. On trying to
load, it complains about unmatched close parentheses, but I'm (fairly) sure
this isn't so. Any ideas?

(I'd post the file, but it's a bit large to post (~300 lines))

From: Kaz Kylheku
Subject: Re: Could be a stupid question: Cmucl failing to compile
Date: 
Message-ID: <Bejd7.48470$B37.1129150@news1.rdc1.bc.home.com>
In article <············@newsg1.svr.pol.co.uk>, Marcin Tustin wrote:
>I've got a file which did compile, but since I added material at the end,
>cmucl complains about end-of-file in the middle of the file. On trying to
>load, it complains about unmatched close parentheses, but I'm (fairly) sure
>this isn't so. Any ideas?

Some text editors get confused by parentheses playing alternate roles,
for example the Lisp notation #\) representing the ) character, in which
case they become less than helpful.

>(I'd post the file, but it's a bit large to post (~300 lines))

Can you throw it on an HTTP or FTP server, and then cite the location?
Okay, that's a good warmup, now hit the source file. ;)
From: Marcin Tustin
Subject: Re: Could be a stupid question: Cmucl failing to compile
Date: 
Message-ID: <9l5pad$755$1@newsg1.svr.pol.co.uk>
Kaz Kylheku <···@ashi.footprints.net> wrote in message
····························@news1.rdc1.bc.home.com...
> In article <············@newsg1.svr.pol.co.uk>, Marcin Tustin wrote:
> >I've got a file which did compile, but since I added material at the end,
> >cmucl complains about end-of-file in the middle of the file. On trying to
> >load, it complains about unmatched close parentheses, but I'm (fairly)
sure
> >this isn't so. Any ideas?
>
> Some text editors get confused by parentheses playing alternate roles,
> for example the Lisp notation #\) representing the ) character, in which
> case they become less than helpful.
>
> >(I'd post the file, but it's a bit large to post (~300 lines))
>
> Can you throw it on an HTTP or FTP server, and then cite the location?
> Okay, that's a good warmup, now hit the source file. ;)

    Cheers man. I've broken up the file to the first part
(http://www.ecs.soton.ac.uk/~mt500/wrapper.lsp) and the part starting just
before the stream error (http://www.ecs.soton.ac.uk/~mt500/wrapperpt2.lsp).
I still don't think that it's the brackets, but I'd be happy to be proved
wrong.
From: Jochen Schmidt
Subject: Re: Could be a stupid question: Cmucl failing to compile
Date: 
Message-ID: <9l5rt4$4bd$1@rznews2.rrze.uni-erlangen.de>
Marcin Tustin wrote:

>     Cheers man. I've broken up the file to the first part
> (http://www.ecs.soton.ac.uk/~mt500/wrapper.lsp) and the part starting just
> before the stream error
> (http://www.ecs.soton.ac.uk/~mt500/wrapperpt2.lsp). I still don't think
> that it's the brackets, but I'd be happy to be proved wrong.

The method SCAN misses a paren at the end.
Note that I've not tried to compile the code and I do not know it that 
fixes the problem - but this is definitely an error.

ciao
Jochen

--
http://www.dataheaven.de
From: Jochen Schmidt
Subject: Re: Could be a stupid question: Cmucl failing to compile
Date: 
Message-ID: <9l5s1h$4bd$2@rznews2.rrze.uni-erlangen.de>
Jochen Schmidt wrote:

> Marcin Tustin wrote:
> 
>>     Cheers man. I've broken up the file to the first part
>> (http://www.ecs.soton.ac.uk/~mt500/wrapper.lsp) and the part starting
>> just before the stream error
>> (http://www.ecs.soton.ac.uk/~mt500/wrapperpt2.lsp). I still don't think
>> that it's the brackets, but I'd be happy to be proved wrong.
> 
> The method SCAN misses a paren at the end.
> Note that I've not tried to compile the code and I do not know it that
> fixes the problem - but this is definitely an error.

There are multiple parens missing at the end of SCAN...

ciao,
Jochen

--
http://www.dataheaven.de
From: Marcin Tustin
Subject: Re: Could be a stupid question: Cmucl failing to compile
Date: 
Message-ID: <9l5sin$ftb$1@news6.svr.pol.co.uk>
Jochen Schmidt <···@dataheaven.de> wrote in message
·················@rznews2.rrze.uni-erlangen.de...
> Jochen Schmidt wrote:
>
> > Marcin Tustin wrote:
> >
> >>     Cheers man. I've broken up the file to the first part
> >> (http://www.ecs.soton.ac.uk/~mt500/wrapper.lsp) and the part starting
> >> just before the stream error
> >> (http://www.ecs.soton.ac.uk/~mt500/wrapperpt2.lsp). I still don't think
> >> that it's the brackets, but I'd be happy to be proved wrong.
> >
> > The method SCAN misses a paren at the end.
> > Note that I've not tried to compile the code and I do not know it that
> > fixes the problem - but this is definitely an error.
>
> There are multiple parens missing at the end of SCAN...
Ah, the sheer prophecy of my subject line.
From: Kaz Kylheku
Subject: Re: Could be a stupid question: Cmucl failing to compile
Date: 
Message-ID: <ESxd7.53212$B37.1254427@news1.rdc1.bc.home.com>
In article <············@news6.svr.pol.co.uk>, Marcin Tustin wrote:
>Jochen Schmidt <···@dataheaven.de> wrote in message
>> There are multiple parens missing at the end of SCAN...
>Ah, the sheer prophecy of my subject line.

Note that this can be found in seconds with vi. I started matching
parens of the top-level forms in your second file one by one
using the % command and hit upon the scan method, which is the
second item.
From: Erik Naggum
Subject: Re: Could be a stupid question: Cmucl failing to compile
Date: 
Message-ID: <3206640440239424@naggum.net>
* ···@ashi.footprints.net (Kaz Kylheku)
> Note that this can be found in seconds with vi. I started matching
> parens of the top-level forms in your second file one by one
> using the % command and hit upon the scan method, which is the
> second item.

  There are two efficient ways in Emacs to do this that might be worth
  investigating for those who still think vi is a suitable editor. :)

  At the start of a buffer, lean on M-C-f.  Depending on the capacity of
  your keyboard's autorepeat feature, you will soon either hit the end of
  the buffer, or get an error very close to the position of the beginning
  of a form that has no terminating parenthesis.  It should not be a
  problem figuring out what is wrong.  This uses forward parsing, which is
  always a good idea in Lisp.

  Alternatively, at the end of the buffer, type M-C-u.  You will get an
  error if all the parentheses match, but will be positioned at the last
  unmatched parenthesis if there is one.  This used backward parsing, which
  has some serious drawbacks and may lead to false positives and negatives.

  I note in passing that Allegro CL's Emacs Lisp modes warn the user about
  unmatched parentheses before a buffer is saved.  This is a nice feature.

///
From: Kaz Kylheku
Subject: Re: Could be a stupid question: Cmucl failing to compile
Date: 
Message-ID: <qFEd7.57050$B37.1328328@news1.rdc1.bc.home.com>
In article <················@naggum.net>, Erik Naggum wrote:
>* ···@ashi.footprints.net (Kaz Kylheku)
>> Note that this can be found in seconds with vi. I started matching
>> parens of the top-level forms in your second file one by one
>> using the % command and hit upon the scan method, which is the
>> second item.
>
>  There are two efficient ways in Emacs to do this that might be worth
>  investigating for those who still think vi is a suitable editor. :)

I only wanted to show that even minimal support for parenthesis matching
can be of help, not to advocate any implementation. ;)