GNU Pascal Homepage - gpc - gpc-announce - gpc-de - gpc-doc
Diese Seite auf deutsch

Mail #7205

Back to main page of archive

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  

From: Tom Schneider
Subject: GPC error messages
Date: 4 Nov 2002, 23:47:14

Frank:

> > Here is a bad chunk of code:
> > 
> >             ri := ri +
> >          end;
> > 
> > This is what GPC has to say about it:
> > 
> > ridi.p:1531: parse error before `End'
> > 
> > Here is what the Sun Pascal compiler has to say about it:
> > 
> > pc0: WorkShop Compilers 4.2 01/04/00 Pascal 4.2 patch 104632-11
> > Fri Nov  1 02:52:33 2002  ridi.p:
> >         1531           end;
> > E 18480----------------^---  Inserted identifier
> > 
> > I always find the Sun display much easier to interpret instantly.  It
> > would be nice to have GPC show the line and show the point of the
> > error.
> 
> GPC's error messages (which follow the same standard as most GNU
> programs) are more targeted towards automatic parsing.

Yes, that's good.

> If run call
> GPC from a user interface that supports it (e.g., PENG ... excuse
> the little plug ;-),

Noted!

> but I guess also RHIDE, Emacs, etc.), it will
> show the source position.
> 
> But if you prefer working on the command-line, here's a little
> script to convert the message format. You have to pipe the error
> messages through it, e.g.
> 
> sh/bash:
> 
>   gpc <options> foo.pas 2>&1 | gnumsg2spc
> 
> csh/tcsh:
> 
>   gpc <options> foo.pas |& gnumsg2spc
> 
> DJGPP:
> 
>   redir -eo gpc <options> foo.pas | sh gnumsg2spc

Thanks for the explanation.  I was not able to locate
gnumsg2spc on the web with google though.  Where is it?

> Another issue is that GPC's messages don't include the column
> position. Unfortunately, that's hard to achieve with the current
> design of the preprocessor and lexer. But a reimplementation of
> those is planned, and then it will be possible I hope.

Great!

Tom

  Dr. Thomas D. Schneider
  National Cancer Institute
  Laboratory of Experimental and Computational Biology
  Frederick, Maryland  21702-1201
  toms@ncifcrf.gov
  permanent email: toms@alum.mit.edu (use only if first address fails)
  http://www.lecb.ncifcrf.gov/~toms/

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  


Replies

Author Subject Date
Frank Heckenbach GPC error messages 5 Nov 2002, 19:52:23

Back to main page of archive


Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.

Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.


This page was created by Crystal 0.999 (Linux 2.4.27/i686).