Summary
When a property set contains an enumeration property definition followed by another property definition, the parser reports spurious errors after the enumeration.
Reproducer
property set Test_Props is
Radio: enumeration (ThreadMesh, LoRa, BLE) applies to (bus);
Binding: aadlstring applies to (device);
end Test_Props;
$ spar parse /tmp/test_enum4.aadl
/tmp/test_enum4.aadl:92: expected END_KW
/tmp/test_enum4.aadl:92: expected name
/tmp/test_enum4.aadl:92: expected SEMICOLON
/tmp/test_enum4.aadl:92: expected `package` or `property set`
Works when
- Enumeration is the last declaration in the property set.
- Enumeration is the only declaration in the property set.
- The following declaration is omitted entirely.
Expected
Parses cleanly. The AADL grammar permits multiple property definitions of any mix of types in a property set.
Impact
Had to rewrite wohl_properties.aadl to use aadlstring instead of enumeration for a radio-protocol enum, losing the type-safety the AADL enumeration provides.
Side note
The reported line number (92) does not correspond to the 4-line file — it appears to be a byte offset or token index. Worth fixing separately so error messages point at the right location.
🤖 Generated with Claude Code
Summary
When a property set contains an
enumerationproperty definition followed by another property definition, the parser reports spurious errors after the enumeration.Reproducer
Works when
Expected
Parses cleanly. The AADL grammar permits multiple property definitions of any mix of types in a property set.
Impact
Had to rewrite
wohl_properties.aadlto useaadlstringinstead ofenumerationfor a radio-protocol enum, losing the type-safety the AADL enumeration provides.Side note
The reported line number (
92) does not correspond to the 4-line file — it appears to be a byte offset or token index. Worth fixing separately so error messages point at the right location.🤖 Generated with Claude Code