# Removed the STRING_ADDRESS token since it was conflicting with the

IDENTIFIER directive and also the keyword directives.
This commit is contained in:
Robert James Kaes 2003-06-26 18:17:09 +00:00
parent db142b6e23
commit 988f243286

View File

@ -1,4 +1,4 @@
/* $Id: grammar.y,v 1.22 2003-06-20 17:02:13 rjkaes Exp $ /* $Id: grammar.y,v 1.23 2003-06-26 18:17:09 rjkaes Exp $
* *
* This is the grammar for tinyproxy's configuration file. It needs to be * This is the grammar for tinyproxy's configuration file. It needs to be
* in sync with scanner.l. If you know more about yacc and lex than I do * in sync with scanner.l. If you know more about yacc and lex than I do
@ -37,7 +37,6 @@ int yylex(void);
%union { %union {
unsigned int num; unsigned int num;
char *cptr; char *cptr;
void *ptr;
} }
/* statements */ /* statements */
@ -69,7 +68,6 @@ int yylex(void);
%token <num> NUMBER %token <num> NUMBER
%token <cptr> STRING %token <cptr> STRING
%token <cptr> NUMERIC_ADDRESS %token <cptr> NUMERIC_ADDRESS
%token <cptr> STRING_ADDRESS
%token <cptr> NETMASK_ADDRESS %token <cptr> NETMASK_ADDRESS
%type <num> yesno %type <num> yesno
@ -238,7 +236,7 @@ network_address
; ;
unique_address unique_address
: STRING_ADDRESS : IDENTIFIER
| NUMERIC_ADDRESS | NUMERIC_ADDRESS
; ;
@ -255,7 +253,7 @@ string
%% %%
extern unsigned int scanner_lineno; extern int yylineno;
void void
yyerror(char *s) yyerror(char *s)
@ -267,6 +265,6 @@ yyerror(char *s)
headerdisplayed = 1; headerdisplayed = 1;
} }
fprintf(stderr, "\t%s:%d: %s\n", config.config_file, scanner_lineno, s); fprintf(stderr, "\t%s:%d: %s\n", config.config_file, yylineno, s);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }