ndtypes 0.2.0dev5 → 0.2.0dev6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +12 -0
- data/Rakefile +8 -0
- data/ext/ruby_ndtypes/GPATH +0 -0
- data/ext/ruby_ndtypes/GRTAGS +0 -0
- data/ext/ruby_ndtypes/GTAGS +0 -0
- data/ext/ruby_ndtypes/extconf.rb +1 -1
- data/ext/ruby_ndtypes/include/ndtypes.h +231 -122
- data/ext/ruby_ndtypes/include/ruby_ndtypes.h +1 -1
- data/ext/ruby_ndtypes/lib/libndtypes.a +0 -0
- data/ext/ruby_ndtypes/lib/libndtypes.so.0.2.0dev3 +0 -0
- data/ext/ruby_ndtypes/ndtypes/Makefile +87 -0
- data/ext/ruby_ndtypes/ndtypes/config.h +68 -0
- data/ext/ruby_ndtypes/ndtypes/config.log +477 -0
- data/ext/ruby_ndtypes/ndtypes/config.status +1027 -0
- data/ext/ruby_ndtypes/ndtypes/doc/_static/style.css +7 -0
- data/ext/ruby_ndtypes/ndtypes/doc/_templates/layout.html +2 -0
- data/ext/ruby_ndtypes/ndtypes/doc/conf.py +40 -4
- data/ext/ruby_ndtypes/ndtypes/doc/images/xndlogo.png +0 -0
- data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/types.rst +1 -1
- data/ext/ruby_ndtypes/ndtypes/doc/requirements.txt +2 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/Makefile +287 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/Makefile.in +20 -4
- data/ext/ruby_ndtypes/ndtypes/libndtypes/Makefile.vc +22 -3
- data/ext/ruby_ndtypes/ndtypes/libndtypes/alloc.c +1 -1
- data/ext/ruby_ndtypes/ndtypes/libndtypes/alloc.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/attr.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/Makefile +73 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.c +246 -229
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.h +15 -11
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.y +38 -28
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.c +91 -91
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.h +1 -1
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.l +4 -3
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/export.c +8 -7
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/export.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/import.c +2 -2
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/import.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/context.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/copy.c +263 -182
- data/ext/ruby_ndtypes/ndtypes/libndtypes/copy.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/encodings.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/equal.c +67 -7
- data/ext/ruby_ndtypes/ndtypes/libndtypes/equal.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.c +1112 -1000
- data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.h +69 -58
- data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.y +150 -99
- data/ext/ruby_ndtypes/ndtypes/libndtypes/io.c +185 -15
- data/ext/ruby_ndtypes/ndtypes/libndtypes/io.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.c +301 -276
- data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.h +1 -1
- data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.l +9 -4
- data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/libndtypes.a +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/libndtypes.so +1 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/libndtypes.so.0 +1 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/libndtypes.so.0.2.0dev3 +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/match.c +729 -228
- data/ext/ruby_ndtypes/ndtypes/libndtypes/match.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.c +768 -403
- data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.h +1002 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.h.in +231 -122
- data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/parsefuncs.c +176 -84
- data/ext/ruby_ndtypes/ndtypes/libndtypes/parsefuncs.h +26 -14
- data/ext/ruby_ndtypes/ndtypes/libndtypes/parsefuncs.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/parser.c +57 -35
- data/ext/ruby_ndtypes/ndtypes/libndtypes/parser.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/primitive.c +420 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/primitive.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/seq.c +8 -8
- data/ext/ruby_ndtypes/ndtypes/libndtypes/seq.h +1 -1
- data/ext/ruby_ndtypes/ndtypes/libndtypes/seq.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/Makefile +48 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/deserialize.c +200 -116
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/deserialize.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/serialize.c +46 -4
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/serialize.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/substitute.c +58 -27
- data/ext/ruby_ndtypes/ndtypes/libndtypes/substitute.h +1 -1
- data/ext/ruby_ndtypes/ndtypes/libndtypes/substitute.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/symtable.c +3 -5
- data/ext/ruby_ndtypes/ndtypes/libndtypes/symtable.h +12 -4
- data/ext/ruby_ndtypes/ndtypes/libndtypes/symtable.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/Makefile +55 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/Makefile.in +8 -8
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/Makefile.vc +5 -5
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/runtest.c +274 -172
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test.h +24 -4
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_array.c +2 -2
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_buffer.c +14 -14
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_match.c +32 -30
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse.c +37 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse_error.c +36 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse_roundtrip.c +16 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_record.c +5 -5
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_typecheck.c +706 -253
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_unify.c +132 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/unify.c +703 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/unify.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/util.c +335 -127
- data/ext/ruby_ndtypes/ndtypes/libndtypes/util.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/values.c +2 -2
- data/ext/ruby_ndtypes/ndtypes/libndtypes/values.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndt_randtype.py +88 -71
- data/ext/ruby_ndtypes/ndtypes/python/ndt_support.py +0 -1
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/__init__.py +10 -13
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/_ndtypes.c +395 -314
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/libndtypes.a +0 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/libndtypes.so +1 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/libndtypes.so.0 +1 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/libndtypes.so.0.2.0dev3 +0 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/ndtypes.h +1002 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/pyndtypes.h +15 -33
- data/ext/ruby_ndtypes/ndtypes/python/test_ndtypes.py +340 -132
- data/ext/ruby_ndtypes/ndtypes/setup.py +11 -2
- data/ext/ruby_ndtypes/ruby_ndtypes.c +364 -241
- data/ext/ruby_ndtypes/ruby_ndtypes.h +1 -1
- data/ext/ruby_ndtypes/ruby_ndtypes_internal.h +0 -1
- data/lib/ndtypes.rb +11 -0
- data/lib/ndtypes/version.rb +2 -2
- data/lib/ruby_ndtypes.so +0 -0
- data/ndtypes.gemspec +3 -0
- data/spec/ndtypes_spec.rb +6 -0
- metadata +98 -4
- data/ext/ruby_ndtypes/gc_guard.c +0 -36
- data/ext/ruby_ndtypes/gc_guard.h +0 -12
@@ -1,7 +1,11 @@
|
|
1
1
|
import sys, os, docutils
|
2
2
|
|
3
3
|
|
4
|
-
extensions = [
|
4
|
+
extensions = [
|
5
|
+
'sphinx.ext.intersphinx',
|
6
|
+
'sphinx.ext.doctest',
|
7
|
+
'sphinx.ext.extlinks'
|
8
|
+
]
|
5
9
|
|
6
10
|
source_suffix = '.rst'
|
7
11
|
master_doc = 'index'
|
@@ -11,16 +15,48 @@ version = 'v0.2.0dev3'
|
|
11
15
|
release = 'v0.2.0dev3'
|
12
16
|
exclude_patterns = ['doc', 'build']
|
13
17
|
pygments_style = 'sphinx'
|
18
|
+
|
14
19
|
html_static_path = ['_static']
|
20
|
+
templates_path = ['_templates']
|
15
21
|
|
16
22
|
primary_domain = 'py'
|
17
23
|
add_function_parentheses = False
|
18
24
|
|
25
|
+
html_theme = "sphinx_rtd_theme"
|
26
|
+
html_theme_path = ["_themes", ]
|
27
|
+
|
28
|
+
html_theme_options = {
|
29
|
+
'canonical_url': 'https://xnd.io/',
|
30
|
+
'analytics_id': '',
|
31
|
+
'logo_only': True,
|
32
|
+
'display_version': True,
|
33
|
+
'prev_next_buttons_location': 'bottom',
|
34
|
+
# Toc options
|
35
|
+
'collapse_navigation': True,
|
36
|
+
'sticky_navigation': True,
|
37
|
+
'navigation_depth': 4,
|
38
|
+
}
|
39
|
+
|
40
|
+
html_context = {
|
41
|
+
"display_github": False, # Add 'Edit on Github' link instead of 'View page source'
|
42
|
+
"last_updated": True,
|
43
|
+
"commit": False,
|
44
|
+
}
|
45
|
+
|
46
|
+
html_show_sourcelink = False
|
47
|
+
|
48
|
+
extlinks = {
|
49
|
+
'issue': ('https://github.com/plures/ndtypes/issues/%s', 'GH#'),
|
50
|
+
'pr': ('https://github.com/plures/ndtypes/pull/%s', 'GH#')
|
51
|
+
}
|
52
|
+
|
53
|
+
html_logo = "images/xndlogo.png"
|
54
|
+
|
19
55
|
|
20
56
|
def setup(app):
|
21
|
-
app.add_crossref_type(
|
22
|
-
|
57
|
+
app.add_crossref_type(
|
58
|
+
'topic', 'topic', 'single: %s', docutils.nodes.strong
|
59
|
+
)
|
23
60
|
app.add_javascript("copybutton.js")
|
24
61
|
|
25
62
|
|
26
|
-
|
Binary file
|
@@ -65,7 +65,7 @@ All fixed-size scalars:
|
|
65
65
|
+-----------+-----------------+------------+--------------+---------------+-----------------------+
|
66
66
|
| | | ``int32`` | ``uint32`` | ``float64`` | ``complex128`` [#f4]_ |
|
67
67
|
+-----------+-----------------+------------+--------------+---------------+-----------------------+
|
68
|
-
| | | ``int64`` | ``uint64`` |
|
68
|
+
| | | ``int64`` | ``uint64`` | ``bfloat16`` | ``bcomplex32`` |
|
69
69
|
+-----------+-----------------+------------+--------------+---------------+-----------------------+
|
70
70
|
|
71
71
|
.. [#f1] implemented as :c:type:`char`
|
@@ -0,0 +1,287 @@
|
|
1
|
+
|
2
|
+
# ==============================================================================
|
3
|
+
# Unix Makefile for libndtypes
|
4
|
+
# ==============================================================================
|
5
|
+
|
6
|
+
|
7
|
+
LIBSTATIC = libndtypes.a
|
8
|
+
LIBNAME = libndtypes.so
|
9
|
+
LIBSONAME = libndtypes.so.0
|
10
|
+
LIBSHARED = libndtypes.so.0.2.0dev3
|
11
|
+
|
12
|
+
CC = gcc
|
13
|
+
LD = gcc
|
14
|
+
AR = ar
|
15
|
+
RANLIB = ranlib
|
16
|
+
|
17
|
+
CONFIGURE_CFLAGS = -I.. -Wall -Wextra -std=c11 -pedantic -O2 -g
|
18
|
+
NDT_CFLAGS = $(strip $(CONFIGURE_CFLAGS) $(CFLAGS))
|
19
|
+
NDT_CFLAGS_SHARED = $(NDT_CFLAGS) -fPIC
|
20
|
+
|
21
|
+
CONFIGURE_LDFLAGS = -shared -Wl,-soname,libndtypes.so.0
|
22
|
+
NDT_LDFLAGS = $(strip $(CONFIGURE_LDFLAGS) $(LDFLAGS))
|
23
|
+
|
24
|
+
CONFIGURE_COV_CFLAGS = -I.. -Wall -Wextra -std=c11 -pedantic -O0 -g -fno-inline -fprofile-arcs -ftest-coverage
|
25
|
+
CONFIGURE_COV_LDFLAGS = -shared -Wl,-soname,libndtypes.so.0 -fprofile-arcs
|
26
|
+
ifeq ($(MAKECMDGOALS), coverage)
|
27
|
+
NDT_CFLAGS = $(strip $(CONFIGURE_COV_CFLAGS) $(CFLAGS))
|
28
|
+
NDT_LDFLAGS = $(strip $(CONFIGURE_COV_LDFLAGS) $(LDFLAGS))
|
29
|
+
endif
|
30
|
+
|
31
|
+
|
32
|
+
default: $(LIBSTATIC) $(LIBSHARED)
|
33
|
+
|
34
|
+
|
35
|
+
OBJS = alloc.o attr.o context.o copy.o encodings.o equal.o grammar.o io.o \
|
36
|
+
lexer.o match.o ndtypes.o parsefuncs.o parser.o primitive.o seq.o \
|
37
|
+
substitute.o symtable.o unify.o util.o values.o
|
38
|
+
|
39
|
+
SHARED_OBJS = .objs/alloc.o .objs/attr.o .objs/context.o .objs/copy.o \
|
40
|
+
.objs/encodings.o .objs/equal.o .objs/grammar.o .objs/io.o \
|
41
|
+
.objs/lexer.o .objs/match.o .objs/ndtypes.o .objs/parsefuncs.o \
|
42
|
+
.objs/parser.o .objs/primitive.o .objs/seq.o .objs/substitute.o \
|
43
|
+
.objs/symtable.o .objs/unify.o .objs/util.o .objs/values.o
|
44
|
+
|
45
|
+
|
46
|
+
COMPAT_OBJS = compat/bpgrammar.o compat/bplexer.o compat/import.o compat/export.o
|
47
|
+
|
48
|
+
COMPAT_SHARED_OBJS = compat/.objs/bpgrammar.o compat/.objs/bplexer.o \
|
49
|
+
compat/.objs/import.o compat/.objs/export.o
|
50
|
+
|
51
|
+
SERIALIZE_OBJS = serialize/serialize.o serialize/deserialize.o
|
52
|
+
|
53
|
+
SERIALIZE_SHARED_OBJS = serialize/.objs/serialize.o serialize/.objs/deserialize.o
|
54
|
+
|
55
|
+
|
56
|
+
$(LIBSTATIC): Makefile $(OBJS) $(COMPAT_OBJS) $(SERIALIZE_OBJS)
|
57
|
+
$(AR) rc $(LIBSTATIC) $(OBJS) $(COMPAT_OBJS) $(SERIALIZE_OBJS)
|
58
|
+
$(RANLIB) $(LIBSTATIC)
|
59
|
+
|
60
|
+
|
61
|
+
$(LIBSHARED): Makefile $(SHARED_OBJS) $(COMPAT_SHARED_OBJS) $(SERIALIZE_SHARED_OBJS)
|
62
|
+
$(LD) $(NDT_LDFLAGS) -o $(LIBSHARED) $(SHARED_OBJS) $(COMPAT_SHARED_OBJS) $(SERIALIZE_SHARED_OBJS)
|
63
|
+
ln -sf $(LIBSHARED) $(LIBNAME)
|
64
|
+
ln -sf $(LIBSHARED) $(LIBSONAME)
|
65
|
+
|
66
|
+
|
67
|
+
alloc.o:\
|
68
|
+
Makefile alloc.c ndtypes.h
|
69
|
+
$(CC) $(NDT_CFLAGS) -c alloc.c
|
70
|
+
|
71
|
+
.objs/alloc.o:\
|
72
|
+
Makefile alloc.c ndtypes.h
|
73
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c alloc.c -o .objs/alloc.o
|
74
|
+
|
75
|
+
attr.o:\
|
76
|
+
Makefile attr.c attr.h ndtypes.h
|
77
|
+
$(CC) $(NDT_CFLAGS) -c attr.c
|
78
|
+
|
79
|
+
.objs/attr.o:\
|
80
|
+
Makefile attr.c attr.h ndtypes.h
|
81
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c attr.c -o .objs/attr.o
|
82
|
+
|
83
|
+
context.o:\
|
84
|
+
Makefile context.c ndtypes.h
|
85
|
+
$(CC) $(NDT_CFLAGS) -c context.c
|
86
|
+
|
87
|
+
.objs/context.o:\
|
88
|
+
Makefile context.c ndtypes.h
|
89
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c context.c -o .objs/context.o
|
90
|
+
|
91
|
+
copy.o:\
|
92
|
+
Makefile copy.c ndtypes.h
|
93
|
+
$(CC) $(NDT_CFLAGS) -c copy.c
|
94
|
+
|
95
|
+
.objs/copy.o:\
|
96
|
+
Makefile copy.c ndtypes.h
|
97
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c copy.c -o .objs/copy.o
|
98
|
+
|
99
|
+
encodings.o:\
|
100
|
+
Makefile encodings.c ndtypes.h
|
101
|
+
$(CC) $(NDT_CFLAGS) -c encodings.c
|
102
|
+
|
103
|
+
.objs/encodings.o:\
|
104
|
+
Makefile encodings.c ndtypes.h
|
105
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c encodings.c -o .objs/encodings.o
|
106
|
+
|
107
|
+
io.o:\
|
108
|
+
Makefile io.c ndtypes.h
|
109
|
+
$(CC) $(NDT_CFLAGS) -c io.c
|
110
|
+
|
111
|
+
.objs/io.o:\
|
112
|
+
Makefile io.c ndtypes.h
|
113
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c io.c -o .objs/io.o
|
114
|
+
|
115
|
+
equal.o:\
|
116
|
+
Makefile equal.c ndtypes.h
|
117
|
+
$(CC) $(NDT_CFLAGS) -c equal.c
|
118
|
+
|
119
|
+
.objs/equal.o:\
|
120
|
+
Makefile equal.c ndtypes.h
|
121
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c equal.c -o .objs/equal.o
|
122
|
+
|
123
|
+
grammar.o:\
|
124
|
+
Makefile grammar.c grammar.h lexer.h ndtypes.h parsefuncs.h seq.h
|
125
|
+
$(CC) $(NDT_CFLAGS) -c grammar.c
|
126
|
+
|
127
|
+
.objs/grammar.o:\
|
128
|
+
Makefile grammar.c grammar.h lexer.h ndtypes.h parsefuncs.h seq.h
|
129
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c grammar.c -o .objs/grammar.o
|
130
|
+
|
131
|
+
lexer.o:\
|
132
|
+
Makefile lexer.c grammar.h lexer.h parsefuncs.h
|
133
|
+
$(CC) $(NDT_CFLAGS) -c lexer.c
|
134
|
+
|
135
|
+
.objs/lexer.o:\
|
136
|
+
Makefile lexer.c grammar.h lexer.h parsefuncs.h
|
137
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c lexer.c -o .objs/lexer.o
|
138
|
+
|
139
|
+
match.o:\
|
140
|
+
Makefile match.c ndtypes.h symtable.h
|
141
|
+
$(CC) $(NDT_CFLAGS) -c match.c
|
142
|
+
|
143
|
+
.objs/match.o:\
|
144
|
+
Makefile match.c ndtypes.h symtable.h
|
145
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c match.c -o .objs/match.o
|
146
|
+
|
147
|
+
ndtypes.o:\
|
148
|
+
Makefile ndtypes.c ndtypes.h
|
149
|
+
$(CC) $(NDT_CFLAGS) -c ndtypes.c
|
150
|
+
|
151
|
+
.objs/ndtypes.o:\
|
152
|
+
Makefile ndtypes.c ndtypes.h
|
153
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c ndtypes.c -o .objs/ndtypes.o
|
154
|
+
|
155
|
+
parsefuncs.o:\
|
156
|
+
Makefile parsefuncs.c ndtypes.h parsefuncs.h seq.h
|
157
|
+
$(CC) $(NDT_CFLAGS) -c parsefuncs.c
|
158
|
+
|
159
|
+
.objs/parsefuncs.o:\
|
160
|
+
Makefile parsefuncs.c ndtypes.h parsefuncs.h seq.h
|
161
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c parsefuncs.c -o .objs/parsefuncs.o
|
162
|
+
|
163
|
+
parser.o:\
|
164
|
+
Makefile parser.c grammar.h lexer.h ndtypes.h seq.h
|
165
|
+
$(CC) $(NDT_CFLAGS) -c parser.c
|
166
|
+
|
167
|
+
.objs/parser.o:\
|
168
|
+
Makefile parser.c grammar.h lexer.h ndtypes.h seq.h
|
169
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c parser.c -o .objs/parser.o
|
170
|
+
|
171
|
+
primitive.o:\
|
172
|
+
Makefile primitive.c grammar.h lexer.h ndtypes.h seq.h
|
173
|
+
$(CC) $(NDT_CFLAGS) -c primitive.c
|
174
|
+
|
175
|
+
.objs/primitive.o:\
|
176
|
+
Makefile primitive.c grammar.h lexer.h ndtypes.h seq.h
|
177
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c primitive.c -o .objs/primitive.o
|
178
|
+
|
179
|
+
seq.o:\
|
180
|
+
Makefile seq.c ndtypes.h seq.h
|
181
|
+
$(CC) $(NDT_CFLAGS) -c seq.c
|
182
|
+
|
183
|
+
.objs/seq.o:\
|
184
|
+
Makefile seq.c ndtypes.h seq.h
|
185
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c seq.c -o .objs/seq.o
|
186
|
+
|
187
|
+
substitute.o:\
|
188
|
+
Makefile substitute.c ndtypes.h substitute.h symtable.h
|
189
|
+
$(CC) $(NDT_CFLAGS) -c substitute.c
|
190
|
+
|
191
|
+
.objs/substitute.o:\
|
192
|
+
Makefile substitute.c ndtypes.h substitute.h symtable.h
|
193
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c substitute.c -o .objs/substitute.o
|
194
|
+
|
195
|
+
symtable.o:\
|
196
|
+
Makefile symtable.c ndtypes.h symtable.h
|
197
|
+
$(CC) $(NDT_CFLAGS) -c symtable.c
|
198
|
+
|
199
|
+
.objs/symtable.o:\
|
200
|
+
Makefile symtable.c ndtypes.h symtable.h
|
201
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c symtable.c -o .objs/symtable.o
|
202
|
+
|
203
|
+
unify.o:\
|
204
|
+
Makefile unify.c ndtypes.h
|
205
|
+
$(CC) $(NDT_CFLAGS) -c unify.c
|
206
|
+
|
207
|
+
.objs/unify.o:\
|
208
|
+
Makefile unify.c ndtypes.h
|
209
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c unify.c -o .objs/unify.o
|
210
|
+
|
211
|
+
util.o:\
|
212
|
+
Makefile util.c ndtypes.h
|
213
|
+
$(CC) $(NDT_CFLAGS) -c util.c
|
214
|
+
|
215
|
+
.objs/util.o:\
|
216
|
+
Makefile util.c ndtypes.h
|
217
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c util.c -o .objs/util.o
|
218
|
+
|
219
|
+
values.o:\
|
220
|
+
Makefile values.c ndtypes.h
|
221
|
+
$(CC) $(NDT_CFLAGS) -c values.c
|
222
|
+
|
223
|
+
.objs/values.o:\
|
224
|
+
Makefile values.c ndtypes.h
|
225
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c values.c -o .objs/values.o
|
226
|
+
|
227
|
+
|
228
|
+
# Without these, GNU make automatically builds the parser.
|
229
|
+
%.c: %.y
|
230
|
+
%.c: %.l
|
231
|
+
|
232
|
+
parser: FORCE
|
233
|
+
bison -Wall -o grammar.c -pndt_yy --defines=grammar.h grammar.y
|
234
|
+
flex -o lexer.c -Pndt_yy --header-file=lexer.h lexer.l
|
235
|
+
|
236
|
+
|
237
|
+
# compat directory
|
238
|
+
$(COMPAT_OBJS) $(COMPAT_SHARED_OBJS):\
|
239
|
+
Makefile compat/Makefile compat/bpgrammar.y compat/bplexer.l compat/import.c \
|
240
|
+
ndtypes.h seq.h
|
241
|
+
cd compat && make
|
242
|
+
|
243
|
+
# serialize directory
|
244
|
+
$(SERIALIZE_OBJS) $(SERIALIZE_SHARED_OBJS):\
|
245
|
+
Makefile serialize/Makefile serialize/serialize.c ndtypes.h
|
246
|
+
cd serialize && make
|
247
|
+
|
248
|
+
|
249
|
+
# Coverage
|
250
|
+
coverage:\
|
251
|
+
Makefile clean $(LIBSTATIC) $(LIBSHARED)
|
252
|
+
|
253
|
+
|
254
|
+
# Benchmark
|
255
|
+
bench:\
|
256
|
+
Makefile tools/bench.c ndtypes.h $(LIBSTATIC)
|
257
|
+
$(CC) -I. $(NDT_CFLAGS) -o bench tools/bench.c $(LIBSTATIC)
|
258
|
+
|
259
|
+
|
260
|
+
# Print the AST
|
261
|
+
print_ast:\
|
262
|
+
Makefile tools/print_ast.c ndtypes.h $(LIBSTATIC)
|
263
|
+
$(CC) -I. $(NDT_CFLAGS) -o print_ast tools/print_ast.c $(LIBSTATIC)
|
264
|
+
|
265
|
+
|
266
|
+
# Indent a file that contains a datashape type
|
267
|
+
indent:\
|
268
|
+
Makefile tools/indent.c ndtypes.h $(LIBSTATIC)
|
269
|
+
$(CC) -I. $(NDT_CFLAGS) -o indent tools/indent.c $(LIBSTATIC)
|
270
|
+
|
271
|
+
|
272
|
+
FORCE:
|
273
|
+
|
274
|
+
clean: FORCE
|
275
|
+
rm -f *.o *.so *.gch *.gcda *.gcno *.gcov *.dyn *.dpi *.lock
|
276
|
+
rm -f bench indent print_ast $(LIBSTATIC) $(LIBSHARED) $(LIBSONAME) $(LIBNAME)
|
277
|
+
cd .objs && rm -f *.o *.so *.gch *.gcda *.gcno *.gcov *.dyn *.dpi *.lock
|
278
|
+
cd compat && make clean
|
279
|
+
cd serialize && make clean
|
280
|
+
|
281
|
+
distclean: clean
|
282
|
+
rm -f Makefile ndtypes.h
|
283
|
+
cd compat && make distclean
|
284
|
+
cd serialize && make distclean
|
285
|
+
|
286
|
+
|
287
|
+
|
@@ -33,14 +33,14 @@ default: $(LIBSTATIC) $(LIBSHARED)
|
|
33
33
|
|
34
34
|
|
35
35
|
OBJS = alloc.o attr.o context.o copy.o encodings.o equal.o grammar.o io.o \
|
36
|
-
lexer.o match.o ndtypes.o parsefuncs.o parser.o
|
37
|
-
symtable.o util.o values.o
|
36
|
+
lexer.o match.o ndtypes.o parsefuncs.o parser.o primitive.o seq.o \
|
37
|
+
substitute.o symtable.o unify.o util.o values.o
|
38
38
|
|
39
39
|
SHARED_OBJS = .objs/alloc.o .objs/attr.o .objs/context.o .objs/copy.o \
|
40
40
|
.objs/encodings.o .objs/equal.o .objs/grammar.o .objs/io.o \
|
41
41
|
.objs/lexer.o .objs/match.o .objs/ndtypes.o .objs/parsefuncs.o \
|
42
|
-
.objs/parser.o .objs/
|
43
|
-
.objs/util.o .objs/values.o
|
42
|
+
.objs/parser.o .objs/primitive.o .objs/seq.o .objs/substitute.o \
|
43
|
+
.objs/symtable.o .objs/unify.o .objs/util.o .objs/values.o
|
44
44
|
|
45
45
|
|
46
46
|
COMPAT_OBJS = compat/bpgrammar.o compat/bplexer.o compat/import.o compat/export.o
|
@@ -168,6 +168,14 @@ Makefile parser.c grammar.h lexer.h ndtypes.h seq.h
|
|
168
168
|
Makefile parser.c grammar.h lexer.h ndtypes.h seq.h
|
169
169
|
$(CC) $(NDT_CFLAGS_SHARED) -c parser.c -o .objs/parser.o
|
170
170
|
|
171
|
+
primitive.o:\
|
172
|
+
Makefile primitive.c grammar.h lexer.h ndtypes.h seq.h
|
173
|
+
$(CC) $(NDT_CFLAGS) -c primitive.c
|
174
|
+
|
175
|
+
.objs/primitive.o:\
|
176
|
+
Makefile primitive.c grammar.h lexer.h ndtypes.h seq.h
|
177
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c primitive.c -o .objs/primitive.o
|
178
|
+
|
171
179
|
seq.o:\
|
172
180
|
Makefile seq.c ndtypes.h seq.h
|
173
181
|
$(CC) $(NDT_CFLAGS) -c seq.c
|
@@ -192,6 +200,14 @@ Makefile symtable.c ndtypes.h symtable.h
|
|
192
200
|
Makefile symtable.c ndtypes.h symtable.h
|
193
201
|
$(CC) $(NDT_CFLAGS_SHARED) -c symtable.c -o .objs/symtable.o
|
194
202
|
|
203
|
+
unify.o:\
|
204
|
+
Makefile unify.c ndtypes.h
|
205
|
+
$(CC) $(NDT_CFLAGS) -c unify.c
|
206
|
+
|
207
|
+
.objs/unify.o:\
|
208
|
+
Makefile unify.c ndtypes.h
|
209
|
+
$(CC) $(NDT_CFLAGS_SHARED) -c unify.c -o .objs/unify.o
|
210
|
+
|
195
211
|
util.o:\
|
196
212
|
Makefile util.c ndtypes.h
|
197
213
|
$(CC) $(NDT_CFLAGS) -c util.c
|
@@ -33,13 +33,14 @@ default: $(LIBSTATIC) $(LIBSHARED)
|
|
33
33
|
|
34
34
|
OBJS = alloc.obj attr.obj context.obj copy.obj equal.obj encodings.obj \
|
35
35
|
grammar.obj io.obj lexer.obj match.obj ndtypes.obj parsefuncs.obj \
|
36
|
-
parser.obj seq.obj substitute.obj symtable.obj
|
36
|
+
parser.obj primitive.obj seq.obj substitute.obj symtable.obj unify.obj \
|
37
|
+
util.obj values.obj
|
37
38
|
|
38
39
|
SHARED_OBJS = .objs\alloc.obj .objs\attr.obj .objs\context.obj .objs\copy.obj \
|
39
40
|
.objs\equal.obj .objs\encodings.obj .objs\grammar.obj .objs\io.obj \
|
40
41
|
.objs\lexer.obj .objs\match.obj .objs\ndtypes.obj .objs\parsefuncs.obj \
|
41
|
-
.objs\parser.obj .objs\
|
42
|
-
.objs\util.obj .objs\values.obj
|
42
|
+
.objs\parser.obj .objs\primitive.obj .objs\seq.obj .objs\substitute.obj \
|
43
|
+
.objs\symtable.obj .objs\unify.obj .objs\util.obj .objs\values.obj
|
43
44
|
|
44
45
|
|
45
46
|
COMPAT_OBJS = compat\bpgrammar.obj compat\bplexer.obj compat\import.obj compat\export.obj
|
@@ -168,6 +169,16 @@ Makefile parser.c grammar.h lexer.h ndtypes.h seq.h
|
|
168
169
|
Makefile parser.c grammar.h lexer.h ndtypes.h seq.h
|
169
170
|
$(CC) $(CFLAGS_FOR_PARSER_SHARED) -c parser.c
|
170
171
|
|
172
|
+
primitive.obj:\
|
173
|
+
Makefile primitive.c grammar.h lexer.h ndtypes.h seq.h
|
174
|
+
$(CC) $(CFLAGS) -c primitive.c
|
175
|
+
|
176
|
+
.objs\primitive.obj:\
|
177
|
+
Makefile primitive.c grammar.h lexer.h ndtypes.h seq.h
|
178
|
+
$(CC) $(CFLAGS_SHARED) -c primitive.c
|
179
|
+
|
180
|
+
seq.obj:\
|
181
|
+
Makefile seq.c ndtypes.h seq.h
|
171
182
|
seq.obj:\
|
172
183
|
Makefile seq.c ndtypes.h seq.h
|
173
184
|
$(CC) $(CFLAGS) -c seq.c
|
@@ -192,6 +203,14 @@ Makefile symtable.c ndtypes.h symtable.h
|
|
192
203
|
Makefile symtable.c ndtypes.h symtable.h
|
193
204
|
$(CC) $(CFLAGS_SHARED) -c symtable.c
|
194
205
|
|
206
|
+
unify.obj:\
|
207
|
+
Makefile unify.c ndtypes.h
|
208
|
+
$(CC) $(CFLAGS) -c unify.c
|
209
|
+
|
210
|
+
.objs\unify.obj:\
|
211
|
+
Makefile unify.c ndtypes.h
|
212
|
+
$(CC) $(CFLAGS_SHARED) -c unify.c
|
213
|
+
|
195
214
|
util.obj:\
|
196
215
|
Makefile util.c ndtypes.h
|
197
216
|
$(CC) $(CFLAGS) -c util.c
|