Skip to content

Commit f441434

Browse files
author
Felipe Zimmerle
committed
Fix parser error on free text operator
1 parent 1f68075 commit f441434

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/parser/seclang-parser.yy

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,10 @@ op:
397397
}
398398
| FREE_TEXT
399399
{
400-
Operator *op = Operator::instantiate("\"@rx " + $1 + "\"");
400+
std::string text = std::string($1);
401+
text.pop_back();
402+
text.erase(0, 1);
403+
Operator *op = Operator::instantiate("\"@rx " + text + "\"");
401404
const char *error = NULL;
402405
if (op->init(driver.ref.back(), &error) == false) {
403406
driver.error(@0, error);

0 commit comments

Comments
 (0)