Hi Cosmin, Take a look at Visual Parse++ at www.sand-stone.com. It provides lex and yacc functionality, and its run-time is native Delphi (or several other languages, you choose the target), so no DLL or ActiveX needed. It's not freeware or shareware, but not too pricey. We've been using it for almost 10 years and it works just great.
It does accept input from several types of sources, including pchars. I've never tried to run multiple simultaneous instances, but it should work. It basically consists of 3 classes: a parser, a lexer, and a consumer (where the lexer gets it string data from). Since you can create as many instances of these classes as you want, there should be no problem running multiple simultaneous parsers. It also includes a visual interactive debugger, so you can debug your parser rules visually, which is a real time-saver. Note that the grammar is generated to a resource file (that you can include as a resource in your .exe or load as an individual file), so the Delphi code it provides is for a generic lexing/parsing engine, it does not generate specific code for the grammar, the grammar is data-driven by the resource file. At 12:13 PM 8/12/2007, Cosmin Prund wrote: >Hello everyone. I'm about to start a new program that requires an parser >(possibly complex parser). So I'm asking this question again: What are >the options for an Delphi programmer dealing with parsers? Other then TP >yacc/lex or the Delphi variants? > > >Different wording: > >(1) Is there a Delphi clone of the UNIX tools lex and yacc that >generates "modern" output? By "modern" I mean something that can handle >two parsers running simultaneously and allows reading from something >other than TEXT files. All lex/yacc clones I've seen depend on a >"lexlib" library that's full of global variables and expects >input/output to be done on TEXT files. I almost never need to parse text >files, I'm always parsing text from in-memory "strings" or TStringList >or TStream descendents. Also I expect my lexers/parsers to work in >multi-threaded environments so global variables are automatically >excluded! > >(2) Are there any other tools similar to lex/yacc, commercial or open >source that can generate Delphi code? I've been following a few other >parser projects but they don't generate Delphi code. > >I know I've asked those questions before, and I'll probably ask them >again until I'll find a good solution. For now I'm writing all my lexers >/ parsers by hand and it works but it's a bit messy - especially when >it's time to change bits of code that have been written years before! > >-- > >Thanks, > >Cosmin Prund >_______________________________________________ >Delphi mailing list -> [email protected] >http://www.elists.org/mailman/listinfo/delphi Regards, Sid Gudes PIA Systems Corporation [EMAIL PROTECTED] _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

