Index: /ruby/trunk/lib/adl_parser/lib/parser.rb
===================================================================
--- /ruby/trunk/lib/adl_parser/lib/parser.rb	(revision 328)
+++ /ruby/trunk/lib/adl_parser/lib/parser.rb	(revision 329)
@@ -22,5 +22,5 @@
     class Parser < Racc::Parser
 
-module_eval(<<'...end parser.y/module_eval...', 'parser.y', 1417)
+module_eval(<<'...end parser.y/module_eval...', 'parser.y', 1450)
 
 def assert_at(file,line, message = "")
@@ -1444,43 +1444,57 @@
 module_eval(<<'.,.,', 'parser.y', 150)
   def _reduce_22(val, _values, result)
-        args = Hash.new
-    val[1].each do |item|
-      @@logger.debug("#{__FILE__}:#{__LINE__}: arch_description: item = #{item.to_yaml} at #{@filename}:#{@lineno}")
-      case item
+        dadl_section = val[1]
+    args = Hash.new
+    @@logger.debug("#{__FILE__}:#{__LINE__}: arch_description: val[1].class = \n#{val[1].class} at #{@filename}:#{@lineno}")
+#    val[1].each do |item|
+#      @@logger.debug("#{__FILE__}:#{__LINE__}: arch_description: item = \n#{item.to_yaml} at #{@filename}:#{@lineno}")
+#      case item[:attr_id]
+      case dadl_section[:attr_id]
       when "original_author"
-        unless item[:object_block][:type_identifier]
-          args.merge!(Hash[:original_author => item[:untyped_multiple_attr_object_block]])
+#        unless item[:object_block][:type_identifier]
+        unless dadl_section[:object_block][:type_identifier]
+#          args.merge!(Hash[:original_author => item[:untyped_multiple_attr_object_block]])
+          args.merge!(Hash[:original_author => dadl_section[:untyped_multiple_attr_object_block]])
         else
           raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
         end
       when "details"
-        unless item[:type_identifier]
-          args.merge!(Hash[:details => item[:untyped_multiple_attr_object_block]])
+#        unless item[:type_identifier]
+        unless dadl_section[:type_identifier]
+#          args.merge!(Hash[:details => item[:untyped_multiple_attr_object_block]])
           #args.merge!(Hash[:details => item[:object_block]])
+          args.merge!(Hash[:details => dadl_section[:untyped_multiple_attr_object_block]])
         else
           raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
         end
       when "lifecycle_state"
-        unless item[:type_identifier]
-          args.merge!(Hash[:lifecycle_state => item[:untyped_primitive_object_block]])
+#        unless item[:type_identifier]
+        unless dadl_section[:type_identifier]
+#          args.merge!(Hash[:lifecycle_state => item[:untyped_primitive_object_block]])
+          args.merge!(Hash[:lifecycle_state => dadl_section[:untyped_primitive_object_block]])
         else
           raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
         end
       when "other_contributors"
-        unless item[:type_identifier]
-          args.merge!(Hash[:other_contributors => item[:untyped_multiple_attr_object_block]])
+#        unless item[:type_identifier]
+        unless dadl_section[:type_identifier]
+#          args.merge!(Hash[:other_contributors => item[:untyped_multiple_attr_object_block]])
+          args.merge!(Hash[:other_contributors => dadl_section[:untyped_multiple_attr_object_block]])
         else
           raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
         end
       when "other_details"
-        unless item[:type_identifier]
-          args.merge!(Hash[:other_contributors => item[:untyped_multiple_attr_object_block]])
+#        unless item[:type_identifier]
+        unless dadl_section[:type_identifier]
+#          args.merge!(Hash[:other_contributors => item[:untyped_multiple_attr_object_block]])
+          args.merge!(Hash[:other_contributors => dadl_section[:untyped_multiple_attr_object_block]])
         else
           raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
         end
       else
-        raise OpenEhr::ADL::Exception::Parser::Error, "Unknown case #{item} at #{@filename}:#{@lineno} "
+#        raise OpenEhr::ADL::Exception::Parser::Error, "Unknown case #{item} at #{@filename}:#{@lineno} "
+        raise OpenEhr::ADL::Exception::Parser::Error, "Unknown case #{dadl_section} at #{@filename}:#{@lineno} "
       end
-    end
+#    end
     @@logger.debug("#{__FILE__}:#{__LINE__}: arch_description: args  = \n#{args.to_yaml} at #{@filename}:#{@lineno}")
     result = OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION.new(args)
@@ -1492,5 +1506,5 @@
 # reduce 23 omitted
 
-module_eval(<<'.,.,', 'parser.y', 198)
+module_eval(<<'.,.,', 'parser.y', 212)
   def _reduce_24(val, _values, result)
         result = val[1]
@@ -1502,5 +1516,5 @@
 # reduce 25 omitted
 
-module_eval(<<'.,.,', 'parser.y', 206)
+module_eval(<<'.,.,', 'parser.y', 220)
   def _reduce_26(val, _values, result)
         assert_at(__FILE__,__LINE__){val[0].instance_of?(OpenEhr::AM::Archetype::ConstraintModel::C_COMPLEX_OBJECT)}
@@ -1512,5 +1526,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 212)
+module_eval(<<'.,.,', 'parser.y', 226)
   def _reduce_27(val, _values, result)
         result = val[0]
@@ -1520,5 +1534,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 220)
+module_eval(<<'.,.,', 'parser.y', 234)
   def _reduce_28(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}:c_complx_object = \n c_complx_object_head = #{val[0].to_yaml}")
@@ -1533,5 +1547,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 230)
+module_eval(<<'.,.,', 'parser.y', 244)
   def _reduce_29(val, _values, result)
         result = OpenEhr::AM::Archetype::ConstraintModel::C_COMPLEX_OBJECT.create(:attributes => val[3]) do |c_complex_object|
@@ -1545,5 +1559,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 242)
+module_eval(<<'.,.,', 'parser.y', 256)
   def _reduce_30(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: c_complex_object_head: c_complex_object_id => #{val[0]}, c_occurrences => #{val[1]}")
@@ -1554,5 +1568,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 248)
+module_eval(<<'.,.,', 'parser.y', 262)
   def _reduce_31(val, _values, result)
         result = {:type_identifier => val[0]}
