summaryrefslogtreecommitdiffabout
path: root/src/parser.c
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-15 22:08:45 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2011-05-15 22:17:20 (GMT)
commite559f3f36c99988ee80ac4ec01f80ea6578beebe (patch) (side-by-side diff)
treee9cd0ab93dc2901fce901a062c7c1ee7442979e5 /src/parser.c
parenta0826b4c7cd66c4862d9b61bb7e14d73fcba28f6 (diff)
downloadgrecs-e559f3f36c99988ee80ac4ec01f80ea6578beebe.tar.gz
grecs-e559f3f36c99988ee80ac4ec01f80ea6578beebe.tar.bz2
Implement BIND config parser.
* am/grecs.m4: New option: parser-bind. * src/.gitignore: Update. * src/Make.am [GRECS_COND_BIND_PARSER]: Set GRECS_PARSER_BIND and GRECS_EXTRA_BIND. (GRECS_SRC): Include GRECS_PARSER_BIND. (EXTRA_DIST): Include GRECS_EXTRA_BIND. * src/bind-gram.y: New file. * src/bind-lex.l: New file. * src/format.c (grecs_txtacc_format_value): New function. * src/grecs.h (grecs_bind_parser): New proto. * src/parser.c: Set grecs_current_locus. * src/tree.c (grecs_node_bind): Return immediately if node==NULL. * src/yytrans: Update.
Diffstat (limited to 'src/parser.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/parser.c b/src/parser.c
index 6f84bd8..5d8bdf3 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -56,5 +56,7 @@ struct grecs_node *
grecs_parse(const char *name)
{
grecs_error_count = 0;
+ grecs_current_locus.file = grecs_install_text(name);
+ grecs_current_locus.line = 0;
return grecs_parser_fun(name, grecs_trace_flags);
}

Return to:

Send suggestions and report system problems to the System administrator.