Skip to content

Commit

Permalink
Merge branch 'origin/topic/bbannier/unit-switch-for-conditional-parsing'
Browse files Browse the repository at this point in the history
  • Loading branch information
bbannier committed Jul 19, 2023
2 parents 9f30b58 + ae05931 commit f087bcb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
9 changes: 9 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
1.9.0-dev.41 | 2023-07-19 09:17:47 +0200

* Mention unit switch statements in conditional parsing docs. (Benjamin Bannier, Corelight)

Instead of decorating many fields with `if` conditions for certain
grammars a simpler approach can be to use a unit switch statement with
branch-by-expressions. Add a link to unit switch from the conditional
parsing section.

1.9.0-dev.39 | 2023-07-18 11:21:27 +0200

* GH-1485: Add validator rejecting unsupported multiple uses of attributes. (Benjamin Bannier, Corelight)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.9.0-dev.39
1.9.0-dev.41
3 changes: 3 additions & 0 deletions doc/programming/parsing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,9 @@ time the field is next in line.
:exec: printf '\01\02\03\04' | spicy-driver %INPUT; printf '\02\02\03\04' | spicy-driver %INPUT
:show-with: foo.spicy

For repeated cases of conditional parsing unit :ref:`parse_switch` statements
might allow for more compact and easier to maintain code.

.. _parse_lookahead:

Look-Ahead
Expand Down

0 comments on commit f087bcb

Please sign in to comment.