mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
@@ -2348,6 +2348,14 @@ Zephir:
|
||||
extensions:
|
||||
- .zep
|
||||
|
||||
Zimpl:
|
||||
type: programming
|
||||
lexer: Text only
|
||||
extensions:
|
||||
- .zimpl
|
||||
- .zmpl
|
||||
- .zpl
|
||||
|
||||
eC:
|
||||
type: programming
|
||||
search_term: ec
|
||||
|
||||
@@ -660,6 +660,9 @@
|
||||
],
|
||||
"Zephir": [
|
||||
".zep"
|
||||
],
|
||||
"Zimpl": [
|
||||
".zmpl"
|
||||
]
|
||||
},
|
||||
"interpreters": {
|
||||
@@ -726,8 +729,8 @@
|
||||
".gemrc"
|
||||
]
|
||||
},
|
||||
"tokens_total": 612602,
|
||||
"languages_total": 798,
|
||||
"tokens_total": 612725,
|
||||
"languages_total": 799,
|
||||
"tokens": {
|
||||
"ABAP": {
|
||||
"*/**": 1,
|
||||
@@ -66571,6 +66574,47 @@
|
||||
"convert": 1,
|
||||
"converter": 2,
|
||||
"getConverters": 1
|
||||
},
|
||||
"Zimpl": {
|
||||
"#": 2,
|
||||
"param": 1,
|
||||
"columns": 2,
|
||||
";": 7,
|
||||
"set": 3,
|
||||
"I": 3,
|
||||
"{": 2,
|
||||
"..": 1,
|
||||
"}": 2,
|
||||
"IxI": 6,
|
||||
"*": 2,
|
||||
"TABU": 4,
|
||||
"[": 8,
|
||||
"<i,j>": 3,
|
||||
"in": 5,
|
||||
"]": 8,
|
||||
"<m,n>": 2,
|
||||
"with": 1,
|
||||
"(": 6,
|
||||
"m": 4,
|
||||
"i": 8,
|
||||
"or": 3,
|
||||
"n": 4,
|
||||
"j": 8,
|
||||
")": 6,
|
||||
"and": 1,
|
||||
"abs": 2,
|
||||
"-": 3,
|
||||
"var": 1,
|
||||
"x": 4,
|
||||
"binary": 1,
|
||||
"maximize": 1,
|
||||
"queens": 1,
|
||||
"sum": 2,
|
||||
"subto": 1,
|
||||
"c1": 1,
|
||||
"forall": 1,
|
||||
"do": 1,
|
||||
"card": 2
|
||||
}
|
||||
},
|
||||
"language_tokens": {
|
||||
@@ -66757,7 +66801,8 @@
|
||||
"XSLT": 44,
|
||||
"Xtend": 399,
|
||||
"YAML": 77,
|
||||
"Zephir": 1026
|
||||
"Zephir": 1026,
|
||||
"Zimpl": 123
|
||||
},
|
||||
"languages": {
|
||||
"ABAP": 1,
|
||||
@@ -66943,7 +66988,8 @@
|
||||
"XSLT": 1,
|
||||
"Xtend": 2,
|
||||
"YAML": 2,
|
||||
"Zephir": 2
|
||||
"Zephir": 2,
|
||||
"Zimpl": 1
|
||||
},
|
||||
"md5": "e41e5530c6efe39b710ace7e1d5d318c"
|
||||
"md5": "482e5e1de8ec47e0b556809c8fe6f62b"
|
||||
}
|
||||
21
samples/Zimpl/sample.zmpl
Normal file
21
samples/Zimpl/sample.zmpl
Normal file
@@ -0,0 +1,21 @@
|
||||
# $Id: queens3.zpl,v 1.3 2009/09/13 16:15:53 bzfkocht Exp $
|
||||
#
|
||||
# This is a formulation of the n queens problem using binary variables.
|
||||
# variables. Since the number of queens is maximized, the size of the
|
||||
# board can be set arbitrarily.
|
||||
#
|
||||
param columns := 8;
|
||||
|
||||
set I := { 1 .. columns };
|
||||
set IxI := I * I;
|
||||
|
||||
set TABU[<i,j> in IxI] := { <m,n> in IxI with
|
||||
(m != i or n != j) and (m == i or n == j or abs(m - i) == abs(n - j)) };
|
||||
|
||||
var x[IxI] binary;
|
||||
|
||||
maximize queens: sum <i,j> in IxI : x[i,j];
|
||||
|
||||
subto c1: forall <i,j> in IxI do
|
||||
card(TABU[i,j]) - card(TABU[i,j]) * x[i,j] >= sum <m,n> in TABU[i,j] : x[m,n];
|
||||
|
||||
Reference in New Issue
Block a user