@@ -1562,5 +1576,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 252)
+module_eval(<<'.,.,', 'parser.y', 266)
   def _reduce_32(val, _values, result)
         result = {:type_identifier => val[0], :local_term_code_ref => val[1]}
@@ -1572,5 +1586,5 @@
 # reduce 33 omitted
 
-module_eval(<<'.,.,', 'parser.y', 258)
+module_eval(<<'.,.,', 'parser.y', 272)
   def _reduce_34(val, _values, result)
         result = OpenEhr::AM::Archetype::ConstraintModel::C_COMPLEX_OBJECT.new(:attributes => val[0])
@@ -1580,5 +1594,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 276)
+module_eval(<<'.,.,', 'parser.y', 290)
   def _reduce_35(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: c_complex_object = #{val[0].inspect} at #{@filename}:#{@lineno}")
@@ -1589,5 +1603,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 281)
+module_eval(<<'.,.,', 'parser.y', 295)
   def _reduce_36(val, _values, result)
         result = OpenEhr::AM::Archetype::ConstraintModel::ARCHETYPE_INTERNAL_REF.create do |archetype_internal_ref|
@@ -1601,5 +1615,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 289)
+module_eval(<<'.,.,', 'parser.y', 303)
   def _reduce_37(val, _values, result)
         result = val[0]
@@ -1609,5 +1623,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 293)
+module_eval(<<'.,.,', 'parser.y', 307)
   def _reduce_38(val, _values, result)
         result = OpenEhr::AM::Archetype::ConstraintModel::CONSTRAINT_REF.create do |constraint_ref|
@@ -1619,5 +1633,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 299)
+module_eval(<<'.,.,', 'parser.y', 313)
   def _reduce_39(val, _values, result)
         result = val[0]
@@ -1627,5 +1641,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 303)
+module_eval(<<'.,.,', 'parser.y', 317)
   def _reduce_40(val, _values, result)
         result = val[0]
@@ -1635,5 +1649,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 307)
+module_eval(<<'.,.,', 'parser.y', 321)
   def _reduce_41(val, _values, result)
         result = val[0]
@@ -1643,5 +1657,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 311)
+module_eval(<<'.,.,', 'parser.y', 325)
   def _reduce_42(val, _values, result)
         result = val[0]
@@ -1655,5 +1669,5 @@
 # reduce 44 omitted
 
-module_eval(<<'.,.,', 'parser.y', 344)
+module_eval(<<'.,.,', 'parser.y', 358)
   def _reduce_45(val, _values, result)
         result = val[1]
@@ -1663,5 +1677,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 350)
+module_eval(<<'.,.,', 'parser.y', 364)
   def _reduce_46(val, _values, result)
         result = {:type_identifier => val[1], :c_occurrences => val[2], :absolute_path => val[3] }
@@ -1673,5 +1687,5 @@
 # reduce 47 omitted
 
-module_eval(<<'.,.,', 'parser.y', 357)
+module_eval(<<'.,.,', 'parser.y', 371)
   def _reduce_48(val, _values, result)
         result = OpenEhr::AM::Archetype::ConstraintModel::ARCHETYPE_SLOT.create do |archetype_slot|
@@ -1686,5 +1700,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 366)
+module_eval(<<'.,.,', 'parser.y', 380)
   def _reduce_49(val, _values, result)
         result = {:c_archetype_slot_id => val[0],:c_occurrences => val[1]}
@@ -1694,5 +1708,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 371)
+module_eval(<<'.,.,', 'parser.y', 385)
   def _reduce_50(val, _values, result)
         result = val[1]
@@ -1706,5 +1720,5 @@
 # reduce 52 omitted
 
-module_eval(<<'.,.,', 'parser.y', 379)
+module_eval(<<'.,.,', 'parser.y', 393)
   def _reduce_53(val, _values, result)
         assert_at(__FILE__,__LINE__){val[0].kind_of?(OpenEhr::AM::Archetype::ConstraintModel::Primitive::C_PRIMITIVE)}
@@ -1717,5 +1731,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 387)
+module_eval(<<'.,.,', 'parser.y', 401)
   def _reduce_54(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: c_integer = #{val[0]} at #{@filename}:#{@lineno}")
@@ -1730,5 +1744,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 396)
+module_eval(<<'.,.,', 'parser.y', 410)
   def _reduce_55(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: c_real = #{val[0]} at #{@filename}:#{@lineno}")
@@ -1739,5 +1753,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 401)
+module_eval(<<'.,.,', 'parser.y', 415)
   def _reduce_56(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: c_date = #{val[0]} at #{@filename}:#{@lineno}")
@@ -1748,5 +1762,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 406)
+module_eval(<<'.,.,', 'parser.y', 420)
   def _reduce_57(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: c_time = #{val[0]} at #{@filename}:#{@lineno}")
@@ -1757,5 +1771,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 411)
+module_eval(<<'.,.,', 'parser.y', 425)
   def _reduce_58(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: c_date_time = #{val[0]} at #{@filename}:#{@lineno}")
@@ -1766,5 +1780,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 416)
+module_eval(<<'.,.,', 'parser.y', 430)
   def _reduce_59(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: c_duration = #{val[0]} at #{@filename}:#{@lineno}")
@@ -1775,5 +1789,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 421)
+module_eval(<<'.,.,', 'parser.y', 435)
   def _reduce_60(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: c_string = #{val[0]} at #{@filename}:#{@lineno}")
@@ -1784,5 +1798,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 426)
+module_eval(<<'.,.,', 'parser.y', 440)
   def _reduce_61(val, _values, result)
         assert_at(__FILE__,__LINE__){val[0].instance_of?(OpenEhr::AM::Archetype::ConstraintModel::Primitive::C_BOOLEAN)}
@@ -1796,5 +1810,5 @@
 # reduce 62 omitted
 
-module_eval(<<'.,.,', 'parser.y', 438)
+module_eval(<<'.,.,', 'parser.y', 452)
   def _reduce_63(val, _values, result)
         result = [val[0]]
