Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatzinc specification of string syntax problems #723

Open
PerMildner opened this issue Aug 16, 2023 · 0 comments
Open

Flatzinc specification of string syntax problems #723

PerMildner opened this issue Aug 16, 2023 · 0 comments

Comments

@PerMildner
Copy link

In the Flatzinc reference the string syntax is informally described as "Strings have the same syntax as in C programs". This is not correct. They have a similar syntax as in C programs.

The FlatZinc Grammar is described as "a proper subset of the MiniZinc grammar", and defines string literals as follows:

<string-contents> ::= ([^"\n\] | \[^\n(])*
<string-literal> ::= """ <string-contents> """

(Side note: this has the same problem with the meaning of \nas in Issue #722)

This grammar seems to say that "\k" (and similar constructs, e.g. "\)") is a valid string-literal in FlatZinc but I see no description about what that would mean. In either case, this would make it no longer "a proper subset of the MiniZinc grammar", since the MiniZinc grammar does not permit e.g. \k in string literals.

PS. the casifaction Flatzinc and FlatZinc seems to be used inconsistently in the manual.

(This kind of nit picking is what you get for making a popular system where others want to build compatible parsers :-) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant