unit NV_parse;

interface

const
  NVPARSE_DLL = 'Library\NVparse.dll';

type
  PPChar = ^PChar;

procedure NVparse(const input_string: PChar); cdecl; external NVPARSE_DLL name 'nvparse';
function NVparseGetErrors: PPChar; cdecl; external NVPARSE_DLL name 'nvparse_get_errors';

function NVparseErrorStrings: String;

implementation

function NVparseErrorStrings: String;
var
  err: PPChar;
  str: PChar;
begin
  err := NVparseGetErrors;
  result := '';
  while err^ <> nil do
  begin
    str := err^;
    result := result + str + #13;
    inc(integer(err), 4);
  end;
end;

end.
