- Even more templates, in even more places, templates everywhere!
- Use the migration guide when updating.
- Infrastructure
- Switched to Boost Software License, Version 1.0.
- Makefile generates binaries in
build/bin/instead ofbuild/src/. - The
pegtlsub-directory insrc/exampleandsrc/testwas removed. - Makefile generates dependencies in
build/dep/instead ofbuild/src/. - Added
pkg-configmetadata and installation support. - All headers in
include/tao/pegtl/contrib/were moved toextra/,example/,deprecated/orinclude/tao/pegtl/. - Not all headers in
include/tao/pegtl/are included by<tao/pegtl.hpp>. - Moved the string-literal macros to the new public header
pegtl_string.hpp. - All stream parsing headers were moved to
stream/. - All Unicode (incl. ICU) rules were moved to
unicode/. - All binary rules (incl. enums) were moved to
binary/. - All actions beyond
nothingare now inaction/. - All controls beyond
normalare now incontrol/. - The debug facilities are now in
debug/. - The example grammars are now all collected in
example/. - There are new example grammars including some moved from
src/example/. - Extra, experimental and deprecated headers are now in
extra/anddeprecated/.
- Exceptions
- Changed
parse_errorto contain only oneposition. - Changed
parse_errorto be templated over the position type. - Added
parse_error_baseas non-templated base class ofparse_error. - Changed to nested exceptions for nested parsing errors.
- Added control function to throw nested exceptions.
- Changed
parse_nested()to throw a nested exception instead of adding a position to the current one when exceptions are enabled. - Changed
pegtl.hppto only includeparse_error.hpp,parse_error_base.hppandparse_nested.hppwhen exceptions are enabled. - Added functions to visit and flatten nested exceptions.
- Changed
- Inputs
- Standardized on line - column - count order.
- Replaced the monolithic
positionclass with the new position classes. - The input classes have been heavily refactored.
- Replaced
memory_inputandstring_inputwithview_input,copy_input,text_view_inputandtext_copy_input. - Replaced
istream_input,cstream_inputandbuffer_inputwith the new stream parsing inputs. - Added new minimal non-owning
base_input. - Added new input adapter
input_with_offset. - Most input classes can use any type instead of being hardwired to
char. - The end-of-line handling has been heavily refactored and extended.
- Choice of statically, dynamically or user allocated buffer inputs.
- Everything related to stream parsing is now in
stream/. - Nothing related to stream parsing is included with
<tao/pegtl.hpp>. - Moved
action_inputfrominternalto the main PEGTL namespace. - Removed
action_ttype alias from all input classes in favor of usingaction_input. - Removed the
tracking_modeasenumand input template parameter. - Eliminated all unaligned memory access (unless compiler generated).
- Rule Changes
- All variants of the rules
ione,one,not_oneandrangesnow require at least one template parameter. - The new rules
not_ioneandnot_rangeshave the same non-empty pack requirement. - Added Unicode rules that adapt to the input's data size.
- Added special end-of-line rules in multiple places.
- Added new atomic rule
function. - Added new atomic rule
restart. - Added new ASCII rule
bdigit. - Added new ASCII rule
cntrl. - Added new ASCII rule
cr. - Added new ASCII rule
cr_lf. - Added new ASCII rule
cr_crlf. - Added new ASCII rule
cr_lf_crlf. - Added new ASCII rule
crlf. - Added new ASCII rule
esc. - Added new ASCII rule
ff. - Added new ASCII rule
graph. - Added new ASCII rule
ht. - Added new ASCII rule
ione. - Added new ASCII rule
lf. - Added new ASCII rule
lf_crlf. - Added new ASCII rule
not_ione. - Added new ASCII rule
punct. - Added new ASCII rule
sp. - Added new ASCII rule
vt. - Renamed ASCII rule
seventoany7. - Added new ASCII rule
many7. - Added new ASCII rule
not_ione7. - Added new ASCII rule
not_one7. - Added new ASCII rule
not_range7. - Added new Unicode rule
cr. - Added new Unicode rule
cr_lf. - Added new Unicode rule
cr_crlf. - Added new Unicode rule
cr_lf_crlf. - Added new Unicode rule
crlf. - Added new Unicode rule
lf. - Added new Unicode rule
lf_crlf. - Added new Unicode rule
ls. - Added new Unicode rule
nel. - Added new Unicode rule
ps. - Added new Unicode rule
eol1. - Added new Unicode rule
eolu. - Added dedicated end-of-line rules for end-of-line scanning.
- Added dedicated end-of-line rules for lazy end-of-line mode.
- Added new atomic rule
consume. - Added new atomic rule
everything. - Added new rule
source. - Added new generic rule
invert. - Added new convenience rule
partial. - Added new convenience rule
separated(replacesseparated_seqfrom contrib). - Added new convenience rule
separated_pad. - Added new convenience rule
star_partial. - Added new convenience rule
strict. - Added new convenience rule
star_strict. - Added new convenience rule
unordered. - Added new convenience rule
unordered_partial. - Added rule
try_catch_any_return_false. - Renamed rule
try_catchtotry_catch_return_false. - Added rule
try_catch_std_return_false. - Renamed rule
try_catch_typetotry_catch_type_return_false. - Added rule
raise_messageand macroTAO_PEGTL_RAISE_MESSAGE. - Added rule
try_catch_any_raise_nested. - Added rule
try_catch_raise_nested. - Added rule
try_catch_std_raise_nested. - Added rule
try_catch_type_raise_nested. - Added rules for matching signed integers mirroring the existing ones for unsigned integers.
- Added
not_rangesvariants to the ASCII, Unicode, binary and member rules. - Optimized
utf8::stringby expandingchar32_tcode points to UTF-8 sequences at compile time. - Refactored the implementation of
ione,one,range,ranges,not_ione,not_one,not_range,not_rangeswhich changes theirrule_t. - Added new rules for enum types to the binary rules.
- Added new rules that operate on object members.
- Moved
discardandrequireto the stream parsing facilities. - Added new stream parsing rule
is_stream. - Added new stream parsing rule
prefetch.
- All variants of the rules
- Added new customization point for error messages.
- Added optional source line output for the tracer.
- Other
- Added new control
apply_typed_state. - Added new action
add_guard. - Added new action
change_rule. - Added new action
match_typed_state. - Added new control
remove_first_states. - Added
extra/dispatch.hppandextra/record.hpp. - Moved
raw_stringtoextra/raw_string.hpp. - Added
extra/unescape.hpp. - Refactored the Control adapter interface.
- Refactored
type_list_containsinterface. - Routed rewind-guard creation through the Control class.
- Renamed
apply_mode::actiontoapply_mode::enabled. - Renamed
apply_mode::nothingtoapply_mode::disabled. - Removed
random_orderexample, moved to core library asunorderedandunordered_partial. - Added new charconv rules and actions in
extra/charconv.hpp. - Renamed
limit_depthfunctionality tocheck_depth. - Renamed
check_bytesfunctionality tocheck_consume. - Renamed
limit_bytesfunctionality tolimit_consume. - Moved depth counter to adapter class
input_with_depth. - Changed default top-level
rewind_modetooptional. - Merged
rewind_modevaluesdontcareandactiveinto new valueoptional. - Renamed
end_of_line()input member function toend_of_line_or_file(). - Renamed variadic template
to_stringfunctionality totype_to_string. - Added
type_to_string_viewfunction that mirrorstype_to_string. - Renamed buffer/incremental parsing to stream parsing.
- Changed
change_stateto detect absence ofsuccess(). - Changed
change_action_and_stateto detect absence ofsuccess().
- Added new control
- Cleanup
- Removed rule
forty_two, we apologize for any inconvenience. - Removed rule
bytes; useconsumeor one of the type-specificmanyrules. - Removed support for
boost::filesystemandstd::experimental::filesystem. - Removed support for building an amalgamated header.
- Removed support for Visual Studio 2017.
- Removed support for GCC 7 and GCC 8.
- Removed
contrib/peg.hppandcontrib/predicates.hpp.
- Removed rule
- The following headers have been deprecated
alphabet.hppif_then.hppinteger.hpp(more or less replaced byextra/charconv.hpp).rep_one_min_max.hpprep_string.hppunescape.hpp(replaced byexample/escaped.hppandextra/unescape.hpp).