Index: ruby/trunk/lib/adl_parser/lib/parser.rb
===================================================================
--- ruby/trunk/lib/adl_parser/lib/parser.rb	(revision 258)
+++ ruby/trunk/lib/adl_parser/lib/parser.rb	(revision 261)
@@ -24,5 +24,5 @@
     class Parser < Racc::Parser
 
-module_eval(<<'...end parser.y/module_eval...', 'parser.y', 1188)
+module_eval(<<'...end parser.y/module_eval...', 'parser.y', 1206)
 
 def assert_at(file,line, message = "")
@@ -33,9 +33,9 @@
 
 if $DEBUG
-  @@log = Logger.new('log/parser.log','daily')
-  @@log.level = Logger::INFO
+  @@logger = Logger.new('log/parser.log','daily')
+  @@logger.level = Logger::INFO
 else
-  @@log = Logger.new(STDOUT)
-  @@log.level = Logger::WARN
+  @@logger = Logger.new(STDOUT)
+  @@logger.level = Logger::WARN
 end
 
@@ -102,4 +102,5 @@
 
 def scan
+  @@logger.debug("#{__FILE__}:#{__LINE__}: Entering scan at #{@filename}:#{@lineno}:")
   until @data.nil?  do
     case @adl_type.last
@@ -120,4 +121,9 @@
         yield sym, val
       end
+    when :term_constraint
+      @@logger.debug("#{__FILE__}:#{__LINE__}: scan: Entering scan_term_constraint at #{@filename}:#{@lineno}: data = #{data.inspect}")
+      @data = scan_term_constraint(@data) do |sym, val|
+        yield sym, val
+      end
     else
       raise
@@ -130,8 +136,8 @@
 
 def scan_adl(data)
+  @@logger.debug("#{__FILE__}:#{__LINE__}: Entering scan_adl at #{@filename}:#{@lineno}: data = #{data.inspect}")
   until data.nil?  do
     case @adl_type.last
     when :adl
-#      puts "Entering scan_adl"
       case data
       when /\A\n/ # carriage return
@@ -142,5 +148,5 @@
       when /\A--.*\n/ # single line comment
         @lineno += 1
-        @@log.info("#{__FILE__}:#{__LINE__}: scan_adl: COMMENT = #{$&} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: scan_adl: COMMENT = #{$&} at #{@filename}:#{@lineno}")
         ;
       when /\Adescription/   # description
@@ -148,10 +154,9 @@
       when /\Adefinition/   # definition
         yield :SYM_DEFINITION, :SYM_DEFINITION
-#        @adl_type.push(:cadl)
         ###----------/* symbols */ ------------------------------------------------- 
       when /\A[A-Z][a-zA-Z0-9_]*/
         yield :V_TYPE_IDENTIFIER, $&
 #      when /\A[a-zA-Z][a-zA-Z0-9_-]+\.[a-zA-Z][a-zA-Z0-9_-]+\.[a-zA-Z0-9]+/   #V_ARCHETYPE_ID
-      when /\A(\w+)-(\w+)-(\w+)\.(\w+)(-\w+)?\.(v[0-9]+)/   #V_ARCHETYPE_ID
+      when /\A(\w+)-(\w+)-(\w+)\.(\w+)(-\w+)?\.(v\w+)/   #V_ARCHETYPE_ID
         object_id, rm_originator, rm_name, rm_entity, concept_name, specialisation, version_id = $&, $1, $2, $3, $4, $5, $6
         archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new(object_id, concept_name, rm_name, rm_entity, rm_originator, specialisation, version_id)
@@ -162,8 +167,8 @@
         word = $&
         if @@adl_reserved[word]
-          @@log.info("#{__FILE__}:#{__LINE__}: scan_adl: @@adl_reserved = #{@@adl_reserved[word]} at #{@filename}:#{@lineno}")
+          @@logger.debug("#{__FILE__}:#{__LINE__}: scan_adl: @@adl_reserved = #{@@adl_reserved[word]} at #{@filename}:#{@lineno}")
           yield @@adl_reserved[word], @@adl_reserved[word]
         elsif #/\A[A-Z][a-zA-Z0-9_]*/
-          @@log.info("#{__FILE__}:#{__LINE__}: scan_adl: V_ATTRIBUTE_IDENTIFIER = #{$&} at #{@filename}:#{@lineno}")
+          @@logger.debug("#{__FILE__}:#{__LINE__}: scan_adl: V_ATTRIBUTE_IDENTIFIER = #{$&} at #{@filename}:#{@lineno}")
           yield :V_ATTRIBUTE_IDENTIFIER, $&
         end
@@ -188,5 +193,4 @@
         else
           adl_type = @adl_type.pop
-#          puts "Escaping #{adl_type}"
           assert_at(__FILE__,__LINE__){adl_type == :dadl}
           yield :SYM_END_DBLOCK, :SYM_END_DBLOCK
@@ -194,5 +198,5 @@
       when /\A\{/   # {
         @adl_type.push(:cadl)
-        @@log.info("#{__FILE__}:#{__LINE__}: scan_cadl: entering cADL at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: scan_cadl: entering cADL at #{@filename}:#{@lineno}")
         yield :SYM_START_CBLOCK, :SYM_START_CBLOCK
       when /\A\}/   # }
@@ -200,5 +204,5 @@
 #        puts "Escaping #{adl_type}"
         assert_at(__FILE__,__LINE__){adl_type == :cadl}
-        @@log.info("#{__FILE__}:#{__LINE__}: scan_cadl: exiting cADL at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: scan_cadl: exiting cADL at #{@filename}:#{@lineno}")
         yield :SYM_END_CBLOCK, $&
       when /\A\-/   # -
@@ -285,20 +289,18 @@
       data = $' # variable $' receives the string after the match
     when :dadl
-#      puts "Entering scan_dadl"
       data = scan_dadl(data) do |sym, val|
         yield sym, val
       end
     when :cadl
-#      puts "Entering scan_cadl"
       data = scan_cadl(data) do |sym, val|
         yield sym, val
       end
     when :regexp
-#      puts "Entering scan_regexp"
       data = scan_regexp(data) do |sym, val|
         yield sym, val
       end
     when :term_constraint
-#      puts "Entering scan_term_constraint"
+      @@logger.debug("#{__FILE__}:#{__LINE__}: scan_adl: Entering scan_term_constraint at #{@filename}:#{@lineno}: data = #{data.inspect}")
+
       data = scan_term_constraint(data) do |sym, val|
         yield sym, val
@@ -312,8 +314,8 @@
 
 def scan_cadl(data)
+  @@logger.debug("#{__FILE__}:#{__LINE__}: Entering scan_cadl at #{@filename}:#{@lineno}: data = #{data.inspect}")
   until data.nil?  do
     case @adl_type.last
     when :cadl
-#      puts "Entering scan_cadl"
       case scanned = @@cadl_scanner.parse(data)
       when Yaparc::Result::OK
@@ -336,5 +338,5 @@
       when /\A--.*\n/ # single line comment
         @lineno += 1
-        @@log.info("#{__FILE__}:#{__LINE__}: scan_cadl: COMMENT = #{$&} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: scan_cadl: COMMENT = #{$&} at #{@filename}:#{@lineno}")
         ;
         ###----------/* symbols */ ------------------------------------------------- 
@@ -404,5 +406,5 @@
       when /\A\{/   # {
         @adl_type.push(:cadl)
-        @@log.info("#{__FILE__}:#{__LINE__}: scan_cadl: entering cADL at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: scan_cadl: entering cADL at #{@filename}:#{@lineno}")
         yield :SYM_START_CBLOCK, :SYM_START_CBLOCK
       when /\A\}/   # }
@@ -410,5 +412,5 @@
 #        puts "Escaping #{adl_type}"
         assert_at(__FILE__,__LINE__){adl_type == :cadl}
-        @@log.info("#{__FILE__}:#{__LINE__}: scan_cadl: exiting cADL at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: scan_cadl: exiting cADL at #{@filename}:#{@lineno}")
         yield :SYM_END_CBLOCK, :SYM_END_CBLOCK
       when /\A\$/   # $
@@ -419,5 +421,5 @@
         yield :Question_mark_code, :Question_mark_code
       when /\A\|/   # |
-        @@log.info("#{__FILE__}:#{__LINE__}: scan_cadl: @in_interval = #{@in_interval} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: scan_cadl: @in_interval = #{@in_interval} at #{@filename}:#{@lineno}")
         if @in_interval
           @in_interval = false
@@ -426,16 +428,15 @@
           @in_interval = true
         end
-        @@log.info("#{__FILE__}:#{__LINE__}: scan_cadl: SYM_INTERVAL_DELIM at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: scan_cadl: SYM_INTERVAL_DELIM at #{@filename}:#{@lineno}")
         yield :SYM_INTERVAL_DELIM, :SYM_INTERVAL_DELIM
 
-      when /\A\[[a-zA-Z0-9._\-]+::[a-zA-Z0-9._\-]+\]/   #V_QUALIFIED_TERM_CODE_REF form [ICD10AM(1998)::F23]
+      when /\A\[[a-zA-Z0-9()\._-]+::[a-zA-Z0-9\._-]+\]/  #V_QUALIFIED_TERM_CODE_REF form [ICD10AM(1998)::F23]
+#      when /\A\[[a-zA-Z0-9._\-]+::[a-zA-Z0-9._\-]+\]/   #V_QUALIFIED_TERM_CODE_REF form [ICD10AM(1998)::F23]
         yield :V_QUALIFIED_TERM_CODE_REF, $&
       when /\A\[[a-zA-Z0-9._\- ]+::[a-zA-Z0-9._\- ]+\]/   #ERR_V_QUALIFIED_TERM_CODE_REF
         yield :ERR_V_QUALIFIED_TERM_CODE_REF, $&
