Closed Abdullah-AlAttar closed 4 years ago
given this grammar :
const auto grammar_def = x3::lit("start") > x3::lit("{") > (*(char_("a-zA-Z0-9\".{}=_~"))) > x3::lit("}") > x3::lit(";);
the last x3::lit("}") is being consumed by *((char("a-zA-Z0-9\".{}=~"))) since it contains "}" is there way to prevent that ? something like giving x3::lit("}")** higher priority during parse?
No, there is not.
Use Spirit over tokenized input by a non-backtracking regex engine if you really want to match this kind of thing with a consistent performance.
given this grammar :
the last x3::lit("}") is being consumed by *((char("a-zA-Z0-9\".{}=~"))) since it contains "}"
is there way to prevent that ? something like giving x3::lit("}")** higher priority during parse?