help-bison
[Top][All Lists]
Advanced

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

RE: ftpcmd.y -- syntax error


From: Jacques Dejean
Subject: RE: ftpcmd.y -- syntax error
Date: Tue, 6 Apr 2004 08:33:35 -0400

Hello Hans,

I discovered yesterday that the problem is with 'bison -y'.  I ran 'bison -y
ftpcmd.y' and got errors.  If I either remove the equal sign (=) from the
syntax or enclose it in quotes ('='), 'bison -y' will compile ok; however,
the final executable (ftpd) will refuse connection.  I changed 'bison -y' to
'yacc', and it worked successfully.  The final executable 'ftpd' works as
expected.  What is the difference between 'bison -y' and 'yacc'?  Isn't
"bison -y" supposed to function as 'yacc'?

Regards,
Jacques V. Dejean
Lead Systems Administrator, CSA - HPUX
Alliance Entertainment 
(v) 954-255-4344


-----Original Message-----
From: Hans Aberg [mailto:address@hidden 
Sent: Monday, April 05, 2004 1:23 PM
To: Jacques Dejean
Cc: Help-Bison
Subject: Re: ftpcmd.y -- syntax error


You should probably have '=' or "=" in your grammar line 197. In the latter
case, you need a declaration like
  %token ASSIGNMENT "="
and your lexer should then return the token ASSIGNMENT when it detects a =.


At 12:25 -0400 2004/04/05, Jacques Dejean wrote:
>Hello,
>
>I encounter the following error when compiling from source 
>wu-ftpd-2.6.1-18.src.rpm wu-ftpd-2.6.2-8.src.rpm.  After reading 
>several mailing lists articles, I upgraded to
>bison 1.875; however, the error continues.
>
>My environment is SuSE Linux 8.2.
>
>The errors are as follows:
>make[1]: Entering directory `/usr/src/packages/BUILD/wu-ftpd/src'
>gcc  -O2 -march=i486 -mcpu=i686 -I.. -I../support -c -o COPYRIGHT.o 
>COPYRIGHT.c bison -y ftpcmd.y
>ftpcmd.y:197.9: syntax error, unexpected "="
>ftpcmd.y:205.9: syntax error, unexpected "="
>ftpcmd.y:228.17-18: $2 of `cmd' has no declared type
>ftpcmd.y:260.17-18: $2 of `cmd' has no declared type
>ftpcmd.y:271.17-18: $2 of `cmd' has no declared type
><< snipped >>
>ftpcmd.y:1336.9: syntax error, unexpected "="
>ftpcmd.y:1360.12: warning: empty rule for typed nonterminal, and no action
>ftpcmd.y:1361.9: syntax error, unexpected "="
>make[1]: *** [ftpcmd.c] Error 1
>make[1]: Leaving directory `/usr/src/packages/BUILD/wu-ftpd/src'
>make: *** [all] Error 2
>Bad exit status from /var/tmp/rpm-tmp.91856 (%build)
>
>The code portion in "ftpcmd.y" is --
>    194
>    195 cmd_list:       /* empty */
>    196     | cmd_list cmd
>    197         =       {
>    198             fromname = (char *) NULL;
>    199             restart_point = 0;
>    200         }
>    201     | cmd_list rcmd
>    202     ;
>
>Any suggestions on the cause of this error would be greatly 
>appreciated.
>
>Regards,
>Jacques Dejean
>Lead Systems Administrator, CSA-HPUX
>Alliance Entertainment Corp.
>954-255-4344 (v)
>
>
>_______________________________________________
>address@hidden http://mail.gnu.org/mailman/listinfo/help-bison






reply via email to

[Prev in Thread] Current Thread [Next in Thread]