You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
3.3KB

  1. %YAML 1.2
  2. ---
  3. # http://www.sublimetext.com/docs/3/syntax.html
  4. name: MiniZinc (MZN)
  5. file_extensions:
  6. - mzn
  7. - dzn
  8. scope: source.mzn
  9. contexts:
  10. main:
  11. - match: \%.*
  12. scope: comment.line.percentage.mzn
  13. - match: /\*
  14. push:
  15. - meta_scope: comment.block.mzn
  16. - match: \*/
  17. pop: true
  18. - match: \'.*?\'
  19. scope: string.quoted.single.mzn
  20. - match: \".*?\"
  21. scope: string.quoted.double.mzn
  22. - match: \b(ann|annotation|any|constraint|function|in|include|list|of|op|output|minimize|maximize|par|predicate|record|satisfy|solve|test|type|var)\b
  23. scope: keyword.control.mzn
  24. - match: \b(array|set|bool|enum|float|int|string|tuple)\b
  25. scope: storage.type.mzn
  26. - match: \b(for|forall|if|then|else|endif|where)\b
  27. scope: keyword.control.mzn
  28. - match: \b(abort|abs|acosh|array_intersect|array_union|array1d|array2d|array3d|array4d|array5d|array6d|asin|assert|atan|bool2int|card|ceil|concat|cos|cosh|dom|dom_array|dom_size|fix|exp|floor|index_set|index_set_1of2|index_set_2of2|index_set_1of3|index_set_2of3|index_set_3of3|int2float|is_fixed|join|lb|lb_array|length|ln|log|log2|log10|min|max|pow|product|round|set2array|show|show_int|show_float|sin|sinh|sqrt|sum|tan|tanh|trace|ub|ub_array)\b
  29. scope: entity.name.function.mzn
  30. - match: \b(circuit|disjoint|maximum|maximum_arg|member|minimum|minimum_arg|network_flow|network_flow_cost|partition_set|range|roots|sliding_sum|subcircuit|sum_pred)\b
  31. scope: support.function.mzn
  32. - match: \b(alldifferent|all_different|all_disjoint|all_equal|alldifferent_except_0|nvalue|symmetric_all_different)\b
  33. scope: support.function.mzn
  34. - match: \b(lex2|lex_greater|lex_greatereq|lex_less|lex_lesseq|strict_lex2|value_precede|value_precede_chain)\b
  35. scope: support.function.mzn
  36. - match: \b(arg_sort|decreasing|increasing|sort)\b
  37. scope: support.function.mzn
  38. - match: \b(int_set_channel|inverse|inverse_set|link_set_to_booleans)\b
  39. scope: support.function.mzn
  40. - match: \b(among|at_least|at_most|at_most1|count|count_eq|count_geq|count_gt|count_leq|count_lt|count_neq|distribute|exactly|global_cardinality|global_cardinality_closed|global_cardinality_low_up|global_cardinality_low_up_closed)\b
  41. scope: support.function.mzn
  42. - match: \b(bin_packing|bin_packing_capa|bin_packing_load|diffn|diffn_k|diffn_nonstrict|diffn_nonstrict_k|geost|geost_bb|geost_smallest_bb|knapsack)\b
  43. scope: support.function.mzn
  44. - match: \b(alternative|cumulative|disjunctive|disjunctive_strict|span)\b
  45. scope: support.function.mzn
  46. - match: \b(regular|regular_nfa|table)\b
  47. scope: support.function.mzn
  48. - match: \b(not|\+|-)\b
  49. scope: keyword.operator.math.mzn
  50. - match: \b(<->|->|<-|\\/|xor|/\\)\b
  51. scope: keyword.operator.logical.mzn
  52. - match: \b(<|>|<=|>=|==|=|!=)\b
  53. scope: keyword.operator.math.mzn
  54. - match: \b(\+|-|\*|/|div|mod)\b
  55. scope: keyword.operator.math.mzn
  56. - match: \b(in|subset|superset|union|diff|symdiff|intersect)\b
  57. scope: keyword.operator.sets.mzn
  58. - match: \|\.\.|\+\+
  59. scope: keyword.operator.math.mzn
  60. - match: \b(true|false)\b
  61. scope: constant.language.mzn
  62. - match: '\b([_A-Za-z])(\w*)\b'
  63. scope: variable.other.mzn
  64. - match: '([+-]?)\d+(\.[^\.]\d*)?([eE][-+]?\d+)?'
  65. scope: constant.numeric.mzn