Quote Originally Posted by code_glitch View Post
Just read through that - wow that is some darn nice code. Nothing like the SVN of prometheus you have 400 odd lines of perfection, I give you 1200 lines of functionality held together with duct tape ARGGGH! No not really, I'm re-organising the source (cant make heads or tails of it any more XD) But I must say I can't wait to see how this project turns out. So good luck.
Wow! Thanks for the nice comments mate

I don't think my code is THAT good LOL

I do like your description - "1200 lines of functionality held together with duct tape", but I am sure it isn't that bad

Good luck with Prometheus man...looking forward to more of your project

PS, I have discovered a small bug in the TBasePaser.Execute method where I was calling GetToken once too many times! D'OH!

Here is the correct version of the method:

Code:
function  TBaseParser.Execute(const aSrcStream,aDstStream: TStream): Boolean;
begin
  FSrcStream := aSrcStream;
  FDstStream := aDstStream;

  FErrorMsg := '';
  Result    := True;

  // initialize parser
  GetCharacter;
  GetToken;

  try
    ParseInput; // override this to make a proper parser
  except
    on E:Exception do
    begin
      FErrorMsg := E.Message;
      Result    := False;
    end;
  end;
end;
cheers,
Paul