Index: ruby/branches/0.0/adl_parser/lib/scanner.rb
===================================================================
--- ruby/branches/0.0/adl_parser/lib/scanner.rb	(revision 33)
+++ ruby/branches/0.0/adl_parser/lib/scanner.rb	(revision 167)
@@ -5,5 +5,5 @@
 
 
-module OpenEHR
+module OpenEhr
   module ADL
     module Scanner
@@ -138,13 +138,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
@@ -157,5 +157,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])
@@ -163,9 +163,9 @@
               end
               Yaparc::Alt.new(Yaparc::Apply.new(Yaparc::Alt.new(*reserved_parsers)) do |match|
-                                OpenEHR::ADL::Scanner::Common::LOG.info("Reserved: #{match}")
-                                [OpenEHR::ADL::Scanner::DADL::RESERVED[match], OpenEHR::ADL::Scanner::DADL::RESERVED[match]]
+                                OpenEhr::ADL::Scanner::Common::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::ADL::Scanner::Common::LOG.info("V_ATTRIBUTE_IDENTIFIER: #{match}")
+                                OpenEhr::ADL::Scanner::Common::LOG.info("V_ATTRIBUTE_IDENTIFIER: #{match}")
                                 [:V_ATTRIBUTE_IDENTIFIER, match]
                               end)
@@ -215,5 +215,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::ADL::Scanner::Common::LOG.info("V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN: #{match}")
+                OpenEhr::ADL::Scanner::Common::LOG.info("V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN: #{match}")
                 [:V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN, match]
               end
@@ -228,5 +228,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::ADL::Scanner::Common::LOG.info("V_ISO8601_DATE_CONSTRAINT_PATTERN: #{match}")
+                OpenEhr::ADL::Scanner::Common::LOG.info("V_ISO8601_DATE_CONSTRAINT_PATTERN: #{match}")
                 [:V_ISO8601_DATE_CONSTRAINT_PATTERN, match]
               end
@@ -241,5 +241,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::ADL::Scanner::Common::LOG.info("V_ISO8601_TIME_CONSTRAINT_PATTERN: #{match}")
+                OpenEhr::ADL::Scanner::Common::LOG.info("V_ISO8601_TIME_CONSTRAINT_PATTERN: #{match}")
                 [:V_ISO8601_TIME_CONSTRAINT_PATTERN, match]
               end
@@ -255,5 +255,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::ADL::Scanner::Common::LOG.info("V_ISO8601_DURATION_CONSTRAINT_PATTERN: #{match}")
+                OpenEhr::ADL::Scanner::Common::LOG.info("V_ISO8601_DURATION_CONSTRAINT_PATTERN: #{match}")
                 [:V_ISO8601_DURATION_CONSTRAINT_PATTERN, match]
               end
@@ -268,5 +268,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A[A-Z][a-zA-Z0-9_]*[ \n]*\</)) do |match|
-                OpenEHR::ADL::Scanner::Common::LOG.info("V_C_DOMAIN_TYPE: #{match}")
+                OpenEhr::ADL::Scanner::Common::LOG.info("V_C_DOMAIN_TYPE: #{match}")
                 [:START_V_C_DOMAIN_TYPE_BLOCK, match]
               end
@@ -282,17 +282,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::ADL::Scanner::Common::LOG.info("Reserved: #{match}")
-                                [OpenEHR::ADL::Scanner::CADL::RESERVED[match], OpenEHR::ADL::Scanner::CADL::RESERVED[match]]
+                                OpenEhr::ADL::Scanner::Common::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::ADL::Scanner::Common::LOG.info("V_ATTRIBUTE_IDENTIFIER: #{match}")
+                                OpenEhr::ADL::Scanner::Common::LOG.info("V_ATTRIBUTE_IDENTIFIER: #{match}")
                                 [:V_ATTRIBUTE_IDENTIFIER, match]
                               end)
