Ignore:
Timestamp:
Nov 29, 2017, 5:09:16 PM (7 years ago)
Author:
chronos
Message:
  • Added: Top start rule can be selected for grammer. This rule is used for parser as initial rule.
File:
1 edited

Legend:

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

    r123 r124  
    1515  TFormMain = class(TForm)
    1616    ABuildCompiler: TAction;
     17    AGrammerSettings: TAction;
    1718    ANew: TAction;
    1819    ASave: TAction;
     
    2829    MenuItem10: TMenuItem;
    2930    MenuItem11: TMenuItem;
     31    MenuItem12: TMenuItem;
    3032    MenuItem2: TMenuItem;
    3133    MenuItem3: TMenuItem;
     
    4345    procedure ABuildCompilerExecute(Sender: TObject);
    4446    procedure AExitExecute(Sender: TObject);
     47    procedure AGrammerSettingsExecute(Sender: TObject);
    4548    procedure ANewExecute(Sender: TObject);
    4649    procedure AOpenExecute(Sender: TObject);
     
    6669
    6770uses
    68   UFormRules, UCore;
     71  UFormRules, UCore, UFormGrammer;
    6972
    7073{ TFormMain }
     
    123126end;
    124127
     128procedure TFormMain.AGrammerSettingsExecute(Sender: TObject);
     129var
     130  FormGrammer: TFormGrammer;
     131begin
     132  FormGrammer := TFormGrammer.Create(nil);
     133  FormGrammer.LoadData(Core.Grammer);
     134  if FormGrammer.ShowModal = mrOk then begin
     135    FormGrammer.SaveData(Core.Grammer);
     136  end;
     137  FreeAndNil(FormGrammer);
     138end;
     139
    125140procedure TFormMain.ANewExecute(Sender: TObject);
    126141begin
Note: See TracChangeset for help on using the changeset viewer.