-      when /\A\[([a-zA-Z0-9()._\-]+::[a-zA-Z0-9._\_-]+)\]/
-        yield :V_TERM_CODE_CONSTRAINT, :V_TERM_CODE_CONSTRAINT
-      when /\A\[[a-zA-Z0-9\(\)\._\-]+::[ \t\n]*/
+      when /\A\[([a-zA-Z0-9\(\)\._\-]+)::[ \t\n]*/
         @adl_type.push(:term_constraint)
-        yield :START_TERM_CODE_CONSTRAINT, $&
+        yield :START_TERM_CODE_CONSTRAINT, $1
       when /\A\[[a-zA-Z0-9][a-zA-Z0-9._\-]*\]/   #V_LOCAL_TERM_CODE_REF
         yield :V_LOCAL_TERM_CODE_REF, $&
@@ -457,5 +458,5 @@
           yield @@cadl_reserved[word.downcase], @@cadl_reserved[word.downcase]
         else
-          @@log.info("#{__FILE__}:#{__LINE__}: scan_cadl: V_ATTRIBUTE_IDENTIFIER = #{word} at #{@filename}:#{@lineno}")
+          @@logger.debug("#{__FILE__}:#{__LINE__}: scan_cadl: V_ATTRIBUTE_IDENTIFIER = #{word} at #{@filename}:#{@lineno}")
           yield :V_ATTRIBUTE_IDENTIFIER, word #V_ATTRIBUTE_IDENTIFIER /\A[a-z][a-zA-Z0-9_]*/
         end
@@ -493,20 +494,18 @@
       data = $' # variable $' receives the string after the match
     when :adl
-#      puts "Entering scan_adl"
       data = scan_adl(data) do |sym, val|
         yield sym, val
       end
     when :dadl
-#      puts "Entering scan_dadl"
       data = scan_dadl(data) do |sym, val|
         yield sym, val
       end
     when :regexp
-#      puts "Entering scan_regexp"
       data = scan_regexp(data) do |sym, val|
         yield sym, val
       end
     when :term_constraint
-#      puts "Entering scan_term_constraint"
+      @@logger.debug("#{__FILE__}:#{__LINE__}: scan_cadl: Entering scan_term_constraint at #{@filename}:#{@lineno}: data = #{data.inspect}")
+      
       data = scan_term_constraint(data) do |sym, val|
         yield sym, val
@@ -519,8 +518,8 @@
 
 def scan_dadl(data)
+  @@logger.debug("#{__FILE__}:#{__LINE__}: Entering scan_dadl at #{@filename}:#{@lineno}: data = #{data.inspect}")
   until data.nil?  do
     case @adl_type.last
     when :dadl
-#      puts "Entering scan_dadl"
       case scanned = @@dadl_scanner.parse(data)
       when Yaparc::Result::OK
@@ -538,5 +537,5 @@
       when /\A--.*\n/ # single line comment
         @lineno += 1
-        @@log.info("#{__FILE__}:#{__LINE__}: scan_dadl: COMMENT = #{$&} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: scan_dadl: COMMENT = #{$&} at #{@filename}:#{@lineno}")
         ;
         ###----------/* symbols */ ------------------------------------------------- 
@@ -569,5 +568,4 @@
         elsif @in_c_domain_type == false
           adl_type = @adl_type.pop
-#          puts "Escaping #{adl_type}"
           assert_at(__FILE__,__LINE__){adl_type == :dadl}
           yield :SYM_END_DBLOCK, $&
@@ -610,5 +608,5 @@
         yield :Question_mark_code, :Question_mark_code
       when /\A\|/   # |
-        @@log.info("#{__FILE__}:#{__LINE__}: scan_dadl: @in_interval = #{@in_interval} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: scan_dadl: @in_interval = #{@in_interval} at #{@filename}:#{@lineno}")
         if @in_interval
           @in_interval = false
@@ -617,5 +615,5 @@
           @in_interval = true
         end
-        @@log.info("#{__FILE__}:#{__LINE__}: scan_dadl: SYM_INTERVAL_DELIM at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: scan_dadl: SYM_INTERVAL_DELIM at #{@filename}:#{@lineno}")
         yield :SYM_INTERVAL_DELIM, :SYM_INTERVAL_DELIM
 ###       when /\A\[[a-zA-Z0-9()\._-]+::[a-zA-Z0-9\._-]+\]/   #V_QUALIFIED_TERM_CODE_REF form [ICD10AM(1998)::F23]
@@ -666,10 +664,8 @@
       data = $' # variable $' receives the string after the match
     when :adl
-#      puts "Entering scan_adl"
       data = scan_adl(data) do |sym, val|
         yield sym, val
       end
     when :cadl
-#      puts "Entering scan_cadl"
       data = scan_cadl(data) do |sym, val|
         yield sym, val
@@ -681,5 +677,6 @@
       end
     when :term_constraint
-#      puts "Entering scan_term_constraint"
+      @@logger.debug("#{__FILE__}:#{__LINE__}: scan_dadl: Entering scan_term_constraint at #{@filename}:#{@lineno}: data = #{data.inspect}")
+
       data = scan_term_constraint(data) do |sym, val|
         yield sym, val
@@ -692,8 +689,8 @@
 
 def scan_regexp(data)
+  @@logger.debug("#{__FILE__}:#{__LINE__}: Entering scan_regexp at #{@filename}:#{@lineno}: data = #{data.inspect}")
   until data.nil?  do
     case @adl_type.last
     when :regexp
-#      puts "Entering scan_regexp"
       case data
       when /\A\/\}/ #V_REGEXP
@@ -719,20 +716,17 @@
       data = $' # variable $' receives the string after the match
     when :adl
-#      puts "Entering scan_adl"
       data = scan_adl(data) do |sym, val|
         yield sym, val
       end
     when :dadl
-#      puts "Entering scan_dadl"
       data = scan_dadl(data) do |sym, val|
         yield sym, val
       end
     when :cadl
-#      puts "Entering scan_cadl"
       data = scan_cadl(data) do |sym, val|
         yield sym, val
       end
     when :term_constraint
-#      puts "Entering scan_term_constraint"
+      @@logger.debug("#{__FILE__}:#{__LINE__}: scan_regexp: Entering scan_term_constraint at #{@filename}:#{@lineno}")
       data = scan_term_constraint(data) do |sym, val|
         yield sym, val
@@ -745,8 +739,8 @@
 
 def scan_term_constraint(data)
+  @@logger.debug("#{__FILE__}:#{__LINE__}: Entering scan_term_constraint")
   until data.nil?  do
     case @adl_type.last
     when :term_constraint
-#      puts "Entering scan_term_constraint"
       case data
       when /\A\n/ # carriage return
@@ -757,15 +751,14 @@
       when /\A--.*$/ # single line comment
         @lineno += 1
-        @@log.info("#{__FILE__}:#{__LINE__}: scan_term_constraint: COMMENT = #{$&} at #{@filename}:#{@lineno}")
+        #@@logger.debug("#{__FILE__}:#{__LINE__}: scan_term_constraint: COMMENT = #{$&} at #{@filename}:#{@lineno}")
         ;
-      when /\A[a-zA-Z0-9\._\-]+[ \t]*,/ # match any line, with ',' termination
-        yield :TERM_CODE, $&
-      when /\A[a-zA-Z0-9\._\-]+[ \t]*;/ #match second last line with ';' termination (assumed value)
-        yield :TERM_CODE, $&
-#      when /\A[a-zA-Z0-9\._\-]+[ \t]*\]/ # match final line, terminating in ']'
-      when /\A[a-zA-Z0-9\._\-]*[ \t]*\]/ # match final line, terminating in ']'
+      when /\A([a-zA-Z0-9\._\-])+[ \t]*,/ # match any line, with ',' termination
+        yield :TERM_CODE, $1
+      when /\A([a-zA-Z0-9\._\-])+[ \t]*;/ # match second last line with ';' termination (assumed value)
+        yield :TERM_CODE, $1
+      when /\A([a-zA-Z0-9\._\-])*[ \t]*\]/ # match final line, terminating in ']'
         adl_type = @adl_type.pop
         assert_at(__FILE__,__LINE__){adl_type == :term_constraint}
