KorAP / Koral

:pencil: Translation of query languages to serialized KoralQuery protocol
BSD 2-Clause "Simplified" License
10 stars 4 forks source link

CQP & Poliqarp: Error for unknown flags #176

Open margaretha opened 9 months ago

margaretha commented 9 months ago

Unknown flag such as the example below is just ignored in the serialization.

"Fraulein"%s

It would be more transparent and informative to throw an error g, e.g. Flag s is unknown.

A combination of known and unknown flags such as the example below:

"Fraulein"%cs

returns errors:

[302, "Failing to parse at symbol: '\"'", 13 ],
[ 302, "Could not parse query >>> \"Fraulein\"%cs <<<." ]

As the first example, an error should be thrown.

margaretha commented 9 months ago

[orth="l(au|ie)fen"%cd] returns a warning

"warnings": [
    [
      748,
      "Flag is unknown",
      "flags:diacriticsInsensitive"
    ]
  ]