% A MiniZinc model ::= [ ";" ... ] % Items ::= | | | | | | | | | | ::= ":" % Include items ::= "include" % Variable declaration items ::= [ "=" ] % Enum items ::= "enum" [ "=" ] ::= "{" "," ... "}" % Assign items ::= "=" % Constraint items ::= "constraint" % Solve item ::= "solve" "satisfy" | "solve" "minimize" | "solve" "maximize" % Output items ::= "output" % Annotation items ::= "annotation" % Predicate, test and function items ::= "predicate" ::= "test" ::= "function" ":" ::= [ "=" ] ::= [ ( "," ... ) ] % Type-inst expressions ::= | ::= ::= "var" | "par" | ε ::= "opt" | ε ::= "set" "of" | ε ::= "bool" | "int" | "float" | "string" ::= | | | "ann" | { "," ... } | ".." % Type-inst variables ::= $[A-Za-z][A-Za-z0-9_]* % Array type-inst expressions ::= "array" [ "," ... ] "of" | "list" "of" % Expressions ::= ::= ::= [ ] ::= | "(" ")" | | "_" | | | | | | | | | | | | | | ::= ε | % Numeric expressions ::= ::= ::= [ ] ::= | "(" ")" | | | | | | | % Built-in operators ::= | ::= | ‘ ::= "<->" | "->" | "<-" | "\/" | "xor" | "/\" | "<" | ">" | "<=" | ">=" | "==" | "=" | "!=" | "in" | "subset" | "superset" | "union" | "diff" | "symdiff" | ".." | "intersect" | "++" | ::= "not" | % Built-in numeric operators ::= | ‘ ::= "+" | "-" | "*" | "/" | "div" | "mod" ::= "+" | "-" % Boolean literals ::= "false" | "true" % Integer literals ::= [0-9]+ | 0x[0-9A-Fa-f]+ | 0o[0-7]+ % Float literals ::= [0-9]+"."[0-9]+ | [0-9]+"."[0-9]+[Ee][-+]?[0-9]+ | [0-9]+[Ee][-+]?[0-9]+ | 0[xX]([0-9a-fA-F]*"."[0-9a-fA-F]+|[0-9a-fA-F]+".")([pP][+-]?[0-9]+) | (0[xX][0-9a-fA-F]+[pP][+-]?[0-9]+) % String literals ::= ([^"\n\] | \[^\n(])* ::= """ """ | """ "\(" ::= ")"""" | ")""\(" % Set literals ::= "{" [ "," ... ] "}" % Set comprehensions ::= "{" "|" "}" ::= [ "where" ] "," ... ::= "," ... "in" % Array literals ::= "[" [ "," ... ] "]" % 2D Array literals ::= "[|" [ ( "," ...) "|" ... ] "|]" % Array comprehensions ::= "[" "|" "]" % Array access ::= "[" "," ... "]" % Annotation literals ::= [ "(" "," ... ")" ] % If-then-else expressions ::= "if" "then" [ "elseif" "then" ]* "else" "endif" % Call expressions ::= [ "(" "," ... ")" ] % Let expressions ::= "let" "{" ";" ... "}" "in" ::= | % Generator call expressions ::= "(" ")" "(" ")" % Miscellaneous % Identifiers ::= [A-Za-z][A-Za-z0-9_]* | ’[^’\xa\xd\x0]*’ % Identifiers and quoted operators ::= | ’’ % Annotations ::= [ "::" ]* ::= ::= "::"