Bug in adl-parser

Hi There,

There is a bug in adl-parser project about the existence of archetypes nodes. If a node exists with cardinality {0..*}, it is implicit that the node is OPTIONAL, but the parser consider it as REQUIRED. For example relationships is not necessary as defined in the following line but the ADLParser mark it as required.

relationships cardinality matches {0..*; ordered} matches {

The problem can be solved simply. Please find the patch attached.

Bests,
Soheil

(attachments)

adl.jj.patch (873 Bytes)

Hi Soheil,

Actually the parser is correct as is. Cardinality {0..*} doesn't mean
existence is optional. Cardinality and existence describe two
different constraints here. A container attribute can be required
(existence matches {1}) and has from 0 to many members.

Cheers,
Rong

Hi Rong,

I got it and sorry for the inconvenience. This is the matter null
(optional) and empty (required but 0 in size).

Bests,
Soheil