-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuiltin.ijs
More file actions
executable file
·52 lines (43 loc) · 1.06 KB
/
builtin.ijs
File metadata and controls
executable file
·52 lines (43 loc) · 1.06 KB
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
#! /usr/bin/jconsole
require 'strings'
preamble =: 0 : 0
// Generated; see builtin.ijs
#undef T
)
post =: 0 : 0
#define T(v) ((v).t)
)
chart =: ;:;._2 ]0 : 0
L U T
U U T
T T T
D U
P void P
R T A
A void A
)
temptemp =: <;._2 ] 0 : 0
#define D_Q9(func) R func##_q9(fprotF)
typedef R (*Q9)(protF); extern Q9 B_q9[256];
Q9 B_q9[256]; \
)
torplc =. (;:'Q R F') (,~ tolower&.>@:(2&{.))@:,@,."_ _1 chart
templates =: ; temptemp (>@[ <@rplc ])"0 1`[@.(a:=[)(<@)"0 _ torplc
'nums fprotT' =: ({."1 ,&< {:"1) (2&{. ; 4&}.);._2 ] 0 : 0
1 T l
2 T l, T r
11 V l, T ll
12 V l, T ll, T rr
21 V l, V r, T ll
22 V l, V r, T ll, T rr
)
nums =: -.&' '&.> nums
fprot =: rplc&(;:'T V')&.> fprotT
fprotP =: 'V p, '&,&.> fprot
fprotA =: 'A a, '&,&.> fprotT
addprot =. , (}.@[;(#~ e.&'AVT,')@])&>/"1
changes =: (<'9'),.nums,. ,./ addprot (<,.".)@,~&'fprot'@> 4{.<"0'TPA'
r1 =. |: changes <@(rplc~ >)"1 0/ templates
r2 =. r1 rplc (#&a: ,&< {.&(<'#define DECLARE_BUILTINS \')) #changes
'builtin_auto.h' (1!:2<)~ post,~preamble, LF,~_3}. ; ,&LF&.> a:-.~,r2
exit ''