From 7f167cac2b9bcc3a726058d635795af0aaaedb0d Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Thu, 10 Dec 2020 10:18:15 +0000 Subject: [PATCH] Merge remote-tracking branch 'origin/topic/robin/gh-25-backtrack' * origin/topic/robin/gh-25-backtrack: Fix Sphinx helper script that emits command lines. Add support for manual backtracking to Spicy. Support &eod for vector parsing. --- CHANGES | 13 +++++++++++++ doc/autogen/types/regexp.rst | 2 +- doc/autogen/types/unit.rst | 6 ------ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index 06d0ec46a..dd252eb83 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,17 @@ +0.4.0-1110 | 2020-12-10 10:15:17 +0000 + + * GH-25: Add support for manual backtracking to Spicy. If a field is + marked with ``&try``, a later call to ``self.backtrack()`` + anywhere down in the parse tree will return to that position and + continue there. See the documentation for more, including an + example. (Robin Sommer, Corelight). + + * Support &eod for vector parsing. (Robin Sommer, Corelight) + + * Fix Sphinx helper script that emits command lines. (Robin Sommer, + Corelight) + 0.4.0-1106 | 2020-12-10 10:10:16 +0000 * Make capture groups available inside hooks of regular expression fields. diff --git a/doc/autogen/types/regexp.rst b/doc/autogen/types/regexp.rst index c2d416d8f..2b93b0237 100644 --- a/doc/autogen/types/regexp.rst +++ b/doc/autogen/types/regexp.rst @@ -28,7 +28,7 @@ ``find``; and (2) if a match has been found, the data that matches the regular expression. -.. spicy:method:: regexp::token_matcher regexp token_matcher False hilti::MatchState () +.. spicy:method:: regexp::token_matcher regexp token_matcher False spicy::MatchState () Initializes state for matching regular expression incrementally against chunks of future input. The regular expression will be diff --git a/doc/autogen/types/unit.rst b/doc/autogen/types/unit.rst index 89b5ea13b..567956c97 100644 --- a/doc/autogen/types/unit.rst +++ b/doc/autogen/types/unit.rst @@ -1,11 +1,5 @@ .. rubric:: Methods -.. spicy:method:: unit::backtrack unit backtrack False void () - - Aborts parsing at the current position and returns back to the most - recent ``&try`` attribute. Turns into a parse error if there's no - ``&try`` in scope. - .. spicy:method:: unit::connect_filter unit connect_filter False void (filter: strong_ref) Connects a separate filter unit to transform the unit's input