From 024cfd63846c0c7ef630a5dab819ad97942264a1 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Sat, 21 May 2011 07:38:16 +0300 Subject: bind: handle ! prefix in acls. --- src/bind-gram.y | 9 +++++++++ src/bind-lex.l | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/bind-gram.y b/src/bind-gram.y index fadd3f5..5acc780 100644 --- a/src/bind-gram.y +++ b/src/bind-gram.y @@ -108,6 +108,15 @@ simple : BIND_IDENT vallist ';' $$->ident = $1; $$->v.value = NULL; } + | '!' string ';' + { + $$ = grecs_node_create(grecs_node_stmt, + &grecs_current_locus); + $$->ident = grecs_strdup("!"); + $$->v.value = grecs_malloc(sizeof($$->v.value[0])); + $$->v.value->type = GRECS_TYPE_STRING; + $$->v.value->v.string = $2; + } ; block : BIND_IDENT tag '{' stmtlist '}' ';' diff --git a/src/bind-lex.l b/src/bind-lex.l index f5fd66d..440b17a 100644 --- a/src/bind-lex.l +++ b/src/bind-lex.l @@ -90,7 +90,7 @@ P [1-9][0-9]* {WS} ; /* Other tokens */ \n { grecs_current_locus.line++; } -[,;{}()] return yytext[0]; +[,;{}()!] return yytext[0]; . { if (isascii(yytext[0]) && isprint(yytext[0])) grecs_error(&grecs_current_locus, 0, _("stray character %c"), yytext[0]); -- cgit v1.2.1