Index: ruby/trunk/lib/adl_parser/Rakefile
===================================================================
--- ruby/trunk/lib/adl_parser/Rakefile	(revision 299)
+++ ruby/trunk/lib/adl_parser/Rakefile	(revision 307)
@@ -89,5 +89,6 @@
   s.extra_rdoc_files = ["README"]
 #  s.add_dependency("yaparc", ">= 0.2.3")
-  s.add_dependency("openehr_models", ">= 0.0.3")
+#  s.add_dependency("openehr_models", ">= 0.0.3")
+  s.add_dependency("open_ehr", ">= 0.0.1")
 end
 
Index: ruby/trunk/lib/adl_parser/lib/adl_exception.rb
===================================================================
--- ruby/trunk/lib/adl_parser/lib/adl_exception.rb	(revision 299)
+++ ruby/trunk/lib/adl_parser/lib/adl_exception.rb	(revision 307)
@@ -1,3 +1,3 @@
-module OpenEHR
+module OpenEhr
   module ADL
     module Exception
Index: ruby/trunk/lib/adl_parser/lib/adl_parser.rb
===================================================================
--- ruby/trunk/lib/adl_parser/lib/adl_parser.rb	(revision 299)
+++ ruby/trunk/lib/adl_parser/lib/adl_parser.rb	(revision 307)
@@ -10,4 +10,5 @@
 require 'adl_scanner.rb'
 require 'adl_exception.rb'
+require 'parser.rb'
 
 module OpenEhr
Index: ruby/trunk/lib/adl_parser/lib/adl_scanner.rb
===================================================================
--- ruby/trunk/lib/adl_parser/lib/adl_scanner.rb	(revision 299)
+++ ruby/trunk/lib/adl_parser/lib/adl_scanner.rb	(revision 307)
@@ -1,16 +1,16 @@
 require 'rubygems'
-require 'yaparc'
 require 'logger'
 require 'adl_parser.rb'
-require 'am.rb'
-require 'rm.rb'
+require 'open_ehr'
+#require 'am.rb'
+#require 'rm.rb'
 require 'util.rb'
 
 
-module OpenEHR
+module OpenEhr
   module ADL
     module Scanner
       LOGGER = Logger.new('log/scanner.log')
-      LOGGER.level = Logger::WARN
+      LOGGER.level = Logger::DEBUG
 
       class Base
@@ -33,5 +33,5 @@
         attr_accessor :adl_type, :lineno, :cadl_scanner, :dadl_scanner, :regex_scanner, :term_constraint_scanner
 
-        @@logger = OpenEHR::ADL::Scanner::LOGGER #Logger.new('log/scanner.log')
+        @@logger = OpenEhr::ADL::Scanner::LOGGER #Logger.new('log/scanner.log')
         RESERVED = {
           'archetype' => :SYM_ARCHETYPE,
@@ -85,5 +85,6 @@
               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)
+                #archetype_id = OpenEhr::RM::Support::Identification::ArchetypeID.new(object_id, concept_name, rm_name, rm_entity, rm_originator, specialisation, version_id)
+                archetype_id = OpenEhr::RM::Support::Identification::ArchetypeID.new(:concept_name => concept_name, :rm_name => rm_name, :rm_entity => rm_entity, :rm_originator => :rm_originator, :specialisation => specialisation, :version_id => version_id)
                 yield :V_ARCHETYPE_ID, archetype_id
               when /\A[a-z][a-zA-Z0-9_]*/
@@ -173,6 +174,6 @@
               when /\A\[([a-zA-Z0-9()\._-]+::[a-zA-Z0-9\._-]+)\]/ #V_QUALIFIED_TERM_CODE_REF form such as [ICD10AM(1998)::F23]
                 yield :V_QUALIFIED_TERM_CODE_REF, $1
