aboutsummaryrefslogtreecommitdiffstats
path: root/rcfile_y.y
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-05-28 21:53:32 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-05-28 21:53:32 +0000
commitf306106c2250b86c63bc6ef95114f237365422e9 (patch)
tree24fe1e0eade30ab80ac903db40878e8f937ee0ce /rcfile_y.y
parent339466a7c399285c7660edcea061013da39ebc1b (diff)
downloadfetchmail-f306106c2250b86c63bc6ef95114f237365422e9.tar.gz
fetchmail-f306106c2250b86c63bc6ef95114f237365422e9.tar.bz2
fetchmail-f306106c2250b86c63bc6ef95114f237365422e9.zip
display token strings on parser errors.
svn path=/trunk/; revision=1042
Diffstat (limited to 'rcfile_y.y')
-rw-r--r--rcfile_y.y10
1 files changed, 7 insertions, 3 deletions
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(&current.mailboxes,-1,$1);}
| folder_list STRING {save_str(&current.mailboxes,-1,$2);}
;
-smtphunt : STRING {save_str(&current.smtphunt, -1, $1);}
- | smtphunt STRING {save_str(&current.smtphunt, -1, $2);}
+smtp_list : STRING {save_str(&current.smtphunt, -1, $1);}
+ | smtp_list STRING {save_str(&current.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);}