The ADL-Parser is not capable of parsing EN13606 archetypes because of the keyword "units" which belongs to the EN13606 datatype PQ.
I solved this problem by commenting out all occurrences of SYM_UNITS
This is in line 2958, becomes: (<SYM_C_QUANTITY_UNITS>/*|<SYM_UNITS>*/) <SYM_EQ> "<"
and line 341 becomes: /*| < SYM_UNITS: "units"> :DOMAIN_TYPE_C_QUANTITY*/
When done these changes, it parses the EN13606 PQ datatype, and I don't see another error-situation coming up.
I am not sure about that. There are a lot of test-files with that domain-type and no problem occurs. It is, I think, because the “units” will always occur inside this domain type, and inside the domain type, the DOMAIN_TYPE_C_QUANTITY lexical state should be active. But please feel free to correct me, I don’t have much experience with JJ Bert
I don't see also no problem, I guess, I take the chance and regard it as a solution. Because all tests in the ADL-parser run fine, and the DV-Quantity is very extensively tested.
Also all my EN13606 datatypes-tests run fine in the changed parser.
Treating "units" etc as keywords is a pretty dirty way to implement dADL (now ODIN) parsing! The property names in a C_DV_QUANTITY (or C_DV_ORDINAL) structure shouldn't be keywords, they are just property names, and should be collected and either compared to the RM or (what I do) converted straight to an object by the dADL (ODIN) deserialiser.
As per my recent post, all of this is now gone in ADL 1.5.
IN any case, I would not expect any problem with picking up "units" in two different parsing contexts in the parser.
I think it is an error in the ADL-parser, the word "units" was defined twice, once globally in all lexical states, once locally in a specific lexical state.
(I don't know if globally and locally are right expressions in the context of JJ, I just call it that way for now.)
The globally definition was interfering with all use of the word "units" in an archetype. So I removed it, and there were no side-effects, I could see. Maybe there are. I hope not.
The ADL-parser is a fine piece of software, it takes every data-type, every-attribute, as long as the syntax is OK. It really is a pleasure to work with it, and it gives many opportunities. Except for some small errors, like this one.
As I understand, the removal of C_DvQuantity and other AOP constructs is a good development, because it removes exceptional circumstances for specific domain-types and makes the ADL-parser even more generic.
Than, ADL will be (concerning the supporting software) a fully generic (not depending on a specific reference model) archetype definition language. I think lots of opportunities will arise.