[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 19990428: ldm-5.0.8 (linux) compilation errors (RESEND) support-ldm <address@hidden>



>To: address@hidden
>cc: address@hidden (Celia Chen)
>From: address@hidden (Celia Chen)
>Subject: ldm-5.0.8 (linux) compilation errors
>Keywords: 199904282030.OAA26069 bison yacc

Celia:

It turns out that your (Debian Linux) system yacc _is_
bison, and bison is more picky about the input than older
versions on yacc.

Attached find a patch to server/conf.l and server/conf.y which
remedies the problem. The patched versions are checked in and
will appear in the next release.

-glenn
Index: conf.l
===================================================================
RCS file: /upc/share/CVS/ldm5/server/conf.l,v
retrieving revision 1.13
retrieving revision 1.14
diff -c -r1.13 -r1.14
*** conf.l      1999/04/02 23:16:51     1.13
--- conf.l      1999/04/29 23:33:47     1.14
***************
*** 10,16 ****
   *   Copyright 1995, University Corporation for Atmospheric Research
   *   See ../COPYRIGHT file for copying and redistribution conditions.
   */
! /* $Id: conf.l,v 1.13 1999/04/02 23:16:51 davis Exp $ */
  
  /* 
   * Lexer for ldm5 configuration file.
--- 10,16 ----
   *   Copyright 1995, University Corporation for Atmospheric Research
   *   See ../COPYRIGHT file for copying and redistribution conditions.
   */
! /* $Id: conf.l,v 1.14 1999/04/29 23:33:47 davis Exp $ */
  
  /* 
   * Lexer for ldm5 configuration file.
***************
*** 25,31 ****
--- 25,33 ----
  #include "atofeedt.h"
  #include "acl.h"
  
+ #if YYDEBUG
  extern int yydebug;
+ #endif
  
  %}
  
***************
*** 59,81 ****
--- 61,89 ----
  
  ([Aa][Ll][Ll][Oo][Ww])        {
                        BEGIN FT;
+ #if YYDEBUG
                        if(yydebug)
                                udebug("ALLOW");
+ #endif
                        return (ALLOW_K);
                }
  
  ([Aa][Cc][Cc][Ee][Pp][Tt])    {
                        BEGIN FT;
+ #if YYDEBUG
                        if(yydebug)
                                udebug("ACCEPT");
+ #endif
                        return (ACCEPT_K);
                }
  
  
  ([Rr][Ee][Qq][Uu][Ee][Ss][Tt]|POLL|poll)      {
                        BEGIN FT;
+ #if YYDEBUG
                        if(yydebug)
                                udebug("REQUEST");
+ #endif
                        return (REQUEST_K);
                }
  
***************
*** 83,90 ****
--- 91,100 ----
  
  ([Ee][Xx][Ee][Cc])    {
                        BEGIN CP;
+ #if YYDEBUG
                        if(yydebug)
                                udebug("EXEC");
+ #endif
                        return (EXEC_K);
                }
  
***************
*** 97,104 ****
--- 107,116 ----
                        BEGIN 0;
                        if(status == FEEDTYPE_OK)
                        {
+ #if YYDEBUG
                                if(yydebug)
                                        udebug("feedtype: 0x08x", yylval.ft);
+ #endif
                                return (FEEDTYPE);
                        }
                        
***************
*** 114,121 ****
--- 126,135 ----
                        BEGIN 0;
                        if(status == FEEDTYPE_OK)
                        {
+ #if YYDEBUG
                                if(yydebug)
                                        udebug("feedtype: 0x08x", yylval.ft);
+ #endif
                                return (FEEDTYPE);
                        }
                        
***************
*** 155,163 ****
                                serror("yylex:new_host_set");
                                return -1;
                        }
                        if(yydebug)
                                udebug("hostname: \"%s\"", yylval.hsp->cp);
!                       return (HOSTNAME);
                }
  
  \"{alpha}({hostnchars}*)\"    {
--- 169,179 ----
                                serror("yylex:new_host_set");
                                return -1;
                        }
+ #if YYDEBUG
                        if(yydebug)
                                udebug("hostname: \"%s\"", yylval.hsp->cp);
! #endif
!                       return (HOST);
                }
  
  \"{alpha}({hostnchars}*)\"    {
***************
*** 169,177 ****
                                serror("yylex:new_host_set");
                                return -1;
                        }
                        if(yydebug)
                                udebug("qhostname: \"%s\"", yylval.hsp->cp);
!                       return (HOSTNAME);
                }
  
  {nnn}\.{nnn}\.{nnn}\.{nnn}\.? {
--- 185,195 ----
                                serror("yylex:new_host_set");
                                return -1;
                        }
+ #if YYDEBUG
                        if(yydebug)
                                udebug("qhostname: \"%s\"", yylval.hsp->cp);
! #endif
!                       return (HOST);
                }
  
  {nnn}\.{nnn}\.{nnn}\.{nnn}\.? {
***************
*** 181,190 ****
                                serror("yylex:new_host_set");
                                return -1;
                        }
                        if(yydebug)
                                udebug("dotted quad: \"%s\"",
                                         yylval.hsp->cp);
!                       return (DOTTED_QUAD);
                }
  
  {regexp}      {
--- 199,210 ----
                                serror("yylex:new_host_set");
                                return -1;
                        }
+ #if YYDEBUG
                        if(yydebug)
                                udebug("dotted quad: \"%s\"",
                                         yylval.hsp->cp);
! #endif
!                       return (HOST);
                }
  
  {regexp}      {
***************
*** 201,208 ****
--- 221,230 ----
                                        yylval.rg.cp);
                                return -1;
                        }
+ #if YYDEBUG
                        if(yydebug)
                                udebug("regexp: \"%s\"", yylval.rg.cp);
+ #endif
                        return (REGEXP);
                }
  
***************
*** 221,228 ****
--- 243,252 ----
                                        yylval.rg.cp);
                                return -1;
                        }
+ #if YYDEBUG
                        if(yydebug)
                                udebug("qregexp: \"%s\"", yylval.rg.cp);
+ #endif
                        return (REGEXP);
                }
  
Index: conf.y
===================================================================
RCS file: /upc/share/CVS/ldm5/server/conf.y,v
retrieving revision 1.20
retrieving revision 1.21
diff -c -r1.20 -r1.21
*** conf.y      1999/04/02 23:16:51     1.20
--- conf.y      1999/04/29 23:33:47     1.21
***************
*** 7,13 ****
   *   Copyright 1995, University Corporation for Atmospheric Research
   *   See ../COPYRIGHT file for copying and redistribution conditions.
   */
! /* $Id: conf.y,v 1.20 1999/04/02 23:16:51 davis Exp $ */
  
  #include <ldmconfig.h>
  #include <string.h>
--- 7,13 ----
   *   Copyright 1995, University Corporation for Atmospheric Research
   *   See ../COPYRIGHT file for copying and redistribution conditions.
   */
! /* $Id: conf.y,v 1.21 1999/04/29 23:33:47 davis Exp $ */
  
  #include <ldmconfig.h>
  #include <string.h>
***************
*** 58,69 ****
  %token REQUEST_K
  %token EXEC_K
  
! %token FEEDTYPE
! %token HOSTNAME
! %token DOTTED_QUAD
! %token REGEXP 
! %token QREGEXP 
! %token COMMAND 
  
  %start table
  
--- 58,67 ----
  %token REQUEST_K
  %token EXEC_K
  
! %token <ft>   FEEDTYPE
! %token <hsp>  HOST
! %token <rg>   REGEXP 
! %token <wrdexp>       COMMAND 
  
  %start table
  
***************
*** 80,86 ****
  
  allow_entry:  ALLOW_K FEEDTYPE hostset
                {
!                       status = allow_acl_add($2.ft, $3.hsp);
                        if(status != ENOERR)
                        {
                                uerror("allow_acl_add: %s",
--- 78,84 ----
  
  allow_entry:  ALLOW_K FEEDTYPE hostset
                {
!                       status = allow_acl_add($2, $<hsp>3);
                        if(status != ENOERR)
                        {
                                uerror("allow_acl_add: %s",
***************
*** 93,100 ****
  
  accept_entry: ACCEPT_K FEEDTYPE REGEXP hostset
                {
!                       status = accept_acl_add($2.ft,
!                                $3.rg.cp, &$3.rg.rgx, $4.hsp);
                        if(status != ENOERR)
                        {
                                uerror("accept_acl_add: %s",
--- 91,98 ----
  
  accept_entry: ACCEPT_K FEEDTYPE REGEXP hostset
                {
!                       status = accept_acl_add($2,
!                                $3.cp, &$3.rgx, $<hsp>4);
                        if(status != ENOERR)
                        {
                                uerror("accept_acl_add: %s",
***************
*** 104,113 ****
                }
                ;
  
! request_entry:        REQUEST_K FEEDTYPE REGEXP       host
                {
!                       status = request_add($2.ft, $3.rg.cp,
!                               &$3.rg.rgx, $4.hsp);
                        if(status != ENOERR)
                        {
                                uerror("accept_acl_add: %s",
--- 102,111 ----
                }
                ;
  
! request_entry:        REQUEST_K FEEDTYPE REGEXP       HOST
                {
!                       status = request_add($2, $3.cp,
!                               &$3.rgx, $4);
                        if(status != ENOERR)
                        {
                                uerror("accept_acl_add: %s",
***************
*** 119,125 ****
  
  exec_entry:   EXEC_K COMMAND
                {
!                       status = exec_add(&($2.wrdexp));
                        if(status != ENOERR)
                        {
                                uerror("exec_add: %s",
--- 117,123 ----
  
  exec_entry:   EXEC_K COMMAND
                {
!                       status = exec_add(&($2));
                        if(status != ENOERR)
                        {
                                uerror("exec_add: %s",
***************
*** 129,151 ****
                }
                ;
  
! hostset:      host | host_regexp;
! 
! host:         HOSTNAME | DOTTED_QUAD;
  
  host_regexp:  REGEXP
                {
                        /* transform the regexp to a host_set */
!                       const char *cp = $1.rg.cp;
!                       const regex_t *rgxp = &$1.rg.rgx;
!                       $1.hsp = new_host_set(HS_REGEXP, cp, rgxp);
!                       if($1.hsp == NULL)
                        {
                                serror("yyparse: new_host_set");
                                return 1;
                        }
!                       $$ = $1;
!               };
  
  %%
  #include "confyy.c"
--- 127,150 ----
                }
                ;
  
! hostset:      HOST {}
!               | host_regexp
!               ;
  
  host_regexp:  REGEXP
                {
                        /* transform the regexp to a host_set */
!                       const char *cp = $1.cp;
!                       const regex_t *rgxp = &$1.rgx;
!                       $<hsp>1 = new_host_set(HS_REGEXP, cp, rgxp);
!                       if($<hsp>1 == NULL)
                        {
                                serror("yyparse: new_host_set");
                                return 1;
                        }
!                       $<hsp>$ = $<hsp>1;
!               }
!               ;
  
  %%
  #include "confyy.c"