@@ -1804,5 +1818,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 442)
+module_eval(<<'.,.,', 'parser.y', 456)
   def _reduce_64(val, _values, result)
         result = (val[0] << val[1])
@@ -1812,5 +1826,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 448)
+module_eval(<<'.,.,', 'parser.y', 462)
   def _reduce_65(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}:c_attribute: #{val[0]} matches #{val[3]}")
@@ -1824,5 +1838,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 456)
+module_eval(<<'.,.,', 'parser.y', 470)
   def _reduce_66(val, _values, result)
         @@logger.debug("c_attribute: #{val[0]} matches #{val[3]}}")
@@ -1834,5 +1848,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 463)
+module_eval(<<'.,.,', 'parser.y', 477)
   def _reduce_67(val, _values, result)
         @@logger.debug("c_attribute: #{val[0]} matches #{val[5]}}")
@@ -1844,5 +1858,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 469)
+module_eval(<<'.,.,', 'parser.y', 483)
   def _reduce_68(val, _values, result)
         assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEhr::AM::Archetype::ConstraintModel::C_ATTRIBUTE)}
@@ -1853,5 +1867,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 476)
+module_eval(<<'.,.,', 'parser.y', 490)
   def _reduce_69(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]}, c_existence = #{val[1]} at #{@filename}")
@@ -1866,5 +1880,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 485)
+module_eval(<<'.,.,', 'parser.y', 499)
   def _reduce_70(val, _values, result)
         assert_at(__FILE__,__LINE__){ val[2].instance_of?(OpenEhr::AM::Archetype::ConstraintModel::CARDINALITY) }
@@ -1880,5 +1894,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 496)
+module_eval(<<'.,.,', 'parser.y', 510)
   def _reduce_71(val, _values, result)
         result = Array[val[0]]
@@ -1888,5 +1902,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 500)
+module_eval(<<'.,.,', 'parser.y', 514)
   def _reduce_72(val, _values, result)
         result = (val[0] << val[1])
@@ -1896,5 +1910,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 504)
+module_eval(<<'.,.,', 'parser.y', 518)
   def _reduce_73(val, _values, result)
         result = Array[val[0]]
@@ -1906,5 +1920,5 @@
 # reduce 74 omitted
 
-module_eval(<<'.,.,', 'parser.y', 510)
+module_eval(<<'.,.,', 'parser.y', 524)
   def _reduce_75(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: c_includes: assertions = #{val[1]}") 
@@ -1917,5 +1931,5 @@
 # reduce 76 omitted
 
-module_eval(<<'.,.,', 'parser.y', 519)
+module_eval(<<'.,.,', 'parser.y', 533)
   def _reduce_77(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: c_excludes: assertions = #{val[1]}") 
@@ -1942,37 +1956,56 @@
 # reduce 85 omitted
 
-module_eval(<<'.,.,', 'parser.y', 542)
+module_eval(<<'.,.,', 'parser.y', 556)
   def _reduce_86(val, _values, result)
         dadl_section = val[1]
-    @@logger.debug("#{__FILE__}:#{__LINE__}: arch_ontology: dadl_section = #{val[1].to_yaml}") 
+    @@logger.debug("#{__FILE__}:#{__LINE__}: arch_ontology: dadl_section = \n#{dadl_section.to_yaml}") 
     args = Hash.new
-    dadl_section.each do |item|
-      @@logger.debug("#{__FILE__}:#{__LINE__}: arch_description: item[:object_block] = #{item[:object_block].to_yaml} at #{@filename}:#{@lineno}")
-      case item[:attr_id]
-      when "terminologies_available"
-        unless item[:object_block][:type_identifier]
-          args.merge!(Hash[:terminologies_available => item[:object_block][:untyped_primitive_object_block]])
-          #args.merge!(Hash[:terminologies_available => item[:object_block]])
-        else
-          raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
-        end
-      when "term_definitions"
-        unless item[:object_block][:type_identifier]
-          args.merge!(Hash[:term_definitions => item[:object_block][:untyped_multiple_attr_object_block]])
-          #args.merge!(Hash[:term_definitions => item[:object_block]])
-        else
-          raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
-        end
-      when "term_binding"
-        unless item[:object_block][:type_identifier]
-          args.merge!(Hash[:term_binding => item[:object_block][:untyped_multiple_attr_object_block]])
-          #args.merge!(Hash[:term_binding => item[:object_block]])
-        else
-          raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
-        end
+    case dadl_section[:attr_id]
+    when "terminologies_available"
+      unless dadl_section[:object_block][:type_identifier]
+        args.merge!(Hash[:terminologies_available => dadl_section[:object_block][:untyped_primitive_object_block]])
       else
-        raise OpenEhr::ADL::Exception::Parser::Error, "Unknown case #{item[:attr_id]} at #{@filename}:#{@lineno} "
+        raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
       end
+    when "term_definitions"
+      unless dadl_section[:object_block][:type_identifier]
+        args.merge!(Hash[:term_definitions => dadl_section[:object_block][:untyped_multiple_attr_object_block]])
+      else
+        raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
+      end
+    when "term_binding"
+      unless dadl_section[:object_block][:type_identifier]
+        args.merge!(Hash[:term_binding => dadl_section[:object_block][:untyped_multiple_attr_object_block]])
+      else
+        raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
+      end
+    else
+      raise OpenEhr::ADL::Exception::Parser::Error, "Unknown case #{dadl_section[:attr_id]} at #{@filename}:#{@lineno} "
     end
+###     dadl_section.each do |item|
+###       @@logger.debug("#{__FILE__}:#{__LINE__}: arch_description: item[:object_block] = #{item[:object_block].to_yaml} at #{@filename}:#{@lineno}")
+###       case item[:attr_id]
+###       when "terminologies_available"
+###         unless item[:object_block][:type_identifier]
+###           args.merge!(Hash[:terminologies_available => item[:object_block][:untyped_primitive_object_block]])
+###         else
+###           raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
+###         end
+###       when "term_definitions"
+###         unless item[:object_block][:type_identifier]
+###           args.merge!(Hash[:term_definitions => item[:object_block][:untyped_multiple_attr_object_block]])
+###         else
+###           raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
+###         end
+###       when "term_binding"
+###         unless item[:object_block][:type_identifier]
+###           args.merge!(Hash[:term_binding => item[:object_block][:untyped_multiple_attr_object_block]])
+###         else
+###           raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
+###         end
+###       else
+###         raise OpenEhr::ADL::Exception::Parser::Error, "Unknown case #{item[:attr_id]} at #{@filename}:#{@lineno} "
+###       end
+###     end
 
     result = OpenEhr::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY.new(args)
@@ -1986,5 +2019,5 @@
 # reduce 88 omitted
 
-module_eval(<<'.,.,', 'parser.y', 583)
+module_eval(<<'.,.,', 'parser.y', 616)
   def _reduce_89(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}:dadl_section::attr_vals = \n#{val[0].to_yaml}")
@@ -1995,5 +2028,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 588)
+module_eval(<<'.,.,', 'parser.y', 621)
   def _reduce_90(val, _values, result)
         #@@logger.debug("#{__FILE__}:#{__LINE__}:dadl_section::complex_object_block = \n#{val[0].to_yaml}")
@@ -2004,5 +2037,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 595)
+module_eval(<<'.,.,', 'parser.y', 628)
   def _reduce_91(val, _values, result)
         attr_val = val[0]
@@ -2013,5 +2046,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 600)
+module_eval(<<'.,.,', 'parser.y', 633)
   def _reduce_92(val, _values, result)
         result = val[0].merge!(val[1])
@@ -2021,5 +2054,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 604)
+module_eval(<<'.,.,', 'parser.y', 637)
   def _reduce_93(val, _values, result)
         result = val[0].merge!(val[2])
@@ -2029,5 +2062,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 621)
+module_eval(<<'.,.,', 'parser.y', 654)
   def _reduce_94(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}:attr_val\n attr_id = #{val[0].to_yaml},\n object_block = #{val[2].to_yaml}")
@@ -2038,5 +2071,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 627)
+module_eval(<<'.,.,', 'parser.y', 660)
   def _reduce_95(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]}")
@@ -2049,5 +2082,5 @@
 # reduce 96 omitted
 
-module_eval(<<'.,.,', 'parser.y', 634)
+module_eval(<<'.,.,', 'parser.y', 667)
   def _reduce_97(val, _values, result)
         result = val[0]
@@ -2057,5 +2090,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 638)
+module_eval(<<'.,.,', 'parser.y', 671)
   def _reduce_98(val, _values, result)
         result = val[0]
@@ -2065,5 +2098,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 643)
+module_eval(<<'.,.,', 'parser.y', 676)
   def _reduce_99(val, _values, result)
         result = val[0]
@@ -2073,5 +2106,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 647)
+module_eval(<<'.,.,', 'parser.y', 680)
   def _reduce_100(val, _values, result)
         result = val[0]
@@ -2081,5 +2114,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 652)
+module_eval(<<'.,.,', 'parser.y', 685)
   def _reduce_101(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}:multiple_attr_object_block::attr_val\n untyped_multiple_attr_object_block = #{val[0].to_yaml}")
@@ -2090,5 +2123,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 657)
+module_eval(<<'.,.,', 'parser.y', 690)
   def _reduce_102(val, _values, result)
         result = {:type_identifier => val[0], :untyped_multiple_attr_object_block => val[1]}
@@ -2098,5 +2131,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 662)
+module_eval(<<'.,.,', 'parser.y', 695)
   def _reduce_103(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}:untyped_multiple_attr_object_block::keyed_objects\n keyed_objects = #{val[1].to_yaml}")
@@ -2107,5 +2140,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 668)
+module_eval(<<'.,.,', 'parser.y', 701)
   def _reduce_104(val, _values, result)
         result = val[0]
@@ -2115,5 +2148,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 673)
+module_eval(<<'.,.,', 'parser.y', 706)
   def _reduce_105(val, _values, result)
         result = Array[val[0]]
@@ -2123,5 +2156,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 677)
+module_eval(<<'.,.,', 'parser.y', 710)
   def _reduce_106(val, _values, result)
         result = (val[0] << val[1])
@@ -2131,5 +2164,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 682)
+module_eval(<<'.,.,', 'parser.y', 715)
   def _reduce_107(val, _values, result)
         #@@logger.debug("#{__FILE__}:#{__LINE__}: keyed_object = #{val[0]} at #{@filename}:#{@lineno}")
@@ -2146,5 +2179,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 694)
+module_eval(<<'.,.,', 'parser.y', 727)
   def _reduce_108(val, _values, result)
         @@logger.debug("object_key: [#{val[1]}] at #{@filename}:#{@lineno}")
@@ -2155,5 +2188,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 700)
+module_eval(<<'.,.,', 'parser.y', 733)
   def _reduce_109(val, _values, result)
         result = {:untyped_single_attr_object_block => val[0]}
@@ -2163,5 +2196,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 704)
+module_eval(<<'.,.,', 'parser.y', 737)
   def _reduce_110(val, _values, result)
         result = {:type_identifier => val[0], :untyped_single_attr_object_block => val[1]}
@@ -2171,5 +2204,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 709)
+module_eval(<<'.,.,', 'parser.y', 742)
   def _reduce_111(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: single_attr_object_complex_head = #{val[0]} at #{@filename}:#{@lineno}")
@@ -2180,5 +2213,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 714)
+module_eval(<<'.,.,', 'parser.y', 747)
   def _reduce_112(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: untyped_single_attr_object_block::attr_vals = \n#{val[1].to_yaml} at #{@filename}:#{@lineno}")
@@ -2191,5 +2224,5 @@
 # reduce 113 omitted
 
-module_eval(<<'.,.,', 'parser.y', 721)
+module_eval(<<'.,.,', 'parser.y', 754)
   def _reduce_114(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: untyped_primitive_object_block = #{val[0]} at #{@filename}:#{@lineno}")
@@ -2200,5 +2233,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 726)
+module_eval(<<'.,.,', 'parser.y', 759)
   def _reduce_115(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: type_identifier = #{val[0]}, untyped_primitive_object_block = #{val[1]} at #{@filename}:#{@lineno}")
@@ -2209,5 +2242,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 731)
+module_eval(<<'.,.,', 'parser.y', 764)
   def _reduce_116(val, _values, result)
         #@@logger.debug("#{__FILE__}:#{__LINE__}: primitive_object_block = <#{val[1]}> at #{@filename}:#{@lineno}")
@@ -2218,5 +2251,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 736)
+module_eval(<<'.,.,', 'parser.y', 769)
   def _reduce_117(val, _values, result)
         result = val[0]
