diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-20 09:17:20 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-20 09:17:20 +0300 |
commit | d253fa956809a1497583212109d33fd4f1a05b31 (patch) | |
tree | bf48aced94192d54b49ac09755ed2e6d88514d70 /src/bind-lex.l | |
parent | bcab0df28d7e87f99da29a32327787c25261273e (diff) | |
download | grecs-d253fa956809a1497583212109d33fd4f1a05b31.tar.gz grecs-d253fa956809a1497583212109d33fd4f1a05b31.tar.bz2 |
Fix bind parser.
* src/bind-gram.y: Special handling for the controls block.
* src/bind-lex.l: Handle "controls" separately.
* src/lookup.c (grecs_find_node): Handle single dot path
(root node).
(grecs_match_first): Likewise.
(grecs_match_next): Return NULL if buf is NULL.
* tests/parser-bind.at: Update.
Diffstat (limited to 'src/bind-lex.l')
-rw-r--r-- | src/bind-lex.l | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bind-lex.l b/src/bind-lex.l index 926785e..f5fd66d 100644 --- a/src/bind-lex.l +++ b/src/bind-lex.l @@ -57,7 +57,8 @@ P [1-9][0-9]* grecs_line_add(yytext, yyleng); yylval.ident.string = grecs_line_finish(); yylval.ident.locus = grecs_current_locus; - return BIND_IDENT; + return strcmp(yylval.ident.string, "controls") == 0 ? + BIND_CONTROLS : BIND_IDENT; } /* Strings */ [a-zA-Z0-9_\.\*/:@-]+ { grecs_line_begin(); |