summary refs log tree commit diff stats
path: root/.gitignore
Commit message (Expand)AuthorAgeFilesLines
* added dist/ to .gitignoreAxel Pahl2016-11-081-0/+1
* Update .gitignoreAxel Pahl2016-11-081-0/+1
* Ignore new cache foldersWhiteDuke2016-09-141-0/+4
* Added `.*/`, `~*` and `*.log` to GIT ignore list.Hans Raaf2016-05-211-0/+5
* Get rid of git submoduleSergey Avseyev2015-05-261-0/+1
* Make csources a submoduleAdam Strzelecki2015-05-031-1/+0
* Add csources to gitignoreFlaviu Tamas2014-11-121-0/+1
* Clean up gitignore, the current ignore is equvilent to the previousflaviut2014-04-231-548/+16
* Removes generated .dot file uploaded by mistake.Grzegorz Adam Hankiewicz2013-12-301-0/+1
* Merge pull request #759 from zielmicha/stdmsgAndreas Rumpf2013-12-201-0/+2
|\
| * Add two CGI example and basic Python CGI server.Michał Zieliński2013-12-181-0/+2
* | Expand gitignore to include all binaries built by ./koch test.Michał Zieliński2013-12-151-3/+392
|/
* Reimplement parseopt which parses arguments given as a sequence of strings, n...Michał Zieliński2013-12-091-0/+1
* Adds idetools --suggest test case. Refs #484.Grzegorz Adam Hankiewicz2013-07-021-0/+1
* Adds idetools hierarchy nesting test.Grzegorz Adam Hankiewicz2013-06-161-0/+1
* Adds idetools test to check declaration proc signatures.Grzegorz Adam Hankiewicz2013-06-161-0/+1
* Adds idetoos testcase to verify returned signatures.Grzegorz Adam Hankiewicz2013-06-161-1/+1
* Adds symbol proc run mode as suggested by Zahary.Grzegorz Adam Hankiewicz2013-06-111-0/+2
* Adds idetools testcase for dynamic dispatch. Refs #477.Grzegorz Adam Hankiewicz2013-06-101-0/+1
* Renames test cases to be more human friendly.Grzegorz Adam Hankiewicz2013-06-101-2/+2
* Adds idetools testcase. Refs #416.Grzegorz Adam Hankiewicz2013-06-071-0/+1
* Adds idetools test case. Refs #416.Grzegorz Adam Hankiewicz2013-06-071-0/+1
* Adds generic idetools api test case.Grzegorz Adam Hankiewicz2013-06-071-0/+1
* Makes caasdriver exit with number of errors.Grzegorz Adam Hankiewicz2013-06-071-0/+3
* Adds some more entries to the list of ignored files.Grzegorz Adam Hankiewicz2013-05-101-0/+114
* Separate out install/uninstall script generationAlain Kalker2013-03-171-0/+2
* Removes executable bit for text files.Grzegorz Adam Hankiewicz2013-03-161-0/+0
* applies #322 without FReadDir effectAraq2013-02-221-0/+1
* Adds tools/nimweb to .gitignore.Grzegorz Adam Hankiewicz2012-12-171-0/+1
* Adds command line interface for todo example.Grzegorz Adam Hankiewicz2012-11-011-0/+1
* Adds backend code for the cross platform todo example.Grzegorz Adam Hankiewicz2012-11-011-0/+4
* Ignores whole upload directory.Grzegorz Adam Hankiewicz2012-11-011-1/+1
* Adds command line interface for backend addition.Grzegorz Adam Hankiewicz2012-10-191-0/+1
* Adds docs/*.idx to git ignore list.Grzegorz Adam Hankiewicz2012-10-191-0/+1
* Adds android example using jni.Grzegorz Adam Hankiewicz2012-09-081-0/+9
* Adds ios patterns to ignore list.Grzegorz Adam Hankiewicz2012-09-081-0/+13
* PCRE wrapper update to 8.31Schala Zeal2012-07-091-1/+0
* auto generated files and dirs to ignoretakano322011-11-251-0/+4
* `rod' directory was renamed to `compiler'takano322011-11-251-4/+3
* non-nil AST; continue after errors for IDE supportAraq2011-02-121-0/+0
* added install.sh; scgi: does not set system.stackTraceNewLine anymoreAraq2010-10-261-0/+8
* bugfix: typo in SMTP module; SCGI module finishedAraq2010-10-251-0/+11
* Added a .gitignore filedom962010-10-231-0/+2
lass="o">[0], a[1]) else: result = leValue(a[0], b) and leValue(b, a[1]) else: if b.kind == nkRange: result = leValue(b[0], a) and leValue(a, b[1]) else: result = sameValue(a, b) proc someInSet*(s: PNode, a, b: PNode): bool = # checks if some element of a..b is in the set s assert s.kind == nkCurly if s.kind != nkCurly: #internalError(s.info, "SomeInSet") return false for i in 0..<s.len: if s[i].kind == nkRange: if leValue(s[i][0], b) and leValue(b, s[i][1]) or leValue(s[i][0], a) and leValue(a, s[i][1]): return true else: # a <= elem <= b if leValue(a, s[i]) and leValue(s[i], b): return true result = false proc toBitSet*(conf: ConfigRef; s: PNode): TBitSet = var first, j: Int128 first = firstOrd(conf, s.typ[0]) bitSetInit(result, int(getSize(conf, s.typ))) for i in 0..<s.len: if s[i].kind == nkRange: j = getOrdValue(s[i][0], first) while j <= getOrdValue(s[i][1], first): bitSetIncl(result, toInt64(j - first)) inc(j) else: bitSetIncl(result, toInt64(getOrdValue(s[i]) - first)) proc toTreeSet*(conf: ConfigRef; s: TBitSet, settype: PType, info: TLineInfo): PNode = var a, b, e, first: BiggestInt # a, b are interval borders elemType: PType n: PNode elemType = settype[0] first = firstOrd(conf, elemType).toInt64 result = newNodeI(nkCurly, info) result.typ = settype result.info = info e = 0 while e < s.len * ElemSize: if bitSetIn(s, e): a = e b = e while true: inc(b) if (b >= s.len * ElemSize) or not bitSetIn(s, b): break dec(b) let aa = newIntTypeNode(a + first, elemType) aa.info = info if a == b: result.add aa else: n = newNodeI(nkRange, info) n.typ = elemType n.add aa let bb = newIntTypeNode(b + first, elemType) bb.info = info n.add bb result.add n e = b inc(e) template nodeSetOp(a, b: PNode, op: untyped) {.dirty.} = var x = toBitSet(conf, a) let y = toBitSet(conf, b) op(x, y) result = toTreeSet(conf, x, a.typ, a.info) proc unionSets*(conf: ConfigRef; a, b: PNode): PNode = nodeSetOp(a, b, bitSetUnion) proc diffSets*(conf: ConfigRef; a, b: PNode): PNode = nodeSetOp(a, b, bitSetDiff) proc intersectSets*(conf: ConfigRef; a, b: PNode): PNode = nodeSetOp(a, b, bitSetIntersect) proc symdiffSets*(conf: ConfigRef; a, b: PNode): PNode = nodeSetOp(a, b, bitSetSymDiff) proc containsSets*(conf: ConfigRef; a, b: PNode): bool = let x = toBitSet(conf, a) let y = toBitSet(conf, b) result = bitSetContains(x, y) proc equalSets*(conf: ConfigRef; a, b: PNode): bool = let x = toBitSet(conf, a) let y = toBitSet(conf, b) result = bitSetEquals(x, y) proc complement*(conf: ConfigRef; a: PNode): PNode = var x = toBitSet(conf, a) for i in 0..high(x): x[i] = not x[i] result = toTreeSet(conf, x, a.typ, a.info) proc deduplicate*(conf: ConfigRef; a: PNode): PNode = let x = toBitSet(conf, a) result = toTreeSet(conf, x, a.typ, a.info) proc cardSet*(conf: ConfigRef; a: PNode): BiggestInt = let x = toBitSet(conf, a) result = bitSetCard(x) proc setHasRange*(s: PNode): bool = assert s.kind == nkCurly if s.kind != nkCurly: return false for i in 0..<s.len: if s[i].kind == nkRange: return true result = false proc emptyRange*(a, b: PNode): bool = result = not leValue(a, b) # a > b iff not (a <= b)