diff --git a/packages/PEGTL/.appveyor.yml b/packages/PEGTL/.appveyor.yml index c144d3ce133f00bfeea139a24bd12a9d4f0e74d1..716434a3043a74f22d63bcb374dac3b7a9c7766d 100644 --- a/packages/PEGTL/.appveyor.yml +++ b/packages/PEGTL/.appveyor.yml @@ -61,20 +61,8 @@ environment: platform: x64 configuration: Release - - GENERATOR: Visual Studio 15 2017 - configuration: Release - CONAN_VISUAL_VERSIONS: 15 - PYTHON: "C:\\Python27" - PYTHON_VERSION: "2.7.8" - PYTHON_ARCH: "32" - CONAN: TRUE - init: [] -install: -- if defined CONAN (pip.exe install -U conan conan-package-tools) -- if defined CONAN (conan profile new default --detect) - before_build: - if defined BINDIR (set "PATH=%BINDIR%;%PATH:C:\Program Files\Git\usr\bin;=%") - md build @@ -87,6 +75,3 @@ build_script: test_script: - ctest -C "%CONFIGURATION%" --output-on-failure -after_test: -- if defined CONAN (cd ..) -- if defined CONAN (python .conan/build.py) diff --git a/packages/PEGTL/.conan/build.py b/packages/PEGTL/.conan/build.py deleted file mode 100644 index d558f1f9c7a76d4211499d1947b5bc6a8f5ec0d8..0000000000000000000000000000000000000000 --- a/packages/PEGTL/.conan/build.py +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -import os -import re -from cpt.packager import ConanMultiPackager -from cpt.ci_manager import CIManager -from cpt.printer import Printer - - -class BuilderSettings(object): - @property - def username(self): - """ Set taocpp as package's owner - """ - return os.getenv("CONAN_USERNAME", "taocpp") - - @property - def upload(self): - """ Set taocpp repository to be used on upload. - The upload server address could be customized by env var - CONAN_UPLOAD. If not defined, the method will check the branch name. - Only master or CONAN_STABLE_BRANCH_PATTERN will be accepted. - The master branch will be pushed to testing channel, because it does - not match the stable pattern. Otherwise it will upload to stable - channel. - """ - if os.getenv("CONAN_UPLOAD", None) is not None: - return os.getenv("CONAN_UPLOAD") - - printer = Printer(None) - ci_manager = CIManager(printer) - branch = ci_manager.get_branch() - - patterns = [r"v?\d+\.\d+\.\d+-.*", self.stable_branch_pattern] - for pattern in patterns: - prog = re.compile(pattern) - if branch and prog.match(branch): - return "https://api.bintray.com/conan/taocpp/public-conan" - - @property - def upload_only_when_stable(self): - """ Force to upload when running over tag branch - """ - return os.getenv("CONAN_UPLOAD_ONLY_WHEN_STABLE", True) - - @property - def stable_branch_pattern(self): - """ Only upload the package the branch name is like a tag - """ - return os.getenv("CONAN_STABLE_BRANCH_PATTERN", r"\d+\.\d+\.\d+") - - @property - def reference(self): - """ Read project version from version.hpp file to create Conan referece - """ - pattern = re.compile(r"#define TAO_PEGTL_VERSION \"(\d+\.\d+\.\d+)\"") - version = None - with open('include/tao/pegtl/version.hpp') as file: - for line in file: - result = pattern.match(line) - if result: - version = result.group(1) - if not version: - raise Exception("Could not find version in version.hpp") - return os.getenv("CONAN_REFERENCE", "pegtl/{}@taocpp/stable".format(version)) - -if __name__ == "__main__": - settings = BuilderSettings() - builder = ConanMultiPackager( - reference=settings.reference, - username=settings.username, - upload=settings.upload, - upload_only_when_stable=settings.upload_only_when_stable, - stable_branch_pattern=settings.stable_branch_pattern, - test_folder=os.path.join(".conan", "test_package")) - builder.add() - builder.run() diff --git a/packages/PEGTL/.conan/test_package/CMakeLists.txt b/packages/PEGTL/.conan/test_package/CMakeLists.txt deleted file mode 100644 index 33bc5e0f830aeb3734ed72fb5193122762bdcd1b..0000000000000000000000000000000000000000 --- a/packages/PEGTL/.conan/test_package/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -project(test_package CXX) -cmake_minimum_required(VERSION 3.2.0 FATAL_ERROR) - -set(CMAKE_VERBOSE_MAKEFILE TRUE) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -find_package(PEGTL REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} taocpp::pegtl) diff --git a/packages/PEGTL/.conan/test_package/conanfile.py b/packages/PEGTL/.conan/test_package/conanfile.py deleted file mode 100644 index fc54c64a69fc0741aaf61ad6c3c62e08ffdbaf4c..0000000000000000000000000000000000000000 --- a/packages/PEGTL/.conan/test_package/conanfile.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -from conans import ConanFile, CMake, tools, RunEnvironment -import os - - -class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - with tools.environment_append(RunEnvironment(self).vars): - bin_path = os.path.join("bin", "test_package") - self.run('{} "2 + 3 * -7" "(2 + 3) * 7"'.format(bin_path)) diff --git a/packages/PEGTL/.conan/test_package/test_package.cpp b/packages/PEGTL/.conan/test_package/test_package.cpp deleted file mode 100644 index 9e641193a4e874c124c23a512b154de1829310f4..0000000000000000000000000000000000000000 --- a/packages/PEGTL/.conan/test_package/test_package.cpp +++ /dev/null @@ -1,355 +0,0 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey -// Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ - -#include <cassert> -#include <functional> -#include <iostream> -#include <map> -#include <sstream> -#include <vector> - -#include <tao/pegtl.hpp> - -// Include the analyze function that checks -// a grammar for possible infinite cycles. - -#include <tao/pegtl/analyze.hpp> - -namespace pegtl = TAO_PEGTL_NAMESPACE; - -namespace calculator -{ - // This enum is used for the order in which the operators are - // evaluated, i.e. the priority of the operators; a higher - // number indicates a lower priority. - - enum class order : int - { - }; - - // For each binary operator known to the calculator we need an - // instance of the following data structure with the priority, - // and a function that performs the calculation. All operators - // are left-associative. - - struct op - { - order p; - std::function< long( long, long ) > f; - }; - - // Class that takes care of an operand and an operator stack for - // shift-reduce style handling of operator priority; in a - // reduce-step it calls on the functions contained in the op - // instances to perform the calculation. - - struct stack - { - void push( const op& b ) - { - while( ( !m_o.empty() ) && ( m_o.back().p <= b.p ) ) { - reduce(); - } - m_o.push_back( b ); - } - - void push( const long l ) - { - m_l.push_back( l ); - } - - long finish() - { - while( !m_o.empty() ) { - reduce(); - } - assert( m_l.size() == 1 ); - const auto r = m_l.back(); - m_l.clear(); - return r; - } - - private: - std::vector< op > m_o; - std::vector< long > m_l; - - void reduce() - { - assert( !m_o.empty() ); - assert( m_l.size() > 1 ); - - const auto r = m_l.back(); - m_l.pop_back(); - const auto l = m_l.back(); - m_l.pop_back(); - const auto o = m_o.back(); - m_o.pop_back(); - m_l.push_back( o.f( l, r ) ); - } - }; - - // Additional layer, a "stack of stacks", to clearly show how bracketed - // sub-expressions can be easily processed by giving them a stack of - // their own. Once a bracketed sub-expression has finished evaluation on - // its stack, the result is pushed onto the next higher stack, and the - // sub-expression's temporary stack is discarded. The top-level calculation - // is handled just like a bracketed sub-expression, on the first stack pushed - // by the constructor. - - struct stacks - { - stacks() - { - open(); - } - - void open() - { - m_v.emplace_back(); - } - - template< typename T > - void push( const T& t ) - { - assert( !m_v.empty() ); - m_v.back().push( t ); - } - - void close() - { - assert( m_v.size() > 1 ); - const auto r = m_v.back().finish(); - m_v.pop_back(); - m_v.back().push( r ); - } - - long finish() - { - assert( m_v.size() == 1 ); - return m_v.back().finish(); - } - - private: - std::vector< stack > m_v; - }; - - // A wrapper around the data structures that contain the binary - // operators for the calculator. - - struct operators - { - operators() - { - // By default we initialise with all binary operators from the C language that can be - // used on integers, all with their usual priority. - - insert( "*", order( 5 ), []( const long l, const long r ) { return l * r; } ); - insert( "/", order( 5 ), []( const long l, const long r ) { return l / r; } ); - insert( "%", order( 5 ), []( const long l, const long r ) { return l % r; } ); - insert( "+", order( 6 ), []( const long l, const long r ) { return l + r; } ); - insert( "-", order( 6 ), []( const long l, const long r ) { return l - r; } ); - insert( "<<", order( 7 ), []( const long l, const long r ) { return l << r; } ); - insert( ">>", order( 7 ), []( const long l, const long r ) { return l >> r; } ); - insert( "<", order( 8 ), []( const long l, const long r ) { return l < r; } ); - insert( ">", order( 8 ), []( const long l, const long r ) { return l > r; } ); - insert( "<=", order( 8 ), []( const long l, const long r ) { return l <= r; } ); - insert( ">=", order( 8 ), []( const long l, const long r ) { return l >= r; } ); - insert( "==", order( 9 ), []( const long l, const long r ) { return l == r; } ); - insert( "!=", order( 9 ), []( const long l, const long r ) { return l != r; } ); - insert( "&", order( 10 ), []( const long l, const long r ) { return l & r; } ); - insert( "^", order( 11 ), []( const long l, const long r ) { return l ^ r; } ); - insert( "|", order( 12 ), []( const long l, const long r ) { return l | r; } ); - insert( "&&", order( 13 ), []( const long l, const long r ) { return ( ( l != 0 ) && ( r != 0 ) ) ? 1 : 0; } ); - insert( "||", order( 14 ), []( const long l, const long r ) { return ( ( l != 0 ) || ( r != 0 ) ) ? 1 : 0; } ); - } - - // Arbitrary user-defined operators can be added at runtime. - - void insert( const std::string& name, const order p, const std::function< long( long, long ) >& f ) - { - assert( !name.empty() ); - m_ops.try_emplace( name, op{ p, f } ); - } - - const std::map< std::string, op >& ops() const - { - return m_ops; - } - - private: - std::map< std::string, op > m_ops; - }; - - // Here the actual grammar starts. - - using namespace pegtl; - - // Comments are introduced by a '#' and proceed to the end-of-line/file. - - struct comment - : if_must< one< '#' >, until< eolf > > - {}; - - // The calculator ignores all spaces and comments; space is a pegtl rule - // that matches the usual ascii characters ' ', '\t', '\n' etc. In other - // words, everything that is space or a comment is ignored. - - struct ignored - : sor< space, comment > - {}; - - // Since the binary operators are taken from a runtime data structure - // (rather than hard-coding them into the grammar), we need a custom - // rule that attempts to match the input against the current map of - // operators. - - struct infix - { - using analyze_t = analysis::generic< analysis::rule_type::any >; - - template< apply_mode, - rewind_mode, - template< typename... > - class Action, - template< typename... > - class Control, - typename Input, - typename... States > - static bool match( Input& in, const operators& b, stacks& s, States&&... /*unused*/ ) - { - // Look for the longest match of the input against the operators in the operator map. - - return match( in, b, s, std::string() ); - } - - private: - template< typename Input > - static bool match( Input& in, const operators& b, stacks& s, std::string t ) - { - if( in.size( t.size() + 1 ) > t.size() ) { - t += in.peek_char( t.size() ); - const auto i = b.ops().lower_bound( t ); - if( i != b.ops().end() ) { - if( match( in, b, s, t ) ) { - return true; - } - if( i->first == t ) { - // While we are at it, this rule also performs the task of what would - // usually be an associated action: To push the matched operator onto - // the operator stack. - s.push( i->second ); - in.bump( t.size() ); - return true; - } - } - } - return false; - } - }; - - // A number is a non-empty sequence of digits preceeded by an optional sign. - - struct number - : seq< opt< one< '+', '-' > >, plus< digit > > - {}; - - struct expression; - - // A bracketed expression is introduced by a '(' and, in this grammar, must - // proceed with an expression and a ')'. - - struct bracket - : if_must< one< '(' >, expression, one< ')' > > - {}; - - // An atomic expression, i.e. one without operators, is either a number or - // a bracketed expression. - - struct atomic - : sor< number, bracket > - {}; - - // An expression is a non-empty list of atomic expressions where each pair - // of atomic expressions is separated by an infix operator and we allow - // the rule ignored as padding (before and after every singlar expression). - - struct expression - : list< atomic, infix, ignored > - {}; - - // The top-level grammar allows one expression and then expects eof. - - struct grammar - : must< expression, eof > - {}; - - // After the grammar we proceed with the additional actions that are - // required to let our calculator actually do something. - - template< typename Rule > - struct action - {}; - - // This action will be called when the number rule matches; it converts the - // matched portion of the input to a long and pushes it onto the operand - // stack. - - template<> - struct action< number > - { - template< typename Input > - static void apply( const Input& in, const operators& /*unused*/, stacks& s ) - { - std::stringstream ss( in.string() ); - long v; - ss >> v; - s.push( v ); - } - }; - - // The actions for the brackets call functions that create, and collect - // a temporary additional stack for evaluating the bracketed expression. - - template<> - struct action< one< '(' > > - { - static void apply0( const operators& /*unused*/, stacks& s ) - { - s.open(); - } - }; - - template<> - struct action< one< ')' > > - { - static void apply0( const operators& /*unused*/, stacks& s ) - { - s.close(); - } - }; - -} // namespace calculator - -int main( int argc, char** argv ) -{ - // Check the grammar for some possible issues. - - pegtl::analyze< calculator::grammar >(); - - // The objects required as state by the actions. - - calculator::stacks s; - calculator::operators b; - - for( int i = 1; i < argc; ++i ) { - // Parse and process the command-line arguments as calculator expressions... - - pegtl::argv_input in( argv, i ); - pegtl::parse< calculator::grammar, calculator::action >( in, b, s ); - - // ...and print the respective results to std::cout. - - std::cout << s.finish() << std::endl; - } - return 0; -} diff --git a/packages/PEGTL/.gitrepo b/packages/PEGTL/.gitrepo index 50937092fe28d076b46cd3287053b9012366094d..57a70bcf74737edad0bb2fab9edcc0d912916dfa 100644 --- a/packages/PEGTL/.gitrepo +++ b/packages/PEGTL/.gitrepo @@ -6,7 +6,7 @@ [subrepo] remote = git@github.com:taocpp/PEGTL.git branch = master - commit = ed5a3f88d5ed446d8afc3556e1b6ad5757e3351e - parent = ef714b6fc3318ba1f5f6eea47b36a843c699680b - cmdver = 0.4.0 + commit = bbe0c12c0d6203a962b29fbb38f332f7f3131ef0 + parent = 4e529e65898e54ed3e91b9ef0b8d11371f05ca92 + cmdver = 0.4.1 method = merge diff --git a/packages/PEGTL/.travis.yml b/packages/PEGTL/.travis.yml index 180816260889811bf2a53f3d0b8507a934683e05..b276d70b530f308dee32899795dad847aaee59f7 100644 --- a/packages/PEGTL/.travis.yml +++ b/packages/PEGTL/.travis.yml @@ -113,7 +113,7 @@ matrix: - CXX=clang++ - os: osx - osx_image: xcode11.2 + osx_image: xcode11.3 compiler: clang env: - CXX=clang++ @@ -283,18 +283,6 @@ matrix: - make -kj3 check - coveralls --gcov gcov-7 --gcov-options '\-lp' --exclude src - - language: python - python: - - "3.6" - sudo: required - install: - - pip install conan conan-package-tools - env: - - CONAN_GCC_VERSIONS=7 - - CONAN_DOCKER_IMAGE=lasote/conangcc7 - script: - - python .conan/build.py - - compiler: clang addons: apt: diff --git a/packages/PEGTL/LICENSE b/packages/PEGTL/LICENSE index 378c177b917908b7b86e7d4a499cfed714215157..17d3ad29c2972cdcc8a5ae536d6811352cfb4a3f 100644 --- a/packages/PEGTL/LICENSE +++ b/packages/PEGTL/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2007-2019 Dr. Colin Hirsch and Daniel Frey +Copyright (c) 2007-2020 Dr. Colin Hirsch and Daniel Frey Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/packages/PEGTL/Makefile b/packages/PEGTL/Makefile index f6c799b565337562121151984e93a94ebccdb68c..692ba2392598d9198501fafdec6055cdb7da0bd5 100644 --- a/packages/PEGTL/Makefile +++ b/packages/PEGTL/Makefile @@ -1,5 +1,5 @@ # The Art of C++ -# Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +# Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey # Please see LICENSE for license or visit https://github.com/taocpp/PEGTL .SUFFIXES: diff --git a/packages/PEGTL/README.md b/packages/PEGTL/README.md index 7c3354e5cfc6ce33262a4cd32f8a46151222acb2..1f8a3df3bf7dde49b26a0bc669616574aa4db8f3 100644 --- a/packages/PEGTL/README.md +++ b/packages/PEGTL/README.md @@ -1,7 +1,7 @@ # Welcome to the PEGTL [](https://github.com/taocpp/PEGTL/releases/latest) -[](https://bintray.com/taocpp/public-conan/pegtl%3Ataocpp/_latestVersion) +[](https://bintray.com/conan/conan-center/taocpp-pegtl%3A_/_latestVersion) [](https://travis-ci.org/taocpp/PEGTL) [](https://ci.appveyor.com/project/taocpp/PEGTL) [](https://coveralls.io/github/taocpp/PEGTL) @@ -81,6 +81,15 @@ Code coverage is automatically measured and the unit tests cover 100% of the cor Incompatible API changes are *only* allowed to occur between major versions. For details see the [changelog](doc/Changelog.md). +## Package Managers + +You can download and install the PEGTL using the [Conan](https://github.com/conan-io/conan) package manager: + + conan install taocpp-pegtl/2.8.1@ + +The taocpp-pegtl package in conan is kept up to date by Conan team members and community contributors. +If the version is out-of-date, please [create an issue or pull request](https://github.com/conan-io/conan-center-index) on the Conan Center Index repository. + ## Thank You In appreciation of all contributions here are the people that have [directly contributed](https://github.com/taocpp/PEGTL/graphs/contributors) to the PEGTL and/or its development. @@ -118,7 +127,6 @@ In appreciation of all contributions here are the people that have [directly con [<img alt="wravery" src="https://avatars0.githubusercontent.com/u/6502881?v=4&s=117" width="117">](https://github.com/wravery) [<img alt="zhihaoy" src="https://avatars2.githubusercontent.com/u/43971430?v=4&s=117" width="117">](https://github.com/zhihaoy) - ## The Art of C++ The PEGTL is part of [The Art of C++](https://taocpp.github.io/). @@ -135,7 +143,7 @@ For questions and suggestions regarding the PEGTL, success or failure stories, a The PEGTL is certified [Open Source](http://www.opensource.org/docs/definition.html) software. It may be used for any purpose, including commercial purposes, at absolutely no cost. It is distributed under the terms of the [MIT license](http://www.opensource.org/licenses/mit-license.html) reproduced here. -> Copyright (c) 2007-2019 Dr. Colin Hirsch and Daniel Frey +> Copyright (c) 2007-2020 Dr. Colin Hirsch and Daniel Frey > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: > diff --git a/packages/PEGTL/conanfile.py b/packages/PEGTL/conanfile.py deleted file mode 100644 index 39ae05aa1d9680c3f913fc3bde115b71ac924dce..0000000000000000000000000000000000000000 --- a/packages/PEGTL/conanfile.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -from conans import ConanFile, CMake - -class PEGTLConan(ConanFile): - name = "pegtl" - description = "C++ header-only parser combinator library for creating PEG parsers" - homepage = "https://github.com/taocpp/PEGTL" - topics = ("conan", "taocpp", "pegtl", "peg", "grammar", "parsing") - url = homepage - license = "MIT" - author = "taocpp@icemx.net" - exports = "LICENSE" - exports_sources = "cmake/*", "include/*", "CMakeLists.txt" - settings = "build_type", "compiler", "os", "arch" - generators = "cmake" - no_copy_source = True - - def build(self): - pass - - def package(self): - cmake = CMake(self) - cmake.definitions["PEGTL_BUILD_TESTS"] = "OFF" - cmake.definitions["PEGTL_BUILD_EXAMPLES"] = "OFF" - cmake.definitions["PEGTL_INSTALL_DOC_DIR"] = "licenses" - cmake.configure() - cmake.install() - - def package_id(self): - self.info.header_only() diff --git a/packages/PEGTL/doc/Actions-and-States.md b/packages/PEGTL/doc/Actions-and-States.md index 0f65e55935b025b46396b238b16f86ce960a124f..0045ef7b48191706e85d47296ce8d635fd345c1f 100644 --- a/packages/PEGTL/doc/Actions-and-States.md +++ b/packages/PEGTL/doc/Actions-and-States.md @@ -538,4 +538,4 @@ Note that deriving from `require_apply` or `require_apply0` is optional and usua See the [section on legacy-style action rules](Rule-Reference.md#action-rules). -Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey diff --git a/packages/PEGTL/doc/Changelog.md b/packages/PEGTL/doc/Changelog.md index 078aadc896fefff77c8a1d83c2baf886d5f7b5db..d1e9c0d74c785726d7745aac59b1f0aad15eebbc 100644 --- a/packages/PEGTL/doc/Changelog.md +++ b/packages/PEGTL/doc/Changelog.md @@ -9,6 +9,7 @@ * Updated required [CMake](https://cmake.org/) version to 3.8. * The macro `TAO_PEGTL_NAMESPACE` now contains the fully qualified namespace, e.g. `tao::pegtl`. * Replaced `tao::pegtl::input_error` with `std::system_error`. +* Added `tao::pegtl::error_message< Rule >` as a non-intrusive way to define global parse errors. * Changed message of `tao::pegtl::parse_error` to no longer contain the position redundantly. * Changed rules in `tao/pegtl/contrib/integer.hpp` to not accept redundant leading zeros. * Added rules to `tao/pegtl/contrib/integer.hpp` that test unsigned values against a maximum. @@ -563,4 +564,4 @@ Released 2008 Development of the PEGTL started in November 2007 as an experiment in C++0x. It is based on ideas from the YARD library by Christopher Diggins. -Copyright (c) 2007-2019 Dr. Colin Hirsch and Daniel Frey +Copyright (c) 2007-2020 Dr. Colin Hirsch and Daniel Frey diff --git a/packages/PEGTL/doc/Contrib-and-Examples.md b/packages/PEGTL/doc/Contrib-and-Examples.md index 7f844ad132bf01895d9f368581e44eb022ff5649..7afc0fe8e4dc06d854ca167e49bccfa8765d6264 100644 --- a/packages/PEGTL/doc/Contrib-and-Examples.md +++ b/packages/PEGTL/doc/Contrib-and-Examples.md @@ -242,4 +242,4 @@ Uses the building blocks from `<tao/pegtl/contrib/unescape.hpp>` to show how to Shows how to use the included [tracer control](#taopegtlcontribtracerhpp), here together with the URI grammar from `<tao/pegtl/contrib/uri.hpp>`. Invoked with one or more URIs as command line arguments will attempt to parse the URIs while printing trace information to `std::cerr`. -Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey diff --git a/packages/PEGTL/doc/Control-and-Debug.md b/packages/PEGTL/doc/Control-and-Debug.md index af5ef5a6706263f6d787cb19d711da2e1d4714fa..e6581e30d950d34d5b933a9d231e1089ad6d4e93 100644 --- a/packages/PEGTL/doc/Control-and-Debug.md +++ b/packages/PEGTL/doc/Control-and-Debug.md @@ -140,4 +140,4 @@ Just like the action class template, a custom control class template can be used The latter requires the use of a [custom action](Actions-and-States.md). Deriving the specialisation of the custom action for `my_rule` from `tao::pegtl::change_control< my_control >` will switch the current control to `my_control` before attempting to match `my_rule`. -Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey diff --git a/packages/PEGTL/doc/Errors-and-Exceptions.md b/packages/PEGTL/doc/Errors-and-Exceptions.md index d632031eaa47d3f2b1d092d36f5ef0afa652499b..eb042568405fae96949908d4dddfcc8289549c9f 100644 --- a/packages/PEGTL/doc/Errors-and-Exceptions.md +++ b/packages/PEGTL/doc/Errors-and-Exceptions.md @@ -31,6 +31,19 @@ It should be mentioned that `must< R >` is semantically equivalent to `sor< R, r In any case, the task of actually throwing an exception is delegated to the [control class'](Control-and-Debug.md) `raise()`. +Note that rules and actions can throw exceptions directly, meaning those are not generated from the [control class'](Control-and-Debug.md) `raise()`. + +If a (pre-defined) grammar does not contain any `must<>` rule (or a related rule), one can still turn any local error into a global error by specializing `tao::pegtl::error_message`. + +```c++ +namespace tao::pegtl +{ + template<> constexpr const char* error_message< my_rule > = "my_rule failed!"; +} +``` + +If the parser tries to match `my_rule`, and it fails, a `parse_error` with the current position and the provided error message is thrown. + ## Global to Local Failure To convert global failure to local failure, the grammar rules [`try_catch`](Rule-Reference.md#try_catch-r-) and [`try_catch_type`](Rule-Reference.md#try_catch_type-e-r-) can be used. @@ -159,4 +172,4 @@ This is similar to the default behaviour, but one will not get a linker error in It is advisable to choose the error points in the grammar with prudence. This choice becoming particularly cumbersome and/or resulting in a large number of error points might be an indication of the grammar needing some kind of simplification or restructuring. -Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey diff --git a/packages/PEGTL/doc/Getting-Started.md b/packages/PEGTL/doc/Getting-Started.md index aa87cda4779191855098b952847863eafbe2b5d0..9681ece206b4158de675735efefe360742da5070 100644 --- a/packages/PEGTL/doc/Getting-Started.md +++ b/packages/PEGTL/doc/Getting-Started.md @@ -4,7 +4,7 @@ Since the PEGTL is a parser library, here is an "inverse hello world" example th rather than prints, the string `Hello, foo!` for any sequence of alphabetic ASCII characters `foo`. ```c++ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <string> @@ -101,4 +101,4 @@ Aborted (core dumped) Frequently an application will include a top-level `try-catch` block to handle the exception. -Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey diff --git a/packages/PEGTL/doc/Grammar-Analysis.md b/packages/PEGTL/doc/Grammar-Analysis.md index ad9070ce9c91f85943712e9a722030046e2e9902..74e181c5752a9adf064eed217aa51202718d9887 100644 --- a/packages/PEGTL/doc/Grammar-Analysis.md +++ b/packages/PEGTL/doc/Grammar-Analysis.md @@ -81,4 +81,4 @@ Class `tao::pegtl::analysis::counted` additionally takes an integer argument `Co When a custom rule goes beyond what can be currently expressed and all other questions, please contact the authors at **taocpp(at)icemx.net**. -Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey diff --git a/packages/PEGTL/doc/Inputs-and-Parsing.md b/packages/PEGTL/doc/Inputs-and-Parsing.md index ba7b9d36267a4a4c47eabe281b173d771298bcf6..55a76696902166ed15f2f32999182945ac5a875e 100644 --- a/packages/PEGTL/doc/Inputs-and-Parsing.md +++ b/packages/PEGTL/doc/Inputs-and-Parsing.md @@ -546,4 +546,4 @@ Trying to call any of those functions on `buffer_input<>`-based instances will l All input classes support [deduction guides](https://en.cppreference.com/w/cpp/language/class_template_argument_deduction), e.g. instead of `file_input<> in( "filename.txt" )` one can use `file_input in( "filename.txt" )`. -Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey diff --git a/packages/PEGTL/doc/Installing-and-Using.md b/packages/PEGTL/doc/Installing-and-Using.md index 7b73f223674f261eb29b6add78522cf3c8062b61..8338d8d3602bd8953d35e28060854e839383ad97 100644 --- a/packages/PEGTL/doc/Installing-and-Using.md +++ b/packages/PEGTL/doc/Installing-and-Using.md @@ -141,40 +141,22 @@ For more options and ways to use CMake, please refer to the Conan --- -The [PEGTL conan package](https://bintray.com/taocpp/public-conan/pegtl%3Ataocpp) is automatically updated when a release is made, and it should always be up to date with the latest official release. +The [PEGTL conan package](https://bintray.com/conan/conan-center/taocpp-pegtl%3A_) is updated by Conan Center Index. Simply add ```ini -pegtl/<version>@taocpp/stable +pegtl/<version>@ ``` as a dependency to your conan project where `<version>` is the version of PEGTL you want to use. -### Using a development version - -If a not yet released PEGTL version is required, then PEGTL can be exported in its current state. - -```bash -mkdir build -conan install -if build -conan export-pkg -if build -bf build . pegtl/<version>@taocpp/devel -``` - -Then proceed by adding - -```ini -pegtl/<version>@taocpp/devel -``` - -as a dependency to your conan project. - ### Developing with conan editable If it is required to develop PEGTL alongside another library/application then the package can be put into editable mode with ```bash -conan editable add . pegtl/<version>@taocpp/devel +conan editable add . pegtl/<version>@ ``` If the editable layout has `[builddirs]` set correctly and one is using the `cmake_paths` or `cmake`generator @@ -289,7 +271,7 @@ $ make amalgamate The above will generate a `build/amalgamated/pegtl.hpp` which will consist of the headers `tao/pegtl.hpp`, `tao/pegtl/analyze.hpp`, their dependencies, and all headers in `tao/pegtl/contrib/` except for the headers in `tao/pegtl/contrib/icu/`. -Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey [CMake]: https://cmake.org/ [CMake documentation]: https://cmake.org/documentation/ diff --git a/packages/PEGTL/doc/Migration-Guide.md b/packages/PEGTL/doc/Migration-Guide.md index a63ee5b5e2c272c887446a8b677daf3dcf5bf076..ccbe64dad09a56632149765e2995260aa8574c18 100644 --- a/packages/PEGTL/doc/Migration-Guide.md +++ b/packages/PEGTL/doc/Migration-Guide.md @@ -54,4 +54,4 @@ Please contact the authors at `taocpp(at)icemx.net` for any further questions wh There were [many important changes](Changelog.md#100) leading up to version 1.0.0. Please contact the authors at `taocpp(at)icemx.net` for any further questions when updating the PEGTL. -Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey diff --git a/packages/PEGTL/doc/Parse-Tree.md b/packages/PEGTL/doc/Parse-Tree.md index c7486df66c7e4c637b3afa217d01a1ae2836ab2b..80d10aac244a39d304325dcdad41ebfb8f46728d 100644 --- a/packages/PEGTL/doc/Parse-Tree.md +++ b/packages/PEGTL/doc/Parse-Tree.md @@ -237,4 +237,4 @@ struct my_node }; ``` -Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey diff --git a/packages/PEGTL/doc/Performance-Notes.md b/packages/PEGTL/doc/Performance-Notes.md index 43198177dc0f998deec61a517b9ca73803296b7d..97cdfd8a5b9cc21e0bda87ed2b88d9734b25db6f 100644 --- a/packages/PEGTL/doc/Performance-Notes.md +++ b/packages/PEGTL/doc/Performance-Notes.md @@ -42,4 +42,4 @@ However with `-O0`, the optimised `at_one< '"' >` was faster by 5-10% in a [JSON We still need to test whether the compiler manages to perform the same optimisation in more complex cases. -Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey diff --git a/packages/PEGTL/doc/README.md b/packages/PEGTL/doc/README.md index b5b00b794a2924159f3971ee6745c508df6a9930..2de138962698e7fa4d18299d24721bf8a8df7581 100644 --- a/packages/PEGTL/doc/README.md +++ b/packages/PEGTL/doc/README.md @@ -282,4 +282,4 @@ * [`xid_continue`](Rule-Reference.md#xid_continue) <sup>[(icu rules)](Rule-Reference.md#icu-rules-for-binary-properties)</sup> * [`xid_start`](Rule-Reference.md#xid_start) <sup>[(icu rules)](Rule-Reference.md#icu-rules-for-binary-properties)</sup> -Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey diff --git a/packages/PEGTL/doc/Rule-Reference.md b/packages/PEGTL/doc/Rule-Reference.md index 8ac40c7ebb97b489629d7d052df665838af2d7e0..8e12810182b59cdd5829c07668c2f72f043432dc 100644 --- a/packages/PEGTL/doc/Rule-Reference.md +++ b/packages/PEGTL/doc/Rule-Reference.md @@ -1240,4 +1240,4 @@ The term *input value* indicates a correspondingly sized integer value read from * [`xid_continue`](#xid_continue) <sup>[(icu rules)](#icu-rules-for-binary-properties)</sup> * [`xid_start`](#xid_start) <sup>[(icu rules)](#icu-rules-for-binary-properties)</sup> -Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey diff --git a/packages/PEGTL/doc/Rules-and-Grammars.md b/packages/PEGTL/doc/Rules-and-Grammars.md index f577ad97d990a013adcb9273f3febca03959529a..58905c1539432614d3717e90f64afa70214c08e1 100644 --- a/packages/PEGTL/doc/Rules-and-Grammars.md +++ b/packages/PEGTL/doc/Rules-and-Grammars.md @@ -394,4 +394,4 @@ long literal id was: "fraggle" long literal body was: "[foo[" ``` -Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey diff --git a/packages/PEGTL/include/tao/pegtl.hpp b/packages/PEGTL/include/tao/pegtl.hpp index 832fc9eaefaee66124eadf9d040f6de1c90d7eea..d20c4e3e4c56d7a78eb63a675028562454ea17c4 100644 --- a/packages/PEGTL/include/tao/pegtl.hpp +++ b/packages/PEGTL/include/tao/pegtl.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_HPP diff --git a/packages/PEGTL/include/tao/pegtl/analysis/analyze_cycles.hpp b/packages/PEGTL/include/tao/pegtl/analysis/analyze_cycles.hpp index 0b8e60edf67c18247389e565ef5e0a476bc9c252..e62cbcc2c394d43892e96f663f17c98b8b3e6b32 100644 --- a/packages/PEGTL/include/tao/pegtl/analysis/analyze_cycles.hpp +++ b/packages/PEGTL/include/tao/pegtl/analysis/analyze_cycles.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_ANALYSIS_ANALYZE_CYCLES_HPP diff --git a/packages/PEGTL/include/tao/pegtl/analysis/counted.hpp b/packages/PEGTL/include/tao/pegtl/analysis/counted.hpp index e2ac6fb242d62b16f57d2ce24e8f648ea9ad683b..face1897a9892e786bc55d4d9993f9627064319a 100644 --- a/packages/PEGTL/include/tao/pegtl/analysis/counted.hpp +++ b/packages/PEGTL/include/tao/pegtl/analysis/counted.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_ANALYSIS_COUNTED_HPP diff --git a/packages/PEGTL/include/tao/pegtl/analysis/generic.hpp b/packages/PEGTL/include/tao/pegtl/analysis/generic.hpp index e41816b98b2ffa740076c5d33a2b2928493f6c27..17c002be8dab2b5cf0790ea996cc071a7915ced2 100644 --- a/packages/PEGTL/include/tao/pegtl/analysis/generic.hpp +++ b/packages/PEGTL/include/tao/pegtl/analysis/generic.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_ANALYSIS_GENERIC_HPP diff --git a/packages/PEGTL/include/tao/pegtl/analysis/grammar_info.hpp b/packages/PEGTL/include/tao/pegtl/analysis/grammar_info.hpp index d25a701d90f45d5ad61598a2e1dd296d6338aee0..9cfdd3870808cf3d69aead815775efbaed8366dd 100644 --- a/packages/PEGTL/include/tao/pegtl/analysis/grammar_info.hpp +++ b/packages/PEGTL/include/tao/pegtl/analysis/grammar_info.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_ANALYSIS_GRAMMAR_INFO_HPP diff --git a/packages/PEGTL/include/tao/pegtl/analysis/insert_guard.hpp b/packages/PEGTL/include/tao/pegtl/analysis/insert_guard.hpp index 1fb00503cf8895945df35b2766482c470149b0a6..727e976aa450e9f2c12e33d7bbed7bb3cc6e0138 100644 --- a/packages/PEGTL/include/tao/pegtl/analysis/insert_guard.hpp +++ b/packages/PEGTL/include/tao/pegtl/analysis/insert_guard.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_ANALYSIS_INSERT_GUARD_HPP diff --git a/packages/PEGTL/include/tao/pegtl/analysis/insert_rules.hpp b/packages/PEGTL/include/tao/pegtl/analysis/insert_rules.hpp index 617031a63c3ef86aec1456c4376c720e811ed5b1..8f636e429dd7e6779e787c6af4df4bb2e969e116 100644 --- a/packages/PEGTL/include/tao/pegtl/analysis/insert_rules.hpp +++ b/packages/PEGTL/include/tao/pegtl/analysis/insert_rules.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_ANALYSIS_INSERT_RULES_HPP diff --git a/packages/PEGTL/include/tao/pegtl/analysis/rule_info.hpp b/packages/PEGTL/include/tao/pegtl/analysis/rule_info.hpp index 0f06950bdc88f8a7333e9585137fa5aa721a0870..576163a1dff24518f80cc447ff79fce3abfe02d5 100644 --- a/packages/PEGTL/include/tao/pegtl/analysis/rule_info.hpp +++ b/packages/PEGTL/include/tao/pegtl/analysis/rule_info.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_ANALYSIS_RULE_INFO_HPP diff --git a/packages/PEGTL/include/tao/pegtl/analysis/rule_type.hpp b/packages/PEGTL/include/tao/pegtl/analysis/rule_type.hpp index ec1f29c91558ba2e0dfebd001569ae4b04103bad..c598c1c3794c9b95f9ad7e4daf1370b4404caaae 100644 --- a/packages/PEGTL/include/tao/pegtl/analysis/rule_type.hpp +++ b/packages/PEGTL/include/tao/pegtl/analysis/rule_type.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_ANALYSIS_RULE_TYPE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/analyze.hpp b/packages/PEGTL/include/tao/pegtl/analyze.hpp index d0e0641ce2ea8071cb52812a55c99240d50ff640..fc766944c7d34027b677c0c0ecafbee6f3614afc 100644 --- a/packages/PEGTL/include/tao/pegtl/analyze.hpp +++ b/packages/PEGTL/include/tao/pegtl/analyze.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_ANALYZE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/apply_mode.hpp b/packages/PEGTL/include/tao/pegtl/apply_mode.hpp index 144f0cb79426edf60d11f7b7f1ffa89834b431c4..962d4f00def6c26d40dc93af2a38f1bf90796578 100644 --- a/packages/PEGTL/include/tao/pegtl/apply_mode.hpp +++ b/packages/PEGTL/include/tao/pegtl/apply_mode.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_APPLY_MODE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/argv_input.hpp b/packages/PEGTL/include/tao/pegtl/argv_input.hpp index 48da349671994312cc9208b2bbbe5fcb3b8acf2b..f727442b8337a621549e24830162fe97a03c9b67 100644 --- a/packages/PEGTL/include/tao/pegtl/argv_input.hpp +++ b/packages/PEGTL/include/tao/pegtl/argv_input.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_ARGV_INPUT_HPP diff --git a/packages/PEGTL/include/tao/pegtl/ascii.hpp b/packages/PEGTL/include/tao/pegtl/ascii.hpp index b28cc350a364d1863c5b261b73d70a3a5a264fbd..e376e7bbb7e27bb1e21c9357e904591b8ce8a3a6 100644 --- a/packages/PEGTL/include/tao/pegtl/ascii.hpp +++ b/packages/PEGTL/include/tao/pegtl/ascii.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_ASCII_HPP diff --git a/packages/PEGTL/include/tao/pegtl/buffer_input.hpp b/packages/PEGTL/include/tao/pegtl/buffer_input.hpp index b83af7956856becc460aaaf5ed989d90b1f42e87..f964787769d7f9ae5146ee3a29d99293ca1c556b 100644 --- a/packages/PEGTL/include/tao/pegtl/buffer_input.hpp +++ b/packages/PEGTL/include/tao/pegtl/buffer_input.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_BUFFER_INPUT_HPP diff --git a/packages/PEGTL/include/tao/pegtl/change_action.hpp b/packages/PEGTL/include/tao/pegtl/change_action.hpp index bd73db8520935d9fa1cae3e352831fc243b00e38..fdef488a79a5f142615d1c1df54d0b8b77bd61b0 100644 --- a/packages/PEGTL/include/tao/pegtl/change_action.hpp +++ b/packages/PEGTL/include/tao/pegtl/change_action.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CHANGE_ACTION_HPP diff --git a/packages/PEGTL/include/tao/pegtl/change_action_and_state.hpp b/packages/PEGTL/include/tao/pegtl/change_action_and_state.hpp index 84a174f17512ce7bbd8e3437eec29ed4c229fabf..5ce3a0506aedba7e5fd88944d97df7ca7b17ce67 100644 --- a/packages/PEGTL/include/tao/pegtl/change_action_and_state.hpp +++ b/packages/PEGTL/include/tao/pegtl/change_action_and_state.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CHANGE_ACTION_AND_STATE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/change_action_and_states.hpp b/packages/PEGTL/include/tao/pegtl/change_action_and_states.hpp index 1fb3b3de58b3a72f5710d46068496d9ecfce19d8..ae700726db9be47e2361392bb55d3c1a41ef90bd 100644 --- a/packages/PEGTL/include/tao/pegtl/change_action_and_states.hpp +++ b/packages/PEGTL/include/tao/pegtl/change_action_and_states.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CHANGE_ACTION_AND_STATES_HPP diff --git a/packages/PEGTL/include/tao/pegtl/change_control.hpp b/packages/PEGTL/include/tao/pegtl/change_control.hpp index cef670118868775f807b2c74806f8e5a190419a2..11e9c55137833211b90aa4af0dc9d327c061b000 100644 --- a/packages/PEGTL/include/tao/pegtl/change_control.hpp +++ b/packages/PEGTL/include/tao/pegtl/change_control.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CHANGE_CONTROL_HPP diff --git a/packages/PEGTL/include/tao/pegtl/change_state.hpp b/packages/PEGTL/include/tao/pegtl/change_state.hpp index 9e3568e94d8a3e5cd0653e87be0f26a241e7c544..2b2093cc010144936d2d7b914fcd7a7ed6962929 100644 --- a/packages/PEGTL/include/tao/pegtl/change_state.hpp +++ b/packages/PEGTL/include/tao/pegtl/change_state.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CHANGE_STATE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/change_states.hpp b/packages/PEGTL/include/tao/pegtl/change_states.hpp index 2a907356b7bf709d82b36860fb375fb8dfb44d95..d1570a7a801856ba10d2c2d47166d2c04c3b9571 100644 --- a/packages/PEGTL/include/tao/pegtl/change_states.hpp +++ b/packages/PEGTL/include/tao/pegtl/change_states.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CHANGE_STATES_HPP diff --git a/packages/PEGTL/include/tao/pegtl/config.hpp b/packages/PEGTL/include/tao/pegtl/config.hpp index bb63adfc525ee3a60e50f4902849b60b42adf327..2a67638820588cd04a30f54fefdf19bf66a4bd59 100644 --- a/packages/PEGTL/include/tao/pegtl/config.hpp +++ b/packages/PEGTL/include/tao/pegtl/config.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONFIG_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/abnf.hpp b/packages/PEGTL/include/tao/pegtl/contrib/abnf.hpp index f90d6b9497142691695fb4227a7665d7256ce3ea..618c68c6136a875f7947d8d62876bb6526ab66e2 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/abnf.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/abnf.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_ABNF_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/alphabet.hpp b/packages/PEGTL/include/tao/pegtl/contrib/alphabet.hpp index 942c6e1c1fb54e2ded9c9f5650a76f96c0325875..91747dd90a37d0b9cf402c8992bd3d6d8b5efeff 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/alphabet.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/alphabet.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2015-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_ALPHABET_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/counter.hpp b/packages/PEGTL/include/tao/pegtl/contrib/counter.hpp index e3a9e72699ad9b2690144f0136a6185cfee3fc81..04e8762d036d2e823dd03f86e70ea78a45c4cfb9 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/counter.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/counter.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_COUNTER_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/http.hpp b/packages/PEGTL/include/tao/pegtl/contrib/http.hpp index 329035cacf68416a409ac7eb2482300379c4c35c..c4a60d614b73205e85d80abd444a34457ea142a2 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/http.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/http.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_HTTP_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/icu/internal.hpp b/packages/PEGTL/include/tao/pegtl/contrib/icu/internal.hpp index c71bac3429e598bd609a57a8dfb2fa856aa5188e..80c0538ac821a99ed348b38f965bb38df60fe356 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/icu/internal.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/icu/internal.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_ICU_INTERNAL_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/icu/utf16.hpp b/packages/PEGTL/include/tao/pegtl/contrib/icu/utf16.hpp index 316eb84c375633f09a30f49fb1a61b898370b5bc..24a8c23ce6f897b050669bd48a3afee8c5cdaac9 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/icu/utf16.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/icu/utf16.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_ICU_UTF16_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/icu/utf32.hpp b/packages/PEGTL/include/tao/pegtl/contrib/icu/utf32.hpp index 8c7189edfe6d2d2cdcab4968afb7ddb645565516..9d93323081ad128a42efc1dd64bc6f79f1929c72 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/icu/utf32.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/icu/utf32.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_ICU_UTF32_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/icu/utf8.hpp b/packages/PEGTL/include/tao/pegtl/contrib/icu/utf8.hpp index 7c7cc5573b2f617a61a6badfae57fa89c07da565..4df89677858c5edbcd6451adc7f87b220c9a4b61 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/icu/utf8.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/icu/utf8.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_ICU_UTF8_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/if_then.hpp b/packages/PEGTL/include/tao/pegtl/contrib/if_then.hpp index 63e4e9c96f5fbd5810c7de401cce01083e194823..fa50ccd8adf96e88b4ddbae4dbf266dcb8eed352 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/if_then.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/if_then.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_IF_THEN_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/integer.hpp b/packages/PEGTL/include/tao/pegtl/contrib/integer.hpp index fe1fd1ee84034da3bcdf025d0caf15884c4d1ead..7d93d8cab3a18f912d69eadfa4a76bdacae125d4 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/integer.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/integer.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_INTEGER_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/json.hpp b/packages/PEGTL/include/tao/pegtl/contrib/json.hpp index 565f9ee7d184a6ac78bfdffd9410b1ea1dc23aa4..5ae8326efb6cf8800d5dbf3845f7f6ca2cb437a2 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/json.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/json.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_JSON_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/json_pointer.hpp b/packages/PEGTL/include/tao/pegtl/contrib/json_pointer.hpp index d03c8364e7ef0bd7409844284441a2fbe8eaedb6..9732f705edfa33190447afbd5dc0db64b983ce78 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/json_pointer.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/json_pointer.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_JSON_POINTER_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/parse_tree.hpp b/packages/PEGTL/include/tao/pegtl/contrib/parse_tree.hpp index 222e127fd47c11fa18149b1783d295b6d7c62c5f..a6f70b490796f7770478de2cfa858d9ca280434e 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/parse_tree.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/parse_tree.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_PARSE_TREE_HPP @@ -24,6 +24,7 @@ #include "../analysis/generic.hpp" #include "../internal/demangle.hpp" #include "../internal/iterator.hpp" +#include "../internal/seq.hpp" namespace TAO_PEGTL_NAMESPACE::parse_tree { @@ -152,6 +153,16 @@ namespace TAO_PEGTL_NAMESPACE::parse_tree namespace internal { + template< typename > + struct is_seq + : std::false_type + {}; + + template< typename... Rules > + struct is_seq< TAO_PEGTL_NAMESPACE::internal::seq< Rules... > > + : std::true_type + {}; + template< typename Node > struct state { @@ -435,6 +446,37 @@ namespace TAO_PEGTL_NAMESPACE::parse_tree state.back()->template failure< Rule >( in, st... ); state.pop_back(); } + + template< apply_mode A, + rewind_mode M, + template< typename... > + class Action, + template< typename... > + class Control2, + typename Input, + typename... States > + [[nodiscard]] static bool match( Input& in, States&&... st ) + { + if constexpr( is_seq< Rule >::value ) { + auto& state = std::get< sizeof...( st ) - 1 >( std::tie( st... ) ); + state.emplace_back(); + const bool result = Control< Rule >::template match< A, M, Action, Control2 >( in, st... ); + if( result ) { + auto n = std::move( state.back() ); + state.pop_back(); + for( auto& c : n->children ) { + state.back()->children.emplace_back( std::move( c ) ); + } + } + else { + state.pop_back(); + } + return result; + } + else { + return Control< Rule >::template match< A, M, Action, Control2 >( in, st... ); + } + } }; template< typename > diff --git a/packages/PEGTL/include/tao/pegtl/contrib/parse_tree_to_dot.hpp b/packages/PEGTL/include/tao/pegtl/contrib/parse_tree_to_dot.hpp index dc471d5af970f9e81871a0e6d60d4699dddc7165..46abc9e0ef356b54200a09a948d680a2b063f419 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/parse_tree_to_dot.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/parse_tree_to_dot.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_PARSE_TREE_TO_DOT_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/raw_string.hpp b/packages/PEGTL/include/tao/pegtl/contrib/raw_string.hpp index 968ebc791b1ee8579c88c23c86f29f32cab34f9c..92a62fee53ac23c09e89da123a596c5252137d3e 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/raw_string.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/raw_string.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_RAW_STRING_HPP @@ -101,7 +101,9 @@ namespace TAO_PEGTL_NAMESPACE inline constexpr bool skip_control< at_raw_string_close< Marker, Close > > = true; template< typename Cond, typename... Rules > - struct raw_string_until; + struct raw_string_until + : raw_string_until< Cond, seq< Rules... > > + {}; template< typename Cond > struct raw_string_until< Cond > @@ -130,10 +132,10 @@ namespace TAO_PEGTL_NAMESPACE } }; - template< typename Cond, typename... Rules > - struct raw_string_until + template< typename Cond, typename Rule > + struct raw_string_until< Cond, Rule > { - using analyze_t = analysis::generic< analysis::rule_type::seq, star< not_at< Cond >, not_at< eof >, Rules... >, Cond >; + using analyze_t = analysis::generic< analysis::rule_type::seq, star< not_at< Cond >, not_at< eof >, Rule >, Cond >; template< apply_mode A, rewind_mode M, @@ -149,7 +151,7 @@ namespace TAO_PEGTL_NAMESPACE using m_t = decltype( m ); while( !Control< Cond >::template match< A, rewind_mode::required, Action, Control >( in, marker_size, st... ) ) { - if( in.empty() || !( Control< Rules >::template match< A, m_t::next_rewind_mode, Action, Control >( in, st... ) && ... ) ) { + if( in.empty() || !Control< Rule >::template match< A, m_t::next_rewind_mode, Action, Control >( in, st... ) ) { return false; } } diff --git a/packages/PEGTL/include/tao/pegtl/contrib/remove_first_state.hpp b/packages/PEGTL/include/tao/pegtl/contrib/remove_first_state.hpp index df03abfea713dc1be2c004dc1fbeb6bf4d6868b1..4933a735e51585435b3585f5bf174b076964404d 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/remove_first_state.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/remove_first_state.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_REMOVE_FIRST_STATE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/rep_one_min_max.hpp b/packages/PEGTL/include/tao/pegtl/contrib/rep_one_min_max.hpp index 3f85f5817616705b9a10629ea11c8ca004810586..ee8c7515ba556e240681fd06e09a60b3a08500ae 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/rep_one_min_max.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/rep_one_min_max.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_REP_ONE_MIN_MAX_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/rep_string.hpp b/packages/PEGTL/include/tao/pegtl/contrib/rep_string.hpp index bd699ce8efd28b099d07b2d15373008842b64324..fd1607cd2a65c29ae8c01154b1452098e8337277 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/rep_string.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/rep_string.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_REP_STRING_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/to_string.hpp b/packages/PEGTL/include/tao/pegtl/contrib/to_string.hpp index 0cc8ea6254ba721911cb78db25d59f66e83234bb..5df1a2feae9b85e3263f13d9216c5c19a3398e94 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/to_string.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/to_string.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_TO_STRING_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/tracer.hpp b/packages/PEGTL/include/tao/pegtl/contrib/tracer.hpp index 3075b7467e9dff07f653a9e06318c66346e798db..c06968f764f3b8b06c2e13128d3619e17b444da3 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/tracer.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/tracer.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_TRACER_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/unescape.hpp b/packages/PEGTL/include/tao/pegtl/contrib/unescape.hpp index bdd6e1169dd2bf98ff85d19fe8d3070a0a31189d..3d185983c76e8ef79ff9c8cd6d7e92a775314d60 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/unescape.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/unescape.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_UNESCAPE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/contrib/uri.hpp b/packages/PEGTL/include/tao/pegtl/contrib/uri.hpp index 2a391bd6968189f6e3dab26d48ccc73d2271ae56..a15836f5824097e5e0a77fefc53a5abd5878aeb0 100644 --- a/packages/PEGTL/include/tao/pegtl/contrib/uri.hpp +++ b/packages/PEGTL/include/tao/pegtl/contrib/uri.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_URI_HPP diff --git a/packages/PEGTL/include/tao/pegtl/cstream_input.hpp b/packages/PEGTL/include/tao/pegtl/cstream_input.hpp index d31a3add1082f0c5d078b70da51506f84caed7ad..54e62feefb162301719bdb6fdca2a2e56f467bbb 100644 --- a/packages/PEGTL/include/tao/pegtl/cstream_input.hpp +++ b/packages/PEGTL/include/tao/pegtl/cstream_input.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CSTREAM_INPUT_HPP diff --git a/packages/PEGTL/include/tao/pegtl/disable_action.hpp b/packages/PEGTL/include/tao/pegtl/disable_action.hpp index 1832625edb80eb47e0f2ffce6a4e8648032b6085..b3b1bb0614de436ac03ab9f4a486aecc196dc326 100644 --- a/packages/PEGTL/include/tao/pegtl/disable_action.hpp +++ b/packages/PEGTL/include/tao/pegtl/disable_action.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_DISABLE_ACTION_HPP diff --git a/packages/PEGTL/include/tao/pegtl/discard_input.hpp b/packages/PEGTL/include/tao/pegtl/discard_input.hpp index d8a652e1348eb4507dacb8333dbe554aebc3f67b..9f9c23c7c71a912d4c4e3352f419315d4cef0dca 100644 --- a/packages/PEGTL/include/tao/pegtl/discard_input.hpp +++ b/packages/PEGTL/include/tao/pegtl/discard_input.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_DISCARD_INPUT_HPP diff --git a/packages/PEGTL/include/tao/pegtl/discard_input_on_failure.hpp b/packages/PEGTL/include/tao/pegtl/discard_input_on_failure.hpp index 917ab22d281e59499291b5b3089bb8aa79f8e60c..da7af0a7d4dd893546046504ea6d6c0e5e805455 100644 --- a/packages/PEGTL/include/tao/pegtl/discard_input_on_failure.hpp +++ b/packages/PEGTL/include/tao/pegtl/discard_input_on_failure.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_DISCARD_INPUT_ON_FAILURE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/discard_input_on_success.hpp b/packages/PEGTL/include/tao/pegtl/discard_input_on_success.hpp index 1c2ec0cc9fbe40eb6b933d485cd3cd13790326d9..201b095542f74128be8120298d6a484b7adc8562 100644 --- a/packages/PEGTL/include/tao/pegtl/discard_input_on_success.hpp +++ b/packages/PEGTL/include/tao/pegtl/discard_input_on_success.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_DISCARD_INPUT_ON_SUCCESS_HPP diff --git a/packages/PEGTL/include/tao/pegtl/enable_action.hpp b/packages/PEGTL/include/tao/pegtl/enable_action.hpp index f0a52e6bfef77b6b082d064d1f85bbb62d85808e..f51a39bb743314f78b775a3347f328690c73416e 100644 --- a/packages/PEGTL/include/tao/pegtl/enable_action.hpp +++ b/packages/PEGTL/include/tao/pegtl/enable_action.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_ENABLE_ACTION_HPP diff --git a/packages/PEGTL/include/tao/pegtl/eol.hpp b/packages/PEGTL/include/tao/pegtl/eol.hpp index 927cd3e5397ba91e2b3531fd7df5248b224d010f..4eeaeba1b985ef3992888e8e3deb9a8c30ca65f3 100644 --- a/packages/PEGTL/include/tao/pegtl/eol.hpp +++ b/packages/PEGTL/include/tao/pegtl/eol.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_EOL_HPP diff --git a/packages/PEGTL/include/tao/pegtl/eol_pair.hpp b/packages/PEGTL/include/tao/pegtl/eol_pair.hpp index 4c7f76c12120b4eae571ddda17ae9d28f1c2e08d..f52198b521fb829d7929fa02ce8cbbce6d871e50 100644 --- a/packages/PEGTL/include/tao/pegtl/eol_pair.hpp +++ b/packages/PEGTL/include/tao/pegtl/eol_pair.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_EOL_PAIR_HPP diff --git a/packages/PEGTL/include/tao/pegtl/file_input.hpp b/packages/PEGTL/include/tao/pegtl/file_input.hpp index 3c04e9aca2c1b3d22fac8e1099872f4561a13e38..d54db990fb4bbba59e483a5e5831ff09f9289881 100644 --- a/packages/PEGTL/include/tao/pegtl/file_input.hpp +++ b/packages/PEGTL/include/tao/pegtl/file_input.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2015-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_FILE_INPUT_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/action.hpp b/packages/PEGTL/include/tao/pegtl/internal/action.hpp index c6cd4d1d302130201ccdae93c58a11b8d696b2a1..7dc03e47f26c4ee11f4e08051e08425bbd58bdfe 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/action.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/action.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_ACTION_HPP @@ -6,7 +6,6 @@ #include "../config.hpp" -#include "duseltronik.hpp" #include "seq.hpp" #include "skip_control.hpp" @@ -19,8 +18,13 @@ namespace TAO_PEGTL_NAMESPACE::internal { template< template< typename... > class Action, typename... Rules > struct action + : action< Action, seq< Rules... > > + {}; + + template< template< typename... > class Action, typename Rule > + struct action< Action, Rule > { - using analyze_t = analysis::generic< analysis::rule_type::seq, Rules... >; + using analyze_t = analysis::generic< analysis::rule_type::seq, Rule >; template< apply_mode A, rewind_mode M, @@ -32,7 +36,7 @@ namespace TAO_PEGTL_NAMESPACE::internal typename... States > [[nodiscard]] static bool match( Input& in, States&&... st ) { - return duseltronik< seq< Rules... >, A, M, Action, Control >::match( in, st... ); + return Control< Rule >::template match< A, M, Action, Control >( in, st... ); } }; diff --git a/packages/PEGTL/include/tao/pegtl/internal/action_input.hpp b/packages/PEGTL/include/tao/pegtl/internal/action_input.hpp index add66f9c4ac661b8e6ce0da9c982bd84611a1678..91b69de80f77c2c504b9d3f8479386d1306722c8 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/action_input.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/action_input.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_ACTION_INPUT_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/alnum.hpp b/packages/PEGTL/include/tao/pegtl/internal/alnum.hpp index 459fd3aab91b3a62bf6a3c8f4be653f10d45fdfa..45704b90475acfcc19196b1452416d5d843f2a2f 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/alnum.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/alnum.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_ALNUM_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/alpha.hpp b/packages/PEGTL/include/tao/pegtl/internal/alpha.hpp index ddc7cf5fb210389bead2cbb036228515a7e7d5aa..b1591d92b58c847655ee292149b47e135dd54fb4 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/alpha.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/alpha.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_ALPHA_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/always_false.hpp b/packages/PEGTL/include/tao/pegtl/internal/always_false.hpp index 339ab498bf0d39437b05c40bbbed89f493418dcf..23d72dfa0edfb4f097a0bae71097156dca421650 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/always_false.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/always_false.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_ALWAYS_FALSE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/any.hpp b/packages/PEGTL/include/tao/pegtl/internal/any.hpp index e20c55bc5d7cd77b545fca4f34bf8586734c2a1b..d3f4d887cc359f2d01dc7d62950225fe9fd503dc 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/any.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/any.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_ANY_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/apply.hpp b/packages/PEGTL/include/tao/pegtl/internal/apply.hpp index 983ad56f498f348242aa1e565bb85e93b8cd7207..0b8b51f666f92c6c29309583a846afba7f46b2d5 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/apply.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/apply.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_APPLY_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/apply0.hpp b/packages/PEGTL/include/tao/pegtl/internal/apply0.hpp index bbc43a18aae58bc80981e823861e4da3d362db55..70b1df947916116ec1a6ae291791b9f7402e3566 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/apply0.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/apply0.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_APPLY0_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/apply0_single.hpp b/packages/PEGTL/include/tao/pegtl/internal/apply0_single.hpp index 73a6f1ac081b275322765d4fd903e2d3d85ee6f6..0c8da5ddd7780736d36394c1e8de2786994f7473 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/apply0_single.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/apply0_single.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_APPLY0_SINGLE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/apply_single.hpp b/packages/PEGTL/include/tao/pegtl/internal/apply_single.hpp index 85dc0b598fd389d8df1227986e0a10c11c3752c1..8a1b54f08295d0d753b161f1dc3f6e253e0cc3da 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/apply_single.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/apply_single.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_APPLY_SINGLE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/at.hpp b/packages/PEGTL/include/tao/pegtl/internal/at.hpp index e46a857502665407bc9acb97da468e58c4c72829..8e360c8a1d200f9b676c5375fb113ab49bf78364 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/at.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/at.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_AT_HPP @@ -6,6 +6,7 @@ #include "../config.hpp" +#include "seq.hpp" #include "skip_control.hpp" #include "trivial.hpp" @@ -17,18 +18,19 @@ namespace TAO_PEGTL_NAMESPACE::internal { template< typename... Rules > - struct at; + struct at + : at< seq< Rules... > > + {}; template<> struct at<> : trivial< true > - { - }; + {}; - template< typename... Rules > - struct at + template< typename Rule > + struct at< Rule > { - using analyze_t = analysis::generic< analysis::rule_type::opt, Rules... >; + using analyze_t = analysis::generic< analysis::rule_type::opt, Rule >; template< apply_mode, rewind_mode, @@ -41,7 +43,7 @@ namespace TAO_PEGTL_NAMESPACE::internal [[nodiscard]] static bool match( Input& in, States&&... st ) { const auto m = in.template mark< rewind_mode::required >(); - return ( Control< Rules >::template match< apply_mode::nothing, rewind_mode::active, Action, Control >( in, st... ) && ... ); + return Control< Rule >::template match< apply_mode::nothing, rewind_mode::active, Action, Control >( in, st... ); } }; diff --git a/packages/PEGTL/include/tao/pegtl/internal/bof.hpp b/packages/PEGTL/include/tao/pegtl/internal/bof.hpp index 53b8e59c488d30882419e5f27c9567369daff85a..de82db37599c2344b4545b7735d6c1723a39fa4a 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/bof.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/bof.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_BOF_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/bol.hpp b/packages/PEGTL/include/tao/pegtl/internal/bol.hpp index e58d239f3ce53c50e7430eddf6422c5b594c1208..691908fd355ac965aacf00003fa2892b17ca8638 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/bol.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/bol.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_BOL_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/bump.hpp b/packages/PEGTL/include/tao/pegtl/internal/bump.hpp index 293b1bbfd86761c049f93e7367d7e0d6bf12413b..74a1a7d7c749d12c55d570d762d590a5aa8aa554 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/bump.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/bump.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_BUMP_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/bump_help.hpp b/packages/PEGTL/include/tao/pegtl/internal/bump_help.hpp index 37b60cd2f14adfb8325218bd8ef091b4cd366ee4..f6420c3ce22e13df27964401d7467675253556bc 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/bump_help.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/bump_help.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2015-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_BUMP_HELP_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/bytes.hpp b/packages/PEGTL/include/tao/pegtl/internal/bytes.hpp index 9289d0f42a18f61176cee47ebc64d2719d93961e..7d6a4e630adc6fe651032c1bf8c7e789c05d048f 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/bytes.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/bytes.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_BYTES_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/control.hpp b/packages/PEGTL/include/tao/pegtl/internal/control.hpp index afc30a675082d2aa95cdfe00454d1bfde9f0aa8d..8197becd7d69d329e1ba52696782d9551c1d9540 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/control.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/control.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_CONTROL_HPP @@ -6,7 +6,6 @@ #include "../config.hpp" -#include "duseltronik.hpp" #include "seq.hpp" #include "skip_control.hpp" @@ -19,8 +18,13 @@ namespace TAO_PEGTL_NAMESPACE::internal { template< template< typename... > class Control, typename... Rules > struct control + : control< Control, seq< Rules... > > + {}; + + template< template< typename... > class Control, typename Rule > + struct control< Control, Rule > { - using analyze_t = analysis::generic< analysis::rule_type::seq, Rules... >; + using analyze_t = analysis::generic< analysis::rule_type::seq, Rule >; template< apply_mode A, rewind_mode M, @@ -32,7 +36,7 @@ namespace TAO_PEGTL_NAMESPACE::internal typename... States > [[nodiscard]] static bool match( Input& in, States&&... st ) { - return duseltronik< seq< Rules... >, A, M, Action, Control >::match( in, st... ); + return Control< Rule >::template match< A, M, Action, Control >( in, st... ); } }; diff --git a/packages/PEGTL/include/tao/pegtl/internal/cr_crlf_eol.hpp b/packages/PEGTL/include/tao/pegtl/internal/cr_crlf_eol.hpp index ff902142cbc05b0be135b80a9ee6a8b1e4833adc..0b143178895bb75cb26e590678bd919f4b2e3ffc 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/cr_crlf_eol.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/cr_crlf_eol.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_CR_CRLF_EOL_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/cr_eol.hpp b/packages/PEGTL/include/tao/pegtl/internal/cr_eol.hpp index cf7d7e07fb8b7720e2639bab9511b927d9a362eb..e9ed68492ddd245b5f4b4883d1a5ffbdc0da3c1a 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/cr_eol.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/cr_eol.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_CR_EOL_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/crlf_eol.hpp b/packages/PEGTL/include/tao/pegtl/internal/crlf_eol.hpp index 017076f6ddd2c040fc7d8abe6252a882d20d1f47..b9104d998cf7771952b6ae3f4493ebf430bdcb37 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/crlf_eol.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/crlf_eol.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_CRLF_EOL_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/cstream_reader.hpp b/packages/PEGTL/include/tao/pegtl/internal/cstream_reader.hpp index 1d436eaf5ceacbd646d5873c1f5b415825f150a3..f22fb08fa0d28a4b293f4ffd898876a33f4095a6 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/cstream_reader.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/cstream_reader.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_CSTREAM_READER_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/cstring_reader.hpp b/packages/PEGTL/include/tao/pegtl/internal/cstring_reader.hpp index a1f2db454aeca30ddf8aef34f3d708310443f36d..71947aa720af88779bd7402eb4974ecb41945c3c 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/cstring_reader.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/cstring_reader.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_CSTRING_READER_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/demangle.hpp b/packages/PEGTL/include/tao/pegtl/internal/demangle.hpp index a04cf75d7f4d5fde0020da26d92f0fee755cd05f..183134309bda8bd43843fb10f3db68880fc5788e 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/demangle.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/demangle.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_DEMANGLE_HPP @@ -18,8 +18,8 @@ namespace TAO_PEGTL_NAMESPACE::internal template< typename T > [[nodiscard]] constexpr std::string_view demangle() noexcept { - constexpr const std::string_view sv = __PRETTY_FUNCTION__; - constexpr const auto begin = sv.find( '=' ); + constexpr std::string_view sv = __PRETTY_FUNCTION__; + constexpr auto begin = sv.find( '=' ); static_assert( begin != std::string_view::npos ); return sv.substr( begin + 2, sv.size() - begin - 3 ); } @@ -43,8 +43,8 @@ namespace TAO_PEGTL_NAMESPACE::internal template< typename T > [[nodiscard]] constexpr std::string_view demangle() noexcept { - constexpr const std::string_view sv = __PRETTY_FUNCTION__; - constexpr const auto begin = find< '=' >( sv.data(), sv.size() ); + constexpr std::string_view sv = __PRETTY_FUNCTION__; + constexpr auto begin = find< '=' >( sv.data(), sv.size() ); static_assert( begin != nullptr ); return { begin + 2, sv.data() + sv.size() - begin - 3 }; } @@ -84,10 +84,10 @@ namespace TAO_PEGTL_NAMESPACE::internal [[nodiscard]] constexpr std::string_view demangle() noexcept { constexpr std::string_view sv = __PRETTY_FUNCTION__; - constexpr const auto begin = sv.find( '=' ); + constexpr auto begin = sv.find( '=' ); static_assert( begin != std::string_view::npos ); - constexpr const auto tmp = sv.substr( begin + 2 ); - constexpr const auto end = tmp.rfind( ';' ); + constexpr auto tmp = sv.substr( begin + 2 ); + constexpr auto end = tmp.rfind( ';' ); static_assert( end != std::string_view::npos ); return tmp.substr( 0, end ); } diff --git a/packages/PEGTL/include/tao/pegtl/internal/disable.hpp b/packages/PEGTL/include/tao/pegtl/internal/disable.hpp index 10e878d31f0378867c564a789065f41c4eb6a0b3..556220d350dafe72c52f869ab6bda0a2ac3f026f 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/disable.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/disable.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_DISABLE_HPP @@ -6,7 +6,6 @@ #include "../config.hpp" -#include "duseltronik.hpp" #include "seq.hpp" #include "skip_control.hpp" @@ -19,8 +18,13 @@ namespace TAO_PEGTL_NAMESPACE::internal { template< typename... Rules > struct disable + : disable< seq< Rules... > > + {}; + + template< typename Rule > + struct disable< Rule > { - using analyze_t = analysis::generic< analysis::rule_type::seq, Rules... >; + using analyze_t = analysis::generic< analysis::rule_type::seq, Rule >; template< apply_mode, rewind_mode M, @@ -32,7 +36,7 @@ namespace TAO_PEGTL_NAMESPACE::internal typename... States > [[nodiscard]] static bool match( Input& in, States&&... st ) { - return duseltronik< seq< Rules... >, apply_mode::nothing, M, Action, Control >::match( in, st... ); + return Control< Rule >::template match< apply_mode::nothing, M, Action, Control >( in, st... ); } }; diff --git a/packages/PEGTL/include/tao/pegtl/internal/discard.hpp b/packages/PEGTL/include/tao/pegtl/internal/discard.hpp index ffd5ff431fc9136f67ee056a570798e4ecbdb06b..410cfb6839b792c79a21e443a5e0e3b0951dbb80 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/discard.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/discard.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_DISCARD_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/dusel_mode.hpp b/packages/PEGTL/include/tao/pegtl/internal/dusel_mode.hpp index 3a40eba3a67545802215919a84642b7143c9a96f..dadba26303728559424379934ab53eef38d4a3c1 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/dusel_mode.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/dusel_mode.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_DUSEL_MODE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/duseltronik.hpp b/packages/PEGTL/include/tao/pegtl/internal/duseltronik.hpp index c5ab5c6fadf0e8f801c3197b3236cf18be98b8b2..d6bb64bd507f15a48416f5d2911dd10c26c1589b 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/duseltronik.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/duseltronik.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_DUSELTRONIK_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/enable.hpp b/packages/PEGTL/include/tao/pegtl/internal/enable.hpp index 7da5fb80e519867f01fbdc84ec7c5af6c3e45bc7..88e3ee1767cee22d61bd5e67ff297edcaf3ac84e 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/enable.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/enable.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_ENABLE_HPP @@ -6,7 +6,6 @@ #include "../config.hpp" -#include "duseltronik.hpp" #include "seq.hpp" #include "skip_control.hpp" @@ -19,8 +18,13 @@ namespace TAO_PEGTL_NAMESPACE::internal { template< typename... Rules > struct enable + : enable< seq< Rules... > > + {}; + + template< typename Rule > + struct enable< Rule > { - using analyze_t = analysis::generic< analysis::rule_type::seq, Rules... >; + using analyze_t = analysis::generic< analysis::rule_type::seq, Rule >; template< apply_mode, rewind_mode M, @@ -32,7 +36,7 @@ namespace TAO_PEGTL_NAMESPACE::internal typename... States > [[nodiscard]] static bool match( Input& in, States&&... st ) { - return duseltronik< seq< Rules... >, apply_mode::action, M, Action, Control >::match( in, st... ); + return Control< Rule >::template match< apply_mode::action, M, Action, Control >( in, st... ); } }; diff --git a/packages/PEGTL/include/tao/pegtl/internal/endian.hpp b/packages/PEGTL/include/tao/pegtl/internal/endian.hpp index 758dec29f23b39b68daa7d05563c38e82d689dbb..6be1b00538331b281f35042c51a6b30215db8542 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/endian.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/endian.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_ENDIAN_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/endian_gcc.hpp b/packages/PEGTL/include/tao/pegtl/internal/endian_gcc.hpp index cde7368151c6a9eeb4cc6002c7933d1f731eca8c..776b3cc3102cd3c71f9795407fd99ee1da11acb5 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/endian_gcc.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/endian_gcc.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_ENDIAN_GCC_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/endian_win.hpp b/packages/PEGTL/include/tao/pegtl/internal/endian_win.hpp index 1a2f1ad4e3c652a94a4793849149901dd0025ab6..ae3aab5bea126c83733ef8bcafbea8cb92fb44c4 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/endian_win.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/endian_win.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_ENDIAN_WIN_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/eof.hpp b/packages/PEGTL/include/tao/pegtl/internal/eof.hpp index bce5fe267066c5691a3d711e0b855b28e912fa47..30f053ef4154811882e1268690b02e4d744fa042 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/eof.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/eof.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_EOF_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/eol.hpp b/packages/PEGTL/include/tao/pegtl/internal/eol.hpp index d764bccc0238adcbaf703372da1e6d97dee135d0..e6b22dcca564fc0cfd4d1cdbd040925db74a8ece 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/eol.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/eol.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_EOL_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/eolf.hpp b/packages/PEGTL/include/tao/pegtl/internal/eolf.hpp index 6e9299686812b07bf87110d06b11aa1078d4830a..231a7ab4020c297d93ba2d1acb56bc51a131615f 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/eolf.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/eolf.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_EOLF_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/file_mapper_posix.hpp b/packages/PEGTL/include/tao/pegtl/internal/file_mapper_posix.hpp index af76c4ca5811ef4d5cd4094fcd0e9a873cb696e5..bf77dccaff8972107efe9a9fd6ab3ca6c51fb2fc 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/file_mapper_posix.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/file_mapper_posix.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_FILE_MAPPER_POSIX_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/file_mapper_win32.hpp b/packages/PEGTL/include/tao/pegtl/internal/file_mapper_win32.hpp index a705da097e7d887b29f30a298a3147d168d53634..80686ae3f19deff4251378cc29426c788129cfed 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/file_mapper_win32.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/file_mapper_win32.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_FILE_MAPPER_WIN32_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/file_opener.hpp b/packages/PEGTL/include/tao/pegtl/internal/file_opener.hpp index f25ae0d1578369aba6d4480c6c2f2a649dbd178e..801e735aa0999b6c83e4667fd136815c255d8e79 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/file_opener.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/file_opener.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_FILE_OPENER_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/file_reader.hpp b/packages/PEGTL/include/tao/pegtl/internal/file_reader.hpp index b5309f8469359ae6c6dd9631721f25684989b7cd..8c69d4decaa77ebdda05a57ccbc2384f7fb20f31 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/file_reader.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/file_reader.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_FILE_READER_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/has_apply.hpp b/packages/PEGTL/include/tao/pegtl/internal/has_apply.hpp index 2c91aed89df884df58e26578dc63061491bccc84..20a8c603d3e9e70a2c6d2624661d2967dd26e0ec 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/has_apply.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/has_apply.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_HAS_APPLY_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/has_apply0.hpp b/packages/PEGTL/include/tao/pegtl/internal/has_apply0.hpp index b2319e8cef2e919f217dcdeb9ed8fc819bdb1832..deaa1373213b1e0925166a7b0cb91f3f91a5e27a 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/has_apply0.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/has_apply0.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_HAS_APPLY0_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/has_match.hpp b/packages/PEGTL/include/tao/pegtl/internal/has_match.hpp index 08186d622838fb105edb03ec16c77f760df67649..6b02244a6946d01e5595d685a526d01344a923bb 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/has_match.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/has_match.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_HAS_MATCH_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/identifier.hpp b/packages/PEGTL/include/tao/pegtl/internal/identifier.hpp index ce666df2b97a4c85f22ff3ca72bfd6c926af95ed..f75eebd1406c3826734c8747305106134cebbbd0 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/identifier.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/identifier.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_IDENTIFIER_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/if_apply.hpp b/packages/PEGTL/include/tao/pegtl/internal/if_apply.hpp index 03f0cf8a04aac1fe34ac153babe4879cd68527dc..5c1e4ea603ca54218c1696eb5c35843c1b307860 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/if_apply.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/if_apply.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_IF_APPLY_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/if_must.hpp b/packages/PEGTL/include/tao/pegtl/internal/if_must.hpp index 8b4bf328d707f486e789a464b4eea84e402ee568..7786f614e87ff8cdc901b4e8b05b0f943bf4d647 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/if_must.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/if_must.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_IF_MUST_HPP @@ -33,7 +33,7 @@ namespace TAO_PEGTL_NAMESPACE::internal [[nodiscard]] static bool match( Input& in, States&&... st ) { if( Control< Cond >::template match< A, M, Action, Control >( in, st... ) ) { - (void)( Control< must< Rules > >::template match< A, M, Action, Control >( in, st... ) && ... ); + (void)Control< must< Rules... > >::template match< A, M, Action, Control >( in, st... ); return true; } return Default; diff --git a/packages/PEGTL/include/tao/pegtl/internal/if_must_else.hpp b/packages/PEGTL/include/tao/pegtl/internal/if_must_else.hpp index 932ed2ac1172587c688d16ac1df2cb856f83ac71..ab68991b7945418f80e07cc39e924ef77dd6cf2b 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/if_must_else.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/if_must_else.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_IF_MUST_ELSE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/if_then_else.hpp b/packages/PEGTL/include/tao/pegtl/internal/if_then_else.hpp index 88a8893116af9255e93e0b22beb6e75e92f1bb3d..114300ef20038246121cfb6c5e869c2326a5e1b6 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/if_then_else.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/if_then_else.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_IF_THEN_ELSE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/input_pair.hpp b/packages/PEGTL/include/tao/pegtl/internal/input_pair.hpp index 976e3eb53983297e654adaef3bf193d98123d2f0..78dde050a7063af0cc6f95b3f95c31056d72b2f9 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/input_pair.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/input_pair.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_INPUT_PAIR_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/istream_reader.hpp b/packages/PEGTL/include/tao/pegtl/internal/istream_reader.hpp index b928a48a1758e6db355ba5f772fa21f179b71acf..6d6016464fa5d7282d86c9dfadd4772a61d6d388 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/istream_reader.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/istream_reader.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_ISTREAM_READER_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/istring.hpp b/packages/PEGTL/include/tao/pegtl/internal/istring.hpp index 3f289a9da4f3c751df0a5b1d22943abd29135c70..e615fb1680b79611d90b1414f5e6cae6fd7dae42 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/istring.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/istring.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_ISTRING_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/iterator.hpp b/packages/PEGTL/include/tao/pegtl/internal/iterator.hpp index cf8f319ad88a6e6c87a85022b3c524bb6bf4b20d..c598f2146980948b3e96e35112d37ab768e7ee9f 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/iterator.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/iterator.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_ITERATOR_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/lf_crlf_eol.hpp b/packages/PEGTL/include/tao/pegtl/internal/lf_crlf_eol.hpp index d510f9c2f00f1de22d23bea35beb7d64a30f9a40..42b138d155984d43d73a0accf70ee02d56756488 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/lf_crlf_eol.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/lf_crlf_eol.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_LF_CRLF_EOL_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/lf_eol.hpp b/packages/PEGTL/include/tao/pegtl/internal/lf_eol.hpp index 439ba51d01aedc88a409d7a5837a5a493ddce42c..38ecc785c045c05b17c17a457d04f018375cab3a 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/lf_eol.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/lf_eol.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_LF_EOL_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/list.hpp b/packages/PEGTL/include/tao/pegtl/internal/list.hpp index 83d87de1f25c7e22f88aa66169f3db2c67ff5f74..7a69d4c78ee0889628868f6f80db53e298d62b38 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/list.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/list.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_LIST_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/list_must.hpp b/packages/PEGTL/include/tao/pegtl/internal/list_must.hpp index 2c5a617cc04773b9616594383eee68715864f5cf..545ef6c19e046074f93bd8969a78a83b2351ef76 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/list_must.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/list_must.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_LIST_MUST_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/list_tail.hpp b/packages/PEGTL/include/tao/pegtl/internal/list_tail.hpp index 26b16c395197db06e2d391d8b4bf10a956061cfd..c620d0ff51a89d351400fbc56bd1911d2e6b82b4 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/list_tail.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/list_tail.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_LIST_TAIL_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/list_tail_pad.hpp b/packages/PEGTL/include/tao/pegtl/internal/list_tail_pad.hpp index 28f2f4394ad03173044ca9ed71f398cbb5416c63..fb6113d7f50a7ca2176e98c3e98ea5d9245a82d6 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/list_tail_pad.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/list_tail_pad.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_LIST_TAIL_PAD_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/marker.hpp b/packages/PEGTL/include/tao/pegtl/internal/marker.hpp index 2834be3723659038a57cc552b2bb06dd2982ec36..bbecc7b33f31ab0ecea76e190e6b8cd5b1ff852f 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/marker.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/marker.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_MARKER_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/missing_apply.hpp b/packages/PEGTL/include/tao/pegtl/internal/missing_apply.hpp index c4e33d16e6a5501ce269ded84d3344159f99c027..349042135fd3631e0f4a79c03bd85e16c76a6cd6 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/missing_apply.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/missing_apply.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_MISSING_APPLY_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/missing_apply0.hpp b/packages/PEGTL/include/tao/pegtl/internal/missing_apply0.hpp index db58f5d6f8a738c2c839c3e1e2478390cb9b934b..3ad5a42d9a908ffc9e847699300c7669c994e060 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/missing_apply0.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/missing_apply0.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_MISSING_APPLY0_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/must.hpp b/packages/PEGTL/include/tao/pegtl/internal/must.hpp index f4e0902160e50a21b41da00b8f8f933352e43c83..e0f015c011da37ba7824552a6559690e75774bd7 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/must.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/must.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_MUST_HPP @@ -7,6 +7,7 @@ #include "../config.hpp" #include "raise.hpp" +#include "seq.hpp" #include "skip_control.hpp" #include "../apply_mode.hpp" @@ -21,22 +22,8 @@ namespace TAO_PEGTL_NAMESPACE::internal template< typename... Rules > struct must - { - using analyze_t = analysis::generic< analysis::rule_type::seq, Rules... >; - - template< apply_mode A, - rewind_mode M, - template< typename... > - class Action, - template< typename... > - class Control, - typename Input, - typename... States > - [[nodiscard]] static bool match( Input& in, States&&... st ) - { - return ( Control< must< Rules > >::template match< A, M, Action, Control >( in, st... ) && ... ); - } - }; + : seq< must< Rules >... > + {}; // While in theory the implementation for a single rule could // be simplified to must< Rule > = sor< Rule, raise< Rule > >, this diff --git a/packages/PEGTL/include/tao/pegtl/internal/not_at.hpp b/packages/PEGTL/include/tao/pegtl/internal/not_at.hpp index 0ab7fcf848d3d282db0e9ced3c88d10fac23b198..774a2eaccf23d08f059671f0ace1dc6509b3ca7a 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/not_at.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/not_at.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_NOT_AT_HPP @@ -6,6 +6,7 @@ #include "../config.hpp" +#include "seq.hpp" #include "skip_control.hpp" #include "trivial.hpp" @@ -17,18 +18,19 @@ namespace TAO_PEGTL_NAMESPACE::internal { template< typename... Rules > - struct not_at; + struct not_at + : not_at< seq< Rules... > > + {}; template<> struct not_at<> : trivial< false > - { - }; + {}; - template< typename... Rules > - struct not_at + template< typename Rule > + struct not_at< Rule > { - using analyze_t = analysis::generic< analysis::rule_type::opt, Rules... >; + using analyze_t = analysis::generic< analysis::rule_type::opt, Rule >; template< apply_mode, rewind_mode, @@ -41,7 +43,7 @@ namespace TAO_PEGTL_NAMESPACE::internal [[nodiscard]] static bool match( Input& in, States&&... st ) { const auto m = in.template mark< rewind_mode::required >(); - return !( Control< Rules >::template match< apply_mode::nothing, rewind_mode::active, Action, Control >( in, st... ) && ... ); + return !Control< Rule >::template match< apply_mode::nothing, rewind_mode::active, Action, Control >( in, st... ); } }; diff --git a/packages/PEGTL/include/tao/pegtl/internal/one.hpp b/packages/PEGTL/include/tao/pegtl/internal/one.hpp index 1524b1b4ade9ccf3775939627d3773a6590a077c..b8918f1fd270b9fb27fe832e2576ba901bf2ca3f 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/one.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/one.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_ONE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/opt.hpp b/packages/PEGTL/include/tao/pegtl/internal/opt.hpp index df6da2d222c3c20540c262f9b9a8c3fdecab5dae..1c3f48fea8333383c26e4e068c8533628ebf53b9 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/opt.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/opt.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_OPT_HPP @@ -8,7 +8,6 @@ #include "../config.hpp" -#include "duseltronik.hpp" #include "seq.hpp" #include "skip_control.hpp" #include "trivial.hpp" @@ -21,18 +20,19 @@ namespace TAO_PEGTL_NAMESPACE::internal { template< typename... Rules > - struct opt; + struct opt + : opt< seq< Rules... > > + {}; template<> struct opt<> : trivial< true > - { - }; + {}; - template< typename... Rules > - struct opt + template< typename Rule > + struct opt< Rule > { - using analyze_t = analysis::generic< analysis::rule_type::opt, Rules... >; + using analyze_t = analysis::generic< analysis::rule_type::opt, Rule >; template< apply_mode A, rewind_mode, @@ -44,7 +44,7 @@ namespace TAO_PEGTL_NAMESPACE::internal typename... States > [[nodiscard]] static bool match( Input& in, States&&... st ) { - (void)duseltronik< seq< Rules... >, A, rewind_mode::required, Action, Control >::match( in, st... ); + (void)Control< Rule >::template match< A, rewind_mode::required, Action, Control >( in, st... ); return true; } }; diff --git a/packages/PEGTL/include/tao/pegtl/internal/pad.hpp b/packages/PEGTL/include/tao/pegtl/internal/pad.hpp index db23e38a4565e228d7986a5a77bccc814be23991..c84f74135afb1d3334e1e41bf54101d27cb300a1 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/pad.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/pad.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_PAD_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/pad_opt.hpp b/packages/PEGTL/include/tao/pegtl/internal/pad_opt.hpp index 2a14a535490b6fbe054fcae8a138cdda7ecc285d..aa965c4c26ce6cb131b7c7c69064488c79b20122 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/pad_opt.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/pad_opt.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_PAD_OPT_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/peek_char.hpp b/packages/PEGTL/include/tao/pegtl/internal/peek_char.hpp index 8383698d4f5b51fe852e157d74e9b00242052462..db4655e562468389caafafff1fb364b36dac492f 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/peek_char.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/peek_char.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_PEEK_CHAR_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/peek_mask_uint.hpp b/packages/PEGTL/include/tao/pegtl/internal/peek_mask_uint.hpp index d99addf78af14bc51f5477a87a512f123a9464f0..ca0b93d5f2f00ac772c99185c974ff21c60fe630 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/peek_mask_uint.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/peek_mask_uint.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_PEEK_MASK_UINT_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/peek_mask_uint8.hpp b/packages/PEGTL/include/tao/pegtl/internal/peek_mask_uint8.hpp index ef50097e4958fcfcc88e3e4477c8843f430abca6..3c6550dbb1622c342209e21bd594f426db0515be 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/peek_mask_uint8.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/peek_mask_uint8.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_PEEK_MASK_UINT8_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/peek_uint.hpp b/packages/PEGTL/include/tao/pegtl/internal/peek_uint.hpp index 83b3eaad538b4d2bca7f10decba9266d0e51d3f4..608318effa1f93a238c889826494f14dbe234b7f 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/peek_uint.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/peek_uint.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_PEEK_UINT_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/peek_uint8.hpp b/packages/PEGTL/include/tao/pegtl/internal/peek_uint8.hpp index d5f78af62e99004f6333444902f2c0c837d8b0f9..8361e1c8d5ac97501642db291c81f9451d61ea85 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/peek_uint8.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/peek_uint8.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_PEEK_UINT8_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/peek_utf16.hpp b/packages/PEGTL/include/tao/pegtl/internal/peek_utf16.hpp index 4552c64f622b48671a187ed27768c9fa3e89f0d5..495b6219aa3adbce830f34e3ea4057aabd669f85 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/peek_utf16.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/peek_utf16.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_PEEK_UTF16_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/peek_utf32.hpp b/packages/PEGTL/include/tao/pegtl/internal/peek_utf32.hpp index c8da55dc0084b3aa1754d4506b1f4c8548dd1638..4e5f60c7face47eecacb916e05cf22a694c6c44d 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/peek_utf32.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/peek_utf32.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_PEEK_UTF32_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/peek_utf8.hpp b/packages/PEGTL/include/tao/pegtl/internal/peek_utf8.hpp index aa8a617b7b78d31707f17ea7314d90d58b6d08d4..3df1b373d73e6f9c8217b5a4d0feef9d9990e078 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/peek_utf8.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/peek_utf8.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_PEEK_UTF8_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/pegtl_string.hpp b/packages/PEGTL/include/tao/pegtl/internal/pegtl_string.hpp index babbc2c59ec21213224837cd3c862386a4bf1c48..6440e97c94618333bf2e211bdc960d71de8d1cad 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/pegtl_string.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/pegtl_string.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2015-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_PEGTL_STRING_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/plus.hpp b/packages/PEGTL/include/tao/pegtl/internal/plus.hpp index 815d2beab2a7aab73180a68c7ec44b0d0bda14e1..1570d80cafc759bb18cb634a2644806ecf24939d 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/plus.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/plus.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_PLUS_HPP @@ -8,7 +8,6 @@ #include "../config.hpp" -#include "duseltronik.hpp" #include "opt.hpp" #include "seq.hpp" #include "skip_control.hpp" @@ -28,8 +27,13 @@ namespace TAO_PEGTL_NAMESPACE::internal template< typename Rule, typename... Rules > struct plus + : plus< seq< Rule, Rules... > > + {}; + + template< typename Rule > + struct plus< Rule > { - using analyze_t = analysis::generic< analysis::rule_type::seq, Rule, Rules..., opt< plus > >; + using analyze_t = analysis::generic< analysis::rule_type::seq, Rule, opt< plus > >; template< apply_mode A, rewind_mode M, @@ -41,7 +45,7 @@ namespace TAO_PEGTL_NAMESPACE::internal typename... States > [[nodiscard]] static bool match( Input& in, States&&... st ) { - return seq< Rule, Rules... >::template match< A, M, Action, Control >( in, st... ) && star< Rule, Rules... >::template match< A, M, Action, Control >( in, st... ); + return Control< Rule >::template match< A, M, Action, Control >( in, st... ) && Control< star< Rule > >::template match< A, M, Action, Control >( in, st... ); } }; diff --git a/packages/PEGTL/include/tao/pegtl/internal/raise.hpp b/packages/PEGTL/include/tao/pegtl/internal/raise.hpp index fee7166fb48d689c13bdb7a6f922d797dd2395f7..cd1528e7c3451b0c04aedf8f96d27917b61ba42d 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/raise.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/raise.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_RAISE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/range.hpp b/packages/PEGTL/include/tao/pegtl/internal/range.hpp index 2780377bbedf83a91128d6ac3cd2aa43c90f3b4b..9720fa900ecc576041a317a7afb6c2767f82e898 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/range.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/range.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_RANGE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/ranges.hpp b/packages/PEGTL/include/tao/pegtl/internal/ranges.hpp index f815aceb6b24d4ac979ed02c47f938c603b020ee..84527442315007973432a860c7489151a0ac2282 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/ranges.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/ranges.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_RANGES_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/read_uint.hpp b/packages/PEGTL/include/tao/pegtl/internal/read_uint.hpp index 96fbcc73da4973c48c1091cc48e98ca44eaeea64..a851d6a0c4435b1ae0f03914534d8d0150c04b93 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/read_uint.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/read_uint.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_READ_UINT_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/rematch.hpp b/packages/PEGTL/include/tao/pegtl/internal/rematch.hpp index 5d713266bc0747151e2999b9509ea3b103c47bfd..c6897f457bd224079cd57cc422064171937c342e 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/rematch.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/rematch.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_REMATCH_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/rep.hpp b/packages/PEGTL/include/tao/pegtl/internal/rep.hpp index 782929da70ff9c4830214ff64a510e6536e450eb..199f46ee0eaa83eb8bbcf3f34c37256a22fbc195 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/rep.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/rep.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_REP_HPP @@ -6,6 +6,7 @@ #include "../config.hpp" +#include "seq.hpp" #include "skip_control.hpp" #include "trivial.hpp" @@ -17,24 +18,24 @@ namespace TAO_PEGTL_NAMESPACE::internal { template< unsigned Num, typename... Rules > - struct rep; + struct rep + : rep< Num, seq< Rules... > > + {}; template< unsigned Num > struct rep< Num > : trivial< true > - { - }; + {}; - template< typename Rule, typename... Rules > - struct rep< 0, Rule, Rules... > + template< typename Rule > + struct rep< 0, Rule > : trivial< true > - { - }; + {}; - template< unsigned Num, typename... Rules > - struct rep + template< unsigned Num, typename Rule > + struct rep< Num, Rule > { - using analyze_t = analysis::counted< analysis::rule_type::seq, Num, Rules... >; + using analyze_t = analysis::counted< analysis::rule_type::seq, Num, Rule >; template< apply_mode A, rewind_mode M, @@ -50,7 +51,7 @@ namespace TAO_PEGTL_NAMESPACE::internal using m_t = decltype( m ); for( unsigned i = 0; i != Num; ++i ) { - if( !( Control< Rules >::template match< A, m_t::next_rewind_mode, Action, Control >( in, st... ) && ... ) ) { + if( !Control< Rule >::template match< A, m_t::next_rewind_mode, Action, Control >( in, st... ) ) { return false; } } diff --git a/packages/PEGTL/include/tao/pegtl/internal/rep_min.hpp b/packages/PEGTL/include/tao/pegtl/internal/rep_min.hpp index fe6f6a772822e4f575c276c642c0448c65204945..ecf9bc014432bf927cee11f8a2d58d73c73e2bac 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/rep_min.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/rep_min.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_REP_MIN_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/rep_min_max.hpp b/packages/PEGTL/include/tao/pegtl/internal/rep_min_max.hpp index 6264dd17510bb375e9a309bc6a976fd6bc282d79..a82dc83ff601a001d5f5b28f62ee271e327db55e 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/rep_min_max.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/rep_min_max.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_REP_MIN_MAX_HPP @@ -8,7 +8,6 @@ #include "../config.hpp" -#include "duseltronik.hpp" #include "not_at.hpp" #include "seq.hpp" #include "skip_control.hpp" @@ -22,7 +21,9 @@ namespace TAO_PEGTL_NAMESPACE::internal { template< unsigned Min, unsigned Max, typename... Rules > - struct rep_min_max; + struct rep_min_max + : rep_min_max< Min, Max, seq< Rules... > > + {}; template< unsigned Min, unsigned Max > struct rep_min_max< Min, Max > @@ -31,16 +32,15 @@ namespace TAO_PEGTL_NAMESPACE::internal static_assert( Min <= Max ); }; - template< typename Rule, typename... Rules > - struct rep_min_max< 0, 0, Rule, Rules... > - : not_at< Rule, Rules... > - { - }; + template< typename Rule > + struct rep_min_max< 0, 0, Rule > + : not_at< Rule > + {}; - template< unsigned Min, unsigned Max, typename... Rules > - struct rep_min_max + template< unsigned Min, unsigned Max, typename Rule > + struct rep_min_max< Min, Max, Rule > { - using analyze_t = analysis::counted< analysis::rule_type::seq, Min, Rules... >; + using analyze_t = analysis::counted< analysis::rule_type::seq, Min, Rule >; static_assert( Min <= Max ); @@ -58,16 +58,16 @@ namespace TAO_PEGTL_NAMESPACE::internal using m_t = decltype( m ); for( unsigned i = 0; i != Min; ++i ) { - if( !( Control< Rules >::template match< A, m_t::next_rewind_mode, Action, Control >( in, st... ) && ... ) ) { + if( !Control< Rule >::template match< A, m_t::next_rewind_mode, Action, Control >( in, st... ) ) { return false; } } for( unsigned i = Min; i != Max; ++i ) { - if( !duseltronik< seq< Rules... >, A, rewind_mode::required, Action, Control >::match( in, st... ) ) { + if( !Control< Rule >::template match< A, rewind_mode::required, Action, Control >( in, st... ) ) { return m( true ); } } - return m( duseltronik< not_at< Rules... >, A, m_t::next_rewind_mode, Action, Control >::match( in, st... ) ); // NOTE that not_at<> will always rewind. + return m( Control< not_at< Rule > >::template match< A, m_t::next_rewind_mode, Action, Control >( in, st... ) ); // NOTE that not_at<> will always rewind. } }; diff --git a/packages/PEGTL/include/tao/pegtl/internal/rep_opt.hpp b/packages/PEGTL/include/tao/pegtl/internal/rep_opt.hpp index 4df310d24e9aee4b29dc54291c98359b989d9fd2..dd2d63413d57604c86205844320a1d2e9d92b392 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/rep_opt.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/rep_opt.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_REP_OPT_HPP @@ -6,7 +6,6 @@ #include "../config.hpp" -#include "duseltronik.hpp" #include "seq.hpp" #include "skip_control.hpp" @@ -19,8 +18,13 @@ namespace TAO_PEGTL_NAMESPACE::internal { template< unsigned Max, typename... Rules > struct rep_opt + : rep_opt< Max, seq< Rules... > > + {}; + + template< unsigned Max, typename Rule > + struct rep_opt< Max, Rule > { - using analyze_t = analysis::generic< analysis::rule_type::opt, Rules... >; + using analyze_t = analysis::generic< analysis::rule_type::opt, Rule >; template< apply_mode A, rewind_mode, @@ -32,7 +36,7 @@ namespace TAO_PEGTL_NAMESPACE::internal typename... States > [[nodiscard]] static bool match( Input& in, States&&... st ) { - for( unsigned i = 0; ( i != Max ) && duseltronik< seq< Rules... >, A, rewind_mode::required, Action, Control >::match( in, st... ); ++i ) { + for( unsigned i = 0; ( i != Max ) && Control< Rule >::template match< A, rewind_mode::required, Action, Control >( in, st... ); ++i ) { } return true; } diff --git a/packages/PEGTL/include/tao/pegtl/internal/require.hpp b/packages/PEGTL/include/tao/pegtl/internal/require.hpp index b746feff062a1f8310901ccd96ed729e057ed77e..7ed38f59b51673db4fead1d019e9b799f4027193 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/require.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/require.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_REQUIRE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/result_on_found.hpp b/packages/PEGTL/include/tao/pegtl/internal/result_on_found.hpp index e2ed0a63b95349d9a51f228196790e098566052d..492ec212d2fce3a8b0adfe258494d32d2edfa9c6 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/result_on_found.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/result_on_found.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_RESULT_ON_FOUND_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/rules.hpp b/packages/PEGTL/include/tao/pegtl/internal/rules.hpp index 613c4eacd8f2b1258ad88a243991077cc2c7674e..fc56a6e8590fb3577ee7ce448f3c22bc58ac08c6 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/rules.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/rules.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_RULES_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/seq.hpp b/packages/PEGTL/include/tao/pegtl/internal/seq.hpp index eccf791e7765b1be6772a1d05241d607a49342a2..65ee88afd878db685b2ffa8808c213b0e32920e1 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/seq.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/seq.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_SEQ_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/skip_control.hpp b/packages/PEGTL/include/tao/pegtl/internal/skip_control.hpp index a3b7704632fe48e4ac6ef5ba4a28cbb69ac31af2..d2a37ad624df63a9be00ede1158c523b0bd66148 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/skip_control.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/skip_control.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_SKIP_CONTROL_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/sor.hpp b/packages/PEGTL/include/tao/pegtl/internal/sor.hpp index b43a9652775878193dbf4e39f849ac93df5b1bd4..8100d5dce87ae81efda53c389eead7a4b9dc4c04 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/sor.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/sor.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_SOR_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/star.hpp b/packages/PEGTL/include/tao/pegtl/internal/star.hpp index e785fa73f12c8ef450caf27d685b07bd51965e7a..dfa425b250ce62b533f712a568339a72f15ab586 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/star.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/star.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_STAR_HPP @@ -20,8 +20,13 @@ namespace TAO_PEGTL_NAMESPACE::internal { template< typename Rule, typename... Rules > struct star + : star< seq< Rule, Rules... > > + {}; + + template< typename Rule > + struct star< Rule > { - using analyze_t = analysis::generic< analysis::rule_type::opt, Rule, Rules..., star >; + using analyze_t = analysis::generic< analysis::rule_type::opt, Rule, star >; template< apply_mode A, rewind_mode, @@ -33,7 +38,7 @@ namespace TAO_PEGTL_NAMESPACE::internal typename... States > [[nodiscard]] static bool match( Input& in, States&&... st ) { - while( seq< Rule, Rules... >::template match< A, rewind_mode::required, Action, Control >( in, st... ) ) { + while( Control< Rule >::template match< A, rewind_mode::required, Action, Control >( in, st... ) ) { } return true; } diff --git a/packages/PEGTL/include/tao/pegtl/internal/star_must.hpp b/packages/PEGTL/include/tao/pegtl/internal/star_must.hpp index 9852828f4fa07e37b58780749552889787dccfdb..3d276137b5c5e645001ef45f6b48fbfaef0bdf2d 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/star_must.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/star_must.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_STAR_MUST_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/state.hpp b/packages/PEGTL/include/tao/pegtl/internal/state.hpp index 76c0f6f4f20bb9fb1858bfe92a869db1f258e90f..08f6c07b25a41e88b0ef37bad633d7ce35100250 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/state.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/state.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_STATE_HPP @@ -6,7 +6,6 @@ #include "../config.hpp" -#include "duseltronik.hpp" #include "seq.hpp" #include "skip_control.hpp" @@ -19,8 +18,13 @@ namespace TAO_PEGTL_NAMESPACE::internal { template< typename State, typename... Rules > struct state + : state< State, seq< Rules... > > + {}; + + template< typename State, typename Rule > + struct state< State, Rule > { - using analyze_t = analysis::generic< analysis::rule_type::seq, Rules... >; + using analyze_t = analysis::generic< analysis::rule_type::seq, Rule >; template< apply_mode A, rewind_mode M, @@ -33,7 +37,7 @@ namespace TAO_PEGTL_NAMESPACE::internal [[nodiscard]] static bool match( Input& in, States&&... st ) { State s( static_cast< const Input& >( in ), st... ); - if( duseltronik< seq< Rules... >, A, M, Action, Control >::match( in, s ) ) { + if( Control< Rule >::template match< A, M, Action, Control >( in, s ) ) { s.success( static_cast< const Input& >( in ), st... ); return true; } diff --git a/packages/PEGTL/include/tao/pegtl/internal/string.hpp b/packages/PEGTL/include/tao/pegtl/internal/string.hpp index 9ff22d05415b3197132be26d5e9b024f94a2e9f9..142d33a1451e3ee416040162ae39384f16734b6a 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/string.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/string.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_STRING_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/trivial.hpp b/packages/PEGTL/include/tao/pegtl/internal/trivial.hpp index 0fa6bb017d1900e2c2e1a7fd1728ae0c9827d329..9d66cd82283bff7638790411f663ac6312009502 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/trivial.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/trivial.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_TRIVIAL_HPP diff --git a/packages/PEGTL/include/tao/pegtl/internal/try_catch_type.hpp b/packages/PEGTL/include/tao/pegtl/internal/try_catch_type.hpp index eca0db6917adf1123bb08b7bfad13bacd92b9465..fdd74b6dbb1802b8d54b5251b2e7d6b69ff11850 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/try_catch_type.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/try_catch_type.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_TRY_CATCH_TYPE_HPP @@ -8,7 +8,6 @@ #include "../config.hpp" -#include "duseltronik.hpp" #include "seq.hpp" #include "skip_control.hpp" #include "trivial.hpp" @@ -21,18 +20,19 @@ namespace TAO_PEGTL_NAMESPACE::internal { template< typename Exception, typename... Rules > - struct try_catch_type; + struct try_catch_type + : try_catch_type< Exception, seq< Rules... > > + {}; template< typename Exception > struct try_catch_type< Exception > : trivial< true > - { - }; + {}; - template< typename Exception, typename... Rules > - struct try_catch_type + template< typename Exception, typename Rule > + struct try_catch_type< Exception, Rule > { - using analyze_t = analysis::generic< analysis::rule_type::seq, Rules... >; + using analyze_t = analysis::generic< analysis::rule_type::seq, Rule >; template< apply_mode A, rewind_mode M, @@ -48,7 +48,7 @@ namespace TAO_PEGTL_NAMESPACE::internal using m_t = decltype( m ); try { - return m( duseltronik< seq< Rules... >, A, m_t::next_rewind_mode, Action, Control >::match( in, st... ) ); + return m( Control< Rule >::template match< A, m_t::next_rewind_mode, Action, Control >( in, st... ) ); } catch( const Exception& ) { return false; diff --git a/packages/PEGTL/include/tao/pegtl/internal/until.hpp b/packages/PEGTL/include/tao/pegtl/internal/until.hpp index c48b6dd32ec6a1c6439cd13afcc7b43895f245ef..9042a942e5db22d799fb3d53ca8a40f97b62cfa1 100644 --- a/packages/PEGTL/include/tao/pegtl/internal/until.hpp +++ b/packages/PEGTL/include/tao/pegtl/internal/until.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_UNTIL_HPP @@ -9,6 +9,7 @@ #include "bytes.hpp" #include "eof.hpp" #include "not_at.hpp" +#include "seq.hpp" #include "skip_control.hpp" #include "star.hpp" @@ -20,7 +21,9 @@ namespace TAO_PEGTL_NAMESPACE::internal { template< typename Cond, typename... Rules > - struct until; + struct until + : until< Cond, seq< Rules... > > + {}; template< typename Cond > struct until< Cond > @@ -49,10 +52,10 @@ namespace TAO_PEGTL_NAMESPACE::internal } }; - template< typename Cond, typename... Rules > - struct until + template< typename Cond, typename Rule > + struct until< Cond, Rule > { - using analyze_t = analysis::generic< analysis::rule_type::seq, star< not_at< Cond >, not_at< eof >, Rules... >, Cond >; + using analyze_t = analysis::generic< analysis::rule_type::seq, star< not_at< Cond >, not_at< eof >, Rule >, Cond >; template< apply_mode A, rewind_mode M, @@ -68,7 +71,7 @@ namespace TAO_PEGTL_NAMESPACE::internal using m_t = decltype( m ); while( !Control< Cond >::template match< A, rewind_mode::required, Action, Control >( in, st... ) ) { - if( !( Control< Rules >::template match< A, m_t::next_rewind_mode, Action, Control >( in, st... ) && ... ) ) { + if( !Control< Rule >::template match< A, m_t::next_rewind_mode, Action, Control >( in, st... ) ) { return false; } } diff --git a/packages/PEGTL/include/tao/pegtl/istream_input.hpp b/packages/PEGTL/include/tao/pegtl/istream_input.hpp index 975fe0264474a5d48fbddcf6269b6116e22ccad4..44e89f1addb9393cbdfbcde7203127e5192ccbde 100644 --- a/packages/PEGTL/include/tao/pegtl/istream_input.hpp +++ b/packages/PEGTL/include/tao/pegtl/istream_input.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_ISTREAM_INPUT_HPP diff --git a/packages/PEGTL/include/tao/pegtl/match.hpp b/packages/PEGTL/include/tao/pegtl/match.hpp index 74058f9979eda58d5a0ad2d6c8bd23e75c892413..f74ba057396c1551111e8a16ce3d85cb6c322192 100644 --- a/packages/PEGTL/include/tao/pegtl/match.hpp +++ b/packages/PEGTL/include/tao/pegtl/match.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_MATCH_HPP diff --git a/packages/PEGTL/include/tao/pegtl/memory_input.hpp b/packages/PEGTL/include/tao/pegtl/memory_input.hpp index 71f700535be6f78a411d8b9aa80e72e9dcb676a6..5f074c3cb6de5e81ee53ba1529bbad6e1dabeb23 100644 --- a/packages/PEGTL/include/tao/pegtl/memory_input.hpp +++ b/packages/PEGTL/include/tao/pegtl/memory_input.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_MEMORY_INPUT_HPP @@ -369,7 +369,7 @@ namespace TAO_PEGTL_NAMESPACE [[nodiscard]] std::string_view line_at( const TAO_PEGTL_NAMESPACE::position& p ) const noexcept { const char* b = begin_of_line( p ); - return std::string_view( b, end_of_line( p ) - b ); + return std::string_view( b, static_cast< std::size_t >( end_of_line( p ) - b ) ); } }; diff --git a/packages/PEGTL/include/tao/pegtl/mmap_input.hpp b/packages/PEGTL/include/tao/pegtl/mmap_input.hpp index 1b9d067d2b65884bf1f515d328fd781160778745..b4fd410317885b53590570f6f5fc276b54720010 100644 --- a/packages/PEGTL/include/tao/pegtl/mmap_input.hpp +++ b/packages/PEGTL/include/tao/pegtl/mmap_input.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_MMAP_INPUT_HPP diff --git a/packages/PEGTL/include/tao/pegtl/normal.hpp b/packages/PEGTL/include/tao/pegtl/normal.hpp index 67122bede14954d856783a37f057cf5a5c114d1d..02e67c12b5225b2d74a3b4c1b4c9901507c25433 100644 --- a/packages/PEGTL/include/tao/pegtl/normal.hpp +++ b/packages/PEGTL/include/tao/pegtl/normal.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_NORMAL_HPP @@ -19,6 +19,9 @@ namespace TAO_PEGTL_NAMESPACE { + template< typename Rule > + constexpr const char* error_message = nullptr; + template< typename Rule > struct normal { @@ -33,8 +36,16 @@ namespace TAO_PEGTL_NAMESPACE } template< typename Input, typename... States > - static void failure( const Input& /*unused*/, States&&... /*unused*/ ) noexcept + static void failure( const Input& in, States&&... /*unused*/ ) noexcept( error_message< Rule > == nullptr ) { + if constexpr( error_message< Rule > != nullptr ) { + throw parse_error( error_message< Rule >, in ); + } +#if defined( _MSC_VER ) + else { + (void)in; + } +#endif } template< typename Input, typename... States > @@ -73,11 +84,12 @@ namespace TAO_PEGTL_NAMESPACE typename... States > [[nodiscard]] static bool match( Input& in, States&&... st ) { - if constexpr( internal::has_match_v< Rule, A, M, Action, Control, Input, States... > ) { - return Action< Rule >::template match< Rule, A, M, Action, Control >( in, st... ); + constexpr rewind_mode m = ( error_message< Rule > == nullptr ) ? M : rewind_mode::dontcare; + if constexpr( internal::has_match_v< Rule, A, m, Action, Control, Input, States... > ) { + return Action< Rule >::template match< Rule, A, m, Action, Control >( in, st... ); } else { - return TAO_PEGTL_NAMESPACE::match< Rule, A, M, Action, Control >( in, st... ); + return TAO_PEGTL_NAMESPACE::match< Rule, A, m, Action, Control >( in, st... ); } } }; diff --git a/packages/PEGTL/include/tao/pegtl/nothing.hpp b/packages/PEGTL/include/tao/pegtl/nothing.hpp index 20c23c2b9e1459be88e8a599140ee2a02d466818..d3cbc1e8787a6b97c0dfbdb45a963b8bd160ea07 100644 --- a/packages/PEGTL/include/tao/pegtl/nothing.hpp +++ b/packages/PEGTL/include/tao/pegtl/nothing.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_NOTHING_HPP diff --git a/packages/PEGTL/include/tao/pegtl/parse.hpp b/packages/PEGTL/include/tao/pegtl/parse.hpp index d566eaeccfc3e602b6f22d2f5ff00fab8189878c..2cc622dac0034919cc317bbe378c341a67342ab9 100644 --- a/packages/PEGTL/include/tao/pegtl/parse.hpp +++ b/packages/PEGTL/include/tao/pegtl/parse.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_PARSE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/parse_error.hpp b/packages/PEGTL/include/tao/pegtl/parse_error.hpp index 821316b62b77f69a3b174fca9769af87d1b4b3e9..89e70b58609d96b26b447813dac450a874ee3ef1 100644 --- a/packages/PEGTL/include/tao/pegtl/parse_error.hpp +++ b/packages/PEGTL/include/tao/pegtl/parse_error.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_PARSE_ERROR_HPP diff --git a/packages/PEGTL/include/tao/pegtl/position.hpp b/packages/PEGTL/include/tao/pegtl/position.hpp index a056909ba01300e601d2f903f9b07aa1919dc514..0b5af256578cc223b49f182d9b57e35928034133 100644 --- a/packages/PEGTL/include/tao/pegtl/position.hpp +++ b/packages/PEGTL/include/tao/pegtl/position.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_POSITION_HPP diff --git a/packages/PEGTL/include/tao/pegtl/read_input.hpp b/packages/PEGTL/include/tao/pegtl/read_input.hpp index 72be702fdceb4fd41e8049e9994f272372f51210..ba2031060f36bc7149dd098c4d3717f383da7e65 100644 --- a/packages/PEGTL/include/tao/pegtl/read_input.hpp +++ b/packages/PEGTL/include/tao/pegtl/read_input.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_READ_INPUT_HPP diff --git a/packages/PEGTL/include/tao/pegtl/require_apply.hpp b/packages/PEGTL/include/tao/pegtl/require_apply.hpp index 66d46715dc6c82d25d769318f24a279a31a58e67..0bc78fe660852ed09a96ff819c2071e2188722ac 100644 --- a/packages/PEGTL/include/tao/pegtl/require_apply.hpp +++ b/packages/PEGTL/include/tao/pegtl/require_apply.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_REQUIRE_APPLY_HPP diff --git a/packages/PEGTL/include/tao/pegtl/require_apply0.hpp b/packages/PEGTL/include/tao/pegtl/require_apply0.hpp index af95110b3f8b68c29c4fe78c4f2112d7168dc022..1487ae08cb8abed12d6d49621965df14d9ba15d7 100644 --- a/packages/PEGTL/include/tao/pegtl/require_apply0.hpp +++ b/packages/PEGTL/include/tao/pegtl/require_apply0.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_REQUIRE_APPLY0_HPP diff --git a/packages/PEGTL/include/tao/pegtl/rewind_mode.hpp b/packages/PEGTL/include/tao/pegtl/rewind_mode.hpp index 0d9ad32c0edf7f8f75eace944590cce630ef55f3..dfd21c70ac252ffaff14f0756c298e38f17ffc20 100644 --- a/packages/PEGTL/include/tao/pegtl/rewind_mode.hpp +++ b/packages/PEGTL/include/tao/pegtl/rewind_mode.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_REWIND_MODE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/rules.hpp b/packages/PEGTL/include/tao/pegtl/rules.hpp index 7ec5b8494ea3894adb7ea9cc15221e51c7b3448b..cd7867061fbec2d6e09f7ca2dcf0660aefb9d7fb 100644 --- a/packages/PEGTL/include/tao/pegtl/rules.hpp +++ b/packages/PEGTL/include/tao/pegtl/rules.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_RULES_HPP diff --git a/packages/PEGTL/include/tao/pegtl/string_input.hpp b/packages/PEGTL/include/tao/pegtl/string_input.hpp index f1b59b1281d268b7534d9392616420dc6ed8aa42..1830585732bba3183f6c40d4a650c69642e5cf2d 100644 --- a/packages/PEGTL/include/tao/pegtl/string_input.hpp +++ b/packages/PEGTL/include/tao/pegtl/string_input.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_STRING_INPUT_HPP diff --git a/packages/PEGTL/include/tao/pegtl/tracking_mode.hpp b/packages/PEGTL/include/tao/pegtl/tracking_mode.hpp index ba58b5c07761a1a99e74c7b7244a3ad15d299bbe..d2b8ce871b18c9cb51fc6f3f548f339739c86a5d 100644 --- a/packages/PEGTL/include/tao/pegtl/tracking_mode.hpp +++ b/packages/PEGTL/include/tao/pegtl/tracking_mode.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_TRACKING_MODE_HPP diff --git a/packages/PEGTL/include/tao/pegtl/uint16.hpp b/packages/PEGTL/include/tao/pegtl/uint16.hpp index 80be64908e0dd671c55d97d3de6dc7d8f3718851..cda189d49d08f7de82172cdedb1f0abb4edce689 100644 --- a/packages/PEGTL/include/tao/pegtl/uint16.hpp +++ b/packages/PEGTL/include/tao/pegtl/uint16.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_UINT16_HPP diff --git a/packages/PEGTL/include/tao/pegtl/uint32.hpp b/packages/PEGTL/include/tao/pegtl/uint32.hpp index 60d85cf9d0983e647d257292e110c073eadeff00..ce0778299a0a0a295b4a8edbc9483b2bf6a6610c 100644 --- a/packages/PEGTL/include/tao/pegtl/uint32.hpp +++ b/packages/PEGTL/include/tao/pegtl/uint32.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_UINT32_HPP diff --git a/packages/PEGTL/include/tao/pegtl/uint64.hpp b/packages/PEGTL/include/tao/pegtl/uint64.hpp index 5507c5be7ed2af3a950016ac37e6a56b482f267b..c83182018143139b2ca7fedd4d66e9b16a786b30 100644 --- a/packages/PEGTL/include/tao/pegtl/uint64.hpp +++ b/packages/PEGTL/include/tao/pegtl/uint64.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_UINT64_HPP diff --git a/packages/PEGTL/include/tao/pegtl/uint8.hpp b/packages/PEGTL/include/tao/pegtl/uint8.hpp index 1225026568b539dae47cafde4187c6ae7164c8ab..eec09683d24a5757d2b7cf49ec31eb3bb2c07243 100644 --- a/packages/PEGTL/include/tao/pegtl/uint8.hpp +++ b/packages/PEGTL/include/tao/pegtl/uint8.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_UINT8_HPP diff --git a/packages/PEGTL/include/tao/pegtl/utf16.hpp b/packages/PEGTL/include/tao/pegtl/utf16.hpp index 60a0d4f2a95530452ac18a360463ad7e79426055..dee6e2e656b838aae54edab436801b0bfedcb846 100644 --- a/packages/PEGTL/include/tao/pegtl/utf16.hpp +++ b/packages/PEGTL/include/tao/pegtl/utf16.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2015-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_UTF16_HPP diff --git a/packages/PEGTL/include/tao/pegtl/utf32.hpp b/packages/PEGTL/include/tao/pegtl/utf32.hpp index 019b755d1d24b0d49be1342ae01666d7e61de662..1862ea625bb9260b477fefc262ba309f895a8a37 100644 --- a/packages/PEGTL/include/tao/pegtl/utf32.hpp +++ b/packages/PEGTL/include/tao/pegtl/utf32.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_UTF32_HPP diff --git a/packages/PEGTL/include/tao/pegtl/utf8.hpp b/packages/PEGTL/include/tao/pegtl/utf8.hpp index 0f3cb4aea597752d57acc955c51d370ab53b88cc..10db39b39ca022198c16e7a8decb476ebfb1cc4a 100644 --- a/packages/PEGTL/include/tao/pegtl/utf8.hpp +++ b/packages/PEGTL/include/tao/pegtl/utf8.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_UTF8_HPP diff --git a/packages/PEGTL/include/tao/pegtl/version.hpp b/packages/PEGTL/include/tao/pegtl/version.hpp index 6a11e3e0e476fbaee31a0535e23dafc780677d0b..0a78ea4d0fff7d1479895e78c9c2b6844a8c21cd 100644 --- a/packages/PEGTL/include/tao/pegtl/version.hpp +++ b/packages/PEGTL/include/tao/pegtl/version.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_VERSION_HPP diff --git a/packages/PEGTL/src/example/pegtl/abnf2pegtl.cpp b/packages/PEGTL/src/example/pegtl/abnf2pegtl.cpp index 3f55772a10e757e0e892baee4f71d6b362b37dfe..952399a8a841fadf0b7702580c1d8dd2d2cff5cb 100644 --- a/packages/PEGTL/src/example/pegtl/abnf2pegtl.cpp +++ b/packages/PEGTL/src/example/pegtl/abnf2pegtl.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <algorithm> @@ -28,655 +28,661 @@ #include <tao/pegtl/contrib/abnf.hpp> #include <tao/pegtl/contrib/parse_tree.hpp> -namespace TAO_PEGTL_NAMESPACE::abnf +namespace TAO_PEGTL_NAMESPACE { - using node_ptr = std::unique_ptr< parse_tree::node >; - - namespace + namespace abnf { - std::string prefix = "tao::pegtl::"; - - std::set< std::string > keywords = { - "alignas", - "alignof", - "and", - "and_eq", - "asm", - "auto", - "bitand", - "bitor", - "bool", - "break", - "case", - "catch", - "char", - "char16_t", - "char32_t", - "class", - "compl", - "const", - "constexpr", - "const_cast", - "continue", - "decltype", - "default", - "delete", - "do", - "double", - "dynamic_cast", - "else", - "enum", - "explicit", - "export", - "extern", - "false", - "float", - "for", - "friend", - "goto", - "if", - "inline", - "int", - "long", - "mutable", - "namespace", - "new", - "noexcept", - "not", - "not_eq", - "nullptr", - "operator", - "or", - "or_eq", - "private", - "protected", - "public", - "register", - "reinterpret_cast", - "return", - "short", - "signed", - "sizeof", - "static", - "static_assert", - "static_cast", - "struct", - "switch", - "template", - "this", - "thread_local", - "throw", - "true", - "try", - "typedef", - "typeid", - "typename", - "union", - "unsigned", - "using", - "virtual", - "void", - "volatile", - "wchar_t", - "while", - "xor", - "xor_eq" - }; - - using rules_t = std::vector< std::string >; - rules_t rules_defined; - rules_t rules; + using node_ptr = std::unique_ptr< parse_tree::node >; - // clang-format off - struct one_tag {}; - struct string_tag {}; - struct istring_tag {}; - // clang-format on - - rules_t::reverse_iterator find_rule( rules_t& r, const std::string& v, const rules_t::reverse_iterator& rbegin ) + namespace { - return std::find_if( rbegin, r.rend(), [&]( const rules_t::value_type& p ) { return TAO_PEGTL_STRCASECMP( p.c_str(), v.c_str() ) == 0; } ); - } - - rules_t::reverse_iterator find_rule( rules_t& r, const std::string& v ) - { - return find_rule( r, v, r.rbegin() ); - } + std::string prefix = "tao::pegtl::"; + + std::set< std::string > keywords = { + "alignas", + "alignof", + "and", + "and_eq", + "asm", + "auto", + "bitand", + "bitor", + "bool", + "break", + "case", + "catch", + "char", + "char_8t", + "char16_t", + "char32_t", + "class", + "compl", + "concept", + "const", + "consteval", + "constexpr", + "constinit", + "const_cast", + "continue", + "co_await", + "co_return", + "co_yield", + "decltype", + "default", + "delete", + "do", + "double", + "dynamic_cast", + "else", + "enum", + "explicit", + "export", + "extern", + "false", + "float", + "for", + "friend", + "goto", + "if", + "inline", + "int", + "long", + "mutable", + "namespace", + "new", + "noexcept", + "not", + "not_eq", + "nullptr", + "operator", + "or", + "or_eq", + "private", + "protected", + "public", + "register", + "reinterpret_cast", + "return", + "requires", + "short", + "signed", + "sizeof", + "static", + "static_assert", + "static_cast", + "struct", + "switch", + "template", + "this", + "thread_local", + "throw", + "true", + "try", + "typedef", + "typeid", + "typename", + "union", + "unsigned", + "using", + "virtual", + "void", + "volatile", + "wchar_t", + "while", + "xor", + "xor_eq" + }; + + using rules_t = std::vector< std::string >; + rules_t rules_defined; + rules_t rules; + + // clang-format off + struct one_tag {}; + struct string_tag {}; + struct istring_tag {}; + // clang-format on + + rules_t::reverse_iterator find_rule( rules_t& r, const std::string& v, const rules_t::reverse_iterator& rbegin ) + { + return std::find_if( rbegin, r.rend(), [&]( const rules_t::value_type& p ) { return TAO_PEGTL_STRCASECMP( p.c_str(), v.c_str() ) == 0; } ); + } - bool append_char( std::string& s, const char c ) - { - if( !s.empty() ) { - s += ", "; + rules_t::reverse_iterator find_rule( rules_t& r, const std::string& v ) + { + return find_rule( r, v, r.rbegin() ); } - s += '\''; - if( c == '\'' || c == '\\' ) { - s += '\\'; + + bool append_char( std::string& s, const char c ) + { + if( !s.empty() ) { + s += ", "; + } + s += '\''; + if( c == '\'' || c == '\\' ) { + s += '\\'; + } + s += c; + s += '\''; + return std::isalpha( c ) != 0; } - s += c; - s += '\''; - return std::isalpha( c ) != 0; - } - std::string remove_leading_zeroes( const std::string& v ) - { - const auto pos = v.find_first_not_of( '0' ); - if( pos == std::string::npos ) { - return ""; + std::string remove_leading_zeroes( const std::string& v ) + { + const auto pos = v.find_first_not_of( '0' ); + if( pos == std::string::npos ) { + return ""; + } + return v.substr( pos ); } - return v.substr( pos ); - } - void shift( internal::iterator& it, int delta ) - { - it.data += delta; - it.byte += delta; - it.byte_in_line += delta; - } + void shift( internal::iterator& it, int delta ) + { + it.data += delta; + it.byte += delta; + it.byte_in_line += delta; + } - } // namespace + } // namespace - namespace grammar - { - // ABNF grammar according to RFC 5234, updated by RFC 7405, with - // the following differences: - // - // To form a C++ identifier from a rulename, all minuses are - // replaced with underscores. - // - // As C++ identifiers are case-sensitive, we remember the "correct" - // spelling from the first occurrence of a rulename, all other - // occurrences are automatically changed to that. - // - // Certain rulenames are reserved as their equivalent C++ identifier is - // reserved as a keyword, an alternative token, by the standard or - // for other, special reasons. - // - // When using numerical values (num-val, repeat), the values - // must be in the range of the corresponding C++ data type. - // - // Remember we are defining a PEG, not a CFG. Simply copying some - // ABNF from somewhere might lead to surprising results as the - // alternations are now sequential, using the sor<> rule. - // - // PEG also require two extensions: the and-predicate and the - // not-predicate. They are expressed by '&' and '!' respectively, - // being allowed (optionally, only one of them) before the - // repetition. You can use braces for more complex expressions. - // - // Finally, instead of the pre-defined CRLF sequence, we accept - // any type of line ending as a convenience extension: - - // clang-format off - struct CRLF : sor< abnf::CRLF, CR, LF > {}; - - // The rest is according to the RFC(s): - struct comment_cont : until< CRLF, sor< WSP, VCHAR > > {}; - struct comment : if_must< one< ';' >, comment_cont > {}; - struct c_nl : sor< comment, CRLF > {}; - struct c_wsp : sor< WSP, seq< c_nl, WSP > > {}; - - struct rulename : seq< ALPHA, star< ranges< 'a', 'z', 'A', 'Z', '0', '9', '-' > > > {}; - - struct quoted_string_cont : until< DQUOTE, print > {}; - struct quoted_string : if_must< DQUOTE, quoted_string_cont > {}; - struct case_insensitive_string : seq< opt< istring< '%', 'i' > >, quoted_string > {}; - struct case_sensitive_string : seq< istring< '%', 's' >, quoted_string > {}; - struct char_val : sor< case_insensitive_string, case_sensitive_string > {}; - - struct prose_val_cont : until< one< '>' >, print > {}; - struct prose_val : if_must< one< '<' >, prose_val_cont > {}; - - template< char First, typename Digit > - struct gen_val + namespace grammar { - struct value : plus< Digit > {}; - struct range : if_must< one< '-' >, value > {}; - struct next_value : must< value > {}; - struct type : seq< istring< First >, must< value >, sor< range, star< one< '.' >, next_value > > > {}; - }; + // ABNF grammar according to RFC 5234, updated by RFC 7405, with + // the following differences: + // + // To form a C++ identifier from a rulename, all minuses are + // replaced with underscores. + // + // As C++ identifiers are case-sensitive, we remember the "correct" + // spelling from the first occurrence of a rulename, all other + // occurrences are automatically changed to that. + // + // Certain rulenames are reserved as their equivalent C++ identifier is + // reserved as a keyword, an alternative token, by the standard or + // for other, special reasons. + // + // When using numerical values (num-val, repeat), the values + // must be in the range of the corresponding C++ data type. + // + // Remember we are defining a PEG, not a CFG. Simply copying some + // ABNF from somewhere might lead to surprising results as the + // alternations are now sequential, using the sor<> rule. + // + // PEG also require two extensions: the and-predicate and the + // not-predicate. They are expressed by '&' and '!' respectively, + // being allowed (optionally, only one of them) before the + // repetition. You can use braces for more complex expressions. + // + // Finally, instead of the pre-defined CRLF sequence, we accept + // any type of line ending as a convenience extension: + + // clang-format off + struct CRLF : sor< abnf::CRLF, CR, LF > {}; + + // The rest is according to the RFC(s): + struct comment_cont : until< CRLF, sor< WSP, VCHAR > > {}; + struct comment : seq< one< ';' >, comment_cont > {}; + struct c_nl : sor< comment, CRLF > {}; + struct req_c_nl : c_nl {}; + struct c_wsp : sor< WSP, seq< c_nl, WSP > > {}; + + struct rulename : seq< ALPHA, star< ranges< 'a', 'z', 'A', 'Z', '0', '9', '-' > > > {}; + + struct quoted_string_cont : until< DQUOTE, print > {}; + struct quoted_string : seq< DQUOTE, quoted_string_cont > {}; + struct case_insensitive_string : seq< opt< istring< '%', 'i' > >, quoted_string > {}; + struct case_sensitive_string : seq< istring< '%', 's' >, quoted_string > {}; + struct char_val : sor< case_insensitive_string, case_sensitive_string > {}; + + struct prose_val_cont : until< one< '>' >, print > {}; + struct prose_val : seq< one< '<' >, prose_val_cont > {}; + + template< char First, typename Digit > + struct gen_val + { + struct value : plus< Digit > {}; + struct range : seq< one< '-' >, value > {}; + struct next_value : seq< value > {}; + struct type : seq< istring< First >, value, sor< range, star< one< '.' >, next_value > > > {}; + }; - using hex_val = gen_val< 'x', HEXDIG >; - using dec_val = gen_val< 'd', DIGIT >; - using bin_val = gen_val< 'b', BIT >; + using hex_val = gen_val< 'x', HEXDIG >; + using dec_val = gen_val< 'd', DIGIT >; + using bin_val = gen_val< 'b', BIT >; - struct num_val_choice : sor< bin_val::type, dec_val::type, hex_val::type > {}; - struct num_val : if_must< one< '%' >, num_val_choice > {}; + struct num_val_choice : sor< bin_val::type, dec_val::type, hex_val::type > {}; + struct num_val : seq< one< '%' >, num_val_choice > {}; - struct alternation; - struct option_close : one< ']' > {}; - struct option : seq< one< '[' >, pad< must< alternation >, c_wsp >, must< option_close > > {}; - struct group_close : one< ')' > {}; - struct group : seq< one< '(' >, pad< must< alternation >, c_wsp >, must< group_close > > {}; - struct element : sor< rulename, group, option, char_val, num_val, prose_val > {}; + struct alternation; + struct option_close : one< ']' > {}; + struct option : seq< one< '[' >, pad< alternation, c_wsp >, option_close > {}; + struct group_close : one< ')' > {}; + struct group : seq< one< '(' >, pad< alternation, c_wsp >, group_close > {}; + struct element : sor< rulename, group, option, char_val, num_val, prose_val > {}; - struct repeat : sor< seq< star< DIGIT >, one< '*' >, star< DIGIT > >, plus< DIGIT > > {}; - struct repetition : seq< opt< repeat >, element > {}; + struct repeat : sor< seq< star< DIGIT >, one< '*' >, star< DIGIT > >, plus< DIGIT > > {}; + struct repetition : seq< opt< repeat >, element > {}; + struct req_repetition : seq< repetition > {}; - struct and_predicate : if_must< one< '&' >, repetition > {}; - struct not_predicate : if_must< one< '!' >, repetition > {}; - struct predicate : sor< and_predicate, not_predicate, repetition > {}; + struct and_predicate : seq< one< '&' >, req_repetition > {}; + struct not_predicate : seq< one< '!' >, req_repetition > {}; + struct predicate : sor< and_predicate, not_predicate, repetition > {}; - struct concatenation : list< predicate, plus< c_wsp > > {}; - struct alternation : list_must< concatenation, pad< one< '/' >, c_wsp > > {}; + struct concatenation : list< predicate, plus< c_wsp > > {}; + struct alternation : list< concatenation, pad< one< '/' >, c_wsp > > {}; - struct defined_as_op : sor< string< '=', '/' >, one< '=' > > {}; - struct defined_as : pad< defined_as_op, c_wsp > {}; - struct rule : seq< if_must< rulename, defined_as, alternation >, star< c_wsp >, must< c_nl > > {}; - struct rulelist : until< eof, sor< seq< star< c_wsp >, c_nl >, must< rule > > > {}; + struct defined_as_op : sor< string< '=', '/' >, one< '=' > > {}; + struct defined_as : pad< defined_as_op, c_wsp > {}; + struct rule : seq< seq< rulename, defined_as, alternation >, star< c_wsp >, req_c_nl > {}; + struct rulelist : until< eof, sor< seq< star< c_wsp >, c_nl >, rule > > {}; + // clang-format on - // end of grammar + } // namespace grammar - template< typename Rule > - struct error_control : normal< Rule > - { - static const std::string error_message; + } // namespace abnf - template< typename Input, typename... States > - static void raise( const Input& in, States&&... /*unused*/ ) - { - throw parse_error( error_message, in ); - } - }; + // clang-format off + template<> constexpr const char* error_message< abnf::grammar::comment_cont > = "unterminated comment"; - template<> const std::string error_control< comment_cont >::error_message = "unterminated comment"; - - template<> const std::string error_control< quoted_string_cont >::error_message = "unterminated string (missing '\"')"; - template<> const std::string error_control< prose_val_cont >::error_message = "unterminated prose description (missing '>')"; - - template<> const std::string error_control< hex_val::value >::error_message = "expected hexadecimal value"; - template<> const std::string error_control< dec_val::value >::error_message = "expected decimal value"; - template<> const std::string error_control< bin_val::value >::error_message = "expected binary value"; - template<> const std::string error_control< num_val_choice >::error_message = "expected base specifier (one of 'bBdDxX')"; - - template<> const std::string error_control< option_close >::error_message = "unterminated option (missing ']')"; - template<> const std::string error_control< group_close >::error_message = "unterminated group (missing ')')"; - - template<> const std::string error_control< repetition >::error_message = "expected element"; - template<> const std::string error_control< concatenation >::error_message = "expected element"; - template<> const std::string error_control< alternation >::error_message = "expected element"; - - template<> const std::string error_control< defined_as >::error_message = "expected '=' or '=/'"; - template<> const std::string error_control< c_nl >::error_message = "unterminated rule"; - template<> const std::string error_control< rule >::error_message = "expected rule"; - // clang-format on - - } // namespace grammar - - template< typename Rule > - struct selector - : parse_tree::selector< - Rule, - parse_tree::store_content::on< - grammar::rulename, - grammar::prose_val, - grammar::hex_val::value, - grammar::dec_val::value, - grammar::bin_val::value, - grammar::hex_val::range, - grammar::dec_val::range, - grammar::bin_val::range, - grammar::hex_val::type, - grammar::dec_val::type, - grammar::bin_val::type, - grammar::repeat, - grammar::defined_as_op >, - parse_tree::remove_content::on< - grammar::option, - grammar::and_predicate, - grammar::not_predicate, - grammar::rule >, - parse_tree::fold_one::on< - grammar::alternation, - grammar::group, - grammar::repetition, - grammar::concatenation > > - { - }; + template<> constexpr const char* error_message< abnf::grammar::quoted_string_cont > = "unterminated string (missing '\"')"; + template<> constexpr const char* error_message< abnf::grammar::prose_val_cont > = "unterminated prose description (missing '>')"; - template<> - struct selector< grammar::quoted_string > : std::true_type - { - template< typename... States > - static void transform( node_ptr& n ) - { - shift( n->m_begin, 1 ); - shift( n->m_end, -1 ); - - const auto content = n->string_view(); - for( const auto c : content ) { - if( std::isalpha( c ) != 0 ) { - n->set_type< istring_tag >(); - return; - } - } - if( content.size() == 1 ) { - n->set_type< one_tag >(); - } - else { - n->set_type< string_tag >(); - } - } - }; + template<> constexpr const char* error_message< abnf::grammar::hex_val::value > = "expected hexadecimal value"; + template<> constexpr const char* error_message< abnf::grammar::dec_val::value > = "expected decimal value"; + template<> constexpr const char* error_message< abnf::grammar::bin_val::value > = "expected binary value"; + template<> constexpr const char* error_message< abnf::grammar::num_val_choice > = "expected base specifier (one of 'bBdDxX')"; - template<> - struct selector< grammar::case_sensitive_string > : std::true_type - { - template< typename... States > - static void transform( node_ptr& n ) - { - n = std::move( n->children.back() ); - if( n->string_view().size() == 1 ) { - n->set_type< one_tag >(); - } - else { - n->set_type< string_tag >(); - } - } - }; + template<> constexpr const char* error_message< abnf::grammar::option_close > = "unterminated option (missing ']')"; + template<> constexpr const char* error_message< abnf::grammar::group_close > = "unterminated group (missing ')')"; - std::string to_string( const node_ptr& n ); - std::string to_string( const std::vector< node_ptr >& v ); + template<> constexpr const char* error_message< abnf::grammar::req_repetition > = "expected element"; + template<> constexpr const char* error_message< abnf::grammar::concatenation > = "expected element"; + template<> constexpr const char* error_message< abnf::grammar::alternation > = "expected element"; - std::string to_string_unwrap_seq( const node_ptr& n ) - { - if( n->is_type< grammar::group >() || n->is_type< grammar::concatenation >() ) { - return to_string( n->children ); - } - return to_string( n ); - } + template<> constexpr const char* error_message< abnf::grammar::defined_as > = "expected '=' or '=/'"; + template<> constexpr const char* error_message< abnf::grammar::req_c_nl > = "unterminated rule"; + template<> constexpr const char* error_message< abnf::grammar::rule > = "expected rule"; + // clang-format on - namespace + namespace abnf { - std::string get_rulename( const node_ptr& n ) + template< typename Rule > + struct selector + : parse_tree::selector< + Rule, + parse_tree::store_content::on< + grammar::rulename, + grammar::prose_val, + grammar::hex_val::value, + grammar::dec_val::value, + grammar::bin_val::value, + grammar::hex_val::range, + grammar::dec_val::range, + grammar::bin_val::range, + grammar::hex_val::type, + grammar::dec_val::type, + grammar::bin_val::type, + grammar::repeat, + grammar::defined_as_op >, + parse_tree::remove_content::on< + grammar::option, + grammar::and_predicate, + grammar::not_predicate, + grammar::rule >, + parse_tree::fold_one::on< + grammar::alternation, + grammar::group, + grammar::repetition, + grammar::concatenation > > { - assert( n->is_type< grammar::rulename >() ); - std::string v = n->string(); - std::replace( v.begin(), v.end(), '-', '_' ); - return v; - } + }; - std::string get_rulename( const node_ptr& n, const bool print_forward_declarations ) + template<> + struct selector< grammar::quoted_string > : std::true_type { - std::string v = get_rulename( n ); - const auto it = find_rule( rules, v ); - if( it != rules.rend() ) { - return *it; - } - if( keywords.count( v ) != 0 || v.find( "__" ) != std::string::npos ) { - throw parse_error( '\'' + n->string() + "' is a reserved rulename", n->begin() ); - } - if( print_forward_declarations && find_rule( rules_defined, v ) != rules_defined.rend() ) { - std::cout << "struct " << v << ";\n"; + template< typename... States > + static void transform( node_ptr& n ) + { + shift( n->m_begin, 1 ); + shift( n->m_end, -1 ); + + const auto content = n->string_view(); + for( const auto c : content ) { + if( std::isalpha( c ) != 0 ) { + n->set_type< istring_tag >(); + return; + } + } + if( content.size() == 1 ) { + n->set_type< one_tag >(); + } + else { + n->set_type< string_tag >(); + } } - rules.push_back( v ); - return v; - } + }; - template< typename T > - std::string gen_val( const node_ptr& n ) + template<> + struct selector< grammar::case_sensitive_string > : std::true_type { - if( n->children.size() == 2 ) { - if( n->children.back()->is_type< T >() ) { - return prefix + "range< " + to_string( n->children.front() ) + ", " + to_string( n->children.back()->children.front() ) + " >"; + template< typename... States > + static void transform( node_ptr& n ) + { + n = std::move( n->children.back() ); + if( n->string_view().size() == 1 ) { + n->set_type< one_tag >(); + } + else { + n->set_type< string_tag >(); } } - if( n->children.size() == 1 ) { - return prefix + "one< " + to_string( n->children ) + " >"; + }; + + std::string to_string( const node_ptr& n ); + std::string to_string( const std::vector< node_ptr >& v ); + + std::string to_string_unwrap_seq( const node_ptr& n ) + { + if( n->is_type< grammar::group >() || n->is_type< grammar::concatenation >() ) { + return to_string( n->children ); } - return prefix + "string< " + to_string( n->children ) + " >"; + return to_string( n ); } - struct ccmp + namespace { - bool operator()( const std::string& lhs, const std::string& rhs ) const noexcept + std::string get_rulename( const node_ptr& n ) { - return TAO_PEGTL_STRCASECMP( lhs.c_str(), rhs.c_str() ) < 0; + assert( n->is_type< grammar::rulename >() ); + std::string v = n->string(); + std::replace( v.begin(), v.end(), '-', '_' ); + return v; } - }; - - std::map< std::string, parse_tree::node*, ccmp > previous_rules; - - } // namespace - template<> - struct selector< grammar::rule > : std::true_type - { - template< typename... States > - static void transform( node_ptr& n ) - { - const auto rname = get_rulename( n->children.front() ); - assert( n->children.at( 1 )->is_type< grammar::defined_as_op >() ); - const auto op = n->children.at( 1 )->string(); - // when we insert a normal rule, we need to check for duplicates - if( op == "=" ) { - if( !previous_rules.try_emplace( rname, n.get() ).second ) { - throw parse_error( "rule '" + rname + "' is already defined", n->begin() ); + std::string get_rulename( const node_ptr& n, const bool print_forward_declarations ) + { + std::string v = get_rulename( n ); + const auto it = find_rule( rules, v ); + if( it != rules.rend() ) { + return *it; } - } - // if it is an "incremental alternation", we need to consolidate the assigned alternations - else if( op == "=/" ) { - const auto p = previous_rules.find( rname ); - if( p == previous_rules.end() ) { - throw parse_error( "incremental alternation '" + rname + "' without previous rule definition", n->begin() ); + if( keywords.count( v ) != 0 || v.find( "__" ) != std::string::npos ) { + throw parse_error( '\'' + n->string() + "' is a reserved rulename", n->begin() ); } - auto& previous = p->second->children.back(); - - // if the previous rule does not assign an alternation, create an intermediate alternation and move its assignee into it. - if( !previous->is_type< abnf::grammar::alternation >() ) { - auto s = std::make_unique< parse_tree::node >(); - s->set_type< abnf::grammar::alternation >(); - s->source = previous->source; - s->m_begin = previous->m_begin; - s->m_end = previous->m_end; - s->children.emplace_back( std::move( previous ) ); - previous = std::move( s ); + if( print_forward_declarations && find_rule( rules_defined, v ) != rules_defined.rend() ) { + std::cout << "struct " << v << ";\n"; } + rules.push_back( v ); + return v; + } - // append all new options to the previous rule's assignee (which always is an alternation now) - previous->m_end = n->children.back()->m_end; - - // if the new rule itself contains an alternation, append the individual entries... - if( n->children.back()->is_type< abnf::grammar::alternation >() ) { - for( auto& e : n->children.back()->children ) { - previous->children.emplace_back( std::move( e ) ); + template< typename T > + std::string gen_val( const node_ptr& n ) + { + if( n->children.size() == 2 ) { + if( n->children.back()->is_type< T >() ) { + return prefix + "range< " + to_string( n->children.front() ) + ", " + to_string( n->children.back()->children.front() ) + " >"; } } - // ...otherwise add the node itself as another option. - else { - previous->children.emplace_back( std::move( n->children.back() ) ); + if( n->children.size() == 1 ) { + return prefix + "one< " + to_string( n->children ) + " >"; } - n.reset(); - } - else { - throw parse_error( "invalid operator '" + op + "', this should not happen!", n->begin() ); + return prefix + "string< " + to_string( n->children ) + " >"; } - } - }; - struct stringifier - { - using function_t = std::string ( * )( const node_ptr& n ); - function_t default_ = nullptr; + struct ccmp + { + bool operator()( const std::string& lhs, const std::string& rhs ) const noexcept + { + return TAO_PEGTL_STRCASECMP( lhs.c_str(), rhs.c_str() ) < 0; + } + }; - std::map< std::string_view, function_t > map_; + std::map< std::string, parse_tree::node*, ccmp > previous_rules; - template< typename T > - void add( const function_t& f ) - { - map_.try_emplace( internal::demangle< T >(), f ); - } + } // namespace - std::string operator()( const node_ptr& n ) const + template<> + struct selector< grammar::rule > : std::true_type { - const auto it = map_.find( n->type ); - if( it != map_.end() ) { - return it->second( n ); - } - return default_( n ); - } - }; + template< typename... States > + static void transform( node_ptr& n ) + { + const auto rname = get_rulename( n->children.front() ); + assert( n->children.at( 1 )->is_type< grammar::defined_as_op >() ); + const auto op = n->children.at( 1 )->string(); + // when we insert a normal rule, we need to check for duplicates + if( op == "=" ) { + if( !previous_rules.try_emplace( rname, n.get() ).second ) { + throw parse_error( "rule '" + rname + "' is already defined", n->begin() ); + } + } + // if it is an "incremental alternation", we need to consolidate the assigned alternations + else if( op == "=/" ) { + const auto p = previous_rules.find( rname ); + if( p == previous_rules.end() ) { + throw parse_error( "incremental alternation '" + rname + "' without previous rule definition", n->begin() ); + } + auto& previous = p->second->children.back(); + + // if the previous rule does not assign an alternation, create an intermediate alternation and move its assignee into it. + if( !previous->is_type< abnf::grammar::alternation >() ) { + auto s = std::make_unique< parse_tree::node >(); + s->set_type< abnf::grammar::alternation >(); + s->source = previous->source; + s->m_begin = previous->m_begin; + s->m_end = previous->m_end; + s->children.emplace_back( std::move( previous ) ); + previous = std::move( s ); + } - stringifier make_stringifier() - { - stringifier nrv; - nrv.default_ = []( const node_ptr& n ) -> std::string { - throw parse_error( "missing to_string() for " + std::string( n->type ), n->begin() ); + // append all new options to the previous rule's assignee (which always is an alternation now) + previous->m_end = n->children.back()->m_end; + + // if the new rule itself contains an alternation, append the individual entries... + if( n->children.back()->is_type< abnf::grammar::alternation >() ) { + for( auto& e : n->children.back()->children ) { + previous->children.emplace_back( std::move( e ) ); + } + } + // ...otherwise add the node itself as another option. + else { + previous->children.emplace_back( std::move( n->children.back() ) ); + } + n.reset(); + } + else { + throw parse_error( "invalid operator '" + op + "', this should not happen!", n->begin() ); + } + } }; - nrv.add< grammar::rulename >( []( const node_ptr& n ) { return get_rulename( n, true ); } ); + struct stringifier + { + using function_t = std::string ( * )( const node_ptr& n ); + function_t default_ = nullptr; - nrv.add< grammar::rule >( []( const node_ptr& n ) { - return "struct " + get_rulename( n->children.front(), false ) + " : " + to_string( n->children.back() ) + " {};"; - } ); + std::map< std::string_view, function_t > map_; - nrv.add< string_tag >( []( const node_ptr& n ) { - const auto content = n->string_view(); - std::string s; - for( const auto c : content ) { - append_char( s, c ); - } - return prefix + "string< " + s + " >"; - } ); - - nrv.add< istring_tag >( []( const node_ptr& n ) { - const auto content = n->string_view(); - std::string s; - for( const auto c : content ) { - append_char( s, c ); - } - return prefix + "istring< " + s + " >"; - } ); - - nrv.add< one_tag >( []( const node_ptr& n ) { - const auto content = n->string_view(); - std::string s; - for( const auto c : content ) { - append_char( s, c ); + template< typename T > + void add( const function_t& f ) + { + map_.try_emplace( internal::demangle< T >(), f ); } - return prefix + "one< " + s + " >"; - } ); - - nrv.add< grammar::hex_val::value >( []( const node_ptr& n ) { return "0x" + n->string(); } ); - nrv.add< grammar::dec_val::value >( []( const node_ptr& n ) { return n->string(); } ); - nrv.add< grammar::bin_val::value >( []( const node_ptr& n ) { - unsigned long long v = 0; - const char* p = n->m_begin.data; - // TODO: Detect overflow - do { - v <<= 1; - v |= ( *p++ & 1 ); - } while( p != n->m_end.data ); - std::ostringstream o; - o << v; - return o.str(); - } ); - - nrv.add< grammar::hex_val::type >( []( const node_ptr& n ) { return gen_val< grammar::hex_val::range >( n ); } ); - nrv.add< grammar::dec_val::type >( []( const node_ptr& n ) { return gen_val< grammar::dec_val::range >( n ); } ); - nrv.add< grammar::bin_val::type >( []( const node_ptr& n ) { return gen_val< grammar::bin_val::range >( n ); } ); - - nrv.add< grammar::alternation >( []( const node_ptr& n ) { return prefix + "sor< " + to_string( n->children ) + " >"; } ); - nrv.add< grammar::option >( []( const node_ptr& n ) { return prefix + "opt< " + to_string( n->children ) + " >"; } ); - nrv.add< grammar::group >( []( const node_ptr& n ) { return prefix + "seq< " + to_string( n->children ) + " >"; } ); - - nrv.add< grammar::prose_val >( []( const node_ptr& n ) { return "/* " + n->string() + " */"; } ); - - nrv.add< grammar::and_predicate >( []( const node_ptr& n ) { - assert( n->children.size() == 1 ); - return prefix + "at< " + to_string_unwrap_seq( n->children.front() ) + " >"; - } ); - - nrv.add< grammar::not_predicate >( []( const node_ptr& n ) { - assert( n->children.size() == 1 ); - return prefix + "not_at< " + to_string_unwrap_seq( n->children.front() ) + " >"; - } ); - - nrv.add< grammar::concatenation >( []( const node_ptr& n ) { - assert( !n->children.empty() ); - return prefix + "seq< " + to_string( n->children ) + " >"; - } ); - - nrv.add< grammar::repetition >( []( const node_ptr& n ) -> std::string { - assert( n->children.size() == 2 ); - const auto content = to_string_unwrap_seq( n->children.back() ); - const auto rep = n->children.front()->string(); - const auto star = rep.find( '*' ); - if( star == std::string::npos ) { - const auto v = remove_leading_zeroes( rep ); - if( v.empty() ) { - throw parse_error( "repetition of zero not allowed", n->begin() ); + + std::string operator()( const node_ptr& n ) const + { + const auto it = map_.find( n->type ); + if( it != map_.end() ) { + return it->second( n ); } - return prefix + "rep< " + v + ", " + content + " >"; + return default_( n ); } - const auto min = remove_leading_zeroes( rep.substr( 0, star ) ); - const auto max = remove_leading_zeroes( rep.substr( star + 1 ) ); - if( ( star != rep.size() - 1 ) && max.empty() ) { - throw parse_error( "repetition maximum of zero not allowed", n->begin() ); - } - if( min.empty() && max.empty() ) { - return prefix + "star< " + content + " >"; - } - if( !min.empty() && max.empty() ) { - if( min == "1" ) { - return prefix + "plus< " + content + " >"; + }; + + stringifier make_stringifier() + { + stringifier nrv; + nrv.default_ = []( const node_ptr& n ) -> std::string { + throw parse_error( "missing to_string() for " + std::string( n->type ), n->begin() ); + }; + + nrv.add< grammar::rulename >( []( const node_ptr& n ) { return get_rulename( n, true ); } ); + + nrv.add< grammar::rule >( []( const node_ptr& n ) { + return "struct " + get_rulename( n->children.front(), false ) + " : " + to_string( n->children.back() ) + " {};"; + } ); + + nrv.add< string_tag >( []( const node_ptr& n ) { + const auto content = n->string_view(); + std::string s; + for( const auto c : content ) { + append_char( s, c ); } - return prefix + "rep_min< " + min + ", " + content + " >"; - } - if( min.empty() && !max.empty() ) { - if( max == "1" ) { - return prefix + "opt< " + content + " >"; + return prefix + "string< " + s + " >"; + } ); + + nrv.add< istring_tag >( []( const node_ptr& n ) { + const auto content = n->string_view(); + std::string s; + for( const auto c : content ) { + append_char( s, c ); } - return prefix + "rep_max< " + max + ", " + content + " >"; - } - unsigned long long min_val; - unsigned long long max_val; - { - std::stringstream s; - s.str( min ); - s >> min_val; - s.clear(); - s.str( max ); - s >> max_val; - } - if( min_val > max_val ) { - throw parse_error( "repetition minimum which is greater than the repetition maximum not allowed", n->begin() ); - } - if( ( min_val == 1 ) && ( max_val == 1 ) ) { - // note: content can not be used here! - return to_string( n->children.back() ); - } - const auto min_element = ( min_val == 1 ) ? content : ( prefix + "rep< " + min + ", " + content + " >" ); - if( min_val == max_val ) { - return min_element; - } - std::ostringstream os; - os << ( max_val - min_val ); - const auto max_element = prefix + ( ( max_val - min_val == 1 ) ? "opt< " : ( "rep_opt< " + os.str() + ", " ) ) + content + " >"; - return prefix + "seq< " + min_element + ", " + max_element + " >"; - } ); + return prefix + "istring< " + s + " >"; + } ); + + nrv.add< one_tag >( []( const node_ptr& n ) { + const auto content = n->string_view(); + std::string s; + for( const auto c : content ) { + append_char( s, c ); + } + return prefix + "one< " + s + " >"; + } ); + + nrv.add< grammar::hex_val::value >( []( const node_ptr& n ) { return "0x" + n->string(); } ); + nrv.add< grammar::dec_val::value >( []( const node_ptr& n ) { return n->string(); } ); + nrv.add< grammar::bin_val::value >( []( const node_ptr& n ) { + unsigned long long v = 0; + const char* p = n->m_begin.data; + // TODO: Detect overflow + do { + v <<= 1; + v |= ( *p++ & 1 ); + } while( p != n->m_end.data ); + std::ostringstream o; + o << v; + return o.str(); + } ); + + nrv.add< grammar::hex_val::type >( []( const node_ptr& n ) { return gen_val< grammar::hex_val::range >( n ); } ); + nrv.add< grammar::dec_val::type >( []( const node_ptr& n ) { return gen_val< grammar::dec_val::range >( n ); } ); + nrv.add< grammar::bin_val::type >( []( const node_ptr& n ) { return gen_val< grammar::bin_val::range >( n ); } ); + + nrv.add< grammar::alternation >( []( const node_ptr& n ) { return prefix + "sor< " + to_string( n->children ) + " >"; } ); + nrv.add< grammar::option >( []( const node_ptr& n ) { return prefix + "opt< " + to_string( n->children ) + " >"; } ); + nrv.add< grammar::group >( []( const node_ptr& n ) { return prefix + "seq< " + to_string( n->children ) + " >"; } ); + + nrv.add< grammar::prose_val >( []( const node_ptr& n ) { return "/* " + n->string() + " */"; } ); + + nrv.add< grammar::and_predicate >( []( const node_ptr& n ) { + assert( n->children.size() == 1 ); + return prefix + "at< " + to_string_unwrap_seq( n->children.front() ) + " >"; + } ); + + nrv.add< grammar::not_predicate >( []( const node_ptr& n ) { + assert( n->children.size() == 1 ); + return prefix + "not_at< " + to_string_unwrap_seq( n->children.front() ) + " >"; + } ); + + nrv.add< grammar::concatenation >( []( const node_ptr& n ) { + assert( !n->children.empty() ); + return prefix + "seq< " + to_string( n->children ) + " >"; + } ); + + nrv.add< grammar::repetition >( []( const node_ptr& n ) -> std::string { + assert( n->children.size() == 2 ); + const auto content = to_string_unwrap_seq( n->children.back() ); + const auto rep = n->children.front()->string(); + const auto star = rep.find( '*' ); + if( star == std::string::npos ) { + const auto v = remove_leading_zeroes( rep ); + if( v.empty() ) { + throw parse_error( "repetition of zero not allowed", n->begin() ); + } + return prefix + "rep< " + v + ", " + content + " >"; + } + const auto min = remove_leading_zeroes( rep.substr( 0, star ) ); + const auto max = remove_leading_zeroes( rep.substr( star + 1 ) ); + if( ( star != rep.size() - 1 ) && max.empty() ) { + throw parse_error( "repetition maximum of zero not allowed", n->begin() ); + } + if( min.empty() && max.empty() ) { + return prefix + "star< " + content + " >"; + } + if( !min.empty() && max.empty() ) { + if( min == "1" ) { + return prefix + "plus< " + content + " >"; + } + return prefix + "rep_min< " + min + ", " + content + " >"; + } + if( min.empty() && !max.empty() ) { + if( max == "1" ) { + return prefix + "opt< " + content + " >"; + } + return prefix + "rep_max< " + max + ", " + content + " >"; + } + unsigned long long min_val; + unsigned long long max_val; + { + std::stringstream s; + s.str( min ); + s >> min_val; + s.clear(); + s.str( max ); + s >> max_val; + } + if( min_val > max_val ) { + throw parse_error( "repetition minimum which is greater than the repetition maximum not allowed", n->begin() ); + } + if( ( min_val == 1 ) && ( max_val == 1 ) ) { + // note: content can not be used here! + return to_string( n->children.back() ); + } + const auto min_element = ( min_val == 1 ) ? content : ( prefix + "rep< " + min + ", " + content + " >" ); + if( min_val == max_val ) { + return min_element; + } + std::ostringstream os; + os << ( max_val - min_val ); + const auto max_element = prefix + ( ( max_val - min_val == 1 ) ? "opt< " : ( "rep_opt< " + os.str() + ", " ) ) + content + " >"; + return prefix + "seq< " + min_element + ", " + max_element + " >"; + } ); - return nrv; - } + return nrv; + } - std::string to_string( const node_ptr& n ) - { - static stringifier s = make_stringifier(); - return s( n ); - } + std::string to_string( const node_ptr& n ) + { + static stringifier s = make_stringifier(); + return s( n ); + } - std::string to_string( const std::vector< node_ptr >& v ) - { - std::string result; - for( const auto& c : v ) { - if( !result.empty() ) { - result += ", "; + std::string to_string( const std::vector< node_ptr >& v ) + { + std::string result; + for( const auto& c : v ) { + if( !result.empty() ) { + result += ", "; + } + result += to_string( c ); } - result += to_string( c ); + return result; } - return result; - } -} // namespace TAO_PEGTL_NAMESPACE::abnf + } // namespace abnf + +} // namespace TAO_PEGTL_NAMESPACE int main( int argc, char** argv ) // NOLINT(bugprone-exception-escape) { @@ -693,7 +699,7 @@ int main( int argc, char** argv ) // NOLINT(bugprone-exception-escape) file_input in( argv[ 1 ] ); try { - const auto root = parse_tree::parse< abnf::grammar::rulelist, abnf::selector, nothing, abnf::grammar::error_control >( in ); + const auto root = parse_tree::parse< abnf::grammar::rulelist, abnf::selector >( in ); for( const auto& rule : root->children ) { abnf::rules_defined.push_back( abnf::get_rulename( rule->children.front() ) ); diff --git a/packages/PEGTL/src/example/pegtl/analyze.cpp b/packages/PEGTL/src/example/pegtl/analyze.cpp index 6a4efb7e18d6612f0d1f858562fe279f8bd7ae3c..a957cde14c6c11f021c3cf85ced8358af0b02c9f 100644 --- a/packages/PEGTL/src/example/pegtl/analyze.cpp +++ b/packages/PEGTL/src/example/pegtl/analyze.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <tao/pegtl.hpp> diff --git a/packages/PEGTL/src/example/pegtl/calculator.cpp b/packages/PEGTL/src/example/pegtl/calculator.cpp index 1adb21ce8fd1bec3bd4edc95fc0d787ac908ac1f..bbc6751098b0abc3030713eeb508308a151db736 100644 --- a/packages/PEGTL/src/example/pegtl/calculator.cpp +++ b/packages/PEGTL/src/example/pegtl/calculator.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <cassert> diff --git a/packages/PEGTL/src/example/pegtl/chomsky_hierarchy.cpp b/packages/PEGTL/src/example/pegtl/chomsky_hierarchy.cpp index cfda7474729ab13176b68bde15539919c9301d3b..c29d01dcde17f47b1e92fe75cfa0d2bcc9841a77 100644 --- a/packages/PEGTL/src/example/pegtl/chomsky_hierarchy.cpp +++ b/packages/PEGTL/src/example/pegtl/chomsky_hierarchy.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <cassert> diff --git a/packages/PEGTL/src/example/pegtl/csv1.cpp b/packages/PEGTL/src/example/pegtl/csv1.cpp index bda3328a09186acaf6973821944fb1fb707109b4..2565607e910292ed00de0d9cee276bfc2a9eff9c 100644 --- a/packages/PEGTL/src/example/pegtl/csv1.cpp +++ b/packages/PEGTL/src/example/pegtl/csv1.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <cassert> diff --git a/packages/PEGTL/src/example/pegtl/csv2.cpp b/packages/PEGTL/src/example/pegtl/csv2.cpp index ab0da058a5449c03ab3e19ac33d75bea58ce472f..2fb912f6c5d5d6273ad746c11ca724e2f3fa40b9 100644 --- a/packages/PEGTL/src/example/pegtl/csv2.cpp +++ b/packages/PEGTL/src/example/pegtl/csv2.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <iostream> diff --git a/packages/PEGTL/src/example/pegtl/double.hpp b/packages/PEGTL/src/example/pegtl/double.hpp index f92e822bb1817d56285b308f8f2003391546a7a4..c7eedd4dccaea30f45bf819ed31f7117b798622d 100644 --- a/packages/PEGTL/src/example/pegtl/double.hpp +++ b/packages/PEGTL/src/example/pegtl/double.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_SRC_EXAMPLES_PEGTL_DOUBLE_HPP diff --git a/packages/PEGTL/src/example/pegtl/dynamic_match.cpp b/packages/PEGTL/src/example/pegtl/dynamic_match.cpp index 21670dd015cddebda3ebcaecd28e8c4a452931b9..a0636b6d3c05ee7defd4ba6c678ead10c13b66b6 100644 --- a/packages/PEGTL/src/example/pegtl/dynamic_match.cpp +++ b/packages/PEGTL/src/example/pegtl/dynamic_match.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <cstring> diff --git a/packages/PEGTL/src/example/pegtl/hello_world.cpp b/packages/PEGTL/src/example/pegtl/hello_world.cpp index 5c007c7962d616e133d3251d9a8ddab1b83c960d..e6522777634a0ecd92f9863dfd58a522dd2810f4 100644 --- a/packages/PEGTL/src/example/pegtl/hello_world.cpp +++ b/packages/PEGTL/src/example/pegtl/hello_world.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <iostream> diff --git a/packages/PEGTL/src/example/pegtl/indent_aware.cpp b/packages/PEGTL/src/example/pegtl/indent_aware.cpp index 9a20c662f49f3fbd2cabe3b71212af7dc8ca753d..056ec661640099a1eca5c57c9c15a14ecbff9afc 100644 --- a/packages/PEGTL/src/example/pegtl/indent_aware.cpp +++ b/packages/PEGTL/src/example/pegtl/indent_aware.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <cassert> diff --git a/packages/PEGTL/src/example/pegtl/json_build.cpp b/packages/PEGTL/src/example/pegtl/json_build.cpp index 197d26c62e5f79da6e79f333c891c064ff9e8ae1..59f5c39a378be58ce25530182d268bc6fd910f7e 100644 --- a/packages/PEGTL/src/example/pegtl/json_build.cpp +++ b/packages/PEGTL/src/example/pegtl/json_build.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <cassert> diff --git a/packages/PEGTL/src/example/pegtl/json_classes.hpp b/packages/PEGTL/src/example/pegtl/json_classes.hpp index 7b9ca3ce63571a990220a5883e36ca084d467934..0d1e9f4998b394df62b8142a128ee91591de3591 100644 --- a/packages/PEGTL/src/example/pegtl/json_classes.hpp +++ b/packages/PEGTL/src/example/pegtl/json_classes.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_SRC_EXAMPLES_PEGTL_JSON_CLASSES_HPP diff --git a/packages/PEGTL/src/example/pegtl/json_count.cpp b/packages/PEGTL/src/example/pegtl/json_count.cpp index c7e82698e86c39d1feeee7d0fc0f045ec527a2fe..8ac72875c67de844f757b11943bce8fcb9a4949f 100644 --- a/packages/PEGTL/src/example/pegtl/json_count.cpp +++ b/packages/PEGTL/src/example/pegtl/json_count.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <iomanip> diff --git a/packages/PEGTL/src/example/pegtl/json_errors.hpp b/packages/PEGTL/src/example/pegtl/json_errors.hpp index 5b9957f187ea0031e5afbc07bfa690c2b186a302..2c0c2292c54d76731f6c2c45e55f7229f5f64c96 100644 --- a/packages/PEGTL/src/example/pegtl/json_errors.hpp +++ b/packages/PEGTL/src/example/pegtl/json_errors.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_SRC_EXAMPLES_PEGTL_JSON_ERRORS_HPP diff --git a/packages/PEGTL/src/example/pegtl/json_parse.cpp b/packages/PEGTL/src/example/pegtl/json_parse.cpp index 549d735146177e266b3a882527d93681ff8a3683..db4e4cce447fb968a2bc38e9964d16bba78b7354 100644 --- a/packages/PEGTL/src/example/pegtl/json_parse.cpp +++ b/packages/PEGTL/src/example/pegtl/json_parse.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <tao/pegtl.hpp> diff --git a/packages/PEGTL/src/example/pegtl/json_unescape.hpp b/packages/PEGTL/src/example/pegtl/json_unescape.hpp index c6a9226742d9502d2556822dd8abfc2a995d6f5a..974c6afb77f46aa04614f8fb629c45fd41b4175d 100644 --- a/packages/PEGTL/src/example/pegtl/json_unescape.hpp +++ b/packages/PEGTL/src/example/pegtl/json_unescape.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_SRC_EXAMPLES_PEGTL_JSON_UNESCAPE_HPP diff --git a/packages/PEGTL/src/example/pegtl/lua53_parse.cpp b/packages/PEGTL/src/example/pegtl/lua53_parse.cpp index a5d7a30185df94f143a8362568ec1078174291b2..535c892529e4f187f1d4d9fedb98fc2c6f4cf2e2 100644 --- a/packages/PEGTL/src/example/pegtl/lua53_parse.cpp +++ b/packages/PEGTL/src/example/pegtl/lua53_parse.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2015-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <tao/pegtl.hpp> diff --git a/packages/PEGTL/src/example/pegtl/modulus_match.cpp b/packages/PEGTL/src/example/pegtl/modulus_match.cpp index 7c3b63d45ddb614e42047835d9b8ca200dab6254..13192754104c421f03b181c3b877a410d0decae8 100644 --- a/packages/PEGTL/src/example/pegtl/modulus_match.cpp +++ b/packages/PEGTL/src/example/pegtl/modulus_match.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <tao/pegtl.hpp> diff --git a/packages/PEGTL/src/example/pegtl/parse_tree.cpp b/packages/PEGTL/src/example/pegtl/parse_tree.cpp index 7a62f1c307aa5cb345e0772e485a1f90fb170975..9f0053f225a5d2bce91c51ce0e6489edf8d93547 100644 --- a/packages/PEGTL/src/example/pegtl/parse_tree.cpp +++ b/packages/PEGTL/src/example/pegtl/parse_tree.cpp @@ -1,6 +1,7 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ +#include <array> #include <iostream> #include <string> #include <type_traits> @@ -55,8 +56,8 @@ namespace example // if only one child is left for LHS..., replace the PROD/EXPR with the child directly. // otherwise, perform the above transformation, then apply it recursively until LHS... // becomes a single child, which then replaces the parent node and the recursion ends. - template< typename... States > - static void transform( std::unique_ptr< parse_tree::node >& n, States&&... st ) + template< typename Node, typename... States > + static void transform( std::unique_ptr< Node >& n, States&&... st ) { if( n->children.size() == 1 ) { n = std::move( n->children.back() ); @@ -93,6 +94,69 @@ namespace example product, expression > >; + namespace internal + { + // a non-thread-safe allocation cache, assuming that the size (sz) is always the same! + template< std::size_t N > + struct cache + { + std::size_t pos = 0; + std::array< void*, N > data; + + cache() = default; + + cache( const cache& ) = delete; + cache( cache&& ) = delete; + + ~cache() + { + while( pos != 0 ) { + ::operator delete( data[ --pos ] ); + } + } + + cache& operator=( const cache& ) = delete; + cache& operator=( cache&& ) = delete; + + void* get( std::size_t sz ) + { + if( pos != 0 ) { + return data[ --pos ]; + } + return ::operator new( sz ); + } + + void put( void* p ) + { + if( pos < N ) { + data[ pos++ ] = p; + } + else { + ::operator delete( p ); + } + } + }; + + static cache< 32 > the_cache; + + } // namespace internal + + // this is not necessary for the example, but serves as a demonstration for an additional optimization. + struct node + : parse_tree::basic_node< node > + { + void* operator new( std::size_t sz ) + { + assert( sz == sizeof( node ) ); + return internal::the_cache.get( sz ); + } + + void operator delete( void* p ) + { + internal::the_cache.put( p ); + } + }; + } // namespace example int main( int argc, char** argv ) @@ -105,7 +169,7 @@ int main( int argc, char** argv ) } argv_input in( argv, 1 ); try { - const auto root = parse_tree::parse< example::grammar, example::selector >( in ); + const auto root = parse_tree::parse< example::grammar, example::node, example::selector >( in ); parse_tree::print_dot( std::cout, *root ); return 0; } @@ -118,5 +182,6 @@ int main( int argc, char** argv ) catch( const std::exception& e ) { std::cerr << e.what() << std::endl; } + return 1; } diff --git a/packages/PEGTL/src/example/pegtl/parse_tree_user_state.cpp b/packages/PEGTL/src/example/pegtl/parse_tree_user_state.cpp index f8840738af8473c19a31d8e3c46a5ecf4444c5c3..f727e46cc7423aa718b619d58540d060e7d54431 100644 --- a/packages/PEGTL/src/example/pegtl/parse_tree_user_state.cpp +++ b/packages/PEGTL/src/example/pegtl/parse_tree_user_state.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <type_traits> diff --git a/packages/PEGTL/src/example/pegtl/proto3.cpp b/packages/PEGTL/src/example/pegtl/proto3.cpp index ed478d79e40913a19d83f4494c7d2dd8f53d10f3..9e9a8f56ad8e0d0bdf24264b7d32d7c530e33b7d 100644 --- a/packages/PEGTL/src/example/pegtl/proto3.cpp +++ b/packages/PEGTL/src/example/pegtl/proto3.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <tao/pegtl.hpp> diff --git a/packages/PEGTL/src/example/pegtl/recover.cpp b/packages/PEGTL/src/example/pegtl/recover.cpp index 24f9c62c485d474be04bbee0bf9a7648fe266bc1..f2f9effc0bd2e81570649740e99ef85705a4c03f 100644 --- a/packages/PEGTL/src/example/pegtl/recover.cpp +++ b/packages/PEGTL/src/example/pegtl/recover.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ // This is a small experiment with a grammar that can recover from errors. diff --git a/packages/PEGTL/src/example/pegtl/s_expression.cpp b/packages/PEGTL/src/example/pegtl/s_expression.cpp index 4900c72c421a90cb4b9382640764bc209dfe6233..60670f40905e501dd7275c8c8d5670bcc163ce38 100644 --- a/packages/PEGTL/src/example/pegtl/s_expression.cpp +++ b/packages/PEGTL/src/example/pegtl/s_expression.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <iostream> diff --git a/packages/PEGTL/src/example/pegtl/sum.cpp b/packages/PEGTL/src/example/pegtl/sum.cpp index fd81a54d5d1e94560f1a65f6e05ec9c63f7fc4ec..8c6f267dfdfc976ff0b94a4a70a691b5af2479b8 100644 --- a/packages/PEGTL/src/example/pegtl/sum.cpp +++ b/packages/PEGTL/src/example/pegtl/sum.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <cstdlib> diff --git a/packages/PEGTL/src/example/pegtl/symbol_table.cpp b/packages/PEGTL/src/example/pegtl/symbol_table.cpp index f4b317a0ebc09ffd660994a75eb11b6b8ff6af70..c18ae9fd4626c48cc4b2b99ecaf45d8fda17dc1e 100644 --- a/packages/PEGTL/src/example/pegtl/symbol_table.cpp +++ b/packages/PEGTL/src/example/pegtl/symbol_table.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <cstring> diff --git a/packages/PEGTL/src/example/pegtl/unescape.cpp b/packages/PEGTL/src/example/pegtl/unescape.cpp index cb694473bb6476c55ecfddb0ebf6adf2b277e344..8296ce0400b8b68ca827fcb2cf491b735f9c968d 100644 --- a/packages/PEGTL/src/example/pegtl/unescape.cpp +++ b/packages/PEGTL/src/example/pegtl/unescape.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <iostream> diff --git a/packages/PEGTL/src/example/pegtl/uri.cpp b/packages/PEGTL/src/example/pegtl/uri.cpp index f504b68cf177e69b43dd50eb222b369d7bd70074..571f2b1e49090d543254a0467ad9a8af517a637d 100644 --- a/packages/PEGTL/src/example/pegtl/uri.cpp +++ b/packages/PEGTL/src/example/pegtl/uri.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <tao/pegtl.hpp> diff --git a/packages/PEGTL/src/example/pegtl/uri_trace.cpp b/packages/PEGTL/src/example/pegtl/uri_trace.cpp index 2bb9667877e4d7967de37d0dd7e30875f061bdf3..d159950f6880a253bc12e3b9bfee487df8dcfe85 100644 --- a/packages/PEGTL/src/example/pegtl/uri_trace.cpp +++ b/packages/PEGTL/src/example/pegtl/uri_trace.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <iostream> diff --git a/packages/PEGTL/src/test/pegtl/CMakeLists.txt b/packages/PEGTL/src/test/pegtl/CMakeLists.txt index 46408eb066d29048dc1e7e8d133159d4826ecaa0..61819674d71d9b57245b123bb22fc9a3d90605b6 100644 --- a/packages/PEGTL/src/test/pegtl/CMakeLists.txt +++ b/packages/PEGTL/src/test/pegtl/CMakeLists.txt @@ -40,6 +40,7 @@ set(test_sources data_cstring.cpp demangle.cpp discard_input.cpp + error_message.cpp file_cstream.cpp file_file.cpp file_istream.cpp diff --git a/packages/PEGTL/src/test/pegtl/action_enable.cpp b/packages/PEGTL/src/test/pegtl/action_enable.cpp index 89890bac351b1828c7f0764ab1e80a1301fc7614..148973c5183350eb0a5ad564d94cfc04d2339d50 100644 --- a/packages/PEGTL/src/test/pegtl/action_enable.cpp +++ b/packages/PEGTL/src/test/pegtl/action_enable.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/action_match.cpp b/packages/PEGTL/src/test/pegtl/action_match.cpp index dfb60c6f4254b8f54e1fead5cacf26c8ac643fd3..30a4db52f5e6ad079e4ada427273a175d4713417 100644 --- a/packages/PEGTL/src/test/pegtl/action_match.cpp +++ b/packages/PEGTL/src/test/pegtl/action_match.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/actions_one.cpp b/packages/PEGTL/src/test/pegtl/actions_one.cpp index 8ce31991dccabe38373fdee373a5531460fa0e4f..b8609822422419f66db090e97617545b0bc3db5b 100644 --- a/packages/PEGTL/src/test/pegtl/actions_one.cpp +++ b/packages/PEGTL/src/test/pegtl/actions_one.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/actions_three.cpp b/packages/PEGTL/src/test/pegtl/actions_three.cpp index be49391fef1ecd1bb176c32be47f312ee0e184ce..c7de4cbec30a36576ff45d1d032cd6292dde4a6c 100644 --- a/packages/PEGTL/src/test/pegtl/actions_three.cpp +++ b/packages/PEGTL/src/test/pegtl/actions_three.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/actions_two.cpp b/packages/PEGTL/src/test/pegtl/actions_two.cpp index 0d4475a41a904a0934b379abf66ea075b676cdd8..8b29f48c925c92ec0f020140101713dc42c852db 100644 --- a/packages/PEGTL/src/test/pegtl/actions_two.cpp +++ b/packages/PEGTL/src/test/pegtl/actions_two.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/analyze_cycles.cpp b/packages/PEGTL/src/test/pegtl/analyze_cycles.cpp index 099fcc4c6dee28a5cb1e5fb89848ebb123af3325..cd1a01641b7154d44cdfe0e5373f28f5b0b81dfb 100644 --- a/packages/PEGTL/src/test/pegtl/analyze_cycles.cpp +++ b/packages/PEGTL/src/test/pegtl/analyze_cycles.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/argv_input.cpp b/packages/PEGTL/src/test/pegtl/argv_input.cpp index c9f506f68c049f96ce688629691e4ca9b90ebdeb..2c649d504e7a5e65c9c2ee1c0fb75de8de7bb89c 100644 --- a/packages/PEGTL/src/test/pegtl/argv_input.cpp +++ b/packages/PEGTL/src/test/pegtl/argv_input.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <cstring> diff --git a/packages/PEGTL/src/test/pegtl/ascii_classes.cpp b/packages/PEGTL/src/test/pegtl/ascii_classes.cpp index a16a70d0bb6ed7ef24afdfc59d3b3bdd79f02512..c3301af9784c8cdd7dc3312b0945fc4f82452222 100644 --- a/packages/PEGTL/src/test/pegtl/ascii_classes.cpp +++ b/packages/PEGTL/src/test/pegtl/ascii_classes.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/ascii_eol.cpp b/packages/PEGTL/src/test/pegtl/ascii_eol.cpp index d84eef09d521b79ea55bd2438ead57c04a6cc21e..9724234d375da805ad1ae7de7de235b3ffe0921f 100644 --- a/packages/PEGTL/src/test/pegtl/ascii_eol.cpp +++ b/packages/PEGTL/src/test/pegtl/ascii_eol.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/ascii_eolf.cpp b/packages/PEGTL/src/test/pegtl/ascii_eolf.cpp index 7b94b247503f2868052953e1eb84c7790e297b92..2cb54e528a1390a4e1f1f72490c8fa39344b9f16 100644 --- a/packages/PEGTL/src/test/pegtl/ascii_eolf.cpp +++ b/packages/PEGTL/src/test/pegtl/ascii_eolf.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/ascii_forty_two.cpp b/packages/PEGTL/src/test/pegtl/ascii_forty_two.cpp index e1224b2d6f7414e20d5f81bb9abe333926529514..fcce5471fefbd91eaa0a07bf5b8b2b297e6a3687 100644 --- a/packages/PEGTL/src/test/pegtl/ascii_forty_two.cpp +++ b/packages/PEGTL/src/test/pegtl/ascii_forty_two.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/ascii_identifier.cpp b/packages/PEGTL/src/test/pegtl/ascii_identifier.cpp index 059b98bc48701c89e665c8b6cff19e1a5abb078d..3a4fcbceb5cf43451afabe5469e5f91c60052fa1 100644 --- a/packages/PEGTL/src/test/pegtl/ascii_identifier.cpp +++ b/packages/PEGTL/src/test/pegtl/ascii_identifier.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/ascii_istring.cpp b/packages/PEGTL/src/test/pegtl/ascii_istring.cpp index 06816ae859b9c4f4ba494756a8846f84537988e8..73a9e733fbc181586a27e095cb524354c5239f92 100644 --- a/packages/PEGTL/src/test/pegtl/ascii_istring.cpp +++ b/packages/PEGTL/src/test/pegtl/ascii_istring.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/ascii_keyword.cpp b/packages/PEGTL/src/test/pegtl/ascii_keyword.cpp index 023e3e16d739534be56b2255f094d1e44ac563f9..17746344dbd488e701312e6684a6adb1d1b83e80 100644 --- a/packages/PEGTL/src/test/pegtl/ascii_keyword.cpp +++ b/packages/PEGTL/src/test/pegtl/ascii_keyword.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/ascii_shebang.cpp b/packages/PEGTL/src/test/pegtl/ascii_shebang.cpp index 004852cf77b63b4da70ee2ab76e4baf48fa7f96f..57042c9a2f0c7cae8c188d8f4238e530339f48c5 100644 --- a/packages/PEGTL/src/test/pegtl/ascii_shebang.cpp +++ b/packages/PEGTL/src/test/pegtl/ascii_shebang.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/ascii_string.cpp b/packages/PEGTL/src/test/pegtl/ascii_string.cpp index a35950391b53dd03a56c5d9f152374d49b997f89..6d24356c9ac5e4d416751f8ffd724710b1ba5d80 100644 --- a/packages/PEGTL/src/test/pegtl/ascii_string.cpp +++ b/packages/PEGTL/src/test/pegtl/ascii_string.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/ascii_three.cpp b/packages/PEGTL/src/test/pegtl/ascii_three.cpp index 7ee53f663fc573a81ddad01ea6fe997919d4db45..23a9226306333bf57e75311db35c7b0c9634c5c5 100644 --- a/packages/PEGTL/src/test/pegtl/ascii_three.cpp +++ b/packages/PEGTL/src/test/pegtl/ascii_three.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/ascii_two.cpp b/packages/PEGTL/src/test/pegtl/ascii_two.cpp index 5bd48d65018608ce00539a9160557927a992b436..020954b185a013a436acb149209f4df77c207788 100644 --- a/packages/PEGTL/src/test/pegtl/ascii_two.cpp +++ b/packages/PEGTL/src/test/pegtl/ascii_two.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/buffer_input.cpp b/packages/PEGTL/src/test/pegtl/buffer_input.cpp index 752aa7251a97a6e680a8ad71d7b6e44643f20b5d..65e696151d038f015aaba5093f47b1a15f24c7d6 100644 --- a/packages/PEGTL/src/test/pegtl/buffer_input.cpp +++ b/packages/PEGTL/src/test/pegtl/buffer_input.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <string> diff --git a/packages/PEGTL/src/test/pegtl/change_action_and_state.cpp b/packages/PEGTL/src/test/pegtl/change_action_and_state.cpp index 52cbaf735de3ff7c41531d54945d3a275c19b022..ec023501315797a0baf98d5ca93e24cd5233d472 100644 --- a/packages/PEGTL/src/test/pegtl/change_action_and_state.cpp +++ b/packages/PEGTL/src/test/pegtl/change_action_and_state.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/change_action_and_states.cpp b/packages/PEGTL/src/test/pegtl/change_action_and_states.cpp index 38b889f2cfe56507f9f49aaaa22fe7b3d09665b6..1e6636b44b557dde3d08b76bd5fdbf8833c71591 100644 --- a/packages/PEGTL/src/test/pegtl/change_action_and_states.cpp +++ b/packages/PEGTL/src/test/pegtl/change_action_and_states.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/change_state.cpp b/packages/PEGTL/src/test/pegtl/change_state.cpp index 32e3da708d2704f66b98081f79ae50d4788a6031..ad06b149d9eee74c990548c8940efcd17a01c219 100644 --- a/packages/PEGTL/src/test/pegtl/change_state.cpp +++ b/packages/PEGTL/src/test/pegtl/change_state.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/change_states.cpp b/packages/PEGTL/src/test/pegtl/change_states.cpp index 0cdeb2d9af712d572fc6836f4700eddb480ef0b5..3241e3ec839703331684342079e0b35b5a6fd6d9 100644 --- a/packages/PEGTL/src/test/pegtl/change_states.cpp +++ b/packages/PEGTL/src/test/pegtl/change_states.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/contrib_alphabet.cpp b/packages/PEGTL/src/test/pegtl/contrib_alphabet.cpp index 4d0e8c35a4418b014ff6a6a6823f17dd84777c1e..fc3275f4261aca4ddecd3533fbac5f64a4549b82 100644 --- a/packages/PEGTL/src/test/pegtl/contrib_alphabet.cpp +++ b/packages/PEGTL/src/test/pegtl/contrib_alphabet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2015-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/contrib_http.cpp b/packages/PEGTL/src/test/pegtl/contrib_http.cpp index b18f328922e47fbfab840bad6dadea974685fb84..a06175ea4470130b72764ccfe6536f54c2aeb6d3 100644 --- a/packages/PEGTL/src/test/pegtl/contrib_http.cpp +++ b/packages/PEGTL/src/test/pegtl/contrib_http.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/contrib_if_then.cpp b/packages/PEGTL/src/test/pegtl/contrib_if_then.cpp index 36199ecf45a2cff08c024803c42c81d0b3989076..b81c7840c89ad7c490be8a56ccc8788067898742 100644 --- a/packages/PEGTL/src/test/pegtl/contrib_if_then.cpp +++ b/packages/PEGTL/src/test/pegtl/contrib_if_then.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/contrib_integer.cpp b/packages/PEGTL/src/test/pegtl/contrib_integer.cpp index a06d00229e79f3a6955f965a55367e436538b929..b9a2b0f0fc505c46db11c6b6590725d26c24d801 100644 --- a/packages/PEGTL/src/test/pegtl/contrib_integer.cpp +++ b/packages/PEGTL/src/test/pegtl/contrib_integer.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <limits> diff --git a/packages/PEGTL/src/test/pegtl/contrib_json.cpp b/packages/PEGTL/src/test/pegtl/contrib_json.cpp index d438385aea924cf4a8f3e8b1cb17d079d44aaa6b..21cef36375412c9f20019e93e33b838036588c3a 100644 --- a/packages/PEGTL/src/test/pegtl/contrib_json.cpp +++ b/packages/PEGTL/src/test/pegtl/contrib_json.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/contrib_parse_tree.cpp b/packages/PEGTL/src/test/pegtl/contrib_parse_tree.cpp index 2148276aca36cd15af316192b85b81a9c8884986..a4122ba6cbc5692f5fa710f345d1e24b9881db86 100644 --- a/packages/PEGTL/src/test/pegtl/contrib_parse_tree.cpp +++ b/packages/PEGTL/src/test/pegtl/contrib_parse_tree.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/contrib_partial_trace.cpp b/packages/PEGTL/src/test/pegtl/contrib_partial_trace.cpp index f4d82a1d747880960cc27e3c640e4e592401ea45..323012aaaf1c5004711d12448c39cf30812c13d5 100644 --- a/packages/PEGTL/src/test/pegtl/contrib_partial_trace.cpp +++ b/packages/PEGTL/src/test/pegtl/contrib_partial_trace.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/contrib_raw_string.cpp b/packages/PEGTL/src/test/pegtl/contrib_raw_string.cpp index f5872562166521630ff25a095ac1ab13658948dc..d0846222ea81ea65ca99c3d860c5c718d91eaade 100644 --- a/packages/PEGTL/src/test/pegtl/contrib_raw_string.cpp +++ b/packages/PEGTL/src/test/pegtl/contrib_raw_string.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/contrib_rep_one_min_max.cpp b/packages/PEGTL/src/test/pegtl/contrib_rep_one_min_max.cpp index ebfb08680611f4a86eec2685329d0abe48db7251..b190a0cca7737bf17dd160fdcff57b9f50a491df 100644 --- a/packages/PEGTL/src/test/pegtl/contrib_rep_one_min_max.cpp +++ b/packages/PEGTL/src/test/pegtl/contrib_rep_one_min_max.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/contrib_to_string.cpp b/packages/PEGTL/src/test/pegtl/contrib_to_string.cpp index 55f9d2749d28bcd704b20459e38c8d4dcaf1c2e2..f2c4b175129d340f666b8d292d08858ad1623395 100644 --- a/packages/PEGTL/src/test/pegtl/contrib_to_string.cpp +++ b/packages/PEGTL/src/test/pegtl/contrib_to_string.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/contrib_tracer.cpp b/packages/PEGTL/src/test/pegtl/contrib_tracer.cpp index 1d8ac50107ee9ba3736ea4f80e96ed7fd6274dc7..022a10d8c509625810eb4e055f6fb926707d0ef7 100644 --- a/packages/PEGTL/src/test/pegtl/contrib_tracer.cpp +++ b/packages/PEGTL/src/test/pegtl/contrib_tracer.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/contrib_unescape.cpp b/packages/PEGTL/src/test/pegtl/contrib_unescape.cpp index e962074fd26132f97301477e549f4ef79d7e921e..8bf92f2aa7e990d6a604f46ed92008abec386242 100644 --- a/packages/PEGTL/src/test/pegtl/contrib_unescape.cpp +++ b/packages/PEGTL/src/test/pegtl/contrib_unescape.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2015-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/contrib_uri.cpp b/packages/PEGTL/src/test/pegtl/contrib_uri.cpp index e9317f8cef5b3f2b0a6e3984aa2f745601d49fbb..a35ce90992ce71826711abb2d3131b629ec110a8 100644 --- a/packages/PEGTL/src/test/pegtl/contrib_uri.cpp +++ b/packages/PEGTL/src/test/pegtl/contrib_uri.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/data_cstring.cpp b/packages/PEGTL/src/test/pegtl/data_cstring.cpp index 9828c35f5c16b74da882b5416f2fa4682c04c729..4f68278240aca458f1fba9ecd8e583469b15aefb 100644 --- a/packages/PEGTL/src/test/pegtl/data_cstring.cpp +++ b/packages/PEGTL/src/test/pegtl/data_cstring.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/demangle.cpp b/packages/PEGTL/src/test/pegtl/demangle.cpp index 839b2287da7920d57feb796ca84b8c8d436f8058..ee76d1db381833e12ee8df9d72c3792c0c18eb21 100644 --- a/packages/PEGTL/src/test/pegtl/demangle.cpp +++ b/packages/PEGTL/src/test/pegtl/demangle.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/discard_input.cpp b/packages/PEGTL/src/test/pegtl/discard_input.cpp index b693db5064b94d92c7d8148672387e6db5d34f8e..3033d365db8c378dea636b55b59b7f5365eb9518 100644 --- a/packages/PEGTL/src/test/pegtl/discard_input.cpp +++ b/packages/PEGTL/src/test/pegtl/discard_input.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <string> diff --git a/packages/PEGTL/src/test/pegtl/error_message.cpp b/packages/PEGTL/src/test/pegtl/error_message.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bfc6fd30a057327d46b6058f979637521626f81a --- /dev/null +++ b/packages/PEGTL/src/test/pegtl/error_message.cpp @@ -0,0 +1,39 @@ +// Copyright (c) 2020 Dr. Colin Hirsch and Daniel Frey +// Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ + +#include "test.hpp" + +#include <string> + +namespace TAO_PEGTL_NAMESPACE +{ + namespace test1 + { + // clang-format off + struct a : one< 'a' > {}; + struct b : one< 'b' > {}; + struct foo : sor< a, b > {}; + // clang-format on + + } // namespace test1 + + // clang-format off + template<> constexpr const char* error_message< test1::a > = "test123"; + // clang-format on + + void unit_test() + { + try { + parse< test1::foo >( memory_input( "b", __FUNCTION__ ) ); + TAO_PEGTL_TEST_ASSERT( false ); + } + catch( const parse_error& e ) { + if( e.what() != std::string( "test123" ) ) { + throw; + } + } + } + +} // namespace TAO_PEGTL_NAMESPACE + +#include "main.hpp" diff --git a/packages/PEGTL/src/test/pegtl/file_cstream.cpp b/packages/PEGTL/src/test/pegtl/file_cstream.cpp index 80c0801f8c3e482f896dd1d137450268adc2a8a0..09dee3fa661e57dd240cba50eadae094673de772 100644 --- a/packages/PEGTL/src/test/pegtl/file_cstream.cpp +++ b/packages/PEGTL/src/test/pegtl/file_cstream.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <clocale> diff --git a/packages/PEGTL/src/test/pegtl/file_file.cpp b/packages/PEGTL/src/test/pegtl/file_file.cpp index 4e7da95350819f0509945d740430d6c178a695e6..c7a4a904161a549ee2e530ad17761231cc2ac1bf 100644 --- a/packages/PEGTL/src/test/pegtl/file_file.cpp +++ b/packages/PEGTL/src/test/pegtl/file_file.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2015-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/file_istream.cpp b/packages/PEGTL/src/test/pegtl/file_istream.cpp index b4862f25f62c85ed6aa2f3d30fd8705dab172c1e..17480140a7d14f1ef40b7f614a2bb86a6c22ce69 100644 --- a/packages/PEGTL/src/test/pegtl/file_istream.cpp +++ b/packages/PEGTL/src/test/pegtl/file_istream.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <cerrno> diff --git a/packages/PEGTL/src/test/pegtl/file_mmap.cpp b/packages/PEGTL/src/test/pegtl/file_mmap.cpp index c7297c1874444613468d075cb646ca34f644cc84..cd8d7ab715d201800a1899cd5fdf2e8a6c62f81b 100644 --- a/packages/PEGTL/src/test/pegtl/file_mmap.cpp +++ b/packages/PEGTL/src/test/pegtl/file_mmap.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ // this include gives us _POSIX_MAPPED_FILES to test and mmap_input<> if it is set diff --git a/packages/PEGTL/src/test/pegtl/file_read.cpp b/packages/PEGTL/src/test/pegtl/file_read.cpp index 85bd80d53a805cdee10ccff553f2293334b653c4..d074e333638cd3056c85044eafff15c149f15b0b 100644 --- a/packages/PEGTL/src/test/pegtl/file_read.cpp +++ b/packages/PEGTL/src/test/pegtl/file_read.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/internal_endian.cpp b/packages/PEGTL/src/test/pegtl/internal_endian.cpp index 0dcfa983fc90cf5708c087cfc80963e0419fefbf..6a8ab73e20cc41777526d5d385edc2ae383e31c8 100644 --- a/packages/PEGTL/src/test/pegtl/internal_endian.cpp +++ b/packages/PEGTL/src/test/pegtl/internal_endian.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <tao/pegtl/internal/endian.hpp> diff --git a/packages/PEGTL/src/test/pegtl/internal_file_mapper.cpp b/packages/PEGTL/src/test/pegtl/internal_file_mapper.cpp index be408e037a3fb16f1656e7d1a2829aa05560015d..74d8a765345e5a02b737abbbca355d8e903ee833 100644 --- a/packages/PEGTL/src/test/pegtl/internal_file_mapper.cpp +++ b/packages/PEGTL/src/test/pegtl/internal_file_mapper.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2015-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <tao/pegtl/file_input.hpp> diff --git a/packages/PEGTL/src/test/pegtl/internal_file_opener.cpp b/packages/PEGTL/src/test/pegtl/internal_file_opener.cpp index aa1134b5afe2bcc96f8ae7e4ce4ff5c794aa27c2..cb21dca72d42f021d59dc853cab95a033c9d9391 100644 --- a/packages/PEGTL/src/test/pegtl/internal_file_opener.cpp +++ b/packages/PEGTL/src/test/pegtl/internal_file_opener.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2015-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <tao/pegtl/file_input.hpp> diff --git a/packages/PEGTL/src/test/pegtl/main.hpp b/packages/PEGTL/src/test/pegtl/main.hpp index 36d548967718802562d75f340a5027a1cebd2e71..3b92ee527c403f6f0961ce2eba2b313225cb9a08 100644 --- a/packages/PEGTL/src/test/pegtl/main.hpp +++ b/packages/PEGTL/src/test/pegtl/main.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_SRC_TEST_PEGTL_MAIN_HPP diff --git a/packages/PEGTL/src/test/pegtl/pegtl_string_t.cpp b/packages/PEGTL/src/test/pegtl/pegtl_string_t.cpp index 6493b5dd531feca222af9c68bc3e6461cbb344e9..5b020bcc6e69734b461fdad19060f65659004235 100644 --- a/packages/PEGTL/src/test/pegtl/pegtl_string_t.cpp +++ b/packages/PEGTL/src/test/pegtl/pegtl_string_t.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2015-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <type_traits> diff --git a/packages/PEGTL/src/test/pegtl/position.cpp b/packages/PEGTL/src/test/pegtl/position.cpp index 1ea3ed24051583d5c99d1b8c18935ac7c7cc588a..6a999ec8a976f12e59011bb7e1ef3b9f40576ff0 100644 --- a/packages/PEGTL/src/test/pegtl/position.cpp +++ b/packages/PEGTL/src/test/pegtl/position.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/result_type.hpp b/packages/PEGTL/src/test/pegtl/result_type.hpp index 7ac9b2cb6cb1de8bfbe1b93052b8d79fded180e9..887fdde983fac1cddb8ec972ada6ba93b6601997 100644 --- a/packages/PEGTL/src/test/pegtl/result_type.hpp +++ b/packages/PEGTL/src/test/pegtl/result_type.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_SRC_TEST_PEGTL_RESULT_TYPE_HPP diff --git a/packages/PEGTL/src/test/pegtl/rule_action.cpp b/packages/PEGTL/src/test/pegtl/rule_action.cpp index c7429f89164e51e096df78a9ac5ae4889d17c05d..5273e2d24cb92526875b824083d350e8a12fa648 100644 --- a/packages/PEGTL/src/test/pegtl/rule_action.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_action.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_apply.cpp b/packages/PEGTL/src/test/pegtl/rule_apply.cpp index 7ecc776ca1e411314a2fe59c759b5271781ce8f0..21d9c20c7b84d592a4be02b11c579634ae188123 100644 --- a/packages/PEGTL/src/test/pegtl/rule_apply.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_apply.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_apply0.cpp b/packages/PEGTL/src/test/pegtl/rule_apply0.cpp index 33192af197dbba745688a74d98ed2acd85d523de..a55fe68bb687d1c8a7bc9a9f2d250c21212114a3 100644 --- a/packages/PEGTL/src/test/pegtl/rule_apply0.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_apply0.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_at.cpp b/packages/PEGTL/src/test/pegtl/rule_at.cpp index 6f73c253b658ee6452ebbe7c741934c9f677400d..c411cc6adc585e7b70b8ecefd5f9a71c5c1d215d 100644 --- a/packages/PEGTL/src/test/pegtl/rule_at.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_at.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_bof.cpp b/packages/PEGTL/src/test/pegtl/rule_bof.cpp index 3dced0655da24da5827d964f6b21fd67db5f529c..4ed27590d46200be971765d2746142e5fc526540 100644 --- a/packages/PEGTL/src/test/pegtl/rule_bof.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_bof.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_bol.cpp b/packages/PEGTL/src/test/pegtl/rule_bol.cpp index e7c8adc3996ab3373641aa2120cc309a661a1b51..ac6932c70620abef6287f558a78357c29a34a975 100644 --- a/packages/PEGTL/src/test/pegtl/rule_bol.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_bol.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_bytes.cpp b/packages/PEGTL/src/test/pegtl/rule_bytes.cpp index ad9462640cd24af2a5ea367b3c0258c179da26ce..4ee77bb6ace659640dbf34f70c1af7717d13c0a9 100644 --- a/packages/PEGTL/src/test/pegtl/rule_bytes.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_bytes.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_control.cpp b/packages/PEGTL/src/test/pegtl/rule_control.cpp index c4cc810da2165794086d10a4fd0572c3122b7e3d..251d6b6a53c2817c2031b9f5aef762b39b139e80 100644 --- a/packages/PEGTL/src/test/pegtl/rule_control.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_control.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_disable.cpp b/packages/PEGTL/src/test/pegtl/rule_disable.cpp index db15b8a1ece34ca1ac32519f454608c0d63a01e8..d0503fc6bffeac652a44046ae3145f2ce4b2fab1 100644 --- a/packages/PEGTL/src/test/pegtl/rule_disable.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_disable.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_enable.cpp b/packages/PEGTL/src/test/pegtl/rule_enable.cpp index de998a6e30c1c932a5208b2dccef0bf1fb202801..4cf0131404e346384ac1fe41feeff0326cbb4b42 100644 --- a/packages/PEGTL/src/test/pegtl/rule_enable.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_enable.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_eof.cpp b/packages/PEGTL/src/test/pegtl/rule_eof.cpp index ccb1809f14cbc2b30f7df6285ccc9b2cccf2ba8a..8c841de5cedfe746430b40082b3e547b02d393f1 100644 --- a/packages/PEGTL/src/test/pegtl/rule_eof.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_eof.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_failure.cpp b/packages/PEGTL/src/test/pegtl/rule_failure.cpp index 01105fed25200931f1a673be0a3ac04678544eb3..989c77d7fbf8da82221cf1632eeee9bc6a9ba151 100644 --- a/packages/PEGTL/src/test/pegtl/rule_failure.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_failure.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_if_apply.cpp b/packages/PEGTL/src/test/pegtl/rule_if_apply.cpp index ab9576511f4dde1586fd771a28bb188257d275e4..8b6dcb506429b3644a206e0478e7e330389caf5f 100644 --- a/packages/PEGTL/src/test/pegtl/rule_if_apply.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_if_apply.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_if_must.cpp b/packages/PEGTL/src/test/pegtl/rule_if_must.cpp index 8900d8186bae85608f0fa1c0b403ac8b8e34a5af..8b89ab7bead1274d8b8e89776f68d41a87bb5035 100644 --- a/packages/PEGTL/src/test/pegtl/rule_if_must.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_if_must.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_if_must_else.cpp b/packages/PEGTL/src/test/pegtl/rule_if_must_else.cpp index b8fe63c6ceff4b9b9f914be3343ac03ccf49a108..8fae642416e00ef4f5e67896ac93bcd9356876c4 100644 --- a/packages/PEGTL/src/test/pegtl/rule_if_must_else.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_if_must_else.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_if_then_else.cpp b/packages/PEGTL/src/test/pegtl/rule_if_then_else.cpp index 7dac12c7ba2b0f202c3f02cf5c1ff668dd136233..0b4f21917b4f6e151801de70907ed50cbcb1aae4 100644 --- a/packages/PEGTL/src/test/pegtl/rule_if_then_else.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_if_then_else.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_list.cpp b/packages/PEGTL/src/test/pegtl/rule_list.cpp index bed729ec803f4dde68c29c16af6e8c4be04c6c08..08748154bc642f35494232acec7f526c323f3fe6 100644 --- a/packages/PEGTL/src/test/pegtl/rule_list.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_list.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_list_must.cpp b/packages/PEGTL/src/test/pegtl/rule_list_must.cpp index e2f2b7fe5ee85a7168bbf8a434ec0e6ea8fd672b..980a4214dc75169bf3749003187aa520a8ccce77 100644 --- a/packages/PEGTL/src/test/pegtl/rule_list_must.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_list_must.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_list_tail.cpp b/packages/PEGTL/src/test/pegtl/rule_list_tail.cpp index 50378895c8ed348dce8e21779408d7e54c1f45c2..02b18f1c5d62ade3db9698d1a7c606fb46f9b779 100644 --- a/packages/PEGTL/src/test/pegtl/rule_list_tail.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_list_tail.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_minus.cpp b/packages/PEGTL/src/test/pegtl/rule_minus.cpp index 2fc804c7ea56311458b7c8cdc2cf85759f3a8ba2..b7c3431b30d899063fb5374d4660a33d26f83a19 100644 --- a/packages/PEGTL/src/test/pegtl/rule_minus.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_minus.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2016-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_must.cpp b/packages/PEGTL/src/test/pegtl/rule_must.cpp index 8bbdfc999590bea2a8e2d65d3ece13c56697ca9a..4140b33856e63da223db7d7219c03693922a6983 100644 --- a/packages/PEGTL/src/test/pegtl/rule_must.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_must.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_not_at.cpp b/packages/PEGTL/src/test/pegtl/rule_not_at.cpp index 4ad66acd8c743a1f9a64efdd87e579b8501f2b0a..a09bdca39749762bb294003db389c53c99980ee5 100644 --- a/packages/PEGTL/src/test/pegtl/rule_not_at.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_not_at.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_opt.cpp b/packages/PEGTL/src/test/pegtl/rule_opt.cpp index 951bdb7419da9bb262354f39d37cfe7b48aac966..72fe74551767fc17bae22669be69abb3ee194838 100644 --- a/packages/PEGTL/src/test/pegtl/rule_opt.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_opt.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_opt_must.cpp b/packages/PEGTL/src/test/pegtl/rule_opt_must.cpp index cd06deea9851f3a223e940ad46c07f237b66fb35..783b0d994cb14c8b9bda715ce80b7f527433c5c7 100644 --- a/packages/PEGTL/src/test/pegtl/rule_opt_must.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_opt_must.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_pad.cpp b/packages/PEGTL/src/test/pegtl/rule_pad.cpp index 6cb6fe5fd6e02936ea6b4d2c36b000111ed7c4ae..5e495b7d587dcb7602a3ed8c3de4e5528e2b1714 100644 --- a/packages/PEGTL/src/test/pegtl/rule_pad.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_pad.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_pad_opt.cpp b/packages/PEGTL/src/test/pegtl/rule_pad_opt.cpp index d16c5064a453a056d23bd3f80725428c57140f5c..7b63fcd7566a8e8c2182ea56821f2f7ed7aea59e 100644 --- a/packages/PEGTL/src/test/pegtl/rule_pad_opt.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_pad_opt.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_plus.cpp b/packages/PEGTL/src/test/pegtl/rule_plus.cpp index 251cf15bee1d482d2875dc94f0e30a19536a726b..6882ebfced1f7765c662060b070fff3667ab24d7 100644 --- a/packages/PEGTL/src/test/pegtl/rule_plus.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_plus.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_rematch.cpp b/packages/PEGTL/src/test/pegtl/rule_rematch.cpp index 0cc22500f9cf815a2724b8a251f774a660cb5b4d..90367d37f5037b082b597442bb6a8cafba819981 100644 --- a/packages/PEGTL/src/test/pegtl/rule_rematch.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_rematch.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_rep.cpp b/packages/PEGTL/src/test/pegtl/rule_rep.cpp index 0c54cd8512bcd14b1f17a77069c43ebb0c3eded0..d57410382c60e1940b46ea148b32990f45122fea 100644 --- a/packages/PEGTL/src/test/pegtl/rule_rep.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_rep.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_rep_max.cpp b/packages/PEGTL/src/test/pegtl/rule_rep_max.cpp index 60dfb0b341656786f7b038e6456f2755078cbd33..09b52e8587b2845cfdc5b4bba324c2675a5e48fa 100644 --- a/packages/PEGTL/src/test/pegtl/rule_rep_max.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_rep_max.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_rep_min.cpp b/packages/PEGTL/src/test/pegtl/rule_rep_min.cpp index 20a33d5ebb0ae6cac7b5d9e011837ddeaa183c76..73fc6ea3797ac73125756d4dd7ad9700d132f4ed 100644 --- a/packages/PEGTL/src/test/pegtl/rule_rep_min.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_rep_min.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_rep_min_max.cpp b/packages/PEGTL/src/test/pegtl/rule_rep_min_max.cpp index 8ad8a1119a7ec5b32f61aa4158c32fa418479d59..0833aa62c5b558f9f8bd555f272c33a3037e46cf 100644 --- a/packages/PEGTL/src/test/pegtl/rule_rep_min_max.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_rep_min_max.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_rep_opt.cpp b/packages/PEGTL/src/test/pegtl/rule_rep_opt.cpp index 2e232f769405d202a4cdaeef4a6242a7c758507f..4c66f6eac4070464a368a8c86b51dfeac70fb9a3 100644 --- a/packages/PEGTL/src/test/pegtl/rule_rep_opt.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_rep_opt.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_require.cpp b/packages/PEGTL/src/test/pegtl/rule_require.cpp index 0a8e389edb75ea31c2647f5e7551642dda3f3d58..0d2ce914743f822b7cd8cb7f31ccca0c1b02e56d 100644 --- a/packages/PEGTL/src/test/pegtl/rule_require.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_require.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_seq.cpp b/packages/PEGTL/src/test/pegtl/rule_seq.cpp index 686d6ba9c5557bb6f014c511c8cb9d055beabffb..22505494a0df37cfee9b0523ef65df5b4335d9c9 100644 --- a/packages/PEGTL/src/test/pegtl/rule_seq.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_seq.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_sor.cpp b/packages/PEGTL/src/test/pegtl/rule_sor.cpp index 01385de8477cd6c9c14590541871e5f55d431cf6..b0792b4432c7b68b6f14ac4cbe3fa87c3aa2d69c 100644 --- a/packages/PEGTL/src/test/pegtl/rule_sor.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_sor.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_star.cpp b/packages/PEGTL/src/test/pegtl/rule_star.cpp index 1689eaff6aece9b6073ccef19a1fe1f67a48e808..8cfaa6ca695a69d54eac63338bac3c5dbaa93215 100644 --- a/packages/PEGTL/src/test/pegtl/rule_star.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_star.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_star_must.cpp b/packages/PEGTL/src/test/pegtl/rule_star_must.cpp index b2300c8f723be4045371b5580dfaf9eed1e66da5..e0f863a3f45860fab3940b56f250067ef9e5d26b 100644 --- a/packages/PEGTL/src/test/pegtl/rule_star_must.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_star_must.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_state.cpp b/packages/PEGTL/src/test/pegtl/rule_state.cpp index 34560037b42abd5736d003bd36f81bd95e289dd2..52d0de2b162cff181647b39a7d01990dc50ee1f2 100644 --- a/packages/PEGTL/src/test/pegtl/rule_state.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_state.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_success.cpp b/packages/PEGTL/src/test/pegtl/rule_success.cpp index 4bd358420475731c9612eaf91f8dd00b443c0378..fcaff87acb0fd6f9562dedb90f4c7fd2ba78116e 100644 --- a/packages/PEGTL/src/test/pegtl/rule_success.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_success.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_try_catch.cpp b/packages/PEGTL/src/test/pegtl/rule_try_catch.cpp index 646aa86fdd93506bac293793ffe2f7264d1336d6..4259db331f94ed75b2ba613ff6ca262307831219 100644 --- a/packages/PEGTL/src/test/pegtl/rule_try_catch.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_try_catch.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/rule_until.cpp b/packages/PEGTL/src/test/pegtl/rule_until.cpp index 10f315c77993240f4a9dfefe4c86ac59804a7fb9..a6c288fa198c53519e882abc86fba7283d52293a 100644 --- a/packages/PEGTL/src/test/pegtl/rule_until.cpp +++ b/packages/PEGTL/src/test/pegtl/rule_until.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/test.hpp b/packages/PEGTL/src/test/pegtl/test.hpp index c0f8b3e20e3741c76d51153a201e7b28dcb4aa6e..b1b4de434c5111b4c4de4e528224c25e7875e979 100644 --- a/packages/PEGTL/src/test/pegtl/test.hpp +++ b/packages/PEGTL/src/test/pegtl/test.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_SRC_TEST_PEGTL_TEST_HPP diff --git a/packages/PEGTL/src/test/pegtl/tester.cpp b/packages/PEGTL/src/test/pegtl/tester.cpp index 42fdeceb44261b8dcd37c8b7a21cff89f281dc28..b57abd0aa4dfa4cb7b38462bc7288bc26f17c9b2 100644 --- a/packages/PEGTL/src/test/pegtl/tester.cpp +++ b/packages/PEGTL/src/test/pegtl/tester.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <iostream> diff --git a/packages/PEGTL/src/test/pegtl/uint16_general.cpp b/packages/PEGTL/src/test/pegtl/uint16_general.cpp index 18e6748eee7ab3c2ace5ab07db8c53308035084f..adff4f078e1538b6d602fc0de1ef6490ddb8a094 100644 --- a/packages/PEGTL/src/test/pegtl/uint16_general.cpp +++ b/packages/PEGTL/src/test/pegtl/uint16_general.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/uint32_general.cpp b/packages/PEGTL/src/test/pegtl/uint32_general.cpp index 4ed62de18774e756fe7e91e54941f32200bbe72a..688973b70ccffc78e2a215db67ed1944bd86e162 100644 --- a/packages/PEGTL/src/test/pegtl/uint32_general.cpp +++ b/packages/PEGTL/src/test/pegtl/uint32_general.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/uint64_general.cpp b/packages/PEGTL/src/test/pegtl/uint64_general.cpp index b32701eedc4fe67eb42a04f238f56366accc6e62..f10dd76b23dcde06994d98269d459158e8363cf9 100644 --- a/packages/PEGTL/src/test/pegtl/uint64_general.cpp +++ b/packages/PEGTL/src/test/pegtl/uint64_general.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/uint8_general.cpp b/packages/PEGTL/src/test/pegtl/uint8_general.cpp index 75ec3268a711a38a787f0968d1c24f7a5c6fa062..bb9d6471b6e42237add11f4f85939f3b6864ee9f 100644 --- a/packages/PEGTL/src/test/pegtl/uint8_general.cpp +++ b/packages/PEGTL/src/test/pegtl/uint8_general.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/utf16_general.cpp b/packages/PEGTL/src/test/pegtl/utf16_general.cpp index 74a3c6ffdec97e91f152eef1b40c2c96f110acb5..9ca27052cd4910e8cb3d87e63c5767ef76fa9d82 100644 --- a/packages/PEGTL/src/test/pegtl/utf16_general.cpp +++ b/packages/PEGTL/src/test/pegtl/utf16_general.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2015-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/utf32_general.cpp b/packages/PEGTL/src/test/pegtl/utf32_general.cpp index 994275760ff11afd43b6e3e402a99be43e076d50..cdc38efee230708d34aa8096edf80ee479a3fad8 100644 --- a/packages/PEGTL/src/test/pegtl/utf32_general.cpp +++ b/packages/PEGTL/src/test/pegtl/utf32_general.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/utf8_general.cpp b/packages/PEGTL/src/test/pegtl/utf8_general.cpp index fe0f85f415bb64d818e660be33bbad6125bd7f8a..6ac8b6631c611668d98ff5447cfa49f00971c5c5 100644 --- a/packages/PEGTL/src/test/pegtl/utf8_general.cpp +++ b/packages/PEGTL/src/test/pegtl/utf8_general.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" diff --git a/packages/PEGTL/src/test/pegtl/verify_analyze.hpp b/packages/PEGTL/src/test/pegtl/verify_analyze.hpp index 957184bf59d8bd2f7e8a04a470ccc1515b8fa16e..5441287cb08f9e82329ad866e29626c38c1b4941 100644 --- a/packages/PEGTL/src/test/pegtl/verify_analyze.hpp +++ b/packages/PEGTL/src/test/pegtl/verify_analyze.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_SRC_TEST_PEGTL_VERIFY_ANALYZE_HPP diff --git a/packages/PEGTL/src/test/pegtl/verify_char.hpp b/packages/PEGTL/src/test/pegtl/verify_char.hpp index 5129a2fa28b5075a1e2bab4edc5fca58c0b42bdc..3d2c4b793e8457d11ed1e4ce2a9fe679fc3478e4 100644 --- a/packages/PEGTL/src/test/pegtl/verify_char.hpp +++ b/packages/PEGTL/src/test/pegtl/verify_char.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_SRC_TEST_PEGTL_VERIFY_CHAR_HPP diff --git a/packages/PEGTL/src/test/pegtl/verify_fail.hpp b/packages/PEGTL/src/test/pegtl/verify_fail.hpp index c46b3f424f4e36f00e58666ef30ca66f8aef9a41..07269fdfbbdb3986e5585aaf8b346838bdc4fd98 100644 --- a/packages/PEGTL/src/test/pegtl/verify_fail.hpp +++ b/packages/PEGTL/src/test/pegtl/verify_fail.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2015-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_SRC_TEST_PEGTL_VERIFY_FAIL_HPP diff --git a/packages/PEGTL/src/test/pegtl/verify_file.hpp b/packages/PEGTL/src/test/pegtl/verify_file.hpp index 93ba5afde5fce46bcb2984520805b4580c44d935..15ebe78a1421e4fbb7242f059ea0e874e158a258 100644 --- a/packages/PEGTL/src/test/pegtl/verify_file.hpp +++ b/packages/PEGTL/src/test/pegtl/verify_file.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_SRC_TEST_PEGTL_VERIFY_FILE_HPP diff --git a/packages/PEGTL/src/test/pegtl/verify_ifmt.hpp b/packages/PEGTL/src/test/pegtl/verify_ifmt.hpp index b7d107dc763499d88117ca78611704662ff6a1ce..ac9368178f87a178b186d7fd68c8334a1d42c30f 100644 --- a/packages/PEGTL/src/test/pegtl/verify_ifmt.hpp +++ b/packages/PEGTL/src/test/pegtl/verify_ifmt.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_SRC_TEST_PEGTL_VERIFY_IFMT_HPP diff --git a/packages/PEGTL/src/test/pegtl/verify_impl.hpp b/packages/PEGTL/src/test/pegtl/verify_impl.hpp index d6cfe56263a7f6275a0f95d429f4688b77ac7da7..b09aec0a0fc7b058ef53643feacd0b2539457283 100644 --- a/packages/PEGTL/src/test/pegtl/verify_impl.hpp +++ b/packages/PEGTL/src/test/pegtl/verify_impl.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_SRC_TEST_PEGTL_VERIFY_IMPL_HPP diff --git a/packages/PEGTL/src/test/pegtl/verify_rule.hpp b/packages/PEGTL/src/test/pegtl/verify_rule.hpp index 65e1ba6d719335aa2bca93114be654e9c034d831..2c7b0006c679f1862108a79fe3bb2f5408051b95 100644 --- a/packages/PEGTL/src/test/pegtl/verify_rule.hpp +++ b/packages/PEGTL/src/test/pegtl/verify_rule.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_SRC_TEST_PEGTL_VERIFY_RULE_HPP diff --git a/packages/PEGTL/src/test/pegtl/verify_seqs.hpp b/packages/PEGTL/src/test/pegtl/verify_seqs.hpp index e253bef82f703941223c0e953f17d7c5cf21c516..82d84b0e8bd026a56d2fb0d911f2e27e4ba10fa4 100644 --- a/packages/PEGTL/src/test/pegtl/verify_seqs.hpp +++ b/packages/PEGTL/src/test/pegtl/verify_seqs.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey +// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_SRC_TEST_PEGTL_VERIFY_SEQS_HPP