Daniel,

Thanks for the help.  I'm attaching a modified copy of fixgram myself.  This
version runs on my system, produces the expected output, and does _not_
cause make to generate a return code of 139.  Please let me know if it works
on your platform, and if it does, please integrate it into the source tree.

Essentially there are two changes.  The first one is an added "positioning"
command to set the insertion point for the three lines that were ending up
at line 2 instead of where they belonged.  The second one is I changed a
null line to include a blank so that an append command would not take that
as "end of input."  Apparently the version of ex on my system interprets a
null line the same as a "." entry.

Thanks,

Mark Post

-----Original Message-----
From: Dittmar, Daniel [mailto:daniel.dittmar@;sap.com]
Sent: Thursday, October 31, 2002 9:21 AM
To: 'Post, Mark K'; 'sapdb'
Subject: RE: Linux/390 Intent of ptoc/pcomp/fixgram


> In the fixgram script, it essentially executes "ex" to create 
> y.tab.h and
> edit y.tab.c.  The script starts off by doing a find on "yyval," which
> places it at the top of this bit of code:
>       int yyval 0;
>       int *yypv;
>       int yylval 0;
>       yyactr(__np__){
> 
> The script then deletes the first three lines, leaving only the
> "yyactr(__np__){" line.  A little further on, the script 
> tries to append
> these lines:
>         register int yyYpv;
>         register int *p, *q;
>         yyYpv = sp;
> 
> My question is, where are these lines supposed to go?  
> They're winding up
> being inserted at line 2, and not after the line with 
> "yyactr(__np__){" in
> it.

I'm sorry for having put this of for such a long time. There are 
areas that are more 'Tales From The Crypt' than 'In Remembrance
Of Things Past'. But it's Halloween season so I'm grabbing spikes 
and crucifix ...

Have a look at
ftp://ftp.sap.com/pub/sapdb/bin/tmp/fixgram.tgz.
This contains a changed fixgram, which saves all the intermediate results 
of the editing session. It also contains these intermediate results as
written on my machine. Maybe this hints at the problem.

cd sys/src/base/ptoc/pcomp
rm y.tab.c
cp <whereever>/fixgram .
make -f pgenc y.tab.c

Daniel Dittmar

-- 
Daniel Dittmar
SAP DB, SAP Labs Berlin
[EMAIL PROTECTED]
http://www.sapdb.org/

Attachment: fixgram
Description: Binary data

Reply via email to