aas-core3 1.0.0
Manipulate, verify and de/serialize asset administration shells in C++.
Loading...
Searching...
No Matches
Match regular expressions using a multi-threaded virtual machine.

Namespaces

namespace  aas_core::aas_3_0::revm
 

Detailed Description

The implementation in the standard library has exponential time complexity, so it was a major blocker for most of the practical inputs. For example, see this bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93502

This implementation is based on Ken Thompson's approach which uses a virtual machine to match regular expressions. The original technique has been published in: Thompson, K., "Regular expression search algorithm", ACM 11(6) (June 1968)

We followed a very clear and concise blog post which described in detail: https://swtch.com/~rsc/regexp/regexp2.html

The ideas for additional instructions were taken from: https://www.codeproject.com/Articles/5256833/Regex-as-a-Tiny-Threaded-Virtual-Machine