@@ -2226,5 +2259,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 740)
+module_eval(<<'.,.,', 'parser.y', 773)
   def _reduce_118(val, _values, result)
         result = val[0]
@@ -2234,5 +2267,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 744)
+module_eval(<<'.,.,', 'parser.y', 777)
   def _reduce_119(val, _values, result)
         result = val[0]
@@ -2242,5 +2275,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 748)
+module_eval(<<'.,.,', 'parser.y', 781)
   def _reduce_120(val, _values, result)
         result = val[0]
@@ -2250,5 +2283,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 752)
+module_eval(<<'.,.,', 'parser.y', 785)
   def _reduce_121(val, _values, result)
         result = val[0]
@@ -2258,5 +2291,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 756)
+module_eval(<<'.,.,', 'parser.y', 789)
   def _reduce_122(val, _values, result)
         @@logger.debug("string_value: #{val[0]} at #{@filename}:#{@lineno}")
@@ -2267,5 +2300,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 761)
+module_eval(<<'.,.,', 'parser.y', 794)
   def _reduce_123(val, _values, result)
         @@logger.debug("integer_value: #{val[0]} at #{@filename}:#{@lineno}")
@@ -2276,5 +2309,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 766)
+module_eval(<<'.,.,', 'parser.y', 799)
   def _reduce_124(val, _values, result)
         @@logger.debug("real_value: #{val[0]} at #{@filename}:#{@lineno}")
@@ -2285,5 +2318,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 771)
+module_eval(<<'.,.,', 'parser.y', 804)
   def _reduce_125(val, _values, result)
         @@logger.debug("boolean_value: #{val[0]} at #{@filename}:#{@lineno}")
@@ -2294,5 +2327,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 776)
+module_eval(<<'.,.,', 'parser.y', 809)
   def _reduce_126(val, _values, result)
         @@logger.debug("character_value: #{val[0]} at #{@filename}:#{@lineno}")
@@ -2303,5 +2336,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 781)
+module_eval(<<'.,.,', 'parser.y', 814)
   def _reduce_127(val, _values, result)
         @@logger.debug("date_value: #{val[0]} at #{@filename}:#{@lineno}")
@@ -2312,5 +2345,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 786)
+module_eval(<<'.,.,', 'parser.y', 819)
   def _reduce_128(val, _values, result)
         @@logger.debug("time_value: #{val[0]} at #{@filename}:#{@lineno}")
@@ -2321,5 +2354,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 791)
+module_eval(<<'.,.,', 'parser.y', 824)
   def _reduce_129(val, _values, result)
         @@logger.debug("date_time_value: #{val[0]} at #{@filename}:#{@lineno}")
@@ -2330,5 +2363,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 796)
+module_eval(<<'.,.,', 'parser.y', 829)
   def _reduce_130(val, _values, result)
         @@logger.debug("duration_value: #{val[0]} at #{@filename}:#{@lineno}")
@@ -2339,5 +2372,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 801)
+module_eval(<<'.,.,', 'parser.y', 834)
   def _reduce_131(val, _values, result)
         @@logger.debug("uri_value: #{val[0]} at #{@filename}:#{@lineno}")
@@ -2348,5 +2381,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 807)
+module_eval(<<'.,.,', 'parser.y', 840)
   def _reduce_132(val, _values, result)
         @@logger.debug("string_list_value: #{val[0]} at #{@filename}:#{@lineno}")
@@ -2357,5 +2390,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 812)
+module_eval(<<'.,.,', 'parser.y', 845)
   def _reduce_133(val, _values, result)
         result = val[0]
@@ -2365,5 +2398,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 816)
+module_eval(<<'.,.,', 'parser.y', 849)
   def _reduce_134(val, _values, result)
         result = val[0]
@@ -2373,5 +2406,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 820)
+module_eval(<<'.,.,', 'parser.y', 853)
   def _reduce_135(val, _values, result)
         result = val[0]
@@ -2381,5 +2414,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 824)
+module_eval(<<'.,.,', 'parser.y', 857)
   def _reduce_136(val, _values, result)
         result = val[0]
@@ -2389,5 +2422,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 828)
+module_eval(<<'.,.,', 'parser.y', 861)
   def _reduce_137(val, _values, result)
         result = val[0]
@@ -2397,5 +2430,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 832)
+module_eval(<<'.,.,', 'parser.y', 865)
   def _reduce_138(val, _values, result)
         result = val[0]
@@ -2405,5 +2438,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 836)
+module_eval(<<'.,.,', 'parser.y', 869)
   def _reduce_139(val, _values, result)
         result = val[0]
@@ -2413,5 +2446,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 840)
+module_eval(<<'.,.,', 'parser.y', 873)
   def _reduce_140(val, _values, result)
         result = val[0]
@@ -2433,5 +2466,5 @@
 # reduce 146 omitted
 
-module_eval(<<'.,.,', 'parser.y', 852)
+module_eval(<<'.,.,', 'parser.y', 885)
   def _reduce_147(val, _values, result)
         @@logger.debug("V_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}")
@@ -2442,5 +2475,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 857)
+module_eval(<<'.,.,', 'parser.y', 890)
   def _reduce_148(val, _values, result)
         @@logger.debug("V_GENERIC_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}")
@@ -2451,5 +2484,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 863)
+module_eval(<<'.,.,', 'parser.y', 896)
   def _reduce_149(val, _values, result)
         @@logger.debug("V_STRING: #{val[0]} at #{@filename}:#{@lineno}")
@@ -2460,5 +2493,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 869)
+module_eval(<<'.,.,', 'parser.y', 902)
   def _reduce_150(val, _values, result)
         result = [val[0],val[2]]
