The current parser Expressir::ExpressExp::Parser does not handle remark tags.
Given contents of an EXPRESS file of:
ENTITY action_directive_relationship;
...
WHERE
WR1 : acyclic_action_directive_relationship(SELF, [related], 'ACTION_SCHEMA.ACTION_DIRECTIVE_RELATIONSHIP');
END_ENTITY;
...
(*"action_directive_relationship.WR1"
A *action_directive_relationship* shall not participate in its own definition.
*)
We want to be able to access the remark tags of a model via something like this:
file = '../annotated-express/data/resources/action_schema/action_schema.exp'
repo = Expressir::ExpressExp::Parser.from_exp(file)
schema = repo.schemas.find{|schema| schema.id == "action_schema"}
entity = schema.entities.find{|entity| entity.id == "action_directive_relationship"}
where = entity.where.find{|where| where.id == "WR1"}
where.tagged_remarks
# => ["A *action_directive_relationship* shall not participate in its own definition.", ...]
Of course this will also be useful:
repo = Expressir::ExpressExp::Parser.from_exp(file)
repo.path('action_schema.action_directive_relationship.WR1').tagged_remarks
# or
repo.tagged_remarks('action_schema.action_directive_relationship.WR1')
The current parser
Expressir::ExpressExp::Parser
does not handle remark tags.Given contents of an EXPRESS file of:
We want to be able to access the remark tags of a model via something like this:
Of course this will also be useful: