From 8fbca7da98c89a76cb8f9fbd1de70b987cfd41e7 Mon Sep 17 00:00:00 2001 From: Stephane Del Pino <stephane.delpino44@gmail.com> Date: Fri, 3 Apr 2020 08:35:35 +0200 Subject: [PATCH] git subrepo pull packages/PEGTL subrepo: subdir: "packages/PEGTL" merged: "bbe0c12c" upstream: origin: "git@github.com:taocpp/PEGTL.git" branch: "master" commit: "bbe0c12c" git-subrepo: version: "0.4.1" origin: "git@github.com:ingydotnet/git-subrepo.git" commit: "a04d8c2" --- packages/PEGTL/.appveyor.yml | 15 - packages/PEGTL/.conan/build.py | 78 -- .../PEGTL/.conan/test_package/CMakeLists.txt | 12 - .../PEGTL/.conan/test_package/conanfile.py | 20 - .../.conan/test_package/test_package.cpp | 355 ----- packages/PEGTL/.gitrepo | 6 +- packages/PEGTL/.travis.yml | 14 +- packages/PEGTL/LICENSE | 2 +- packages/PEGTL/Makefile | 2 +- packages/PEGTL/README.md | 14 +- packages/PEGTL/conanfile.py | 31 - packages/PEGTL/doc/Actions-and-States.md | 2 +- packages/PEGTL/doc/Changelog.md | 3 +- packages/PEGTL/doc/Contrib-and-Examples.md | 2 +- packages/PEGTL/doc/Control-and-Debug.md | 2 +- packages/PEGTL/doc/Errors-and-Exceptions.md | 15 +- packages/PEGTL/doc/Getting-Started.md | 4 +- packages/PEGTL/doc/Grammar-Analysis.md | 2 +- packages/PEGTL/doc/Inputs-and-Parsing.md | 2 +- packages/PEGTL/doc/Installing-and-Using.md | 26 +- packages/PEGTL/doc/Migration-Guide.md | 2 +- packages/PEGTL/doc/Parse-Tree.md | 2 +- packages/PEGTL/doc/Performance-Notes.md | 2 +- packages/PEGTL/doc/README.md | 2 +- packages/PEGTL/doc/Rule-Reference.md | 2 +- packages/PEGTL/doc/Rules-and-Grammars.md | 2 +- packages/PEGTL/include/tao/pegtl.hpp | 2 +- .../tao/pegtl/analysis/analyze_cycles.hpp | 2 +- .../include/tao/pegtl/analysis/counted.hpp | 2 +- .../include/tao/pegtl/analysis/generic.hpp | 2 +- .../tao/pegtl/analysis/grammar_info.hpp | 2 +- .../tao/pegtl/analysis/insert_guard.hpp | 2 +- .../tao/pegtl/analysis/insert_rules.hpp | 2 +- .../include/tao/pegtl/analysis/rule_info.hpp | 2 +- .../include/tao/pegtl/analysis/rule_type.hpp | 2 +- packages/PEGTL/include/tao/pegtl/analyze.hpp | 2 +- .../PEGTL/include/tao/pegtl/apply_mode.hpp | 2 +- .../PEGTL/include/tao/pegtl/argv_input.hpp | 2 +- packages/PEGTL/include/tao/pegtl/ascii.hpp | 2 +- .../PEGTL/include/tao/pegtl/buffer_input.hpp | 2 +- .../PEGTL/include/tao/pegtl/change_action.hpp | 2 +- .../tao/pegtl/change_action_and_state.hpp | 2 +- .../tao/pegtl/change_action_and_states.hpp | 2 +- .../include/tao/pegtl/change_control.hpp | 2 +- .../PEGTL/include/tao/pegtl/change_state.hpp | 2 +- .../PEGTL/include/tao/pegtl/change_states.hpp | 2 +- packages/PEGTL/include/tao/pegtl/config.hpp | 2 +- .../PEGTL/include/tao/pegtl/contrib/abnf.hpp | 2 +- .../include/tao/pegtl/contrib/alphabet.hpp | 2 +- .../include/tao/pegtl/contrib/counter.hpp | 2 +- .../PEGTL/include/tao/pegtl/contrib/http.hpp | 2 +- .../tao/pegtl/contrib/icu/internal.hpp | 2 +- .../include/tao/pegtl/contrib/icu/utf16.hpp | 2 +- .../include/tao/pegtl/contrib/icu/utf32.hpp | 2 +- .../include/tao/pegtl/contrib/icu/utf8.hpp | 2 +- .../include/tao/pegtl/contrib/if_then.hpp | 2 +- .../include/tao/pegtl/contrib/integer.hpp | 2 +- .../PEGTL/include/tao/pegtl/contrib/json.hpp | 2 +- .../tao/pegtl/contrib/json_pointer.hpp | 2 +- .../include/tao/pegtl/contrib/parse_tree.hpp | 44 +- .../tao/pegtl/contrib/parse_tree_to_dot.hpp | 2 +- .../include/tao/pegtl/contrib/raw_string.hpp | 14 +- .../tao/pegtl/contrib/remove_first_state.hpp | 2 +- .../tao/pegtl/contrib/rep_one_min_max.hpp | 2 +- .../include/tao/pegtl/contrib/rep_string.hpp | 2 +- .../include/tao/pegtl/contrib/to_string.hpp | 2 +- .../include/tao/pegtl/contrib/tracer.hpp | 2 +- .../include/tao/pegtl/contrib/unescape.hpp | 2 +- .../PEGTL/include/tao/pegtl/contrib/uri.hpp | 2 +- .../PEGTL/include/tao/pegtl/cstream_input.hpp | 2 +- .../include/tao/pegtl/disable_action.hpp | 2 +- .../PEGTL/include/tao/pegtl/discard_input.hpp | 2 +- .../tao/pegtl/discard_input_on_failure.hpp | 2 +- .../tao/pegtl/discard_input_on_success.hpp | 2 +- .../PEGTL/include/tao/pegtl/enable_action.hpp | 2 +- packages/PEGTL/include/tao/pegtl/eol.hpp | 2 +- packages/PEGTL/include/tao/pegtl/eol_pair.hpp | 2 +- .../PEGTL/include/tao/pegtl/file_input.hpp | 2 +- .../include/tao/pegtl/internal/action.hpp | 12 +- .../tao/pegtl/internal/action_input.hpp | 2 +- .../include/tao/pegtl/internal/alnum.hpp | 2 +- .../include/tao/pegtl/internal/alpha.hpp | 2 +- .../tao/pegtl/internal/always_false.hpp | 2 +- .../PEGTL/include/tao/pegtl/internal/any.hpp | 2 +- .../include/tao/pegtl/internal/apply.hpp | 2 +- .../include/tao/pegtl/internal/apply0.hpp | 2 +- .../tao/pegtl/internal/apply0_single.hpp | 2 +- .../tao/pegtl/internal/apply_single.hpp | 2 +- .../PEGTL/include/tao/pegtl/internal/at.hpp | 18 +- .../PEGTL/include/tao/pegtl/internal/bof.hpp | 2 +- .../PEGTL/include/tao/pegtl/internal/bol.hpp | 2 +- .../PEGTL/include/tao/pegtl/internal/bump.hpp | 2 +- .../include/tao/pegtl/internal/bump_help.hpp | 2 +- .../include/tao/pegtl/internal/bytes.hpp | 2 +- .../include/tao/pegtl/internal/control.hpp | 12 +- .../tao/pegtl/internal/cr_crlf_eol.hpp | 2 +- .../include/tao/pegtl/internal/cr_eol.hpp | 2 +- .../include/tao/pegtl/internal/crlf_eol.hpp | 2 +- .../tao/pegtl/internal/cstream_reader.hpp | 2 +- .../tao/pegtl/internal/cstring_reader.hpp | 2 +- .../include/tao/pegtl/internal/demangle.hpp | 16 +- .../include/tao/pegtl/internal/disable.hpp | 12 +- .../include/tao/pegtl/internal/discard.hpp | 2 +- .../include/tao/pegtl/internal/dusel_mode.hpp | 2 +- .../tao/pegtl/internal/duseltronik.hpp | 2 +- .../include/tao/pegtl/internal/enable.hpp | 12 +- .../include/tao/pegtl/internal/endian.hpp | 2 +- .../include/tao/pegtl/internal/endian_gcc.hpp | 2 +- .../include/tao/pegtl/internal/endian_win.hpp | 2 +- .../PEGTL/include/tao/pegtl/internal/eof.hpp | 2 +- .../PEGTL/include/tao/pegtl/internal/eol.hpp | 2 +- .../PEGTL/include/tao/pegtl/internal/eolf.hpp | 2 +- .../tao/pegtl/internal/file_mapper_posix.hpp | 2 +- .../tao/pegtl/internal/file_mapper_win32.hpp | 2 +- .../tao/pegtl/internal/file_opener.hpp | 2 +- .../tao/pegtl/internal/file_reader.hpp | 2 +- .../include/tao/pegtl/internal/has_apply.hpp | 2 +- .../include/tao/pegtl/internal/has_apply0.hpp | 2 +- .../include/tao/pegtl/internal/has_match.hpp | 2 +- .../include/tao/pegtl/internal/identifier.hpp | 2 +- .../include/tao/pegtl/internal/if_apply.hpp | 2 +- .../include/tao/pegtl/internal/if_must.hpp | 4 +- .../tao/pegtl/internal/if_must_else.hpp | 2 +- .../tao/pegtl/internal/if_then_else.hpp | 2 +- .../include/tao/pegtl/internal/input_pair.hpp | 2 +- .../tao/pegtl/internal/istream_reader.hpp | 2 +- .../include/tao/pegtl/internal/istring.hpp | 2 +- .../include/tao/pegtl/internal/iterator.hpp | 2 +- .../tao/pegtl/internal/lf_crlf_eol.hpp | 2 +- .../include/tao/pegtl/internal/lf_eol.hpp | 2 +- .../PEGTL/include/tao/pegtl/internal/list.hpp | 2 +- .../include/tao/pegtl/internal/list_must.hpp | 2 +- .../include/tao/pegtl/internal/list_tail.hpp | 2 +- .../tao/pegtl/internal/list_tail_pad.hpp | 2 +- .../include/tao/pegtl/internal/marker.hpp | 2 +- .../tao/pegtl/internal/missing_apply.hpp | 2 +- .../tao/pegtl/internal/missing_apply0.hpp | 2 +- .../PEGTL/include/tao/pegtl/internal/must.hpp | 21 +- .../include/tao/pegtl/internal/not_at.hpp | 18 +- .../PEGTL/include/tao/pegtl/internal/one.hpp | 2 +- .../PEGTL/include/tao/pegtl/internal/opt.hpp | 18 +- .../PEGTL/include/tao/pegtl/internal/pad.hpp | 2 +- .../include/tao/pegtl/internal/pad_opt.hpp | 2 +- .../include/tao/pegtl/internal/peek_char.hpp | 2 +- .../tao/pegtl/internal/peek_mask_uint.hpp | 2 +- .../tao/pegtl/internal/peek_mask_uint8.hpp | 2 +- .../include/tao/pegtl/internal/peek_uint.hpp | 2 +- .../include/tao/pegtl/internal/peek_uint8.hpp | 2 +- .../include/tao/pegtl/internal/peek_utf16.hpp | 2 +- .../include/tao/pegtl/internal/peek_utf32.hpp | 2 +- .../include/tao/pegtl/internal/peek_utf8.hpp | 2 +- .../tao/pegtl/internal/pegtl_string.hpp | 2 +- .../PEGTL/include/tao/pegtl/internal/plus.hpp | 12 +- .../include/tao/pegtl/internal/raise.hpp | 2 +- .../include/tao/pegtl/internal/range.hpp | 2 +- .../include/tao/pegtl/internal/ranges.hpp | 2 +- .../include/tao/pegtl/internal/read_uint.hpp | 2 +- .../include/tao/pegtl/internal/rematch.hpp | 2 +- .../PEGTL/include/tao/pegtl/internal/rep.hpp | 25 +- .../include/tao/pegtl/internal/rep_min.hpp | 2 +- .../tao/pegtl/internal/rep_min_max.hpp | 28 +- .../include/tao/pegtl/internal/rep_opt.hpp | 12 +- .../include/tao/pegtl/internal/require.hpp | 2 +- .../tao/pegtl/internal/result_on_found.hpp | 2 +- .../include/tao/pegtl/internal/rules.hpp | 2 +- .../PEGTL/include/tao/pegtl/internal/seq.hpp | 2 +- .../tao/pegtl/internal/skip_control.hpp | 2 +- .../PEGTL/include/tao/pegtl/internal/sor.hpp | 2 +- .../PEGTL/include/tao/pegtl/internal/star.hpp | 11 +- .../include/tao/pegtl/internal/star_must.hpp | 2 +- .../include/tao/pegtl/internal/state.hpp | 12 +- .../include/tao/pegtl/internal/string.hpp | 2 +- .../include/tao/pegtl/internal/trivial.hpp | 2 +- .../tao/pegtl/internal/try_catch_type.hpp | 18 +- .../include/tao/pegtl/internal/until.hpp | 15 +- .../PEGTL/include/tao/pegtl/istream_input.hpp | 2 +- packages/PEGTL/include/tao/pegtl/match.hpp | 2 +- .../PEGTL/include/tao/pegtl/memory_input.hpp | 4 +- .../PEGTL/include/tao/pegtl/mmap_input.hpp | 2 +- packages/PEGTL/include/tao/pegtl/normal.hpp | 22 +- packages/PEGTL/include/tao/pegtl/nothing.hpp | 2 +- packages/PEGTL/include/tao/pegtl/parse.hpp | 2 +- .../PEGTL/include/tao/pegtl/parse_error.hpp | 2 +- packages/PEGTL/include/tao/pegtl/position.hpp | 2 +- .../PEGTL/include/tao/pegtl/read_input.hpp | 2 +- .../PEGTL/include/tao/pegtl/require_apply.hpp | 2 +- .../include/tao/pegtl/require_apply0.hpp | 2 +- .../PEGTL/include/tao/pegtl/rewind_mode.hpp | 2 +- packages/PEGTL/include/tao/pegtl/rules.hpp | 2 +- .../PEGTL/include/tao/pegtl/string_input.hpp | 2 +- .../PEGTL/include/tao/pegtl/tracking_mode.hpp | 2 +- packages/PEGTL/include/tao/pegtl/uint16.hpp | 2 +- packages/PEGTL/include/tao/pegtl/uint32.hpp | 2 +- packages/PEGTL/include/tao/pegtl/uint64.hpp | 2 +- packages/PEGTL/include/tao/pegtl/uint8.hpp | 2 +- packages/PEGTL/include/tao/pegtl/utf16.hpp | 2 +- packages/PEGTL/include/tao/pegtl/utf32.hpp | 2 +- packages/PEGTL/include/tao/pegtl/utf8.hpp | 2 +- packages/PEGTL/include/tao/pegtl/version.hpp | 2 +- .../PEGTL/src/example/pegtl/abnf2pegtl.cpp | 1160 +++++++++-------- packages/PEGTL/src/example/pegtl/analyze.cpp | 2 +- .../PEGTL/src/example/pegtl/calculator.cpp | 2 +- .../src/example/pegtl/chomsky_hierarchy.cpp | 2 +- packages/PEGTL/src/example/pegtl/csv1.cpp | 2 +- packages/PEGTL/src/example/pegtl/csv2.cpp | 2 +- packages/PEGTL/src/example/pegtl/double.hpp | 2 +- .../PEGTL/src/example/pegtl/dynamic_match.cpp | 2 +- .../PEGTL/src/example/pegtl/hello_world.cpp | 2 +- .../PEGTL/src/example/pegtl/indent_aware.cpp | 2 +- .../PEGTL/src/example/pegtl/json_build.cpp | 2 +- .../PEGTL/src/example/pegtl/json_classes.hpp | 2 +- .../PEGTL/src/example/pegtl/json_count.cpp | 2 +- .../PEGTL/src/example/pegtl/json_errors.hpp | 2 +- .../PEGTL/src/example/pegtl/json_parse.cpp | 2 +- .../PEGTL/src/example/pegtl/json_unescape.hpp | 2 +- .../PEGTL/src/example/pegtl/lua53_parse.cpp | 2 +- .../PEGTL/src/example/pegtl/modulus_match.cpp | 2 +- .../PEGTL/src/example/pegtl/parse_tree.cpp | 73 +- .../example/pegtl/parse_tree_user_state.cpp | 2 +- packages/PEGTL/src/example/pegtl/proto3.cpp | 2 +- packages/PEGTL/src/example/pegtl/recover.cpp | 2 +- .../PEGTL/src/example/pegtl/s_expression.cpp | 2 +- packages/PEGTL/src/example/pegtl/sum.cpp | 2 +- .../PEGTL/src/example/pegtl/symbol_table.cpp | 2 +- packages/PEGTL/src/example/pegtl/unescape.cpp | 2 +- packages/PEGTL/src/example/pegtl/uri.cpp | 2 +- .../PEGTL/src/example/pegtl/uri_trace.cpp | 2 +- packages/PEGTL/src/test/pegtl/CMakeLists.txt | 1 + .../PEGTL/src/test/pegtl/action_enable.cpp | 2 +- .../PEGTL/src/test/pegtl/action_match.cpp | 2 +- packages/PEGTL/src/test/pegtl/actions_one.cpp | 2 +- .../PEGTL/src/test/pegtl/actions_three.cpp | 2 +- packages/PEGTL/src/test/pegtl/actions_two.cpp | 2 +- .../PEGTL/src/test/pegtl/analyze_cycles.cpp | 2 +- packages/PEGTL/src/test/pegtl/argv_input.cpp | 2 +- .../PEGTL/src/test/pegtl/ascii_classes.cpp | 2 +- packages/PEGTL/src/test/pegtl/ascii_eol.cpp | 2 +- packages/PEGTL/src/test/pegtl/ascii_eolf.cpp | 2 +- .../PEGTL/src/test/pegtl/ascii_forty_two.cpp | 2 +- .../PEGTL/src/test/pegtl/ascii_identifier.cpp | 2 +- .../PEGTL/src/test/pegtl/ascii_istring.cpp | 2 +- .../PEGTL/src/test/pegtl/ascii_keyword.cpp | 2 +- .../PEGTL/src/test/pegtl/ascii_shebang.cpp | 2 +- .../PEGTL/src/test/pegtl/ascii_string.cpp | 2 +- packages/PEGTL/src/test/pegtl/ascii_three.cpp | 2 +- packages/PEGTL/src/test/pegtl/ascii_two.cpp | 2 +- .../PEGTL/src/test/pegtl/buffer_input.cpp | 2 +- .../test/pegtl/change_action_and_state.cpp | 2 +- .../test/pegtl/change_action_and_states.cpp | 2 +- .../PEGTL/src/test/pegtl/change_state.cpp | 2 +- .../PEGTL/src/test/pegtl/change_states.cpp | 2 +- .../PEGTL/src/test/pegtl/contrib_alphabet.cpp | 2 +- .../PEGTL/src/test/pegtl/contrib_http.cpp | 2 +- .../PEGTL/src/test/pegtl/contrib_if_then.cpp | 2 +- .../PEGTL/src/test/pegtl/contrib_integer.cpp | 2 +- .../PEGTL/src/test/pegtl/contrib_json.cpp | 2 +- .../src/test/pegtl/contrib_parse_tree.cpp | 2 +- .../src/test/pegtl/contrib_partial_trace.cpp | 2 +- .../src/test/pegtl/contrib_raw_string.cpp | 2 +- .../test/pegtl/contrib_rep_one_min_max.cpp | 2 +- .../src/test/pegtl/contrib_to_string.cpp | 2 +- .../PEGTL/src/test/pegtl/contrib_tracer.cpp | 2 +- .../PEGTL/src/test/pegtl/contrib_unescape.cpp | 2 +- packages/PEGTL/src/test/pegtl/contrib_uri.cpp | 2 +- .../PEGTL/src/test/pegtl/data_cstring.cpp | 2 +- packages/PEGTL/src/test/pegtl/demangle.cpp | 2 +- .../PEGTL/src/test/pegtl/discard_input.cpp | 2 +- .../PEGTL/src/test/pegtl/error_message.cpp | 39 + .../PEGTL/src/test/pegtl/file_cstream.cpp | 2 +- packages/PEGTL/src/test/pegtl/file_file.cpp | 2 +- .../PEGTL/src/test/pegtl/file_istream.cpp | 2 +- packages/PEGTL/src/test/pegtl/file_mmap.cpp | 2 +- packages/PEGTL/src/test/pegtl/file_read.cpp | 2 +- .../PEGTL/src/test/pegtl/internal_endian.cpp | 2 +- .../src/test/pegtl/internal_file_mapper.cpp | 2 +- .../src/test/pegtl/internal_file_opener.cpp | 2 +- packages/PEGTL/src/test/pegtl/main.hpp | 2 +- .../PEGTL/src/test/pegtl/pegtl_string_t.cpp | 2 +- packages/PEGTL/src/test/pegtl/position.cpp | 2 +- packages/PEGTL/src/test/pegtl/result_type.hpp | 2 +- packages/PEGTL/src/test/pegtl/rule_action.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_apply.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_apply0.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_at.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_bof.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_bol.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_bytes.cpp | 2 +- .../PEGTL/src/test/pegtl/rule_control.cpp | 2 +- .../PEGTL/src/test/pegtl/rule_disable.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_enable.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_eof.cpp | 2 +- .../PEGTL/src/test/pegtl/rule_failure.cpp | 2 +- .../PEGTL/src/test/pegtl/rule_if_apply.cpp | 2 +- .../PEGTL/src/test/pegtl/rule_if_must.cpp | 2 +- .../src/test/pegtl/rule_if_must_else.cpp | 2 +- .../src/test/pegtl/rule_if_then_else.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_list.cpp | 2 +- .../PEGTL/src/test/pegtl/rule_list_must.cpp | 2 +- .../PEGTL/src/test/pegtl/rule_list_tail.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_minus.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_must.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_not_at.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_opt.cpp | 2 +- .../PEGTL/src/test/pegtl/rule_opt_must.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_pad.cpp | 2 +- .../PEGTL/src/test/pegtl/rule_pad_opt.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_plus.cpp | 2 +- .../PEGTL/src/test/pegtl/rule_rematch.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_rep.cpp | 2 +- .../PEGTL/src/test/pegtl/rule_rep_max.cpp | 2 +- .../PEGTL/src/test/pegtl/rule_rep_min.cpp | 2 +- .../PEGTL/src/test/pegtl/rule_rep_min_max.cpp | 2 +- .../PEGTL/src/test/pegtl/rule_rep_opt.cpp | 2 +- .../PEGTL/src/test/pegtl/rule_require.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_seq.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_sor.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_star.cpp | 2 +- .../PEGTL/src/test/pegtl/rule_star_must.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_state.cpp | 2 +- .../PEGTL/src/test/pegtl/rule_success.cpp | 2 +- .../PEGTL/src/test/pegtl/rule_try_catch.cpp | 2 +- packages/PEGTL/src/test/pegtl/rule_until.cpp | 2 +- packages/PEGTL/src/test/pegtl/test.hpp | 2 +- packages/PEGTL/src/test/pegtl/tester.cpp | 2 +- .../PEGTL/src/test/pegtl/uint16_general.cpp | 2 +- .../PEGTL/src/test/pegtl/uint32_general.cpp | 2 +- .../PEGTL/src/test/pegtl/uint64_general.cpp | 2 +- .../PEGTL/src/test/pegtl/uint8_general.cpp | 2 +- .../PEGTL/src/test/pegtl/utf16_general.cpp | 2 +- .../PEGTL/src/test/pegtl/utf32_general.cpp | 2 +- .../PEGTL/src/test/pegtl/utf8_general.cpp | 2 +- .../PEGTL/src/test/pegtl/verify_analyze.hpp | 2 +- packages/PEGTL/src/test/pegtl/verify_char.hpp | 2 +- packages/PEGTL/src/test/pegtl/verify_fail.hpp | 2 +- packages/PEGTL/src/test/pegtl/verify_file.hpp | 2 +- packages/PEGTL/src/test/pegtl/verify_ifmt.hpp | 2 +- packages/PEGTL/src/test/pegtl/verify_impl.hpp | 2 +- packages/PEGTL/src/test/pegtl/verify_rule.hpp | 2 +- packages/PEGTL/src/test/pegtl/verify_seqs.hpp | 2 +- 339 files changed, 1251 insertions(+), 1575 deletions(-) delete mode 100644 packages/PEGTL/.conan/build.py delete mode 100644 packages/PEGTL/.conan/test_package/CMakeLists.txt delete mode 100644 packages/PEGTL/.conan/test_package/conanfile.py delete mode 100644 packages/PEGTL/.conan/test_package/test_package.cpp delete mode 100644 packages/PEGTL/conanfile.py create mode 100644 packages/PEGTL/src/test/pegtl/error_message.cpp diff --git a/packages/PEGTL/.appveyor.yml b/packages/PEGTL/.appveyor.yml index c144d3ce1..716434a30 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 d558f1f9c..000000000 --- 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 33bc5e0f8..000000000 --- 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 fc54c64a6..000000000 --- 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 9e641193a..000000000 --- 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 50937092f..57a70bcf7 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 180816260..b276d70b5 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 378c177b9..17d3ad29c 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 f6c799b56..692ba2392 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 7c3354e5c..1f8a3df3b 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 39ae05aa1..000000000 --- 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 0f65e5593..0045ef7b4 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 078aadc89..d1e9c0d74 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 7f844ad13..7afc0fe8e 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 af5ef5a67..e6581e30d 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 d632031ea..eb0425684 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 aa87cda47..9681ece20 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 ad9070ce9..74e181c57 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 ba7b9d362..55a766969 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 7b73f2236..8338d8d36 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 a63ee5b5e..ccbe64dad 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 c7486df66..80d10aac2 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 43198177d..97cdfd8a5 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 b5b00b794..2de138962 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 8ac40c7eb..8e1281018 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 f577ad97d..58905c153 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 832fc9eae..d20c4e3e4 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 0b8e60edf..e62cbcc2c 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 e2ac6fb24..face1897a 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 e41816b98..17c002be8 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 d25a701d9..9cfdd3870 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 1fb00503c..727e976aa 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 617031a63..8f636e429 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 0f06950bd..576163a1d 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 ec1f29c91..c598c1c37 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 d0e0641ce..fc766944c 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 144f0cb79..962d4f00d 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 48da34967..f727442b8 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 b28cc350a..e376e7bbb 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 b83af7956..f96478776 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 bd73db852..fdef488a7 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 84a174f17..5ce3a0506 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 1fb3b3de5..ae700726d 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 cef670118..11e9c5513 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 9e3568e94..2b2093cc0 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 2a907356b..d1570a7a8 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 bb63adfc5..2a6763882 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 f90d6b949..618c68c61 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 942c6e1c1..91747dd90 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 e3a9e7269..04e8762d0 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 329035cac..c4a60d614 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 c71bac342..80c0538ac 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 316eb84c3..24a8c23ce 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 8c7189edf..9d9332308 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 7c7cc5573..4df896778 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 63e4e9c96..fa50ccd8a 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 fe1fd1ee8..7d93d8cab 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 565f9ee7d..5ae8326ef 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 d03c8364e..9732f705e 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 222e127fd..a6f70b490 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 dc471d5af..46abc9e0e 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 968ebc791..92a62fee5 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 df03abfea..4933a735e 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 3f85f5817..ee8c7515b 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 bd699ce8e..fd1607cd2 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 0cc8ea625..5df1a2fea 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 3075b7467..c06968f76 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 bdd6e1169..3d185983c 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 2a391bd69..a15836f58 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 d31a3add1..54e62feef 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 1832625ed..b3b1bb061 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 d8a652e13..9f9c23c7c 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 917ab22d2..da7af0a7d 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 1c2ec0cc9..201b09554 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 f0a52e6bf..f51a39bb7 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 927cd3e53..4eeaeba1b 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 4c7f76c12..f52198b52 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 3c04e9aca..d54db990f 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 c6cd4d1d3..7dc03e47f 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 add66f9c4..91b69de80 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 459fd3aab..45704b904 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 ddc7cf5fb..b1591d92b 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 339ab498b..23d72dfa0 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 e20c55bc5..d3f4d887c 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 983ad56f4..0b8b51f66 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 bbc43a18a..70b1df947 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 73a6f1ac0..0c8da5ddd 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 85dc0b598..8a1b54f08 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 e46a85750..8e360c8a1 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 53b8e59c4..de82db375 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 e58d239f3..691908fd3 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 293b1bbfd..74a1a7d7c 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 37b60cd2f..f6420c3ce 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 9289d0f42..7d6a4e630 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 afc30a675..8197becd7 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 ff902142c..0b1431788 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 cf7d7e07f..e9ed68492 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 017076f6d..b9104d998 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 1d436eaf5..f22fb08fa 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 a1f2db454..71947aa72 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 a04cf75d7..183134309 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 10e878d31..556220d35 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 ffd5ff431..410cfb683 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 3a40eba3a..dadba2630 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 c5ab5c6fa..d6bb64bd5 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 7da5fb80e..88e3ee176 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 758dec29f..6be1b0053 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 cde736815..776b3cc31 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 1a2f1ad4e..ae3aab5be 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 bce5fe267..30f053ef4 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 d764bccc0..e6b22dcca 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 6e9299686..231a7ab40 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 af76c4ca5..bf77dccaf 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 a705da097..80686ae3f 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 f25ae0d15..801e735aa 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 b5309f846..8c69d4dec 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 2c91aed89..20a8c603d 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 b2319e8ce..deaa13732 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 08186d622..6b02244a6 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 ce666df2b..f75eebd14 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 03f0cf8a0..5c1e4ea60 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 8b4bf328d..7786f614e 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 932ed2ac1..ab68991b7 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 88a889311..114300ef2 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 976e3eb53..78dde050a 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 b928a48a1..6d6016464 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 3f289a9da..e615fb168 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 cf8f319ad..c598f2146 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 d510f9c2f..42b138d15 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 439ba51d0..38ecc785c 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 83d87de1f..7a69d4c78 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 2c5a617cc..545ef6c19 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 26b16c395..c620d0ff5 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 28f2f4394..fb6113d7f 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 2834be372..bbecc7b33 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 c4e33d16e..349042135 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 db58f5d6f..3ad5a42d9 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 f4e090216..e0f015c01 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 0ab7fcf84..774a2eacc 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 1524b1b4a..b8918f1fd 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 df6da2d22..1c3f48fea 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 db23e38a4..c84f74135 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 2a14a5354..aa965c4c2 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 8383698d4..db4655e56 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 d99addf78..ca0b93d5f 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 ef50097e4..3c6550dbb 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 83b3eaad5..608318eff 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 d5f78af62..8361e1c8d 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 4552c64f6..495b6219a 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 c8da55dc0..4e5f60c7f 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 aa8a617b7..3df1b373d 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 babbc2c59..6440e97c9 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 815d2beab..1570d80ca 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 fee7166fb..cd1528e7c 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 2780377bb..9720fa900 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 f815aceb6..845274423 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 96fbcc73d..a851d6a0c 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 5d713266b..c6897f457 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 782929da7..199f46ee0 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 fe6f6a772..ecf9bc014 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 6264dd175..a82dc83ff 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 4df310d24..dd2d63413 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 b746feff0..7ed38f59b 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 e2ed0a63b..492ec212d 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 613c4eacd..fc56a6e85 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 eccf791e7..65ee88afd 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 a3b770463..d2a37ad62 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 b43a96527..8100d5dce 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 e785fa73f..dfa425b25 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 9852828f4..3d276137b 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 76c0f6f4f..08f6c07b2 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 9ff22d054..142d33a14 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 0fa6bb017..9d66cd822 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 eca0db691..fdd74b6db 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 c48b6dd32..9042a942e 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 975fe0264..44e89f1ad 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 74058f997..f74ba0573 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 71f700535..5f074c3cb 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 1b9d067d2..b4fd41031 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 67122bede..02e67c12b 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 20c23c2b9..d3cbc1e87 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 d566eaecc..2cc622dac 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 821316b62..89e70b586 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 a056909ba..0b5af2565 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 72be702fd..ba2031060 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 66d46715d..0bc78fe66 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 af95110b3..1487ae08c 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 0d9ad32c0..dfd21c70a 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 7ec5b8494..cd7867061 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 f1b59b128..183058573 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 ba58b5c07..d2b8ce871 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 80be64908..cda189d49 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 60d85cf9d..ce0778299 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 5507c5be7..c83182018 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 122502656..eec09683d 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 60a0d4f2a..dee6e2e65 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 019b755d1..1862ea625 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 0f3cb4aea..10db39b39 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 6a11e3e0e..0a78ea4d0 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 3f55772a1..952399a8a 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 6a4efb7e1..a957cde14 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 1adb21ce8..bbc675109 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 cfda74747..c29d01dcd 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 bda3328a0..2565607e9 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 ab0da058a..2fb912f6c 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 f92e822bb..c7eedd4dc 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 21670dd01..a0636b6d3 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 5c007c796..e65227776 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 9a20c662f..056ec6616 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 197d26c62..59f5c39a3 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 7b9ca3ce6..0d1e9f499 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 c7e82698e..8ac72875c 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 5b9957f18..2c0c2292c 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 549d73514..db4e4cce4 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 c6a922674..974c6afb7 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 a5d7a3018..535c89252 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 7c3b63d45..131927541 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 7a62f1c30..9f0053f22 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 f8840738a..f727e46cc 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 ed478d79e..9e9a8f56a 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 24f9c62c4..f2f9effc0 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 4900c72c4..60670f409 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 fd81a54d5..8c6f267df 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 f4b317a0e..c18ae9fd4 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 cb694473b..8296ce040 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 f504b68cf..571f2b1e4 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 2bb966787..d159950f6 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 46408eb06..61819674d 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 89890bac3..148973c51 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 dfb60c6f4..30a4db52f 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 8ce31991d..b86098224 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 be49391fe..c7de4cbec 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 0d4475a41..8b29f48c9 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 099fcc4c6..cd1a01641 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 c9f506f68..2c649d504 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 a16a70d0b..c3301af97 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 d84eef09d..9724234d3 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 7b94b2475..2cb54e528 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 e1224b2d6..fcce5471f 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 059b98bc4..3a4fcbceb 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 06816ae85..73a9e733f 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 023e3e16d..17746344d 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 004852cf7..57042c9a2 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 a35950391..6d24356c9 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 7ee53f663..23a922630 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 5bd48d650..020954b18 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 752aa7251..65e696151 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 52cbaf735..ec0235013 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 38b889f2c..1e6636b44 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 32e3da708..ad06b149d 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 0cdeb2d9a..3241e3ec8 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 4d0e8c35a..fc3275f42 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 b18f32892..a06175ea4 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 36199ecf4..b81c7840c 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 a06d00229..b9a2b0f0f 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 d438385ae..21cef3637 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 2148276ac..a4122ba6c 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 f4d82a1d7..323012aaa 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 f58725621..d0846222e 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 ebfb08680..b190a0cca 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 55f9d2749..f2c4b1751 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 1d8ac5010..022a10d8c 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 e962074fd..8bf92f2aa 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 e9317f8ce..a35ce9099 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 9828c35f5..4f6827824 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 839b2287d..ee76d1db3 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 b693db506..3033d365d 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 000000000..bfc6fd30a --- /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 80c0801f8..09dee3fa6 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 4e7da9535..c7a4a9041 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 b4862f25f..17480140a 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 c7297c187..cd8d7ab71 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 85bd80d53..d074e3336 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 0dcfa983f..6a8ab73e2 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 be408e037..74d8a7653 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 aa1134b5a..cb21dca72 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 36d548967..3b92ee527 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 6493b5dd5..5b020bcc6 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 1ea3ed240..6a999ec8a 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 7ac9b2cb6..887fdde98 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 c7429f891..5273e2d24 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 7ecc776ca..21d9c20c7 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 33192af19..a55fe68bb 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 6f73c253b..c411cc6ad 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 3dced0655..4ed27590d 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 e7c8adc39..ac6932c70 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 ad9462640..4ee77bb6a 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 c4cc810da..251d6b6a5 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 db15b8a1e..d0503fc6b 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 de998a6e3..4cf013140 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 ccb1809f1..8c841de5c 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 01105fed2..989c77d7f 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 ab9576511..8b6dcb506 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 8900d8186..8b89ab7be 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 b8fe63c6c..8fae64241 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 7dac12c7b..0b4f21917 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 bed729ec8..08748154b 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 e2f2b7fe5..980a4214d 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 50378895c..02b18f1c5 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 2fc804c7e..b7c3431b3 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 8bbdfc999..4140b3385 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 4ad66acd8..a09bdca39 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 951bdb741..72fe74551 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 cd06deea9..783b0d994 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 6cb6fe5fd..5e495b7d5 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 d16c5064a..7b63fcd75 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 251cf15be..6882ebfce 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 0cc22500f..90367d37f 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 0c54cd851..d57410382 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 60dfb0b34..09b52e858 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 20a33d5eb..73fc6ea37 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 8ad8a1119..0833aa62c 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 2e232f769..4c66f6eac 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 0a8e389ed..0d2ce9147 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 686d6ba9c..22505494a 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 01385de84..b0792b443 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 1689eaff6..8cfaa6ca6 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 b2300c8f7..e0f863a3f 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 34560037b..52d0de2b1 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 4bd358420..fcaff87ac 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 646aa86fd..4259db331 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 10f315c77..a6c288fa1 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 c0f8b3e20..b1b4de434 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 42fdeceb4..b57abd0aa 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 18e6748ee..adff4f078 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 4ed62de18..688973b70 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 b32701eed..f10dd76b2 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 75ec3268a..bb9d6471b 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 74a3c6ffd..9ca27052c 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 994275760..cdc38efee 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 fe0f85f41..6ac8b6631 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 957184bf5..5441287cb 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 5129a2fa2..3d2c4b793 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 c46b3f424..07269fdfb 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 93ba5afde..15ebe78a1 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 b7d107dc7..ac9368178 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 d6cfe5626..b09aec0a0 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 65e1ba6d7..2c7b0006c 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 e253bef82..82d84b0e8 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 -- GitLab