Changeset 14 for ruby/trunk/adl_parser/lib/parser.y
- Timestamp:
- Apr 16, 2008, 11:11:40 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/trunk/adl_parser/lib/parser.y
r4 r14 119 119 | c_ordinal 120 120 | c_primitive_object 121 | V_C_DOMAIN_TYPE 121 | v_c_domain_type 122 # | V_C_DOMAIN_TYPE 123 # this is an attempt to match a dADL section inside cADL. It will 124 # probably never work 100% properly since there can be '>' inside "||" 125 # ranges, and also strings containing any character, e.g. units string 126 # contining "{}" chars. The real solution is to use the dADL parser on 127 # the buffer from the current point on and be able to fast-forward the 128 # cursor to the last character matched by the dADL scanner 122 129 | ERR_C_DOMAIN_TYPE 123 130 | error 131 132 v_c_domain_type: START_V_C_DOMAIN_TYPE v_c_domain_type_body END_V_C_DOMAIN_TYPE 133 v_c_domain_type_body: dadl_section 124 134 125 135 # 'archetype_internal_ref' is a node that refers to a previously defined object node in the same archetype. … … 904 914 when /\A\<=/ # <= 905 915 yield :SYM_LE, :SYM_LE 916 when /\A[A-Z][a-zA-Z0-9_]*[ \n]*\</ # V_C_DOMAIN_TYPE 917 @in_c_domain_type = true 918 @adl_type.push(:dadl) 919 yield :START_V_C_DOMAIN_TYPE_BLOCK, :START_V_C_DOMAIN_TYPE_BLOCK 920 ### else 921 ### raise 922 ### end 906 923 when /\A\</ # < 907 924 if @in_interval … … 1101 1118 @in_interval = false 1102 1119 yield :SYM_GT, :SYM_GT 1120 elsif @in_c_domain_type 1121 @in_c_domain_type = false 1122 adl_type = @adl_type.pop 1123 assert_at(__FILE__,__LINE__){adl_type == :dadl} 1124 yield :END_V_C_DOMAIN_TYPE_BLOCK, :END_V_C_DOMAIN_TYPE_BLOCK 1103 1125 else 1104 1126 adl_type = @adl_type.pop … … 1334 1356 @in_regexp = false 1335 1357 @in_interval = false 1358 @in_c_domain_type = false 1336 1359 yyparse self, :scan 1337 1360 end
Note:
See TracChangeset
for help on using the changeset viewer.