Ignore:
Timestamp:
Aug 9, 2017, 12:09:47 AM (7 years ago)
Author:
chronos
Message:
  • Added: RuleItem can be selected as terminal or non-terminal node.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/generator/Forms/UFormMain.pas

    r110 r111  
    5656procedure TFormMain.ARulesExecute(Sender: TObject);
    5757begin
    58   FormRules.Rules := Core.Rules;
     58  FormRules.Rules := Core.Grammer.Rules;
    5959  FormRules.ShowModal;
    60   MemoBNF.Lines.Text := Core.Rules.GetBNF;
     60  MemoBNF.Lines.Text := Core.Grammer.GetBNF;
    6161end;
    6262
    6363procedure TFormMain.ASaveAsExecute(Sender: TObject);
    6464begin
    65   SaveDialog1.FileName := Core.Rules.FileName;
     65  SaveDialog1.FileName := Core.Grammer.FileName;
    6666  if SaveDialog1.Execute then begin
    67     Core.Rules.SaveToXmlFile(SaveDialog1.FileName);
     67    Core.Grammer.SaveToXmlFile(SaveDialog1.FileName);
    6868  end;
    6969end;
     
    7171procedure TFormMain.FormShow(Sender: TObject);
    7272begin
    73   MemoBNF.Lines.Text := Core.Rules.GetBNF;
     73  MemoBNF.Lines.Text := Core.Grammer.GetBNF;
    7474end;
    7575
     
    8181procedure TFormMain.AOpenExecute(Sender: TObject);
    8282begin
    83   OpenDialog1.FileName := Core.Rules.FileName;
     83  OpenDialog1.FileName := Core.Grammer.FileName;
    8484  if OpenDialog1.Execute then begin
    85     Core.Rules.LoadFromXmlFile(OpenDialog1.FileName);
     85    Core.Grammer.LoadFromXmlFile(OpenDialog1.FileName);
    8686  end;
    8787end;
Note: See TracChangeset for help on using the changeset viewer.