Boost regular expressions [closed] - c++

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.

Related

Writing custom script language [closed]

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.

Is there any clear, entry level documentation available for boost-spirit? [closed]

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

Regex library benchmark [closed]

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.

coding mental block, wants inspiration from beautiful coding [closed]

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
I'm having a coding mental block and wish to draw inspiration from other's coding. Where can I find beautiful coding (elegant, succinct, self-documenting) to refresh my mind. Github can be a place to start but I don't know authors to look for.
Perhaps not what you had in mind, but the book Beautiful Code is certainly worth consideration.
In addition to the other post, I'd add maybe checking out some other languages. You'll find beautiful concepts and new ways to program in Scheme, Haskell, Ocaml, Clojure, Erlang, etc... Some of those languages have features which you can apply to C++, and some of them make really nice examples in their implementation.

Any good advice on using emacs for C++ project? [closed]

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
I'm looking for a good article on using emacs as C/C++ IDE.
Something like Steve Yegge's "Effective emacs".
No specific article, really, but I've found EmacsWiki to be full of useful information. Consider checking out these entries:
CPlusPlus as a starting point for many C++-related articles, and
CppTemplate to define a template that can give you a good skeleton when you start new files
I've recently stumbled upon this article which is quite good.
EDIT: Yep the link is no longer valid. It seems like they've changed their url recently and it doesn't redirect properly. Hopefully it will be back soon. Anyway the article was called "Benjamin Rutt's Emacs C development tips". I managed to find a copy here.
I'm planning to write such article in near future, but you can now take my configuration of Cedet + Emacs, that helps me to effectively edit C++ sources.
If you'll have questions, you could ask me directly
Be aware that Emacs' C++ mode is based on only regular expressions, not a grammar. Hence, the syntax highlighting is not based strictly on the syntax of the language itself, but rather is largely based on commonplace formatting. The Emacs syntax highlighting of C++ often makes mistakes.
The problem is not limited to syntax hightlighting. The same defective design applies to the automatic formatting. All this said, I have been using only Emacs for all of my editing of C++ source code for over 20 years, since the cfront days. (I usually turn off electric key bindings, because of Emacs' defective regex-based design. Regexes do not have enough expressive power to describe the C++ syntax accurately.
I recommend ggtags and irony-mode. Other then that you may want to use helm-ag to search ("grep") for strings in your codebase.