Changeset 21 for ruby/trunk/adl_parser/lib/parser.y
- Timestamp:
- Apr 30, 2008, 8:34:43 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/trunk/adl_parser/lib/parser.y
r20 r21 28 28 29 29 input: archetype EOF 30 { 31 result = val[0] 32 } 30 33 | error 31 34 32 archetype: arch_identification 33 arch_specialisation 34 arch_concept 35 arch_language 36 arch_description 37 arch_definition 38 arch_invariant 39 arch_ontology 35 archetype: arch_identification arch_specialisation arch_concept arch_language arch_description arch_definition arch_invariant arch_ontology 36 { 37 result = OpenEHR::AM::Archetype::ARCHETYPE.new( 38 :description => val[4], 39 :definition => val[5] 40 ) 41 } 40 42 41 43 … … 81 83 arch_description: #-- no meta-data ok 82 84 | SYM_DESCRIPTION dadl_section 83 | SYM_DESCRIPTION error 84 85 { 86 result = OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION.new(:details => val[1]) 87 } 88 | SYM_DESCRIPTION error 89 85 90 #arch_definition: SYM_DEFINITION V_CADL_TEXT 86 91 # | SYM_DEFINITION error 87 92 arch_definition: SYM_DEFINITION cadl_section 93 { 94 result = val[1] 95 } 88 96 | SYM_DEFINITION error 89 97 … … 91 99 ### cADL section 92 100 cadl_section: c_complex_object 101 { 102 result = val[0] 103 } 93 104 | assertions 94 105 # | error … … 96 107 #c_complex_object: c_complex_object_head SYM_MATCHES SYM_START_CBLOCK c_complex_object_body SYM_END_CBLOCK 97 108 c_complex_object: c_complex_object_head SYM_MATCHES START_REGEXP_BLOCK REGEXP_BODY END_REGEXP_BLOCK # added by akimichi 109 { 110 result = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new 111 } 98 112 | c_complex_object_head SYM_MATCHES SYM_START_CBLOCK c_complex_object_body SYM_END_CBLOCK 99 # | c_complex_object_head error SYM_END_CBLOCK 100 # { 101 # @adl_type.push(:cadl) 102 # yyerror 103 # } 113 { 114 result = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new 115 } 116 # | c_complex_object_head error SYM_END_CBLOCK 104 117 # | c_complex_object_head SYM_MATCHES SYM_START_CBLOCK c_complex_object_body c_invariants SYM_END_CBLOCK 105 118 … … 159 172 160 173 c_primitive: c_integer 174 { 175 @@log.info("#{__FILE__}:#{__LINE__}: c_integer = #{val[0]} at #{@filename}") 176 result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_Integer.new 177 } 161 178 | c_real 162 179 | c_date … … 731 748 require 'lib/util.rb' 732 749 require 'lib/scanner.rb' 733 require 'lib/model.rb' 750 #require 'lib/model.rb' 751 require 'rubygems' 752 require 'am.rb' 734 753 $DEBUG = true 735 754
Note:
See TracChangeset
for help on using the changeset viewer.