diff options
author | Georg Brandl <georg@python.org> | 2015-08-11 16:56:49 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2015-08-11 16:56:49 +0200 |
commit | 1a3034b179ccbdd1411f6cb4718a628e89f723d3 (patch) | |
tree | 5b1c23146f944cd58297f762d688b412cf56989d | |
parent | a61efcf062d92845cf597b00f45be6498f84188f (diff) | |
download | pygments-1a3034b179ccbdd1411f6cb4718a628e89f723d3.tar.gz |
archetype: fix regex.
-rw-r--r-- | pygments/lexers/archetype.py | 2 | ||||
-rw-r--r-- | tests/examplefiles/example2.cadl | 178 |
2 files changed, 1 insertions, 179 deletions
diff --git a/pygments/lexers/archetype.py b/pygments/lexers/archetype.py index 074f25d5..b88fa2e9 100644 --- a/pygments/lexers/archetype.py +++ b/pygments/lexers/archetype.py @@ -232,7 +232,7 @@ class CadlLexer(AtomsLexer): (r'\}', Punctuation), include('constraint_values'), # type name - (r'[A-Z]\w+(<[A-Z]\w+([A-Za-z_<>]*)?>)?', Name.Class), + (r'[A-Z]\w+(<[A-Z]\w+([A-Za-z_<>]*)>)?', Name.Class), # attribute name (r'[a-z_]\w*', Name.Class), (r'\[', Punctuation, 'any_code'), diff --git a/tests/examplefiles/example2.cadl b/tests/examplefiles/example2.cadl deleted file mode 100644 index 323e90ce..00000000 --- a/tests/examplefiles/example2.cadl +++ /dev/null @@ -1,178 +0,0 @@ - -- - -- Example fragment of an openEHR Archetype, written in cADL, a subsyntax of the Archetype Definition Language (ADL) - -- definition available here: http://www.openehr.org/releases/trunk/architecture/am/adl2.pdf - -- Author: Thomas Beale - -- - - OBSERVATION[id1] matches { -- Blood Pressure - data matches { - HISTORY[id2] matches { -- history - events cardinality matches {1..*; unordered} matches { - EVENT[id7] matches { -- any event - data matches { - ITEM_TREE[id4] matches { - items matches { - ELEMENT[id5] occurrences matches {0..1} matches { -- Systolic - value matches { - DV_QUANTITY[id1054] matches { - property matches {[at1055]} - magnitude matches {|0.0..<1000.0|} - precision matches {0} - units matches {"mm[Hg]"} - } - } - } - ELEMENT[id6] occurrences matches {0..1} matches { -- Diastolic - value matches { - DV_QUANTITY[id1055] matches { - property matches {[at1055]} - magnitude matches {|0.0..<1000.0|} - precision matches {0} - units matches {"mm[Hg]"} - } - } - } - ELEMENT[id1007] occurrences matches {0..1} matches { -- Mean Arterial Pressure - value matches { - DV_QUANTITY[id1056] matches { - property matches {[at1055]} - magnitude matches {|0.0..<1000.0|} - precision matches {0} - units matches {"mm[Hg]"} - } - } - } - ELEMENT[id1008] occurrences matches {0..1} matches { -- Pulse Pressure - value matches { - DV_QUANTITY[id1057] matches { - property matches {[at1055]} - magnitude matches {|0.0..<1000.0|} - precision matches {0} - units matches {"mm[Hg]"} - } - } - } - ELEMENT[id34] occurrences matches {0..1} matches { -- Comment - value matches { - DV_TEXT[id1058] - } - } - } - } - } - state matches { - ITEM_TREE[id8] matches { - items matches { - ELEMENT[id9] occurrences matches {0..1} matches { -- Position - value matches { - DV_CODED_TEXT[id1059] matches { - defining_code matches {[ac1; at1002]} -- Position (synthesised) - } - } - } - ELEMENT[id1053] occurrences matches {0..1} matches { -- Confounding factors - value matches { - DV_TEXT[id1060] - } - } - allow_archetype CLUSTER[id1031] occurrences matches {0..1} matches { -- Exertion - include - archetype_id/value matches {/openEHR-EHR-CLUSTER\.level_of_exertion(-a-zA-Z0-9_]+)*\.v1/} - } - ELEMENT[id1044] occurrences matches {0..1} matches { -- Sleep status - value matches { - DV_CODED_TEXT[id1061] matches { - defining_code matches {[ac2; at1045]} -- Sleep status (synthesised) - } - } - } - ELEMENT[id1006] occurrences matches {0..1} matches { -- Tilt - value matches { - DV_QUANTITY[id1062] matches { - property matches {[at1056]} - magnitude matches {|-90.0..90.0|} - precision matches {0} - units matches {"°"} - } - } - } - } - } - } - } - INTERVAL_EVENT[id1043] occurrences matches {0..1} matches { -- 24 hour average - math_function matches { - DV_CODED_TEXT[id1063] matches { - defining_code matches {[at1057]} - } - } - width matches { - DV_DURATION[id1064] matches { - value matches {PT24H} - } - } - data matches { - use_node ITEM_TREE[id1065] /data[id2]/events[id7]/data[id4] -- /data[history]/events[any event]/data[id4] - } - state matches { - use_node ITEM_TREE[id1066] /data[id2]/events[id7]/state[id8] -- /data[history]/events[any event]/state[id8] - } - } - } - } - } - protocol matches { - ITEM_TREE[id12] matches { -- Tree - items matches { - ELEMENT[id14] occurrences matches {0..1} matches { -- Cuff size - value matches { - DV_CODED_TEXT[id1067] matches { - defining_code matches {[ac3]} -- Cuff size (synthesised) - } - } - } - CLUSTER[id1034] occurrences matches {0..1} matches { -- Location - items matches { - ELEMENT[id15] occurrences matches {0..1} matches { -- Location of measurement - value matches { - DV_CODED_TEXT[id1068] matches { - defining_code matches {[ac4]} -- Location of measurement (synthesised) - } - } - } - ELEMENT[id1035] occurrences matches {0..1} matches { -- Specific location - value matches { - DV_TEXT[id1069] - } - } - } - } - ELEMENT[id1036] occurrences matches {0..1} matches { -- Method - value matches { - DV_CODED_TEXT[id1070] matches { - defining_code matches {[ac5]} -- Method (synthesised) - } - } - } - ELEMENT[id1039] occurrences matches {0..1} matches { -- Mean Arterial Pressure Formula - value matches { - DV_TEXT[id1071] - } - } - ELEMENT[id1011] occurrences matches {0..1} matches { -- Diastolic endpoint - value matches { - DV_CODED_TEXT[id1072] matches { - defining_code matches {[ac6]} -- Diastolic endpoint (synthesised) - } - } - } - allow_archetype CLUSTER[id1026] occurrences matches {0..1} matches { -- Device - include - archetype_id/value matches {/openEHR-EHR-CLUSTER\.device(-a-zA-Z0-9_]+)*\.v1/} - } - } - } - } - } - - |