diff --git a/src/kaleidoscope/simulator/LogProtocol.h b/src/kaleidoscope/simulator/LogProtocol.h index f8324cf8..eaafc110 100644 --- a/src/kaleidoscope/simulator/LogProtocol.h +++ b/src/kaleidoscope/simulator/LogProtocol.h @@ -49,12 +49,9 @@ namespace kaleidoscope { namespace simulator { namespace log_protocol { -namespace v1 { class Parser; -class CompressionConsumer; -} - class Consumer_; +class CompressionConsumer; class LogProtocol { @@ -89,8 +86,8 @@ class LogProtocol { uint8_t output_document_type_ = DocumentType::compressed; bool quote_lines_ = false; - friend class v1::Parser; - friend class v1::CompressionConsumer; + friend class Parser; + friend class CompressionConsumer; }; } // namespace log_protocol diff --git a/src/kaleidoscope/simulator/log_protocol/v1/Grammar.h b/src/kaleidoscope/simulator/log_protocol/Grammar.h similarity index 99% rename from src/kaleidoscope/simulator/log_protocol/v1/Grammar.h rename to src/kaleidoscope/simulator/log_protocol/Grammar.h index e16e6ae3..3e6efa17 100644 --- a/src/kaleidoscope/simulator/log_protocol/v1/Grammar.h +++ b/src/kaleidoscope/simulator/log_protocol/Grammar.h @@ -79,7 +79,6 @@ namespace kaleidoscope { namespace simulator { namespace log_protocol { -namespace v1 { #define PROTOCOL_V1_COMMANDS(OP, SEP, TERM_SEP) \ OP(none, 0)SEP \ @@ -113,7 +112,6 @@ constexpr uint8_t protocol_version = 1; constexpr char comment_symbol = '#'; -} // namespace v1 } // namespace log_protocol } // namespace simulator } // namespace kaleidoscope diff --git a/src/kaleidoscope/simulator/log_protocol/LogProtocol.cpp b/src/kaleidoscope/simulator/log_protocol/LogProtocol.cpp index 016af6a5..2c5c65e6 100644 --- a/src/kaleidoscope/simulator/log_protocol/LogProtocol.cpp +++ b/src/kaleidoscope/simulator/log_protocol/LogProtocol.cpp @@ -19,7 +19,7 @@ #ifdef KALEIDOSCOPE_VIRTUAL_BUILD #include "kaleidoscope/simulator/LogProtocol.h" -#include "kaleidoscope/simulator/log_protocol/v1/Parser.h" +#include "kaleidoscope/simulator/log_protocol/Parser.h" #include #include @@ -69,7 +69,7 @@ void LogProtocol::parse(std::istream &in, Consumer_ &consumer) { switch (protocol_version_) { case 1: { LOG_PROTOCOL_DEBUG("Delegating to v1 parser") - v1::Parser delegate_parser(*this, document_type_, line_id_); + Parser delegate_parser(*this, document_type_, line_id_); delegate_parser.parse(in, consumer); } } @@ -105,7 +105,7 @@ void LogProtocol::compress(std::istream &in, std::ostream &out) { LOG_PROTOCOL_DEBUG("Delegating to v1 parser") LOG_PROTOCOL_DEBUG("debug: " << debug_) LOG_PROTOCOL_DEBUG("output document type: " << (int)output_document_type_) - v1::Parser delegate_parser(*this, document_type_, line_id_); + Parser delegate_parser(*this, document_type_, line_id_); delegate_parser.compress(in, out); } } diff --git a/src/kaleidoscope/simulator/log_protocol/v1/Parser.cpp b/src/kaleidoscope/simulator/log_protocol/Parser.cpp similarity index 99% rename from src/kaleidoscope/simulator/log_protocol/v1/Parser.cpp rename to src/kaleidoscope/simulator/log_protocol/Parser.cpp index 1d7377d4..c584af0d 100644 --- a/src/kaleidoscope/simulator/log_protocol/v1/Parser.cpp +++ b/src/kaleidoscope/simulator/log_protocol/Parser.cpp @@ -19,8 +19,8 @@ #ifdef KALEIDOSCOPE_VIRTUAL_BUILD #include "kaleidoscope/simulator/log_protocol/Consumer_.h" -#include "kaleidoscope/simulator/log_protocol/v1/Parser.h" -#include "kaleidoscope/simulator/log_protocol/v1/Grammar.h" +#include "kaleidoscope/simulator/log_protocol/Parser.h" +#include "kaleidoscope/simulator/log_protocol/Grammar.h" #include #include @@ -38,7 +38,6 @@ namespace kaleidoscope { namespace simulator { namespace log_protocol { -namespace v1 { #define COMMA , @@ -650,7 +649,6 @@ void Parser::compress(std::istream &in, std::ostream &out) { this->parse(in, cc); } -} // namespace V1 } // namespace log_protocol } // namespace simulator } // namespace kaleidoscope diff --git a/src/kaleidoscope/simulator/log_protocol/v1/Parser.h b/src/kaleidoscope/simulator/log_protocol/Parser.h similarity index 93% rename from src/kaleidoscope/simulator/log_protocol/v1/Parser.h rename to src/kaleidoscope/simulator/log_protocol/Parser.h index 6669c568..a3261278 100644 --- a/src/kaleidoscope/simulator/log_protocol/v1/Parser.h +++ b/src/kaleidoscope/simulator/log_protocol/Parser.h @@ -20,7 +20,7 @@ #ifdef KALEIDOSCOPE_VIRTUAL_BUILD -#include "kaleidoscope/simulator/log_protocol/v1/Grammar.h" +#include "kaleidoscope/simulator/log_protocol/Grammar.h" #include #include @@ -31,13 +31,9 @@ namespace log_protocol { class Consumer_; -namespace v1 { - class Parser { - public: - - static constexpr uint8_t protocol_version = log_protocol::v1::protocol_version; + static constexpr uint8_t protocol_version = log_protocol::protocol_version; Parser(const LogProtocol &protocol, uint8_t input_document_type, int start_line_id) : protocol_{protocol}, @@ -81,7 +77,6 @@ class Parser { friend class CompressionConsumer; }; -} // namespace V1 } // namespace log_protocol } // namespace simulator } // namespace kaleidoscope