Ignore:
Timestamp:
Feb 14, 2012, 7:33:51 AM (13 years ago)
Author:
chronos
Message:
  • Added: Form containing list of supported compiler producers. Path to real compiler can be changed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Compiler/Produce/UProducerPascal.pas

    r26 r37  
    5656  inherited;
    5757  Name := 'Delphi';
     58  {$IFDEF Windows}
     59  CompilerPath := 'c:\Program Files\Embarcadero\RAD Studio\9.0\bin\DCC32.EXE';
     60  {$ENDIF}
    5861end;
    5962
     
    6972begin
    7073  EmitLn('uses');
    71   Inc(Indetation);
     74  Inc(Indentation);
    7275  for I := 0 to UsedModules.Count - 1 do begin
    7376    if Assigned(TUsedModule(UsedModules[I]).Module) then
     
    8386  end;
    8487  EmitLn(';');
    85   Dec(Indetation);
     88  Dec(Indentation);
    8689  EmitLn;
    8790end;
     
    134137  if AType is TTypeRecord then begin
    135138    EmitLn('record');
    136     Inc(Indetation);
     139    Inc(Indentation);
    137140    with TTypeRecord(AType).CommonBlock do
    138141    for I := 0 to Variables.Count - 1 do begin
     
    141144      EmitLn(';');
    142145    end;
    143     Dec(Indetation);
     146    Dec(Indentation);
    144147    Emit('end');
    145148  end else
     
    174177  if Types.Count > 0 then begin
    175178    EmitLn('type');
    176     Inc(Indetation);
     179    Inc(Indentation);
    177180    for I := 0 to Types.Count - 1 do
    178181    with TType(Types[I]) do
     
    182185      EmitLn(';');
    183186    end;
    184     Dec(Indetation);
     187    Dec(Indentation);
    185188    EmitLn;
    186189  end;
     
    257260  if Constants.Count > 0 then begin
    258261    EmitLn('const');
    259     Inc(Indetation);
     262    Inc(Indentation);
    260263    for I := 0 to Constants.Count - 1 do
    261264      GenerateConstant(TConstant(Constants[I]));
    262     Dec(Indetation);
     265    Dec(Indentation);
    263266    Emit('');
    264267  end;
     
    279282begin
    280283  EmitLn('begin');
    281   Inc(Indetation);
     284  Inc(Indentation);
    282285  // Commands
    283286  for I := 0 to BeginEnd.Commands.Count - 1 do begin
     
    286289  end;
    287290
    288   Dec(Indetation);
     291  Dec(Indentation);
    289292  Emit('end');
    290293end;
     
    295298begin
    296299  EmitLn('var');
    297   Inc(Indetation);
     300  Inc(Indentation);
    298301  for I := 0 to Variables.Count - 1 do
    299302    GenerateVariable(TVariable(Variables[I]));
    300   Dec(Indetation);
     303  Dec(Indentation);
    301304  EmitLn;
    302305end;
     
    404407  Section: TCommonBlockSection;
    405408begin
    406   Inc(Indetation);
     409  Inc(Indentation);
    407410  with CommonBlock do begin
    408411    for I := 0 to Order.Count - 1 do begin
     
    410413        if Section <> cbsType then begin
    411414          EmitLn;
    412           Dec(Indetation);
     415          Dec(Indentation);
    413416          EmitLn('type');
    414           Inc(Indetation);
     417          Inc(Indentation);
    415418        end;
    416419        Emit(TType(Order[I]).Name + ' = ');
     
    422425        if Section <> cbsVariable then begin
    423426          EmitLn;
    424           Dec(Indetation);
     427          Dec(Indentation);
    425428          EmitLn('var');
    426           Inc(Indetation);
     429          Inc(Indentation);
    427430        end;
    428431        GenerateVariable(TVariable(Order[I]));
     
    432435        if Section <> cbsConstant then begin
    433436          EmitLn;
    434           Dec(Indetation);
     437          Dec(Indentation);
    435438          EmitLn('const');
    436           Inc(Indetation);
     439          Inc(Indentation);
    437440        end;
    438441        GenerateConstant(TConstant(Order[I]));
     
    444447    end;
    445448  end;
    446   Dec(Indetation);
     449  Dec(Indentation);
    447450end;
    448451
     
    454457  Section: TCommonBlockSection;
    455458begin
    456   Inc(Indetation);
     459  Inc(Indentation);
    457460  with CommonBlock do begin
    458461    for I := 0 to Order.Count - 1 do begin
     
    460463        if Section <> cbsType then begin
    461464          EmitLn;
    462           Dec(Indetation);
     465          Dec(Indentation);
    463466          EmitLn('type');
    464           Inc(Indetation);
     467          Inc(Indentation);
    465468        end;
    466469        Emit(TType(Order[I]).Name + ' = ');
     
    472475        if Section <> cbsVariable then begin
    473476          EmitLn;
    474           Dec(Indetation);
     477          Dec(Indentation);
    475478          EmitLn('var');
    476           Inc(Indetation);
     479          Inc(Indentation);
    477480        end;
    478481        GenerateVariable(TVariable(Order[I]));
     
    482485        if Section <> cbsConstant then begin
    483486          EmitLn;
    484           Dec(Indetation);
     487          Dec(Indentation);
    485488          EmitLn('const');
    486           Inc(Indetation);
     489          Inc(Indentation);
    487490        end;
    488491        GenerateConstant(TConstant(Order[I]));
     
    495498    GenerateBeginEnd(Code);
    496499  end;
    497   Dec(Indetation);
     500  Dec(Indentation);
    498501end;
    499502
Note: See TracChangeset for help on using the changeset viewer.