- ((and (eq :punctuation (token-kind (look parser)))
- (find (token-value (look parser)) "=^"))
- (problem 'ctm-unsupported :additional-identity (token-position (look parser)) "Topic-tail identity assignments are outside Slice 1."))
- ((member (token-kind (look parser)) '(:iri :qname))
- (problem 'ctm-unsupported :additional-identity (token-position (look parser)) "Topic-tail identity assignments are outside Slice 1."))
+ ((or (and (eq :punctuation (token-kind (look parser)))
+ (find (token-value (look parser)) "=^"))
+ (member (token-kind (look parser)) '(:iri :qname)))
+ (when has-tail
+ (problem 'ctm-rejection :expected-separator (token-position (look parser)) "Topic-tail statements need a semicolon separator."))
+ ;; CTM 3.9 adds the locator to this Topic, without creating another
+ ;; Topic just for the assignment. The model performs required merging.
+ (multiple-value-bind (kind iri) (identity-value parser)
+ (setf topic (topic-maps.tmdm:add-topic-identifier topic kind iri)))
+ (setf has-tail t))