Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions lib/lorina/lorina/aiger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,15 +427,15 @@ class ascii_aiger_pretty_printer : public aiger_reader

namespace aig_regex
{
static std::regex header( R"(^aig (\d+) (\d+) (\d+) (\d+) (\d+)( \d+)?( \d+)?( \d+)?( \d+)?$)" );
static std::regex ascii_header( R"(^aag (\d+) (\d+) (\d+) (\d+) (\d+)( \d+)?( \d+)?( \d+)?( \d+)?$)" );
static std::regex input( R"(^i(\d+) (.*)$)" );
static std::regex latch( R"(^l(\d+) (.*)$)" );
static std::regex output( R"(^o(\d+) (.*)$)" );
static std::regex bad_state( R"(^b(\d+) (.*)$)" );
static std::regex constraint( R"(^c(\d+) (.*)$)" );
static std::regex justice( R"(^j(\d+) (.*)$)" );
static std::regex fairness( R"(^f(\d+) (.*)$)" );
inline const std::regex header( R"(^aig (\d+) (\d+) (\d+) (\d+) (\d+)( \d+)?( \d+)?( \d+)?( \d+)?$)" );
inline const std::regex ascii_header( R"(^aag (\d+) (\d+) (\d+) (\d+) (\d+)( \d+)?( \d+)?( \d+)?( \d+)?$)" );
inline const std::regex input( R"(^i(\d+) (.*)$)" );
inline const std::regex latch( R"(^l(\d+) (.*)$)" );
inline const std::regex output( R"(^o(\d+) (.*)$)" );
inline const std::regex bad_state( R"(^b(\d+) (.*)$)" );
inline const std::regex constraint( R"(^c(\d+) (.*)$)" );
inline const std::regex justice( R"(^j(\d+) (.*)$)" );
inline const std::regex fairness( R"(^f(\d+) (.*)$)" );
} // namespace aig_regex

/*! \brief Reader function for ASCII AIGER format.
Expand Down
12 changes: 6 additions & 6 deletions lib/lorina/lorina/bench.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ class bench_pretty_printer : public bench_reader

namespace bench_regex
{
static std::regex input( R"(INPUT\((.*)\))" );
static std::regex output( R"(OUTPUT\((.*)\))" );
static std::regex gate( R"((.*)\s+=\s+(.*)\((.*)\))" );
static std::regex dff( R"((.*)\s+=\s+DFF\((.+)\))" );
static std::regex lut( R"((.*)\s+=\s+LUT\s+(.*)\((.*)\))" );
static std::regex gate_asgn( R"((.*)\s+=\s+(.*))" );
inline const std::regex input( R"(INPUT\((.*)\))" );
inline const std::regex output( R"(OUTPUT\((.*)\))" );
inline const std::regex gate( R"((.*)\s+=\s+(.*)\((.*)\))" );
inline const std::regex dff( R"((.*)\s+=\s+DFF\((.+)\))" );
inline const std::regex lut( R"((.*)\s+=\s+LUT\s+(.*)\((.*)\))" );
inline const std::regex gate_asgn( R"((.*)\s+=\s+(.*))" );
} // namespace bench_regex

/*! \brief Reader function for the BENCH format.
Expand Down
8 changes: 4 additions & 4 deletions lib/lorina/lorina/blif.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ class blif_pretty_printer : public blif_reader

namespace blif_regex
{
static std::regex model( R"(.model\s+(.*))" );
static std::regex names( R"(.names\s+(.*))" );
static std::regex line_of_truthtable( R"(([01\-]*)\s*([01\-]))" );
static std::regex end( R"(.end)" );
inline const std::regex model( R"(.model\s+(.*))" );
inline const std::regex names( R"(.names\s+(.*))" );
inline const std::regex line_of_truthtable( R"(([01\-]*)\s*([01\-]))" );
inline const std::regex end( R"(.end)" );
} // namespace blif_regex

/*! \brief Reader function for the BLIF format.
Expand Down
4 changes: 2 additions & 2 deletions lib/lorina/lorina/dimacs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ class dimacs_reader

namespace dimacs_regex
{
static std::regex problem_spec( R"(^p\s+([cd]nf)\s+([0-9]+)\s+([0-9]+)$)" );
static std::regex clause( R"(((-?[1-9]+)+ +)+0)" );
inline const std::regex problem_spec( R"(^p\s+([cd]nf)\s+([0-9]+)\s+([0-9]+)$)" );
inline const std::regex clause( R"(((-?[1-9]+)+ +)+0)" );

} // namespace dimacs_regex

Expand Down
4 changes: 2 additions & 2 deletions lib/lorina/lorina/pla.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ class pla_pretty_printer : public pla_reader

namespace pla_regex
{
static std::regex keyword( R"(^\.([^\s]*)(?:\s+(.+))?$)" );
static std::regex term( R"(^([01\-]+)\s+([01\-]+)$)" );
inline const std::regex keyword( R"(^\.([^\s]*)(?:\s+(.+))?$)" );
inline const std::regex term( R"(^([01\-]+)\s+([01\-]+)$)" );

} // namespace pla_regex

Expand Down
12 changes: 6 additions & 6 deletions lib/lorina/lorina/verilog_regex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ namespace lorina

namespace verilog_regex
{
static std::regex immediate_assign( R"(^(~)?\(?([[:alnum:]\[\]_']+)\)?$)" );
static std::regex binary_expression( R"(^(~)?([[:alnum:]\[\]_']+)([&|^])(~)?([[:alnum:]\[\]_']+)$)" );
static std::regex ternary_expression( R"(^(~)?([[:alnum:]\[\]_']+)([&|^?])(~)?([[:alnum:]\[\]_']+)([&|^:])(~)?([[:alnum:]\[\]_']+)$)" );
static std::regex maj3_expression( R"(^\((~)?([[:alnum:]\[\]_']+)&(~)?([[:alnum:]\[\]_']+)\)\|\((~)?([[:alnum:]\[\]_']+)&(~)?([[:alnum:]\[\]_']+)\)\|\((~)?([[:alnum:]\[\]_']+)&(~)?([[:alnum:]\[\]_']+)\)$)" );
static std::regex negated_binary_expression( R"(^~\((~)?([[:alnum:]\[\]_']+)([&|^])(~)?([[:alnum:]\[\]_']+)\)$)" );
static std::regex const_size_range( R"(^(\d+):(\d+)$)" );
inline const std::regex immediate_assign( R"(^(~)?\(?([[:alnum:]\[\]_']+)\)?$)" );
inline const std::regex binary_expression( R"(^(~)?([[:alnum:]\[\]_']+)([&|^])(~)?([[:alnum:]\[\]_']+)$)" );
inline const std::regex ternary_expression( R"(^(~)?([[:alnum:]\[\]_']+)([&|^?])(~)?([[:alnum:]\[\]_']+)([&|^:])(~)?([[:alnum:]\[\]_']+)$)" );
inline const std::regex maj3_expression( R"(^\((~)?([[:alnum:]\[\]_']+)&(~)?([[:alnum:]\[\]_']+)\)\|\((~)?([[:alnum:]\[\]_']+)&(~)?([[:alnum:]\[\]_']+)\)\|\((~)?([[:alnum:]\[\]_']+)&(~)?([[:alnum:]\[\]_']+)\)$)" );
inline const std::regex negated_binary_expression( R"(^~\((~)?([[:alnum:]\[\]_']+)([&|^])(~)?([[:alnum:]\[\]_']+)\)$)" );
inline const std::regex const_size_range( R"(^(\d+):(\d+)$)" );
} // namespace verilog_regex

} // namespace lorina
Loading