JUK1
ElementsRegexBuilder.h File Reference
#include <string>
#include <sstream>
#include <regex>
Include dependency graph for ElementsRegexBuilder.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::regex generateRegex (std::string indentifier, std::string simplifiedMatching, bool startAnchor=true, bool endAnchor=true)
 a helper function to aid in the construction of regexes for parsing netlist files More...
 

Function Documentation

◆ generateRegex()

std::regex generateRegex ( std::string  indentifier,
std::string  simplifiedMatching,
bool  startAnchor = true,
bool  endAnchor = true 
)

a helper function to aid in the construction of regexes for parsing netlist files

Parameters
indentifierThe designator for the component. e.g. "R" for resistor
simplifiedMatchingThe string that contains the data for what we want matched. For example:
n = int/size_t
w = word (works for floats etc)
? = everything after is optional
c = char
s = space
startAnchorWhat prepends the regex, defaults to "^".
endAnchorWhat appends the regex, defaults to "$".
Returns
The complete Regex.

Definition at line 22 of file ElementsRegexBuilder.cpp.

Here is the caller graph for this function: