aboutsummaryrefslogtreecommitdiff
path: root/src/preproc.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-16 01:08:45 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-05-16 01:17:20 +0300
commite559f3f36c99988ee80ac4ec01f80ea6578beebe (patch)
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')
-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 {
48 FILE *infile; 48 FILE *infile;
49}; 49};
50 50
51extern int grecs_yy_flex_debug; 51extern int grecs_grecs__flex_debug;
52static struct buffer_ctx *context_stack; 52static struct buffer_ctx *context_stack;
53static char *linebufbase = NULL; 53static char *linebufbase = NULL;
54static size_t linebufsize = 0; 54static size_t linebufsize = 0;
@@ -432,7 +432,7 @@ push_source(const char *name, int once)
432 ctx->prev = context_stack; 432 ctx->prev = context_stack;
433 context_stack = ctx; 433 context_stack = ctx;
434 434
435 if (grecs_yy_flex_debug) 435 if (grecs_grecs__flex_debug)
436 fprintf (stderr, "Processing file `%s'\n", name); 436 fprintf (stderr, "Processing file `%s'\n", name);
437 437
438 pp_line_stmt(); 438 pp_line_stmt();
@@ -456,14 +456,14 @@ pop_source()
456 context_stack = ctx; 456 context_stack = ctx;
457 457
458 if (!context_stack) { 458 if (!context_stack) {
459 if (grecs_yy_flex_debug) 459 if (grecs_grecs__flex_debug)
460 fprintf(stderr, "End of input\n"); 460 fprintf(stderr, "End of input\n");
461 return 1; 461 return 1;
462 } 462 }
463 463
464 LOCUS.line++; 464 LOCUS.line++;
465 465
466 if (grecs_yy_flex_debug) 466 if (grecs_grecs__flex_debug)
467 fprintf(stderr, "Resuming file `%s' at line %lu\n", 467 fprintf(stderr, "Resuming file `%s' at line %lu\n",
468 LOCUS.file, (unsigned long) LOCUS.line); 468 LOCUS.file, (unsigned long) LOCUS.line);
469 469

Return to:

Send suggestions and report system problems to the System administrator.