Ignore:
Timestamp:
May 1, 2008, 9:11:34 AM (16 years ago)
Author:
Tatsukawa, Akimichi
Message:

working on AM::Archetype::ARCHETYPE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ruby/trunk/adl_parser/lib/parser.y

    r23 r24  
    4848
    4949arch_identification: arch_head V_ARCHETYPE_ID
     50  {
     51    result = {:arch_head => val[0], :archetype_id => val[1] }
     52  }
    5053  | SYM_ARCHETYPE error
     54  {
     55    raise
     56  }
    5157
    5258arch_head: SYM_ARCHETYPE
     59  {
     60    result = {:arch_meta_data => nil }
     61  }
    5362  | SYM_ARCHETYPE arch_meta_data
     63  {
     64    result = {:arch_meta_data => val[1] }
     65  }
    5466
    5567arch_meta_data: Left_parenthesis_code arch_meta_data_items Right_parenthesis_code
     68  {
     69    result = {:arch_meta_data_items => val[1] }
     70  }
    5671
    5772arch_meta_data_items: arch_meta_data_item
     73  {
     74    result = Array[val[0]]
     75  }
    5876  | arch_meta_data_items Semicolon_code arch_meta_data_item
    59 #  | arch_meta_data_items ';' arch_meta_data_item
     77  {
     78    result = (val[0] << val[2])
     79  }
     80
    6081
    6182arch_meta_data_item: SYM_ADL_VERSION SYM_EQ V_VERSION_STRING
     83  {
     84    result = {:adl_version => val[2] }
     85  }
    6286  | SYM_IS_CONTROLLED
     87  {
     88    result = val[0]
     89  }
    6390
    6491# Define specialization in which its constraints are narrower than those of the parent.
Note: See TracChangeset for help on using the changeset viewer.