Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 07/27/21 in all areas

  1. Fr0sT.Brutal

    Parsing Text search expression

    There are plenty of open-source parsers available. - ZeosDBO has powerful engine in \src\core\ (units ZExpression.pas, ZExprParser.pas, ZExprToken.pas, ZTokenizer.pas), you could take any part of it and customize to your needs - IBExpress from std lib has RAD\source\IBX\IBX.IBScript.pas with the parser as well, just as FireDAC in RAD\source\data\firedac\FireDAC.Stan.Expr.pas for expressions and FireDAC.Comp.Script.pas for scripts - Template engine from DVDChief also has expression parser - and so on Moreover, with such simple tokens you can easily write it yourself Btw, I don't realize what "testing" and "text" are in your example. Variables? Or just single words to search for, with quotes removed for simplicity (a la Google)? That's a nice task to solve, huh. Depending on maximum nesting level allowed it could require some discrete maths.
  2. Alexander Sviridenkov

    Parsing Text search expression

    It can. Just override GetDialect method (uses sqlparse) type TCustomExpression = class(TSQLExpression) private FDialect: TSQLDialect; public function GetDialect: TSQLDialect; override; destructor Destroy; override; end; destructor TCustomExpression.Destroy; begin FDialect.Free; inherited; end; function TCustomExpression.GetDialect: TSQLDialect; begin if FDialect = nil then FDialect := TSQLDialect.Create; Result := FDialect; end; procedure TForm67.Button1Click(Sender: TObject); var SE: TCustomExpression; begin SE := TCustomExpression.Create(nil); SE.ParseString('user=''john'' or user = ''peter'''); ShowMessage(SE.Node.Children[0].Children[1].Name); //=john end; Also there is pascal expression class in htscriptparse unit: var SE: TScriptExpression; begin SE := TScriptExpression.CreateAndParse('(user=''john'') or (user = ''peter'')'); SE.Variables['user'] := 'peter'; ShowMessage(SE.Calc)
  3. DPStano

    Floating point arithmetics

    I found what is interfering there was background loading of TWebBrowser that changes precision in FPU Control Word thx all
  4. Jim McKeeth

    Is this C++ builders new FORUM ???

    I spent quite a bit of time with Ann Lynnworth from https://www.codenewsfast.com and restored a full archive there. You can go find all the old messages there.
  5. Remy Lebeau

    Is this C++ builders new FORUM ???

    I miss the old newsgroups 😢 None of the newer web-based forums have really matched up to them, in terms of usability, monitoring, organization. It is just not the same.
  6. AlexBelo

    Is this C++ builders new FORUM ???

    🙂. But (IMHO) dropping of official forum was really wrong decision. In old days (since ~2000 year) I usually started my day from browsing of official newsgroups (in good old plain text and very handy tree format of messages) and I still have a huge collection of answers in "how to ..." style from famous specialists like Peter Below, Remy, and many others. After end of NG civilization there is no default place where I can get help from gurus and be well informed. Yes, you can say that there are many such places but "many" means "scattered" in this context ...
  7. Fellow Delphi developers, This is with great pleasure that we announce the immediate availability of HelpNDoc 7.5, an easy to use yet powerful help authoring tool producing CHM help files, responsive HTML 5 and mobile Web Sites, DocX and PDF manuals, Markdown documents, ePub and Kindle eBooks as well as Qt Help files from a single source. HelpNDoc is Free for personal use and evaluation purposes and is available at: https://www.helpndoc.com HelpNDoc 7.5 provides many new features and enhancements such as the ability to customize HTML topic names for improved SEO, an enhanced CHM decompiler and importer which can now handle keywords, additional API methods, enhanced documentation generation, and much more... You can learn more about this update at: https://www.helpndoc.com/news-and-articles/2021-07-27-customize-html-topic-names-for-improved-seo-enhanced-chm-decompiler-and-importer-and-more-in-helpndoc-7.5/ Video of some of the new features in HelpNDoc 7.5: Download HelpNDoc now and use it for free for personal and evaluation purposes: https://www.helpndoc.com/download Follow our step-by-step video guides to learn how to use HelpNDoc: Best regards, John, HelpNDoc team. https://www.helpndoc.com
×