-
Notifications
You must be signed in to change notification settings - Fork 0
/
vparse.nimble
78 lines (58 loc) · 2.32 KB
/
vparse.nimble
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
version = "0.3.1"
author = "Marcus Eriksson"
description = "A Verilog IEEE 1364-2005 parser library."
src_dir = "src"
bin = @["vparse"]
install_ext = @["nim"]
license = "MIT"
skip_dirs = @["tests"]
requires "nim >= 1.4.0"
requires "nimpy >= 0.1.0"
requires "bignum >= 1.0.4"
task tracebuild, "":
exec("nim c --hints:off -d:danger -d:trace src/vparse")
mv_file("src/vparse".to_exe, "vparse".to_exe)
task build_pylib, "Build the Python bindings":
when defined(windows):
exec("nim c --hints:off --threads:on --app:lib -d:pylib -d:release --out:vparse.pyd src/vparse.nim")
else:
exec("nim c --hints:off --threads:on --app:lib -d:pylib --out:vparse.so src/vparse.nim")
task test, "Run the test suite":
exec("nimble lexertests")
exec("nimble preprocessortests")
exec("nimble parsertests")
exec("nimble asttests")
exec("nimble expressiontests")
exec("nimble graphtests")
task lexertests, "Run the lexer test suite":
with_dir("tests/lexer"):
exec("nim c --hints:off -r tidentifier")
exec("nim c --hints:off -r tlexer")
task preprocessortests, "Run the preprocessor test suite":
with_dir("tests/preprocessor"):
exec("nim c --hints:off -r tpreprocessor")
task parsertests, "Run the parser test suite":
with_dir("tests/parser"):
exec("nim c --hints:off -r tconstantexpression")
exec("nim c --hints:off -r tportlist")
exec("nim c --hints:off -r tportdeclarations")
exec("nim c --hints:off -r tparameterportlist")
exec("nim c --hints:off -r tvariabledeclaration")
exec("nim c --hints:off -r teventdeclaration")
exec("nim c --hints:off -r tblockingnonblockingassignment")
exec("nim c --hints:off -r tnetdeclaration")
exec("nim c --hints:off -r tdirective")
exec("nim c --hints:off -r thierarchicalidentifier")
task asttests, "Run the AST test suite":
with_dir("tests/ast"):
exec("nim c --hints:off -r tast")
exec("nim c --hints:off -r tastop")
task expressiontests, "Run the expression test suite":
with_dir("tests/expression"):
exec("nim c --hints:off -r texpressioneval")
exec("nim c --hints:off -r texpressionkindsize")
task graphtests, "Run the graph test suite":
with_dir("tests/graph"):
exec("nim c --hints:off -r tgraph")
with_dir("tests/module"):
exec("nim c --hints:off -r tmodule")