Closed gfour closed 3 years ago
Hi, Probably the effect of https://github.com/souffle-lang/souffle/pull/1950 fixing https://github.com/souffle-lang/souffle/issues/1947 Chances are thin to find a common ground since escape sequences are handled differently in 2.1 and pre-2.1. This is deeply rooted in the lexer.
Workaround (by @gkastrinis), works in both Souffle 2.1 and pre-2.1:
.decl Fact(s:symbol)
Fact("hello.py").
.decl isPy(s:symbol)
.output isPy
isPy(s) :- Fact(s), match(".*[.]py", s).
In Doop (where this issue was observed in a few rules), this means replacing:
\\.
-> [.]
\\$
-> [$]
\\(
-> [(]
\\)
-> [)]
Test program:
(1) Running this script with Souffle 2.0.2 only populates relation isPy1. (2) Running this script with Souffle 2.1 crashes:
I understand that Souffle 2.1 follows std::regex for regex syntax but that doesn't seem to be the case for version 2.0.2 (or isPy2 would contain tuples). Can there be a
match
clause that uses slashes and works under both Souffle 2.1 and pre-2.1 versions?