Initial check in dpgc
This commit is contained in:
@@ -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.
|
||||
Reference in New Issue
Block a user