-              when /\A\[[a-zA-Z0-9][a-zA-Z0-9._\-]*\]/   #V_LOCAL_TERM_CODE_REF
-                yield :V_LOCAL_TERM_CODE_REF, $&
+              when /\A\[([a-zA-Z0-9][a-zA-Z0-9._\-]*)\]/   #V_LOCAL_TERM_CODE_REF
+                yield :V_LOCAL_TERM_CODE_REF, $1
               when /\A\[/   # [
                 yield :Left_bracket_code, :Left_bracket_code
@@ -208,20 +209,20 @@
               data = $' # variable $' receives the string after the match
             when :dadl
-              dadl_scanner = OpenEHR::ADL::Scanner::DADLScanner.new(@adl_type, @filename, @lineno)
+              dadl_scanner = OpenEhr::ADL::Scanner::DADLScanner.new(@adl_type, @filename, @lineno)
               data = dadl_scanner.scan(data) do |sym, val|
                 yield sym, val
               end
             when :cadl
-              cadl_scanner = OpenEHR::ADL::Scanner::CADLScanner.new(@adl_type, @filename, @lineno)
+              cadl_scanner = OpenEhr::ADL::Scanner::CADLScanner.new(@adl_type, @filename, @lineno)
               data = cadl_scanner.scan(data) do |sym, val|
                 yield sym, val
               end
             when :regexp
-              regex_scanner = OpenEHR::ADL::Scanner::RegexScanner.new(@adl_type, @filename, @lineno)
+              regex_scanner = OpenEhr::ADL::Scanner::RegexScanner.new(@adl_type, @filename, @lineno)
               data = regex_scanner.scan(data) do |sym, val|
                 yield sym, val
               end
             when :term_constraint
-              term_constraint_scanner = OpenEHR::ADL::Scanner::TermConstraintScanner.new(@adl_type, @filename, @lineno)
+              term_constraint_scanner = OpenEhr::ADL::Scanner::TermConstraintScanner.new(@adl_type, @filename, @lineno)
               data = term_constraint_scanner.scan(data) do |sym, val|
                 yield sym, val
@@ -238,5 +239,6 @@
       # 
       class DADLScanner < Base
-        @@logger = OpenEHR::ADL::Scanner::LOGGER #Logger.new('log/scanner.log')
+        attr_accessor :in_interval, :in_c_domain_type, :in_dblock
+        @@logger = OpenEhr::ADL::Scanner::LOGGER #Logger.new('log/scanner.log')
         RESERVED = {
           'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE 
@@ -249,4 +251,5 @@
           @in_interval = false
           @in_c_domain_type = false
+          @in_dblock = true
         end
 
@@ -258,4 +261,5 @@
           until data.nil?  do
             @@logger.debug("#{@filename}:#{@lineno}: DADLScanner#scan:loop data = #{data.inspect}")
+            @@logger.debug("#{@filename}:#{@lineno}: DADLScanner#scan:loop self = \n#{self.to_yaml}")
             case @adl_type.last
             when :dadl
@@ -297,12 +301,16 @@
                 if @in_interval
                   yield :SYM_GT, :SYM_GT
+#                 elsif @in_dblock == true
+#                   @in_dblock = false
+#                   yield :SYM_END_DBLOCK, :SYM_END_DBLOCK
                 elsif @in_c_domain_type == true
                   assert_at(__FILE__,__LINE__){@adl_type.last == :dadl}
                   adl_type = @adl_type.pop
-                  if @adl_type.last == :cadl
+                  if adl_type == :dadl
                     @in_c_domain_type = false
-                    yield :END_V_C_DOMAIN_TYPE_BLOCK, $&
+                    yield :END_V_C_DOMAIN_TYPE_BLOCK, :END_V_C_DOMAIN_TYPE_BLOCK
+#                    yield :SYM_END_DBLOCK, :SYM_END_DBLOCK
                   else
-                    yield :SYM_END_DBLOCK, $&
+                    yield :SYM_END_DBLOCK, :SYM_END_DBLOCK
                   end
                 elsif @in_c_domain_type == false
@@ -392,15 +400,15 @@
               data = $' # variable $' receives the string after the match
             when :adl
-              adl_scanner = OpenEHR::ADL::Scanner::ADLScanner.new(@adl_type, @filename, @lineno)
+              adl_scanner = OpenEhr::ADL::Scanner::ADLScanner.new(@adl_type, @filename, @lineno)
               data = adl_scanner.scan(data) do |sym, val|
                 yield sym, val
               end
             when :cadl
-              cadl_scanner = OpenEHR::ADL::Scanner::CADLScanner.new(@adl_type, @filename, @lineno)
+              cadl_scanner = OpenEhr::ADL::Scanner::CADLScanner.new(@adl_type, @filename, @lineno)
               data = cadl_scanner.scan(data) do |sym, val|
                 yield sym, val
               end
             when :regexp
-              regex_scanner = OpenEHR::ADL::Scanner::RegexScanner.new(@adl_type, @filename, @lineno)
+              regex_scanner = OpenEhr::ADL::Scanner::RegexScanner.new(@adl_type, @filename, @lineno)
               data = regex_scanner.scan(data) do |sym, val|
                 yield sym, val
@@ -408,5 +416,5 @@
             when :term_constraint
               @@logger.debug("#{__FILE__}:#{__LINE__}: scan_dadl: Entering scan_term_constraint at #{@filename}:#{@lineno}: data = #{data.inspect}")
-              term_constraint_scanner = OpenEHR::ADL::Scanner::TermConstraintScanner.new(@adl_type, @filename, @lineno)
+              term_constraint_scanner = OpenEhr::ADL::Scanner::TermConstraintScanner.new(@adl_type, @filename, @lineno)
               data = term_constraint_scanner.scan(data) do |sym, val|
                 yield sym, val
@@ -423,5 +431,5 @@
       class CADLScanner < Base
 
-        @@logger = OpenEHR::ADL::Scanner::LOGGER #Logger.new('log/scanner.log')        #Logger.new('log/scanner.log')
+        @@logger = OpenEhr::ADL::Scanner::LOGGER #Logger.new('log/scanner.log')        #Logger.new('log/scanner.log')
         RESERVED = {
           'then' => :SYM_THEN, # [Tt][Hh][Ee][Nn]
@@ -568,6 +576,6 @@
                 @adl_type.push(:term_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, $&
+              when /\A\[([a-zA-Z0-9][a-zA-Z0-9._\-]*)\]/   #V_LOCAL_TERM_CODE_REF
+                yield :V_LOCAL_TERM_CODE_REF, $1
               when /\A\[/   # [
                 yield :Left_bracket_code, :Left_bracket_code
@@ -595,4 +603,8 @@
                   yield :V_ATTRIBUTE_IDENTIFIER, word #V_ATTRIBUTE_IDENTIFIER /\A[a-z][a-zA-Z0-9_]*/
                 end
+              when /\A([A-Z][a-zA-Z0-9_]*)[ \n]*\</ # V_C_DOMAIN_TYPE
+                @in_c_domain_type = true
+                @adl_type.push(:dadl)
+                yield  :START_V_C_DOMAIN_TYPE_BLOCK, $1
               when /\A[A-Z][a-zA-Z0-9_]*/
                 word = $&.dup
@@ -624,19 +636,20 @@
                 yield :UTF8CHAR, $&
               when /\A.+/ #
-                raise OpenEHR::ADL::Exception::CADLScanner::Base.new, "can't handle #{data.inspect}"
+                raise OpenEhr::ADL::Exception::CADLScanner::Base.new, "can't handle #{data.inspect}"
               end
               data = $' # variable $' receives the string after the match
             when :adl
-              adl_scanner = OpenEHR::ADL::Scanner::ADLScanner.new(@adl_type, @filename, @lineno)
+              adl_scanner = OpenEhr::ADL::Scanner::ADLScanner.new(@adl_type, @filename, @lineno)
               data = adl_scanner.scan(data) do |sym, val|
                 yield sym, val
               end
             when :dadl
-              dadl_scanner = OpenEHR::ADL::Scanner::DADLScanner.new(@adl_type, @filename, @lineno)
+              dadl_scanner = OpenEhr::ADL::Scanner::DADLScanner.new(@adl_type, @filename, @lineno)
+              dadl_scanner.in_c_domain_type = @in_c_domain_type
               data = dadl_scanner.scan(data) do |sym, val|
                 yield sym, val
               end
             when :regexp
-              regex_scanner = OpenEHR::ADL::Scanner::RegexScanner.new(@adl_type, @filename, @lineno)
+              regex_scanner = OpenEhr::ADL::Scanner::RegexScanner.new(@adl_type, @filename, @lineno)
               data = regex_scanner.scan(data) do |sym, val|
                 yield sym, val
@@ -644,10 +657,10 @@
             when :term_constraint
               @@logger.debug("Entering scan_term_constraint at #{@filename}:#{@lineno}: data = #{data.inspect}")
-              term_constraint_scanner = OpenEHR::ADL::Scanner::TermConstraintScanner.new(@adl_type, @filename, @lineno)
+              term_constraint_scanner = OpenEhr::ADL::Scanner::TermConstraintScanner.new(@adl_type, @filename, @lineno)
               data = term_constraint_scanner.scan(data) do |sym, val|
                 yield sym, val
               end
             else
-              raise OpenEHR::ADL::Exception::CADLScanner.new, "unexpected adl_type: #{@adl_type.last}"
+              raise OpenEhr::ADL::Exception::CADLScanner.new, "unexpected adl_type: #{@adl_type.last}"
             end
           end # of until
@@ -661,5 +674,5 @@
       class RegexScanner < Base
 
-        @@logger = OpenEHR::ADL::Scanner::LOGGER #Logger.new('log/scanner.log')        #Logger.new('log/scanner.log')
+        @@logger = OpenEhr::ADL::Scanner::LOGGER #Logger.new('log/scanner.log')        #Logger.new('log/scanner.log')
         
         def initialize(adl_type, filename, lineno = 1)
@@ -695,15 +708,15 @@
               data = $' # variable $' receives the string after the match
             when :adl
-              adl_scanner = OpenEHR::ADL::Scanner::ADLScanner.new(@adl_type, @filename, @lineno)
+              adl_scanner = OpenEhr::ADL::Scanner::ADLScanner.new(@adl_type, @filename, @lineno)
               data = adl_scanner.scan(data) do |sym, val|
                 yield sym, val
               end
             when :dadl
-              dadl_scanner = OpenEHR::ADL::Scanner::DADLScanner.new(@adl_type, @filename, @lineno)
+              dadl_scanner = OpenEhr::ADL::Scanner::DADLScanner.new(@adl_type, @filename, @lineno)
               data = dadl_scanner.scan(data) do |sym, val|
                 yield sym, val
               end
             when :cadl
-              cadl_scanner = OpenEHR::ADL::Scanner::CADLScanner.new(@adl_type, @filename, @lineno)
+              cadl_scanner = OpenEhr::ADL::Scanner::CADLScanner.new(@adl_type, @filename, @lineno)
               data = cadl_scanner.scan(data) do |sym, val|
                 yield sym, val
@@ -711,5 +724,5 @@
             when :term_constraint
               #@@logger.debug("#{__FILE__}:#{__LINE__}: scan_regexp: Entering scan_term_constraint at #{@filename}:#{@lineno}")
-              term_constraint_scanner = OpenEHR::ADL::Scanner::TermConstraintScanner.new(@adl_type, @filename, @lineno)
+              term_constraint_scanner = OpenEhr::ADL::Scanner::TermConstraintScanner.new(@adl_type, @filename, @lineno)
               data = term_constraint_scanner.scan(data) do |sym, val|
                 yield sym, val
@@ -726,5 +739,5 @@
       # 
       class TermConstraintScanner < Base
-        @@logger = OpenEHR::ADL::Scanner::LOGGER #Logger.new('log/scanner.log')        #Logger.new('log/scanner.log')
+        @@logger = OpenEhr::ADL::Scanner::LOGGER #Logger.new('log/scanner.log')        #Logger.new('log/scanner.log')
         def initialize(adl_type, filename, lineno = 1)
           super(adl_type, filename, lineno)
@@ -759,15 +772,15 @@
               data = $' # variable $' receives the string after the match
             when :adl
-              adl_scanner = OpenEHR::ADL::Scanner::ADLScanner.new(@adl_type, @filename, @lineno)
+              adl_scanner = OpenEhr::ADL::Scanner::ADLScanner.new(@adl_type, @filename, @lineno)
               data = adl_scanner.scan(data) do |sym, val|
                 yield sym, val
               end
             when :dadl
-              dadl_scanner = OpenEHR::ADL::Scanner::DADLScanner.new(@adl_type, @filename, @lineno)
+              dadl_scanner = OpenEhr::ADL::Scanner::DADLScanner.new(@adl_type, @filename, @lineno)
               data = dadl_scanner.scan(data) do |sym, val|
                 yield sym, val
               end
             when :cadl
-              cadl_scanner = OpenEHR::ADL::Scanner::CADLScanner.new(@adl_type, @filename, @lineno)
+              cadl_scanner = OpenEhr::ADL::Scanner::CADLScanner.new(@adl_type, @filename, @lineno)
               data = cadl_scanner.scan(data) do |sym, val|
                 yield sym, val
@@ -794,5 +807,5 @@
 #             @parser = lambda do |input|
 #               Yaparc::Apply.new(Yaparc::Regex.new(/[ \t\n]*\[([a-zA-Z0-9\(\)\._\-]+)::[ \t\n]*/)) do |match|
-#                 OpenEHR::LOG.info("START_TERM_CODE_CONSTRAINT: #{match}")
+#                 OpenEhr::LOG.info("START_TERM_CODE_CONSTRAINT: #{match}")
 #                 [:START_TERM_CODE_CONSTRAINT, match]
 #               end
@@ -807,5 +820,5 @@
 #             @parser = lambda do |input|
 #               Yaparc::Apply.new(Yaparc::Regex.new(/\A\[[a-zA-Z0-9()\._-]+::[a-zA-Z0-9\._-]+\]/)) do |match|
-#                 OpenEHR::LOG.info("V_QUALIFIED_TERM_CODE_REF: #{match}")
+#                 OpenEhr::LOG.info("V_QUALIFIED_TERM_CODE_REF: #{match}")
 #                 [:V_QUALIFIED_TERM_CODE_REF, match]
 #               end
@@ -819,5 +832,5 @@
 #             @parser = lambda do |input|
 #               Yaparc::Apply.new(Yaparc::Regex.new(/\A\[[a-zA-Z0-9][a-zA-Z0-9._\-]*\]/)) do |match|
-#                 OpenEHR::LOG.info("V_TERM_CODE_REF: #{match}")
+#                 OpenEhr::LOG.info("V_TERM_CODE_REF: #{match}")
 #                 [:V_LOCAL_TERM_CODE_REF, match]
 #               end
@@ -831,5 +844,5 @@
 #             @parser = lambda do |input|
 #               Yaparc::Apply.new(Yaparc::Regex.new(/\A\[[a-zA-Z0-9._\- ]+::[a-zA-Z0-9._\- ]+\]/)) do |match|
-#                 OpenEHR::LOG.info("ERR_V_QUALIFIED_TERM_CODE_REF: #{match}")
+#                 OpenEhr::LOG.info("ERR_V_QUALIFIED_TERM_CODE_REF: #{match}")
 #                 [:ERR_V_QUALIFIED_TERM_CODE_REF, match]
 #               end
@@ -843,5 +856,5 @@
 #             @parser = lambda do |input|
 #               Yaparc::Apply.new(Yaparc::Regex.new(/\A[A-Z][a-zA-Z0-9_]*/)) do |match|
-#                 OpenEHR::LOG.info("V_TYPE_IDENTIFIER: #{match}")
+#                 OpenEhr::LOG.info("V_TYPE_IDENTIFIER: #{match}")
 #                 [:V_TYPE_IDENTIFIER, match]
 #               end
@@ -855,5 +868,5 @@
 #             @parser = lambda do |input|
 #               Yaparc::Apply.new(Yaparc::Regex.new(/\A[A-Z][a-zA-Z0-9_]*<[a-zA-Z0-9,_<>]+>/)) do |match|
-#                 OpenEHR::LOG.info("V_GENERIC_TYPE_IDENTIFIER: #{match}")
+#                 OpenEhr::LOG.info("V_GENERIC_TYPE_IDENTIFIER: #{match}")
 #                 [:V_GENERIC_TYPE_IDENTIFIER, match]
 #               end
@@ -868,5 +881,5 @@
 #             @parser = lambda do |input|
 #               Yaparc::Apply.new(Yaparc::Regex.new(/\Aa[ct][0-9.]+/)) do |match|
-#                 OpenEHR::LOG.info("V_LOCAL_CODE: #{match}")
+#                 OpenEhr::LOG.info("V_LOCAL_CODE: #{match}")
 #                 [:V_LOCAL_CODE, match]
 #               end
@@ -880,5 +893,5 @@
 #             @parser = lambda do |input|
 #               Yaparc::Apply.new(Yaparc::Regex.new(/\A"([^"]*)"/m)) do |match|
-#                 OpenEHR::LOG.info("V_STRING: #{match}")
+#                 OpenEhr::LOG.info("V_STRING: #{match}")
 #                 [:V_STRING, match]
 #               end
@@ -892,5 +905,5 @@
 #             @parser = lambda do |input|
 #               Yaparc::Apply.new(Yaparc::Regex.new(/\A[0-9]+\.[0-9]+|[0-9]+\.[0-9]+[eE][+-]?[0-9]+/)) do |match|
-#                 OpenEHR::LOG.info("V_REAL: #{match}")
+#                 OpenEhr::LOG.info("V_REAL: #{match}")
 #                 [:V_REAL, match]
 #               end
@@ -907,5 +920,5 @@
 #                                 Yaparc::Alt.new(Yaparc::Regex.new(/\AP([0-9]+|[yY])?([0-9]+|[mM])?([0-9]+|[wW])?([0-9]+|[dD])?T([0-9]+|[hH])?([0-9]+|[mM])?([0-9]+|[sS])?/),
 #                                                 Yaparc::Regex.new(/\AP([0-9]+|[yY])?([0-9]+|[mM])?([0-9]+|[wW])?([0-9]+|[dD])?/))) do |match|
-#                 OpenEHR::LOG.info("V_ISO8601_DURATION: #{match}")
+#                 OpenEhr::LOG.info("V_ISO8601_DURATION: #{match}")
 #                 [:V_ISO8601_DURATION, match]
 #               end
@@ -931,14 +944,14 @@
 #             @parser = lambda do |input|
 #               Yaparc::Alt.new(Reserved.new,
-#                               OpenEHR::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new,
-#                               OpenEHR::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new,
-#                               OpenEHR::ADL::Scanner::Common::ERR_V_QUALIFIED_TERM_CODE_REF.new,
-#                               OpenEHR::ADL::Scanner::Common::V_TYPE_IDENTIFIER.new,
-#                               OpenEHR::ADL::Scanner::Common::V_GENERIC_TYPE_IDENTIFIER.new,
-#                               OpenEHR::ADL::Scanner::Common::V_STRING.new,
-#                               OpenEHR::ADL::Scanner::Common::V_LOCAL_CODE.new,
-#                               OpenEHR::ADL::Scanner::Common::V_REAL.new,
-#                               OpenEHR::ADL::Scanner::Common::V_ISO8601_DURATION.new#,
-#                               #OpenEHR::ADL::Scanner::Common::START_TERM_CODE_CONSTRAINT.new
+#                               OpenEhr::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new,
+#                               OpenEhr::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new,
+#                               OpenEhr::ADL::Scanner::Common::ERR_V_QUALIFIED_TERM_CODE_REF.new,
+#                               OpenEhr::ADL::Scanner::Common::V_TYPE_IDENTIFIER.new,
+#                               OpenEhr::ADL::Scanner::Common::V_GENERIC_TYPE_IDENTIFIER.new,
+#                               OpenEhr::ADL::Scanner::Common::V_STRING.new,
+#                               OpenEhr::ADL::Scanner::Common::V_LOCAL_CODE.new,
+#                               OpenEhr::ADL::Scanner::Common::V_REAL.new,
+#                               OpenEhr::ADL::Scanner::Common::V_ISO8601_DURATION.new#,
+#                               #OpenEhr::ADL::Scanner::Common::START_TERM_CODE_CONSTRAINT.new
 #                               )
 #             end
@@ -952,5 +965,5 @@
 #           def initialize
 #             @parser = lambda do |input|
-#               reserved_parsers = OpenEHR::ADL::Scanner::DADL::RESERVED.map do |keyword| 
+#               reserved_parsers = OpenEhr::ADL::Scanner::DADL::RESERVED.map do |keyword| 
 #                 Yaparc::Tokenize.new(
 #                                      Yaparc::Literal.new(keyword[0],false)
@@ -958,9 +971,9 @@
 #               end
 #               Yaparc::Alt.new(Yaparc::Apply.new(Yaparc::Alt.new(*reserved_parsers)) do |match|
-#                                 OpenEHR::LOG.info("Reserved: #{match}")
-#                                 [OpenEHR::ADL::Scanner::DADL::RESERVED[match], OpenEHR::ADL::Scanner::DADL::RESERVED[match]]
+#                                 OpenEhr::LOG.info("Reserved: #{match}")
+#                                 [OpenEhr::ADL::Scanner::DADL::RESERVED[match], OpenEhr::ADL::Scanner::DADL::RESERVED[match]]
 #                               end,
 #                               Yaparc::Apply.new(Yaparc::Regex.new(/\A[a-z][a-zA-Z0-9_]*/)) do |match|
-#                                 OpenEHR::LOG.info("V_ATTRIBUTE_IDENTIFIER: #{match}")
+#                                 OpenEhr::LOG.info("V_ATTRIBUTE_IDENTIFIER: #{match}")
 #                                 [:V_ATTRIBUTE_IDENTIFIER, match]
 #                               end)
@@ -1007,5 +1020,5 @@
 #             @parser = lambda do |input|
 #               Yaparc::Apply.new(Yaparc::Regex.new(/\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X][T\t][hH?X][hH?X]:[mM?X][mM?X]:[sS?X][sS?X]/)) do |match|
-#                 OpenEHR::LOG.info("V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN: #{match}")
+#                 OpenEhr::LOG.info("V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN: #{match}")
 #                 [:V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN, match]
 #               end
@@ -1020,5 +1033,5 @@
 #             @parser = lambda do |input|
 #               Yaparc::Apply.new(Yaparc::Regex.new(/\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X]/)) do |match|
-#                 OpenEHR::LOG.info("V_ISO8601_DATE_CONSTRAINT_PATTERN: #{match}")
+#                 OpenEhr::LOG.info("V_ISO8601_DATE_CONSTRAINT_PATTERN: #{match}")
 #                 [:V_ISO8601_DATE_CONSTRAINT_PATTERN, match]
 #               end
@@ -1033,5 +1046,5 @@
 #             @parser = lambda do |input|
 #               Yaparc::Apply.new(Yaparc::Regex.new(/\A[hH][hH]:[mM?X][mM?X]:[sS?X][sS?X]/)) do |match|
-#                 OpenEHR::LOG.info("V_ISO8601_TIME_CONSTRAINT_PATTERN: #{match}")
+#                 OpenEhr::LOG.info("V_ISO8601_TIME_CONSTRAINT_PATTERN: #{match}")
 #                 [:V_ISO8601_TIME_CONSTRAINT_PATTERN, match]
 #               end
@@ -1047,5 +1060,5 @@
 #               Yaparc::Apply.new(Yaparc::Alt.new(Yaparc::Regex.new(/\AP[yY]?[mM]?[wW]?[dD]?T[hH]?[mM]?[sS]?/),
 #                                                 Yaparc::Regex.new(/\AP[yY]?[mM]?[wW]?[dD]?/))) do |match|
-#                 OpenEHR::LOG.info("V_ISO8601_DURATION_CONSTRAINT_PATTERN: #{match}")
+#                 OpenEhr::LOG.info("V_ISO8601_DURATION_CONSTRAINT_PATTERN: #{match}")
 #                 [:V_ISO8601_DURATION_CONSTRAINT_PATTERN, match]
 #               end
@@ -1060,5 +1073,5 @@
 #             @parser = lambda do |input|
 #               Yaparc::Apply.new(Yaparc::Regex.new(/\A[A-Z][a-zA-Z0-9_]*[ \n]*\</)) do |match|
-#                 OpenEHR::LOG.info("V_C_DOMAIN_TYPE: #{match}")
+#                 OpenEhr::LOG.info("V_C_DOMAIN_TYPE: #{match}")
 #                 [:START_V_C_DOMAIN_TYPE_BLOCK, match]
 #               end
@@ -1077,18 +1090,18 @@
 #                               V_ISO8601_DATE_CONSTRAINT_PATTERN.new,
 #                               V_ISO8601_TIME_CONSTRAINT_PATTERN.new,
-#                               OpenEHR::ADL::Scanner::Common::V_ISO8601_DURATION.new,
+#                               OpenEhr::ADL::Scanner::Common::V_ISO8601_DURATION.new,
 #                               V_C_DOMAIN_TYPE.new,
 #                               V_ISO8601_DURATION_CONSTRAINT_PATTERN.new,
 #                               Reserved.new,
-#                               OpenEHR::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new,
-#                               OpenEHR::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new,
-#                               OpenEHR::ADL::Scanner::Common::ERR_V_QUALIFIED_TERM_CODE_REF.new,
-#                               OpenEHR::ADL::Scanner::Common::V_TYPE_IDENTIFIER.new,
-#                               OpenEHR::ADL::Scanner::Common::V_GENERIC_TYPE_IDENTIFIER.new,
-#                               OpenEHR::ADL::Scanner::Common::V_STRING.new,
-#                               OpenEHR::ADL::Scanner::Common::V_LOCAL_CODE.new,
-#                               OpenEHR::ADL::Scanner::Common::V_REAL.new,
-#                               OpenEHR::ADL::Scanner::Common::V_ISO8601_DURATION.new#,
-#                               #OpenEHR::ADL::Scanner::Common::START_TERM_CODE_CONSTRAINT.new
+#                               OpenEhr::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new,
+#                               OpenEhr::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new,
+#                               OpenEhr::ADL::Scanner::Common::ERR_V_QUALIFIED_TERM_CODE_REF.new,
+#                               OpenEhr::ADL::Scanner::Common::V_TYPE_IDENTIFIER.new,
+#                               OpenEhr::ADL::Scanner::Common::V_GENERIC_TYPE_IDENTIFIER.new,
+#                               OpenEhr::ADL::Scanner::Common::V_STRING.new,
+#                               OpenEhr::ADL::Scanner::Common::V_LOCAL_CODE.new,
+#                               OpenEhr::ADL::Scanner::Common::V_REAL.new,
+#                               OpenEhr::ADL::Scanner::Common::V_ISO8601_DURATION.new#,
+#                               #OpenEhr::ADL::Scanner::Common::START_TERM_CODE_CONSTRAINT.new
 #                               )
 #             end
@@ -1107,9 +1120,9 @@
 #               end
 #               Yaparc::Alt.new(Yaparc::Apply.new(Yaparc::Alt.new(*reserved_parsers)) do |match|
-#                                 OpenEHR::LOG.info("Reserved: #{match}")
-#                                 [OpenEHR::ADL::Scanner::CADL::RESERVED[match], OpenEHR::ADL::Scanner::CADL::RESERVED[match]]
+#                                 OpenEhr::LOG.info("Reserved: #{match}")
+#                                 [OpenEhr::ADL::Scanner::CADL::RESERVED[match], OpenEhr::ADL::Scanner::CADL::RESERVED[match]]
 #                               end,
 #                               Yaparc::Apply.new(Yaparc::Regex.new(/\A[a-z][a-zA-Z0-9_]*/)) do |match|
-#                                 OpenEHR::LOG.info("V_ATTRIBUTE_IDENTIFIER: #{match}")
+#                                 OpenEhr::LOG.info("V_ATTRIBUTE_IDENTIFIER: #{match}")
 #                                 [:V_ATTRIBUTE_IDENTIFIER, match]
 #                               end)
Index: ruby/trunk/lib/adl_parser/lib/parser.rb
===================================================================
--- ruby/trunk/lib/adl_parser/lib/parser.rb	(revision 299)
+++ ruby/trunk/lib/adl_parser/lib/parser.rb	(revision 307)
@@ -13,8 +13,11 @@
 require 'yaml'
 require 'rubygems'
-require 'adl_parser.rb'
-require 'am.rb'
-require 'rm.rb'
-$DEBUG = false
+require 'open_ehr'
+#require 'adl_parser.rb'
+#require 'am.rb'
+#require 'rm.rb'
+#require 'rm/support/assumed_types.rb'
+#require 'assumed_library_types.rb'
+$DEBUG = true
 
 
@@ -24,5 +27,5 @@
     class Parser < Racc::Parser
 
-module_eval(<<'...end parser.y/module_eval...', 'parser.y', 1208)
+module_eval(<<'...end parser.y/module_eval...', 'parser.y', 1245)
 
 def assert_at(file,line, message = "")
@@ -102,5 +105,5 @@
 def scan
   @@logger.debug("#{__FILE__}:#{__LINE__}: Entering scan at #{@filename}:#{@lineno}:")
-  scanner = OpenEHR::ADL::Scanner::ADLScanner.new(@adl_type, @filename)
+  scanner = OpenEhr::ADL::Scanner::ADLScanner.new(@adl_type, @filename)
 
   until @data.nil?  do
@@ -149,374 +152,374 @@
 
 racc_action_table = [
-   576,   483,   147,   164,   476,   594,   474,    59,   215,   472,
-   131,   470,   452,   578,   575,   464,   462,    29,   383,   341,
-   387,    67,   385,   321,   155,   157,    25,    26,   526,   114,
-   119,   216,    73,   500,   190,   121,    36,   513,   515,   463,
-   518,   519,    36,   517,   502,    30,    62,   574,   148,   155,
-   157,   434,    49,    51,   284,   112,   444,    81,    84,    87,
-   194,   160,    97,   309,   314,   238,   114,   117,   119,   121,
-   534,   526,   121,   121,   119,    73,   117,   114,   128,   129,
-   513,   515,    79,   518,   519,   277,   160,   281,   286,   288,
-   537,   163,   119,   298,    75,    49,    51,   284,   152,   153,
-    81,    84,    87,   194,   121,    97,   309,   314,   114,   114,
-   117,   119,   121,   534,   102,   119,   436,   230,   232,   494,
-   168,   498,   134,   152,   153,     9,    73,   496,   155,   157,
-   281,   286,   288,   537,   155,   157,   298,    71,   102,   338,
-   249,   322,   631,   323,   344,    11,    49,    51,   111,   248,
-   231,    81,    84,    87,   467,   117,    97,   100,   101,   155,
-   157,   140,   102,   100,   101,   160,    91,    95,   325,   326,
-   135,   160,    97,    79,   117,    81,    84,    87,   468,   117,
-    97,   100,   101,   389,   114,   140,   190,   155,   157,   138,
-    91,    95,   173,   155,   157,   121,   160,    79,   392,    81,
-    84,    87,   152,   153,    97,   100,   101,  -374,   152,   153,
-  -373,    81,   329,   330,    91,    95,   155,   157,   219,   158,
-   161,    79,   571,   151,   160,    22,   154,   156,   155,   157,
-   160,   158,   161,   152,   153,   151,   325,   326,   154,   156,
-    97,   219,   242,    23,   238,   544,   103,   573,   541,   394,
-   601,   542,   543,   160,     1,    81,    84,    87,   602,   603,
-    97,   152,   153,   263,   109,   160,   256,   152,   153,   259,
-   261,   395,    67,     4,    49,    51,   103,    79,    81,    84,
-    87,   144,    16,    97,    17,   159,   145,   102,    49,    51,
-   152,   153,   333,    36,   325,   326,   219,   159,    97,   149,
-    79,   396,   152,   153,   150,   121,   219,    81,   329,   330,
-   140,    81,    84,    87,   102,    16,    97,    17,    49,    51,
-   114,   117,   119,   121,    81,    84,    87,   128,   129,    97,
-   100,   101,   219,    81,    84,    87,   420,   140,    97,    91,
-    95,   272,   219,    81,    84,    87,    79,   416,    97,   277,
-   272,    81,    84,    87,   398,    79,    97,   100,   101,   389,
-   102,   481,   415,   329,   330,    79,    91,    95,   335,    81,
-    84,    87,   102,    79,    97,   128,   129,   212,   241,    81,
-    84,    87,   242,    71,    97,   325,   326,    35,   240,    97,
-   244,    79,    49,    51,   399,   140,   400,    81,    84,    87,
-   102,    79,    97,   100,   101,   401,   418,   402,   219,    81,
-    84,    87,    91,    95,    97,   100,   101,   403,    40,    79,
-    36,   629,   630,    71,    91,    95,   404,   219,    35,    49,
-    51,    79,    49,    51,    81,   329,   330,    81,    84,    87,
-   102,   405,    97,   100,   101,    81,    84,    87,   431,   432,
-    97,   406,    91,    95,    81,   329,   330,   492,   102,    79,
-   407,    36,   408,    71,    81,    84,    87,    79,   409,    97,
-    49,    51,    49,    51,   429,   430,   219,    81,    84,    87,
-   410,    71,    97,   100,   101,   102,    79,    81,   329,   330,
-    49,    51,    91,    95,   270,    81,    84,    87,   411,    79,
-    97,   100,   101,   102,   239,    81,   329,   330,   140,   247,
-    91,    95,   246,    81,    84,    87,   145,    79,    97,    81,
-   329,   330,    81,    84,    87,   150,   140,    97,   100,   101,
-   144,   102,   611,   612,   613,    79,   416,    91,    95,   219,
-    81,    84,    87,   149,    79,    97,   100,   101,   245,   219,
-   244,   415,   329,   330,    71,    91,    95,   219,   172,   169,
-   170,   171,    79,    49,    51,   346,   347,    35,    81,    84,
-    87,   348,   349,    97,   100,   101,    81,    84,    87,   251,
-   102,    97,    56,    91,    95,   252,    81,    84,    87,   416,
-    79,    97,    35,   253,    81,    84,    87,   264,    79,    97,
-    36,   427,   428,   140,    81,   329,   330,   265,    79,    49,
-    51,   325,   326,   356,   357,    97,    79,    81,    84,    87,
-   358,   359,    97,   100,   101,    36,   325,   326,   425,   426,
-    97,   119,    91,    95,    49,    51,   243,   284,   242,    79,
-    81,    84,    87,   194,   437,    97,   309,   314,   438,   114,
-   117,   119,   121,    81,    84,    87,   325,   326,    97,   439,
-    97,   440,   114,   117,   119,   121,   172,   169,   170,   171,
-   281,   286,   288,  -103,   366,   367,   298,   176,   423,   424,
-    81,    84,    87,   194,   441,    97,   128,   129,   111,   114,
-   117,   119,   121,   190,   124,   112,   374,   375,    81,    84,
-    87,   421,   422,    97,   128,   129,   111,   114,   117,   119,
-   121,   442,   124,    81,    84,    87,    49,    51,    97,    81,
-   329,   330,   114,   117,   119,   121,    81,    84,    87,   241,
-   445,    97,   446,   447,   448,   114,   117,   119,   121,    81,
-    84,    87,   449,   450,    97,   240,   453,   454,   114,   117,
-   119,   121,   172,   169,   170,   171,   172,   169,   170,   171,
-   328,    81,   329,   330,   172,   169,   170,   171,   172,   169,
-   170,   171,   172,   169,   170,   171,   172,   169,   170,   171,
-   172,   169,   170,   171,   455,   456,   457,   458,   460,   461,
-   140,   214,   148,   138,   213,   210,   103,   166,   478,   480,
-   266,   482,   163,   485,   486,   487,   117,   489,   146,   140,
-   139,   136,    36,   110,    69,   503,   114,   505,   117,   507,
-   119,   509,   121,   511,   512,    35,   540,    62,    58,   546,
-   547,   548,   267,   550,    57,   552,   114,   554,   117,   556,
-   119,   558,   121,   560,   561,   562,   563,   564,   565,   163,
-  -103,   569,   250,    54,   173,    34,   114,    31,   580,   581,
-   582,   121,   121,    28,   121,   583,   584,   585,   586,   587,
-   588,   268,   591,   592,   593,    24,   596,   597,   111,    21,
-   269,   604,   605,   606,   607,    79,   573,   609,   270,   271,
-   619,   620,   621,   622,    15,   624,    14,   625,    12,   627,
-   628,   319,     8,     7,   121 ]
+   575,   474,   143,   163,   468,   593,   466,   433,    29,   464,
+   129,   462,   497,   577,   229,   476,    58,   137,    67,   213,
+   381,   335,   330,   564,   152,   154,    25,    26,   529,   125,
+   127,   113,    72,   495,   189,  -373,    30,   516,   518,    36,
+   521,   523,   214,   520,   443,    36,    60,   230,   144,   152,
+   154,   431,    48,    50,   274,   110,   435,    80,    83,    86,
+   193,   157,    96,   300,   306,   115,   113,   115,   117,   119,
+   538,   529,   119,   119,   117,    72,   115,   113,   125,   127,
+   516,   518,    78,   521,   523,   317,   157,   272,   275,   276,
+   540,   162,   117,   288,   630,    48,    50,   274,   149,   150,
+    80,    83,    86,   193,   119,    96,   300,   306,   113,   113,
+   115,   117,   119,   538,   101,   117,   571,    35,   231,   513,
+   167,   574,   510,   149,   150,   511,   512,   491,   152,   154,
+   272,   275,   276,   540,   461,     9,   288,   139,   101,   332,
+   493,   133,    74,   326,   327,    48,    50,    96,   109,   482,
+    36,    80,    83,    86,   573,    11,    96,    98,   100,    48,
+    50,   139,   101,    98,   100,   157,    90,    94,    48,    50,
+   152,   154,   483,    78,    72,    80,    83,    86,   458,   119,
+    96,    98,   100,   599,   113,    70,   383,   152,   154,   134,
+    90,    94,   326,   327,    48,    50,    96,    78,   115,    80,
+    83,    86,   149,   150,    96,    98,   100,   157,   189,   152,
+   154,   250,   155,   158,    90,    94,   148,   601,   602,   151,
+   153,    78,   152,   154,   157,   155,   158,   152,   154,   148,
+   152,   154,   151,   153,   218,    80,   385,   386,   237,   456,
+    80,   385,   386,   237,   149,   150,   157,     1,   341,   248,
+   261,   172,    22,   254,   338,   379,   258,   260,   145,   157,
+   117,   149,   150,   146,   157,   115,     4,   157,   119,  -372,
+    23,    80,    83,    86,   218,   247,    96,   269,   156,   391,
+   218,   238,   570,   149,   150,   159,   218,    80,   385,   386,
+   160,   156,   218,    78,   417,   241,   149,   150,    80,    83,
+    86,   149,   150,    96,   149,   150,   102,   113,   115,   117,
+   119,    80,    83,    86,   239,   218,    96,    80,    83,    86,
+   392,   218,    96,    80,    83,    86,   393,   218,    96,    80,
+    83,    86,   394,    78,    96,   171,   168,   169,   170,    78,
+   218,   102,   395,   326,   327,    78,   396,    96,    48,    50,
+   101,    78,    80,    83,    86,   125,   127,    96,    80,    83,
+    86,   397,   108,    96,    80,    83,    86,   398,   218,    96,
+    67,   628,   629,   139,    78,   218,   498,    80,    83,    86,
+    78,   399,    96,    48,    50,   400,    78,    80,    83,    86,
+   401,    36,    96,    98,   100,   489,   326,   327,   101,    78,
+    96,   402,    90,    94,   267,    80,    83,    86,   403,    78,
+    96,   404,    80,    83,    86,   268,   101,    96,    16,    41,
+    17,    70,   428,   429,    80,   385,   386,    78,   269,    35,
+    48,    50,   426,   427,    78,    80,    83,    86,   405,   139,
+    96,    98,   100,   101,   326,   327,   407,    16,    96,    17,
+    90,    94,   408,    80,    83,    86,   409,    78,    96,    98,
+   100,   101,    36,   321,   211,   322,   139,   312,    90,    94,
+   246,    48,    50,   245,    35,    78,   414,    80,   385,   386,
+    80,    83,    86,   146,   139,    96,    98,   100,   101,   343,
+   344,   413,   385,   386,   160,    90,    94,   244,    80,    83,
+    86,   251,    78,    96,    98,   100,   101,    36,   383,    55,
+   472,   139,   252,    90,    94,   263,    48,    50,   264,    35,
+    78,   171,   168,   169,   170,    80,    83,    86,   265,    70,
+    96,    98,   100,   101,   171,   168,   169,   170,    48,    50,
+    90,    94,   119,    80,    83,    86,   243,    78,    96,    98,
+   100,   101,    36,   326,   327,   242,   139,    96,    90,    94,
+   241,    48,    50,   424,   425,    78,   171,   168,   169,   170,
+    80,    83,    86,   436,    70,    96,    98,   100,   437,   101,
+    80,   385,   386,    48,    50,    90,    94,   438,    80,    83,
+    86,   414,    78,    96,    98,   100,   439,   101,   414,   610,
+   611,   612,    70,    90,    94,   218,   413,   385,   386,   440,
+    78,    48,    50,    80,   385,   386,    80,    83,    86,   441,
+    70,    96,    98,   100,   171,   168,   169,   170,   240,    48,
+    50,    90,    94,   444,    80,    83,    86,   445,    78,    96,
+    98,   100,    80,    83,    86,   351,   352,    96,   446,    90,
+    94,   447,   325,   448,   326,   327,    78,   274,    96,   449,
+    80,    83,    86,   193,    78,    96,   300,   306,   450,   113,
+   115,   117,   119,    80,    83,    86,   353,   354,    96,    80,
+   385,   386,   113,   115,   117,   119,   389,    80,   385,   386,
+   272,   275,   276,  -102,   355,   356,   288,   175,   422,   423,
+    80,    83,    86,   193,   451,    96,   125,   127,   109,   113,
+   115,   117,   119,   189,   122,   110,   363,   364,    80,    83,
+    86,   420,   421,    96,   125,   127,   109,   113,   115,   117,
+   119,   452,   122,    80,    83,    86,   418,   419,    96,    80,
+   385,   386,   113,   115,   117,   119,    80,    83,    86,   377,
+   378,    96,   317,   312,   453,   113,   115,   117,   119,    80,
+    83,    86,   454,   455,    96,   239,   145,   159,   113,   115,
+   117,   119,   171,   168,   169,   170,   171,   168,   169,   170,
+   171,   168,   169,   170,   171,   168,   169,   170,   216,   139,
+   144,   137,   212,   208,   471,   266,   473,   102,   165,   478,
+   480,   481,   162,   484,   485,   486,   147,   139,   138,   135,
+    36,   131,    68,   500,   113,   502,   115,   504,   117,   506,
+   119,   117,   509,    35,   514,   515,    60,   543,    57,   545,
+   546,    56,   548,   113,   550,   115,   552,   117,   554,   119,
+   267,   557,   558,   559,   560,   561,   562,   119,   119,   119,
+   119,   563,   249,   162,  -102,   568,   115,    53,    34,   172,
+   268,    31,   579,    28,   581,   582,   583,   584,   585,   586,
+   587,   113,   590,   591,   592,    24,   595,   596,   269,    21,
+   109,   603,   604,   605,   606,    78,   570,   608,   270,   311,
+   618,   619,   620,   621,    15,   623,    14,   624,    12,   626,
+   627,   320,     8,     7,   580 ]
 
 racc_action_check = [
-   531,   410,    86,    91,   405,   570,   404,    43,   147,   403,
-    63,   402,   375,   531,   529,   398,   395,    21,   265,   250,
-   267,    52,   266,   231,   222,   222,    18,    18,   531,   250,
-   265,   147,   531,   430,   267,   266,    43,   531,   531,   395,
-   531,   531,    52,   462,   432,    21,    63,   529,    86,   320,
-   320,   357,   531,   531,   531,   410,   367,   531,   531,   531,
-   531,   222,   531,   531,   531,   320,   531,   531,   531,   531,
-   531,   462,   375,   405,   404,   462,   403,   402,   398,   398,
-   462,   462,    91,   462,   462,   462,   320,   531,   531,   531,
-   531,   570,   430,   531,    54,   462,   462,   462,   222,   222,
-   462,   462,   462,   462,   432,   462,   462,   462,   357,   462,
-   462,   462,   462,   462,    54,   367,   359,   163,   166,   424,
-    95,   428,    69,   320,   320,     4,    54,   426,   227,   227,
-   462,   462,   462,   462,   229,   229,   462,    54,   166,   248,
-   188,   240,   624,   240,   252,     4,    54,    54,   248,   187,
-   163,    54,    54,    54,   400,   252,    54,    54,    54,   224,
-   224,   166,   624,    95,    95,   227,    54,    54,   424,   424,
-    69,   229,   424,    54,   359,   166,   166,   166,   401,   428,
-   166,   166,   166,   268,   426,   624,   269,   218,   218,    71,
-   166,   166,    98,   226,   226,   264,   224,   166,   271,   624,
-   624,   624,   227,   227,   624,   624,   624,    71,   229,   229,
-    98,   400,   400,   400,   624,   624,    88,    88,   157,    88,
-    88,   624,   519,    88,   218,    14,    88,    88,   174,   174,
-   226,   174,   174,   224,   224,   174,   401,   401,   174,   174,
-   401,   152,   522,    14,   174,   480,   110,   522,   480,   272,
-   575,   480,   480,    88,     0,   157,   157,   157,   579,   579,
-   157,   218,   218,   194,    60,   174,   194,   226,   226,   194,
-   194,   274,    60,     0,   519,   519,    58,   157,   152,   152,
-   152,    84,    11,   152,    11,    88,    84,   171,   110,   110,
-    88,    88,   244,    60,   244,   244,   153,   174,   244,    87,
-   152,   275,   174,   174,    87,   480,   161,   575,   575,   575,
-   171,   194,   194,   194,   168,    26,   194,    26,    58,    58,
-   194,   194,   194,   194,   171,   171,   171,   243,   243,   171,
-   171,   171,   160,   153,   153,   153,   349,   168,   153,   171,
-   171,   278,   159,   161,   161,   161,   171,   321,   161,   214,
-   214,   168,   168,   168,   279,   153,   168,   168,   168,   408,
-   626,   408,   321,   321,   321,   161,   168,   168,   246,   160,
-   160,   160,   170,   168,   160,   246,   246,   136,   282,   159,
-   159,   159,   283,   626,   159,   349,   349,   136,   284,   349,
-   287,   160,   626,   626,   289,   170,   290,   626,   626,   626,
-   619,   159,   626,   626,   626,   293,   347,   296,   158,   170,
-   170,   170,   626,   626,   170,   170,   170,   300,    28,   626,
-   136,   622,   622,   619,   170,   170,   303,   151,    28,   136,
-   136,   170,   619,   619,   270,   270,   270,   619,   619,   619,
-    82,   306,   619,   619,   619,   158,   158,   158,   355,   355,
-   158,   309,   619,   619,   347,   347,   347,   422,   614,   619,
-   310,    28,   312,    82,   151,   151,   151,   158,   314,   151,
-    28,    28,    82,    82,   354,   354,   154,    82,    82,    82,
-   315,   614,    82,    82,    82,   169,   151,   574,   574,   574,
-   614,   614,    82,    82,   317,   614,   614,   614,   319,    82,
-   614,   614,   614,   102,   175,   422,   422,   422,   169,   186,
-   614,   614,   185,   154,   154,   154,   325,   614,   154,   418,
-   418,   418,   169,   169,   169,   326,   102,   169,   169,   169,
-   329,   609,   606,   606,   606,   154,   564,   169,   169,   219,
-   102,   102,   102,   330,   169,   102,   102,   102,   184,   156,
-   182,   564,   564,   564,   609,   102,   102,   155,   175,   175,
-   175,   175,   102,   609,   609,   254,   254,   515,   609,   609,
-   609,   255,   255,   609,   609,   609,   219,   219,   219,   191,
-   172,   219,    34,   609,   609,   192,   156,   156,   156,   486,
-   609,   156,    34,   193,   155,   155,   155,   195,   219,   155,
-   515,   353,   353,   172,   486,   486,   486,   196,   156,   515,
-   515,   420,   420,   257,   257,   420,   155,   172,   172,   172,
-   258,   258,   172,   172,   172,    34,   494,   494,   352,   352,
-   494,   251,   172,   172,    34,    34,   181,   215,   179,   172,
-   215,   215,   215,   215,   360,   215,   215,   215,   361,   215,
-   215,   215,   215,   263,   263,   263,   241,   241,   263,   362,
-   241,   363,   263,   263,   263,   263,    96,    96,    96,    96,
-   215,   215,   215,   103,   260,   260,   215,   103,   351,   351,
-   103,   103,   103,   103,   364,   103,   103,   103,   103,   103,
-   103,   103,   103,   103,   103,    62,   262,   262,    62,    62,
-    62,   350,   350,    62,    62,    62,    62,    62,    62,    62,
-    62,   365,    62,   256,   256,   256,   518,   518,   256,   492,
-   492,   492,   256,   256,   256,   256,   261,   261,   261,   178,
-   368,   261,   369,   370,   371,   261,   261,   261,   261,   259,
-   259,   259,   372,   373,   259,   176,   376,   377,   259,   259,
-   259,   259,   237,   237,   237,   237,   234,   234,   234,   234,
-   242,   242,   242,   242,   236,   236,   236,   236,   617,   617,
-   617,   617,   235,   235,   235,   235,   233,   233,   233,   233,
-   632,   632,   632,   632,   378,   379,   380,   381,   393,   394,
-   148,   146,   141,   140,   139,   116,   108,    92,   406,   407,
-   199,   409,    89,   413,   415,   417,   249,   419,    85,    79,
-    73,    70,    67,    61,    53,   433,   434,   435,   436,   443,
-   444,   451,   452,   460,   461,    48,   463,    47,    42,   488,
-   490,   491,   202,   493,    36,   495,   496,   497,   498,   499,
-   500,   501,   502,   504,   506,   508,   510,   511,   512,   514,
-    35,   517,   189,    33,   520,    27,   247,    24,   537,   538,
-   540,   541,   542,    20,   544,   549,   551,   553,   555,   557,
-   559,   204,   565,   566,   568,    16,   572,   573,   245,    13,
-   205,   581,   589,   590,   591,   595,   598,   604,   207,   213,
-   610,   611,   612,   613,     8,   616,     6,   618,     5,   620,
-   621,   216,     3,     2,   543 ]
+   535,   402,    82,    90,   398,   569,   397,   354,    21,   396,
+    61,   395,   427,   535,   162,   403,    42,    70,    49,   143,
+   264,   247,   243,   515,   217,   217,    18,    18,   535,   243,
+   243,   247,   535,   425,   264,    70,    21,   535,   535,    49,
+   535,   535,   143,   482,   364,    42,    61,   162,    82,   228,
+   228,   352,   535,   535,   535,   402,   356,   535,   535,   535,
+   535,   217,   535,   535,   535,   354,   535,   535,   535,   535,
+   535,   482,   427,   398,   397,   482,   396,   395,   403,   403,
+   482,   482,    90,   482,   482,   482,   228,   535,   535,   535,
+   535,   569,   425,   535,   623,   482,   482,   482,   217,   217,
+   482,   482,   482,   482,   364,   482,   482,   482,   352,   482,
+   482,   482,   482,   482,   623,   356,   523,   518,   165,   471,
+    94,   531,   471,   228,   228,   471,   471,   421,   225,   225,
+   482,   482,   482,   482,   394,     4,   482,   623,   165,   245,
+   423,    68,    53,   417,   417,   521,   521,   417,   245,   408,
+   518,   623,   623,   623,   531,     4,   623,   623,   623,   518,
+   518,   165,    53,    94,    94,   225,   623,   623,   523,   523,
+   223,   223,   408,   623,    53,   165,   165,   165,   392,   471,
+   165,   165,   165,   574,   421,    53,   265,   221,   221,    68,
+   165,   165,   394,   394,    53,    53,   394,   165,   423,    53,
+    53,    53,   225,   225,    53,    53,    53,   223,   266,    85,
+    85,   188,    85,    85,    53,    53,    85,   578,   578,    85,
+    85,    53,   173,   173,   221,   173,   173,   319,   319,   173,
+   226,   226,   173,   173,   156,   392,   392,   392,   173,   378,
+   574,   574,   574,   319,   223,   223,    85,     0,   252,   186,
+   193,    97,    14,   193,   249,   263,   193,   193,    83,   173,
+   252,   221,   221,    83,   319,   249,     0,   226,   263,    97,
+    14,   156,   156,   156,   157,   185,   156,   522,    85,   270,
+   158,   174,   522,    85,    85,    86,   155,   378,   378,   378,
+    86,   173,   154,   156,   344,   273,   173,   173,   193,   193,
+   193,   319,   319,   193,   226,   226,    57,   193,   193,   193,
+   193,   157,   157,   157,   274,   153,   157,   158,   158,   158,
+   277,   152,   158,   155,   155,   155,   278,   218,   155,   154,
+   154,   154,   280,   157,   154,   174,   174,   174,   174,   158,
+   151,   131,   283,   344,   344,   155,   286,   344,    57,    57,
+   167,   154,   153,   153,   153,   240,   240,   153,   152,   152,
+   152,   290,    59,   152,   218,   218,   218,   293,   150,   218,
+    59,   621,   621,   167,   153,   149,   429,   151,   151,   151,
+   152,   296,   151,   131,   131,   298,   218,   167,   167,   167,
+   300,    59,   167,   167,   167,   419,   489,   489,    81,   151,
+   489,   301,   167,   167,   303,   150,   150,   150,   305,   167,
+   150,   306,   149,   149,   149,   308,   101,   149,    26,    28,
+    26,    81,   350,   350,   429,   429,   429,   150,   309,    28,
+    81,    81,   349,   349,   149,    81,    81,    81,   311,   101,
+    81,    81,    81,   168,   419,   419,   312,    11,   419,    11,
+    81,    81,   314,   101,   101,   101,   315,    81,   101,   101,
+   101,   169,    28,   239,   135,   239,   168,   318,   101,   101,
+   184,    28,    28,   183,   135,   101,   320,   267,   267,   267,
+   168,   168,   168,   326,   169,   168,   168,   168,   170,   253,
+   253,   320,   320,   320,   327,   168,   168,   182,   169,   169,
+   169,   190,   168,   169,   169,   169,   625,   135,   400,    34,
+   400,   170,   191,   169,   169,   195,   135,   135,   198,    34,
+   169,    95,    95,    95,    95,   170,   170,   170,   200,   625,
+   170,   170,   170,   171,   236,   236,   236,   236,   625,   625,
+   170,   170,   251,   625,   625,   625,   181,   170,   625,   625,
+   625,   608,    34,   268,   268,   180,   171,   268,   625,   625,
+   178,    34,    34,   348,   348,   625,   233,   233,   233,   233,
+   171,   171,   171,   357,   608,   171,   171,   171,   358,   613,
+   456,   456,   456,   608,   608,   171,   171,   359,   608,   608,
+   608,   563,   171,   608,   608,   608,   360,   618,   485,   604,
+   604,   604,   613,   608,   608,   148,   563,   563,   563,   361,
+   608,   613,   613,   485,   485,   485,   613,   613,   613,   362,
+   618,   613,   613,   613,   235,   235,   235,   235,   177,   618,
+   618,   613,   613,   365,   618,   618,   618,   366,   613,   618,
+   618,   618,   148,   148,   148,   255,   255,   148,   367,   618,
+   618,   368,   241,   369,   241,   241,   618,   213,   241,   370,
+   213,   213,   213,   213,   148,   213,   213,   213,   371,   213,
+   213,   213,   213,   261,   261,   261,   256,   256,   261,   498,
+   498,   498,   261,   261,   261,   261,   269,   269,   269,   269,
+   213,   213,   213,   102,   257,   257,   213,   102,   347,   347,
+   102,   102,   102,   102,   372,   102,   102,   102,   102,   102,
+   102,   102,   102,   102,   102,    60,   259,   259,    60,    60,
+    60,   346,   346,    60,    60,    60,    60,    60,    60,    60,
+    60,   373,    60,   254,   254,   254,   345,   345,   254,   573,
+   573,   573,   254,   254,   254,   254,   260,   260,   260,   262,
+   262,   260,   216,   216,   374,   260,   260,   260,   260,   258,
+   258,   258,   375,   376,   258,   175,   385,   386,   258,   258,
+   258,   258,   616,   616,   616,   616,   234,   234,   234,   234,
+   232,   232,   232,   232,   631,   631,   631,   631,   147,   144,
+   140,   139,   138,   112,   399,   201,   401,   106,    91,   404,
+   406,   407,    88,   411,   413,   416,    84,    78,    72,    69,
+    67,    63,    52,   430,   431,   432,   433,   434,   435,   442,
+   443,   248,   457,    47,   480,   481,    46,   483,    40,   487,
+   488,    36,   490,   491,   492,   493,   494,   495,   496,   497,
+   203,   499,   501,   503,   505,   507,   508,   510,   511,   512,
+   513,   514,   187,   517,    35,   520,   246,    33,    27,   524,
+   205,    24,   540,    20,   543,   547,   549,   551,   553,   555,
+   556,   244,   564,   565,   567,    16,   570,   572,   206,    13,
+   242,   580,   588,   589,   590,   594,   598,   603,   212,   214,
+   609,   610,   611,   612,     8,   615,     6,   617,     5,   619,
+   620,   230,     3,     2,   541 ]
 
 racc_action_pointer = [
-   253,   nil,   884,   902,   124,   880,   869,   nil,   894,   nil,
-   nil,   258,   nil,   851,   224,   nil,   867,   nil,     4,   nil,
-   833,    16,   nil,   nil,   832,   nil,   291,   824,   417,   nil,
-   nil,   nil,   nil,   821,   581,   799,   833,   nil,   nil,   nil,
-   nil,   nil,   820,    -8,   nil,   nil,   nil,   776,   814,   nil,
-   nil,   nil,    -2,   766,    93,   nil,   nil,   nil,   265,   nil,
-   249,   805,   640,    -5,   nil,   nil,   nil,   768,   nil,   121,
-   761,   160,   nil,   776,   nil,   nil,   nil,   nil,   nil,   765,
-   nil,   nil,   419,   nil,   223,   774,   -32,   241,   210,   715,
-   nil,     2,   750,   nil,   nil,    99,   590,   nil,   163,   nil,
-   nil,   nil,   482,   622,   nil,   nil,   nil,   nil,   785,   nil,
-   235,   nil,   nil,   nil,   nil,   nil,   743,   nil,   nil,   nil,
+   246,   nil,   884,   902,   134,   880,   869,   nil,   894,   nil,
+   nil,   423,   nil,   851,   251,   nil,   867,   nil,     4,   nil,
+   833,     7,   nil,   nil,   836,   nil,   394,   827,   418,   nil,
+   nil,   nil,   nil,   825,   508,   803,   830,   nil,   nil,   nil,
+   820,   nil,     1,   nil,   nil,   nil,   775,   812,   nil,    -5,
+   nil,   nil,   764,   141,   nil,   nil,   nil,   295,   nil,   347,
+   660,    -5,   nil,   803,   nil,   nil,   nil,   766,   140,   759,
+   -12,   nil,   774,   nil,   nil,   nil,   nil,   nil,   763,   nil,
+   nil,   377,   -32,   200,   772,   203,   227,   nil,   715,   nil,
+     2,   751,   nil,   nil,    99,   445,   nil,   222,   nil,   nil,
+   nil,   395,   642,   nil,   nil,   nil,   786,   nil,   nil,   nil,
+   nil,   nil,   741,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   nil,   376,   nil,   nil,   759,
-   764,   712,   nil,   nil,   nil,   nil,   779,    -4,   746,   nil,
-   nil,   406,   220,   275,   455,   536,   528,   197,   387,   321,
-   311,   285,   nil,   116,   nil,   nil,   117,   nil,   293,   464,
-   351,   266,   559,   nil,   222,   482,   689,   nil,   673,   582,
-   nil,   580,   494,   nil,   492,   456,   453,    93,    84,   796,
-   nil,   523,   529,   578,   253,   541,   551,   nil,   nil,   744,
-   nil,   nil,   776,   nil,   815,   824,   nil,   832,   nil,   nil,
-   nil,   nil,   nil,   853,   306,   582,   865,   nil,   181,   518,
-   nil,   nil,    18,   nil,   153,   nil,   187,   122,   nil,   128,
-   nil,    11,   nil,   700,   680,   696,   688,   676,   nil,   nil,
-    86,   597,   703,   263,   235,   812,   311,   789,    82,   738,
-   -38,   562,    87,   nil,   504,   510,   655,   552,   559,   681,
-   613,   668,   635,   595,   125,   -39,   -35,   -37,   128,   115,
-   376,   161,   167,   nil,   237,   287,   nil,   nil,   297,   331,
-   nil,   nil,   322,   326,   332,   nil,   nil,   334,   nil,   380,
-   373,   nil,   nil,   382,   nil,   nil,   384,   nil,   nil,   nil,
-   394,   nil,   nil,   403,   nil,   nil,   418,   nil,   nil,   395,
-   380,   nil,   406,   nil,   412,   457,   nil,   438,   nil,   461,
-    43,   304,   nil,   nil,   nil,   453,   462,   nil,   nil,   472,
-   485,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   nil,   nil,   396,   nil,   326,
-   640,   617,   567,   540,   413,   387,   nil,    41,   nil,   106,
-   583,   587,   598,   600,   623,   650,   nil,    46,   669,   671,
-   672,   673,   681,   682,   nil,     2,   685,   686,   723,   724,
-   725,   726,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   705,   755,     4,   nil,   nil,    14,   nil,
-   153,   177,    10,     8,     5,     3,   733,   738,   304,   737,
-     0,   nil,   nil,   789,   nil,   742,   nil,   744,   461,   746,
-   552,   nil,   447,   nil,   109,   nil,   117,   nil,   111,   nil,
-    23,   nil,    34,   754,   749,   756,   750,   nil,   nil,   nil,
-   nil,   nil,   nil,   758,   751,   nil,   nil,   nil,   nil,   nil,
-   nil,   760,   752,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   789,   812,    42,   790,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   330,   nil,   nil,   nil,   463,   nil,   nil,   757,   762,
+   710,   nil,   nil,     7,   745,   nil,   nil,   776,   584,   354,
+   347,   319,   300,   294,   271,   265,   213,   253,   259,   nil,
+   nil,   nil,    13,   nil,   nil,   117,   nil,   329,   422,   440,
+   467,   512,   nil,   216,   259,   709,   nil,   572,   504,   nil,
+   499,   490,   441,   417,   414,   219,   193,   796,   196,   nil,
+   445,   456,   nil,   240,   nil,   459,   nil,   nil,   462,   nil,
+   472,   739,   nil,   784,   nil,   804,   822,   nil,   nil,   nil,
+   nil,   nil,   852,   602,   853,   nil,   709,    18,   306,   nil,
+   nil,   181,   nil,   164,   nil,   122,   224,   nil,    43,   nil,
+   889,   nil,   704,   490,   700,   548,   458,   nil,   nil,   408,
+   291,   595,   814,   -35,   804,    82,   788,   -36,   752,   197,
+   nil,   472,   191,   428,   675,   584,   615,   633,   701,   655,
+   688,   615,   688,   198,   -37,   131,   137,   419,   494,   629,
+   242,   nil,   nil,   239,   258,   nil,   nil,   297,   312,   nil,
+   309,   nil,   nil,   319,   nil,   nil,   323,   nil,   nil,   nil,
+   338,   nil,   nil,   344,   nil,   nil,   301,   nil,   329,   nil,
+   334,   378,   nil,   348,   nil,   385,   355,   nil,   359,   372,
+   nil,   401,   364,   nil,   418,   442,   nil,   nil,   423,   221,
+   433,   nil,   nil,   nil,   nil,   nil,   420,   431,   nil,   nil,
    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   235,   nil,   nil,   nil,   nil,   nil,   546,   nil,   768,   nil,
-   769,   770,   661,   772,   567,   774,   769,   776,   770,   778,
-   771,   780,   772,   nil,   782,   nil,   783,   nil,   784,   nil,
-   785,   835,   790,   nil,   762,   556,   nil,   837,   663,   221,
-   825,   nil,   186,   nil,   nil,   nil,   nil,   nil,   nil,    -9,
-   nil,    -1,   nil,   nil,   nil,   nil,   nil,   765,   825,   nil,
-   823,   791,   792,   834,   794,   nil,   nil,   nil,   nil,   804,
-   nil,   805,   nil,   806,   nil,   807,   nil,   808,   nil,   809,
-   nil,   nil,   nil,   nil,   493,   810,   859,   nil,   834,   nil,
-     4,   nil,   847,   806,   429,   249,   nil,   nil,   nil,   166,
-   nil,   869,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   868,
-   860,   826,   nil,   nil,   nil,   805,   nil,   nil,   825,   nil,
-   nil,   nil,   nil,   nil,   842,   nil,   448,   nil,   nil,   510,
-   844,   868,   869,   870,   437,   nil,   848,   692,   883,   379,
-   813,   814,   337,   nil,   141,   nil,   339,   nil,   nil,   nil,
-   nil,   nil,   704 ]
+   nil,   nil,   nil,   nil,   284,   675,   660,   637,   502,   371,
+   361,   nil,    41,   nil,    -3,   nil,    46,   512,   517,   526,
+   535,   548,   558,   nil,    34,   572,   576,   587,   590,   592,
+   598,   607,   643,   670,   693,   701,   702,   nil,   229,   nil,
+   nil,   nil,   nil,   nil,   nil,   708,   709,   nil,   nil,   nil,
+   nil,   nil,   177,   nil,   133,    10,     8,     5,     3,   733,
+   453,   731,     0,    14,   735,   nil,   717,   767,   137,   nil,
+   nil,   789,   nil,   742,   nil,   nil,   744,    84,   nil,   385,
+   nil,   117,   nil,   130,   nil,    23,   nil,     2,   nil,   366,
+   752,   747,   754,   748,   756,   749,   nil,   nil,   nil,   nil,
+   nil,   nil,   758,   750,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   522,   761,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   109,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   790,   813,    42,   791,   nil,   555,   nil,   768,   769,   337,
+   771,   766,   773,   767,   775,   768,   777,   769,   621,   780,
+   nil,   781,   nil,   782,   nil,   783,   nil,   784,   785,   nil,
+   777,   778,   779,   780,   839,   -35,   nil,   766,   106,   nil,
+   841,    92,   221,   115,   830,   nil,   nil,   nil,   nil,   nil,
+   nil,    98,   nil,   nil,   nil,    -1,   nil,   nil,   nil,   nil,
+   769,   870,   nil,   827,   nil,   nil,   nil,   804,   nil,   805,
+   nil,   806,   nil,   807,   nil,   808,   809,   nil,   nil,   nil,
+   nil,   nil,   nil,   548,   810,   859,   nil,   834,   nil,     4,
+   805,   nil,   848,   681,   182,   nil,   nil,   nil,   125,   nil,
+   869,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   859,   869,
+   826,   nil,   nil,   nil,   805,   nil,   nil,   nil,   825,   nil,
+   nil,   nil,   nil,   842,   515,   nil,   nil,   nil,   530,   844,
+   868,   869,   870,   558,   nil,   848,   696,   883,   576,   813,
+   814,   287,   nil,    93,   nil,   485,   nil,   nil,   nil,   nil,
+   nil,   708 ]
 
 racc_action_default = [
-  -376,    -2,  -376,  -376,    -6,  -376,   -13,    -4,  -376,    -5,
-    -7,  -376,    -1,  -376,  -376,   633,  -376,   -12,  -376,    -9,
-   -18,  -376,   -15,   -14,  -376,    -8,  -376,   -21,  -376,   -17,
-   -16,   -11,   -10,  -376,  -376,  -112,   -94,   -89,   -19,   -90,
-   -20,  -108,  -376,  -376,   -98,   -99,  -100,  -376,  -376,  -146,
-   -87,  -147,   -88,   -82,  -376,   -22,   -23,   -95,  -376,  -110,
-  -376,  -376,  -376,  -376,  -104,  -109,  -101,  -376,   -91,  -376,
-  -376,  -289,  -281,  -376,  -282,   -25,   -24,  -248,   -26,  -284,
-  -253,  -152,   -27,  -254,  -376,  -376,  -376,  -376,  -376,  -305,
-  -273,  -376,  -376,  -283,  -274,  -376,  -251,  -167,   -31,  -286,
-  -271,  -272,  -376,  -112,   -96,   -93,  -113,   -97,  -376,  -111,
-  -376,  -187,  -148,  -122,  -191,  -123,  -376,  -204,  -124,  -217,
-  -125,  -230,  -126,  -127,  -247,  -128,  -129,  -130,  -182,  -183,
-  -121,  -102,  -105,   -92,   -84,   -83,  -376,    -3,  -288,  -376,
-  -289,  -285,  -249,  -373,  -153,  -168,  -376,  -376,  -376,  -154,
-  -169,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,
-  -376,  -376,   -30,  -376,  -256,  -255,  -376,  -259,  -376,  -376,
-  -376,  -376,  -376,   -32,  -376,  -376,  -148,  -144,  -133,  -122,
-  -145,  -134,  -123,  -116,  -135,  -124,  -136,  -125,  -137,  -126,
-  -243,  -138,  -127,  -376,  -376,  -139,  -128,  -117,  -140,  -129,
-  -118,  -141,  -119,  -142,  -131,  -120,  -143,  -132,  -114,  -106,
-  -107,   -85,   -86,  -376,  -376,  -376,  -376,  -287,  -263,  -376,
-  -278,  -279,  -264,  -275,  -265,  -276,  -261,  -260,  -277,  -262,
-  -307,  -376,  -252,  -250,  -267,  -268,  -269,  -266,  -280,  -270,
-  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,
-  -376,  -376,  -376,  -115,  -376,  -376,  -376,  -376,  -376,  -376,
-  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,
-  -376,  -376,  -290,   -63,  -376,  -376,   -33,   -62,   -34,  -357,
-  -336,  -322,  -317,  -310,  -347,  -343,  -328,  -316,  -334,  -376,
-  -313,   -54,  -323,  -319,   -55,  -329,  -325,   -56,  -375,  -335,
-  -331,   -57,  -342,  -337,  -312,   -58,  -344,  -318,   -59,  -353,
-  -340,  -324,  -348,   -60,  -354,  -350,  -330,  -311,   -61,  -376,
-  -376,  -376,  -149,  -151,  -171,  -376,  -376,  -155,  -157,  -376,
-  -376,  -185,  -170,  -172,  -189,  -186,  -184,  -193,  -190,  -188,
-  -206,  -194,  -192,  -219,  -207,  -205,  -166,  -376,  -181,  -376,
-  -376,  -376,  -376,  -376,  -376,  -376,  -203,  -376,  -216,  -376,
-  -376,  -376,  -376,  -376,  -376,  -376,  -229,  -376,  -376,  -376,
-  -376,  -376,  -376,  -376,  -242,  -376,  -376,  -376,  -376,  -376,
-  -376,  -376,  -232,  -220,  -218,  -233,  -231,  -246,  -244,  -150,
-  -245,  -156,   -28,   -68,  -376,  -376,   -29,   -64,  -376,  -257,
-  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,
-  -376,  -258,  -303,  -376,  -308,  -152,  -304,  -376,  -376,  -376,
-  -376,  -164,  -376,  -179,  -376,  -201,  -376,  -214,  -376,  -227,
-  -376,  -240,  -376,  -376,  -376,  -376,  -376,  -163,  -178,  -200,
-  -213,  -226,  -239,  -376,  -376,  -165,  -180,  -202,  -215,  -228,
-  -241,  -376,  -376,  -162,  -177,  -199,  -212,  -225,  -238,   -69,
-  -376,  -376,  -376,  -376,  -359,  -358,  -314,  -315,  -321,  -320,
-  -327,  -326,  -333,  -332,  -339,  -338,  -346,  -345,  -355,  -341,
-  -376,  -349,  -356,  -352,  -351,  -306,  -376,  -158,  -376,  -173,
-  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,
-  -376,  -376,  -376,  -195,  -376,  -208,  -376,  -221,  -376,  -234,
-  -376,  -376,  -376,   -43,  -305,  -376,   -53,   -44,  -376,  -376,
-   -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,
-  -197,  -210,  -223,  -236,  -376,  -292,  -376,   -49,  -376,   -67,
-  -305,   -52,   -50,  -376,  -376,  -376,   -44,   -71,   -65,  -376,
-  -370,  -376,   -66,  -161,  -176,  -198,  -211,  -224,  -237,  -376,
-  -295,  -376,  -291,   -45,   -47,  -376,   -51,  -365,  -376,  -364,
-  -361,  -362,  -368,  -371,   -73,  -294,  -376,  -293,   -46,  -376,
-   -75,  -296,  -297,  -298,   -74,   -77,  -376,   -80,  -376,  -376,
-  -376,  -376,  -376,   -78,  -376,   -48,   -76,  -299,  -300,  -301,
-  -302,   -81,   -79 ]
+  -375,    -2,  -375,  -375,    -6,  -375,   -13,    -4,  -375,    -5,
+    -7,  -375,    -1,  -375,  -375,   632,  -375,   -12,  -375,    -9,
+   -18,  -375,   -15,   -14,  -375,    -8,  -375,   -21,  -375,   -17,
+   -16,   -11,   -10,  -375,  -375,  -111,   -93,   -89,   -19,  -107,
+  -375,   -20,  -375,   -97,   -98,   -99,  -375,  -375,  -145,   -87,
+  -146,   -88,   -82,  -375,   -22,   -23,   -94,  -375,  -109,  -375,
+  -375,  -375,  -103,  -375,  -108,  -100,   -90,  -375,  -375,  -375,
+  -288,  -281,  -375,  -247,   -25,   -24,  -252,   -26,  -283,  -253,
+  -151,   -27,  -375,  -375,  -375,  -375,  -375,  -272,  -304,  -273,
+  -375,  -375,  -285,  -282,  -375,  -250,  -166,   -31,  -270,  -280,
+  -271,  -375,  -111,   -92,  -112,   -96,  -375,   -95,  -110,  -186,
+  -147,  -122,  -375,  -190,  -123,  -203,  -124,  -216,  -125,  -229,
+  -126,  -127,  -246,  -128,  -129,  -181,  -120,  -182,  -121,  -101,
+  -104,  -375,   -91,   -84,   -83,  -375,    -3,  -287,  -375,  -288,
+  -284,  -248,  -372,  -375,  -375,  -152,  -167,  -375,  -375,  -375,
+  -375,  -375,  -375,  -375,  -375,  -375,  -375,  -375,  -375,  -153,
+  -168,   -30,  -375,  -255,  -254,  -375,  -258,  -375,  -375,  -375,
+  -375,  -375,   -32,  -375,  -375,  -147,  -144,  -133,  -122,  -115,
+  -134,  -123,  -135,  -124,  -136,  -125,  -137,  -126,  -375,  -242,
+  -138,  -127,  -116,  -375,  -139,  -128,  -117,  -140,  -118,  -141,
+  -130,  -119,  -142,  -131,  -143,  -132,  -121,  -113,  -106,  -105,
+   -85,   -86,  -375,  -375,  -375,  -286,  -375,  -262,  -375,  -277,
+  -278,  -263,  -274,  -264,  -275,  -260,  -259,  -276,  -261,  -306,
+  -375,  -251,  -249,  -266,  -267,  -268,  -265,  -279,  -269,  -375,
+  -375,  -375,  -375,  -375,  -375,  -375,  -375,  -375,  -375,  -375,
+  -114,  -375,  -375,  -375,  -375,  -375,  -375,  -375,  -375,  -375,
+  -375,  -375,  -375,  -375,  -375,  -375,  -375,  -375,  -375,  -375,
+  -375,  -342,  -321,  -315,  -346,  -327,  -333,  -312,  -375,  -322,
+  -318,   -54,  -328,  -324,   -55,  -334,  -330,   -56,  -374,  -341,
+  -336,  -311,   -57,  -343,  -317,   -58,  -339,  -323,  -347,   -59,
+  -352,  -349,  -329,  -310,   -60,  -356,  -353,  -335,  -316,  -309,
+   -61,  -375,  -289,   -63,  -375,  -375,   -33,   -62,   -34,  -375,
+  -375,  -148,  -150,  -184,  -169,  -171,  -375,  -375,  -188,  -183,
+  -185,  -192,  -189,  -187,  -205,  -193,  -191,  -218,  -206,  -204,
+  -231,  -219,  -217,  -180,  -375,  -375,  -375,  -375,  -375,  -375,
+  -375,  -202,  -375,  -215,  -375,  -228,  -375,  -375,  -375,  -375,
+  -375,  -375,  -375,  -241,  -375,  -375,  -375,  -375,  -375,  -375,
+  -375,  -375,  -375,  -375,  -375,  -375,  -375,  -165,  -375,  -232,
+  -230,  -245,  -243,  -149,  -244,  -375,  -375,  -155,  -170,  -156,
+  -154,   -28,  -375,  -256,  -375,  -375,  -375,  -375,  -375,  -375,
+  -375,  -375,  -375,  -375,  -375,  -257,   -68,  -375,  -375,   -29,
+   -64,  -375,  -307,  -151,  -303,  -302,  -375,  -375,  -178,  -375,
+  -200,  -375,  -213,  -375,  -226,  -375,  -239,  -375,  -163,  -375,
+  -375,  -375,  -375,  -375,  -375,  -375,  -177,  -199,  -212,  -225,
+  -238,  -162,  -375,  -375,  -179,  -201,  -214,  -227,  -240,  -164,
+  -176,  -198,  -211,  -224,  -237,  -161,  -375,  -375,  -314,  -313,
+  -319,  -320,  -326,  -325,  -332,  -331,  -338,  -337,  -345,  -344,
+  -340,  -375,  -348,  -354,  -351,  -350,  -358,  -357,  -355,   -69,
+  -375,  -375,  -375,  -375,  -305,  -375,  -172,  -375,  -375,  -375,
+  -375,  -375,  -375,  -375,  -375,  -375,  -375,  -375,  -375,  -375,
+  -194,  -375,  -207,  -375,  -220,  -375,  -233,  -375,  -375,  -157,
+  -375,  -375,  -375,  -375,  -375,  -375,   -43,  -304,  -375,   -53,
+   -44,  -375,  -309,  -375,   -31,   -72,   -70,   -36,   -37,  -371,
+   -38,  -359,   -39,  -362,   -40,  -375,  -365,   -41,  -366,   -42,
+  -368,  -375,   -35,  -375,  -308,  -174,  -173,  -375,  -195,  -375,
+  -208,  -375,  -221,  -375,  -234,  -375,  -375,  -158,  -196,  -209,
+  -222,  -235,  -159,  -375,  -291,  -375,   -49,  -375,   -67,  -304,
+  -375,   -52,   -50,  -375,  -375,   -44,   -71,   -65,  -375,  -369,
+  -375,   -66,  -175,  -197,  -210,  -223,  -236,  -160,  -294,  -375,
+  -375,  -290,   -45,   -47,  -375,  -364,   -51,  -363,  -375,  -361,
+  -360,  -367,  -370,   -73,  -375,  -293,  -292,   -46,  -375,   -75,
+  -295,  -296,  -297,   -74,   -77,  -375,   -80,  -375,  -375,  -375,
+  -375,  -375,   -78,  -375,   -48,   -76,  -298,  -299,  -300,  -301,
+   -81,   -79 ]
 
 racc_goto_table = [
-    96,   113,   165,    38,   162,    48,   118,   180,   276,    55,
-   413,    48,   202,   120,   523,   104,    65,   273,   105,   126,
-   116,    92,    77,   174,    66,   125,    68,    64,    96,    19,
-   614,    98,     3,   115,    68,   108,   393,   531,    60,   623,
-   626,   133,   179,   132,    32,   289,   618,   185,   175,    92,
-   142,   623,   610,   123,   187,   278,    63,   275,   459,    82,
-   199,   183,   208,   193,   197,   200,   196,   104,    78,   205,
-   209,   484,   218,    76,   182,   222,    65,   224,   122,   226,
-   227,   397,   229,   577,    66,   220,   221,   108,   223,    18,
-   225,    10,     2,   228,   192,   137,    70,    53,    33,   204,
-   207,   178,   181,   184,   186,   188,   191,   195,   198,   201,
-   203,   211,   233,    48,   175,   234,   235,   236,   237,   189,
-   206,   177,    27,    20,   167,   141,    13,     6,   217,   566,
-   589,     5,   545,   254,   599,   579,   nil,   nil,   nil,   nil,
-   320,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   262,   nil,   nil,   283,   nil,   nil,   260,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   255,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   nil,   388,   nil,   390,   nil,
-   nil,   327,   nil,   nil,   nil,   258,   287,   331,   nil,   nil,
-   336,   nil,   nil,   nil,   nil,   350,   334,   nil,   360,   339,
-   368,   nil,   376,   nil,   nil,   nil,   nil,   nil,   nil,   391,
-   257,   nil,   324,   355,   343,   332,   365,   nil,   373,   354,
-   381,   382,   364,   386,   372,   nil,   380,   351,   384,   nil,
-   361,   nil,   369,   nil,   377,   nil,   nil,   nil,   nil,   nil,
-   340,   nil,   nil,   345,   nil,   nil,   nil,   353,   nil,   nil,
-   363,   nil,   371,   590,   379,   nil,   521,   nil,   nil,   nil,
-   412,   nil,   nil,   337,   nil,   nil,   342,   nil,   nil,   nil,
-   nil,   nil,   352,   nil,   nil,   362,   nil,   370,   nil,   378,
-   nil,   nil,   nil,   nil,   nil,   nil,   417,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   479,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   419,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   443,   nil,   451,   nil,   nil,   nil,   nil,   nil,   nil,   466,
-   nil,   nil,   465,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   435,   nil,   nil,   nil,   nil,   nil,   nil,   488,   nil,   nil,
-   nil,   491,   477,   nil,   nil,   nil,   nil,   475,   nil,   nil,
-   nil,   nil,   469,   433,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   501,
-   nil,   490,   nil,   499,   473,   493,   nil,   nil,   nil,   nil,
-   nil,   522,   nil,   nil,   nil,   nil,   nil,   508,   nil,   510,
-   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   471,   497,
-   nil,   nil,   nil,   nil,   nil,   412,   nil,   506,   nil,   567,
-   nil,   549,   nil,   287,   nil,   nil,   nil,   262,   nil,   520,
-   nil,   nil,   495,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   504,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   559,
-   nil,   nil,   nil,   557,   nil,   551,   nil,   nil,   nil,   nil,
-   522,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   595,   nil,   nil,   nil,   555,
-   568,   nil,    48,   nil,   nil,   570,   572,   nil,   355,   365,
-   373,   381,   287,   412,   nil,   nil,   608,   nil,   520,   nil,
-   nil,   nil,   553,   598,   600,   nil,   nil,   nil,   nil,   nil,
+    95,   128,    47,   164,    38,   161,   176,   114,    47,   316,
+    54,   411,   116,   173,   198,   111,   107,   313,    64,   103,
+   526,    65,   112,    91,    73,    19,    66,    97,    95,   622,
+   121,   106,    62,     3,   406,   613,    66,   535,    59,   278,
+    32,   622,   118,   206,   132,   625,   617,   130,   174,   181,
+   123,    91,   141,   609,   183,   318,    61,   178,   315,   479,
+   217,    81,   207,   221,   179,   223,   188,   225,   226,   192,
+   228,   196,   191,   576,    77,   201,   475,    64,    75,   120,
+    65,    18,    10,     2,   185,   136,   219,   220,    69,   222,
+   107,   224,   195,   209,   227,    52,    33,   200,   203,   205,
+   177,   180,   182,   184,   186,   106,   190,   194,   197,    47,
+   199,   210,   232,   202,   174,   233,   234,   235,   236,   410,
+   204,   187,    27,    20,   166,   140,    13,     6,   215,   565,
+   319,   589,     5,   544,   262,   597,   578,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   253,   nil,
+   nil,   nil,   nil,   nil,   309,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   257,   nil,   nil,   nil,   nil,   273,   nil,
+   nil,   nil,   nil,   nil,   nil,   255,   382,   nil,   384,   nil,
+   nil,   nil,   nil,   259,   nil,   nil,   nil,   323,   nil,   nil,
+   329,   nil,   nil,   nil,   328,   350,   324,   333,   nil,   362,
+   nil,   370,   376,   nil,   nil,   nil,   nil,   nil,   387,   345,
+   390,   nil,   256,   357,   nil,   365,   371,   nil,   337,   nil,
+   nil,   nil,   342,   388,   348,   nil,   331,   nil,   360,   336,
+   368,   374,   nil,   nil,   nil,   nil,   346,   nil,   nil,   nil,
+   358,   340,   366,   372,   349,   nil,   nil,   nil,   361,   nil,
+   369,   375,   nil,   380,   588,   nil,   nil,   nil,   nil,   nil,
+   nil,   415,   nil,   nil,   nil,   334,   nil,   nil,   339,   nil,
+   nil,   nil,   nil,   347,   nil,   525,   nil,   359,   nil,   367,
+   373,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   416,
+   nil,   nil,   nil,   470,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   457,
+   nil,   nil,   nil,   nil,   nil,   nil,   434,   nil,   nil,   nil,
+   nil,   nil,   nil,   459,   430,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   460,
+   477,   nil,   nil,   nil,   442,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   467,   nil,   nil,
+   499,   nil,   487,   432,   488,   nil,   nil,   463,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   469,   nil,
+   nil,   nil,   nil,   nil,   nil,   494,   nil,   508,   nil,   nil,
+   nil,   nil,   nil,   490,   nil,   505,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   501,   nil,   465,   nil,   496,   nil,   nil,
+   nil,   nil,   nil,   522,   nil,   nil,   415,   nil,   nil,   nil,
+   nil,   nil,   nil,   507,   566,   nil,   nil,   273,   nil,   556,
+   nil,   nil,   492,   nil,   547,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   503,   nil,   nil,   nil,   524,   nil,   nil,   nil,
+   nil,   259,   nil,   nil,   nil,   553,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   549,   nil,   nil,   522,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   594,   555,   nil,   nil,
+   273,   nil,    47,   nil,   567,   569,   nil,   572,   nil,   nil,
+   349,   361,   369,   375,   415,   nil,   nil,   607,   nil,   524,
+   nil,   nil,   551,   nil,   598,   600,   nil,   nil,   nil,   nil,
    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
@@ -524,59 +527,59 @@
    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   632 ]
+   631 ]
 
 racc_goto_check = [
-    56,    81,    34,    15,    22,    23,    83,   104,    24,    15,
-   115,    23,    78,    84,    26,    59,    72,    48,    62,    88,
-    71,    55,   105,   109,    66,    87,    60,    69,    56,    14,
-    53,    23,     1,    82,    60,    23,    51,    50,    58,    54,
-    53,    60,    81,    69,    14,    39,    37,    83,    56,    55,
-   105,    54,    36,    86,    84,    25,    68,    20,    52,    18,
-    88,    71,    74,    75,    76,    77,    87,    59,    17,    79,
-    62,    80,   109,    16,    82,   109,    72,   109,    85,   109,
-   109,    48,   109,    26,    66,   110,   110,    23,   110,    13,
-   110,    12,    11,   110,    86,    10,     9,     8,     7,    90,
-    91,    92,    93,    94,    95,    96,    97,    98,    99,   100,
-   101,    15,    56,    23,    56,    56,    56,    56,    56,    85,
-   102,   103,     6,     5,   106,   108,     4,     3,   112,   113,
-   114,     2,   116,    81,   127,   129,   nil,   nil,   nil,   nil,
-   109,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,    88,   nil,   nil,    81,   nil,   nil,    87,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,    82,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   nil,    78,   nil,    78,   nil,
-   nil,    81,   nil,   nil,   nil,    86,    82,    83,   nil,   nil,
-    83,   nil,   nil,   nil,   nil,    81,    84,   nil,    81,    84,
-    81,   nil,    81,   nil,   nil,   nil,   nil,   nil,   nil,    81,
-    85,   nil,    82,    88,    87,    82,    88,   nil,    88,    87,
-    88,    88,    87,    88,    87,   nil,    87,    82,    87,   nil,
-    82,   nil,    82,   nil,    82,   nil,   nil,   nil,   nil,   nil,
-    86,   nil,   nil,    86,   nil,   nil,   nil,    86,   nil,   nil,
-    86,   nil,    86,   115,    86,   nil,    24,   nil,   nil,   nil,
-    81,   nil,   nil,    85,   nil,   nil,    85,   nil,   nil,   nil,
-   nil,   nil,    85,   nil,   nil,    85,   nil,    85,   nil,    85,
-   nil,   nil,   nil,   nil,   nil,   nil,    81,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   104,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-    82,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-    87,   nil,    88,   nil,   nil,   nil,   nil,   nil,   nil,    81,
-   nil,   nil,    83,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-    86,   nil,   nil,   nil,   nil,   nil,   nil,    81,   nil,   nil,
-   nil,    81,    88,   nil,   nil,   nil,   nil,    87,   nil,   nil,
-   nil,   nil,    82,    85,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    88,
-   nil,    82,   nil,    87,    86,    82,   nil,   nil,   nil,   nil,
-   nil,    81,   nil,   nil,   nil,   nil,   nil,    87,   nil,    88,
-   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    85,    86,
-   nil,   nil,   nil,   nil,   nil,    81,   nil,    86,   nil,    22,
-   nil,    81,   nil,    82,   nil,   nil,   nil,    88,   nil,    23,
-   nil,   nil,    85,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-    85,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    88,
-   nil,   nil,   nil,    87,   nil,    82,   nil,   nil,   nil,   nil,
-    81,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,    22,   nil,   nil,   nil,    86,
-    15,   nil,    23,   nil,   nil,    23,    23,   nil,    88,    88,
-    88,    88,    82,    81,   nil,   nil,    34,   nil,    23,   nil,
-   nil,   nil,    85,    81,    81,   nil,   nil,   nil,   nil,   nil,
+    56,    80,    23,    34,    15,    22,   103,    82,    23,    24,
+    15,   114,    83,   108,    77,    81,    58,    48,    71,    61,
+    26,    65,    70,    55,   104,    14,    59,    23,    56,    54,
+    86,    23,    68,     1,    51,    53,    59,    50,    57,    39,
+    14,    54,    84,    80,    59,    53,    37,    68,    56,    82,
+    87,    55,   104,    36,    83,    25,    67,    81,    20,    52,
+   108,    18,    73,   108,    70,   108,    74,   108,   108,    75,
+   108,    76,    86,    26,    17,    78,    79,    71,    16,    85,
+    65,    13,    12,    11,    84,    10,   109,   109,     9,   109,
+    58,   109,    87,    61,   109,     8,     7,    89,    90,    91,
+    92,    93,    94,    95,    96,    23,    97,    98,    99,    23,
+   100,    15,    56,   101,    56,    56,    56,    56,    56,    48,
+   102,    85,     6,     5,   105,   107,     4,     3,   111,   112,
+   108,   113,     2,   115,    80,   126,   128,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    81,   nil,
+   nil,   nil,   nil,   nil,    80,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,    86,   nil,   nil,   nil,   nil,    81,   nil,
+   nil,   nil,   nil,   nil,   nil,    84,    77,   nil,    77,   nil,
+   nil,   nil,   nil,    87,   nil,   nil,   nil,    82,   nil,   nil,
+    82,   nil,   nil,   nil,    83,    80,    81,    83,   nil,    80,
+   nil,    80,    80,   nil,   nil,   nil,   nil,   nil,    80,    81,
+    80,   nil,    85,    81,   nil,    81,    81,   nil,    86,   nil,
+   nil,   nil,    86,    81,    86,   nil,    84,   nil,    86,    84,
+    86,    86,   nil,   nil,   nil,   nil,    84,   nil,   nil,   nil,
+    84,    87,    84,    84,    87,   nil,   nil,   nil,    87,   nil,
+    87,    87,   nil,    87,   114,   nil,   nil,   nil,   nil,   nil,
+   nil,    80,   nil,   nil,   nil,    85,   nil,   nil,    85,   nil,
+   nil,   nil,   nil,    85,   nil,    24,   nil,    85,   nil,    85,
+    85,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    81,
+   nil,   nil,   nil,   103,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    80,
+   nil,   nil,   nil,   nil,   nil,   nil,    86,   nil,   nil,   nil,
+   nil,   nil,   nil,    80,    84,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    81,
+    82,   nil,   nil,   nil,    87,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,    86,   nil,   nil,
+    80,   nil,    81,    85,    81,   nil,   nil,    84,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    87,   nil,
+   nil,   nil,   nil,   nil,   nil,    86,   nil,    80,   nil,   nil,
+   nil,   nil,   nil,    84,   nil,    86,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,    84,   nil,    85,   nil,    87,   nil,   nil,
+   nil,   nil,   nil,    80,   nil,   nil,    80,   nil,   nil,   nil,
+   nil,   nil,   nil,    87,    22,   nil,   nil,    81,   nil,    80,
+   nil,   nil,    85,   nil,    81,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,    85,   nil,   nil,   nil,    23,   nil,   nil,   nil,
+   nil,    87,   nil,   nil,   nil,    86,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,    84,   nil,   nil,    80,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,    22,    87,   nil,   nil,
+    81,   nil,    23,   nil,    15,    23,   nil,    23,   nil,   nil,
+    87,    87,    87,    87,    80,   nil,   nil,    34,   nil,    23,
+   nil,   nil,    85,   nil,    80,    80,   nil,   nil,   nil,   nil,
    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
@@ -587,32 +590,32 @@
 
 racc_goto_pointer = [
-   nil,    32,   131,   127,   120,   110,   102,    71,    64,    43,
-    25,    92,    87,    78,    18,   -25,    19,    14,     5,   nil,
-  -157,   nil,   -85,   -23,  -206,  -159,  -448,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   -89,   nil,  -552,  -564,   nil,  -170,
-   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,  -197,   nil,
-  -425,  -236,  -335,  -579,  -575,   -33,   -54,   nil,    -5,   -43,
-   -26,   nil,   -40,   nil,   nil,   nil,   -24,   nil,     9,   -20,
-   nil,   -42,   -32,   nil,   -46,   -40,   -39,   -38,   -91,   -34,
-  -339,   -61,   -29,   -56,   -49,    16,    -9,   -37,   -43,   nil,
-    -4,    -3,    -2,    -1,     0,     1,     2,     3,     4,     5,
-     6,     7,    17,    18,   -96,   -32,    29,   nil,    46,   -79,
-   -67,   nil,   -20,  -383,  -434,  -311,  -354,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   nil,   nil,  -440,   nil,  -402 ]
+   nil,    33,   132,   127,   120,   110,   102,    69,    62,    36,
+    16,    83,    78,    70,    14,   -24,    25,    21,     8,   nil,
+  -158,   nil,   -83,   -26,  -207,  -161,  -462,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   -87,   nil,  -550,  -563,   nil,  -174,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,  -199,   nil,
+  -445,  -278,  -347,  -573,  -584,   -30,   -53,    -4,   -41,   -23,
+   nil,   -38,   nil,   nil,   nil,   -26,   nil,    10,   -14,   nil,
+   -38,   -29,   nil,   -44,   -36,   -33,   -31,   -88,   -27,  -326,
+   -59,   -45,   -53,   -48,   -18,    19,   -30,   -10,   nil,    -5,
+    -4,    -3,    -2,    -1,     0,     1,     2,     4,     5,     6,
+     8,    11,    18,   -96,   -29,    30,   nil,    47,   -88,   -63,
+   nil,   -16,  -386,  -432,  -309,  -352,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,  -438,   nil,  -404 ]
 
 racc_goto_default = [
    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   nil,   nil,   539,   nil,    85,
-   nil,    89,   nil,   143,   nil,   nil,   nil,   524,   525,   527,
-   528,   530,   533,   536,    93,   538,   nil,   nil,   514,   516,
-   291,   294,   297,   301,   305,   308,   313,   318,   nil,   274,
-   nil,   nil,   nil,   nil,   615,   616,   617,    50,    52,    37,
-    39,    42,   nil,   107,    44,    45,    46,    47,   nil,   nil,
-    61,   nil,    41,    43,   106,   nil,   nil,   nil,   nil,   nil,
-   130,    72,    74,   nil,   nil,   292,   295,   299,   302,   127,
-   312,   317,   282,   nil,   nil,   nil,   nil,   nil,   nil,   304,
-   307,   311,   316,   280,   285,   nil,    80,    83,    86,    88,
-    90,    94,    99,   nil,   nil,   nil,   414,   290,   293,   296,
-   300,   303,   306,   310,   315,   279,   529,   532,   535,   nil ]
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   542,   nil,    84,
+   nil,    88,   nil,   142,   nil,   nil,   nil,   527,   528,   530,
+   532,   534,   537,   539,    93,   541,   nil,   nil,   517,   519,
+   281,   284,   287,   292,   295,   299,   304,   310,   nil,   314,
+   nil,   nil,   nil,   nil,   614,   615,   616,    49,    51,    37,
+    40,   nil,   105,    43,    44,    45,    46,   nil,   nil,    63,
+   nil,    39,    42,   104,   nil,   nil,   nil,   nil,   nil,   126,
+    99,    71,   nil,   nil,   279,   282,   285,   289,   124,   298,
+   303,   308,   nil,   nil,   nil,   nil,   nil,   nil,   291,   294,
+   297,   302,   307,   271,   nil,    76,    79,    82,    85,    87,
+    89,    92,   nil,   nil,   nil,   412,   277,   280,   283,   286,
+   290,   293,   296,   301,   305,   531,   533,   536,   nil ]
 
 racc_reduce_table = [
@@ -704,48 +707,56 @@
   2, 105, :_reduce_85,
   2, 105, :_reduce_none,
-  1, 110, :_reduce_none,
-  1, 152, :_reduce_none,
-  1, 152, :_reduce_none,
-  1, 153, :_reduce_90,
-  2, 153, :_reduce_91,
-  3, 153, :_reduce_92,
-  3, 155, :_reduce_93,
-  1, 156, :_reduce_94,
-  2, 156, :_reduce_none,
-  1, 157, :_reduce_96,
-  1, 157, :_reduce_97,
-  1, 154, :_reduce_98,
-  1, 154, :_reduce_99,
-  1, 160, :_reduce_100,
-  2, 160, :_reduce_101,
-  3, 161, :_reduce_102,
+  1, 110, :_reduce_87,
+  1, 110, :_reduce_88,
+  1, 152, :_reduce_89,
+  2, 152, :_reduce_90,
+  3, 152, :_reduce_91,
+  3, 154, :_reduce_92,
+  1, 155, :_reduce_93,
+  2, 155, :_reduce_none,
+  1, 156, :_reduce_95,
+  1, 156, :_reduce_96,
+  1, 153, :_reduce_97,
+  1, 153, :_reduce_98,
+  1, 159, :_reduce_99,
+  2, 159, :_reduce_100,
+  3, 160, :_reduce_101,
+  1, 161, :_reduce_102,
   1, 162, :_reduce_103,
-  1, 163, :_reduce_104,
-  2, 163, :_reduce_105,
+  2, 162, :_reduce_104,
+  3, 163, :_reduce_105,
   3, 164, :_reduce_106,
-  3, 165, :_reduce_107,
-  1, 159, :_reduce_108,
-  2, 159, :_reduce_109,
-  2, 167, :_reduce_110,
-  3, 167, :_reduce_111,
-  1, 168, :_reduce_none,
-  1, 158, :_reduce_113,
-  2, 158, :_reduce_114,
-  3, 169, :_reduce_115,
-  1, 170, :_reduce_116,
-  1, 170, :_reduce_117,
-  1, 170, :_reduce_118,
-  1, 170, :_reduce_119,
-  1, 170, :_reduce_120,
-  1, 166, :_reduce_121,
-  1, 166, :_reduce_122,
-  1, 166, :_reduce_123,
-  1, 166, :_reduce_124,
-  1, 166, :_reduce_125,
-  1, 166, :_reduce_126,
-  1, 166, :_reduce_127,
-  1, 166, :_reduce_128,
-  1, 166, :_reduce_129,
-  1, 166, :_reduce_130,
+  1, 158, :_reduce_107,
+  2, 158, :_reduce_108,
+  2, 166, :_reduce_109,
+  3, 166, :_reduce_110,
+  1, 167, :_reduce_none,
+  1, 157, :_reduce_112,
+  2, 157, :_reduce_113,
+  3, 168, :_reduce_114,
+  1, 169, :_reduce_115,
+  1, 169, :_reduce_116,
+  1, 169, :_reduce_117,
+  1, 169, :_reduce_118,
+  1, 169, :_reduce_119,
+  1, 165, :_reduce_120,
+  1, 165, :_reduce_121,
+  1, 165, :_reduce_122,
+  1, 165, :_reduce_123,
+  1, 165, :_reduce_124,
+  1, 165, :_reduce_125,
+  1, 165, :_reduce_126,
+  1, 165, :_reduce_127,
+  1, 165, :_reduce_128,
+  1, 165, :_reduce_129,
+  1, 170, :_reduce_none,
+  1, 170, :_reduce_none,
+  1, 170, :_reduce_none,
+  1, 170, :_reduce_none,
+  1, 170, :_reduce_none,
+  1, 170, :_reduce_none,
+  1, 170, :_reduce_none,
+  1, 170, :_reduce_none,
+  1, 170, :_reduce_none,
   1, 171, :_reduce_none,
   1, 171, :_reduce_none,
@@ -754,22 +765,28 @@
   1, 171, :_reduce_none,
   1, 171, :_reduce_none,
-  1, 171, :_reduce_none,
-  1, 171, :_reduce_none,
-  1, 171, :_reduce_none,
-  1, 172, :_reduce_none,
-  1, 172, :_reduce_none,
-  1, 172, :_reduce_none,
-  1, 172, :_reduce_none,
-  1, 172, :_reduce_none,
-  1, 172, :_reduce_none,
+  1, 118, :_reduce_145,
   1, 118, :_reduce_146,
-  1, 118, :_reduce_147,
-  1, 175, :_reduce_148,
+  1, 174, :_reduce_147,
+  3, 184, :_reduce_none,
+  3, 184, :_reduce_none,
+  3, 184, :_reduce_none,
+  1, 175, :_reduce_151,
+  2, 175, :_reduce_152,
+  2, 175, :_reduce_153,
   3, 185, :_reduce_none,
   3, 185, :_reduce_none,
   3, 185, :_reduce_none,
-  1, 176, :_reduce_152,
-  2, 176, :_reduce_153,
-  2, 176, :_reduce_154,
+  5, 193, :_reduce_none,
+  6, 193, :_reduce_none,
+  6, 193, :_reduce_none,
+  7, 193, :_reduce_none,
+  4, 193, :_reduce_none,
+  4, 193, :_reduce_none,
+  4, 193, :_reduce_none,
+  4, 193, :_reduce_none,
+  3, 193, :_reduce_none,
+  1, 176, :_reduce_166,
+  2, 176, :_reduce_167,
+  2, 176, :_reduce_168,
   3, 186, :_reduce_none,
   3, 186, :_reduce_none,
@@ -784,10 +801,17 @@
   4, 194, :_reduce_none,
   3, 194, :_reduce_none,
-  1, 177, :_reduce_167,
-  2, 177, :_reduce_168,
-  2, 177, :_reduce_169,
+  1, 177, :_reduce_181,
+  1, 177, :_reduce_182,
   3, 187, :_reduce_none,
   3, 187, :_reduce_none,
   3, 187, :_reduce_none,
+  1, 178, :_reduce_none,
+  3, 188, :_reduce_none,
+  3, 188, :_reduce_none,
+  3, 188, :_reduce_none,
+  1, 179, :_reduce_190,
+  3, 189, :_reduce_none,
+  3, 189, :_reduce_none,
+  3, 189, :_reduce_none,
   5, 195, :_reduce_none,
   6, 195, :_reduce_none,
@@ -799,14 +823,5 @@
   4, 195, :_reduce_none,
   3, 195, :_reduce_none,
-  1, 178, :_reduce_182,
-  1, 178, :_reduce_183,
-  3, 188, :_reduce_none,
-  3, 188, :_reduce_none,
-  3, 188, :_reduce_none,
-  1, 179, :_reduce_none,
-  3, 189, :_reduce_none,
-  3, 189, :_reduce_none,
-  3, 189, :_reduce_none,
-  1, 180, :_reduce_191,
+  1, 180, :_reduce_none,
   3, 190, :_reduce_none,
   3, 190, :_reduce_none,
@@ -834,5 +849,5 @@
   4, 197, :_reduce_none,
   3, 197, :_reduce_none,
-  1, 182, :_reduce_none,
+  1, 182, :_reduce_229,
   3, 192, :_reduce_none,
   3, 192, :_reduce_none,
@@ -847,154 +862,141 @@
   4, 198, :_reduce_none,
   3, 198, :_reduce_none,
-  1, 183, :_reduce_230,
-  3, 193, :_reduce_none,
-  3, 193, :_reduce_none,
-  3, 193, :_reduce_none,
-  5, 199, :_reduce_none,
-  6, 199, :_reduce_none,
-  6, 199, :_reduce_none,
-  7, 199, :_reduce_none,
-  4, 199, :_reduce_none,
-  4, 199, :_reduce_none,
-  4, 199, :_reduce_none,
-  4, 199, :_reduce_none,
-  3, 199, :_reduce_none,
-  1, 173, :_reduce_243,
-  3, 174, :_reduce_none,
-  3, 174, :_reduce_none,
-  3, 174, :_reduce_none,
-  1, 184, :_reduce_247,
+  1, 172, :_reduce_242,
+  3, 173, :_reduce_none,
+  3, 173, :_reduce_none,
+  3, 173, :_reduce_none,
+  1, 183, :_reduce_246,
   1, 113, :_reduce_none,
   2, 113, :_reduce_none,
+  3, 199, :_reduce_none,
+  1, 199, :_reduce_none,
+  3, 199, :_reduce_none,
+  1, 151, :_reduce_none,
+  1, 151, :_reduce_none,
+  2, 201, :_reduce_none,
+  2, 201, :_reduce_none,
+  5, 201, :_reduce_none,
+  5, 201, :_reduce_none,
+  2, 201, :_reduce_none,
+  3, 201, :_reduce_none,
+  3, 201, :_reduce_none,
+  3, 201, :_reduce_none,
+  3, 201, :_reduce_none,
+  3, 201, :_reduce_none,
+  3, 201, :_reduce_none,
+  3, 201, :_reduce_none,
+  3, 201, :_reduce_none,
+  3, 201, :_reduce_none,
+  3, 201, :_reduce_none,
   3, 200, :_reduce_none,
   1, 200, :_reduce_none,
-  3, 200, :_reduce_none,
-  1, 151, :_reduce_none,
-  1, 151, :_reduce_none,
-  2, 202, :_reduce_none,
-  2, 202, :_reduce_none,
-  5, 202, :_reduce_none,
-  5, 202, :_reduce_none,
-  2, 202, :_reduce_none,
-  3, 202, :_reduce_none,
-  3, 202, :_reduce_none,
-  3, 202, :_reduce_none,
-  3, 202, :_reduce_none,
-  3, 202, :_reduce_none,
-  3, 202, :_reduce_none,
-  3, 202, :_reduce_none,
-  3, 202, :_reduce_none,
-  3, 202, :_reduce_none,
-  3, 202, :_reduce_none,
-  3, 201, :_reduce_none,
-  1, 201, :_reduce_none,
-  1, 201, :_reduce_none,
+  1, 200, :_reduce_none,
+  1, 203, :_reduce_none,
+  1, 203, :_reduce_none,
+  3, 205, :_reduce_none,
+  3, 205, :_reduce_none,
+  3, 205, :_reduce_none,
+  3, 205, :_reduce_none,
+  3, 205, :_reduce_none,
+  3, 204, :_reduce_none,
   1, 204, :_reduce_none,
   1, 204, :_reduce_none,
-  3, 206, :_reduce_none,
-  3, 206, :_reduce_none,
-  3, 206, :_reduce_none,
-  3, 206, :_reduce_none,
-  3, 206, :_reduce_none,
-  3, 205, :_reduce_none,
-  1, 205, :_reduce_none,
-  1, 205, :_reduce_none,
-  1, 205, :_reduce_none,
+  1, 204, :_reduce_none,
   1, 129, :_reduce_none,
   2, 129, :_reduce_none,
-  1, 203, :_reduce_none,
-  3, 203, :_reduce_none,
-  2, 207, :_reduce_288,
-  1, 207, :_reduce_289,
-  0, 146, :_reduce_290,
-  5, 146, :_reduce_291,
-  1, 208, :_reduce_292,
-  3, 208, :_reduce_293,
-  5, 147, :_reduce_294,
-  1, 209, :_reduce_none,
-  3, 209, :_reduce_none,
-  3, 209, :_reduce_none,
-  3, 209, :_reduce_none,
-  5, 209, :_reduce_none,
-  5, 209, :_reduce_none,
-  5, 209, :_reduce_none,
-  5, 209, :_reduce_none,
-  1, 211, :_reduce_303,
-  1, 211, :_reduce_304,
+  1, 202, :_reduce_none,
+  3, 202, :_reduce_none,
+  2, 206, :_reduce_287,
+  1, 206, :_reduce_288,
+  0, 146, :_reduce_289,
+  5, 146, :_reduce_290,
+  1, 207, :_reduce_291,
+  3, 207, :_reduce_292,
+  5, 147, :_reduce_293,
+  1, 208, :_reduce_none,
+  3, 208, :_reduce_none,
+  3, 208, :_reduce_none,
+  3, 208, :_reduce_none,
+  5, 208, :_reduce_none,
+  5, 208, :_reduce_none,
+  5, 208, :_reduce_none,
+  5, 208, :_reduce_none,
+  1, 210, :_reduce_302,
+  1, 210, :_reduce_303,
   0, 117, :_reduce_none,
-  5, 117, :_reduce_306,
+  5, 117, :_reduce_305,
   2, 117, :_reduce_none,
-  1, 210, :_reduce_none,
-  3, 210, :_reduce_none,
+  1, 209, :_reduce_307,
+  3, 209, :_reduce_308,
+  1, 211, :_reduce_none,
+  1, 211, :_reduce_none,
+  1, 211, :_reduce_none,
+  1, 135, :_reduce_none,
+  3, 135, :_reduce_none,
+  3, 135, :_reduce_none,
   1, 212, :_reduce_none,
   1, 212, :_reduce_none,
   1, 212, :_reduce_none,
-  1, 135, :_reduce_none,
-  3, 135, :_reduce_none,
-  3, 135, :_reduce_none,
+  1, 136, :_reduce_none,
+  3, 136, :_reduce_none,
+  3, 136, :_reduce_none,
   1, 213, :_reduce_none,
   1, 213, :_reduce_none,
   1, 213, :_reduce_none,
-  1, 136, :_reduce_none,
-  3, 136, :_reduce_none,
-  3, 136, :_reduce_none,
+  1, 137, :_reduce_none,
+  3, 137, :_reduce_none,
+  3, 137, :_reduce_none,
   1, 214, :_reduce_none,
   1, 214, :_reduce_none,
   1, 214, :_reduce_none,
-  1, 137, :_reduce_none,
-  3, 137, :_reduce_none,
-  3, 137, :_reduce_none,
+  1, 138, :_reduce_none,
+  3, 138, :_reduce_none,
+  3, 138, :_reduce_none,
   1, 215, :_reduce_none,
   1, 215, :_reduce_none,
   1, 215, :_reduce_none,
-  1, 138, :_reduce_none,
-  3, 138, :_reduce_none,
-  3, 138, :_reduce_none,
-  1, 216, :_reduce_none,
-  1, 216, :_reduce_none,
-  1, 216, :_reduce_none,
   1, 139, :_reduce_none,
   3, 139, :_reduce_none,
   3, 139, :_reduce_none,
-  1, 217, :_reduce_none,
-  3, 217, :_reduce_none,
-  1, 217, :_reduce_none,
-  1, 217, :_reduce_none,
+  1, 216, :_reduce_none,
+  3, 216, :_reduce_none,
+  1, 216, :_reduce_none,
+  1, 216, :_reduce_none,
   1, 140, :_reduce_none,
   3, 140, :_reduce_none,
   3, 140, :_reduce_none,
-  1, 219, :_reduce_none,
-  1, 219, :_reduce_none,
-  3, 219, :_reduce_none,
+  1, 218, :_reduce_none,
+  1, 218, :_reduce_none,
+  3, 218, :_reduce_none,
   1, 141, :_reduce_none,
   3, 141, :_reduce_none,
   3, 141, :_reduce_none,
-  1, 220, :_reduce_353,
-  1, 220, :_reduce_354,
-  3, 220, :_reduce_355,
-  3, 220, :_reduce_356,
-  1, 142, :_reduce_357,
+  1, 219, :_reduce_352,
+  1, 219, :_reduce_353,
+  3, 219, :_reduce_354,
+  3, 219, :_reduce_355,
+  1, 142, :_reduce_356,
+  3, 142, :_reduce_357,
   3, 142, :_reduce_358,
-  3, 142, :_reduce_359,
   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, 220, :_reduce_none,
+  3, 220, :_reduce_none,
+  3, 221, :_reduce_364,
+  1, 125, :_reduce_365,
   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, 124, :_reduce_372,
+  3, 222, :_reduce_367,
+  0, 223, :_reduce_none,
+  1, 223, :_reduce_none,
+  2, 223, :_reduce_none,
+  1, 124, :_reduce_371,
+  1, 150, :_reduce_372,
   1, 150, :_reduce_373,
-  1, 150, :_reduce_374,
-  1, 218, :_reduce_375 ]
-
-racc_reduce_n = 376
-
-racc_shift_n = 633
+  1, 217, :_reduce_374 ]
+
+racc_reduce_n = 375
+
+racc_shift_n = 632
 
 racc_token_table = {
@@ -1268,5 +1270,4 @@
   "any_identifier",
   "boolean_expression",
-  "dadl_input",
   "attr_vals",
   "complex_object_block",
@@ -1361,5 +1362,5 @@
   def _reduce_3(val, _values, result)
         assert_at(__FILE__,__LINE__) do
-      val[4].instance_of?(OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION) and val[5].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT) and val[7].instance_of?(OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY) 
+      val[4].instance_of?(OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION) and val[5].instance_of?(OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT) and val[7].instance_of?(OpenEhr::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY) 
     end
     