@@ -2468,5 +2501,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 873)
+module_eval(<<'.,.,', 'parser.y', 906)
   def _reduce_151(val, _values, result)
         result = val[0] << val[2]
@@ -2476,5 +2509,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 877)
+module_eval(<<'.,.,', 'parser.y', 910)
   def _reduce_152(val, _values, result)
         result = val[0]
@@ -2484,5 +2517,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 882)
+module_eval(<<'.,.,', 'parser.y', 915)
   def _reduce_153(val, _values, result)
         begin
@@ -2497,5 +2530,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 891)
+module_eval(<<'.,.,', 'parser.y', 924)
   def _reduce_154(val, _values, result)
         begin
@@ -2510,5 +2543,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 900)
+module_eval(<<'.,.,', 'parser.y', 933)
   def _reduce_155(val, _values, result)
         begin
@@ -2547,5 +2580,5 @@
 # reduce 167 omitted
 
-module_eval(<<'.,.,', 'parser.y', 924)
+module_eval(<<'.,.,', 'parser.y', 957)
   def _reduce_168(val, _values, result)
         begin
@@ -2560,5 +2593,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 933)
+module_eval(<<'.,.,', 'parser.y', 966)
   def _reduce_169(val, _values, result)
         begin
@@ -2573,5 +2606,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 942)
+module_eval(<<'.,.,', 'parser.y', 975)
   def _reduce_170(val, _values, result)
         begin
@@ -2610,5 +2643,5 @@
 # reduce 182 omitted
 
-module_eval(<<'.,.,', 'parser.y', 967)
+module_eval(<<'.,.,', 'parser.y', 1000)
   def _reduce_183(val, _values, result)
         result = true
@@ -2618,5 +2651,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 971)
+module_eval(<<'.,.,', 'parser.y', 1004)
   def _reduce_184(val, _values, result)
         result = false
@@ -2640,5 +2673,5 @@
 # reduce 191 omitted
 
-module_eval(<<'.,.,', 'parser.y', 986)
+module_eval(<<'.,.,', 'parser.y', 1019)
   def _reduce_192(val, _values, result)
         result = val[0]
@@ -2698,5 +2731,5 @@
 # reduce 217 omitted
 
-module_eval(<<'.,.,', 'parser.y', 1021)
+module_eval(<<'.,.,', 'parser.y', 1054)
   def _reduce_218(val, _values, result)
         @@logger.debug("V_ISO8601_EXTENDED_DATE_TIME: #{val[0]} at #{@filename}:#{@lineno}")
@@ -2731,5 +2764,5 @@
 # reduce 230 omitted
 
-module_eval(<<'.,.,', 'parser.y', 1041)
+module_eval(<<'.,.,', 'parser.y', 1074)
   def _reduce_231(val, _values, result)
         @@logger.debug("V_ISO8601_DURATION: #{val[0]} at #{@filename}:#{@lineno}")
@@ -2764,5 +2797,5 @@
 # reduce 243 omitted
 
-module_eval(<<'.,.,', 'parser.y', 1061)
+module_eval(<<'.,.,', 'parser.y', 1094)
   def _reduce_244(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: V_QUALIFIED_TERM_CODE_REF = #{val[0]} at #{@filename}:#{@lineno}")
@@ -2779,5 +2812,5 @@
 # reduce 247 omitted
 
-module_eval(<<'.,.,', 'parser.y', 1071)
+module_eval(<<'.,.,', 'parser.y', 1104)
   def _reduce_248(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: V_URI = #{val[0]} at #{@filename}:#{@lineno}")
@@ -2804,5 +2837,5 @@
 # reduce 256 omitted
 
-module_eval(<<'.,.,', 'parser.y', 1094)
+module_eval(<<'.,.,', 'parser.y', 1127)
   def _reduce_257(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}, boolean_node:  relative_path = #{val[0]}, regexp_body => #{val[3]} at #{@filename}") 
@@ -2869,5 +2902,5 @@
 # reduce 285 omitted
 
-module_eval(<<'.,.,', 'parser.y', 1141)
+module_eval(<<'.,.,', 'parser.y', 1174)
   def _reduce_286(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}, relative_path = #{val[0]}") 
@@ -2878,5 +2911,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1146)
+module_eval(<<'.,.,', 'parser.y', 1179)
   def _reduce_287(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}, relative_path = #{val[0]}/#{val[2]}") 
@@ -2887,5 +2920,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1152)
+module_eval(<<'.,.,', 'parser.y', 1185)
   def _reduce_288(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}") 
@@ -2896,5 +2929,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1157)
+module_eval(<<'.,.,', 'parser.y', 1190)
   def _reduce_289(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}") 
@@ -2905,5 +2938,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1169)
+module_eval(<<'.,.,', 'parser.y', 1202)
   def _reduce_290(val, _values, result)
         result = Range.new(1,1)
@@ -2913,5 +2946,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1173)
+module_eval(<<'.,.,', 'parser.y', 1206)
   def _reduce_291(val, _values, result)
         result = val[3]
@@ -2921,5 +2954,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1178)
+module_eval(<<'.,.,', 'parser.y', 1211)
   def _reduce_292(val, _values, result)
         begin
@@ -2934,5 +2967,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1187)
+module_eval(<<'.,.,', 'parser.y', 1220)
   def _reduce_293(val, _values, result)
         begin
@@ -2948,5 +2981,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1198)
+module_eval(<<'.,.,', 'parser.y', 1231)
   def _reduce_294(val, _values, result)
         result = OpenEhr::AM::Archetype::ConstraintModel::CARDINALITY.new
@@ -2956,5 +2989,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1203)
+module_eval(<<'.,.,', 'parser.y', 1236)
   def _reduce_295(val, _values, result)
         result = val[0]
@@ -2978,5 +3011,5 @@
 # reduce 302 omitted
 
-module_eval(<<'.,.,', 'parser.y', 1215)
+module_eval(<<'.,.,', 'parser.y', 1248)
   def _reduce_303(val, _values, result)
         result = val[0]
@@ -2986,5 +3019,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1219)
+module_eval(<<'.,.,', 'parser.y', 1252)
   def _reduce_304(val, _values, result)
         result = val[0]