-        yield :END_TERM_CODE_CONSTRAINT, $&
+        yield :END_TERM_CODE_CONSTRAINT, $1
       else
         raise "data = #{data}"
@@ -773,15 +766,12 @@
       data = $' # variable $' receives the string after the match
     when :adl
-#      puts "Entering scan_adl"
       data = scan_adl(data) do |sym, val|
         yield sym, val
       end
     when :dadl
-#      puts "Entering scan_dadl"
       data = scan_dadl(data) do |sym, val|
         yield sym, val
       end
     when :cadl
-#      puts "Entering scan_cadl"
       data = scan_cadl(data) do |sym, val|
         yield sym, val
@@ -1132,6 +1122,6 @@
   -376,  -376,  -376,  -195,  -376,  -208,  -376,  -221,  -376,  -234,
   -376,  -376,  -376,   -43,  -305,  -376,   -53,   -44,  -376,  -376,
-   -31,   -72,  -310,   -70,   -35,   -37,  -372,   -38,   -39,  -360,
-   -40,  -376,  -363,   -41,  -367,  -366,   -42,  -369,  -376,   -36,
+   -31,   -72,  -310,   -70,   -36,   -37,  -372,   -38,   -39,  -360,
+   -40,  -376,  -363,   -41,  -367,  -366,   -42,  -369,  -376,   -35,
   -376,  -376,  -376,  -376,  -376,  -309,  -160,  -175,  -159,  -376,
   -174,  -376,  -196,  -376,  -209,  -376,  -222,  -376,  -235,  -376,
@@ -1341,13 +1331,13 @@
   1, 121, :_reduce_none,
   1, 121, :_reduce_none,
-  3, 122, :_reduce_45,
-  4, 123, :_reduce_46,
-  3, 123, :_reduce_none,
-  6, 124, :_reduce_48,
+  3, 128, :_reduce_45,
+  4, 122, :_reduce_46,
+  3, 122, :_reduce_none,
+  6, 123, :_reduce_48,
   2, 130, :_reduce_49,
   2, 133, :_reduce_50,
   3, 133, :_reduce_none,
   2, 133, :_reduce_none,
-  1, 128, :_reduce_53,
+  1, 127, :_reduce_53,
   1, 134, :_reduce_54,
   1, 134, :_reduce_55,
@@ -1656,17 +1646,17 @@
   3, 142, :_reduce_358,
   3, 142, :_reduce_359,
-  1, 127, :_reduce_none,
-  3, 127, :_reduce_none,
-  3, 127, :_reduce_none,
+  1, 126, :_reduce_none,
+  3, 126, :_reduce_none,
+  3, 126, :_reduce_none,
   1, 221, :_reduce_none,
   3, 221, :_reduce_none,
   3, 222, :_reduce_365,
-  1, 126, :_reduce_366,
-  1, 126, :_reduce_367,
-  3, 223, :_reduce_none,
+  1, 125, :_reduce_366,
+  1, 125, :_reduce_367,
+  3, 223, :_reduce_368,
   0, 224, :_reduce_none,
   1, 224, :_reduce_none,
   2, 224, :_reduce_none,
-  1, 125, :_reduce_372,
+  1, 124, :_reduce_372,
   1, 150, :_reduce_373,
   1, 150, :_reduce_374,
@@ -1917,5 +1907,4 @@
   "c_attributes",
   "c_object",
-  "v_c_domain_type",
   "archetype_internal_ref",
   "archetype_slot",
@@ -1924,4 +1913,5 @@
   "c_ordinal",
   "c_primitive_object",
+  "v_c_domain_type",
   "absolute_path",
   "c_archetype_slot_head",
@@ -2059,5 +2049,5 @@
       archetype.original_language = language
     end
-    @@log.info("#{__FILE__}:#{__LINE__}: archetype = #{archetype} at #{@filename}:#{@lineno}")
+    @@logger.debug("#{__FILE__}:#{__LINE__}: archetype = #{archetype} at #{@filename}:#{@lineno}")
     result = archetype
   
@@ -2203,5 +2193,5 @@
   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}")
+    @@logger.debug("#{__FILE__}:#{__LINE__}: c_complex_object = #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -2276,23 +2266,15 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 210)
+module_eval(<<'.,.,', 'parser.y', 220)
   def _reduce_35(val, _values, result)
-        result = val[0]
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 214)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: c_complex_object = #{val[0].inspect} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 225)
   def _reduce_36(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}: c_complex_object = #{val[0].inspect} at #{@filename}:#{@lineno}")
-    result = val[0]
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 219)
-  def _reduce_37(val, _values, result)
         result = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF.create do |archetype_internal_ref|
       archetype_internal_ref.target_path = val[0][:absolute_path]
@@ -2305,14 +2287,14 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 227)
+module_eval(<<'.,.,', 'parser.y', 233)
+  def _reduce_37(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 237)
   def _reduce_38(val, _values, result)
-        result = val[0]
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 231)
-  def _reduce_39(val, _values, result)
         result = OpenEHR::AM::Archetype::Constraint_Model::CONSTRAINT_REF.create do |constraint_ref|
       constraint_ref.reference = val[0]
@@ -2323,5 +2305,13 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 237)
+module_eval(<<'.,.,', 'parser.y', 243)
+  def _reduce_39(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 247)
   def _reduce_40(val, _values, result)
         result = val[0]
@@ -2331,5 +2321,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 241)
+module_eval(<<'.,.,', 'parser.y', 251)
   def _reduce_41(val, _values, result)
         result = val[0]
@@ -2339,5 +2329,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 245)
+module_eval(<<'.,.,', 'parser.y', 255)
   def _reduce_42(val, _values, result)
         result = val[0]
@@ -2351,5 +2341,5 @@
 # reduce 44 omitted
 
