Changeset 224


Ignore:
Timestamp:
Jun 16, 2023, 12:20:51 AM (19 months ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
Location:
branches/interpreter2
Files:
3 edited
19 moved

Legend:

Unmodified
Added
Removed
  • branches/interpreter2/Executor.pas

    r223 r224  
    1 unit UExecutor;
    2 
    3 {$mode delphi}
     1unit Executor;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, USource, Contnrs;
     6  Classes, SysUtils, Source, Contnrs;
    97
    108type
     
    885883end;
    886884
    887 
    888885end.
    889886
  • branches/interpreter2/Forms/FormMain.lfm

    r223 r224  
    1111  OnActivate = FormActivate
    1212  OnClose = FormClose
     13  OnCreate = FormCreate
    1314  OnDestroy = FormDestroy
    1415  OnShow = FormShow
    15   LCLVersion = '2.0.10.0'
     16  LCLVersion = '2.2.6.0'
    1617  object PanelMessages: TPanel
    1718    Left = 0
  • branches/interpreter2/Forms/FormMain.pas

    r223 r224  
    1 unit UFormMain;
    2 
    3 {$mode delphi}{$H+}
     1unit FormMain;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, Menus,
    9   ActnList, ExtCtrls, SynHighlighterPas, SynEdit, USource, UOptimizer,
    10   UGenerator;
     6  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, Menus,
     7  ActnList, ExtCtrls, SynHighlighterPas, SynEdit, Source, Optimizer,
     8  Generator, FormSource, FormMessages, FormOutput;
    119
    1210type
     
    4442    procedure AGeneratePhpExecute(Sender: TObject);
    4543    procedure AGenerateXmlExecute(Sender: TObject);
     44    procedure FormCreate(Sender: TObject);
    4645    procedure Optimize(Features: TOptimizeFeatures);
    4746    procedure ARunExecute(Sender: TObject);
     
    5352    Prog: TProgram;
    5453    Initialized: Boolean;
     54    FormSource: TFormSource;
     55    FormMessages: TFormMessages;
     56    FormOutput: TFormOutput;
    5557    procedure Generate(GeneratorClass: TGeneratorClass);
    5658    procedure ExecutorOutput(Text: string);
     
    5860    procedure UpdateInterface;
    5961    procedure DockForm(Form: TForm; DockSite: TWinControl);
    60   public
    61 
    6262  end;
    6363
     
    7171
    7272uses
    73   UParser, UExecutor, UGeneratorPascal, UGeneratorPhp, UFormMessages, UFormSource,
    74   UGeneratorCSharp, UGeneratorXml, UFormOutput, UParserPascal;
     73  Parser, Executor, GeneratorPascal, GeneratorPhp,
     74  GeneratorCSharp, GeneratorXml, ParserPascal;
    7575
    7676{ TFormMain }
     
    9393begin
    9494  if Assigned(Prog) then FreeAndNil(Prog);
     95  FreeAndNil(FormSource);
     96  FreeAndNil(FormMessages);
    9597end;
    9698
    9799procedure TFormMain.FormShow(Sender: TObject);
    98100begin
     101  FormMessages := TFormMessages.Create(nil);
     102  FormMessages.Show;
    99103  DockForm(FormMessages, PanelMessages);
     104  FormSource := TFormSource.Create(nil);
     105  FormSource.Show;
    100106  DockForm(FormSource, PanelSource);
     107  FormOutput := TFormOutput.Create(nil);
     108  FormOutput.Show;
    101109  DockForm(FormOutput, PanelOutput);
    102110  UpdateInterface;
     
    184192end;
    185193
     194procedure TFormMain.FormCreate(Sender: TObject);
     195begin
     196end;
     197
    186198procedure TFormMain.Optimize(Features: TOptimizeFeatures);
    187199var
  • branches/interpreter2/Forms/FormMessages.pas

    r223 r224  
    1 unit UFormMessages;
    2 
    3 {$mode delphi}
     1unit FormMessages;
    42
    53interface
     
    1513    Label1: TLabel;
    1614    MemoLog: TMemo;
    17   private
    18 
    1915  public
    2016    procedure Clear;
     
    2218  end;
    2319
    24 var
    25   FormMessages: TFormMessages;
    2620
    2721implementation
  • branches/interpreter2/Forms/FormOutput.pas

    r223 r224  
    1 unit UFormOutput;
    2 
    3 {$mode delphi}
     1unit FormOutput;
    42
    53interface
     
    2119    SynPHPSyn1: TSynPHPSyn;
    2220    SynXMLSyn1: TSynXMLSyn;
    23   private
    24 
    2521  public
    2622    procedure Clear;
     
    2824  end;
    2925
    30 var
    31   FormOutput: TFormOutput;
    3226
    3327implementation
  • branches/interpreter2/Forms/FormSource.pas

    r223 r224  
    1 unit UFormSource;
    2 
    3 {$mode delphi}
     1unit FormSource;
    42
    53interface
     
    1715    SynEditSource: TSynEdit;
    1816    SynFreePascalSyn1: TSynFreePascalSyn;
    19   private
    20 
    21   public
    22 
    2317  end;
    24 
    25 var
    26   FormSource: TFormSource;
    2718
    2819implementation
  • branches/interpreter2/Generator.pas

    r223 r224  
    1 unit UGenerator;
    2 
    3 {$mode delphi}
     1unit Generator;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, strutils, USource;
     6  Classes, SysUtils, strutils, Source;
    97
    108type
  • branches/interpreter2/Generators/GeneratorCSharp.pas

    r223 r224  
    1 unit UGeneratorCSharp;
    2 
    3 {$mode delphi}
     1unit GeneratorCSharp;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, strutils, USource, UGenerator;
     6  Classes, SysUtils, strutils, Source, Generator;
    97
    108type
  • branches/interpreter2/Generators/GeneratorPascal.pas

    r223 r224  
    1 unit UGeneratorPascal;
    2 
    3 {$mode delphi}
     1unit GeneratorPascal;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, strutils, USource, UGenerator;
     6  Classes, SysUtils, strutils, Source, Generator;
    97
    108type
     
    4038  end;
    4139
     40
    4241implementation
    4342
  • branches/interpreter2/Generators/GeneratorPhp.pas

    r223 r224  
    1 unit UGeneratorPhp;
    2 
    3 {$mode delphi}
     1unit GeneratorPhp;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, strutils, USource, UGenerator;
     6  Classes, SysUtils, strutils, Source, Generator;
    97
    108type
  • branches/interpreter2/Generators/GeneratorXml.pas

    r223 r224  
    1 unit UGeneratorXml;
    2 
    3 {$mode delphi}
     1unit GeneratorXml;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, USource, UGenerator;
     6  Classes, SysUtils, Source, Generator;
    97
    108type
  • branches/interpreter2/Optimizer.pas

    r223 r224  
    1 unit UOptimizer;
    2 
    3 {$mode delphi}
     1unit Optimizer;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, USource;
     6  Classes, SysUtils, Source;
    97
    108type
  • branches/interpreter2/Parser.pas

    r223 r224  
    1 unit UParser;
    2 
    3 {$mode delphi}{$H+}
     1unit Parser;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, UTokenizer, USource;
     6  Classes, SysUtils, Tokenizer, Source;
    97
    108type
  • branches/interpreter2/Parsers/ParserPascal.pas

    r223 r224  
    1 unit UParserPascal;
    2 
    3 {$mode delphi}
     1unit ParserPascal;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, UParser, UTokenizer, USource;
     6  Classes, SysUtils, Parser, Tokenizer, Source;
    97
    108type
  • branches/interpreter2/Source.pas

    r223 r224  
    1 unit USource;
    2 
    3 {$mode delphi}
     1unit Source;
    42
    53interface
     
    15181516end;
    15191517
    1520 
    15211518end.
    15221519
  • branches/interpreter2/Tokenizer.pas

    r223 r224  
    1 unit UTokenizer;
    2 
    3 {$mode delphi}{$H+}
     1unit Tokenizer;
    42
    53interface
     
    325323end;
    326324
    327 
    328 
    329325end.
    330326
  • branches/interpreter2/UInterpreter.pas

    r201 r224  
    11unit UInterpreter;
    2 
    3 {$mode delphi}
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, UParser, UExecutor;
     6  Classes, SysUtils, Parser, Executor;
    97
    108type
     
    2321    destructor Destroy; override;
    2422  end;
     23
    2524
    2625implementation
     
    5251  Executor.Free;
    5352  Parser.Free;
    54   inherited Destroy;
     53  inherited;
    5554end;
    5655
  • branches/interpreter2/interpreter.lpi

    r221 r224  
    22<CONFIG>
    33  <ProjectOptions>
    4     <Version Value="11"/>
     4    <Version Value="12"/>
    55    <General>
     6      <Flags>
     7        <CompatibilityMode Value="True"/>
     8      </Flags>
    69      <SessionStorage Value="InProjectDir"/>
    7       <MainUnit Value="0"/>
    810      <Title Value="interpreter"/>
    911      <Scaled Value="True"/>
     
    6264    <RunParams>
    6365      <FormatVersion Value="2"/>
    64       <Modes Count="0"/>
    6566    </RunParams>
    6667    <RequiredPackages Count="2">
     
    7879      </Unit0>
    7980      <Unit1>
    80         <Filename Value="UParser.pas"/>
     81        <Filename Value="Parser.pas"/>
    8182        <IsPartOfProject Value="True"/>
    8283      </Unit1>
    8384      <Unit2>
    84         <Filename Value="UTokenizer.pas"/>
     85        <Filename Value="Tokenizer.pas"/>
    8586        <IsPartOfProject Value="True"/>
    8687      </Unit2>
    8788      <Unit3>
    88         <Filename Value="USource.pas"/>
     89        <Filename Value="Source.pas"/>
    8990        <IsPartOfProject Value="True"/>
    9091      </Unit3>
    9192      <Unit4>
    92         <Filename Value="UExecutor.pas"/>
     93        <Filename Value="Executor.pas"/>
    9394        <IsPartOfProject Value="True"/>
    9495      </Unit4>
     
    9899      </Unit5>
    99100      <Unit6>
    100         <Filename Value="UGenerator.pas"/>
     101        <Filename Value="Generator.pas"/>
    101102        <IsPartOfProject Value="True"/>
    102103      </Unit6>
    103104      <Unit7>
    104         <Filename Value="Forms/UFormMessages.pas"/>
     105        <Filename Value="Forms/FormMessages.pas"/>
    105106        <IsPartOfProject Value="True"/>
    106107        <ComponentName Value="FormMessages"/>
     
    109110      </Unit7>
    110111      <Unit8>
    111         <Filename Value="Forms/UFormSource.pas"/>
     112        <Filename Value="Forms/FormSource.pas"/>
    112113        <IsPartOfProject Value="True"/>
    113114        <ComponentName Value="FormSource"/>
     
    116117      </Unit8>
    117118      <Unit9>
    118         <Filename Value="UOptimizer.pas"/>
     119        <Filename Value="Optimizer.pas"/>
    119120        <IsPartOfProject Value="True"/>
    120121      </Unit9>
    121122      <Unit10>
    122         <Filename Value="Forms/UFormOutput.pas"/>
     123        <Filename Value="Forms/FormOutput.pas"/>
    123124        <IsPartOfProject Value="True"/>
    124125        <ComponentName Value="FormOutput"/>
     
    127128      </Unit10>
    128129      <Unit11>
    129         <Filename Value="Forms/UFormMain.pas"/>
     130        <Filename Value="Forms/FormMain.pas"/>
    130131        <IsPartOfProject Value="True"/>
    131132        <ComponentName Value="FormMain"/>
     
    134135      </Unit11>
    135136      <Unit12>
    136         <Filename Value="Generators/UGeneratorCSharp.pas"/>
     137        <Filename Value="Generators/GeneratorCSharp.pas"/>
    137138        <IsPartOfProject Value="True"/>
    138139      </Unit12>
    139140      <Unit13>
    140         <Filename Value="Generators/UGeneratorPascal.pas"/>
     141        <Filename Value="Generators/GeneratorPascal.pas"/>
    141142        <IsPartOfProject Value="True"/>
    142143      </Unit13>
    143144      <Unit14>
    144         <Filename Value="Generators/UGeneratorPhp.pas"/>
     145        <Filename Value="Generators/GeneratorPhp.pas"/>
    145146        <IsPartOfProject Value="True"/>
    146147      </Unit14>
    147148      <Unit15>
    148         <Filename Value="Generators/UGeneratorXml.pas"/>
     149        <Filename Value="Generators/GeneratorXml.pas"/>
    149150        <IsPartOfProject Value="True"/>
    150151      </Unit15>
    151152      <Unit16>
    152         <Filename Value="Parsers/UParserPascal.pas"/>
     153        <Filename Value="Parsers/ParserPascal.pas"/>
    153154        <IsPartOfProject Value="True"/>
    154155      </Unit16>
     
    185186    <Linking>
    186187      <Debugging>
     188        <DebugInfoType Value="dsDwarf2Set"/>
    187189        <UseHeaptrc Value="True"/>
    188190      </Debugging>
  • branches/interpreter2/interpreter.lpr

    r221 r224  
    88  {$ENDIF}{$ENDIF}
    99  Interfaces, SysUtils, // this includes the LCL widgetset
    10   Forms, UParser, UTokenizer, USource, UExecutor, UInterpreter,
    11   UGenerator, UFormMessages,
    12   UFormSource, UOptimizer, UFormOutput, UFormMain, UParserPascal
     10  Forms, Parser, Tokenizer, Source, Executor, UInterpreter,
     11  Generator, FormMessages,
     12  FormSource, Optimizer, FormOutput, FormMain, ParserPascal
    1313  { you can add units after this };
    1414
     
    2828  Application.Scaled:=True;
    2929  Application.Initialize;
    30   Application.CreateForm(TFormMain, FormMain);
    31   Application.CreateForm(TFormMessages, FormMessages);
    32   Application.CreateForm(TFormSource, FormSource);
    33   Application.CreateForm(TFormOutput, FormOutput);
     30  Application.CreateForm(TFormMain, FormMain.FormMain);
    3431  Application.Run;
    3532end.
Note: See TracChangeset for help on using the changeset viewer.