Ignore:
Timestamp:
Nov 27, 2017, 1:09:38 PM (7 years ago)
Author:
chronos
Message:
  • Added: Rule can be set as optional or repetitive.
  • Added: Support for nested rule item sublist.
Location:
branches/generator
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/generator

    • Property svn:ignore
      •  

        old new  
        22generator.lps
        33lib
         4heaptrclog.trc
  • branches/generator/Forms/UFormRules.pas

    r116 r117  
    7373  NewRule := TRule.Create;
    7474  NewRule.Grammer := Rules.Grammer;
     75  FormRule := TFormRule.Create(nil);
    7576  FormRule.LoadData(NewRule);
    7677  if FormRule.ShowModal = mrOk then begin
     
    7980    ReloadList;
    8081  end else FreeAndNil(NewRule);
     82  FreeAndNil(FormRule);
    8183end;
    8284
     
    8486var
    8587  Rule: TRule;
     88  FormRule: TFormRule;
    8689begin
    8790  Rule := TRule(ListView1.Selected.Data);
     91  FormRule := TFormRule.Create(nil);
    8892  FormRule.LoadData(Rule);
    8993  if FormRule.ShowModal = mrOk then begin
     
    9195    ReloadList;
    9296  end;
     97  FreeAndNil(FormRule);
    9398end;
    9499
     
    118123    Item.Caption := Rules[Item.Index].Name;
    119124    Item.Data := Rules[Item.Index];
    120     Item.SubItems.Add(Rules[Item.Index].Items.GetBNF(Rules[Item.Index].Items.RuleType));
     125    Item.SubItems.Add(Rules[Item.Index].Items.GetBNF);
    121126  end;
    122127end;
Note: See TracChangeset for help on using the changeset viewer.