-module_eval(<<'.,.,', 'parser.y', 260)
+module_eval(<<'.,.,', 'parser.y', 271)
   def _reduce_45(val, _values, result)
         result = val[1]
@@ -2359,5 +2349,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 266)
+module_eval(<<'.,.,', 'parser.y', 277)
   def _reduce_46(val, _values, result)
         result = {:type_identifier => val[1], :c_occurrences => val[2], :absolute_path => val[3] }
@@ -2369,5 +2359,5 @@
 # reduce 47 omitted
 
-module_eval(<<'.,.,', 'parser.y', 273)
+module_eval(<<'.,.,', 'parser.y', 284)
   def _reduce_48(val, _values, result)
         result = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT.create do |archetype_slot|
@@ -2382,5 +2372,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 282)
+module_eval(<<'.,.,', 'parser.y', 293)
   def _reduce_49(val, _values, result)
         result = {:c_archetype_slot_id => val[0],:c_occurrences => val[1]}
@@ -2390,5 +2380,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 287)
+module_eval(<<'.,.,', 'parser.y', 298)
   def _reduce_50(val, _values, result)
         result = val[1]
@@ -2402,5 +2392,5 @@
 # reduce 52 omitted
 
-module_eval(<<'.,.,', 'parser.y', 295)
+module_eval(<<'.,.,', 'parser.y', 306)
   def _reduce_53(val, _values, result)
         assert_at(__FILE__,__LINE__){val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE)}
@@ -2413,7 +2403,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 303)
+module_eval(<<'.,.,', 'parser.y', 314)
   def _reduce_54(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}: c_integer = #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: c_integer = #{val[0]} at #{@filename}:#{@lineno}")
     result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_INTEGER.create do |c_integer|
       c_integer.list
@@ -2426,7 +2416,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 312)
+module_eval(<<'.,.,', 'parser.y', 323)
   def _reduce_55(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}: c_real = #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: c_real = #{val[0]} at #{@filename}:#{@lineno}")
     result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_REAL.new
   
@@ -2435,7 +2425,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 317)
+module_eval(<<'.,.,', 'parser.y', 328)
   def _reduce_56(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}: c_date = #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: c_date = #{val[0]} at #{@filename}:#{@lineno}")
     result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE.new
   
@@ -2444,7 +2434,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 322)
+module_eval(<<'.,.,', 'parser.y', 333)
   def _reduce_57(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}: c_time = #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: c_time = #{val[0]} at #{@filename}:#{@lineno}")
     result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_TIME.new
   
@@ -2453,7 +2443,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 327)
+module_eval(<<'.,.,', 'parser.y', 338)
   def _reduce_58(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}: c_date_time = #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: c_date_time = #{val[0]} at #{@filename}:#{@lineno}")
     result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME.new
   
@@ -2462,7 +2452,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 332)
+module_eval(<<'.,.,', 'parser.y', 343)
   def _reduce_59(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}: c_duration = #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: c_duration = #{val[0]} at #{@filename}:#{@lineno}")
     result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DURATION.new
   
@@ -2471,7 +2461,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 337)
+module_eval(<<'.,.,', 'parser.y', 348)
   def _reduce_60(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}: c_string = #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: c_string = #{val[0]} at #{@filename}:#{@lineno}")
     result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_STRING.new
   
@@ -2480,8 +2470,8 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 342)
+module_eval(<<'.,.,', 'parser.y', 353)
   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}")
+    @@logger.debug("#{__FILE__}:#{__LINE__}: c_boolean = #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -2492,5 +2482,5 @@
 # reduce 62 omitted
 
-module_eval(<<'.,.,', 'parser.y', 354)
+module_eval(<<'.,.,', 'parser.y', 365)
   def _reduce_63(val, _values, result)
         result = [val[0]]
@@ -2500,5 +2490,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 358)
+module_eval(<<'.,.,', 'parser.y', 369)
   def _reduce_64(val, _values, result)
         result = (val[0] << val[1])
@@ -2508,5 +2498,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 364)
+module_eval(<<'.,.,', 'parser.y', 375)
   def _reduce_65(val, _values, result)
         assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
@@ -2519,5 +2509,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 371)
+module_eval(<<'.,.,', 'parser.y', 382)
   def _reduce_66(val, _values, result)
         assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
@@ -2528,5 +2518,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 376)
+module_eval(<<'.,.,', 'parser.y', 387)
   def _reduce_67(val, _values, result)
         assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
@@ -2537,7 +2527,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 383)
+module_eval(<<'.,.,', 'parser.y', 394)
   def _reduce_68(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]}, c_existence = #{val[1]} at #{@filename}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]}, c_existence = #{val[1]} at #{@filename}")
     result = OpenEHR::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE.new(
                                                                               :rm_attribute_name => val[0],
@@ -2550,8 +2540,8 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 392)
+module_eval(<<'.,.,', 'parser.y', 403)
   def _reduce_69(val, _values, result)
         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}") 
+    @@logger.debug("#{__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],
@@ -2564,5 +2554,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 403)
+module_eval(<<'.,.,', 'parser.y', 414)
   def _reduce_70(val, _values, result)
         result = Array[val[0]]
@@ -2572,5 +2562,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 407)
+module_eval(<<'.,.,', 'parser.y', 418)
   def _reduce_71(val, _values, result)
         result = (val[0] << val[1])
@@ -2580,5 +2570,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 411)
+module_eval(<<'.,.,', 'parser.y', 422)
   def _reduce_72(val, _values, result)
         result = Array[val[0]]
@@ -2590,5 +2580,5 @@
 # reduce 73 omitted
 
-module_eval(<<'.,.,', 'parser.y', 419)
+module_eval(<<'.,.,', 'parser.y', 430)
   def _reduce_74(val, _values, result)
         result = val[1]
@@ -2600,5 +2590,5 @@
 # reduce 75 omitted
 
-module_eval(<<'.,.,', 'parser.y', 427)
+module_eval(<<'.,.,', 'parser.y', 438)
   def _reduce_76(val, _values, result)
         result = val[1]
@@ -2624,5 +2614,5 @@
 # reduce 84 omitted
 
-module_eval(<<'.,.,', 'parser.y', 447)
+module_eval(<<'.,.,', 'parser.y', 458)
   def _reduce_85(val, _values, result)
         dadl_section = val[1]
@@ -2641,5 +2631,5 @@
 # reduce 89 omitted
 
-module_eval(<<'.,.,', 'parser.y', 462)
+module_eval(<<'.,.,', 'parser.y', 473)
   def _reduce_90(val, _values, result)
         result = Array[val[0]]
@@ -2649,5 +2639,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 466)
+module_eval(<<'.,.,', 'parser.y', 477)
   def _reduce_91(val, _values, result)
         result = (val[0] << val[1])
@@ -2657,5 +2647,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 470)
+module_eval(<<'.,.,', 'parser.y', 481)
   def _reduce_92(val, _values, result)
         result = (val[0] << val[2])
@@ -2665,7 +2655,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 475)
+module_eval(<<'.,.,', 'parser.y', 486)
   def _reduce_93(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}: attr_id = #{val[0]}, object_block = #{val[2]} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: attr_id = #{val[0]} at #{@filename}:#{@lineno}")
     result = {:attr_id => val[0], :object_block => val[2]}
   
@@ -2674,7 +2664,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 481)
+module_eval(<<'.,.,', 'parser.y', 492)
   def _reduce_94(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -2685,5 +2675,5 @@
 # reduce 95 omitted
 
-module_eval(<<'.,.,', 'parser.y', 488)
+module_eval(<<'.,.,', 'parser.y', 499)
   def _reduce_96(val, _values, result)
         result = val[0]
@@ -2693,5 +2683,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 492)
+module_eval(<<'.,.,', 'parser.y', 503)
   def _reduce_97(val, _values, result)
         result = val[0]
@@ -2701,5 +2691,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 497)
+module_eval(<<'.,.,', 'parser.y', 508)
   def _reduce_98(val, _values, result)
         result = val[0]
@@ -2709,5 +2699,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 501)
+module_eval(<<'.,.,', 'parser.y', 512)
   def _reduce_99(val, _values, result)
         result = val[0]
@@ -2717,5 +2707,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 506)
+module_eval(<<'.,.,', 'parser.y', 517)
   def _reduce_100(val, _values, result)
         result = {:untyped_multiple_attr_object_block => val[0]}
@@ -2725,5 +2715,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 510)
+module_eval(<<'.,.,', 'parser.y', 521)
   def _reduce_101(val, _values, result)
         result = {:type_identifier => val[0], :untyped_multiple_attr_object_block => val[1]}
@@ -2733,5 +2723,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 515)
+module_eval(<<'.,.,', 'parser.y', 526)
   def _reduce_102(val, _values, result)
         result = {:multiple_attr_object_block_head => val[0], :keyed_objects => val[1]}
@@ -2741,7 +2731,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 520)
+module_eval(<<'.,.,', 'parser.y', 531)
   def _reduce_103(val, _values, result)
-        @@log.info("SYM_START_DBLOCK: #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("SYM_START_DBLOCK: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -2750,5 +2740,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 526)
+module_eval(<<'.,.,', 'parser.y', 537)
   def _reduce_104(val, _values, result)
         result = Array[val[0]]
@@ -2758,5 +2748,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 530)
+module_eval(<<'.,.,', 'parser.y', 541)
   def _reduce_105(val, _values, result)
         result = (val[0] << val[1])
@@ -2766,7 +2756,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 535)
+module_eval(<<'.,.,', 'parser.y', 546)
   def _reduce_106(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}: keyed_object = #{val[0]}, object_block = #{val[2]} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: keyed_object = #{val[0]} at #{@filename}:#{@lineno}")
     result = {:object_key => val[0], :object_block => val[1]}
   
@@ -2775,7 +2765,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 541)
+module_eval(<<'.,.,', 'parser.y', 552)
   def _reduce_107(val, _values, result)
-        @@log.info("object_key: [#{val[1]}] at #{@filename}:#{@lineno}")
+        @@logger.debug("object_key: [#{val[1]}] at #{@filename}:#{@lineno}")
     result = val[1]
   
@@ -2784,5 +2774,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 547)
+module_eval(<<'.,.,', 'parser.y', 558)
   def _reduce_108(val, _values, result)
         result = {:untyped_single_attr_object_block => val[0]}
@@ -2792,5 +2782,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 551)
+module_eval(<<'.,.,', 'parser.y', 562)
   def _reduce_109(val, _values, result)
         result = {:type_identifier => val[0], :untyped_single_attr_object_block => val[1]}
@@ -2800,7 +2790,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 556)
+module_eval(<<'.,.,', 'parser.y', 567)
   def _reduce_110(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}: single_attr_object_complex_head = #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: single_attr_object_complex_head = #{val[0]} at #{@filename}:#{@lineno}")
     result = {:single_attr_object_complex_head => val[0]}
   
@@ -2809,7 +2799,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 561)
+module_eval(<<'.,.,', 'parser.y', 572)
   def _reduce_111(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}: single_attr_object_complex_head = #{val[0]}, attr_vals = #{val[1]} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: attr_vals = #{val[1]} at #{@filename}:#{@lineno}")
     result = {:single_attr_object_complex_head => val[0], :attr_vals => val[1]}
   
@@ -2820,7 +2810,7 @@
 # reduce 112 omitted
 
-module_eval(<<'.,.,', 'parser.y', 567)
+module_eval(<<'.,.,', 'parser.y', 578)
   def _reduce_113(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}: untyped_primitive_object_block = #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: untyped_primitive_object_block = #{val[0]} at #{@filename}:#{@lineno}")
     result = {:untyped_primitive_object_block => val[0]}
   
@@ -2829,7 +2819,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 572)
+module_eval(<<'.,.,', 'parser.y', 583)
   def _reduce_114(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}: type_identifier = #{val[0]}, untyped_primitive_object_block = #{val[1]} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__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]}
   
@@ -2838,7 +2828,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 577)
+module_eval(<<'.,.,', 'parser.y', 588)
   def _reduce_115(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}: primitive_object_block = <#{val[1]}> at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: primitive_object_block = <#{val[1]}> at #{@filename}:#{@lineno}")
     result = val[1]
   
@@ -2847,5 +2837,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 582)
+module_eval(<<'.,.,', 'parser.y', 593)
   def _reduce_116(val, _values, result)
         result = val[0]
@@ -2855,5 +2845,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 586)
+module_eval(<<'.,.,', 'parser.y', 597)
   def _reduce_117(val, _values, result)
         result = val[0]
@@ -2863,5 +2853,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 590)
+module_eval(<<'.,.,', 'parser.y', 601)
   def _reduce_118(val, _values, result)
         result = val[0]
@@ -2871,5 +2861,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 594)
+module_eval(<<'.,.,', 'parser.y', 605)
   def _reduce_119(val, _values, result)
         result = val[0]
@@ -2879,5 +2869,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 598)
+module_eval(<<'.,.,', 'parser.y', 609)
   def _reduce_120(val, _values, result)
         result = val[0]
@@ -2887,7 +2877,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 602)
+module_eval(<<'.,.,', 'parser.y', 613)
   def _reduce_121(val, _values, result)
-        @@log.info("string_value: #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("string_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -2896,7 +2886,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 607)
+module_eval(<<'.,.,', 'parser.y', 618)
   def _reduce_122(val, _values, result)
-        @@log.info("integer_value: #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("integer_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -2905,7 +2895,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 612)
+module_eval(<<'.,.,', 'parser.y', 623)
   def _reduce_123(val, _values, result)
-        @@log.info("real_value: #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("real_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -2914,7 +2904,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 617)
+module_eval(<<'.,.,', 'parser.y', 628)
   def _reduce_124(val, _values, result)
-        @@log.info("boolean_value: #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("boolean_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -2923,7 +2913,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 622)
+module_eval(<<'.,.,', 'parser.y', 633)
   def _reduce_125(val, _values, result)
-        @@log.info("character_value: #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("character_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -2932,7 +2922,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 627)
+module_eval(<<'.,.,', 'parser.y', 638)
   def _reduce_126(val, _values, result)
-        @@log.info("date_value: #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("date_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -2941,7 +2931,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 632)
+module_eval(<<'.,.,', 'parser.y', 643)
   def _reduce_127(val, _values, result)
-        @@log.info("time_value: #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("time_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -2950,7 +2940,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 637)
+module_eval(<<'.,.,', 'parser.y', 648)
   def _reduce_128(val, _values, result)
-        @@log.info("date_time_value: #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("date_time_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -2959,7 +2949,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 642)
+module_eval(<<'.,.,', 'parser.y', 653)
   def _reduce_129(val, _values, result)
-        @@log.info("duration_value: #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("duration_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -2968,7 +2958,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 647)
+module_eval(<<'.,.,', 'parser.y', 658)
   def _reduce_130(val, _values, result)
-        @@log.info("uri_value: #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("uri_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -3007,7 +2997,7 @@
 # reduce 145 omitted
 
-module_eval(<<'.,.,', 'parser.y', 670)
+module_eval(<<'.,.,', 'parser.y', 681)
   def _reduce_146(val, _values, result)
-        @@log.info("V_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("V_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -3016,7 +3006,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 675)
+module_eval(<<'.,.,', 'parser.y', 686)
   def _reduce_147(val, _values, result)
-        @@log.info("V_GENERIC_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("V_GENERIC_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -3025,7 +3015,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 681)
+module_eval(<<'.,.,', 'parser.y', 692)
   def _reduce_148(val, _values, result)
-        @@log.info("V_STRING: #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("V_STRING: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -3040,5 +3030,5 @@
 # reduce 151 omitted
 
-module_eval(<<'.,.,', 'parser.y', 691)
+module_eval(<<'.,.,', 'parser.y', 702)
   def _reduce_152(val, _values, result)
         begin
@@ -3053,5 +3043,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 700)
+module_eval(<<'.,.,', 'parser.y', 711)
   def _reduce_153(val, _values, result)
         begin
@@ -3066,5 +3056,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 709)
+module_eval(<<'.,.,', 'parser.y', 720)
   def _reduce_154(val, _values, result)
         begin
@@ -3103,5 +3093,5 @@
 # reduce 166 omitted
 
-module_eval(<<'.,.,', 'parser.y', 735)
+module_eval(<<'.,.,', 'parser.y', 746)
   def _reduce_167(val, _values, result)
         begin
@@ -3116,5 +3106,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 744)
+module_eval(<<'.,.,', 'parser.y', 755)
   def _reduce_168(val, _values, result)
         begin
@@ -3129,5 +3119,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 753)
+module_eval(<<'.,.,', 'parser.y', 764)
   def _reduce_169(val, _values, result)
         begin
@@ -3166,5 +3156,5 @@
 # reduce 181 omitted
 
-module_eval(<<'.,.,', 'parser.y', 778)
+module_eval(<<'.,.,', 'parser.y', 789)
   def _reduce_182(val, _values, result)
         result = true
@@ -3174,5 +3164,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 782)
+module_eval(<<'.,.,', 'parser.y', 793)
   def _reduce_183(val, _values, result)
         result = false
@@ -3274,7 +3264,7 @@
 # reduce 229 omitted
 
-module_eval(<<'.,.,', 'parser.y', 845)
+module_eval(<<'.,.,', 'parser.y', 856)
   def _reduce_230(val, _values, result)
-        @@log.info("V_ISO8601_DURATION: #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("V_ISO8601_DURATION: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -3307,7 +3297,7 @@
 # reduce 242 omitted
 
-module_eval(<<'.,.,', 'parser.y', 865)
+module_eval(<<'.,.,', 'parser.y', 876)
   def _reduce_243(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}: V_QUALIFIED_TERM_CODE_REF = #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: V_QUALIFIED_TERM_CODE_REF = #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -3322,7 +3312,7 @@
 # reduce 246 omitted
 
-module_eval(<<'.,.,', 'parser.y', 875)
+module_eval(<<'.,.,', 'parser.y', 886)
   def _reduce_247(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}: V_URI = #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: V_URI = #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
   
@@ -3411,21 +3401,21 @@
 # reduce 287 omitted
 
-module_eval(<<'.,.,', 'parser.y', 945)
+module_eval(<<'.,.,', 'parser.y', 956)
   def _reduce_288(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}") 
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 949)
+        @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}") 
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 960)
   def _reduce_289(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}") 
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 960)
+        @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}") 
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 971)
   def _reduce_290(val, _values, result)
         result = Range.new(1,1)
@@ -3435,5 +3425,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 964)
+module_eval(<<'.,.,', 'parser.y', 975)
   def _reduce_291(val, _values, result)
         result = val[3]
@@ -3443,5 +3433,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 969)
+module_eval(<<'.,.,', 'parser.y', 980)
   def _reduce_292(val, _values, result)
         begin
@@ -3456,5 +3446,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 978)
+module_eval(<<'.,.,', 'parser.y', 989)
   def _reduce_293(val, _values, result)
         begin
@@ -3470,5 +3460,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 989)
+module_eval(<<'.,.,', 'parser.y', 1000)
   def _reduce_294(val, _values, result)
         result = OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY.new
@@ -3494,5 +3484,5 @@
 # reduce 302 omitted
 
-module_eval(<<'.,.,', 'parser.y', 1003)
+module_eval(<<'.,.,', 'parser.y', 1014)
   def _reduce_303(val, _values, result)
         result = val[0]
@@ -3502,5 +3492,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1007)
+module_eval(<<'.,.,', 'parser.y', 1018)
   def _reduce_304(val, _values, result)
         result = val[0]
@@ -3512,5 +3502,5 @@
 # reduce 305 omitted
 
-module_eval(<<'.,.,', 'parser.y', 1014)
+module_eval(<<'.,.,', 'parser.y', 1025)
   def _reduce_306(val, _values, result)
         result = val[3]
@@ -3612,5 +3602,5 @@
 # reduce 352 omitted
 
-module_eval(<<'.,.,', 'parser.y', 1084)
+module_eval(<<'.,.,', 'parser.y', 1095)
   def _reduce_353(val, _values, result)
         result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true)
@@ -3620,5 +3610,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1088)
+module_eval(<<'.,.,', 'parser.y', 1099)
   def _reduce_354(val, _values, result)
         result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false)
@@ -3628,5 +3618,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1092)
+module_eval(<<'.,.,', 'parser.y', 1103)
   def _reduce_355(val, _values, result)
         result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true,:false_valid => false)
@@ -3636,5 +3626,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1096)
+module_eval(<<'.,.,', 'parser.y', 1107)
   def _reduce_356(val, _values, result)
         result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false,:false_valid => true)
@@ -3644,5 +3634,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1101)
+module_eval(<<'.,.,', 'parser.y', 1112)
   def _reduce_357(val, _values, result)
         result = val[0]
@@ -3652,5 +3642,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1105)
+module_eval(<<'.,.,', 'parser.y', 1116)
   def _reduce_358(val, _values, result)
         raise 'Not implemented yet'
@@ -3660,5 +3650,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1109)
+module_eval(<<'.,.,', 'parser.y', 1120)
   def _reduce_359(val, _values, result)
         raise 'Not implemented yet'
@@ -3678,14 +3668,14 @@
 # reduce 364 omitted
 
-module_eval(<<'.,.,', 'parser.y', 1121)
+module_eval(<<'.,.,', 'parser.y', 1132)
   def _reduce_365(val, _values, result)
         @in_interval = false
-    @@log.info("#{__FILE__}:#{__LINE__}, #{val[0]}|#{val[2]} at #{@filename}") 
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 1128)
+    @@logger.debug("#{__FILE__}:#{__LINE__}, #{val[0]}|#{val[2]} at #{@filename}") 
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1139)
   def _reduce_366(val, _values, result)
           result = val[0]
@@ -3695,5 +3685,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1132)
+module_eval(<<'.,.,', 'parser.y', 1143)
   def _reduce_367(val, _values, result)
           result = val[0]
@@ -3703,5 +3693,14 @@
 .,.,
 
-# reduce 368 omitted
+module_eval(<<'.,.,', 'parser.y', 1149)
+  def _reduce_368(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}, START_TERM_CODE_CONSTRAINT = #{val[0]} at #{@filename}")
+    @@logger.debug("#{__FILE__}:#{__LINE__}, term_code_body = #{val[1]}")
+    @@logger.debug("#{__FILE__}:#{__LINE__}, END_TERM_CODE_CONSTRAINT = #{val[2]}")
+    result = val[1]
+  
+    result
+  end
+.,.,
 
 # reduce 369 omitted
@@ -3711,5 +3710,5 @@
 # reduce 371 omitted
 
-module_eval(<<'.,.,', 'parser.y', 1147)
+module_eval(<<'.,.,', 'parser.y', 1165)
   def _reduce_372(val, _values, result)
           result = val[0]
@@ -3719,5 +3718,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1152)
+module_eval(<<'.,.,', 'parser.y', 1170)
   def _reduce_373(val, _values, result)
           result = val[0]
@@ -3727,7 +3726,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1156)
+module_eval(<<'.,.,', 'parser.y', 1174)
   def _reduce_374(val, _values, result)
-        @@log.info("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{word} at #{@filename}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{word} at #{@filename}")
       result = val[0]
   
@@ -3736,5 +3735,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1167)
+module_eval(<<'.,.,', 'parser.y', 1185)
   def _reduce_375(val, _values, result)
         result = val[0]
