diff --git a/src/example/pegtl/proto3.cpp b/src/example/pegtl/proto3.cpp index 4df4767f1..06f3fe753 100644 --- a/src/example/pegtl/proto3.cpp +++ b/src/example/pegtl/proto3.cpp @@ -15,7 +15,8 @@ int main() #include #include -#include + +#include "proto3.hpp" int main( int argc, char** argv ) // NOLINT(bugprone-exception-escape) { diff --git a/include/tao/pegtl/contrib/proto3.hpp b/src/example/pegtl/proto3.hpp similarity index 97% rename from include/tao/pegtl/contrib/proto3.hpp rename to src/example/pegtl/proto3.hpp index 7be928a14..2acc9c2a4 100644 --- a/include/tao/pegtl/contrib/proto3.hpp +++ b/src/example/pegtl/proto3.hpp @@ -2,15 +2,15 @@ // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt) -#ifndef TAO_PEGTL_CONTRIB_PROTO3_HPP -#define TAO_PEGTL_CONTRIB_PROTO3_HPP +#ifndef TAO_PEGTL_SRC_EXAMPLES_PEGTL_PROTO3_HPP +#define TAO_PEGTL_SRC_EXAMPLES_PEGTL_PROTO3_HPP -#include "../ascii.hpp" -#include "../config.hpp" -#include "../rules.hpp" +#include -namespace TAO_PEGTL_NAMESPACE::proto3 +namespace proto3 { + using namespace TAO_PEGTL_NAMESPACE; + // protocol buffer v3 // https://developers.google.com/protocol-buffers/docs/reference/proto3-spec @@ -141,6 +141,6 @@ namespace TAO_PEGTL_NAMESPACE::proto3 struct proto : must< sps, head, sps, star< body, sps >, eof > {}; // clang-format on -} // namespace TAO_PEGTL_NAMESPACE::proto3 +} // namespace proto3 #endif