diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-16 01:08:45 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-16 01:17:20 +0300 |
commit | e559f3f36c99988ee80ac4ec01f80ea6578beebe (patch) | |
tree | e9cd0ab93dc2901fce901a062c7c1ee7442979e5 /src/parser.c | |
parent | a0826b4c7cd66c4862d9b61bb7e14d73fcba28f6 (diff) | |
download | grecs-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')
-rw-r--r-- | src/parser.c | 2 |
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 @@ -53,8 +53,10 @@ grecs_lex_trace(int n) } 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); } |