Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <20021117025110.88542.qmail@web11502.mail.yahoo.com> Date: Sat, 16 Nov 2002 18:51:10 -0800 (PST) From: Andrew Lynch Subject: Re: Latest Bison causes SaveMyModem build to to choke To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-1065844047-1037501470=:87897" --0-1065844047-1037501470=:87897 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Folks, An update on the bison 1.75 problem in SaveMyModem. I cannot see an obvious bug in parse.yy. Maybe someone can point something out. I would like to be able to use the latest cygwin tools. Thanks in advance Andrew Lynch http://sourceforge.net/projects/savemymodem --- Andrew Lynch wrote: > Hi, > I have been using bison 1.35 as part of the build > process for SaveMyModem debugging/improvements I am > doing. Yesterday, I updated to bison 1.75 and it > broke the build reporting a "parse error". I > deinstalled 1.75 and retreated to 1.35 and > everything > works again. > > I am only barely aware of what bison is, much less > know how to debug it, but if anyone is interested I > will get more detailed bug reports and sample > parser.yy files, etc to help run this bug to ground. > > In the meantime, check out SaveMyModem and send lots > of great patches.... > > http://sourceforge.net/projects/savemymodem > > Andrew Lynch __________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com --0-1065844047-1037501470=:87897 Content-Type: text/plain; name="parser.yy" Content-Description: parser.yy Content-Disposition: inline; filename="parser.yy" %token SEMICOLON %token COLON %token POP3 %token EQUAL %token SMTP %token SIZE %token TO %token HEAD %token BODY %token TITLE %token SENDER %token ALLOW %token NAME %token DENY %token DOUBT %token LPAR %token RPAR %token AND %token OR %token XOR %token STR %token INT %token K %token M %token ISIN %token ISNTIN %type string %type integer %type stringlist %type name_list %type account_pop3 %type account_smtp %type size %type
subformula %type formula %type operator %type term %type logic_operator %start config_file %{ #include #include #include #include "globals.h" #include "accounts.h" #include "names.h" #include "rules.h" #include "nametable.h" #include "debug.h" %} %union { long int intval; char* stringval; list_t* node; rule_t* rule; bintree_t* form; } %% config_file: accounts_pop3 accounts_smtp size_list name_lists rule_list {} ; accounts_pop3: account_pop3 SEMICOLON accounts_pop3 {accounts.pop3list = list_add(accounts.pop3list,$1);} | ; account_pop3: POP3 EQUAL string integer string string {$$ = (void*)new_pop3_account($3,$4,$5,$6);free($3);free($5);free($6);} ; accounts_smtp: account_smtp SEMICOLON accounts_smtp {accounts.smtplist = list_add(accounts.smtplist,$1);} | ; account_smtp: SMTP string EQUAL string integer string {$$ = (void*)new_smtp_account($4,$5,$2,$6);free($2);free($4);free($6);} ; size_list: size SEMICOLON size_list {name_table.sizelist = list_add(name_table.sizelist,$1);} | ; size: SIZE string EQUAL integer TO integer {$$ = (void*)new_size($2,$4,$6);free($2);} ; name_lists: name_list SEMICOLON name_lists {name_table.namelists = list_add(name_table.namelists,$1);} | ; name_list: NAME string EQUAL stringlist {$$ = (void*)new_names_list($2,$4);free($2);} ; stringlist: string {$$ = (void*)list_add(NULL,new_name($1));free($1);} | string stringlist {$$ = (void*)list_add($2,new_name($1));free($1);} ; rule_list: ALLOW string EQUAL formula SEMICOLON rule_list { rules_table.allow = list_add(rules_table.allow,new_rule_list($2,(bintree_t*)$4));free($2);} | DENY string EQUAL formula SEMICOLON rule_list { rules_table.deny = list_add(rules_table.deny,new_rule_list($2,(bintree_t*)$4));free($2);} | DOUBT string EQUAL formula SEMICOLON rule_list{ rules_table.doubt = list_add(rules_table.doubt,new_rule_list($2,(bintree_t*)$4));free($2);} | ; formula: subformula {$$ = $1} | LPAR formula RPAR logic_operator LPAR formula RPAR {$$ = bintree_newnode($4);bintree_addleft($$,$2);bintree_addright($$,$6);} ; subformula: term operator string { void* tmpptr; $$ = bintree_newnode($2);bintree_addleft($$,bintree_newnode($1));bintree_addright($$,bintree_newnode(new_rule_name($3))); /* check if string has been declared */ if( ($1)->data.term != TERM_SIZE) { tmpptr = (void*)ntbl_getstrvar(name_table.namelists,$3); } else { tmpptr = (void*)ntbl_getsizvar(name_table.sizelist,$3); } if( NULL == tmpptr) { parser_printf("Semantic error: Undefined name '%s'\n",$3); } else { ($1)->directpointer = tmpptr; /* chache it */ } free($3); } ; term: SENDER {$$ = new_rule_term(TERM_SENDER);} | TITLE {$$ = new_rule_term(TERM_TITLE);} | SIZE {$$ = new_rule_term(TERM_SIZE);} | BODY {$$ = new_rule_term(TERM_BODY);} | HEAD {$$ = new_rule_term(TERM_HEAD);} ; operator: ISIN {$$ = new_rule_op(OP_IN);} | ISNTIN {$$ = new_rule_op(OP_OUT);} ; logic_operator: AND {$$ = new_rule_lop(LOG_OP_AND);} | OR {$$ = new_rule_lop(LOG_OP_OR);} | XOR {$$ = new_rule_lop(LOG_OP_XOR);} ; integer: INT K {$$ = $1 * 1024;} | INT M {$$ = $1 * 1024 * 1024;} | INT {$$ = $1;} ; string: STR {$$ = $1;} ; %% --0-1065844047-1037501470=:87897 Content-Type: text/plain; name="bison-1.75-problem.txt" Content-Description: bison-1.75-problem.txt Content-Disposition: inline; filename="bison-1.75-problem.txt" make[1]: Entering directory `/home/andrew/smm.new/src' building dep for win32_compatibility.c building dep for uidldb.c building dep for support.c building dep for socketcommon.c building dep for smtp.c building dep for setup.c building dep for savemymodem.c building dep for rules.c building dep for regularexp.c building dep for pop3.c building dep for parsedate.c building dep for options.c building dep for nametable.c building dep for names.c building dep for md5.c building dep for mailmessage2clist.c building dep for mailmessage.c building dep for list.c building dep for interface.c building dep for inspector.c building dep for iconbutton.c building dep for globalsgfx.c building dep for globals.c building dep for debug.c building dep for configwrite.c building dep for communicate.c building dep for comline.c building dep for callbacks_window_options.c building dep for callbacks_window_main.c building dep for callbacks_window_log.c building dep for callbacks_window_complain.c building dep for callbacks_window_accounts.c building dep for callbacks_window_about.c building dep for bintree.c building dep for apop2md5.c building dep for altsocklib.c building dep for accounts.c make[1]: Leaving directory `/home/andrew/smm.new/src' make[1]: Entering directory `/home/andrew/smm.new/src' compiling accounts.c -> accounts.o compiling altsocklib.c -> altsocklib.o compiling apop2md5.c -> apop2md5.o compiling bintree.c -> bintree.o compiling callbacks_window_about.c -> callbacks_window_about.o compiling callbacks_window_accounts.c -> callbacks_window_accounts.o compiling callbacks_window_complain.c -> callbacks_window_complain.o compiling callbacks_window_log.c -> callbacks_window_log.o compiling callbacks_window_main.c -> callbacks_window_main.o compiling callbacks_window_options.c -> callbacks_window_options.o compiling comline.c -> comline.o compiling communicate.c -> communicate.o compiling configwrite.c -> configwrite.o compiling debug.c -> debug.o compiling globals.c -> globals.o compiling globalsgfx.c -> globalsgfx.o compiling iconbutton.c -> iconbutton.o compiling inspector.c -> inspector.o compiling interface.c -> interface.o compiling parser.yy -> parser.yy: In function `yyparse': parser.yy:110: parse error before '}' token make[1]: *** [parser.o] Error 1 make[1]: Leaving directory `/home/andrew/smm.new/src' make: *** [all] Error 2 --0-1065844047-1037501470=:87897 Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ --0-1065844047-1037501470=:87897--