diff options
author | Patrick McHardy <kaber@trash.net> | 2014-02-17 19:43:36 +0000 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2014-03-07 11:02:32 +0100 |
commit | 35a2eedd27b45b6e94bde342cabe64ed34c14a95 (patch) | |
tree | 60997a4930cf9837e42d1cd5669041151d953e1a /include/mnl.h | |
parent | 8ad2f12a68e0e1304ec29fac274c0a0165915e2c (diff) |
parser: add grammatical distinction for verdict maps
Currently the parser accepts verdicts in regular maps and non-verdicts
in verdict maps and we have to check matching types during evaluation.
Add grammar rules for verdict maps and seperate them from regular maps.
This has a couple of advantages:
- We recognize verdict maps completely in the parser and any attempt to
mix verdicts and other expressions will result in a syntax error.
So far this hasn't actually been checked.
- Using verdicts in non-verdict mappings will also result in a syntax
error instead of a datatype mismatch.
- There's a grammatical distinction between dictionaries and verdict
maps, which are actually statements.
This is needed as preparation for a following patch to turn verdicts
into pure statements, which in turn is needed to reinstate support for
using the queue verdict in maps, which was broken by the introduction
of the queue statement.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/mnl.h')
0 files changed, 0 insertions, 0 deletions