On 07/04/2016 10:16, Diego Boscá wrote:
IMHO even if regexes are powerful enough using them for representing
lists or literals is an overkill (precisely by the reason you gave,
having to control and escape all characters would make adl code more
less readable (think that a series of specialized atx.x.x codes would
always need to be escaped).
I don't see the problem of having just a list of strings and a regex
for C_String.
(I DO think that having a list of regexes is an overkill BTW)
right - but if we allow List<String> then technically it is possible to
end up with more than one regex, unless we add some invariant like
is_regex (constraint.first) implies constraint.count = 1
I am inclined to think it's easier to just program it as:
across constraint as c some
is_regex (c) and pcre_matcher. matches (extract_regex (c), data) or
else c.same_string (data)
end
IN Java it would be an iteration loop with an exit if a match is found.
You get the idea :)
- thomas
_______________________________________________
openEHR-technical mailing list
openEHR-technical@lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org