anweiss/cddl

Group choices parsing error

tomachristian opened this issue · 2 comments

tester = $$vals
$$vals //= 18
$$vals //= 12

gives a error parsing CDDL: incremental parsing error, also

tester = $$vals
$$vals //= ( 18 )
$$vals //= ( 12 )

gives a error parsing CDDL: incremental parsing error

tester = $$vals
$$vals //= ( 18 , )
$$vals //= ( 12 , )

works (although unable to validate due to #116 (comment)).

If I read the specification correctly, a type should be able to be coerced into a group (with one grpent) during semantic analysis and/or during validation (if needed). Or the other way around: everything is a group until it is not: trying to coerce it to a type and checking if it can be.

Good catch @tomachristian. Will fix.

Still some issues per #121 (comment).