@@ -2996,5 +3029,5 @@
 # reduce 305 omitted
 
-module_eval(<<'.,.,', 'parser.y', 1226)
+module_eval(<<'.,.,', 'parser.y', 1259)
   def _reduce_306(val, _values, result)
         case val[3]
@@ -3011,5 +3044,5 @@
 # reduce 307 omitted
 
-module_eval(<<'.,.,', 'parser.y', 1237)
+module_eval(<<'.,.,', 'parser.y', 1270)
   def _reduce_308(val, _values, result)
         result = val[0]
@@ -3019,5 +3052,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1241)
+module_eval(<<'.,.,', 'parser.y', 1274)
   def _reduce_309(val, _values, result)
         result = OpenEhr::RM::Support::AssumedTypes::Interval.new(val[0], val[2])
@@ -3113,5 +3146,5 @@
 # reduce 352 omitted
 
-module_eval(<<'.,.,', 'parser.y', 1307)
+module_eval(<<'.,.,', 'parser.y', 1340)
   def _reduce_353(val, _values, result)
         result = OpenEhr::AM::Archetype::ConstraintModel::Primitive::C_BOOLEAN.new(:true_valid => true)
@@ -3121,5 +3154,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1311)
+module_eval(<<'.,.,', 'parser.y', 1344)
   def _reduce_354(val, _values, result)
         result = OpenEhr::AM::Archetype::ConstraintModel::Primitive::C_BOOLEAN.new(:true_valid => false)
@@ -3129,5 +3162,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1315)
+module_eval(<<'.,.,', 'parser.y', 1348)
   def _reduce_355(val, _values, result)
         result = OpenEhr::AM::Archetype::ConstraintModel::Primitive::C_BOOLEAN.new(:true_valid => true,:false_valid => false)
@@ -3137,5 +3170,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1319)
+module_eval(<<'.,.,', 'parser.y', 1352)
   def _reduce_356(val, _values, result)
         result = OpenEhr::AM::Archetype::ConstraintModel::Primitive::C_BOOLEAN.new(:true_valid => false,:false_valid => true)
@@ -3145,5 +3178,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1324)
+module_eval(<<'.,.,', 'parser.y', 1357)
   def _reduce_357(val, _values, result)
         result = val[0]
@@ -3153,5 +3186,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1328)
+module_eval(<<'.,.,', 'parser.y', 1361)
   def _reduce_358(val, _values, result)
         result = val[0]
@@ -3162,5 +3195,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1333)
+module_eval(<<'.,.,', 'parser.y', 1366)
   def _reduce_359(val, _values, result)
         raise 'Not implemented yet'
@@ -3180,5 +3213,5 @@
 # reduce 364 omitted
 
-module_eval(<<'.,.,', 'parser.y', 1345)
+module_eval(<<'.,.,', 'parser.y', 1378)
   def _reduce_365(val, _values, result)
         @in_interval = false
@@ -3189,5 +3222,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1352)
+module_eval(<<'.,.,', 'parser.y', 1385)
   def _reduce_366(val, _values, result)
           result = val[0]
@@ -3197,5 +3230,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1356)
+module_eval(<<'.,.,', 'parser.y', 1389)
   def _reduce_367(val, _values, result)
           result = val[0]
@@ -3205,5 +3238,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1362)
+module_eval(<<'.,.,', 'parser.y', 1395)
   def _reduce_368(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}, START_TERM_CODE_CONSTRAINT = #{val[0]} at #{@filename}")
@@ -3222,5 +3255,5 @@
 # reduce 371 omitted
 
-module_eval(<<'.,.,', 'parser.y', 1378)
+module_eval(<<'.,.,', 'parser.y', 1411)
   def _reduce_372(val, _values, result)
           result = val[0]
@@ -3230,5 +3263,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1383)
+module_eval(<<'.,.,', 'parser.y', 1416)
   def _reduce_373(val, _values, result)
           result = val[0]
@@ -3238,5 +3271,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1387)
+module_eval(<<'.,.,', 'parser.y', 1420)
   def _reduce_374(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{word} at #{@filename}")
@@ -3247,5 +3280,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1398)
+module_eval(<<'.,.,', 'parser.y', 1431)
   def _reduce_375(val, _values, result)
         result = OpenEhr::AM::Archetype::ConstraintModel::Primitive::C_DURATION.new #val[0]
