Index: ruby/branches/0.5.0/lib/adl_parser/lib/scanner.rb
===================================================================
--- ruby/branches/0.5.0/lib/adl_parser/lib/scanner.rb	(revision 165)
+++ ruby/branches/0.5.0/lib/adl_parser/lib/scanner.rb	(revision 167)
@@ -4,5 +4,5 @@
 
 
-module OpenEHR
+module OpenEhr
   module ADL
     module Scanner
@@ -13,5 +13,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A\[[a-zA-Z0-9()\._-]+::[a-zA-Z0-9\._-]+\]/)) do |match|
-                OpenEHR::LOG.debug("V_QUALIFIED_TERM_CODE_REF: #{match}")
+                OpenEhr::LOG.debug("V_QUALIFIED_TERM_CODE_REF: #{match}")
                 [:V_QUALIFIED_TERM_CODE_REF, match]
               end
@@ -25,5 +25,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A\[[a-zA-Z0-9][a-zA-Z0-9._\-]*\]/)) do |match|
-                OpenEHR::LOG.debug("V_TERM_CODE_REF: #{match}")
+                OpenEhr::LOG.debug("V_TERM_CODE_REF: #{match}")
                 [:V_LOCAL_TERM_CODE_REF, match]
               end
@@ -37,5 +37,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A\[[a-zA-Z0-9._\- ]+::[a-zA-Z0-9._\- ]+\]/)) do |match|
-                OpenEHR::LOG.debug("ERR_V_QUALIFIED_TERM_CODE_REF: #{match}")
+                OpenEhr::LOG.debug("ERR_V_QUALIFIED_TERM_CODE_REF: #{match}")
                 [:ERR_V_QUALIFIED_TERM_CODE_REF, match]
               end
@@ -49,5 +49,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A[A-Z][a-zA-Z0-9_]*/)) do |match|
-                OpenEHR::LOG.debug("V_TYPE_IDENTIFIER: #{match}")
+                OpenEhr::LOG.debug("V_TYPE_IDENTIFIER: #{match}")
                 [:V_TYPE_IDENTIFIER, match]
               end
@@ -61,5 +61,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.debug("V_GENERIC_TYPE_IDENTIFIER: #{match}")
+                OpenEhr::LOG.debug("V_GENERIC_TYPE_IDENTIFIER: #{match}")
                 [:V_GENERIC_TYPE_IDENTIFIER, match]
               end
@@ -74,5 +74,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\Aa[ct][0-9.]+/)) do |match|
-                OpenEHR::LOG.debug("V_LOCAL_CODE: #{match}")
+                OpenEhr::LOG.debug("V_LOCAL_CODE: #{match}")
                 [:V_LOCAL_CODE, match]
               end
@@ -86,5 +86,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A"([^"]*)"/m)) do |match|
-                OpenEHR::LOG.debug("V_STRING: #{match}")
+                OpenEhr::LOG.debug("V_STRING: #{match}")
                 [:V_STRING, match]
               end
@@ -98,5 +98,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.debug("V_REAL: #{match}")
+                OpenEhr::LOG.debug("V_REAL: #{match}")
                 [:V_REAL, match]
               end
@@ -113,5 +113,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.debug("V_ISO8601_DURATION: #{match}")
+                OpenEhr::LOG.debug("V_ISO8601_DURATION: #{match}")
                 [:V_ISO8601_DURATION, match]
               end
@@ -135,13 +135,13 @@
             @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::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
                               )
             end
@@ -155,5 +155,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)
@@ -161,9 +161,9 @@
               end
               Yaparc::Alt.new(Yaparc::Apply.new(Yaparc::Alt.new(*reserved_parsers)) do |match|
-                                OpenEHR::LOG.debug("Reserved: #{match}")
-                                [OpenEHR::ADL::Scanner::DADL::RESERVED[match], OpenEHR::ADL::Scanner::DADL::RESERVED[match]]
+                                OpenEhr::LOG.debug("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.debug("V_ATTRIBUTE_IDENTIFIER: #{match}")
+                                OpenEhr::LOG.debug("V_ATTRIBUTE_IDENTIFIER: #{match}")
                                 [:V_ATTRIBUTE_IDENTIFIER, match]
                               end)
@@ -213,5 +213,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.debug("V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN: #{match}")
+                OpenEhr::LOG.debug("V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN: #{match}")
                 [:V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN, match]
               end
@@ -226,5 +226,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.debug("V_ISO8601_DATE_CONSTRAINT_PATTERN: #{match}")
+                OpenEhr::LOG.debug("V_ISO8601_DATE_CONSTRAINT_PATTERN: #{match}")
                 [:V_ISO8601_DATE_CONSTRAINT_PATTERN, match]
               end
@@ -239,5 +239,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.debug("V_ISO8601_TIME_CONSTRAINT_PATTERN: #{match}")
+                OpenEhr::LOG.debug("V_ISO8601_TIME_CONSTRAINT_PATTERN: #{match}")
                 [:V_ISO8601_TIME_CONSTRAINT_PATTERN, match]
               end
@@ -253,5 +253,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.debug("V_ISO8601_DURATION_CONSTRAINT_PATTERN: #{match}")
+                OpenEhr::LOG.debug("V_ISO8601_DURATION_CONSTRAINT_PATTERN: #{match}")
                 [:V_ISO8601_DURATION_CONSTRAINT_PATTERN, match]
               end
@@ -266,5 +266,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A[A-Z][a-zA-Z0-9_]*[ \n]*\</)) do |match|
-                OpenEHR::LOG.debug("V_C_DOMAIN_TYPE: #{match}")
+                OpenEhr::LOG.debug("V_C_DOMAIN_TYPE: #{match}")
                 [:START_V_C_DOMAIN_TYPE_BLOCK, match]
               end
@@ -280,17 +280,17 @@
                               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::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
                               )
             end
@@ -310,9 +310,9 @@
               end
               Yaparc::Alt.new(Yaparc::Apply.new(Yaparc::Alt.new(*reserved_parsers)) do |match|
-                                OpenEHR::LOG.debug("Reserved: #{match}")
-                                [OpenEHR::ADL::Scanner::CADL::RESERVED[match], OpenEHR::ADL::Scanner::CADL::RESERVED[match]]
+                                OpenEhr::LOG.debug("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.debug("V_ATTRIBUTE_IDENTIFIER: #{match}")
+                                OpenEhr::LOG.debug("V_ATTRIBUTE_IDENTIFIER: #{match}")
                                 [:V_ATTRIBUTE_IDENTIFIER, match]
                               end)
