* ftpcmd.y: Fix up grammar so that single character token names
authorTom Yu <tlyu@mit.edu>
Sat, 26 Aug 2000 01:30:04 +0000 (01:30 +0000)
committerTom Yu <tlyu@mit.edu>
Sat, 26 Aug 2000 01:30:04 +0000 (01:30 +0000)
are no longer used; this was breaking the build using bison on
HP/UX because some system headers declare structures with members
having all-uppercase field names and bison puts the token name
#define statements in front of the C declarations section in the
output, causing them to be in force while those headers get
#included.  There doesn't seem to be much purpose in not just
using character constants, anyway.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12632 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/gssftp/ftpd/ChangeLog
src/appl/gssftp/ftpd/ftpcmd.y

index 5bab683e9c26fd6305e6253d5cdd81a79b48491c..971a4c4588c27d7dfeee14eb581b9c3c51b0bd9d 100644 (file)
@@ -1,3 +1,14 @@
+2000-08-25  Tom Yu  <tlyu@mit.edu>
+
+       * ftpcmd.y: Fix up grammar so that single character token names
+       are no longer used; this was breaking the build using bison on
+       HP/UX because some system headers declare structures with members
+       having all-uppercase field names and bison puts the token name
+       #define statements in front of the C declarations section in the
+       output, causing them to be in force while those headers get
+       #included.  There doesn't seem to be much purpose in not just
+       using character constants, anyway.
+
 Tue Aug 22 11:37:35 2000  Ezra Peisach  <epeisach@mit.edu>
 
        * secure.h (myaddr): For secure data stream, pass the port number
index bc252190ea2e229f9a50b6d9bd66dc5a7d5a6832..197815a6f562e14e979c2f6c4e43d4272a556cd8 100644 (file)
@@ -172,9 +172,6 @@ struct tab sitetab[];
 %union { int num; char *str; }
 
 %token
-       A       B       C       E       F       I
-       L       N       P       R       S       T
-
        SP      CRLF    COMMA   STRING  NUMBER
 
        USER    PASS    ACCT    REIN    QUIT    PORT
@@ -353,7 +350,7 @@ cmd:                USER SP username CRLF
                = {
                        reply(202, "ALLO command ignored.");
                }
-       |       ALLO SP NUMBER SP R SP NUMBER CRLF
+       |       ALLO SP NUMBER SP 'R' SP NUMBER CRLF
                = {
                        reply(202, "ALLO command ignored.");
                }
@@ -698,103 +695,103 @@ host_port:      NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA
                }
        ;
 
-form_code:     N
+form_code:     'N'
        = {
                $$ = FORM_N;
        }
-       |       T
+       |       'T'
        = {
                $$ = FORM_T;
        }
-       |       C
+       |       'C'
        = {
                $$ = FORM_C;
        }
        ;
 
-prot_code:     C
+prot_code:     'C'
        = {
                $$ = PROT_C;
        }
-       |       S
+       |       'S'
        = {
                $$ = PROT_S;
        }
-       |       P
+       |       'P'
        = {
                $$ = PROT_P;
        }
-       |       E
+       |       'E'
        = {
                $$ = PROT_E;
        }
        ;
 
-type_code:     A
+type_code:     'A'
        = {
                cmd_type = TYPE_A;
                cmd_form = FORM_N;
        }
-       |       A SP form_code
+       |       'A' SP form_code
        = {
                cmd_type = TYPE_A;
                cmd_form = $3;
        }
-       |       E
+       |       'E'
        = {
                cmd_type = TYPE_E;
                cmd_form = FORM_N;
        }
-       |       E SP form_code
+       |       'E' SP form_code
        = {
                cmd_type = TYPE_E;
                cmd_form = $3;
        }
-       |       I
+       |       'I'
        = {
                cmd_type = TYPE_I;
        }
-       |       L
+       |       'L'
        = {
                cmd_type = TYPE_L;
                cmd_bytesz = NBBY;
        }
-       |       L SP byte_size
+       |       'L' SP byte_size
        = {
                cmd_type = TYPE_L;
                cmd_bytesz = $3;
        }
        /* this is for a bug in the BBN ftp */
-       |       L byte_size
+       |       'L' byte_size
        = {
                cmd_type = TYPE_L;
                cmd_bytesz = $2;
        }
        ;
 
-struct_code:   F
+struct_code:   'F'
        = {
                $$ = STRU_F;
        }
-       |       R
+       |       'R'
        = {
                $$ = STRU_R;
        }
-       |       P
+       |       'P'
        = {
                $$ = STRU_P;
        }
        ;
 
-mode_code:     S
+mode_code:     'S'
        = {
                $$ = MODE_S;
        }
-       |       B
+       |       'B'
        = {
                $$ = MODE_B;
        }
-       |       C
+       |       'C'
        = {
                $$ = MODE_C;
        }
@@ -1349,51 +1346,51 @@ yylex()
 
                        case 'A':
                        case 'a':
-                               return (A);
+                               return ('A');
 
                        case 'B':
                        case 'b':
-                               return (B);
+                               return ('B');
 
                        case 'C':
                        case 'c':
-                               return (C);
+                               return ('C');
 
                        case 'E':
                        case 'e':
-                               return (E);
+                               return ('E');
 
                        case 'F':
                        case 'f':
-                               return (F);
+                               return ('F');
 
                        case 'I':
                        case 'i':
-                               return (I);
+                               return ('I');
 
                        case 'L':
                        case 'l':
-                               return (L);
+                               return ('L');
 
                        case 'N':
                        case 'n':
-                               return (N);
+                               return ('N');
 
                        case 'P':
                        case 'p':
-                               return (P);
+                               return ('P');
 
                        case 'R':
                        case 'r':
-                               return (R);
+                               return ('R');
 
                        case 'S':
                        case 's':
-                               return (S);
+                               return ('S');
 
                        case 'T':
                        case 't':
-                               return (T);
+                               return ('T');
 
                        }
                        break;