@@ -1367,7 +1368,7 @@
     parent_archtype_id = val[1][:parent_archtype_id] if val[1]
     adl_version = val[0][:arch_head][:arch_meta_data][:adl_version]
-    concept = val[2]
+    concept = val[2][:arch_concept]
     language = val[3][:arch_language]
-    archetype = OpenEHR::AM::Archetype::ARCHETYPE.create(
+    archetype = OpenEhr::AM::Archetype::ARCHETYPE.create(
                                                          :archetype_id => archetype_id,
                                                          :parent_archtype_id => parent_archtype_id,
@@ -1503,5 +1504,5 @@
 module_eval(<<'.,.,', 'parser.y', 139)
   def _reduce_22(val, _values, result)
-        result = OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION.new(:details => val[1])
+        result = OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION.new(:details => val[1])
   
     result
@@ -1523,5 +1524,5 @@
 module_eval(<<'.,.,', 'parser.y', 155)
   def _reduce_26(val, _values, result)
-        assert_at(__FILE__,__LINE__){val[0].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT)}
+        assert_at(__FILE__,__LINE__){val[0].instance_of?(OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT)}
     @@logger.debug("#{__FILE__}:#{__LINE__}: c_complex_object = #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -1541,5 +1542,5 @@
 module_eval(<<'.,.,', 'parser.y', 168)
   def _reduce_28(val, _values, result)
-        result = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:attributes => val[3]) do |c_complex_object|
+        result = OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:attributes => val[3]) do |c_complex_object|
       c_complex_object.node_id = val[0][:c_complex_object_id][:local_term_code_ref]
       c_complex_object.rm_type_name = val[0][:c_complex_object_id][:type_identifier]
@@ -1553,5 +1554,5 @@
 module_eval(<<'.,.,', 'parser.y', 176)
   def _reduce_29(val, _values, result)
-        result = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:attributes => val[3]) do |c_complex_object|
+        result = OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:attributes => val[3]) do |c_complex_object|
       c_complex_object.node_id = val[0][:c_complex_object_id][:local_term_code_ref]
       c_complex_object.rm_type_name = val[0][:c_complex_object_id][:type_identifier]
@@ -1591,5 +1592,5 @@
 module_eval(<<'.,.,', 'parser.y', 202)
   def _reduce_34(val, _values, result)
-        result = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new(:attributes => val[0])
+        result = OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new(:attributes => val[0])
   
     result
@@ -1608,5 +1609,5 @@
 module_eval(<<'.,.,', 'parser.y', 225)
   def _reduce_36(val, _values, result)
-        result = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF.create do |archetype_internal_ref|
+        result = OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF.create do |archetype_internal_ref|
       archetype_internal_ref.target_path = val[0][:absolute_path]
       archetype_internal_ref.rm_type_name = val[0][:type_identifier]
@@ -1628,5 +1629,5 @@
 module_eval(<<'.,.,', 'parser.y', 237)
   def _reduce_38(val, _values, result)
-        result = OpenEHR::AM::Archetype::Constraint_Model::CONSTRAINT_REF.create do |constraint_ref|
+        result = OpenEhr::AM::Archetype::Constraint_Model::CONSTRAINT_REF.create do |constraint_ref|
       constraint_ref.reference = val[0]
     end
@@ -1672,5 +1673,5 @@
 # reduce 44 omitted
 
-module_eval(<<'.,.,', 'parser.y', 271)
+module_eval(<<'.,.,', 'parser.y', 288)
   def _reduce_45(val, _values, result)
         result = val[1]
@@ -1680,5 +1681,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 277)
+module_eval(<<'.,.,', 'parser.y', 294)
   def _reduce_46(val, _values, result)
         result = {:type_identifier => val[1], :c_occurrences => val[2], :absolute_path => val[3] }
@@ -1690,7 +1691,7 @@
 # reduce 47 omitted
 
-module_eval(<<'.,.,', 'parser.y', 284)
+module_eval(<<'.,.,', 'parser.y', 301)
   def _reduce_48(val, _values, result)
-        result = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT.create do |archetype_slot|
+        result = OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT.create do |archetype_slot|
       archetype_slot.includes = val[3]
       archetype_slot.excludes = val[4]
@@ -1703,5 +1704,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 293)
+module_eval(<<'.,.,', 'parser.y', 310)
   def _reduce_49(val, _values, result)
         result = {:c_archetype_slot_id => val[0],:c_occurrences => val[1]}
@@ -1711,5 +1712,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 298)
+module_eval(<<'.,.,', 'parser.y', 315)
   def _reduce_50(val, _values, result)
         result = val[1]
@@ -1723,8 +1724,8 @@
 # reduce 52 omitted
 
-module_eval(<<'.,.,', 'parser.y', 306)
+module_eval(<<'.,.,', 'parser.y', 323)
   def _reduce_53(val, _values, result)
-        assert_at(__FILE__,__LINE__){val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE)}
-    result = OpenEHR::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT.create do |c_primitive_object|
+        assert_at(__FILE__,__LINE__){val[0].kind_of?(OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE)}
+    result = OpenEhr::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT.create do |c_primitive_object|
       c_primitive_object.item = val[0]
     end
@@ -1734,8 +1735,8 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 314)
+module_eval(<<'.,.,', 'parser.y', 331)
   def _reduce_54(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: c_integer = #{val[0]} at #{@filename}:#{@lineno}")
-    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_INTEGER.create do |c_integer|
+    result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_INTEGER.create do |c_integer|
       c_integer.list
       c_integer.range
@@ -1747,61 +1748,61 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 323)
+module_eval(<<'.,.,', 'parser.y', 340)
   def _reduce_55(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: c_real = #{val[0]} at #{@filename}:#{@lineno}")
-    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_REAL.new
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 328)
+    result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_REAL.new
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 345)
   def _reduce_56(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: c_date = #{val[0]} at #{@filename}:#{@lineno}")
-    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE.new
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 333)
+    result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE.new
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 350)
   def _reduce_57(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: c_time = #{val[0]} at #{@filename}:#{@lineno}")
-    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_TIME.new
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 338)
+    result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_TIME.new
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 355)
   def _reduce_58(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: c_date_time = #{val[0]} at #{@filename}:#{@lineno}")
-    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME.new
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 343)
+    result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME.new
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 360)
   def _reduce_59(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: c_duration = #{val[0]} at #{@filename}:#{@lineno}")
-    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DURATION.new
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 348)
+    result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DURATION.new
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 365)
   def _reduce_60(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: c_string = #{val[0]} at #{@filename}:#{@lineno}")
-    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_STRING.new
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 353)
+    result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_STRING.new
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 370)
   def _reduce_61(val, _values, result)
-        assert_at(__FILE__,__LINE__){val[0].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN)}
+        assert_at(__FILE__,__LINE__){val[0].instance_of?(OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN)}
     @@logger.debug("#{__FILE__}:#{__LINE__}: c_boolean = #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -1813,5 +1814,5 @@
 # reduce 62 omitted
 
-module_eval(<<'.,.,', 'parser.y', 365)
+module_eval(<<'.,.,', 'parser.y', 382)
   def _reduce_63(val, _values, result)
         result = [val[0]]
@@ -1821,5 +1822,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 369)
+module_eval(<<'.,.,', 'parser.y', 386)
   def _reduce_64(val, _values, result)
         result = (val[0] << val[1])
@@ -1829,7 +1830,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 375)
+module_eval(<<'.,.,', 'parser.y', 392)
   def _reduce_65(val, _values, result)
-        assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
+        assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEhr::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
     c_attribute = val[0]
     c_attribute.children = val[3]
@@ -1840,7 +1841,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 382)
+module_eval(<<'.,.,', 'parser.y', 399)
   def _reduce_66(val, _values, result)
-        assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
+        assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEhr::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
     result = val[0]
   
@@ -1849,7 +1850,7 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 387)
+module_eval(<<'.,.,', 'parser.y', 404)
   def _reduce_67(val, _values, result)
-        assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
+        assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEhr::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
     result = val[0]
   
@@ -1858,8 +1859,8 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 394)
+module_eval(<<'.,.,', 'parser.y', 411)
   def _reduce_68(val, _values, result)
         @@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(
+    result = OpenEhr::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE.new(
                                                                               :rm_attribute_name => val[0],
                                                                               :existence => val[1]
@@ -1871,9 +1872,9 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 403)
+module_eval(<<'.,.,', 'parser.y', 420)
   def _reduce_69(val, _values, result)
-        assert_at(__FILE__,__LINE__){ val[2].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY) }
+        assert_at(__FILE__,__LINE__){ val[2].instance_of?(OpenEhr::AM::Archetype::Constraint_Model::CARDINALITY) }
     @@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(
+    result = OpenEhr::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE.new(
                                                                                 :rm_attribute_name => val[0],
                                                                                 :existence => val[1],
@@ -1885,5 +1886,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 414)
+module_eval(<<'.,.,', 'parser.y', 431)
   def _reduce_70(val, _values, result)
         result = Array[val[0]]
@@ -1893,5 +1894,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 418)
+module_eval(<<'.,.,', 'parser.y', 435)
   def _reduce_71(val, _values, result)
         result = (val[0] << val[1])
@@ -1901,5 +1902,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 422)
+module_eval(<<'.,.,', 'parser.y', 439)
   def _reduce_72(val, _values, result)
         result = Array[val[0]]
@@ -1911,5 +1912,5 @@
 # reduce 73 omitted
 
-module_eval(<<'.,.,', 'parser.y', 430)
+module_eval(<<'.,.,', 'parser.y', 447)
   def _reduce_74(val, _values, result)
         result = val[1]
@@ -1921,5 +1922,5 @@
 # reduce 75 omitted
 
-module_eval(<<'.,.,', 'parser.y', 438)
+module_eval(<<'.,.,', 'parser.y', 455)
   def _reduce_76(val, _values, result)
         result = val[1]
@@ -1945,8 +1946,8 @@
 # reduce 84 omitted
 
-module_eval(<<'.,.,', 'parser.y', 458)
+module_eval(<<'.,.,', 'parser.y', 475)
   def _reduce_85(val, _values, result)
         dadl_section = val[1]
-    result = OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY.new
+    result = OpenEhr::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY.new
   
     result
@@ -1956,46 +1957,58 @@
 # reduce 86 omitted
 
-# reduce 87 omitted
-
-# reduce 88 omitted
-
-# reduce 89 omitted
-
-module_eval(<<'.,.,', 'parser.y', 473)
+module_eval(<<'.,.,', 'parser.y', 484)
+  def _reduce_87(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}:dadl_section\n attr_vals = #{val[0]}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 489)
+  def _reduce_88(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}:dadl_section\n complex_object_block = #{val[0]}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 496)
+  def _reduce_89(val, _values, result)
+        result = Array[val[0]]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 500)
   def _reduce_90(val, _values, result)
-        result = Array[val[0]]
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 477)
+        result = (val[0] << val[1])
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 504)
   def _reduce_91(val, _values, result)
-        result = (val[0] << val[1])
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 481)
+        result = (val[0] << val[2])
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 509)
   def _reduce_92(val, _values, result)
-        result = (val[0] << val[2])
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 486)
+        @@logger.debug("#{__FILE__}:#{__LINE__}:attr_val\n attr_id = #{val[0]}, object_block = #{val[1]}")
+    result = {:attr_id => val[0], :object_block => val[2]}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 515)
   def _reduce_93(val, _values, result)
-        @@logger.debug("#{__FILE__}:#{__LINE__}: attr_id = #{val[0]} at #{@filename}:#{@lineno}")
-    result = {:attr_id => val[0], :object_block => val[2]}
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 492)
-  def _reduce_94(val, _values, result)
-        @@logger.debug("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}:#{@lineno}")
+        @@logger.debug("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]}")
     result = val[0]
   
@@ -2004,7 +2017,15 @@
 .,.,
 
-# reduce 95 omitted
-
-module_eval(<<'.,.,', 'parser.y', 499)
+# reduce 94 omitted
+
+module_eval(<<'.,.,', 'parser.y', 522)
+  def _reduce_95(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 526)
   def _reduce_96(val, _values, result)
         result = val[0]
@@ -2014,5 +2035,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 503)
+module_eval(<<'.,.,', 'parser.y', 531)
   def _reduce_97(val, _values, result)
         result = val[0]
@@ -2022,5 +2043,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 508)
+module_eval(<<'.,.,', 'parser.y', 535)
   def _reduce_98(val, _values, result)
         result = val[0]
@@ -2030,6 +2051,30 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 512)
+module_eval(<<'.,.,', 'parser.y', 540)
   def _reduce_99(val, _values, result)
+        result = {:untyped_multiple_attr_object_block => val[0]}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 544)
+  def _reduce_100(val, _values, result)
+        result = {:type_identifier => val[0], :untyped_multiple_attr_object_block => val[1]}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 549)
+  def _reduce_101(val, _values, result)
+        result = {:multiple_attr_object_block_head => val[0], :keyed_objects => val[1]}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 554)
+  def _reduce_102(val, _values, result)
         result = val[0]
   
@@ -2038,54 +2083,22 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 517)
-  def _reduce_100(val, _values, result)
-        result = {:untyped_multiple_attr_object_block => val[0]}
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 521)
-  def _reduce_101(val, _values, result)
-        result = {:type_identifier => val[0], :untyped_multiple_attr_object_block => val[1]}
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 526)
-  def _reduce_102(val, _values, result)
-        result = {:multiple_attr_object_block_head => val[0], :keyed_objects => val[1]}
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 531)
+module_eval(<<'.,.,', 'parser.y', 559)
   def _reduce_103(val, _values, result)
-        result = val[0]
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 536)
+        result = Array[val[0]]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 563)
   def _reduce_104(val, _values, result)
-        result = Array[val[0]]
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 540)
+        result = (val[0] << val[1])
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 568)
   def _reduce_105(val, _values, result)
-        result = (val[0] << val[1])
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 545)
-  def _reduce_106(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: keyed_object = #{val[0]} at #{@filename}:#{@lineno}")
     result = {:object_key => val[0], :object_block => val[2]}
@@ -2095,6 +2108,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 551)
-  def _reduce_107(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 574)
+  def _reduce_106(val, _values, result)
         @@logger.debug("object_key: [#{val[1]}] at #{@filename}:#{@lineno}")
     result = val[1]
@@ -2104,22 +2117,22 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 557)
+module_eval(<<'.,.,', 'parser.y', 580)
+  def _reduce_107(val, _values, result)
+        result = {:untyped_single_attr_object_block => val[0]}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 584)
   def _reduce_108(val, _values, result)
-        result = {:untyped_single_attr_object_block => val[0]}
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 561)
+        result = {:type_identifier => val[0], :untyped_single_attr_object_block => val[1]}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 589)
   def _reduce_109(val, _values, result)
-        result = {:type_identifier => val[0], :untyped_single_attr_object_block => val[1]}
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 566)
-  def _reduce_110(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: single_attr_object_complex_head = #{val[0]} at #{@filename}:#{@lineno}")
     result = {:single_attr_object_complex_head => val[0]}
@@ -2129,6 +2142,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 571)
-  def _reduce_111(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 594)
+  def _reduce_110(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: attr_vals = #{val[1]} at #{@filename}:#{@lineno}")
     result = {:single_attr_object_complex_head => val[0], :attr_vals => val[1]}
@@ -2138,8 +2151,8 @@
 .,.,
 
-# reduce 112 omitted
-
-module_eval(<<'.,.,', 'parser.y', 577)
-  def _reduce_113(val, _values, result)
+# reduce 111 omitted
+
+module_eval(<<'.,.,', 'parser.y', 600)
+  def _reduce_112(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: untyped_primitive_object_block = #{val[0]} at #{@filename}:#{@lineno}")
     result = {:untyped_primitive_object_block => val[0]}
@@ -2149,6 +2162,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 582)
-  def _reduce_114(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 605)
+  def _reduce_113(val, _values, result)
         @@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]}
@@ -2158,6 +2171,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 587)
-  def _reduce_115(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 610)
+  def _reduce_114(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: primitive_object_block = <#{val[1]}> at #{@filename}:#{@lineno}")
     result = val[1]
@@ -2167,5 +2180,13 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 592)
+module_eval(<<'.,.,', 'parser.y', 615)
+  def _reduce_115(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 619)
   def _reduce_116(val, _values, result)
         result = val[0]
@@ -2175,5 +2196,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 596)
+module_eval(<<'.,.,', 'parser.y', 623)
   def _reduce_117(val, _values, result)
         result = val[0]
@@ -2183,5 +2204,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 600)
+module_eval(<<'.,.,', 'parser.y', 627)
   def _reduce_118(val, _values, result)
         result = val[0]
@@ -2191,5 +2212,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 604)
+module_eval(<<'.,.,', 'parser.y', 631)
   def _reduce_119(val, _values, result)
         result = val[0]
@@ -2199,14 +2220,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 608)
+module_eval(<<'.,.,', 'parser.y', 635)
   def _reduce_120(val, _values, result)
-        result = val[0]
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 612)
-  def _reduce_121(val, _values, result)
         @@logger.debug("string_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -2216,6 +2229,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 617)
-  def _reduce_122(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 640)
+  def _reduce_121(val, _values, result)
         @@logger.debug("integer_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -2225,6 +2238,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 622)
-  def _reduce_123(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 645)
+  def _reduce_122(val, _values, result)
         @@logger.debug("real_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -2234,6 +2247,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 627)
-  def _reduce_124(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 650)
+  def _reduce_123(val, _values, result)
         @@logger.debug("boolean_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -2243,6 +2256,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 632)
-  def _reduce_125(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 655)
+  def _reduce_124(val, _values, result)
         @@logger.debug("character_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -2252,6 +2265,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 637)
-  def _reduce_126(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 660)
+  def _reduce_125(val, _values, result)
         @@logger.debug("date_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -2261,6 +2274,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 642)
-  def _reduce_127(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 665)
+  def _reduce_126(val, _values, result)
         @@logger.debug("time_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -2270,6 +2283,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 647)
-  def _reduce_128(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 670)
+  def _reduce_127(val, _values, result)
         @@logger.debug("date_time_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -2279,6 +2292,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 652)
-  def _reduce_129(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 675)
+  def _reduce_128(val, _values, result)
         @@logger.debug("duration_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -2288,6 +2301,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 657)
-  def _reduce_130(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 680)
+  def _reduce_129(val, _values, result)
         @@logger.debug("uri_value: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -2297,4 +2310,6 @@
 .,.,
 
+# reduce 130 omitted
+
 # reduce 131 omitted
 
@@ -2325,8 +2340,6 @@
 # reduce 144 omitted
 
-# reduce 145 omitted
-
-module_eval(<<'.,.,', 'parser.y', 680)
-  def _reduce_146(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 703)
+  def _reduce_145(val, _values, result)
         @@logger.debug("V_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -2336,6 +2349,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 685)
-  def _reduce_147(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 708)
+  def _reduce_146(val, _values, result)
         @@logger.debug("V_GENERIC_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -2345,6 +2358,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 691)
-  def _reduce_148(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 714)
+  def _reduce_147(val, _values, result)
         @@logger.debug("V_STRING: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -2354,11 +2367,24 @@
 .,.,
 
+# reduce 148 omitted
+
 # reduce 149 omitted
 
 # reduce 150 omitted
 
-# reduce 151 omitted
-
-module_eval(<<'.,.,', 'parser.y', 701)
+module_eval(<<'.,.,', 'parser.y', 724)
+  def _reduce_151(val, _values, result)
+        begin
+      integer = Integer(val[0])
+    rescue
+      raise
+    end
+    result = integer
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 733)
   def _reduce_152(val, _values, result)
         begin
@@ -2373,5 +2399,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 710)
+module_eval(<<'.,.,', 'parser.y', 742)
   def _reduce_153(val, _values, result)
         begin
@@ -2380,17 +2406,4 @@
       raise
     end
-    result = integer
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 719)
-  def _reduce_154(val, _values, result)
-        begin
-      integer = Integer(val[0])
-    rescue
-      raise
-    end
     result = - integer
   
@@ -2399,4 +2412,6 @@
 .,.,
 
+# reduce 154 omitted
+
 # reduce 155 omitted
 
@@ -2421,8 +2436,6 @@
 # reduce 165 omitted
 
-# reduce 166 omitted
-
-module_eval(<<'.,.,', 'parser.y', 745)
-  def _reduce_167(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 768)
+  def _reduce_166(val, _values, result)
         begin
       real = Float(val[0])
@@ -2436,5 +2449,18 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 754)
+module_eval(<<'.,.,', 'parser.y', 777)
+  def _reduce_167(val, _values, result)
+        begin
+      real = Float(val[1])
+    rescue
+      raise
+    end
+    result = real
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 786)
   def _reduce_168(val, _values, result)
         begin
@@ -2443,17 +2469,4 @@
       raise
     end
-    result = real
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 763)
-  def _reduce_169(val, _values, result)
-        begin
-      real = Float(val[1])
-    rescue
-      raise
-    end
     result = - real
   
@@ -2462,4 +2475,6 @@
 .,.,
 
+# reduce 169 omitted
+
 # reduce 170 omitted
 
@@ -2484,16 +2499,14 @@
 # reduce 180 omitted
 
-# reduce 181 omitted
-
-module_eval(<<'.,.,', 'parser.y', 788)
+module_eval(<<'.,.,', 'parser.y', 811)
+  def _reduce_181(val, _values, result)
+        result = true
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 815)
   def _reduce_182(val, _values, result)
-        result = true
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 792)
-  def _reduce_183(val, _values, result)
         result = false
   
@@ -2502,4 +2515,6 @@
 .,.,
 
+# reduce 183 omitted
+
 # reduce 184 omitted
 
@@ -2514,8 +2529,6 @@
 # reduce 189 omitted
 
-# reduce 190 omitted
-
-module_eval(<<'.,.,', 'parser.y', 807)
-  def _reduce_191(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 830)
+  def _reduce_190(val, _values, result)
         result = val[0]
   
@@ -2524,4 +2537,6 @@
 .,.,
 
+# reduce 191 omitted
+
 # reduce 192 omitted
 
@@ -2598,8 +2613,6 @@
 # reduce 228 omitted
 
-# reduce 229 omitted
-
-module_eval(<<'.,.,', 'parser.y', 858)
-  def _reduce_230(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 881)
+  def _reduce_229(val, _values, result)
         @@logger.debug("V_ISO8601_DURATION: #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -2609,4 +2622,6 @@
 .,.,
 
+# reduce 230 omitted
+
 # reduce 231 omitted
 
@@ -2631,8 +2646,6 @@
 # reduce 241 omitted
 
-# reduce 242 omitted
-
-module_eval(<<'.,.,', 'parser.y', 878)
-  def _reduce_243(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 901)
+  def _reduce_242(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: V_QUALIFIED_TERM_CODE_REF = #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -2642,12 +2655,12 @@
 .,.,
 
+# reduce 243 omitted
+
 # reduce 244 omitted
 
 # reduce 245 omitted
 
-# reduce 246 omitted
-
-module_eval(<<'.,.,', 'parser.y', 888)
-  def _reduce_247(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 911)
+  def _reduce_246(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}: V_URI = #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -2657,4 +2670,6 @@
 .,.,
 
+# reduce 247 omitted
+
 # reduce 248 omitted
 
@@ -2735,7 +2750,13 @@
 # reduce 286 omitted
 
-# reduce 287 omitted
-
-module_eval(<<'.,.,', 'parser.y', 958)
+module_eval(<<'.,.,', 'parser.y', 981)
+  def _reduce_287(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}") 
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 985)
   def _reduce_288(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}") 
@@ -2745,30 +2766,22 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 962)
+module_eval(<<'.,.,', 'parser.y', 996)
   def _reduce_289(val, _values, result)
-        @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}") 
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 973)
+        result = Range.new(1,1)
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1000)
   def _reduce_290(val, _values, result)
-        result = Range.new(1,1)
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 977)
+        result = val[3]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1005)
   def _reduce_291(val, _values, result)
-        result = val[3]
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 982)
-  def _reduce_292(val, _values, result)
         begin
       integer = Integer(val[0])
@@ -2782,6 +2795,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 991)
-  def _reduce_293(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 1014)
+  def _reduce_292(val, _values, result)
         begin
       from_integer = Integer(val[0])
@@ -2796,11 +2809,13 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1002)
-  def _reduce_294(val, _values, result)
-        result = OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY.new
-  
-    result
-  end
-.,.,
+module_eval(<<'.,.,', 'parser.y', 1025)
+  def _reduce_293(val, _values, result)
+        result = OpenEhr::AM::Archetype::Constraint_Model::CARDINALITY.new
+  
+    result
+  end
+.,.,
+
+# reduce 294 omitted
 
 # reduce 295 omitted
@@ -2818,7 +2833,13 @@
 # reduce 301 omitted
 
-# reduce 302 omitted
-
-module_eval(<<'.,.,', 'parser.y', 1016)
+module_eval(<<'.,.,', 'parser.y', 1039)
+  def _reduce_302(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1043)
   def _reduce_303(val, _values, result)
         result = val[0]
@@ -2828,6 +2849,23 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1020)
-  def _reduce_304(val, _values, result)
+# reduce 304 omitted
+
+module_eval(<<'.,.,', 'parser.y', 1050)
+  def _reduce_305(val, _values, result)
+        case val[3]
+    when OpenEhr::RM::Support::AssumedTypes::Interval
+      result = val[3]
+    else
+      result = val[3]
+    end
+  
+    result
+  end
+.,.,
+
+# reduce 306 omitted
+
+module_eval(<<'.,.,', 'parser.y', 1061)
+  def _reduce_307(val, _values, result)
         result = val[0]
   
@@ -2836,17 +2874,11 @@
 .,.,
 
-# reduce 305 omitted
-
-module_eval(<<'.,.,', 'parser.y', 1027)
-  def _reduce_306(val, _values, result)
-        result = val[3]
-  
-    result
-  end
-.,.,
-
-# reduce 307 omitted
-
-# reduce 308 omitted
+module_eval(<<'.,.,', 'parser.y', 1065)
+  def _reduce_308(val, _values, result)
+        result = OpenEhr::RM::Support::AssumedTypes::Interval.new(val[0], val[2])
+  
+    result
+  end
+.,.,
 
 # reduce 309 omitted
@@ -2936,47 +2968,53 @@
 # reduce 351 omitted
 
-# reduce 352 omitted
-
-module_eval(<<'.,.,', 'parser.y', 1097)
+module_eval(<<'.,.,', 'parser.y', 1131)
+  def _reduce_352(val, _values, result)
+        result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true)
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1135)
   def _reduce_353(val, _values, result)
-        result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true)
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 1101)
+        result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false)
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1139)
   def _reduce_354(val, _values, result)
-        result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false)
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 1105)
+        result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true,:false_valid => false)
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1143)
   def _reduce_355(val, _values, result)
-        result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true,:false_valid => false)
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 1109)
+        result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false,:false_valid => true)
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1148)
   def _reduce_356(val, _values, result)
-        result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false,:false_valid => true)
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 1114)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1152)
   def _reduce_357(val, _values, result)
-        result = val[0]
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 1118)
+        raise 'Not implemented yet'
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1156)
   def _reduce_358(val, _values, result)
         raise 'Not implemented yet'
@@ -2986,11 +3024,5 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1122)
-  def _reduce_359(val, _values, result)
-        raise 'Not implemented yet'
-  
-    result
-  end
-.,.,
+# reduce 359 omitted
 
 # reduce 360 omitted
@@ -3002,8 +3034,6 @@
 # reduce 363 omitted
 
-# reduce 364 omitted
-
-module_eval(<<'.,.,', 'parser.y', 1134)
-  def _reduce_365(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 1168)
+  def _reduce_364(val, _values, result)
         @in_interval = false
     @@logger.debug("#{__FILE__}:#{__LINE__}, #{val[0]}|#{val[2]} at #{@filename}") 
@@ -3013,5 +3043,13 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1141)
+module_eval(<<'.,.,', 'parser.y', 1175)
+  def _reduce_365(val, _values, result)
+          result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1179)
   def _reduce_366(val, _values, result)
           result = val[0]
@@ -3021,14 +3059,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1145)
+module_eval(<<'.,.,', 'parser.y', 1185)
   def _reduce_367(val, _values, result)
-          result = val[0]
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 1151)
-  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]}")
@@ -3040,11 +3070,19 @@
 .,.,
 
+# reduce 368 omitted
+
 # reduce 369 omitted
 
 # reduce 370 omitted
 
-# reduce 371 omitted
-
-module_eval(<<'.,.,', 'parser.y', 1167)
+module_eval(<<'.,.,', 'parser.y', 1201)
+  def _reduce_371(val, _values, result)
+          result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1206)
   def _reduce_372(val, _values, result)
           result = val[0]
@@ -3054,14 +3092,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1172)
+module_eval(<<'.,.,', 'parser.y', 1210)
   def _reduce_373(val, _values, result)
-          result = val[0]
-  
-    result
-  end
-.,.,
-
-module_eval(<<'.,.,', 'parser.y', 1176)
-  def _reduce_374(val, _values, result)
         @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{word} at #{@filename}")
       result = val[0]
@@ -3071,6 +3101,6 @@
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1187)
-  def _reduce_375(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 1221)
+  def _reduce_374(val, _values, result)
         result = val[0]
   
@@ -3085,3 +3115,3 @@
     end   # class Parser
     end   # module ADL
-  end   # module OpenEHR
+  end   # module OpenEhr
Index: ruby/trunk/lib/adl_parser/lib/parser.y
===================================================================
--- ruby/trunk/lib/adl_parser/lib/parser.y	(revision 299)
+++ ruby/trunk/lib/adl_parser/lib/parser.y	(revision 307)
@@ -1,4 +1,4 @@
 
-class OpenEHR::ADL::Parser
+class OpenEhr::ADL::Parser
 
 #options omit_action_call
@@ -36,5 +36,5 @@
   { 
     assert_at(__FILE__,__LINE__) do
-      val[4].instance_of?(OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION) and val[5].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT) and val[7].instance_of?(OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY) 
+      val[4].instance_of?(OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION) and val[5].instance_of?(OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT) and val[7].instance_of?(OpenEhr::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY) 
     end
     
@@ -42,7 +42,7 @@
     parent_archtype_id = val[1][:parent_archtype_id] if val[1]
     adl_version = val[0][:arch_head][:arch_meta_data][:adl_version]
-    concept = val[2]
+    concept = val[2][:arch_concept]
     language = val[3][:arch_language]
-    archetype = OpenEHR::AM::Archetype::ARCHETYPE.create(
+    archetype = OpenEhr::AM::Archetype::ARCHETYPE.create(
                                                          :archetype_id => archetype_id,
                                                          :parent_archtype_id => parent_archtype_id,
@@ -138,5 +138,5 @@
     | SYM_DESCRIPTION dadl_section
   { 
-    result = OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION.new(:details => val[1])
+    result = OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION.new(:details => val[1])
   }
   | SYM_DESCRIPTION error
@@ -154,5 +154,5 @@
 cadl_section: c_complex_object
   {
-    assert_at(__FILE__,__LINE__){val[0].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT)}
+    assert_at(__FILE__,__LINE__){val[0].instance_of?(OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT)}
     @@logger.debug("#{__FILE__}:#{__LINE__}: c_complex_object = #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -167,5 +167,5 @@
 c_complex_object: c_complx_object_head SYM_MATCHES START_REGEXP_BLOCK REGEXP_BODY END_REGEXP_BLOCK # added by akimichi
   { 
-    result = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:attributes => val[3]) do |c_complex_object|
+    result = OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:attributes => val[3]) do |c_complex_object|
       c_complex_object.node_id = val[0][:c_complex_object_id][:local_term_code_ref]
       c_complex_object.rm_type_name = val[0][:c_complex_object_id][:type_identifier]
@@ -175,5 +175,5 @@
     | c_complex_object_head SYM_MATCHES SYM_START_CBLOCK c_complex_object_body SYM_END_CBLOCK
   { 
-    result = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:attributes => val[3]) do |c_complex_object|
+    result = OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:attributes => val[3]) do |c_complex_object|
       c_complex_object.node_id = val[0][:c_complex_object_id][:local_term_code_ref]
       c_complex_object.rm_type_name = val[0][:c_complex_object_id][:type_identifier]
@@ -201,5 +201,5 @@
   | c_attributes
   { 
-    result = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new(:attributes => val[0])
+    result = OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new(:attributes => val[0])
   }
 
@@ -224,5 +224,5 @@
   | archetype_internal_ref
   {
-    result = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF.create do |archetype_internal_ref|
+    result = OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF.create do |archetype_internal_ref|
       archetype_internal_ref.target_path = val[0][:absolute_path]
       archetype_internal_ref.rm_type_name = val[0][:type_identifier]
@@ -236,5 +236,5 @@
   | constraint_ref
   {
-    result = OpenEHR::AM::Archetype::Constraint_Model::CONSTRAINT_REF.create do |constraint_ref|
+    result = OpenEhr::AM::Archetype::Constraint_Model::CONSTRAINT_REF.create do |constraint_ref|
       constraint_ref.reference = val[0]
     end
@@ -256,5 +256,4 @@
     result = val[0]
   }
-
 #  | v_c_domain_type
 #  | V_C_DOMAIN_TYPE
@@ -265,4 +264,22 @@
   #   the buffer from the current point on and be able to fast-forward the
   #   cursor to the last character matched by the dADL scanner
+### ----------/* V_C_DOMAIN_TYPE - sections of dADL syntax */ -------------------------------------------------  	----------/* V_C_DOMAIN_TYPE - sections of dADL syntax */ -------------------------------------------------
+	
+	
+### [A-Z][a-zA-Z0-9_]*[ \n]*< { -- match a pattern like 'Type_Identifier whitespace <' 	[A-Z][a-zA-Z0-9_]*[ \n]*< { -- match a pattern like 'Type_Identifier whitespace <'
+###                 set_start_condition (IN_C_DOMAIN_TYPE) 	                set_start_condition (IN_C_DOMAIN_TYPE)
+###             } 	            }
+	
+### <IN_C_DOMAIN_TYPE>[^}>]*>[ \n]*[^>}A-Z] { -- match up to next > not followed by a '}' or '>' 	<IN_C_DOMAIN_TYPE>[^}>]*>[ \n]*[^>}A-Z] { -- match up to next > not followed by a '}' or '>'
+###                  in_buffer.append_string (text) 	                 in_buffer.append_string (text)
+###              } 	             }
+	
+### <IN_C_DOMAIN_TYPE>[^}>]*>+[ \n]*[}A-Z] { -- final section - '...> whitespace } or beginning of a type identifier' 	<IN_C_DOMAIN_TYPE>[^}>]*>+[ \n]*[}A-Z] { -- final section - '...> whitespace } or beginning of a type identifier'
+
+### <IN_C_DOMAIN_TYPE>[^}>]*[ \n]*} { -- match up to next '}' not preceded by a '>' 	<IN_C_DOMAIN_TYPE>[^}>]*[ \n]*} { -- match up to next '}' not preceded by a '>'
+###                  in_buffer.append_string (text) 	                 in_buffer.append_string (text)
+###               } 	              }
+	
+
   | ERR_C_DOMAIN_TYPE
   | error
@@ -283,5 +300,5 @@
 archetype_slot: c_archetype_slot_head SYM_MATCHES SYM_START_CBLOCK c_includes c_excludes SYM_END_CBLOCK
   {
-    result = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT.create do |archetype_slot|
+    result = OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT.create do |archetype_slot|
       archetype_slot.includes = val[3]
       archetype_slot.excludes = val[4]
@@ -305,6 +322,6 @@
 c_primitive_object: c_primitive
   {
-    assert_at(__FILE__,__LINE__){val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE)}
-    result = OpenEHR::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT.create do |c_primitive_object|
+    assert_at(__FILE__,__LINE__){val[0].kind_of?(OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE)}
+    result = OpenEhr::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT.create do |c_primitive_object|
       c_primitive_object.item = val[0]
     end
@@ -314,5 +331,5 @@
   {
     @@logger.debug("#{__FILE__}:#{__LINE__}: c_integer = #{val[0]} at #{@filename}:#{@lineno}")
-    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_INTEGER.create do |c_integer|
+    result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_INTEGER.create do |c_integer|
       c_integer.list
       c_integer.range
@@ -323,34 +340,34 @@
   {
     @@logger.debug("#{__FILE__}:#{__LINE__}: c_real = #{val[0]} at #{@filename}:#{@lineno}")
-    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_REAL.new
+    result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_REAL.new
   }
   | c_date
   {
     @@logger.debug("#{__FILE__}:#{__LINE__}: c_date = #{val[0]} at #{@filename}:#{@lineno}")
-    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE.new
+    result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE.new
   }
   | c_time
   {
     @@logger.debug("#{__FILE__}:#{__LINE__}: c_time = #{val[0]} at #{@filename}:#{@lineno}")
-    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_TIME.new
+    result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_TIME.new
   }
   | c_date_time
   {
     @@logger.debug("#{__FILE__}:#{__LINE__}: c_date_time = #{val[0]} at #{@filename}:#{@lineno}")
-    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME.new
+    result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME.new
   }
   | c_duration
   {
     @@logger.debug("#{__FILE__}:#{__LINE__}: c_duration = #{val[0]} at #{@filename}:#{@lineno}")
-    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DURATION.new
+    result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DURATION.new
   }
   | c_string
   {
     @@logger.debug("#{__FILE__}:#{__LINE__}: c_string = #{val[0]} at #{@filename}:#{@lineno}")
-    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_STRING.new
+    result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_STRING.new
   }
   | c_boolean
   {
-    assert_at(__FILE__,__LINE__){val[0].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN)}
+    assert_at(__FILE__,__LINE__){val[0].instance_of?(OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN)}
     @@logger.debug("#{__FILE__}:#{__LINE__}: c_boolean = #{val[0]} at #{@filename}:#{@lineno}")
     result = val[0]
@@ -374,5 +391,5 @@
 c_attribute: c_attr_head SYM_MATCHES SYM_START_CBLOCK c_attr_values SYM_END_CBLOCK
   { 
-    assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
+    assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEhr::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
     c_attribute = val[0]
     c_attribute.children = val[3]
@@ -381,10 +398,10 @@
   | c_attr_head SYM_MATCHES START_REGEXP_BLOCK REGEXP_BODY END_REGEXP_BLOCK # added by akimichi
   { 
-    assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
+    assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEhr::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
     result = val[0]
   }
   | c_attr_head SYM_MATCHES SYM_START_CBLOCK error SYM_END_CBLOCK
   { 
-    assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
+    assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEhr::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
     result = val[0]
   }
@@ -394,5 +411,5 @@
   {
     @@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(
+    result = OpenEhr::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE.new(
                                                                               :rm_attribute_name => val[0],
                                                                               :existence => val[1]
@@ -402,7 +419,7 @@
   | V_ATTRIBUTE_IDENTIFIER c_existence c_cardinality
   {
-    assert_at(__FILE__,__LINE__){ val[2].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY) }
+    assert_at(__FILE__,__LINE__){ val[2].instance_of?(OpenEhr::AM::Archetype::Constraint_Model::CARDINALITY) }
     @@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(
+    result = OpenEhr::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE.new(
                                                                                 :rm_attribute_name => val[0],
                                                                                 :existence => val[1],
@@ -458,5 +475,5 @@
   { 
     dadl_section = val[1]
-    result = OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY.new
+    result = OpenEhr::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY.new
   }
   | SYM_ONTOLOGY error
@@ -464,8 +481,14 @@
 
 ### dADL section
-dadl_section: dadl_input
-
-dadl_input: attr_vals
+dadl_section: attr_vals
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}:dadl_section attr_vals = \n#{val[0].to_yaml}")
+    result = val[0]
+  }
   | complex_object_block
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}:dadl_section complex_object_block = \n#{val[0].to_yaml}")
+    result = val[0]
+  }
 #  | error
 
@@ -485,5 +508,5 @@
 attr_val: attr_id SYM_EQ object_block
   {
-    @@logger.debug("#{__FILE__}:#{__LINE__}: attr_id = #{val[0]} at #{@filename}:#{@lineno}")
+    @@logger.debug("#{__FILE__}:#{__LINE__}:attr_val\n attr_id = #{val[0]}, object_block = #{val[1]}")
     result = {:attr_id => val[0], :object_block => val[2]}
   }
@@ -491,5 +514,5 @@
 attr_id: V_ATTRIBUTE_IDENTIFIER
   {
-    @@logger.debug("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}:#{@lineno}")
+    @@logger.debug("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]}")
     result = val[0]
   }
@@ -1001,5 +1024,5 @@
 c_cardinality: SYM_CARDINALITY SYM_MATCHES SYM_START_CBLOCK cardinality_spec SYM_END_CBLOCK
   { 
-    result = OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY.new
+    result = OpenEhr::AM::Archetype::Constraint_Model::CARDINALITY.new
   }
 
@@ -1026,10 +1049,21 @@
   | SYM_OCCURRENCES SYM_MATCHES SYM_START_CBLOCK occurrence_spec SYM_END_CBLOCK
   { 
-    result = val[3]
+    case val[3]
+    when OpenEhr::RM::Support::AssumedTypes::Interval
+      result = val[3]
+    else
+      result = val[3]
+    end
   }
   | SYM_OCCURRENCES error
 
 occurrence_spec: cardinality_limit_value #-- single integer or '*'
+  { 
+    result = val[0]
+  }
   | V_INTEGER SYM_ELLIPSIS cardinality_limit_value
+  { 
+    result = OpenEhr::RM::Support::AssumedTypes::Interval.new(val[0], val[2])
+  }
 
 #---------------------- leaf constraint types -----------------------
@@ -1096,17 +1130,17 @@
 c_boolean_spec: SYM_TRUE
   { 
-    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true)
+    result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true)
   }
   | SYM_FALSE
   { 
-    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false)
+    result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false)
   }
   | SYM_TRUE Comma_code SYM_FALSE
   { 
-    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true,:false_valid => false)
+    result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true,:false_valid => false)
   }
   | SYM_FALSE Comma_code SYM_TRUE
   { 
-    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false,:false_valid => true)
+    result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false,:false_valid => true)
   }
 
@@ -1198,8 +1232,11 @@
 require 'yaml'
 require 'rubygems'
-require 'adl_parser.rb'
-require 'am.rb'
-require 'rm.rb'
-$DEBUG = false
+require 'open_ehr'
+#require 'adl_parser.rb'
+#require 'am.rb'
+#require 'rm.rb'
+#require 'rm/support/assumed_types.rb'
+#require 'assumed_library_types.rb'
+$DEBUG = true
 
 
@@ -1283,5 +1320,5 @@
 def scan
   @@logger.debug("#{__FILE__}:#{__LINE__}: Entering scan at #{@filename}:#{@lineno}:")
-  scanner = OpenEHR::ADL::Scanner::ADLScanner.new(@adl_type, @filename)
+  scanner = OpenEhr::ADL::Scanner::ADLScanner.new(@adl_type, @filename)
 
   until @data.nil?  do
Index: ruby/trunk/lib/adl_parser/test/dadl_embedded_cadl.dadl
===================================================================
--- ruby/trunk/lib/adl_parser/test/dadl_embedded_cadl.dadl	(revision 299)
+++ 	(revision )
@@ -1,48 +1,0 @@
-archetype_id = <"adl-test-OUTER.mixed_types.draft">
-concept = <"at0000">	--  empty definition test
-description = <
-	original_author = <
-		["name"] = <"Thomas Beale">
-		["organisation"] = <"OceanInformatics.biz">
-		["submission"] = <"01/05/2004">
-	>
-	lifecycle_state = <"draft">
-	details = <
-		["en"] = <
-			language = <"en">
-			purpose = <"Test archetype for mixed node types">
-			keywords = <"ADL", "test">
-			copyright = <"copyright (c) 2004 The openEHR Foundation">
-		>
-	>
->
-definition = <{
-	OUTER[at0000] matches {
-		items cardinality matches {0..*; ordered} matches {
-			COMPLEX_OBJECT[at0001] matches {*}
-
-			use_node COMPLEX_OBJECT /items[at0001]
-
-			use_node COMPLEX_OBJECT /items[at0002]
-
-			COMPLEX_OBJECT[at0002] matches {*}
-
-			allow_archetype COMPLEX_OBJECT matches {
-				include
-					id matches {/.*/}
-			}
-
-			COMPLEX_OBJECT[at0003] matches {*}
-		}
-	}
-}>
-ontology = <
-	term_definitions = <
-		["en"] = <
-			["at0000"] = <text = <"outer object">; description = <"outer object">>
-			["at0001"] = <text = <"complex object 1">; description = <"complex object 1">>
-			["at0002"] = <text = <"complex object 2">; description = <"complex object 2">>
-			["at0003"] = <text = <"complex object 3">; description = <"complex object 3">>
-		>
-	>
->
Index: ruby/trunk/lib/adl_parser/test/dadl_line_break.dadl
===================================================================
--- ruby/trunk/lib/adl_parser/test/dadl_line_break.dadl	(revision 299)
+++ 	(revision )
@@ -1,23 +1,0 @@
-archetype_id = <"adl-test-OUTER.mixed_types.draft">
-concept = <"at0000">	--  empty definition test
-description = <
-	original_author = <
-		["name"] = <"Thomas Beale">
-		["organisation"] = <"OceanInformatics.biz">
-		["submission"] = <"01/05/2004">
-	>
-	lifecycle_state = <"draft">
-	details = <
-		["en"] = <
-			language = <"en">
-			purpose = <"Test archetype for mixed node types. This is a really long
-				paragraph in which all kinds of annoying whitespace and linebreaks
-				appear.
-				
-				Even new paragraphs. But you have to admit it makes the text more 
-				readable.">
-			keywords = <"ADL", "test">
-			copyright = <"copyright (c) 2004 The openEHR Foundation">
-		>
-	>
->
Index: ruby/trunk/lib/adl_parser/test/parser_test.rb
===================================================================
--- ruby/trunk/lib/adl_parser/test/parser_test.rb	(revision 299)
+++ ruby/trunk/lib/adl_parser/test/parser_test.rb	(revision 307)
@@ -3,16 +3,16 @@
 class ADLParserTest < Test::Unit::TestCase
   def setup
-    @parser = ::OpenEHR::ADL::Parser.new
+    @parser = ::OpenEhr::ADL::Parser.new
   end
 
   must "assert parser instance" do
-    assert_instance_of ::OpenEHR::ADL::Parser,@parser
-  end
-
-  must "test_archetype_id.adl be properly parsed" do
-    file =  File.read("#{TEST_ROOT_DIR}/adl/test_archetype_id.adl")
+    assert_instance_of ::OpenEhr::ADL::Parser,@parser
+  end
+
+  must "openEHR-EHR-SECTION.summary.v1.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-SECTION.summary.v1.adl")
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-SECTION.summary.v1')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -22,5 +22,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-ACTION.imaging.v1')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -30,5 +30,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-ACTION.referral.v1')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -38,5 +38,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.auscultation-chest.v1')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -46,5 +46,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.auscultation.v1')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -55,5 +55,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-abdomen.v1')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -63,5 +63,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-chest.v1')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -71,5 +71,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic-joint.v1')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -79,5 +79,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic-lymphnode.v1')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -87,5 +87,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic-mass.v1')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -95,5 +95,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic.v1')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -103,5 +103,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-nervous_system.v1')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -111,5 +111,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-COMPOSITION.discharge.v1draft')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -119,5 +119,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-COMPOSITION.encounter.v1draft')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -127,5 +127,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-INSTRUCTION.medication.v1')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -135,5 +135,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-INSTRUCTION.referral.v1')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -143,5 +143,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-ITEM_TREE.Laboratory_request.v1')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -152,5 +152,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-OBSERVATION.apgar.v1')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -160,5 +160,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-SECTION.findings.v1')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -168,5 +168,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-SECTION.reason_for_encounter.v1')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -177,5 +177,5 @@
     assert_nothing_raised do
       ast = @parser.parse(file, 'openEHR-EHR-SECTION.vital_signs.v1')
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
     end
   end
@@ -187,5 +187,5 @@
 #     assert_nothing_raised do
 #       ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.dimensions-circumference.v1')
-#       assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+#       assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
 #     end
 #   end
@@ -195,5 +195,5 @@
 #     assert_nothing_raised do
 #       ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.dimensions.v1')
-#       assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+#       assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
 #     end
 #   end
@@ -203,5 +203,5 @@
 #     assert_nothing_raised do
 #       ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-fetus.v1')
-#       assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+#       assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
 #     end
 #   end
@@ -211,5 +211,5 @@
 #     assert_nothing_raised do
 #       ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-uterine_cervix.v1')
-#       assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+#       assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
 #     end
 #   end
@@ -219,5 +219,5 @@
 #     assert_nothing_raised do
 #       ast = @parser.parse(file, 'openEHR-EHR-EVALUATION.adverse.v1')
-#       assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+#       assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
 #     end
 #   end
@@ -226,5 +226,5 @@
 #     assert_nothing_raised do
 #       ast = @parser.parse(file, 'openEHR-EHR-OBSERVATION.body_mass_index.v1')
-#       assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+#       assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id
 #     end
 #   end
Index: ruby/trunk/lib/adl_parser/test/scanner_test.rb
===================================================================
--- ruby/trunk/lib/adl_parser/test/scanner_test.rb	(revision 299)
+++ ruby/trunk/lib/adl_parser/test/scanner_test.rb	(revision 307)
@@ -3,9 +3,9 @@
 class ADLScannerTest < Test::Unit::TestCase
   def setup
-    @scanner = OpenEHR::ADL::Scanner::ADLScanner.new([:adl], "filename")
+    @scanner = OpenEhr::ADL::Scanner::ADLScanner.new([:adl], "filename")
   end
 
-  must "assert OpenEHR::ADL::Scanner::ADLScanner scanner instance" do
-    assert_instance_of OpenEHR::ADL::Scanner::ADLScanner, @scanner
+  must "assert OpenEhr::ADL::Scanner::ADLScanner scanner instance" do
+    assert_instance_of OpenEhr::ADL::Scanner::ADLScanner, @scanner
   end
 
@@ -20,5 +20,5 @@
     @scanner.scan("openEHR-EHR-OBSERVATION.body_mass_index.v1") do |sym, val|
       assert_equal :V_ARCHETYPE_ID,sym
-      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID,val
+      assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID,val
     end
   end
@@ -40,9 +40,9 @@
 class CADLScannerTest < Test::Unit::TestCase
   def setup
-    @scanner = OpenEHR::ADL::Scanner::CADLScanner.new([:cadl], "filename")
+    @scanner = OpenEhr::ADL::Scanner::CADLScanner.new([:cadl], "filename")
   end
 
-  must "assert OpenEHR::ADL::Scanner::CADLScanner scanner instance" do
-    assert_instance_of OpenEHR::ADL::Scanner::CADLScanner, @scanner
+  must "assert OpenEhr::ADL::Scanner::CADLScanner scanner instance" do
+    assert_instance_of OpenEhr::ADL::Scanner::CADLScanner, @scanner
   end
 
@@ -80,5 +80,5 @@
 class DADLScannerTest < Test::Unit::TestCase
   def setup
-    @scanner = OpenEHR::ADL::Scanner::DADLScanner.new([:dadl], "filename")
+    @scanner = OpenEhr::ADL::Scanner::DADLScanner.new([:dadl], "filename")
   end
 
Index: ruby/trunk/lib/adl_parser/test/shell_test.rb
===================================================================
--- ruby/trunk/lib/adl_parser/test/shell_test.rb	(revision 299)
+++ ruby/trunk/lib/adl_parser/test/shell_test.rb	(revision 307)
@@ -3,9 +3,9 @@
 class ShellADLValidatorTest < Test::Unit::TestCase
   def setup
-    @adl_validator = ::OpenEHR::Application::ADLValidator.new(::OpenEHR::ADL::Validator.new(::OpenEHR::ADL::Parser.new))
+    @adl_validator = ::OpenEhr::Application::ADLValidator.new(::OpenEhr::ADL::Validator.new(::OpenEhr::ADL::Parser.new))
   end
 
   must "assert application validator instance" do
-    assert_instance_of ::OpenEHR::Application::ADLValidator,@adl_validator
+    assert_instance_of ::OpenEhr::Application::ADLValidator,@adl_validator
   end
 
Index: ruby/trunk/lib/adl_parser/test/test_helper.rb
===================================================================
--- ruby/trunk/lib/adl_parser/test/test_helper.rb	(revision 299)
+++ ruby/trunk/lib/adl_parser/test/test_helper.rb	(revision 307)
@@ -5,7 +5,8 @@
 require "rubygems"
 require 'adl_parser.rb'
-require 'adl_scanner.rb'
-require 'rm.rb'
-require 'am.rb'
+#require 'adl_scanner.rb'
+#require 'open_ehr'
+#require 'rm.rb'
+#require 'am.rb'
 
 
Index: ruby/trunk/lib/adl_parser/test/validator_test.rb
===================================================================
--- ruby/trunk/lib/adl_parser/test/validator_test.rb	(revision 299)
+++ ruby/trunk/lib/adl_parser/test/validator_test.rb	(revision 307)
@@ -4,9 +4,9 @@
 class ADLValidatorTest < Test::Unit::TestCase
   def setup
-    @validator = ::OpenEHR::ADL::Validator.new(::OpenEHR::ADL::Parser.new)
+    @validator = ::OpenEhr::ADL::Validator.new(::OpenEhr::ADL::Parser.new)
   end
 
   must "assert adl validator instance" do
-    assert_instance_of ::OpenEHR::ADL::Validator,@validator
+    assert_instance_of ::OpenEhr::ADL::Validator,@validator
   end
 
