Skip to content
Snippets Groups Projects
Commit fe079aa1 authored by Richard Henderson's avatar Richard Henderson
Browse files

decodetree: Drop check for less than 2 patterns in a group


While it makes little sense for the end product to have a group
containing only a single pattern, avoiding this case within an
incremental patch set is troublesome.

Because this is expected to be a transient condition, do not
bother "optimizing" this case, e.g. by folding away the group.

Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
parent 33c0f25b
No related branches found
No related tags found
No related merge requests found
......@@ -1024,8 +1024,6 @@ def parse_file(f, parent_pat):
if name == '}' or name == ']':
if len(toks) != 0:
error(start_lineno, 'extra tokens after close brace')
if len(parent_pat.pats) < 2:
error(lineno, 'less than two patterns within braces')
# Make sure { } and [ ] nest properly.
if (name == '}') != isinstance(parent_pat, IncMultiPattern):
......
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Verify deeper nesting, and a single element in the groups.
{
[
{
[
sub1 00000000 a:8 b:8 c:8
]
}
]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment