-
-
Notifications
You must be signed in to change notification settings - Fork 372
/
gen_junction_pir.pl
47 lines (41 loc) · 989 Bytes
/
gen_junction_pir.pl
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
#!/usr/bin/perl
# Copyright (C) 2008-2009, The Perl Foundation.
# $Id$
use strict;
use warnings;
my @binary = qw(
infix:**
infix:* infix:/ infix:% infix:div infix:mod
infix:+ infix:-
infix:~
infix:== infix:!= infix:< infix:> infix:<= infix:>=
infix:eq infix:ne infix:lt infix:gt infix:le infix:ge
infix:<=> infix:leg infix:cmp infix:=:=
);
my @unary = qw(
prefix:++ prefix:-- postfix:++ postfix:--
);
for (@unary) {
print qq(
.namespace []
.sub '$_' :multi('Junction')
.param pmc x
.tailcall '!DISPATCH_JUNCTION'('$_', x)
.end
);
}
for (@binary) {
print qq(
.namespace []
.sub '$_' :multi('Junction', _)
.param pmc x
.param pmc y
.tailcall '!DISPATCH_JUNCTION'('$_', x, y)
.end
.sub '$_' :multi(_, 'Junction')
.param pmc x
.param pmc y
.tailcall '!DISPATCH_JUNCTION'('$_', x, y)
.end
);
}