[IRC-Dev CVS] [CVS] Module ircd-ircdev: Change committed
Brought to you by:
zolty
From: Toni G. <zo...@us...> - 2003-11-02 18:34:58
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2003-11-02 18:34:57 UTC Modified files: ChangeLog ChangeLog.es config.h.in configure configure.in include/patchlevel.h ircd/Makefile.in ircd/ircd_parser.y Log message: Author: Log message: ---------------------- diff included ---------------------- Index: ircd-ircdev/ChangeLog diff -u ircd-ircdev/ChangeLog:1.5 ircd-ircdev/ChangeLog:1.6 --- ircd-ircdev/ChangeLog:1.5 Sat Nov 1 16:47:33 2003 +++ ircd-ircdev/ChangeLog Sun Nov 2 10:34:46 2003 @@ -1,10 +1,14 @@ # # ChangeLog for ircd-ircdev # -# $Id: ChangeLog,v 1.5 2003/11/02 00:47:33 zolty Exp $ +# $Id: ChangeLog,v 1.6 2003/11/02 18:34:46 zolty Exp $ # # Insert new changes at beginning of the change list. # +2003-11-02 Toni Garcia <zo...@ir...> 1.0.alpha5 + * Check lex and yacc (configure.in). + * Fix bison bug (ircd_parser.y). + 2003-11-02 Toni Garcia <zo...@ir...> 1.0.alpha4 * Privilegies user feature. * Changed DNS resolution. Index: ircd-ircdev/ChangeLog.es diff -u ircd-ircdev/ChangeLog.es:1.5 ircd-ircdev/ChangeLog.es:1.6 --- ircd-ircdev/ChangeLog.es:1.5 Sat Nov 1 16:47:33 2003 +++ ircd-ircdev/ChangeLog.es Sun Nov 2 10:34:46 2003 @@ -1,10 +1,14 @@ # # Log de Cambios para ircd-ircdev # -# $Id: ChangeLog.es,v 1.5 2003/11/02 00:47:33 zolty Exp $ +# $Id: ChangeLog.es,v 1.6 2003/11/02 18:34:46 zolty Exp $ # # Insertar los nuevos cambios al principio de esta lista de cambios. # +2003-11-02 Toni Garcia <zo...@ir...> 1.0.alpha5 + * Chequeo de lex y yacc en el configure.in. + * Fix de un bug de bison (ircd_parser.y). + 2003-11-02 Toni Garcia <zo...@ir...> 1.0.alpha4 * Implementacion de Privilegios. * Cambios en la resolucion DNS. Index: ircd-ircdev/config.h.in diff -u ircd-ircdev/config.h.in:1.2 ircd-ircdev/config.h.in:1.3 --- ircd-ircdev/config.h.in:1.2 Sat Nov 1 09:19:35 2003 +++ ircd-ircdev/config.h.in Sun Nov 2 10:34:46 2003 @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: config.h.in,v 1.2 2003/11/01 17:19:35 zolty Exp $ + * $Id: config.h.in,v 1.3 2003/11/02 18:34:46 zolty Exp $ */ /* Define if you have the setrlimit function */ @@ -228,6 +228,10 @@ /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ #undef WORDS_BIGENDIAN + +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +#undef YYTEXT_POINTER /* Define to `int' if <sys/types.h> doesn't define. */ #undef gid_t Index: ircd-ircdev/configure diff -u ircd-ircdev/configure:1.4 ircd-ircdev/configure:1.5 --- ircd-ircdev/configure:1.4 Sat Nov 1 16:47:33 2003 +++ ircd-ircdev/configure Sun Nov 2 10:34:47 2003 @@ -309,7 +309,7 @@ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AWK SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S RMPROG SHPROG OSDEP_C ENGINE_C RES_C ADNS_SUBDIR INSTALL_RULE SYMLINK IRCDMODE IRCDOWN IRCDGRP DPATH LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AWK SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S LEX LEXLIB LEX_OUTPUT_ROOT YACC RMPROG SHPROG OSDEP_C ENGINE_C RES_C ADNS_SUBDIR INSTALL_RULE SYMLINK IRCDMODE IRCDOWN IRCDGRP DPATH LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -6775,6 +6775,290 @@ echo "${ECHO_T}no, using $LN_S" >&6 fi +for ac_prog in flex lex +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_LEX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LEX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +LEX=$ac_cv_prog_LEX +if test -n "$LEX"; then + echo "$as_me:$LINENO: result: $LEX" >&5 +echo "${ECHO_T}$LEX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$LEX" && break +done +test -n "$LEX" || LEX=":" + +if test -z "$LEXLIB" +then + echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5 +echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6 +if test "${ac_cv_lib_fl_yywrap+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char yywrap (); +int +main () +{ +yywrap (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_fl_yywrap=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_fl_yywrap=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5 +echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6 +if test $ac_cv_lib_fl_yywrap = yes; then + LEXLIB="-lfl" +else + echo "$as_me:$LINENO: checking for yywrap in -ll" >&5 +echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6 +if test "${ac_cv_lib_l_yywrap+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ll $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char yywrap (); +int +main () +{ +yywrap (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_l_yywrap=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_l_yywrap=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5 +echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6 +if test $ac_cv_lib_l_yywrap = yes; then + LEXLIB="-ll" +fi + +fi + +fi + +if test "x$LEX" != "x:"; then + echo "$as_me:$LINENO: checking lex output file root" >&5 +echo $ECHO_N "checking lex output file root... $ECHO_C" >&6 +if test "${ac_cv_prog_lex_root+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # The minimal lex program is just a single line: %%. But some broken lexes +# (Solaris, I think it was) want two %% lines, so accommodate them. +cat >conftest.l <<_ACEOF +%% +%% +_ACEOF +{ (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5 + (eval $LEX conftest.l) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +else + { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 +echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} + { (exit 1); exit 1; }; } +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_root" >&6 +rm -f conftest.l +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 +echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6 +if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c +ac_save_LIBS=$LIBS +LIBS="$LIBS $LEXLIB" +cat >conftest.$ac_ext <<_ACEOF +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_lex_yytext_pointer=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_save_LIBS +rm -f "${LEX_OUTPUT_ROOT}.c" + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6 +if test $ac_cv_prog_lex_yytext_pointer = yes; then + +cat >>confdefs.h <<\_ACEOF +#define YYTEXT_POINTER 1 +_ACEOF + +fi + +fi +for ac_prog in 'bison -y' byacc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_YACC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_YACC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + echo "$as_me:$LINENO: result: $YACC" >&5 +echo "${ECHO_T}$YACC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + for ac_prog in rm do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -8735,6 +9019,10 @@ s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@LN_S@,$LN_S,;t t +s,@LEX@,$LEX,;t t +s,@LEXLIB@,$LEXLIB,;t t +s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t +s,@YACC@,$YACC,;t t s,@RMPROG@,$RMPROG,;t t s,@SHPROG@,$SHPROG,;t t s,@OSDEP_C@,$OSDEP_C,;t t Index: ircd-ircdev/configure.in diff -u ircd-ircdev/configure.in:1.4 ircd-ircdev/configure.in:1.5 --- ircd-ircdev/configure.in:1.4 Sat Nov 1 16:47:33 2003 +++ ircd-ircdev/configure.in Sun Nov 2 10:34:47 2003 @@ -19,7 +19,7 @@ dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. dnl -dnl $Id: configure.in,v 1.4 2003/11/02 00:47:33 zolty Exp $ +dnl $Id: configure.in,v 1.5 2003/11/02 18:34:47 zolty Exp $ dnl Make sure we are in the correct directory (someone could have run dnl 'configure' with a wrong '--srcdir'). @@ -139,6 +139,8 @@ AC_PROG_MAKE_SET AC_PROG_INSTALL AC_PROG_LN_S +AC_PROG_LEX +AC_PROG_YACC AC_PATH_PROGS(RMPROG, rm, /bin/rm) AC_PATH_PROGS(SHPROG, sh, /bin/sh) Index: ircd-ircdev/include/patchlevel.h diff -u ircd-ircdev/include/patchlevel.h:1.5 ircd-ircdev/include/patchlevel.h:1.6 --- ircd-ircdev/include/patchlevel.h:1.5 Sat Nov 1 16:47:33 2003 +++ ircd-ircdev/include/patchlevel.h Sun Nov 2 10:34:47 2003 @@ -15,10 +15,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: patchlevel.h,v 1.5 2003/11/02 00:47:33 zolty Exp $ + * $Id: patchlevel.h,v 1.6 2003/11/02 18:34:47 zolty Exp $ * */ -#define PATCHLEVEL ".alpha4" +#define PATCHLEVEL ".alpha5" #define RELEASE "1.0" Index: ircd-ircdev/ircd/Makefile.in diff -u ircd-ircdev/ircd/Makefile.in:1.5 ircd-ircdev/ircd/Makefile.in:1.6 --- ircd-ircdev/ircd/Makefile.in:1.5 Sat Nov 1 16:47:33 2003 +++ ircd-ircdev/ircd/Makefile.in Sun Nov 2 10:34:47 2003 @@ -32,15 +32,14 @@ RM = @RMPROG@ AWK = @AWK@ LN_S = @LN_S@ +LEX = @LEX@ +YACC = @YACC@ MV = mv CHMOD = chmod CHOWN = chown CHGRP = chgrp MKDIR = mkdir TOUCH = touch -LEX = flex -#YACC = bison -y -YACC = bison-1.35 -y GREP = grep OSDEP_C = @OSDEP_C@ ENGINE_C = @ENGINE_C@ Index: ircd-ircdev/ircd/ircd_parser.y diff -u ircd-ircdev/ircd/ircd_parser.y:1.2 ircd-ircdev/ircd/ircd_parser.y:1.3 --- ircd-ircdev/ircd/ircd_parser.y:1.2 Sat Nov 1 16:47:33 2003 +++ ircd-ircdev/ircd/ircd_parser.y Sun Nov 2 10:34:47 2003 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. - * $Id: ircd_parser.y,v 1.2 2003/11/02 00:47:33 zolty Exp $ + * $Id: ircd_parser.y,v 1.3 2003/11/02 18:34:47 zolty Exp $ */ %{ @@ -141,17 +141,42 @@ %token FEATURES %token QUARANTINE /* and now a lot of priviledges... */ -%token TPRIV_CHAN_LIMIT, TPRIV_MODE_LCHAN, TPRIV_DEOP_LCHAN, TPRIV_WALK_LCHAN -%token TPRIV_KILL, TPRIV_LOCAL_KILL, TPRIV_REHASH, TPRIV_RESTART, TPRIV_DIE -%token TPRIV_GLINE, TPRIV_LOCAL_GLINE, TPRIV_JUPE, TPRIV_LOCAL_JUPE -%token TPRIV_LOCAL_OPMODE, TPRIV_OPMODE, TPRIV_SET, TPRIV_WHOX, TPRIV_BADCHAN +%token TPRIV_CHAN_LIMIT +%token TPRIV_MODE_LCHAN +%token TPRIV_DEOP_LCHAN +%token TPRIV_WALK_LCHAN +%token TPRIV_KILL +%token TPRIV_LOCAL_KILL +%token TPRIV_REHASH +%token TPRIV_RESTART +%token TPRIV_DIE +%token TPRIV_GLINE +%token TPRIV_LOCAL_GLINE +%token TPRIV_JUPE +%token TPRIV_LOCAL_JUPE +%token TPRIV_LOCAL_OPMODE +%token TPRIV_OPMODE +%token TPRIV_SET +%token TPRIV_WHOX +%token TPRIV_BADCHAN %token TPRIV_LOCAL_BADCHAN -%token TPRIV_SEE_CHAN, TPRIV_SHOW_INVIS, TPRIV_SHOW_ALL_INVIS, TPRIV_PROPAGATE -%token TPRIV_UNLIMIT_QUERY, TPRIV_DISPLAY, TPRIV_SEE_OPERS, TPRIV_WIDE_GLINE +%token TPRIV_SEE_CHAN +%token TPRIV_SHOW_INVIS +%token TPRIV_SHOW_ALL_INVIS +%token TPRIV_PROPAGATE +%token TPRIV_UNLIMIT_QUERY +%token TPRIV_DISPLAY +%token TPRIV_SEE_OPERS +%token TPRIV_WIDE_GLINE /* and some types... */ %type <num> sizespec -%type <num> timespec, timefactor, factoredtimes, factoredtime -%type <num> expr, yesorno, privtype +%type <num> timespec +%type <num> timefactor +%type <num> factoredtimes +%type <num> factoredtime +%type <num> expr +%type <num> yesorno +%type <num> privtype %left '+' '-' %left '*' '/' @@ -192,59 +217,59 @@ sizespec: expr - = { + { $$ = $1; } | expr BYTES - = { + { $$ = $1; } | expr KBYTES - = { + { $$ = $1 * 1024; } | expr MBYTES - = { + { $$ = $1 * 1024 * 1024; } | expr GBYTES - = { + { $$ = $1 * 1024 * 1024 * 1024; } | expr TBYTES - = { + { $$ = $1 * 1024 * 1024 * 1024; } ; /* this is an arithmatic expression */ expr: NUMBER - = { + { $$ = $1; } | expr '+' expr - = { + { $$ = $1 + $3; } | expr '-' expr - = { + { $$ = $1 - $3; } | expr '*' expr - = { + { $$ = $1 * $3; } | expr '/' expr - = { + { $$ = $1 / $3; } /* leave this out until we find why it makes BSD yacc dump core -larne | '-' expr %prec NEG - = { + { $$ = -$2; } */ | '(' expr ')' - = { + { $$ = $2; } ; ----------------------- End of diff ----------------------- |