This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Pict.groovyがClassPathにある前提で次のスクリプトを実行する | |
//pict.exeはPict.pictPathに設定する | |
//エラーが起きたときについて検知していない。 | |
//水準に「,」が入っているときは@escapeComma@でエスケープしている。@escapeComma@が水準にあるときは、escapeComma の値を変えてください。 | |
//水準に「\n」が入っているときは@escapeLineSeparator@でエスケープしている。@escapeLineSeparator@が水準にあるときは、escapeLineSeparator の値を変えてください。 | |
class Pict{ | |
def static pictPath = $/D:\Apps\PICT\pict.exe/$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def root = new File("./src/") | |
println root.absolutePath | |
lastmodified = [:] | |
current = [:] | |
while(true){ | |
current.clear() | |
root.eachFileRecurse { | |
current << ["${it.absolutePath}":it.lastModified()] | |
} | |
if(!current.equals(lastmodified)){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open util/ordering[Node] | |
sig Node { | |
lhs : lone Node, | |
rhs : lone Node | |
} | |
fact { | |
// 葉をたどればすべての要素が取得できるrootがただひとつ存在する | |
one root : Node | Node = root.*(lhs+rhs) | |
// 任意の節において成り立つ |