Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Is there an up-to-date benchmark of contemporary regex libraries? I'm interested in re2, pcre with jit, NSRegularExpression, Irregexp, etc.
I found http://lh3lh3.users.sourceforge.net/reb.shtml and Regular expression library benchmarks both of wich are pretty outdated.
Edit:
I found another link:
https://github.com/axiak/pyre2#id6 (Chapter "Performance")
Here is a list of benchmarks:
A comparison of regex engines – Rust Leipzig
It's just a simple regex benchmark of different programming languages.
re2r Benchmark
Regex Engine Matching Speed Benchmark
C++11
I did some measurements before http://sljit.sourceforge.net/regex_perf.html
Regex engines improved a lot in the last few years, and now you can get high performance regardless of your choice. Although every engine has weaknesses (cases where they perform badly in terms of performance or memory consumption), you get similar performance on common regular expressions.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm not sure if this is on the right forum but im putting it here.
I am interesting in writing my own script language that is easy to embed in any language. I want to do it for educational purposes, to see how it works and to learn more about how programming languages and script languages work and how they can work together. I am a college student learning c and c++. I am eager to learn as much as I can.
Could anybody tell me where I could find some resources or books to help me get started? What else I could do to learn the same things?
Look for compiler-compilers.
As a dinosaur, I'd say look into flex/bison to have the full featured options (but also developer responsibilities):
http://www.cse.wustl.edu/~beardj/FlexBisonC++.html
It will certainly address the educational purposes. See that a programming language consists of a 'scanner', that tokenizes characters into words, and a parser, that combines words to expressions, statements, and complete programs.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I've tried to wade through the official documentation on the Boost Spirit page, but I find it completely unintelligible (despite 25+ years programming experience and an English Language degree) -- it's clearly written by somebody who knows the system well (good) but assumes that the reader also knows the system well (bad). I need something that won't throw sentences like
Parsers and generators in Spirit are fully attributed
clearly a meaning of "attributed" I am unaware of, and a web search doesn't help. Or
Sequences require an attribute type to expose the concept of a fusion sequence, where all elements of that fusion sequence have to be compatible with the corresponding element of the component sequence
What is a fusion sequence? The only one I know is happening in the Sun. How in C++ does one "expose" a "concept"?
Are there any good tutorials describing Boost Spirit from a beginner's perspective?
I've found this documentation to be a good read for Boost.
http://en.highscore.de/cpp/boost/parser.html
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Is there any software to convert a regular expression into a diagram to show the finite state machine will work. I find it helpful to have things pictorial to aid in bug fixing and ensuring that the regular expression is correct.
I really like http://www.regexper.com/ which looks like it uses Parcon.
Example (live link):
You should try RegexBuddy - IMHO it's best tool for regexp creation, validation, advanced visualisation and debugging. Also it has the unique ability to emulate the features and limitations of all the popular regular expression flavors, like PCRE, Perl, JavaScript, Java and etc.
If you don't mind using eclipse... http://crotonresearch.com/graphrex/
I ran a google search for "regex visualization" graphvis, and I found this:
http://osteele.com/archives/2006/02/reanimator
The tool is web based. I was actually hoping that I might be able to find a command line tool, because that would be easier to script. Nonetheless, the implementation seems to be well documented, and might serve as a starting point for other tools.
There used to be a good online tool for this at http://www.strfriend.com. Unfortunately, it appears to be currently unavailable.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
A while ago I found a library that allowed calling individual built-in Perl functions in C++, I cannot find it now.
Can you tell me where I can find it on the net?
Thanks.
You might want to try libperl++. It's still kind of beta, but the part that involves calling perl from C++ has been mature for quite some time. It's much easier to use than the perl API itself.
Full disclosure: I'm the author of libperl++
Read perlembed and Extending and Embedding Perl.
Try the following:
perl xs c++
C::DynaLib
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
Does anyone know of any good tutorials on regular expressions using boost? I have been searching for a decent one, but it seems most are for people who know a little about regular expressions
You may want to look at sections 23.6, 23.7, 23.8, and 23.9 (pp. 830-849) of Bjarne's Stroustrup's new book: Programming: Principles and Practice using C++
Just like the rest of the book, these sections are very pedagogical and assume essentially zero background on regular expressions.
I always find the O'Reilly articles to be pretty helpful for many things. You could give this a try. If the problem is that you're not too familiar with regular expressions, I'd read this site for a primer on Regexes. Pay close attention to the Perl section, as many systems, including Boost, commonly support Perl-compatible Regexes.
Once you understand the basics, go for either the Boost docs or the aforementioned O'Reilly guide.