Skip to content
docs
Arxo ↗

LDC-E2117 — A text pattern outside the supported grammar

For LLMs5 sections

Text matching uses a bounded pattern grammar: only the pattern shapes the language defines are accepted. A pattern that breaks that grammar — an unclosed class, a stray operator — cannot be compiled, so the compiler rejects it at the literal and says which part went wrong.

Closing the class, escaping the stray character, or otherwise bringing the pattern back inside the supported shapes fixes it. The message quotes the offending pattern, so the repair starts there.

Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Akt;
relation value_of(a: Akt, v: Text) kind empirical;
relation ok(a: Akt) kind institutional;
rule R(a: Akt, v: Text) strict {
when value_of(a, v) and text_matches(v, "[0-9");
then ok(a);
}
Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Akt;
relation value_of(a: Akt, v: Text) kind empirical;
relation ok(a: Akt) kind institutional;
rule R(a: Akt, v: Text) strict {
when value_of(a, v) and text_matches(v, "[0-9]+");
then ok(a);
}

The engine reports this in its own wording:

Output
example.law:9:43: error LDC-E2117: text_matches: pattern «[0-9» violates the §257.1 grammar: unclosed class `[`

Documentation for Arxo. Writings — blog.arxo.io.

Anonymous visit counts on stats.arxo.io, no cookies.