Changeset 261 for ruby/trunk/lib/adl_parser/lib/parser.rb
- Timestamp:
- Sep 14, 2009, 5:12:29 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/trunk/lib/adl_parser/lib/parser.rb
r258 r261 24 24 class Parser < Racc::Parser 25 25 26 module_eval(<<'...end parser.y/module_eval...', 'parser.y', 1 188)26 module_eval(<<'...end parser.y/module_eval...', 'parser.y', 1206) 27 27 28 28 def assert_at(file,line, message = "") … … 33 33 34 34 if $DEBUG 35 @@log = Logger.new('log/parser.log','daily')36 @@log .level = Logger::INFO35 @@logger = Logger.new('log/parser.log','daily') 36 @@logger.level = Logger::INFO 37 37 else 38 @@log = Logger.new(STDOUT)39 @@log .level = Logger::WARN38 @@logger = Logger.new(STDOUT) 39 @@logger.level = Logger::WARN 40 40 end 41 41 … … 102 102 103 103 def scan 104 @@logger.debug("#{__FILE__}:#{__LINE__}: Entering scan at #{@filename}:#{@lineno}:") 104 105 until @data.nil? do 105 106 case @adl_type.last … … 120 121 yield sym, val 121 122 end 123 when :term_constraint 124 @@logger.debug("#{__FILE__}:#{__LINE__}: scan: Entering scan_term_constraint at #{@filename}:#{@lineno}: data = #{data.inspect}") 125 @data = scan_term_constraint(@data) do |sym, val| 126 yield sym, val 127 end 122 128 else 123 129 raise … … 130 136 131 137 def scan_adl(data) 138 @@logger.debug("#{__FILE__}:#{__LINE__}: Entering scan_adl at #{@filename}:#{@lineno}: data = #{data.inspect}") 132 139 until data.nil? do 133 140 case @adl_type.last 134 141 when :adl 135 # puts "Entering scan_adl"136 142 case data 137 143 when /\A\n/ # carriage return … … 142 148 when /\A--.*\n/ # single line comment 143 149 @lineno += 1 144 @@log .info("#{__FILE__}:#{__LINE__}: scan_adl: COMMENT = #{$&} at #{@filename}:#{@lineno}")150 @@logger.debug("#{__FILE__}:#{__LINE__}: scan_adl: COMMENT = #{$&} at #{@filename}:#{@lineno}") 145 151 ; 146 152 when /\Adescription/ # description … … 148 154 when /\Adefinition/ # definition 149 155 yield :SYM_DEFINITION, :SYM_DEFINITION 150 # @adl_type.push(:cadl)151 156 ###----------/* symbols */ ------------------------------------------------- 152 157 when /\A[A-Z][a-zA-Z0-9_]*/ 153 158 yield :V_TYPE_IDENTIFIER, $& 154 159 # when /\A[a-zA-Z][a-zA-Z0-9_-]+\.[a-zA-Z][a-zA-Z0-9_-]+\.[a-zA-Z0-9]+/ #V_ARCHETYPE_ID 155 when /\A(\w+)-(\w+)-(\w+)\.(\w+)(-\w+)?\.(v [0-9]+)/ #V_ARCHETYPE_ID160 when /\A(\w+)-(\w+)-(\w+)\.(\w+)(-\w+)?\.(v\w+)/ #V_ARCHETYPE_ID 156 161 object_id, rm_originator, rm_name, rm_entity, concept_name, specialisation, version_id = $&, $1, $2, $3, $4, $5, $6 157 162 archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new(object_id, concept_name, rm_name, rm_entity, rm_originator, specialisation, version_id) … … 162 167 word = $& 163 168 if @@adl_reserved[word] 164 @@log .info("#{__FILE__}:#{__LINE__}: scan_adl: @@adl_reserved = #{@@adl_reserved[word]} at #{@filename}:#{@lineno}")169 @@logger.debug("#{__FILE__}:#{__LINE__}: scan_adl: @@adl_reserved = #{@@adl_reserved[word]} at #{@filename}:#{@lineno}") 165 170 yield @@adl_reserved[word], @@adl_reserved[word] 166 171 elsif #/\A[A-Z][a-zA-Z0-9_]*/ 167 @@log .info("#{__FILE__}:#{__LINE__}: scan_adl: V_ATTRIBUTE_IDENTIFIER = #{$&} at #{@filename}:#{@lineno}")172 @@logger.debug("#{__FILE__}:#{__LINE__}: scan_adl: V_ATTRIBUTE_IDENTIFIER = #{$&} at #{@filename}:#{@lineno}") 168 173 yield :V_ATTRIBUTE_IDENTIFIER, $& 169 174 end … … 188 193 else 189 194 adl_type = @adl_type.pop 190 # puts "Escaping #{adl_type}"191 195 assert_at(__FILE__,__LINE__){adl_type == :dadl} 192 196 yield :SYM_END_DBLOCK, :SYM_END_DBLOCK … … 194 198 when /\A\{/ # { 195 199 @adl_type.push(:cadl) 196 @@log .info("#{__FILE__}:#{__LINE__}: scan_cadl: entering cADL at #{@filename}:#{@lineno}")200 @@logger.debug("#{__FILE__}:#{__LINE__}: scan_cadl: entering cADL at #{@filename}:#{@lineno}") 197 201 yield :SYM_START_CBLOCK, :SYM_START_CBLOCK 198 202 when /\A\}/ # } … … 200 204 # puts "Escaping #{adl_type}" 201 205 assert_at(__FILE__,__LINE__){adl_type == :cadl} 202 @@log .info("#{__FILE__}:#{__LINE__}: scan_cadl: exiting cADL at #{@filename}:#{@lineno}")206 @@logger.debug("#{__FILE__}:#{__LINE__}: scan_cadl: exiting cADL at #{@filename}:#{@lineno}") 203 207 yield :SYM_END_CBLOCK, $& 204 208 when /\A\-/ # - … … 285 289 data = $' # variable $' receives the string after the match 286 290 when :dadl 287 # puts "Entering scan_dadl"288 291 data = scan_dadl(data) do |sym, val| 289 292 yield sym, val 290 293 end 291 294 when :cadl 292 # puts "Entering scan_cadl"293 295 data = scan_cadl(data) do |sym, val| 294 296 yield sym, val 295 297 end 296 298 when :regexp 297 # puts "Entering scan_regexp"298 299 data = scan_regexp(data) do |sym, val| 299 300 yield sym, val 300 301 end 301 302 when :term_constraint 302 # puts "Entering scan_term_constraint" 303 @@logger.debug("#{__FILE__}:#{__LINE__}: scan_adl: Entering scan_term_constraint at #{@filename}:#{@lineno}: data = #{data.inspect}") 304 303 305 data = scan_term_constraint(data) do |sym, val| 304 306 yield sym, val … … 312 314 313 315 def scan_cadl(data) 316 @@logger.debug("#{__FILE__}:#{__LINE__}: Entering scan_cadl at #{@filename}:#{@lineno}: data = #{data.inspect}") 314 317 until data.nil? do 315 318 case @adl_type.last 316 319 when :cadl 317 # puts "Entering scan_cadl"318 320 case scanned = @@cadl_scanner.parse(data) 319 321 when Yaparc::Result::OK … … 336 338 when /\A--.*\n/ # single line comment 337 339 @lineno += 1 338 @@log .info("#{__FILE__}:#{__LINE__}: scan_cadl: COMMENT = #{$&} at #{@filename}:#{@lineno}")340 @@logger.debug("#{__FILE__}:#{__LINE__}: scan_cadl: COMMENT = #{$&} at #{@filename}:#{@lineno}") 339 341 ; 340 342 ###----------/* symbols */ ------------------------------------------------- … … 404 406 when /\A\{/ # { 405 407 @adl_type.push(:cadl) 406 @@log .info("#{__FILE__}:#{__LINE__}: scan_cadl: entering cADL at #{@filename}:#{@lineno}")408 @@logger.debug("#{__FILE__}:#{__LINE__}: scan_cadl: entering cADL at #{@filename}:#{@lineno}") 407 409 yield :SYM_START_CBLOCK, :SYM_START_CBLOCK 408 410 when /\A\}/ # } … … 410 412 # puts "Escaping #{adl_type}" 411 413 assert_at(__FILE__,__LINE__){adl_type == :cadl} 412 @@log .info("#{__FILE__}:#{__LINE__}: scan_cadl: exiting cADL at #{@filename}:#{@lineno}")414 @@logger.debug("#{__FILE__}:#{__LINE__}: scan_cadl: exiting cADL at #{@filename}:#{@lineno}") 413 415 yield :SYM_END_CBLOCK, :SYM_END_CBLOCK 414 416 when /\A\$/ # $ … … 419 421 yield :Question_mark_code, :Question_mark_code 420 422 when /\A\|/ # | 421 @@log .info("#{__FILE__}:#{__LINE__}: scan_cadl: @in_interval = #{@in_interval} at #{@filename}:#{@lineno}")423 @@logger.debug("#{__FILE__}:#{__LINE__}: scan_cadl: @in_interval = #{@in_interval} at #{@filename}:#{@lineno}") 422 424 if @in_interval 423 425 @in_interval = false … … 426 428 @in_interval = true 427 429 end 428 @@log .info("#{__FILE__}:#{__LINE__}: scan_cadl: SYM_INTERVAL_DELIM at #{@filename}:#{@lineno}")430 @@logger.debug("#{__FILE__}:#{__LINE__}: scan_cadl: SYM_INTERVAL_DELIM at #{@filename}:#{@lineno}") 429 431 yield :SYM_INTERVAL_DELIM, :SYM_INTERVAL_DELIM 430 432 431 when /\A\[[a-zA-Z0-9._\-]+::[a-zA-Z0-9._\-]+\]/ #V_QUALIFIED_TERM_CODE_REF form [ICD10AM(1998)::F23] 433 when /\A\[[a-zA-Z0-9()\._-]+::[a-zA-Z0-9\._-]+\]/ #V_QUALIFIED_TERM_CODE_REF form [ICD10AM(1998)::F23] 434 # when /\A\[[a-zA-Z0-9._\-]+::[a-zA-Z0-9._\-]+\]/ #V_QUALIFIED_TERM_CODE_REF form [ICD10AM(1998)::F23] 432 435 yield :V_QUALIFIED_TERM_CODE_REF, $& 433 436 when /\A\[[a-zA-Z0-9._\- ]+::[a-zA-Z0-9._\- ]+\]/ #ERR_V_QUALIFIED_TERM_CODE_REF 434 437 yield :ERR_V_QUALIFIED_TERM_CODE_REF, $& 435 when /\A\[([a-zA-Z0-9()._\-]+::[a-zA-Z0-9._\_-]+)\]/ 436 yield :V_TERM_CODE_CONSTRAINT, :V_TERM_CODE_CONSTRAINT 437 when /\A\[[a-zA-Z0-9\(\)\._\-]+::[ \t\n]*/ 438 when /\A\[([a-zA-Z0-9\(\)\._\-]+)::[ \t\n]*/ 438 439 @adl_type.push(:term_constraint) 439 yield :START_TERM_CODE_CONSTRAINT, $ &440 yield :START_TERM_CODE_CONSTRAINT, $1 440 441 when /\A\[[a-zA-Z0-9][a-zA-Z0-9._\-]*\]/ #V_LOCAL_TERM_CODE_REF 441 442 yield :V_LOCAL_TERM_CODE_REF, $& … … 457 458 yield @@cadl_reserved[word.downcase], @@cadl_reserved[word.downcase] 458 459 else 459 @@log .info("#{__FILE__}:#{__LINE__}: scan_cadl: V_ATTRIBUTE_IDENTIFIER = #{word} at #{@filename}:#{@lineno}")460 @@logger.debug("#{__FILE__}:#{__LINE__}: scan_cadl: V_ATTRIBUTE_IDENTIFIER = #{word} at #{@filename}:#{@lineno}") 460 461 yield :V_ATTRIBUTE_IDENTIFIER, word #V_ATTRIBUTE_IDENTIFIER /\A[a-z][a-zA-Z0-9_]*/ 461 462 end … … 493 494 data = $' # variable $' receives the string after the match 494 495 when :adl 495 # puts "Entering scan_adl"496 496 data = scan_adl(data) do |sym, val| 497 497 yield sym, val 498 498 end 499 499 when :dadl 500 # puts "Entering scan_dadl"501 500 data = scan_dadl(data) do |sym, val| 502 501 yield sym, val 503 502 end 504 503 when :regexp 505 # puts "Entering scan_regexp"506 504 data = scan_regexp(data) do |sym, val| 507 505 yield sym, val 508 506 end 509 507 when :term_constraint 510 # puts "Entering scan_term_constraint" 508 @@logger.debug("#{__FILE__}:#{__LINE__}: scan_cadl: Entering scan_term_constraint at #{@filename}:#{@lineno}: data = #{data.inspect}") 509 511 510 data = scan_term_constraint(data) do |sym, val| 512 511 yield sym, val … … 519 518 520 519 def scan_dadl(data) 520 @@logger.debug("#{__FILE__}:#{__LINE__}: Entering scan_dadl at #{@filename}:#{@lineno}: data = #{data.inspect}") 521 521 until data.nil? do 522 522 case @adl_type.last 523 523 when :dadl 524 # puts "Entering scan_dadl"525 524 case scanned = @@dadl_scanner.parse(data) 526 525 when Yaparc::Result::OK … … 538 537 when /\A--.*\n/ # single line comment 539 538 @lineno += 1 540 @@log .info("#{__FILE__}:#{__LINE__}: scan_dadl: COMMENT = #{$&} at #{@filename}:#{@lineno}")539 @@logger.debug("#{__FILE__}:#{__LINE__}: scan_dadl: COMMENT = #{$&} at #{@filename}:#{@lineno}") 541 540 ; 542 541 ###----------/* symbols */ ------------------------------------------------- … … 569 568 elsif @in_c_domain_type == false 570 569 adl_type = @adl_type.pop 571 # puts "Escaping #{adl_type}"572 570 assert_at(__FILE__,__LINE__){adl_type == :dadl} 573 571 yield :SYM_END_DBLOCK, $& … … 610 608 yield :Question_mark_code, :Question_mark_code 611 609 when /\A\|/ # | 612 @@log .info("#{__FILE__}:#{__LINE__}: scan_dadl: @in_interval = #{@in_interval} at #{@filename}:#{@lineno}")610 @@logger.debug("#{__FILE__}:#{__LINE__}: scan_dadl: @in_interval = #{@in_interval} at #{@filename}:#{@lineno}") 613 611 if @in_interval 614 612 @in_interval = false … … 617 615 @in_interval = true 618 616 end 619 @@log .info("#{__FILE__}:#{__LINE__}: scan_dadl: SYM_INTERVAL_DELIM at #{@filename}:#{@lineno}")617 @@logger.debug("#{__FILE__}:#{__LINE__}: scan_dadl: SYM_INTERVAL_DELIM at #{@filename}:#{@lineno}") 620 618 yield :SYM_INTERVAL_DELIM, :SYM_INTERVAL_DELIM 621 619 ### when /\A\[[a-zA-Z0-9()\._-]+::[a-zA-Z0-9\._-]+\]/ #V_QUALIFIED_TERM_CODE_REF form [ICD10AM(1998)::F23] … … 666 664 data = $' # variable $' receives the string after the match 667 665 when :adl 668 # puts "Entering scan_adl"669 666 data = scan_adl(data) do |sym, val| 670 667 yield sym, val 671 668 end 672 669 when :cadl 673 # puts "Entering scan_cadl"674 670 data = scan_cadl(data) do |sym, val| 675 671 yield sym, val … … 681 677 end 682 678 when :term_constraint 683 # puts "Entering scan_term_constraint" 679 @@logger.debug("#{__FILE__}:#{__LINE__}: scan_dadl: Entering scan_term_constraint at #{@filename}:#{@lineno}: data = #{data.inspect}") 680 684 681 data = scan_term_constraint(data) do |sym, val| 685 682 yield sym, val … … 692 689 693 690 def scan_regexp(data) 691 @@logger.debug("#{__FILE__}:#{__LINE__}: Entering scan_regexp at #{@filename}:#{@lineno}: data = #{data.inspect}") 694 692 until data.nil? do 695 693 case @adl_type.last 696 694 when :regexp 697 # puts "Entering scan_regexp"698 695 case data 699 696 when /\A\/\}/ #V_REGEXP … … 719 716 data = $' # variable $' receives the string after the match 720 717 when :adl 721 # puts "Entering scan_adl"722 718 data = scan_adl(data) do |sym, val| 723 719 yield sym, val 724 720 end 725 721 when :dadl 726 # puts "Entering scan_dadl"727 722 data = scan_dadl(data) do |sym, val| 728 723 yield sym, val 729 724 end 730 725 when :cadl 731 # puts "Entering scan_cadl"732 726 data = scan_cadl(data) do |sym, val| 733 727 yield sym, val 734 728 end 735 729 when :term_constraint 736 # puts "Entering scan_term_constraint" 730 @@logger.debug("#{__FILE__}:#{__LINE__}: scan_regexp: Entering scan_term_constraint at #{@filename}:#{@lineno}") 737 731 data = scan_term_constraint(data) do |sym, val| 738 732 yield sym, val … … 745 739 746 740 def scan_term_constraint(data) 741 @@logger.debug("#{__FILE__}:#{__LINE__}: Entering scan_term_constraint") 747 742 until data.nil? do 748 743 case @adl_type.last 749 744 when :term_constraint 750 # puts "Entering scan_term_constraint"751 745 case data 752 746 when /\A\n/ # carriage return … … 757 751 when /\A--.*$/ # single line comment 758 752 @lineno += 1 759 @@log.info("#{__FILE__}:#{__LINE__}: scan_term_constraint: COMMENT = #{$&} at #{@filename}:#{@lineno}")753 #@@logger.debug("#{__FILE__}:#{__LINE__}: scan_term_constraint: COMMENT = #{$&} at #{@filename}:#{@lineno}") 760 754 ; 761 when /\A[a-zA-Z0-9\._\-]+[ \t]*,/ # match any line, with ',' termination 762 yield :TERM_CODE, $& 763 when /\A[a-zA-Z0-9\._\-]+[ \t]*;/ #match second last line with ';' termination (assumed value) 764 yield :TERM_CODE, $& 765 # when /\A[a-zA-Z0-9\._\-]+[ \t]*\]/ # match final line, terminating in ']' 766 when /\A[a-zA-Z0-9\._\-]*[ \t]*\]/ # match final line, terminating in ']' 755 when /\A([a-zA-Z0-9\._\-])+[ \t]*,/ # match any line, with ',' termination 756 yield :TERM_CODE, $1 757 when /\A([a-zA-Z0-9\._\-])+[ \t]*;/ # match second last line with ';' termination (assumed value) 758 yield :TERM_CODE, $1 759 when /\A([a-zA-Z0-9\._\-])*[ \t]*\]/ # match final line, terminating in ']' 767 760 adl_type = @adl_type.pop 768 761 assert_at(__FILE__,__LINE__){adl_type == :term_constraint} 769 yield :END_TERM_CODE_CONSTRAINT, $ &762 yield :END_TERM_CODE_CONSTRAINT, $1 770 763 else 771 764 raise "data = #{data}" … … 773 766 data = $' # variable $' receives the string after the match 774 767 when :adl 775 # puts "Entering scan_adl"776 768 data = scan_adl(data) do |sym, val| 777 769 yield sym, val 778 770 end 779 771 when :dadl 780 # puts "Entering scan_dadl"781 772 data = scan_dadl(data) do |sym, val| 782 773 yield sym, val 783 774 end 784 775 when :cadl 785 # puts "Entering scan_cadl"786 776 data = scan_cadl(data) do |sym, val| 787 777 yield sym, val … … 1132 1122 -376, -376, -376, -195, -376, -208, -376, -221, -376, -234, 1133 1123 -376, -376, -376, -43, -305, -376, -53, -44, -376, -376, 1134 -31, -72, -310, -70, -3 5, -37, -372, -38, -39, -360,1135 -40, -376, -363, -41, -367, -366, -42, -369, -376, -3 6,1124 -31, -72, -310, -70, -36, -37, -372, -38, -39, -360, 1125 -40, -376, -363, -41, -367, -366, -42, -369, -376, -35, 1136 1126 -376, -376, -376, -376, -376, -309, -160, -175, -159, -376, 1137 1127 -174, -376, -196, -376, -209, -376, -222, -376, -235, -376, … … 1341 1331 1, 121, :_reduce_none, 1342 1332 1, 121, :_reduce_none, 1343 3, 12 2, :_reduce_45,1344 4, 12 3, :_reduce_46,1345 3, 12 3, :_reduce_none,1346 6, 12 4, :_reduce_48,1333 3, 128, :_reduce_45, 1334 4, 122, :_reduce_46, 1335 3, 122, :_reduce_none, 1336 6, 123, :_reduce_48, 1347 1337 2, 130, :_reduce_49, 1348 1338 2, 133, :_reduce_50, 1349 1339 3, 133, :_reduce_none, 1350 1340 2, 133, :_reduce_none, 1351 1, 12 8, :_reduce_53,1341 1, 127, :_reduce_53, 1352 1342 1, 134, :_reduce_54, 1353 1343 1, 134, :_reduce_55, … … 1656 1646 3, 142, :_reduce_358, 1657 1647 3, 142, :_reduce_359, 1658 1, 12 7, :_reduce_none,1659 3, 12 7, :_reduce_none,1660 3, 12 7, :_reduce_none,1648 1, 126, :_reduce_none, 1649 3, 126, :_reduce_none, 1650 3, 126, :_reduce_none, 1661 1651 1, 221, :_reduce_none, 1662 1652 3, 221, :_reduce_none, 1663 1653 3, 222, :_reduce_365, 1664 1, 12 6, :_reduce_366,1665 1, 12 6, :_reduce_367,1666 3, 223, :_reduce_ none,1654 1, 125, :_reduce_366, 1655 1, 125, :_reduce_367, 1656 3, 223, :_reduce_368, 1667 1657 0, 224, :_reduce_none, 1668 1658 1, 224, :_reduce_none, 1669 1659 2, 224, :_reduce_none, 1670 1, 12 5, :_reduce_372,1660 1, 124, :_reduce_372, 1671 1661 1, 150, :_reduce_373, 1672 1662 1, 150, :_reduce_374, … … 1917 1907 "c_attributes", 1918 1908 "c_object", 1919 "v_c_domain_type",1920 1909 "archetype_internal_ref", 1921 1910 "archetype_slot", … … 1924 1913 "c_ordinal", 1925 1914 "c_primitive_object", 1915 "v_c_domain_type", 1926 1916 "absolute_path", 1927 1917 "c_archetype_slot_head", … … 2059 2049 archetype.original_language = language 2060 2050 end 2061 @@log .info("#{__FILE__}:#{__LINE__}: archetype = #{archetype} at #{@filename}:#{@lineno}")2051 @@logger.debug("#{__FILE__}:#{__LINE__}: archetype = #{archetype} at #{@filename}:#{@lineno}") 2062 2052 result = archetype 2063 2053 … … 2203 2193 def _reduce_26(val, _values, result) 2204 2194 assert_at(__FILE__,__LINE__){val[0].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT)} 2205 @@log .info("#{__FILE__}:#{__LINE__}: c_complex_object = #{val[0]} at #{@filename}:#{@lineno}")2195 @@logger.debug("#{__FILE__}:#{__LINE__}: c_complex_object = #{val[0]} at #{@filename}:#{@lineno}") 2206 2196 result = val[0] 2207 2197 … … 2276 2266 .,., 2277 2267 2278 module_eval(<<'.,.,', 'parser.y', 2 10)2268 module_eval(<<'.,.,', 'parser.y', 220) 2279 2269 def _reduce_35(val, _values, result) 2280 result = val[0] 2281 2282 result 2283 end 2284 .,., 2285 2286 module_eval(<<'.,.,', 'parser.y', 214) 2270 @@logger.debug("#{__FILE__}:#{__LINE__}: c_complex_object = #{val[0].inspect} at #{@filename}:#{@lineno}") 2271 result = val[0] 2272 2273 result 2274 end 2275 .,., 2276 2277 module_eval(<<'.,.,', 'parser.y', 225) 2287 2278 def _reduce_36(val, _values, result) 2288 @@log.info("#{__FILE__}:#{__LINE__}: c_complex_object = #{val[0].inspect} at #{@filename}:#{@lineno}")2289 result = val[0]2290 2291 result2292 end2293 .,.,2294 2295 module_eval(<<'.,.,', 'parser.y', 219)2296 def _reduce_37(val, _values, result)2297 2279 result = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF.create do |archetype_internal_ref| 2298 2280 archetype_internal_ref.target_path = val[0][:absolute_path] … … 2305 2287 .,., 2306 2288 2307 module_eval(<<'.,.,', 'parser.y', 227) 2289 module_eval(<<'.,.,', 'parser.y', 233) 2290 def _reduce_37(val, _values, result) 2291 result = val[0] 2292 2293 result 2294 end 2295 .,., 2296 2297 module_eval(<<'.,.,', 'parser.y', 237) 2308 2298 def _reduce_38(val, _values, result) 2309 result = val[0]2310 2311 result2312 end2313 .,.,2314 2315 module_eval(<<'.,.,', 'parser.y', 231)2316 def _reduce_39(val, _values, result)2317 2299 result = OpenEHR::AM::Archetype::Constraint_Model::CONSTRAINT_REF.create do |constraint_ref| 2318 2300 constraint_ref.reference = val[0] … … 2323 2305 .,., 2324 2306 2325 module_eval(<<'.,.,', 'parser.y', 237) 2307 module_eval(<<'.,.,', 'parser.y', 243) 2308 def _reduce_39(val, _values, result) 2309 result = val[0] 2310 2311 result 2312 end 2313 .,., 2314 2315 module_eval(<<'.,.,', 'parser.y', 247) 2326 2316 def _reduce_40(val, _values, result) 2327 2317 result = val[0] … … 2331 2321 .,., 2332 2322 2333 module_eval(<<'.,.,', 'parser.y', 2 41)2323 module_eval(<<'.,.,', 'parser.y', 251) 2334 2324 def _reduce_41(val, _values, result) 2335 2325 result = val[0] … … 2339 2329 .,., 2340 2330 2341 module_eval(<<'.,.,', 'parser.y', 2 45)2331 module_eval(<<'.,.,', 'parser.y', 255) 2342 2332 def _reduce_42(val, _values, result) 2343 2333 result = val[0] … … 2351 2341 # reduce 44 omitted 2352 2342 2353 module_eval(<<'.,.,', 'parser.y', 2 60)2343 module_eval(<<'.,.,', 'parser.y', 271) 2354 2344 def _reduce_45(val, _values, result) 2355 2345 result = val[1] … … 2359 2349 .,., 2360 2350 2361 module_eval(<<'.,.,', 'parser.y', 2 66)2351 module_eval(<<'.,.,', 'parser.y', 277) 2362 2352 def _reduce_46(val, _values, result) 2363 2353 result = {:type_identifier => val[1], :c_occurrences => val[2], :absolute_path => val[3] } … … 2369 2359 # reduce 47 omitted 2370 2360 2371 module_eval(<<'.,.,', 'parser.y', 2 73)2361 module_eval(<<'.,.,', 'parser.y', 284) 2372 2362 def _reduce_48(val, _values, result) 2373 2363 result = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT.create do |archetype_slot| … … 2382 2372 .,., 2383 2373 2384 module_eval(<<'.,.,', 'parser.y', 2 82)2374 module_eval(<<'.,.,', 'parser.y', 293) 2385 2375 def _reduce_49(val, _values, result) 2386 2376 result = {:c_archetype_slot_id => val[0],:c_occurrences => val[1]} … … 2390 2380 .,., 2391 2381 2392 module_eval(<<'.,.,', 'parser.y', 2 87)2382 module_eval(<<'.,.,', 'parser.y', 298) 2393 2383 def _reduce_50(val, _values, result) 2394 2384 result = val[1] … … 2402 2392 # reduce 52 omitted 2403 2393 2404 module_eval(<<'.,.,', 'parser.y', 295)2394 module_eval(<<'.,.,', 'parser.y', 306) 2405 2395 def _reduce_53(val, _values, result) 2406 2396 assert_at(__FILE__,__LINE__){val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE)} … … 2413 2403 .,., 2414 2404 2415 module_eval(<<'.,.,', 'parser.y', 3 03)2405 module_eval(<<'.,.,', 'parser.y', 314) 2416 2406 def _reduce_54(val, _values, result) 2417 @@log .info("#{__FILE__}:#{__LINE__}: c_integer = #{val[0]} at #{@filename}:#{@lineno}")2407 @@logger.debug("#{__FILE__}:#{__LINE__}: c_integer = #{val[0]} at #{@filename}:#{@lineno}") 2418 2408 result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_INTEGER.create do |c_integer| 2419 2409 c_integer.list … … 2426 2416 .,., 2427 2417 2428 module_eval(<<'.,.,', 'parser.y', 3 12)2418 module_eval(<<'.,.,', 'parser.y', 323) 2429 2419 def _reduce_55(val, _values, result) 2430 @@log .info("#{__FILE__}:#{__LINE__}: c_real = #{val[0]} at #{@filename}:#{@lineno}")2420 @@logger.debug("#{__FILE__}:#{__LINE__}: c_real = #{val[0]} at #{@filename}:#{@lineno}") 2431 2421 result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_REAL.new 2432 2422 … … 2435 2425 .,., 2436 2426 2437 module_eval(<<'.,.,', 'parser.y', 3 17)2427 module_eval(<<'.,.,', 'parser.y', 328) 2438 2428 def _reduce_56(val, _values, result) 2439 @@log .info("#{__FILE__}:#{__LINE__}: c_date = #{val[0]} at #{@filename}:#{@lineno}")2429 @@logger.debug("#{__FILE__}:#{__LINE__}: c_date = #{val[0]} at #{@filename}:#{@lineno}") 2440 2430 result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE.new 2441 2431 … … 2444 2434 .,., 2445 2435 2446 module_eval(<<'.,.,', 'parser.y', 3 22)2436 module_eval(<<'.,.,', 'parser.y', 333) 2447 2437 def _reduce_57(val, _values, result) 2448 @@log .info("#{__FILE__}:#{__LINE__}: c_time = #{val[0]} at #{@filename}:#{@lineno}")2438 @@logger.debug("#{__FILE__}:#{__LINE__}: c_time = #{val[0]} at #{@filename}:#{@lineno}") 2449 2439 result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_TIME.new 2450 2440 … … 2453 2443 .,., 2454 2444 2455 module_eval(<<'.,.,', 'parser.y', 3 27)2445 module_eval(<<'.,.,', 'parser.y', 338) 2456 2446 def _reduce_58(val, _values, result) 2457 @@log .info("#{__FILE__}:#{__LINE__}: c_date_time = #{val[0]} at #{@filename}:#{@lineno}")2447 @@logger.debug("#{__FILE__}:#{__LINE__}: c_date_time = #{val[0]} at #{@filename}:#{@lineno}") 2458 2448 result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME.new 2459 2449 … … 2462 2452 .,., 2463 2453 2464 module_eval(<<'.,.,', 'parser.y', 3 32)2454 module_eval(<<'.,.,', 'parser.y', 343) 2465 2455 def _reduce_59(val, _values, result) 2466 @@log .info("#{__FILE__}:#{__LINE__}: c_duration = #{val[0]} at #{@filename}:#{@lineno}")2456 @@logger.debug("#{__FILE__}:#{__LINE__}: c_duration = #{val[0]} at #{@filename}:#{@lineno}") 2467 2457 result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DURATION.new 2468 2458 … … 2471 2461 .,., 2472 2462 2473 module_eval(<<'.,.,', 'parser.y', 3 37)2463 module_eval(<<'.,.,', 'parser.y', 348) 2474 2464 def _reduce_60(val, _values, result) 2475 @@log .info("#{__FILE__}:#{__LINE__}: c_string = #{val[0]} at #{@filename}:#{@lineno}")2465 @@logger.debug("#{__FILE__}:#{__LINE__}: c_string = #{val[0]} at #{@filename}:#{@lineno}") 2476 2466 result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_STRING.new 2477 2467 … … 2480 2470 .,., 2481 2471 2482 module_eval(<<'.,.,', 'parser.y', 3 42)2472 module_eval(<<'.,.,', 'parser.y', 353) 2483 2473 def _reduce_61(val, _values, result) 2484 2474 assert_at(__FILE__,__LINE__){val[0].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN)} 2485 @@log .info("#{__FILE__}:#{__LINE__}: c_boolean = #{val[0]} at #{@filename}:#{@lineno}")2475 @@logger.debug("#{__FILE__}:#{__LINE__}: c_boolean = #{val[0]} at #{@filename}:#{@lineno}") 2486 2476 result = val[0] 2487 2477 … … 2492 2482 # reduce 62 omitted 2493 2483 2494 module_eval(<<'.,.,', 'parser.y', 3 54)2484 module_eval(<<'.,.,', 'parser.y', 365) 2495 2485 def _reduce_63(val, _values, result) 2496 2486 result = [val[0]] … … 2500 2490 .,., 2501 2491 2502 module_eval(<<'.,.,', 'parser.y', 3 58)2492 module_eval(<<'.,.,', 'parser.y', 369) 2503 2493 def _reduce_64(val, _values, result) 2504 2494 result = (val[0] << val[1]) … … 2508 2498 .,., 2509 2499 2510 module_eval(<<'.,.,', 'parser.y', 3 64)2500 module_eval(<<'.,.,', 'parser.y', 375) 2511 2501 def _reduce_65(val, _values, result) 2512 2502 assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)} … … 2519 2509 .,., 2520 2510 2521 module_eval(<<'.,.,', 'parser.y', 3 71)2511 module_eval(<<'.,.,', 'parser.y', 382) 2522 2512 def _reduce_66(val, _values, result) 2523 2513 assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)} … … 2528 2518 .,., 2529 2519 2530 module_eval(<<'.,.,', 'parser.y', 3 76)2520 module_eval(<<'.,.,', 'parser.y', 387) 2531 2521 def _reduce_67(val, _values, result) 2532 2522 assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)} … … 2537 2527 .,., 2538 2528 2539 module_eval(<<'.,.,', 'parser.y', 3 83)2529 module_eval(<<'.,.,', 'parser.y', 394) 2540 2530 def _reduce_68(val, _values, result) 2541 @@log .info("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]}, c_existence = #{val[1]} at #{@filename}")2531 @@logger.debug("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]}, c_existence = #{val[1]} at #{@filename}") 2542 2532 result = OpenEHR::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE.new( 2543 2533 :rm_attribute_name => val[0], … … 2550 2540 .,., 2551 2541 2552 module_eval(<<'.,.,', 'parser.y', 392)2542 module_eval(<<'.,.,', 'parser.y', 403) 2553 2543 def _reduce_69(val, _values, result) 2554 2544 assert_at(__FILE__,__LINE__){ val[2].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY) } 2555 @@log .info("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER: #{val[0]}, c_existence = #{val[1]}, c_cardinality = #{val[2]} at #{@filename}")2545 @@logger.debug("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER: #{val[0]}, c_existence = #{val[1]}, c_cardinality = #{val[2]} at #{@filename}") 2556 2546 result = OpenEHR::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE.new( 2557 2547 :rm_attribute_name => val[0], … … 2564 2554 .,., 2565 2555 2566 module_eval(<<'.,.,', 'parser.y', 4 03)2556 module_eval(<<'.,.,', 'parser.y', 414) 2567 2557 def _reduce_70(val, _values, result) 2568 2558 result = Array[val[0]] … … 2572 2562 .,., 2573 2563 2574 module_eval(<<'.,.,', 'parser.y', 4 07)2564 module_eval(<<'.,.,', 'parser.y', 418) 2575 2565 def _reduce_71(val, _values, result) 2576 2566 result = (val[0] << val[1]) … … 2580 2570 .,., 2581 2571 2582 module_eval(<<'.,.,', 'parser.y', 4 11)2572 module_eval(<<'.,.,', 'parser.y', 422) 2583 2573 def _reduce_72(val, _values, result) 2584 2574 result = Array[val[0]] … … 2590 2580 # reduce 73 omitted 2591 2581 2592 module_eval(<<'.,.,', 'parser.y', 4 19)2582 module_eval(<<'.,.,', 'parser.y', 430) 2593 2583 def _reduce_74(val, _values, result) 2594 2584 result = val[1] … … 2600 2590 # reduce 75 omitted 2601 2591 2602 module_eval(<<'.,.,', 'parser.y', 4 27)2592 module_eval(<<'.,.,', 'parser.y', 438) 2603 2593 def _reduce_76(val, _values, result) 2604 2594 result = val[1] … … 2624 2614 # reduce 84 omitted 2625 2615 2626 module_eval(<<'.,.,', 'parser.y', 4 47)2616 module_eval(<<'.,.,', 'parser.y', 458) 2627 2617 def _reduce_85(val, _values, result) 2628 2618 dadl_section = val[1] … … 2641 2631 # reduce 89 omitted 2642 2632 2643 module_eval(<<'.,.,', 'parser.y', 4 62)2633 module_eval(<<'.,.,', 'parser.y', 473) 2644 2634 def _reduce_90(val, _values, result) 2645 2635 result = Array[val[0]] … … 2649 2639 .,., 2650 2640 2651 module_eval(<<'.,.,', 'parser.y', 4 66)2641 module_eval(<<'.,.,', 'parser.y', 477) 2652 2642 def _reduce_91(val, _values, result) 2653 2643 result = (val[0] << val[1]) … … 2657 2647 .,., 2658 2648 2659 module_eval(<<'.,.,', 'parser.y', 4 70)2649 module_eval(<<'.,.,', 'parser.y', 481) 2660 2650 def _reduce_92(val, _values, result) 2661 2651 result = (val[0] << val[2]) … … 2665 2655 .,., 2666 2656 2667 module_eval(<<'.,.,', 'parser.y', 4 75)2657 module_eval(<<'.,.,', 'parser.y', 486) 2668 2658 def _reduce_93(val, _values, result) 2669 @@log .info("#{__FILE__}:#{__LINE__}: attr_id = #{val[0]}, object_block = #{val[2]} at #{@filename}:#{@lineno}")2659 @@logger.debug("#{__FILE__}:#{__LINE__}: attr_id = #{val[0]} at #{@filename}:#{@lineno}") 2670 2660 result = {:attr_id => val[0], :object_block => val[2]} 2671 2661 … … 2674 2664 .,., 2675 2665 2676 module_eval(<<'.,.,', 'parser.y', 4 81)2666 module_eval(<<'.,.,', 'parser.y', 492) 2677 2667 def _reduce_94(val, _values, result) 2678 @@log .info("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}:#{@lineno}")2668 @@logger.debug("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}:#{@lineno}") 2679 2669 result = val[0] 2680 2670 … … 2685 2675 # reduce 95 omitted 2686 2676 2687 module_eval(<<'.,.,', 'parser.y', 4 88)2677 module_eval(<<'.,.,', 'parser.y', 499) 2688 2678 def _reduce_96(val, _values, result) 2689 2679 result = val[0] … … 2693 2683 .,., 2694 2684 2695 module_eval(<<'.,.,', 'parser.y', 492)2685 module_eval(<<'.,.,', 'parser.y', 503) 2696 2686 def _reduce_97(val, _values, result) 2697 2687 result = val[0] … … 2701 2691 .,., 2702 2692 2703 module_eval(<<'.,.,', 'parser.y', 497)2693 module_eval(<<'.,.,', 'parser.y', 508) 2704 2694 def _reduce_98(val, _values, result) 2705 2695 result = val[0] … … 2709 2699 .,., 2710 2700 2711 module_eval(<<'.,.,', 'parser.y', 5 01)2701 module_eval(<<'.,.,', 'parser.y', 512) 2712 2702 def _reduce_99(val, _values, result) 2713 2703 result = val[0] … … 2717 2707 .,., 2718 2708 2719 module_eval(<<'.,.,', 'parser.y', 5 06)2709 module_eval(<<'.,.,', 'parser.y', 517) 2720 2710 def _reduce_100(val, _values, result) 2721 2711 result = {:untyped_multiple_attr_object_block => val[0]} … … 2725 2715 .,., 2726 2716 2727 module_eval(<<'.,.,', 'parser.y', 5 10)2717 module_eval(<<'.,.,', 'parser.y', 521) 2728 2718 def _reduce_101(val, _values, result) 2729 2719 result = {:type_identifier => val[0], :untyped_multiple_attr_object_block => val[1]} … … 2733 2723 .,., 2734 2724 2735 module_eval(<<'.,.,', 'parser.y', 5 15)2725 module_eval(<<'.,.,', 'parser.y', 526) 2736 2726 def _reduce_102(val, _values, result) 2737 2727 result = {:multiple_attr_object_block_head => val[0], :keyed_objects => val[1]} … … 2741 2731 .,., 2742 2732 2743 module_eval(<<'.,.,', 'parser.y', 5 20)2733 module_eval(<<'.,.,', 'parser.y', 531) 2744 2734 def _reduce_103(val, _values, result) 2745 @@log .info("SYM_START_DBLOCK: #{val[0]} at #{@filename}:#{@lineno}")2735 @@logger.debug("SYM_START_DBLOCK: #{val[0]} at #{@filename}:#{@lineno}") 2746 2736 result = val[0] 2747 2737 … … 2750 2740 .,., 2751 2741 2752 module_eval(<<'.,.,', 'parser.y', 5 26)2742 module_eval(<<'.,.,', 'parser.y', 537) 2753 2743 def _reduce_104(val, _values, result) 2754 2744 result = Array[val[0]] … … 2758 2748 .,., 2759 2749 2760 module_eval(<<'.,.,', 'parser.y', 5 30)2750 module_eval(<<'.,.,', 'parser.y', 541) 2761 2751 def _reduce_105(val, _values, result) 2762 2752 result = (val[0] << val[1]) … … 2766 2756 .,., 2767 2757 2768 module_eval(<<'.,.,', 'parser.y', 5 35)2758 module_eval(<<'.,.,', 'parser.y', 546) 2769 2759 def _reduce_106(val, _values, result) 2770 @@log .info("#{__FILE__}:#{__LINE__}: keyed_object = #{val[0]}, object_block = #{val[2]} at #{@filename}:#{@lineno}")2760 @@logger.debug("#{__FILE__}:#{__LINE__}: keyed_object = #{val[0]} at #{@filename}:#{@lineno}") 2771 2761 result = {:object_key => val[0], :object_block => val[1]} 2772 2762 … … 2775 2765 .,., 2776 2766 2777 module_eval(<<'.,.,', 'parser.y', 5 41)2767 module_eval(<<'.,.,', 'parser.y', 552) 2778 2768 def _reduce_107(val, _values, result) 2779 @@log .info("object_key: [#{val[1]}] at #{@filename}:#{@lineno}")2769 @@logger.debug("object_key: [#{val[1]}] at #{@filename}:#{@lineno}") 2780 2770 result = val[1] 2781 2771 … … 2784 2774 .,., 2785 2775 2786 module_eval(<<'.,.,', 'parser.y', 5 47)2776 module_eval(<<'.,.,', 'parser.y', 558) 2787 2777 def _reduce_108(val, _values, result) 2788 2778 result = {:untyped_single_attr_object_block => val[0]} … … 2792 2782 .,., 2793 2783 2794 module_eval(<<'.,.,', 'parser.y', 5 51)2784 module_eval(<<'.,.,', 'parser.y', 562) 2795 2785 def _reduce_109(val, _values, result) 2796 2786 result = {:type_identifier => val[0], :untyped_single_attr_object_block => val[1]} … … 2800 2790 .,., 2801 2791 2802 module_eval(<<'.,.,', 'parser.y', 5 56)2792 module_eval(<<'.,.,', 'parser.y', 567) 2803 2793 def _reduce_110(val, _values, result) 2804 @@log .info("#{__FILE__}:#{__LINE__}: single_attr_object_complex_head = #{val[0]} at #{@filename}:#{@lineno}")2794 @@logger.debug("#{__FILE__}:#{__LINE__}: single_attr_object_complex_head = #{val[0]} at #{@filename}:#{@lineno}") 2805 2795 result = {:single_attr_object_complex_head => val[0]} 2806 2796 … … 2809 2799 .,., 2810 2800 2811 module_eval(<<'.,.,', 'parser.y', 5 61)2801 module_eval(<<'.,.,', 'parser.y', 572) 2812 2802 def _reduce_111(val, _values, result) 2813 @@log .info("#{__FILE__}:#{__LINE__}: single_attr_object_complex_head = #{val[0]},attr_vals = #{val[1]} at #{@filename}:#{@lineno}")2803 @@logger.debug("#{__FILE__}:#{__LINE__}: attr_vals = #{val[1]} at #{@filename}:#{@lineno}") 2814 2804 result = {:single_attr_object_complex_head => val[0], :attr_vals => val[1]} 2815 2805 … … 2820 2810 # reduce 112 omitted 2821 2811 2822 module_eval(<<'.,.,', 'parser.y', 5 67)2812 module_eval(<<'.,.,', 'parser.y', 578) 2823 2813 def _reduce_113(val, _values, result) 2824 @@log .info("#{__FILE__}:#{__LINE__}: untyped_primitive_object_block = #{val[0]} at #{@filename}:#{@lineno}")2814 @@logger.debug("#{__FILE__}:#{__LINE__}: untyped_primitive_object_block = #{val[0]} at #{@filename}:#{@lineno}") 2825 2815 result = {:untyped_primitive_object_block => val[0]} 2826 2816 … … 2829 2819 .,., 2830 2820 2831 module_eval(<<'.,.,', 'parser.y', 5 72)2821 module_eval(<<'.,.,', 'parser.y', 583) 2832 2822 def _reduce_114(val, _values, result) 2833 @@log .info("#{__FILE__}:#{__LINE__}: type_identifier = #{val[0]}, untyped_primitive_object_block = #{val[1]} at #{@filename}:#{@lineno}")2823 @@logger.debug("#{__FILE__}:#{__LINE__}: type_identifier = #{val[0]}, untyped_primitive_object_block = #{val[1]} at #{@filename}:#{@lineno}") 2834 2824 result = {:type_identifier => val[0], :untyped_primitive_object_block => val[1]} 2835 2825 … … 2838 2828 .,., 2839 2829 2840 module_eval(<<'.,.,', 'parser.y', 5 77)2830 module_eval(<<'.,.,', 'parser.y', 588) 2841 2831 def _reduce_115(val, _values, result) 2842 @@log .info("#{__FILE__}:#{__LINE__}: primitive_object_block = <#{val[1]}> at #{@filename}:#{@lineno}")2832 @@logger.debug("#{__FILE__}:#{__LINE__}: primitive_object_block = <#{val[1]}> at #{@filename}:#{@lineno}") 2843 2833 result = val[1] 2844 2834 … … 2847 2837 .,., 2848 2838 2849 module_eval(<<'.,.,', 'parser.y', 5 82)2839 module_eval(<<'.,.,', 'parser.y', 593) 2850 2840 def _reduce_116(val, _values, result) 2851 2841 result = val[0] … … 2855 2845 .,., 2856 2846 2857 module_eval(<<'.,.,', 'parser.y', 5 86)2847 module_eval(<<'.,.,', 'parser.y', 597) 2858 2848 def _reduce_117(val, _values, result) 2859 2849 result = val[0] … … 2863 2853 .,., 2864 2854 2865 module_eval(<<'.,.,', 'parser.y', 590)2855 module_eval(<<'.,.,', 'parser.y', 601) 2866 2856 def _reduce_118(val, _values, result) 2867 2857 result = val[0] … … 2871 2861 .,., 2872 2862 2873 module_eval(<<'.,.,', 'parser.y', 594)2863 module_eval(<<'.,.,', 'parser.y', 605) 2874 2864 def _reduce_119(val, _values, result) 2875 2865 result = val[0] … … 2879 2869 .,., 2880 2870 2881 module_eval(<<'.,.,', 'parser.y', 598)2871 module_eval(<<'.,.,', 'parser.y', 609) 2882 2872 def _reduce_120(val, _values, result) 2883 2873 result = val[0] … … 2887 2877 .,., 2888 2878 2889 module_eval(<<'.,.,', 'parser.y', 6 02)2879 module_eval(<<'.,.,', 'parser.y', 613) 2890 2880 def _reduce_121(val, _values, result) 2891 @@log .info("string_value: #{val[0]} at #{@filename}:#{@lineno}")2881 @@logger.debug("string_value: #{val[0]} at #{@filename}:#{@lineno}") 2892 2882 result = val[0] 2893 2883 … … 2896 2886 .,., 2897 2887 2898 module_eval(<<'.,.,', 'parser.y', 6 07)2888 module_eval(<<'.,.,', 'parser.y', 618) 2899 2889 def _reduce_122(val, _values, result) 2900 @@log .info("integer_value: #{val[0]} at #{@filename}:#{@lineno}")2890 @@logger.debug("integer_value: #{val[0]} at #{@filename}:#{@lineno}") 2901 2891 result = val[0] 2902 2892 … … 2905 2895 .,., 2906 2896 2907 module_eval(<<'.,.,', 'parser.y', 6 12)2897 module_eval(<<'.,.,', 'parser.y', 623) 2908 2898 def _reduce_123(val, _values, result) 2909 @@log .info("real_value: #{val[0]} at #{@filename}:#{@lineno}")2899 @@logger.debug("real_value: #{val[0]} at #{@filename}:#{@lineno}") 2910 2900 result = val[0] 2911 2901 … … 2914 2904 .,., 2915 2905 2916 module_eval(<<'.,.,', 'parser.y', 6 17)2906 module_eval(<<'.,.,', 'parser.y', 628) 2917 2907 def _reduce_124(val, _values, result) 2918 @@log .info("boolean_value: #{val[0]} at #{@filename}:#{@lineno}")2908 @@logger.debug("boolean_value: #{val[0]} at #{@filename}:#{@lineno}") 2919 2909 result = val[0] 2920 2910 … … 2923 2913 .,., 2924 2914 2925 module_eval(<<'.,.,', 'parser.y', 6 22)2915 module_eval(<<'.,.,', 'parser.y', 633) 2926 2916 def _reduce_125(val, _values, result) 2927 @@log .info("character_value: #{val[0]} at #{@filename}:#{@lineno}")2917 @@logger.debug("character_value: #{val[0]} at #{@filename}:#{@lineno}") 2928 2918 result = val[0] 2929 2919 … … 2932 2922 .,., 2933 2923 2934 module_eval(<<'.,.,', 'parser.y', 6 27)2924 module_eval(<<'.,.,', 'parser.y', 638) 2935 2925 def _reduce_126(val, _values, result) 2936 @@log .info("date_value: #{val[0]} at #{@filename}:#{@lineno}")2926 @@logger.debug("date_value: #{val[0]} at #{@filename}:#{@lineno}") 2937 2927 result = val[0] 2938 2928 … … 2941 2931 .,., 2942 2932 2943 module_eval(<<'.,.,', 'parser.y', 6 32)2933 module_eval(<<'.,.,', 'parser.y', 643) 2944 2934 def _reduce_127(val, _values, result) 2945 @@log .info("time_value: #{val[0]} at #{@filename}:#{@lineno}")2935 @@logger.debug("time_value: #{val[0]} at #{@filename}:#{@lineno}") 2946 2936 result = val[0] 2947 2937 … … 2950 2940 .,., 2951 2941 2952 module_eval(<<'.,.,', 'parser.y', 6 37)2942 module_eval(<<'.,.,', 'parser.y', 648) 2953 2943 def _reduce_128(val, _values, result) 2954 @@log .info("date_time_value: #{val[0]} at #{@filename}:#{@lineno}")2944 @@logger.debug("date_time_value: #{val[0]} at #{@filename}:#{@lineno}") 2955 2945 result = val[0] 2956 2946 … … 2959 2949 .,., 2960 2950 2961 module_eval(<<'.,.,', 'parser.y', 6 42)2951 module_eval(<<'.,.,', 'parser.y', 653) 2962 2952 def _reduce_129(val, _values, result) 2963 @@log .info("duration_value: #{val[0]} at #{@filename}:#{@lineno}")2953 @@logger.debug("duration_value: #{val[0]} at #{@filename}:#{@lineno}") 2964 2954 result = val[0] 2965 2955 … … 2968 2958 .,., 2969 2959 2970 module_eval(<<'.,.,', 'parser.y', 6 47)2960 module_eval(<<'.,.,', 'parser.y', 658) 2971 2961 def _reduce_130(val, _values, result) 2972 @@log .info("uri_value: #{val[0]} at #{@filename}:#{@lineno}")2962 @@logger.debug("uri_value: #{val[0]} at #{@filename}:#{@lineno}") 2973 2963 result = val[0] 2974 2964 … … 3007 2997 # reduce 145 omitted 3008 2998 3009 module_eval(<<'.,.,', 'parser.y', 6 70)2999 module_eval(<<'.,.,', 'parser.y', 681) 3010 3000 def _reduce_146(val, _values, result) 3011 @@log .info("V_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}")3001 @@logger.debug("V_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}") 3012 3002 result = val[0] 3013 3003 … … 3016 3006 .,., 3017 3007 3018 module_eval(<<'.,.,', 'parser.y', 6 75)3008 module_eval(<<'.,.,', 'parser.y', 686) 3019 3009 def _reduce_147(val, _values, result) 3020 @@log .info("V_GENERIC_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}")3010 @@logger.debug("V_GENERIC_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}") 3021 3011 result = val[0] 3022 3012 … … 3025 3015 .,., 3026 3016 3027 module_eval(<<'.,.,', 'parser.y', 6 81)3017 module_eval(<<'.,.,', 'parser.y', 692) 3028 3018 def _reduce_148(val, _values, result) 3029 @@log .info("V_STRING: #{val[0]} at #{@filename}:#{@lineno}")3019 @@logger.debug("V_STRING: #{val[0]} at #{@filename}:#{@lineno}") 3030 3020 result = val[0] 3031 3021 … … 3040 3030 # reduce 151 omitted 3041 3031 3042 module_eval(<<'.,.,', 'parser.y', 691)3032 module_eval(<<'.,.,', 'parser.y', 702) 3043 3033 def _reduce_152(val, _values, result) 3044 3034 begin … … 3053 3043 .,., 3054 3044 3055 module_eval(<<'.,.,', 'parser.y', 7 00)3045 module_eval(<<'.,.,', 'parser.y', 711) 3056 3046 def _reduce_153(val, _values, result) 3057 3047 begin … … 3066 3056 .,., 3067 3057 3068 module_eval(<<'.,.,', 'parser.y', 7 09)3058 module_eval(<<'.,.,', 'parser.y', 720) 3069 3059 def _reduce_154(val, _values, result) 3070 3060 begin … … 3103 3093 # reduce 166 omitted 3104 3094 3105 module_eval(<<'.,.,', 'parser.y', 7 35)3095 module_eval(<<'.,.,', 'parser.y', 746) 3106 3096 def _reduce_167(val, _values, result) 3107 3097 begin … … 3116 3106 .,., 3117 3107 3118 module_eval(<<'.,.,', 'parser.y', 7 44)3108 module_eval(<<'.,.,', 'parser.y', 755) 3119 3109 def _reduce_168(val, _values, result) 3120 3110 begin … … 3129 3119 .,., 3130 3120 3131 module_eval(<<'.,.,', 'parser.y', 7 53)3121 module_eval(<<'.,.,', 'parser.y', 764) 3132 3122 def _reduce_169(val, _values, result) 3133 3123 begin … … 3166 3156 # reduce 181 omitted 3167 3157 3168 module_eval(<<'.,.,', 'parser.y', 7 78)3158 module_eval(<<'.,.,', 'parser.y', 789) 3169 3159 def _reduce_182(val, _values, result) 3170 3160 result = true … … 3174 3164 .,., 3175 3165 3176 module_eval(<<'.,.,', 'parser.y', 7 82)3166 module_eval(<<'.,.,', 'parser.y', 793) 3177 3167 def _reduce_183(val, _values, result) 3178 3168 result = false … … 3274 3264 # reduce 229 omitted 3275 3265 3276 module_eval(<<'.,.,', 'parser.y', 8 45)3266 module_eval(<<'.,.,', 'parser.y', 856) 3277 3267 def _reduce_230(val, _values, result) 3278 @@log .info("V_ISO8601_DURATION: #{val[0]} at #{@filename}:#{@lineno}")3268 @@logger.debug("V_ISO8601_DURATION: #{val[0]} at #{@filename}:#{@lineno}") 3279 3269 result = val[0] 3280 3270 … … 3307 3297 # reduce 242 omitted 3308 3298 3309 module_eval(<<'.,.,', 'parser.y', 8 65)3299 module_eval(<<'.,.,', 'parser.y', 876) 3310 3300 def _reduce_243(val, _values, result) 3311 @@log .info("#{__FILE__}:#{__LINE__}: V_QUALIFIED_TERM_CODE_REF = #{val[0]} at #{@filename}:#{@lineno}")3301 @@logger.debug("#{__FILE__}:#{__LINE__}: V_QUALIFIED_TERM_CODE_REF = #{val[0]} at #{@filename}:#{@lineno}") 3312 3302 result = val[0] 3313 3303 … … 3322 3312 # reduce 246 omitted 3323 3313 3324 module_eval(<<'.,.,', 'parser.y', 8 75)3314 module_eval(<<'.,.,', 'parser.y', 886) 3325 3315 def _reduce_247(val, _values, result) 3326 @@log .info("#{__FILE__}:#{__LINE__}: V_URI = #{val[0]} at #{@filename}:#{@lineno}")3316 @@logger.debug("#{__FILE__}:#{__LINE__}: V_URI = #{val[0]} at #{@filename}:#{@lineno}") 3327 3317 result = val[0] 3328 3318 … … 3411 3401 # reduce 287 omitted 3412 3402 3413 module_eval(<<'.,.,', 'parser.y', 9 45)3403 module_eval(<<'.,.,', 'parser.y', 956) 3414 3404 def _reduce_288(val, _values, result) 3415 @@log .info("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}")3416 3417 result 3418 end 3419 .,., 3420 3421 module_eval(<<'.,.,', 'parser.y', 9 49)3405 @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}") 3406 3407 result 3408 end 3409 .,., 3410 3411 module_eval(<<'.,.,', 'parser.y', 960) 3422 3412 def _reduce_289(val, _values, result) 3423 @@log .info("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}")3424 3425 result 3426 end 3427 .,., 3428 3429 module_eval(<<'.,.,', 'parser.y', 9 60)3413 @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}") 3414 3415 result 3416 end 3417 .,., 3418 3419 module_eval(<<'.,.,', 'parser.y', 971) 3430 3420 def _reduce_290(val, _values, result) 3431 3421 result = Range.new(1,1) … … 3435 3425 .,., 3436 3426 3437 module_eval(<<'.,.,', 'parser.y', 9 64)3427 module_eval(<<'.,.,', 'parser.y', 975) 3438 3428 def _reduce_291(val, _values, result) 3439 3429 result = val[3] … … 3443 3433 .,., 3444 3434 3445 module_eval(<<'.,.,', 'parser.y', 9 69)3435 module_eval(<<'.,.,', 'parser.y', 980) 3446 3436 def _reduce_292(val, _values, result) 3447 3437 begin … … 3456 3446 .,., 3457 3447 3458 module_eval(<<'.,.,', 'parser.y', 9 78)3448 module_eval(<<'.,.,', 'parser.y', 989) 3459 3449 def _reduce_293(val, _values, result) 3460 3450 begin … … 3470 3460 .,., 3471 3461 3472 module_eval(<<'.,.,', 'parser.y', 989)3462 module_eval(<<'.,.,', 'parser.y', 1000) 3473 3463 def _reduce_294(val, _values, result) 3474 3464 result = OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY.new … … 3494 3484 # reduce 302 omitted 3495 3485 3496 module_eval(<<'.,.,', 'parser.y', 10 03)3486 module_eval(<<'.,.,', 'parser.y', 1014) 3497 3487 def _reduce_303(val, _values, result) 3498 3488 result = val[0] … … 3502 3492 .,., 3503 3493 3504 module_eval(<<'.,.,', 'parser.y', 10 07)3494 module_eval(<<'.,.,', 'parser.y', 1018) 3505 3495 def _reduce_304(val, _values, result) 3506 3496 result = val[0] … … 3512 3502 # reduce 305 omitted 3513 3503 3514 module_eval(<<'.,.,', 'parser.y', 10 14)3504 module_eval(<<'.,.,', 'parser.y', 1025) 3515 3505 def _reduce_306(val, _values, result) 3516 3506 result = val[3] … … 3612 3602 # reduce 352 omitted 3613 3603 3614 module_eval(<<'.,.,', 'parser.y', 10 84)3604 module_eval(<<'.,.,', 'parser.y', 1095) 3615 3605 def _reduce_353(val, _values, result) 3616 3606 result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true) … … 3620 3610 .,., 3621 3611 3622 module_eval(<<'.,.,', 'parser.y', 10 88)3612 module_eval(<<'.,.,', 'parser.y', 1099) 3623 3613 def _reduce_354(val, _values, result) 3624 3614 result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false) … … 3628 3618 .,., 3629 3619 3630 module_eval(<<'.,.,', 'parser.y', 1 092)3620 module_eval(<<'.,.,', 'parser.y', 1103) 3631 3621 def _reduce_355(val, _values, result) 3632 3622 result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true,:false_valid => false) … … 3636 3626 .,., 3637 3627 3638 module_eval(<<'.,.,', 'parser.y', 1 096)3628 module_eval(<<'.,.,', 'parser.y', 1107) 3639 3629 def _reduce_356(val, _values, result) 3640 3630 result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false,:false_valid => true) … … 3644 3634 .,., 3645 3635 3646 module_eval(<<'.,.,', 'parser.y', 11 01)3636 module_eval(<<'.,.,', 'parser.y', 1112) 3647 3637 def _reduce_357(val, _values, result) 3648 3638 result = val[0] … … 3652 3642 .,., 3653 3643 3654 module_eval(<<'.,.,', 'parser.y', 11 05)3644 module_eval(<<'.,.,', 'parser.y', 1116) 3655 3645 def _reduce_358(val, _values, result) 3656 3646 raise 'Not implemented yet' … … 3660 3650 .,., 3661 3651 3662 module_eval(<<'.,.,', 'parser.y', 11 09)3652 module_eval(<<'.,.,', 'parser.y', 1120) 3663 3653 def _reduce_359(val, _values, result) 3664 3654 raise 'Not implemented yet' … … 3678 3668 # reduce 364 omitted 3679 3669 3680 module_eval(<<'.,.,', 'parser.y', 11 21)3670 module_eval(<<'.,.,', 'parser.y', 1132) 3681 3671 def _reduce_365(val, _values, result) 3682 3672 @in_interval = false 3683 @@log .info("#{__FILE__}:#{__LINE__}, #{val[0]}|#{val[2]} at #{@filename}")3684 3685 result 3686 end 3687 .,., 3688 3689 module_eval(<<'.,.,', 'parser.y', 11 28)3673 @@logger.debug("#{__FILE__}:#{__LINE__}, #{val[0]}|#{val[2]} at #{@filename}") 3674 3675 result 3676 end 3677 .,., 3678 3679 module_eval(<<'.,.,', 'parser.y', 1139) 3690 3680 def _reduce_366(val, _values, result) 3691 3681 result = val[0] … … 3695 3685 .,., 3696 3686 3697 module_eval(<<'.,.,', 'parser.y', 11 32)3687 module_eval(<<'.,.,', 'parser.y', 1143) 3698 3688 def _reduce_367(val, _values, result) 3699 3689 result = val[0] … … 3703 3693 .,., 3704 3694 3705 # reduce 368 omitted 3695 module_eval(<<'.,.,', 'parser.y', 1149) 3696 def _reduce_368(val, _values, result) 3697 @@logger.debug("#{__FILE__}:#{__LINE__}, START_TERM_CODE_CONSTRAINT = #{val[0]} at #{@filename}") 3698 @@logger.debug("#{__FILE__}:#{__LINE__}, term_code_body = #{val[1]}") 3699 @@logger.debug("#{__FILE__}:#{__LINE__}, END_TERM_CODE_CONSTRAINT = #{val[2]}") 3700 result = val[1] 3701 3702 result 3703 end 3704 .,., 3706 3705 3707 3706 # reduce 369 omitted … … 3711 3710 # reduce 371 omitted 3712 3711 3713 module_eval(<<'.,.,', 'parser.y', 11 47)3712 module_eval(<<'.,.,', 'parser.y', 1165) 3714 3713 def _reduce_372(val, _values, result) 3715 3714 result = val[0] … … 3719 3718 .,., 3720 3719 3721 module_eval(<<'.,.,', 'parser.y', 11 52)3720 module_eval(<<'.,.,', 'parser.y', 1170) 3722 3721 def _reduce_373(val, _values, result) 3723 3722 result = val[0] … … 3727 3726 .,., 3728 3727 3729 module_eval(<<'.,.,', 'parser.y', 11 56)3728 module_eval(<<'.,.,', 'parser.y', 1174) 3730 3729 def _reduce_374(val, _values, result) 3731 @@log .info("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{word} at #{@filename}")3730 @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{word} at #{@filename}") 3732 3731 result = val[0] 3733 3732 … … 3736 3735 .,., 3737 3736 3738 module_eval(<<'.,.,', 'parser.y', 11 67)3737 module_eval(<<'.,.,', 'parser.y', 1185) 3739 3738 def _reduce_375(val, _values, result) 3740 3739 result = val[0]
Note:
See TracChangeset
for help on using the changeset viewer.