Board index » cppbuilder » String Parser?
JVines
![]() CBuilder Developer |
JVines
![]() CBuilder Developer |
String Parser? |
Rudy Velthuis [TeamB]
![]() CBuilder Developer |
2006-08-19 10:15:56 PM
Re:String Parser?
At 16:07:57, 19.08.2006, JVines wrote:
QuoteI am looking for string parsers. Can anyone help? parsers that can split strings with items delimited by a few specified delimiters, or what? -- Rudy Velthuis [TeamB] rvelthuis.de/ "Success usually comes to those who are too busy to be looking for it" -- Henry David Thoreau (1817-1862) |
JVines
![]() CBuilder Developer |
2006-08-19 11:31:10 PM
Re:String Parser?QuoteParsing for what? Parsers for something specific, or generic parsers that {smallsort} |
Clayton Arends
![]() CBuilder Developer |
2006-08-20 01:35:14 AM
Re:String Parser?
You are going to have to be more specific. You need to provide the purpose
of the parser. If you want all kinds of parsers then at least start with one use that you have for a parser because the answer will vary depending on your need. XML? HTML? C/C++? PAS? CSV? ... - Clayton |
JVines
![]() CBuilder Developer |
2006-08-20 02:36:18 AM
Re:String Parser?QuoteYou are going to have to be more specific. You need to provide the purpose library of them so that when I need one, I will not have far to look. QuoteXML? |
Dennis Jones
![]() CBuilder Developer |
2006-08-20 03:35:08 AM
Re:String Parser?
"JVines" < XXXX@XXXXX.COM >wrote in message
Quote>You are going to have to be more specific. You need to provide the I created a text parser class hierarchy quite easily using the boost::tokenizer library. It is not an all-in-one solution, but it is flexible enough to let you parse a number of different text formats. Of course, the more complex the format, the more work you have to do yourself. I've heard a lot of people promote the boost::spirit library for more complex parsing. However, the more recent versions cannot be compiled with BCB, so it is my understanding that you would have to use an older version. - Dennis |
Clayton Arends
![]() CBuilder Developer |
2006-08-20 03:59:33 AM
Re:String Parser?
"JVines" < XXXX@XXXXX.COM >wrote in message
QuoteUser supplied formatting strings, command lines, text files, etc. I would when I need it." What you are asking for is a listing of hundreds if not thousands of classes/functions which most will probably never be helpful to you. Google groups groups.google.com/grphp is your friend. If you want a specific parser then "Google" for it. BTW, for giggles a search for "String Parser" returns a list of 60,000+ entries. Would you like me to give you the links to all of them? QuoteWhat is the name of this group? effectively. Also, this group quite frequently has questions that are generally technical in nature (as was yours) that do not belong in any other specific technical group. Borland does not provide a "misc" or "general" group. An example of a real non-technical question might be "Hey, did you guys hear that Borland is selling off its development tools?". The question relates to the products we use but it doesn't ask for code. - Clayton |
Martin Hart Turner
![]() CBuilder Developer |
2006-08-20 04:17:01 PM
Re:String Parser?
Hi:
JVines escribi? QuoteI am looking for string parsers. Can anyone help? It's a RegEx implementation, and it's free. HTH, MartinH. |
Dennis Jones
![]() CBuilder Developer |
2006-08-21 04:13:01 AM
Re:String Parser?
"Martin Hart Turner" <"martin at memorysoft dot es">wrote in message
QuoteHi: (www.regular-expressions.info/download/TPerlRegEx.zip), is also free, includes source code, and builds with BCB6 and BDS (and I easily replaced Edward's component with TPerlRegEx in my applications). Of course, there is also boost::regex, which will probably be (if not already) a part of the next C++ standard. Having said that however, a regular expression parser is almost certainly overkill for simple text parsing. - Dennis |
JVines
![]() CBuilder Developer |
2006-08-21 12:20:08 PM
Re:String Parser?Quotenext C++ standard. Having said that however, a regular expression parser is linked list of tokens. The tokens can be numbers, text, whitespace characters, etc. I am looking for parsers with a little bit more control. Instead of ending a token where a string of text ends and a number begins, I would like to be able to define delimiters, pictures (see your nearest database system for a definition), etc. |
Chris Uzdavinis
![]() CBuilder Developer |
2006-08-21 09:38:25 PM
Re:String Parser?
JVines < XXXX@XXXXX.COM >writes:
Quote>You are going to have to be more specific. You need to provide the tools that generate C or C++ parsers using a spec file (like YACC, ANTLR, or others) and so on. If you won't say what you want with specificity, then the answers you will get will be equally vague. "There are many parsing libraries." Check out boost for some regular-expression and tokenizer libraries, as well as meta-programming parser-generators (Spirit). -- Chris (TeamB); |
Rodrigo Gómez
![]() CBuilder Developer |
2006-08-22 01:55:18 AM
Re:String Parser?
I'll strongly recomend Boost::Spirit. You can do parsers for almost anything you want, and
it works really well. You will need to use some older version, as others have said, the newest one doesn't compile with BCB (don't know about BDS, though). There you can write the parser you need when you need it. I have done parsers for very simple stuff (lists of things, for instance), and some other more complex stuff (instructions for a process or some kind of script). JVines wrote: Quote>next C++ standard. Having said that however, a regular expression |
Jim Dodd
![]() CBuilder Developer |
2006-09-01 04:38:38 AM
Re:String Parser?
JVines wrote:
Quote>next C++ standard. Having said that however, a regular expression include 0 (zero) in the token. Jim Dodd |