Initial check in dpgc

This commit is contained in:
2026-01-03 18:35:52 +01:00
parent 5666f85e99
commit de58f9a4e5
4 changed files with 1251 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
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.