From f306106c2250b86c63bc6ef95114f237365422e9 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 28 May 1997 21:53:32 +0000 Subject: display token strings on parser errors. svn path=/trunk/; revision=1042 --- rcfile_y.y | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'rcfile_y.y') diff --git a/rcfile_y.y b/rcfile_y.y index 89251766..11bd6419 100644 --- a/rcfile_y.y +++ b/rcfile_y.y @@ -33,6 +33,10 @@ static int prc_errflag; static void record_current(); static void user_reset(); static int reset_server(char *name, int skip); + +/* using Bison, this arranges that yydebug messages will show actual tokens */ +extern char * yytext; +#define YYPRINT(fp, type, val) fprintf(fp, " = \"%s\"", yytext) %} %union { @@ -198,8 +202,8 @@ folder_list : STRING {save_str(¤t.mailboxes,-1,$1);} | folder_list STRING {save_str(¤t.mailboxes,-1,$2);} ; -smtphunt : STRING {save_str(¤t.smtphunt, -1, $1);} - | smtphunt STRING {save_str(¤t.smtphunt, -1, $2);} +smtp_list : STRING {save_str(¤t.smtphunt, -1, $1);} + | smtp_list STRING {save_str(¤t.smtphunt, -1, $2);} ; user_option : TO localnames HERE @@ -210,7 +214,7 @@ user_option : TO localnames HERE | IS STRING THERE {current.remotename = xstrdup($2);} | PASSWORD STRING {current.password = xstrdup($2);} | FOLDER folder_list - | SMTPHOST smtphunt + | SMTPHOST smtp_list | MDA STRING {current.mda = xstrdup($2);} | PRECONNECT STRING {current.preconnect = xstrdup($2);} -- cgit v1.2.3