Files
2026-01-03 18:35:52 +01:00

35 lines
574 B
ObjectPascal

program dpgc;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
dpgc.Main in 'src\dpgc.Main.pas';
var
main: TdpgcMain;
begin
try
if ParamCount = 1 then
begin
if FileExists(ParamStr(1)) then
begin
main := TdpgcMain.Create;
main.Parse(ParamStr(1));
end
else
writeln('Grammar file "' +ParamStr(1)+ '" doesn''t exsist.');
end
else
writeln('Usage: dpgc <input_file>');
except
on E:Exception do Writeln(E.Classname, ': ', E.Message);
end
end.