Index: /ruby/trunk/lib/adl_parser/lib/parser.y
===================================================================
--- /ruby/trunk/lib/adl_parser/lib/parser.y	(revision 328)
+++ /ruby/trunk/lib/adl_parser/lib/parser.y	(revision 329)
@@ -149,43 +149,57 @@
     | SYM_DESCRIPTION dadl_section
   { 
+    dadl_section = val[1]
     args = Hash.new
-    val[1].each do |item|
-      @@logger.debug("#{__FILE__}:#{__LINE__}: arch_description: item = #{item.to_yaml} at #{@filename}:#{@lineno}")
-      case item
+    @@logger.debug("#{__FILE__}:#{__LINE__}: arch_description: val[1].class = \n#{val[1].class} at #{@filename}:#{@lineno}")
+#    val[1].each do |item|
+#      @@logger.debug("#{__FILE__}:#{__LINE__}: arch_description: item = \n#{item.to_yaml} at #{@filename}:#{@lineno}")
+#      case item[:attr_id]
+      case dadl_section[:attr_id]
       when "original_author"
-        unless item[:object_block][:type_identifier]
-          args.merge!(Hash[:original_author => item[:untyped_multiple_attr_object_block]])
+#        unless item[:object_block][:type_identifier]
+        unless dadl_section[:object_block][:type_identifier]
+#          args.merge!(Hash[:original_author => item[:untyped_multiple_attr_object_block]])
+          args.merge!(Hash[:original_author => dadl_section[:untyped_multiple_attr_object_block]])
         else
           raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
         end
       when "details"
-        unless item[:type_identifier]
-          args.merge!(Hash[:details => item[:untyped_multiple_attr_object_block]])
+#        unless item[:type_identifier]
+        unless dadl_section[:type_identifier]
+#          args.merge!(Hash[:details => item[:untyped_multiple_attr_object_block]])
           #args.merge!(Hash[:details => item[:object_block]])
+          args.merge!(Hash[:details => dadl_section[:untyped_multiple_attr_object_block]])
         else
           raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
         end
       when "lifecycle_state"
-        unless item[:type_identifier]
-          args.merge!(Hash[:lifecycle_state => item[:untyped_primitive_object_block]])
+#        unless item[:type_identifier]
+        unless dadl_section[:type_identifier]
+#          args.merge!(Hash[:lifecycle_state => item[:untyped_primitive_object_block]])
+          args.merge!(Hash[:lifecycle_state => dadl_section[:untyped_primitive_object_block]])
         else
           raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
         end
       when "other_contributors"
-        unless item[:type_identifier]
-          args.merge!(Hash[:other_contributors => item[:untyped_multiple_attr_object_block]])
+#        unless item[:type_identifier]
+        unless dadl_section[:type_identifier]
+#          args.merge!(Hash[:other_contributors => item[:untyped_multiple_attr_object_block]])
+          args.merge!(Hash[:other_contributors => dadl_section[:untyped_multiple_attr_object_block]])
         else
           raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
         end
       when "other_details"
-        unless item[:type_identifier]
-          args.merge!(Hash[:other_contributors => item[:untyped_multiple_attr_object_block]])
+#        unless item[:type_identifier]
+        unless dadl_section[:type_identifier]
+#          args.merge!(Hash[:other_contributors => item[:untyped_multiple_attr_object_block]])
+          args.merge!(Hash[:other_contributors => dadl_section[:untyped_multiple_attr_object_block]])
         else
           raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
         end
       else
-        raise OpenEhr::ADL::Exception::Parser::Error, "Unknown case #{item} at #{@filename}:#{@lineno} "
+#        raise OpenEhr::ADL::Exception::Parser::Error, "Unknown case #{item} at #{@filename}:#{@lineno} "
+        raise OpenEhr::ADL::Exception::Parser::Error, "Unknown case #{dadl_section} at #{@filename}:#{@lineno} "
       end
-    end
+#    end
     @@logger.debug("#{__FILE__}:#{__LINE__}: arch_description: args  = \n#{args.to_yaml} at #{@filename}:#{@lineno}")
     result = OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION.new(args)
@@ -542,34 +556,53 @@
   { 
     dadl_section = val[1]
-    @@logger.debug("#{__FILE__}:#{__LINE__}: arch_ontology: dadl_section = #{val[1].to_yaml}") 
+    @@logger.debug("#{__FILE__}:#{__LINE__}: arch_ontology: dadl_section = \n#{dadl_section.to_yaml}") 
     args = Hash.new
-    dadl_section.each do |item|
-      @@logger.debug("#{__FILE__}:#{__LINE__}: arch_description: item[:object_block] = #{item[:object_block].to_yaml} at #{@filename}:#{@lineno}")
-      case item[:attr_id]
-      when "terminologies_available"
-        unless item[:object_block][:type_identifier]
-          args.merge!(Hash[:terminologies_available => item[:object_block][:untyped_primitive_object_block]])
-          #args.merge!(Hash[:terminologies_available => item[:object_block]])
-        else
-          raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
-        end
-      when "term_definitions"
-        unless item[:object_block][:type_identifier]
-          args.merge!(Hash[:term_definitions => item[:object_block][:untyped_multiple_attr_object_block]])
-          #args.merge!(Hash[:term_definitions => item[:object_block]])
-        else
-          raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
-        end
-      when "term_binding"
-        unless item[:object_block][:type_identifier]
-          args.merge!(Hash[:term_binding => item[:object_block][:untyped_multiple_attr_object_block]])
-          #args.merge!(Hash[:term_binding => item[:object_block]])
-        else
-          raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
-        end
+    case dadl_section[:attr_id]
+    when "terminologies_available"
+      unless dadl_section[:object_block][:type_identifier]
+        args.merge!(Hash[:terminologies_available => dadl_section[:object_block][:untyped_primitive_object_block]])
       else
-        raise OpenEhr::ADL::Exception::Parser::Error, "Unknown case #{item[:attr_id]} at #{@filename}:#{@lineno} "
+        raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
       end
-    end
+    when "term_definitions"
+      unless dadl_section[:object_block][:type_identifier]
+        args.merge!(Hash[:term_definitions => dadl_section[:object_block][:untyped_multiple_attr_object_block]])
+      else
+        raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
+      end
+    when "term_binding"
+      unless dadl_section[:object_block][:type_identifier]
+        args.merge!(Hash[:term_binding => dadl_section[:object_block][:untyped_multiple_attr_object_block]])
+      else
+        raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
+      end
+    else
+      raise OpenEhr::ADL::Exception::Parser::Error, "Unknown case #{dadl_section[:attr_id]} at #{@filename}:#{@lineno} "
+    end
+###     dadl_section.each do |item|
+###       @@logger.debug("#{__FILE__}:#{__LINE__}: arch_description: item[:object_block] = #{item[:object_block].to_yaml} at #{@filename}:#{@lineno}")
+###       case item[:attr_id]
+###       when "terminologies_available"
+###         unless item[:object_block][:type_identifier]
+###           args.merge!(Hash[:terminologies_available => item[:object_block][:untyped_primitive_object_block]])
+###         else
+###           raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
+###         end
+###       when "term_definitions"
+###         unless item[:object_block][:type_identifier]
+###           args.merge!(Hash[:term_definitions => item[:object_block][:untyped_multiple_attr_object_block]])
+###         else
+###           raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
+###         end
+###       when "term_binding"
+###         unless item[:object_block][:type_identifier]
+###           args.merge!(Hash[:term_binding => item[:object_block][:untyped_multiple_attr_object_block]])
+###         else
+###           raise OpenEhr::ADL::Exception::Parser::Error, "Needless type_identifier at #{@filename}:#{@lineno} "
+###         end
+###       else
+###         raise OpenEhr::ADL::Exception::Parser::Error, "Unknown case #{item[:attr_id]} at #{@filename}:#{@lineno} "
+###       end
+###     end
 
     result = OpenEhr::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY.new(args)
