summaryrefslogtreecommitdiffabout
path: root/src/preproc.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/preproc.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/preproc.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/preproc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/preproc.c b/src/preproc.c
index ea77506..8debdcf 100644
--- a/src/preproc.c
+++ b/src/preproc.c
@@ -48,7 +48,7 @@ struct buffer_ctx {
FILE *infile;
};
-extern int grecs_yy_flex_debug;
+extern int grecs_grecs__flex_debug;
static struct buffer_ctx *context_stack;
static char *linebufbase = NULL;
static size_t linebufsize = 0;
@@ -432,7 +432,7 @@ push_source(const char *name, int once)
ctx->prev = context_stack;
context_stack = ctx;
- if (grecs_yy_flex_debug)
+ if (grecs_grecs__flex_debug)
fprintf (stderr, "Processing file `%s'\n", name);
pp_line_stmt();
@@ -456,14 +456,14 @@ pop_source()
context_stack = ctx;
if (!context_stack) {
- if (grecs_yy_flex_debug)
+ if (grecs_grecs__flex_debug)
fprintf(stderr, "End of input\n");
return 1;
}
LOCUS.line++;
- if (grecs_yy_flex_debug)
+ if (grecs_grecs__flex_debug)
fprintf(stderr, "Resuming file `%s' at line %lu\n",
LOCUS.file, (unsigned long) LOCUS.line);

Return to:

Send suggestions and report system problems to the System administrator.