From 20ce7b70660429caaaa0f212052db2cbb732a5a2 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Thu, 20 Feb 2020 21:53:24 +0200 Subject: [PATCH] lib/parser -> lib/query And update the names to follow the mu- convention. --- configure.ac | 2 +- lib/Makefile.am | 4 +-- lib/mu-query.cc | 4 +-- lib/{parser => query}/Makefile.am | 32 +++++++++---------- lib/{parser/data.hh => query/mu-data.hh} | 0 lib/{parser/parser.cc => query/mu-parser.cc} | 6 ++-- lib/{parser/parser.hh => query/mu-parser.hh} | 6 ++-- .../proc-iface.hh => query/mu-proc-iface.hh} | 0 .../tokenizer.cc => query/mu-tokenizer.cc} | 4 +-- .../tokenizer.hh => query/mu-tokenizer.hh} | 0 lib/{parser/tree.hh => query/mu-tree.hh} | 2 +- lib/{parser/xapian.cc => query/mu-xapian.cc} | 2 +- lib/{parser/xapian.hh => query/mu-xapian.hh} | 4 +-- lib/{parser => query}/parse.cc | 4 +-- lib/{parser => query}/test-parser.cc | 2 +- lib/{parser => query}/test-tokenizer.cc | 2 +- lib/{parser => query}/tokenize.cc | 4 +-- 17 files changed, 39 insertions(+), 39 deletions(-) rename lib/{parser => query}/Makefile.am (86%) rename lib/{parser/data.hh => query/mu-data.hh} (100%) rename lib/{parser/parser.cc => query/mu-parser.cc} (98%) rename lib/{parser/parser.hh => query/mu-parser.hh} (95%) rename lib/{parser/proc-iface.hh => query/mu-proc-iface.hh} (100%) rename lib/{parser/tokenizer.cc => query/mu-tokenizer.cc} (96%) rename lib/{parser/tokenizer.hh => query/mu-tokenizer.hh} (100%) rename lib/{parser/tree.hh => query/mu-tree.hh} (98%) rename lib/{parser/xapian.cc => query/mu-xapian.cc} (99%) rename lib/{parser/xapian.hh => query/mu-xapian.hh} (91%) rename lib/{parser => query}/parse.cc (92%) rename lib/{parser => query}/test-parser.cc (99%) rename lib/{parser => query}/test-tokenizer.cc (99%) rename lib/{parser => query}/tokenize.cc (91%) diff --git a/configure.ac b/configure.ac index e60dcbe3..9e4176cf 100644 --- a/configure.ac +++ b/configure.ac @@ -256,7 +256,7 @@ mu/mu-memcheck lib/Makefile lib/doxyfile lib/utils/Makefile -lib/parser/Makefile +lib/query/Makefile mu4e/Makefile mu4e/mu4e-meta.el guile/Makefile diff --git a/lib/Makefile.am b/lib/Makefile.am index fdc040c0..e9dba8ef 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -18,7 +18,7 @@ # before decending into tests/ include $(top_srcdir)/gtest.mk -SUBDIRS= utils parser +SUBDIRS= utils query if HAVE_JSON_GLIB json_srcs= \ @@ -122,7 +122,7 @@ libmu_la_LIBADD= \ $(GUILE_LIBS) \ $(JSON_GLIB_LIBS) \ ${builddir}/utils/libmu-utils.la \ - ${builddir}/parser/libmu-parser.la \ + ${builddir}/query/libmu-query.la \ $(CODE_COVERAGE_LIBS) libmu_la_LDFLAGS= \ diff --git a/lib/mu-query.cc b/lib/mu-query.cc index 14335b85..8a8592b7 100644 --- a/lib/mu-query.cc +++ b/lib/mu-query.cc @@ -36,8 +36,8 @@ #include "utils/mu-date.h" #include -#include -#include +#include +#include using namespace Mu; diff --git a/lib/parser/Makefile.am b/lib/query/Makefile.am similarity index 86% rename from lib/parser/Makefile.am rename to lib/query/Makefile.am index 07288081..6923d2b3 100644 --- a/lib/parser/Makefile.am +++ b/lib/query/Makefile.am @@ -41,20 +41,20 @@ noinst_PROGRAMS= \ parse noinst_LTLIBRARIES= \ - libmu-parser.la + libmu-query.la -libmu_parser_la_SOURCES= \ - data.hh \ - parser.cc \ - parser.hh \ - proc-iface.hh \ - tokenizer.cc \ - tokenizer.hh \ - tree.hh \ - xapian.cc \ - xapian.hh +libmu_query_la_SOURCES= \ + mu-data.hh \ + mu-parser.cc \ + mu-parser.hh \ + mu-proc-iface.hh \ + mu-tokenizer.cc \ + mu-tokenizer.hh \ + mu-tree.hh \ + mu-xapian.cc \ + mu-xapian.hh -libmu_parser_la_LIBADD= \ +libmu_query_la_LIBADD= \ $(WARN_LDFLAGS) \ $(GLIB_LIBS) \ $(XAPIAN_LIBS) \ @@ -69,14 +69,14 @@ tokenize_SOURCES= \ tokenize_LDADD= \ $(WARN_LDFLAGS) \ - libmu-parser.la + libmu-query.la parse_SOURCES= \ parse.cc parse_LDADD= \ $(WARN_LDFLAGS) \ - libmu-parser.la + libmu-query.la noinst_PROGRAMS+=$(TEST_PROGS) @@ -85,14 +85,14 @@ TEST_PROGS+= \ test_tokenizer_SOURCES= \ test-tokenizer.cc test_tokenizer_LDADD= \ - libmu-parser.la + libmu-query.la TEST_PROGS+= \ test-parser test_parser_SOURCES= \ test-parser.cc test_parser_LDADD= \ - libmu-parser.la + libmu-query.la TESTS=$(TEST_PROGS) diff --git a/lib/parser/data.hh b/lib/query/mu-data.hh similarity index 100% rename from lib/parser/data.hh rename to lib/query/mu-data.hh diff --git a/lib/parser/parser.cc b/lib/query/mu-parser.cc similarity index 98% rename from lib/parser/parser.cc rename to lib/query/mu-parser.cc index f62aab52..8becb1db 100644 --- a/lib/parser/parser.cc +++ b/lib/query/mu-parser.cc @@ -1,5 +1,5 @@ /* -** Copyright (C) 2017 Dirk-Jan C. Binnema +** Copyright (C) 2020 Dirk-Jan C. Binnema ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public License @@ -16,8 +16,8 @@ ** Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA ** 02110-1301, USA. */ -#include "parser.hh" -#include "tokenizer.hh" +#include "mu-parser.hh" +#include "mu-tokenizer.hh" #include "utils/mu-utils.hh" #include "utils/mu-error.hh" diff --git a/lib/parser/parser.hh b/lib/query/mu-parser.hh similarity index 95% rename from lib/parser/parser.hh rename to lib/query/mu-parser.hh index f9f7537f..215d3dd8 100644 --- a/lib/parser/parser.hh +++ b/lib/query/mu-parser.hh @@ -25,9 +25,9 @@ #include #include -#include -#include -#include +#include +#include +#include // A simple recursive-descent parser for queries. Follows the Xapian syntax, // but better handles non-alphanum; also implements regexp diff --git a/lib/parser/proc-iface.hh b/lib/query/mu-proc-iface.hh similarity index 100% rename from lib/parser/proc-iface.hh rename to lib/query/mu-proc-iface.hh diff --git a/lib/parser/tokenizer.cc b/lib/query/mu-tokenizer.cc similarity index 96% rename from lib/parser/tokenizer.cc rename to lib/query/mu-tokenizer.cc index f0307aff..f314d049 100644 --- a/lib/parser/tokenizer.cc +++ b/lib/query/mu-tokenizer.cc @@ -1,5 +1,5 @@ /* -** Copyright (C) 2017 Dirk-Jan C. Binnema +** Copyright (C) 2020 Dirk-Jan C. Binnema ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public License @@ -17,7 +17,7 @@ ** 02110-1301, USA. */ -#include "tokenizer.hh" +#include "mu-tokenizer.hh" #include "utils/mu-utils.hh" #include diff --git a/lib/parser/tokenizer.hh b/lib/query/mu-tokenizer.hh similarity index 100% rename from lib/parser/tokenizer.hh rename to lib/query/mu-tokenizer.hh diff --git a/lib/parser/tree.hh b/lib/query/mu-tree.hh similarity index 98% rename from lib/parser/tree.hh rename to lib/query/mu-tree.hh index 51e276c7..eacda988 100644 --- a/lib/parser/tree.hh +++ b/lib/query/mu-tree.hh @@ -24,7 +24,7 @@ #include #include -#include +#include #include namespace Mu { diff --git a/lib/parser/xapian.cc b/lib/query/mu-xapian.cc similarity index 99% rename from lib/parser/xapian.cc rename to lib/query/mu-xapian.cc index 5c87efe0..ffb95a07 100644 --- a/lib/parser/xapian.cc +++ b/lib/query/mu-xapian.cc @@ -22,7 +22,7 @@ #endif /*HAVE_CONFIG_H*/ #include -#include "parser/xapian.hh" +#include "mu-xapian.hh" #include using namespace Mu; diff --git a/lib/parser/xapian.hh b/lib/query/mu-xapian.hh similarity index 91% rename from lib/parser/xapian.hh rename to lib/query/mu-xapian.hh index c969054e..503d9eb5 100644 --- a/lib/parser/xapian.hh +++ b/lib/query/mu-xapian.hh @@ -1,5 +1,5 @@ /* -** Copyright (C) 2017 Dirk-Jan C. Binnema +** Copyright (C) 2020 Dirk-Jan C. Binnema ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public License @@ -22,7 +22,7 @@ #define __XAPIAN_HH__ #include -#include +#include namespace Mu { diff --git a/lib/parser/parse.cc b/lib/query/parse.cc similarity index 92% rename from lib/parser/parse.cc rename to lib/query/parse.cc index 620a1cac..d988d6e4 100644 --- a/lib/parser/parse.cc +++ b/lib/query/parse.cc @@ -1,5 +1,5 @@ /* -** Copyright (C) 2017 Dirk-Jan C. Binnema +** Copyright (C) 2020 Dirk-Jan C. Binnema ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public License @@ -19,7 +19,7 @@ #include #include -#include "parser.hh" +#include "mu-parser.hh" int main (int argc, char *argv[]) diff --git a/lib/parser/test-parser.cc b/lib/query/test-parser.cc similarity index 99% rename from lib/parser/test-parser.cc rename to lib/query/test-parser.cc index d16dfbf3..2eadda96 100644 --- a/lib/parser/test-parser.cc +++ b/lib/query/test-parser.cc @@ -23,7 +23,7 @@ #include #include -#include "parser.hh" +#include "mu-parser.hh" using namespace Mu; struct Case { diff --git a/lib/parser/test-tokenizer.cc b/lib/query/test-tokenizer.cc similarity index 99% rename from lib/parser/test-tokenizer.cc rename to lib/query/test-tokenizer.cc index 002e845f..62fa7ef4 100644 --- a/lib/parser/test-tokenizer.cc +++ b/lib/query/test-tokenizer.cc @@ -22,7 +22,7 @@ #include #include -#include "tokenizer.hh" +#include "mu-tokenizer.hh" struct Case { const char *str; diff --git a/lib/parser/tokenize.cc b/lib/query/tokenize.cc similarity index 91% rename from lib/parser/tokenize.cc rename to lib/query/tokenize.cc index 6d7a64a5..81f6ef06 100644 --- a/lib/parser/tokenize.cc +++ b/lib/query/tokenize.cc @@ -1,5 +1,5 @@ /* -** Copyright (C) 2017 Dirk-Jan C. Binnema +** Copyright (C) 2017-2020 Dirk-Jan C. Binnema ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public License @@ -20,7 +20,7 @@ #include #include -#include "tokenizer.hh" +#include "mu-tokenizer.hh" int main (int argc, char *argv[])