RE: Problem building Dev Tools

"Post, Mark K" <[email protected]> Fri, 27 Jun 2003 13:02:31 -0400
Newsgroups gmane.comp.db.sapdb.sources
Message-ID <564DE4477544D411AD2C00508BDF0B6A12F0C566@usahm018.exmi01.exch.eds.com>
I ran into the same problem on a Linux/390 Slackware system.  I wound up
generating this sed file that does the same thing.  I don't have enough
expertise to incorporate this into the build process though.  Apparently
Daniel didn't have enough time to do it either.

Mark Post


1,/^##/ d
/int yyval 0/{N;N;d;}
/\*yysterm\[]/,$ c\
\
yyEactr(__np__, var)\
int __np__;\
char *var;\
\{\
return (1);\
\}
s/yypv/yyYpv/g
s/yyYpv\[\([0-9]\)\]/yyYpv + \1/g
s/yyYpv\[-\([0-9]\)\]/yyYpv - \1/g
s/extern int yychar,/extern/
/yyactr/ a\
        register int yyYpv;\
        register int *p, *q;\
        yyYpv = sp;
/yyclearin/d
/yyerrok/d
s/yyval/mp/g
/int nterms/d
/int nnonter/d
/int nstate/d
/int yyerrval/d
s%\[\] {%\[\] \= {%
/include "..\/pgram\/0.h"/ r ../pgram/f.head.h


I also created a diff to the fixgram script itself.  I didn't trust this as
much as the sed script, because I wasn't able to check to see if it breaks
other platforms.  It seemed to do the trick for me, though.

--- sys/src/base/ptoc/pcomp/fixgram.orig        Thu Apr 25 12:02:06 2002
+++ sys/src/base/ptoc/pcomp/fixgram     Thu Sep 19 19:20:36 2002
@@ -1,5 +1,5 @@
 #
-ex y.tab.c << 'EOF'
+ex y.tab.c << \!
 set noignorecase
 set wrapscan
 /yyval
@@ -7,7 +7,8 @@
 /\*yysterm\[]/,$d
 1;/yyactr/ka
 'a,$s/yypv/yyYpv/g
-'aa
+1;/yyactr
+a
        register int yyYpv;
        register int *p, *q;
        yyYpv = sp;
@@ -23,7 +24,7 @@
 r ../pgram/f.head.h
 1,$ s/yyval/mp/g
 $a
-
+
 yyEactr(__np__, var)
 int __np__;
 char *var;
@@ -44,6 +45,5 @@
 /yygo/s/ {/ = {/
 /yypgo/s/ {/ = {/
 .
-w!
-q
-'EOF'
+wq
+!


Mark Post
-----Original Message-----
--__--__--

To: [email protected]
From: Ron Gage <[email protected]>
Date: Tue, 24 Jun 2003 21:13:55 -0400
Subject: [SAP DB Dev] Re: Problem building Dev Tools

Dittmar, Daniel wrote:
>>Looks like I am missing something here...  I can't get 
>>devtools to build 
>>at all.  Getting all kinds of errors.
> 
> 
> On what platform are you trying to build the devtools?

Slackware 9.0, AMD XP1800, 1 gig memory.


> 
> 
>>On the first pass when trying to build the dev tools, I get 
>>the following...
>>
>>
>>/yyval
>>.,.+2 d
>>/\*yysterm\[]/,$d
>>1;/yyactr/ka
>>'a,$s/yypv/yyYpv/g
>>'aa
>>         register int yyYpv;
>>         register int *p, *q;
>>         yyYpv = sp;
> 
> 
> I do remember a similiar problem with the s390 port, I'll try to find the
mail about the solution (I think it was some slightly misbehaving ed
implementation).
> 
> Daniel Dittmar
> 

I was (finally) able to catch a bit more of the error...  at least 
something that looks relevent..

conflicts: 7 shift/reduce
./fixgram: line 49: 10673 Segmentation fault      ex y.tab.c  <<'EOF'
set noignorecase
set wrapscan
/yyval
.,.+2 d
/\*yysterm\[]/,$d
1;/yyactr/ka
'a,$s/yypv/yyYpv/g
'aa

In all the coding I have done, seg faults weren't a good thing.  :)

Ron Gage