From 3027daca18f1249f655f122dfed91ae00fe9a9fb Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Sat, 2 Jun 2012 15:05:40 -0300 Subject: [PATCH] b2/: move substitutions dump from parser to boom.c --- b2/boom.c | 6 +++++- b2/lang.y | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/b2/boom.c b/b2/boom.c index 41e695e..1f81871 100644 --- a/b2/boom.c +++ b/b2/boom.c @@ -18,6 +18,7 @@ #include "lang.h" #include "param.h" #include "chr.h" +#include "subst.h" #include "subex.h" #include "db.h" @@ -93,6 +94,9 @@ static void dump(const char *s) case 'h': dump_hierarchy(hierarchy); break; + case 's': + subst_dump(stderr, substitutions); + break; default: fprintf(stderr, "no database '%c'\n", *s); exit(1); @@ -116,7 +120,7 @@ static void usage(const char *name) " -X symbols (BOM supplement)\n" " other options:\n" " -v ... increase verbosity level\n" -" -dCHARS dump the specified database (h, c, i, ...)\n" +" -dCHARS dump the specified database (h, c, s, ...)\n" " -N name for the next file, override the name in diagnostics\n" " -q var=value ... run substitutions with the specified inputs\n" " -Q var=value ... run substitutions and then do parametric search\n" diff --git a/b2/lang.y b/b2/lang.y index 85d184a..0ae909a 100644 --- a/b2/lang.y +++ b/b2/lang.y @@ -607,7 +607,6 @@ substitutions: { $$ = $1; subst_finalize($$); - subst_dump(stderr, $$); } ;