aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-15 14:09:46 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-05-15 14:09:46 +0300
commit83ee0eea680e1e5f201de26c21c5d3fd9c2cabb4 (patch)
treea80100d7735a2e73e23f8fc22d3e33ee685bcc34
parentfeb67ec842eb0d8edeb2be49bfa84c14030329eb (diff)
downloadcfpeek-83ee0eea680e1e5f201de26c21c5d3fd9c2cabb4.tar.gz
cfpeek-83ee0eea680e1e5f201de26c21c5d3fd9c2cabb4.tar.bz2
Implement multiple parsers.
* configure.ac (GRECS_SETUP): Add all-parsers option. * src/cmdline.opt: New option --parser. * grecs: Update.
-rw-r--r--configure.ac2
m---------grecs0
-rw-r--r--src/cmdline.opt13
3 files changed, 14 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 52ef8ba..8bbf21d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,7 +38,7 @@ AC_HEADER_STDC
# Grecs subsystem
-GRECS_SETUP(grecs, [tests getopt git2chg])
+GRECS_SETUP(grecs, [tests getopt git2chg all-parsers])
dnl # Initialize the test suite.
dnl AC_CONFIG_TESTDIR(tests)
diff --git a/grecs b/grecs
-Subproject f83e3229ea5c917dfb1bd1a59b1768fdcb882f9
+Subproject a0826b4c7cd66c4862d9b61bb7e14d73fcba28f
diff --git a/src/cmdline.opt b/src/cmdline.opt
index 8335723..d4911c9 100644
--- a/src/cmdline.opt
+++ b/src/cmdline.opt
@@ -98,6 +98,19 @@ END
GROUP(Modifiers)
+OPTION(parser,A,[<GRECS|META1>],
+ [<set parser type>])
+BEGIN
+ if (strcasecmp(optarg, "GRECS") == 0)
+ grecs_parser_fun = grecs_grecs_parser;
+ else if (strcasecmp(optarg, "META1") == 0)
+ grecs_parser_fun = grecs_meta1_parser;
+ else {
+ grecs_error(NULL, 0, "unsupported parser type");
+ exit(EX_USAGE);
+ }
+END
+
OPTION(literal,L,,
[<use literal matching>])
BEGIN

Return to:

Send suggestions and report system problems to the System administrator.