Skip to content

Arrays cannot be empty #223

Description

@EGAlberts

Hi @ipa-nhg

In a .ros2 file, if I have the following:
"FollowPathDWB.default_critic_namespaces":
type: Array[String]
value: []

It errors on the [] saying no viable alternative input. Up until now I used [''] to make it pass, but that actually creates a list of size 1, not an empty list.

This is also an issue as the ros2model generator makes the values like that, I don't know if that means a fix exists somewhere already?

I think the problem is here:
ParameterList returns ParameterSequence: {ParameterSequence} '[' value+=ParameterValue ( ',' value+=ParameterValue )* ']' ;

but any simple fix like making things optional seems to add ambiguity and leads to the parser failing to generate/compile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions