Index: ruby/trunk/adl_parser/lib/parser.rb
===================================================================
--- ruby/trunk/adl_parser/lib/parser.rb	(revision 20)
+++ ruby/trunk/adl_parser/lib/parser.rb	(revision 26)
@@ -13,5 +13,6 @@
 require 'lib/util.rb'
 require 'lib/scanner.rb'
-require 'lib/model.rb'
+require 'rubygems'
+require 'am.rb'
 $DEBUG = true
 
@@ -25,5 +26,11 @@
     class Parser < Racc::Parser
 
-module_eval <<'..end lib/parser.y modeval..id134a7f5a66', 'lib/parser.y', 739
+module_eval <<'..end lib/parser.y modeval..id3b9eed63e6', 'lib/parser.y', 1127
+
+def assert_at(file,line, message = "")
+  unless yield
+    raise "Assertion failed !: #{file}, #{line}: #{message}"
+  end
+end
 
 @@log = Logger.new('log/parser.log','daily')
@@ -812,5 +819,5 @@
 
 
-..end lib/parser.y modeval..id134a7f5a66
+..end lib/parser.y modeval..id3b9eed63e6
 
 ##### racc 1.4.5 generates ###
@@ -818,49 +825,49 @@
 racc_reduce_table = [
  0, 0, :racc_error,
- 2, 95, :_reduce_none,
+ 2, 95, :_reduce_1,
  1, 95, :_reduce_none,
- 8, 96, :_reduce_none,
- 2, 97, :_reduce_none,
- 2, 97, :_reduce_none,
- 1, 105, :_reduce_none,
- 2, 105, :_reduce_none,
- 3, 106, :_reduce_none,
- 1, 107, :_reduce_none,
- 3, 107, :_reduce_none,
- 3, 108, :_reduce_none,
- 1, 108, :_reduce_none,
+ 8, 96, :_reduce_3,
+ 2, 97, :_reduce_4,
+ 2, 97, :_reduce_5,
+ 1, 105, :_reduce_6,
+ 2, 105, :_reduce_7,
+ 3, 106, :_reduce_8,
+ 1, 107, :_reduce_9,
+ 3, 107, :_reduce_10,
+ 3, 108, :_reduce_11,
+ 1, 108, :_reduce_12,
  0, 98, :_reduce_none,
  2, 98, :_reduce_none,
  2, 98, :_reduce_none,
+ 2, 99, :_reduce_16,
  2, 99, :_reduce_none,
- 2, 99, :_reduce_none,
- 0, 100, :_reduce_none,
+ 0, 100, :_reduce_18,
  2, 100, :_reduce_19,
  2, 100, :_reduce_none,
  0, 101, :_reduce_none,
+ 2, 101, :_reduce_22,
  2, 101, :_reduce_none,
- 2, 101, :_reduce_none,
+ 2, 102, :_reduce_24,
  2, 102, :_reduce_none,
- 2, 102, :_reduce_none,
- 1, 110, :_reduce_none,
- 1, 110, :_reduce_none,
- 5, 111, :_reduce_none,
- 5, 111, :_reduce_none,
- 2, 113, :_reduce_none,
+ 1, 110, :_reduce_26,
+ 1, 110, :_reduce_27,
+ 5, 111, :_reduce_28,
+ 5, 111, :_reduce_29,
+ 2, 113, :_reduce_30,
  1, 115, :_reduce_31,
  2, 115, :_reduce_32,
  1, 114, :_reduce_none,
- 1, 114, :_reduce_none,
+ 1, 114, :_reduce_34,
+ 1, 120, :_reduce_35,
+ 1, 120, :_reduce_36,
+ 1, 120, :_reduce_37,
+ 1, 120, :_reduce_38,
+ 1, 120, :_reduce_39,
+ 1, 120, :_reduce_40,
+ 1, 120, :_reduce_41,
+ 1, 120, :_reduce_42,
  1, 120, :_reduce_none,
  1, 120, :_reduce_none,
- 1, 120, :_reduce_none,
- 1, 120, :_reduce_none,
- 1, 120, :_reduce_none,
- 1, 120, :_reduce_none,
- 1, 120, :_reduce_none,
- 1, 120, :_reduce_none,
- 1, 120, :_reduce_none,
- 1, 120, :_reduce_none,
- 3, 121, :_reduce_none,
+ 3, 121, :_reduce_45,
  4, 122, :_reduce_none,
  3, 122, :_reduce_none,
@@ -870,24 +877,24 @@
  3, 132, :_reduce_none,
  2, 132, :_reduce_none,
- 1, 127, :_reduce_none,
- 1, 133, :_reduce_none,
- 1, 133, :_reduce_none,
- 1, 133, :_reduce_none,
- 1, 133, :_reduce_none,
- 1, 133, :_reduce_none,
- 1, 133, :_reduce_none,
- 1, 133, :_reduce_none,
- 1, 133, :_reduce_none,
+ 1, 127, :_reduce_53,
+ 1, 133, :_reduce_54,
+ 1, 133, :_reduce_55,
+ 1, 133, :_reduce_56,
+ 1, 133, :_reduce_57,
+ 1, 133, :_reduce_58,
+ 1, 133, :_reduce_59,
+ 1, 133, :_reduce_60,
+ 1, 133, :_reduce_61,
  1, 118, :_reduce_none,
- 1, 119, :_reduce_none,
- 2, 119, :_reduce_none,
- 5, 142, :_reduce_none,
- 5, 142, :_reduce_none,
- 5, 142, :_reduce_none,
+ 1, 119, :_reduce_63,
+ 2, 119, :_reduce_64,
+ 5, 142, :_reduce_65,
+ 5, 142, :_reduce_66,
+ 5, 142, :_reduce_67,
  2, 143, :_reduce_68,
  3, 143, :_reduce_69,
- 1, 144, :_reduce_none,
- 2, 144, :_reduce_none,
- 1, 144, :_reduce_none,
+ 1, 144, :_reduce_70,
+ 2, 144, :_reduce_71,
+ 1, 144, :_reduce_72,
  0, 130, :_reduce_none,
  2, 130, :_reduce_none,
@@ -902,40 +909,40 @@
  2, 103, :_reduce_none,
  2, 103, :_reduce_none,
- 2, 104, :_reduce_none,
+ 2, 104, :_reduce_85,
  2, 104, :_reduce_none,
  1, 109, :_reduce_none,
  1, 151, :_reduce_none,
  1, 151, :_reduce_none,
- 1, 152, :_reduce_none,
- 2, 152, :_reduce_none,
- 3, 152, :_reduce_none,
+ 1, 152, :_reduce_90,
+ 2, 152, :_reduce_91,
+ 3, 152, :_reduce_92,
  3, 154, :_reduce_93,
  1, 155, :_reduce_94,
  2, 155, :_reduce_none,
- 1, 156, :_reduce_none,
- 1, 156, :_reduce_none,
- 1, 153, :_reduce_none,
- 1, 153, :_reduce_none,
- 1, 159, :_reduce_none,
- 2, 159, :_reduce_none,
- 3, 160, :_reduce_none,
+ 1, 156, :_reduce_96,
+ 1, 156, :_reduce_97,
+ 1, 153, :_reduce_98,
+ 1, 153, :_reduce_99,
+ 1, 159, :_reduce_100,
+ 2, 159, :_reduce_101,
+ 3, 160, :_reduce_102,
  1, 161, :_reduce_103,
- 1, 162, :_reduce_none,
- 2, 162, :_reduce_none,
+ 1, 162, :_reduce_104,
+ 2, 162, :_reduce_105,
  3, 163, :_reduce_106,
  3, 164, :_reduce_107,
- 1, 158, :_reduce_none,
- 2, 158, :_reduce_none,
- 2, 166, :_reduce_none,
- 3, 166, :_reduce_none,
+ 1, 158, :_reduce_108,
+ 2, 158, :_reduce_109,
+ 2, 166, :_reduce_110,
+ 3, 166, :_reduce_111,
  1, 167, :_reduce_none,
- 1, 157, :_reduce_none,
- 2, 157, :_reduce_none,
+ 1, 157, :_reduce_113,
+ 2, 157, :_reduce_114,
  3, 168, :_reduce_115,
- 1, 169, :_reduce_none,
- 1, 169, :_reduce_none,
- 1, 169, :_reduce_none,
- 1, 169, :_reduce_none,
- 1, 169, :_reduce_none,
+ 1, 169, :_reduce_116,
+ 1, 169, :_reduce_117,
+ 1, 169, :_reduce_118,
+ 1, 169, :_reduce_119,
+ 1, 169, :_reduce_120,
  1, 165, :_reduce_121,
  1, 165, :_reduce_122,
@@ -969,7 +976,7 @@
  3, 184, :_reduce_none,
  3, 184, :_reduce_none,
- 1, 175, :_reduce_none,
- 2, 175, :_reduce_none,
- 2, 175, :_reduce_none,
+ 1, 175, :_reduce_152,
+ 2, 175, :_reduce_153,
+ 2, 175, :_reduce_154,
  3, 185, :_reduce_none,
  3, 185, :_reduce_none,
@@ -984,7 +991,7 @@
  4, 193, :_reduce_none,
  3, 193, :_reduce_none,
- 1, 176, :_reduce_none,
- 2, 176, :_reduce_none,
- 2, 176, :_reduce_none,
+ 1, 176, :_reduce_167,
+ 2, 176, :_reduce_168,
+ 2, 176, :_reduce_169,
  3, 186, :_reduce_none,
  3, 186, :_reduce_none,
@@ -999,6 +1006,6 @@
  4, 194, :_reduce_none,
  3, 194, :_reduce_none,
- 1, 177, :_reduce_none,
- 1, 177, :_reduce_none,
+ 1, 177, :_reduce_182,
+ 1, 177, :_reduce_183,
  3, 187, :_reduce_none,
  3, 187, :_reduce_none,
@@ -1107,9 +1114,9 @@
  2, 206, :_reduce_288,
  1, 206, :_reduce_289,
- 0, 145, :_reduce_none,
- 5, 145, :_reduce_none,
- 1, 207, :_reduce_none,
- 3, 207, :_reduce_none,
- 5, 146, :_reduce_none,
+ 0, 145, :_reduce_290,
+ 5, 145, :_reduce_291,
+ 1, 207, :_reduce_292,
+ 3, 207, :_reduce_293,
+ 5, 146, :_reduce_294,
  1, 208, :_reduce_none,
  3, 208, :_reduce_none,
@@ -1123,5 +1130,5 @@
  1, 210, :_reduce_none,
  0, 116, :_reduce_none,
- 5, 116, :_reduce_none,
+ 5, 116, :_reduce_306,
  2, 116, :_reduce_none,
  1, 209, :_reduce_none,
@@ -1170,11 +1177,11 @@
  3, 140, :_reduce_none,
  3, 140, :_reduce_none,
- 1, 219, :_reduce_none,
- 1, 219, :_reduce_none,
- 3, 219, :_reduce_none,
- 3, 219, :_reduce_none,
- 1, 141, :_reduce_none,
- 3, 141, :_reduce_none,
- 3, 141, :_reduce_none,
+ 1, 219, :_reduce_353,
+ 1, 219, :_reduce_354,
+ 3, 219, :_reduce_355,
+ 3, 219, :_reduce_356,
+ 1, 141, :_reduce_357,
+ 3, 141, :_reduce_358,
+ 3, 141, :_reduce_359,
  1, 126, :_reduce_none,
  3, 126, :_reduce_none,
@@ -1192,5 +1199,5 @@
  1, 149, :_reduce_none,
  1, 149, :_reduce_374,
- 1, 217, :_reduce_none ]
+ 1, 217, :_reduce_375 ]
 
 racc_reduce_n = 376
@@ -2012,27 +2019,101 @@
  # reduce 0 omitted
 
- # reduce 1 omitted
+module_eval <<'.,.,', 'lib/parser.y', 32
+  def _reduce_1( val, _values, result )
+    result = val[0]
+   result
+  end
+.,.,
 
  # reduce 2 omitted
 
- # reduce 3 omitted
-
- # reduce 4 omitted
-
- # reduce 5 omitted
-
- # reduce 6 omitted
-
- # reduce 7 omitted
-
- # reduce 8 omitted
-
- # reduce 9 omitted
-
- # reduce 10 omitted
-
- # reduce 11 omitted
-
- # reduce 12 omitted
+module_eval <<'.,.,', 'lib/parser.y', 57
+  def _reduce_3( val, _values, result )
+    assert_at(__FILE__,__LINE__) do
+      val[4].instance_of?(OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION) and val[5].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT) and val[7].instance_of?(OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY) 
+    end
+    
+    archetype_id = val[0][:archetype_id]
+    adl_version = val[0][:arch_head][:arch_meta_data][:adl_version]
+    concept = val[2]
+    language = val[3][:arch_language]
+    archetype = OpenEHR::AM::Archetype::ARCHETYPE.create(
+                                                         :archetype_id => archetype_id,
+                                                         :adl_version => adl_version,
+                                                         :concept => concept,
+                                                         :description => val[4],
+                                                         :definition => val[5],
+                                                         :ontology => val[7]
+                                                         ) do |archetype|
+      archetype.original_language = language
+    end
+    @@log.info("#{__FILE__}:#{__LINE__}: archetype = #{archetype} at #{@filename}:#{@lineno}")
+    result = archetype
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 63
+  def _reduce_4( val, _values, result )
+    result = {:arch_head => val[0], :archetype_id => val[1] }
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 67
+  def _reduce_5( val, _values, result )
+    raise
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 72
+  def _reduce_6( val, _values, result )
+    result = {:arch_meta_data => nil }
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 76
+  def _reduce_7( val, _values, result )
+    result = val[1]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 81
+  def _reduce_8( val, _values, result )
+    result = {:arch_meta_data => val[1] }
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 86
+  def _reduce_9( val, _values, result )
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 90
+  def _reduce_10( val, _values, result )
+    result = val[0].merge(val[2])
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 96
+  def _reduce_11( val, _values, result )
+    result = {:adl_version => val[2], :is_controlled => false }
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 100
+  def _reduce_12( val, _values, result )
+    result = {:is_controlled => true }
+   result
+  end
+.,.,
 
  # reduce 13 omitted
@@ -2042,13 +2123,23 @@
  # reduce 15 omitted
 
- # reduce 16 omitted
+module_eval <<'.,.,', 'lib/parser.y', 111
+  def _reduce_16( val, _values, result )
+    result = {:arch_concept => val[1] }
+   result
+  end
+.,.,
 
  # reduce 17 omitted
 
- # reduce 18 omitted
-
-module_eval <<'.,.,', 'lib/parser.y', 74
+module_eval <<'.,.,', 'lib/parser.y', 121
+  def _reduce_18( val, _values, result )
+    result = {:arch_language => nil}
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 125
   def _reduce_19( val, _values, result )
-    result = {:language => val[1]}
+    result = {:arch_language => val[1]}
    result
   end
@@ -2059,32 +2150,77 @@
  # reduce 21 omitted
 
- # reduce 22 omitted
+module_eval <<'.,.,', 'lib/parser.y', 136
+  def _reduce_22( val, _values, result )
+    result = OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION.new(:details => val[1])
+   result
+  end
+.,.,
 
  # reduce 23 omitted
 
- # reduce 24 omitted
+module_eval <<'.,.,', 'lib/parser.y', 144
+  def _reduce_24( val, _values, result )
+    result = val[1]
+   result
+  end
+.,.,
 
  # reduce 25 omitted
 
- # reduce 26 omitted
-
- # reduce 27 omitted
-
- # reduce 28 omitted
-
- # reduce 29 omitted
-
- # reduce 30 omitted
-
-module_eval <<'.,.,', 'lib/parser.y', 111
+module_eval <<'.,.,', 'lib/parser.y', 154
+  def _reduce_26( val, _values, result )
+    assert_at(__FILE__,__LINE__){val[0].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT)}
+    @@log.info("#{__FILE__}:#{__LINE__}: c_complex_object = #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 158
+  def _reduce_27( val, _values, result )
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 169
+  def _reduce_28( val, _values, result )
+    result = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:attributes => val[3]) do |c_complex_object|
+      c_complex_object.node_id = val[0][:c_complex_object_id][:local_term_code_ref]
+      c_complex_object.rm_type_name = val[0][:c_complex_object_id][:type_identifier]
+      c_complex_object.occurrences = val[0][:c_occurrences]
+    end
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 177
+  def _reduce_29( val, _values, result )
+    result = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:attributes => val[3]) do |c_complex_object|
+      c_complex_object.node_id = val[0][:c_complex_object_id][:local_term_code_ref]
+      c_complex_object.rm_type_name = val[0][:c_complex_object_id][:type_identifier]
+      c_complex_object.occurrences = val[0][:c_occurrences]
+    end
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 184
+  def _reduce_30( val, _values, result )
+    result = {:c_complex_object_id => val[0], :c_occurrences => val[1]}
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 189
   def _reduce_31( val, _values, result )
-    result = {:c_complex_object_id => {:type_identifier => val[0]}}
-   result
-  end
-.,.,
-
-module_eval <<'.,.,', 'lib/parser.y', 115
+    result = {:type_identifier => val[0]}
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 193
   def _reduce_32( val, _values, result )
-    result = {:c_complex_object_id => {:type_identifier => val[0], :V_LOCAL_TERM_CODE_REF => val[1]}}
+    result = {:type_identifier => val[0], :local_term_code_ref => val[1]}
    result
   end
@@ -2093,21 +2229,66 @@
  # reduce 33 omitted
 
- # reduce 34 omitted
-
- # reduce 35 omitted
-
- # reduce 36 omitted
-
- # reduce 37 omitted
-
- # reduce 38 omitted
-
- # reduce 39 omitted
-
- # reduce 40 omitted
-
- # reduce 41 omitted
-
- # reduce 42 omitted
+module_eval <<'.,.,', 'lib/parser.y', 199
+  def _reduce_34( val, _values, result )
+    result = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new(:attributes => val[0])
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 207
+  def _reduce_35( val, _values, result )
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 211
+  def _reduce_36( val, _values, result )
+    result = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 215
+  def _reduce_37( val, _values, result )
+    result = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF.new
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 219
+  def _reduce_38( val, _values, result )
+    result = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT.new
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 223
+  def _reduce_39( val, _values, result )
+    result = OpenEHR::AM::Archetype::Constraint_Model::CONSTRAINT_REF.new
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 227
+  def _reduce_40( val, _values, result )
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 231
+  def _reduce_41( val, _values, result )
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 235
+  def _reduce_42( val, _values, result )
+    result = val[0]
+   result
+  end
+.,.,
 
  # reduce 43 omitted
@@ -2115,5 +2296,10 @@
  # reduce 44 omitted
 
- # reduce 45 omitted
+module_eval <<'.,.,', 'lib/parser.y', 250
+  def _reduce_45( val, _values, result )
+    result = val[1]
+   result
+  end
+.,.,
 
  # reduce 46 omitted
@@ -2131,53 +2317,163 @@
  # reduce 52 omitted
 
- # reduce 53 omitted
-
- # reduce 54 omitted
-
- # reduce 55 omitted
-
- # reduce 56 omitted
-
- # reduce 57 omitted
-
- # reduce 58 omitted
-
- # reduce 59 omitted
-
- # reduce 60 omitted
-
- # reduce 61 omitted
+module_eval <<'.,.,', 'lib/parser.y', 270
+  def _reduce_53( val, _values, result )
+    assert_at(__FILE__,__LINE__){val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE)}
+    result = OpenEHR::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT.new(:item => val[0])
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 276
+  def _reduce_54( val, _values, result )
+    @@log.info("#{__FILE__}:#{__LINE__}: c_integer = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_INTEGER.new
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 281
+  def _reduce_55( val, _values, result )
+    @@log.info("#{__FILE__}:#{__LINE__}: c_real = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_REAL.new
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 286
+  def _reduce_56( val, _values, result )
+    @@log.info("#{__FILE__}:#{__LINE__}: c_date = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE.new
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 291
+  def _reduce_57( val, _values, result )
+    @@log.info("#{__FILE__}:#{__LINE__}: c_time = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_TIME.new
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 296
+  def _reduce_58( val, _values, result )
+    @@log.info("#{__FILE__}:#{__LINE__}: c_date_time = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME.new
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 301
+  def _reduce_59( val, _values, result )
+    @@log.info("#{__FILE__}:#{__LINE__}: c_duration = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DURATION.new
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 306
+  def _reduce_60( val, _values, result )
+    @@log.info("#{__FILE__}:#{__LINE__}: c_string = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_STRING.new
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 312
+  def _reduce_61( val, _values, result )
+    assert_at(__FILE__,__LINE__){val[0].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN)}
+    @@log.info("#{__FILE__}:#{__LINE__}: c_boolean = #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+   result
+  end
+.,.,
 
  # reduce 62 omitted
 
- # reduce 63 omitted
-
- # reduce 64 omitted
-
- # reduce 65 omitted
-
- # reduce 66 omitted
-
- # reduce 67 omitted
-
-module_eval <<'.,.,', 'lib/parser.y', 186
+module_eval <<'.,.,', 'lib/parser.y', 322
+  def _reduce_63( val, _values, result )
+    result = [val[0]]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 326
+  def _reduce_64( val, _values, result )
+    result = (val[0] << val[1])
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 335
+  def _reduce_65( val, _values, result )
+    assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
+    c_attribute = val[0]
+    c_attribute.children = val[3]
+    result = c_attribute
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 340
+  def _reduce_66( val, _values, result )
+    assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 345
+  def _reduce_67( val, _values, result )
+    assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 356
   def _reduce_68( val, _values, result )
     @@log.info("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]}, c_existence = #{val[1]} at #{@filename}")
-   result
-  end
-.,.,
-
-module_eval <<'.,.,', 'lib/parser.y', 190
+    result = OpenEHR::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE.new(
+                                                                              :rm_attribute_name => val[0],
+                                                                              :existence => val[1]
+                                                                              )
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 366
   def _reduce_69( val, _values, result )
-    @@log.info("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER: #{val[0]}, c_existence = #{val[1]}, c_cardinality = #{val[2]} at #{@filename}")
-   result
-  end
-.,.,
-
- # reduce 70 omitted
-
- # reduce 71 omitted
-
- # reduce 72 omitted
+    assert_at(__FILE__,__LINE__){ val[2].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY) }
+    @@log.info("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER: #{val[0]}, c_existence = #{val[1]}, c_cardinality = #{val[2]} at #{@filename}") 
+    result = OpenEHR::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE.new(
+                                                                                :rm_attribute_name => val[0],
+                                                                                :existence => val[1],
+                                                                                :cardinality => val[2]
+                                                                                )
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 371
+  def _reduce_70( val, _values, result )
+    result = Array[val[0]]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 375
+  def _reduce_71( val, _values, result )
+    result = (val[0] << val[1])
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 379
+  def _reduce_72( val, _values, result )
+    result = Array[val[0]]
+   result
+  end
+.,.,
 
  # reduce 73 omitted
@@ -2205,5 +2501,11 @@
  # reduce 84 omitted
 
- # reduce 85 omitted
+module_eval <<'.,.,', 'lib/parser.y', 410
+  def _reduce_85( val, _values, result )
+    dadl_section = val[1]
+    result = OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY.new
+   result
+  end
+.,.,
 
  # reduce 86 omitted
@@ -2215,20 +2517,37 @@
  # reduce 89 omitted
 
- # reduce 90 omitted
-
- # reduce 91 omitted
-
- # reduce 92 omitted
-
-module_eval <<'.,.,', 'lib/parser.y', 240
+module_eval <<'.,.,', 'lib/parser.y', 424
+  def _reduce_90( val, _values, result )
+    result = Array[val[0]]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 428
+  def _reduce_91( val, _values, result )
+    result = (val[0] << val[1])
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 432
+  def _reduce_92( val, _values, result )
+    result = (val[0] << val[2])
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 438
   def _reduce_93( val, _values, result )
     @@log.info("#{__FILE__}:#{__LINE__}: attr_id = #{val[0]}, object_block = #{val[2]} at #{@filename}:#{@lineno}")
-   result
-  end
-.,.,
-
-module_eval <<'.,.,', 'lib/parser.y', 245
+    result = {:attr_id => val[0], :object_block => val[2]}
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 444
   def _reduce_94( val, _values, result )
     @@log.info("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
    result
   end
@@ -2237,140 +2556,258 @@
  # reduce 95 omitted
 
- # reduce 96 omitted
-
- # reduce 97 omitted
-
- # reduce 98 omitted
-
- # reduce 99 omitted
-
- # reduce 100 omitted
-
- # reduce 101 omitted
-
- # reduce 102 omitted
-
-module_eval <<'.,.,', 'lib/parser.y', 262
+module_eval <<'.,.,', 'lib/parser.y', 450
+  def _reduce_96( val, _values, result )
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 454
+  def _reduce_97( val, _values, result )
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 459
+  def _reduce_98( val, _values, result )
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 463
+  def _reduce_99( val, _values, result )
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 468
+  def _reduce_100( val, _values, result )
+    result = {:untyped_multiple_attr_object_block => val[0]}
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 472
+  def _reduce_101( val, _values, result )
+    result = {:type_identifier => val[0], :untyped_multiple_attr_object_block => val[1]}
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 477
+  def _reduce_102( val, _values, result )
+    result = {:multiple_attr_object_block_head => val[0], :keyed_objects => val[1]}
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 483
   def _reduce_103( val, _values, result )
     @@log.info("SYM_START_DBLOCK: #{val[0]} at #{@filename}:#{@lineno}")
-   result
-  end
-.,.,
-
- # reduce 104 omitted
-
- # reduce 105 omitted
-
-module_eval <<'.,.,', 'lib/parser.y', 270
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 488
+  def _reduce_104( val, _values, result )
+    result = Array[val[0]]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 492
+  def _reduce_105( val, _values, result )
+    result = (val[0] << val[1])
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 498
   def _reduce_106( val, _values, result )
     @@log.info("#{__FILE__}:#{__LINE__}: keyed_object = #{val[0]}, object_block = #{val[2]} at #{@filename}:#{@lineno}")
-   result
-  end
-.,.,
-
-module_eval <<'.,.,', 'lib/parser.y', 275
+    result = {:object_key => val[0], :object_block => val[1]}
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 504
   def _reduce_107( val, _values, result )
     @@log.info("object_key: [#{val[1]}] at #{@filename}:#{@lineno}")
-   result
-  end
-.,.,
-
- # reduce 108 omitted
-
- # reduce 109 omitted
-
- # reduce 110 omitted
-
- # reduce 111 omitted
+    result = val[1]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 509
+  def _reduce_108( val, _values, result )
+    result = {:untyped_single_attr_object_block => val[0]}
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 513
+  def _reduce_109( val, _values, result )
+    result = {:type_identifier => val[0], :untyped_single_attr_object_block => val[1]}
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 519
+  def _reduce_110( val, _values, result )
+    @@log.info("#{__FILE__}:#{__LINE__}: single_attr_object_complex_head = #{val[0]} at #{@filename}:#{@lineno}")
+    result = {:single_attr_object_complex_head => val[0]}
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 524
+  def _reduce_111( val, _values, result )
+    @@log.info("#{__FILE__}:#{__LINE__}: single_attr_object_complex_head = #{val[0]}, attr_vals = #{val[1]} at #{@filename}:#{@lineno}")
+    result = {:single_attr_object_complex_head => val[0], :attr_vals => val[1]}
+   result
+  end
+.,.,
 
  # reduce 112 omitted
 
- # reduce 113 omitted
-
- # reduce 114 omitted
-
-module_eval <<'.,.,', 'lib/parser.y', 287
+module_eval <<'.,.,', 'lib/parser.y', 530
+  def _reduce_113( val, _values, result )
+    @@log.info("#{__FILE__}:#{__LINE__}: untyped_primitive_object_block = #{val[0]} at #{@filename}:#{@lineno}")
+    result = {:untyped_primitive_object_block => val[0]}
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 535
+  def _reduce_114( val, _values, result )
+    @@log.info("#{__FILE__}:#{__LINE__}: type_identifier = #{val[0]}, untyped_primitive_object_block = #{val[1]} at #{@filename}:#{@lineno}")
+    result = {:type_identifier => val[0], :untyped_primitive_object_block => val[1]}
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 540
   def _reduce_115( val, _values, result )
-    @@log.info("#{__FILE__}:#{__LINE__}: primitive_object_block = <#{val[2]}> at #{@filename}:#{@lineno}")
-   result
-  end
-.,.,
-
- # reduce 116 omitted
-
- # reduce 117 omitted
-
- # reduce 118 omitted
-
- # reduce 119 omitted
-
- # reduce 120 omitted
-
-module_eval <<'.,.,', 'lib/parser.y', 296
+    @@log.info("#{__FILE__}:#{__LINE__}: primitive_object_block = <#{val[1]}> at #{@filename}:#{@lineno}")
+    result = val[1]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 544
+  def _reduce_116( val, _values, result )
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 548
+  def _reduce_117( val, _values, result )
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 552
+  def _reduce_118( val, _values, result )
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 556
+  def _reduce_119( val, _values, result )
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 560
+  def _reduce_120( val, _values, result )
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 565
   def _reduce_121( val, _values, result )
     @@log.info("string_value: #{val[0]} at #{@filename}:#{@lineno}")
-   result
-  end
-.,.,
-
-module_eval <<'.,.,', 'lib/parser.y', 300
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 570
   def _reduce_122( val, _values, result )
     @@log.info("integer_value: #{val[0]} at #{@filename}:#{@lineno}")
-   result
-  end
-.,.,
-
-module_eval <<'.,.,', 'lib/parser.y', 304
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 575
   def _reduce_123( val, _values, result )
     @@log.info("real_value: #{val[0]} at #{@filename}:#{@lineno}")
-   result
-  end
-.,.,
-
-module_eval <<'.,.,', 'lib/parser.y', 308
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 580
   def _reduce_124( val, _values, result )
     @@log.info("boolean_value: #{val[0]} at #{@filename}:#{@lineno}")
-   result
-  end
-.,.,
-
-module_eval <<'.,.,', 'lib/parser.y', 312
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 585
   def _reduce_125( val, _values, result )
     @@log.info("character_value: #{val[0]} at #{@filename}:#{@lineno}")
-   result
-  end
-.,.,
-
-module_eval <<'.,.,', 'lib/parser.y', 316
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 590
   def _reduce_126( val, _values, result )
     @@log.info("date_value: #{val[0]} at #{@filename}:#{@lineno}")
-   result
-  end
-.,.,
-
-module_eval <<'.,.,', 'lib/parser.y', 320
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 595
   def _reduce_127( val, _values, result )
     @@log.info("time_value: #{val[0]} at #{@filename}:#{@lineno}")
-   result
-  end
-.,.,
-
-module_eval <<'.,.,', 'lib/parser.y', 324
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 600
   def _reduce_128( val, _values, result )
     @@log.info("date_time_value: #{val[0]} at #{@filename}:#{@lineno}")
-   result
-  end
-.,.,
-
-module_eval <<'.,.,', 'lib/parser.y', 328
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 605
   def _reduce_129( val, _values, result )
     @@log.info("duration_value: #{val[0]} at #{@filename}:#{@lineno}")
-   result
-  end
-.,.,
-
-module_eval <<'.,.,', 'lib/parser.y', 332
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 610
   def _reduce_130( val, _values, result )
     @@log.info("uri_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
    result
   end
@@ -2407,21 +2844,24 @@
  # reduce 145 omitted
 
-module_eval <<'.,.,', 'lib/parser.y', 353
+module_eval <<'.,.,', 'lib/parser.y', 633
   def _reduce_146( val, _values, result )
     @@log.info("V_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}")
-   result
-  end
-.,.,
-
-module_eval <<'.,.,', 'lib/parser.y', 357
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 638
   def _reduce_147( val, _values, result )
     @@log.info("V_GENERIC_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}")
-   result
-  end
-.,.,
-
-module_eval <<'.,.,', 'lib/parser.y', 362
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 644
   def _reduce_148( val, _values, result )
     @@log.info("V_STRING: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
    result
   end
@@ -2434,9 +2874,39 @@
  # reduce 151 omitted
 
- # reduce 152 omitted
-
- # reduce 153 omitted
-
- # reduce 154 omitted
+module_eval <<'.,.,', 'lib/parser.y', 658
+  def _reduce_152( val, _values, result )
+    begin
+      integer = Integer(val[0])
+    rescue
+      raise
+    end
+    result = integer
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 667
+  def _reduce_153( val, _values, result )
+    begin
+      integer = Integer(val[0])
+    rescue
+      raise
+    end
+    result = integer
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 676
+  def _reduce_154( val, _values, result )
+    begin
+      integer = Integer(val[0])
+    rescue
+      raise
+    end
+    result = - integer
+   result
+  end
+.,.,
 
  # reduce 155 omitted
@@ -2464,9 +2934,39 @@
  # reduce 166 omitted
 
- # reduce 167 omitted
-
- # reduce 168 omitted
-
- # reduce 169 omitted
+module_eval <<'.,.,', 'lib/parser.y', 702
+  def _reduce_167( val, _values, result )
+    begin
+      real = Float(val[0])
+    rescue
+      raise
+    end
+    result = real
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 711
+  def _reduce_168( val, _values, result )
+    begin
+      real = Float(val[1])
+    rescue
+      raise
+    end
+    result = real
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 720
+  def _reduce_169( val, _values, result )
+    begin
+      real = Float(val[1])
+    rescue
+      raise
+    end
+    result = - real
+   result
+  end
+.,.,
 
  # reduce 170 omitted
@@ -2494,7 +2994,17 @@
  # reduce 181 omitted
 
- # reduce 182 omitted
-
- # reduce 183 omitted
+module_eval <<'.,.,', 'lib/parser.y', 740
+  def _reduce_182( val, _values, result )
+    result = true
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 744
+  def _reduce_183( val, _values, result )
+    result = false
+   result
+  end
+.,.,
 
  # reduce 184 omitted
@@ -2590,7 +3100,8 @@
  # reduce 229 omitted
 
-module_eval <<'.,.,', 'lib/parser.y', 473
+module_eval <<'.,.,', 'lib/parser.y', 808
   def _reduce_230( val, _values, result )
     @@log.info("V_ISO8601_DURATION: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
    result
   end
@@ -2621,7 +3132,8 @@
  # reduce 242 omitted
 
-module_eval <<'.,.,', 'lib/parser.y', 492
+module_eval <<'.,.,', 'lib/parser.y', 828
   def _reduce_243( val, _values, result )
     @@log.info("#{__FILE__}:#{__LINE__}: V_QUALIFIED_TERM_CODE_REF = #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
    result
   end
@@ -2634,7 +3146,8 @@
  # reduce 246 omitted
 
-module_eval <<'.,.,', 'lib/parser.y', 501
+module_eval <<'.,.,', 'lib/parser.y', 838
   def _reduce_247( val, _values, result )
     @@log.info("#{__FILE__}:#{__LINE__}: V_URI = #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
    result
   end
@@ -2721,5 +3234,5 @@
  # reduce 287 omitted
 
-module_eval <<'.,.,', 'lib/parser.y', 570
+module_eval <<'.,.,', 'lib/parser.y', 907
   def _reduce_288( val, _values, result )
     @@log.info("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}")
@@ -2728,5 +3241,5 @@
 .,.,
 
-module_eval <<'.,.,', 'lib/parser.y', 574
+module_eval <<'.,.,', 'lib/parser.y', 911
   def _reduce_289( val, _values, result )
     @@log.info("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}")
@@ -2735,13 +3248,49 @@
 .,.,
 
- # reduce 290 omitted
-
- # reduce 291 omitted
-
- # reduce 292 omitted
-
- # reduce 293 omitted
-
- # reduce 294 omitted
+module_eval <<'.,.,', 'lib/parser.y', 922
+  def _reduce_290( val, _values, result )
+    result = Range.new(1,1)
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 926
+  def _reduce_291( val, _values, result )
+    result = val[3]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 936
+  def _reduce_292( val, _values, result )
+    begin
+      integer = Integer(val[0])
+    rescue
+      raise
+    end
+    result = integer
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 946
+  def _reduce_293( val, _values, result )
+    begin
+      from_integer = Integer(val[0])
+      to_integer = Integer(val[2])
+    rescue
+      raise
+    end
+    result = Range.new(from_integer,to_integer)
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 951
+  def _reduce_294( val, _values, result )
+    result = OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY.new
+   result
+  end
+.,.,
 
  # reduce 295 omitted
@@ -2767,5 +3316,10 @@
  # reduce 305 omitted
 
- # reduce 306 omitted
+module_eval <<'.,.,', 'lib/parser.y', 970
+  def _reduce_306( val, _values, result )
+    result = val[3]
+   result
+  end
+.,.,
 
  # reduce 307 omitted
@@ -2861,17 +3415,52 @@
  # reduce 352 omitted
 
- # reduce 353 omitted
-
- # reduce 354 omitted
-
- # reduce 355 omitted
-
- # reduce 356 omitted
-
- # reduce 357 omitted
-
- # reduce 358 omitted
-
- # reduce 359 omitted
+module_eval <<'.,.,', 'lib/parser.y', 1040
+  def _reduce_353( val, _values, result )
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true)
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 1044
+  def _reduce_354( val, _values, result )
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false)
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 1048
+  def _reduce_355( val, _values, result )
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true,:false_valid => false)
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 1052
+  def _reduce_356( val, _values, result )
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false,:false_valid => true)
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 1057
+  def _reduce_357( val, _values, result )
+    result = val[0]
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 1061
+  def _reduce_358( val, _values, result )
+    raise 'Not implemented yet'
+   result
+  end
+.,.,
+
+module_eval <<'.,.,', 'lib/parser.y', 1065
+  def _reduce_359( val, _values, result )
+    raise 'Not implemented yet'
+   result
+  end
+.,.,
 
  # reduce 360 omitted
@@ -2885,5 +3474,5 @@
  # reduce 364 omitted
 
-module_eval <<'.,.,', 'lib/parser.y', 694
+module_eval <<'.,.,', 'lib/parser.y', 1078
   def _reduce_365( val, _values, result )
     @in_interval = false
@@ -2909,5 +3498,5 @@
  # reduce 373 omitted
 
-module_eval <<'.,.,', 'lib/parser.y', 716
+module_eval <<'.,.,', 'lib/parser.y', 1100
   def _reduce_374( val, _values, result )
     @@log.info("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{word} at #{@filename}")
@@ -2916,5 +3505,10 @@
 .,.,
 
- # reduce 375 omitted
+module_eval <<'.,.,', 'lib/parser.y', 1110
+  def _reduce_375( val, _values, result )
+    result = val[0]
+   result
+  end
+.,.,
 
  def _reduce_none( val, _values, result )
