78 "MMO_PartitionMethod",
82 "MMO_ReorderPartition",
113 "div",
"exp",
"floor",
"log",
"log10",
"max",
"min",
"mod",
"pre",
114 "product",
"reinit",
"sin",
"sinh",
"sum",
"tan",
"tanh",
"terminate"};
119 "CI_Dense",
"CI_Sampled",
"CI_Step",
"CQSS",
"CVODE_AM",
"CVODE_BDF",
"DASSL",
"Dense",
"DOPRI",
"false",
120 "HMetis",
"IDA",
"KaHIP",
"LIQSS",
"LIQSS2",
"LIQSS3",
"LIQSS_BDF",
"Manual",
"Metis",
"mLIQSS",
121 "mLIQSS2",
"MTPL",
"MTPL_IT",
"Patoh",
"QSS",
"QSS2",
"QSS3",
"QSS4",
"Scotch",
"SD_DT_Asynchronous",
122 "SD_DT_Fixed",
"Sparse",
"ST_Binary",
"ST_Linear",
"ST_Random",
"true"};
125 "Begin",
"by",
"changes",
"cost",
"CPU",
126 "crossing",
"Crossings",
"DASSL",
"data",
"dependencies",
127 "derivative",
"derivatives",
"detected",
"done",
"Dt",
128 "dt",
"efficiency",
"Estimated",
"evaluations",
"Event",
129 "events",
"Events",
"execution",
"external",
"External",
130 "for",
"Function",
"function",
"Handler",
"Individual",
131 "Init",
"Initial",
"Initialization",
"Initialize",
"input",
132 "iterations",
"Jacobian",
"load",
"LP",
"LPS",
133 "max",
"memory",
"messages",
"Messages",
"Miliseconds",
134 "min",
"ms",
"Newton",
"next",
"output",
135 "Output",
"Parallel",
"Partitioning",
"past",
"per",
136 "performed",
"Processed",
"reinits",
"reported",
"Results",
137 "Save",
"Scalar",
"Seconds",
"sent",
"sequential",
138 "Simulation",
"simulation",
"solver",
"speedup",
"State",
139 "state",
"Statistics",
"step",
"steps",
"sum",
140 "time",
"Time",
"Total",
"transition",
"transitions",
141 "value",
"values",
"Variable",
"variable",
"variables",
142 "Variables",
"Zero"};
163 QString add_pattern = bold ?
"\\b" + pattern +
"\\b" : pattern;
164 rule.
pattern = QRegularExpression(add_pattern);
171 QTextCharFormat keyword_format;
172 keyword_format.setForeground(Qt::darkBlue);
178 QTextCharFormat function_format;
179 function_format.setForeground(Qt::blue);
180 function_format.setFontItalic(
true);
186 QTextCharFormat annotation_format;
187 annotation_format.setForeground(Qt::darkGreen);
188 annotation_format.setFontItalic(
true);
194 QTextCharFormat qss_tags_format;
195 qss_tags_format.setForeground(Qt::darkRed);
202 const bool DONT_USE_BOLD =
false;
205 QTextCharFormat quotation_format;
206 quotation_format.setForeground(Qt::darkMagenta);
212 QTextCharFormat keyword_format;
213 keyword_format.setForeground(Qt::darkBlue);
214 keyword_format.setFontWeight(QFont::Bold);
230 QRegularExpression expression(rule.pattern);
231 QRegularExpressionMatchIterator match_iterator = expression.globalMatch(text);
233 while (match_iterator.hasNext()) {
234 QRegularExpressionMatch match = match_iterator.next();
235 int start_index = match.capturedStart();
236 int length = match.capturedLength();
237 setFormat(start_index, length, rule.format);
244 const int IN_COMMENT_BLOCK = 1;
245 setCurrentBlockState(0);
246 QTextCharFormat multi_line_comment_format;
247 multi_line_comment_format.setForeground(Qt::darkGray);
250 int start_index = (previousBlockState() != IN_COMMENT_BLOCK) ?
_comment_start_expression.match(text).capturedStart() : 0;
252 while (start_index >= 0) {
255 int length_of_comment;
257 if (!end_match.hasMatch()) {
259 setCurrentBlockState(IN_COMMENT_BLOCK);
260 length_of_comment = text.length() - start_index;
263 length_of_comment = end_match.capturedStart() - start_index + end_match.capturedLength();
267 setFormat(start_index, length_of_comment, multi_line_comment_format);
271 start_index = startMatch.hasMatch() ? startMatch.capturedStart() : -1;