Root/boom/test/test.sub

1#SUB
2
3# Taken from ben-wpan. Removed anything project-specific but the translation
4# rules.
5
6-> T=unknown
7
8R[0-9P]* { # also handle RP...
9    -> T=R R=required
10    VAL=$R -> R=$VAL
11# -> TOL=5%
12    FN=$% -> TOL=$FN
13    FN=$ppm/K -> TC=$FN
14}
15
16RP[0-9]* {
17    -> T=RA
18    # the other parameters have already been taken care of by R*
19}
20
21C[0-9]* {
22    -> T=C C=required
23    VAL=*F -> C=$VAL
24    FN=*V -> V=>=$FN
25    FN=$% -> TOL=$FN
26    FN=(NP0|[XYZ][456789][ABCDEFPRSTUV]) -> M=$FN
27    FN=(NP0|[XYZ][456789][ABCDEFPRSTUV])/(*) -> M=$FN:1 X=$FN:2
28}
29
30L[0-9]* {
31    -> T=L
32    VAL=*H -> L=$VAL
33    FN=*A -> I=>=$FN
34}
35
36B[0-9]* {
37    -> T=FILTER M=BEAD
38    VAL=$R -> R=$VAL
39    FN=*A -> I=$FN
40    FN=*R -> Rdc=$FN
41}
42
43D[0-9]* {
44    -> T=D
45    VAL=*F { # heuristic to detect TVS
46    -> M=TVS
47    VAL=*F -> C=<=$VAL
48    FN=(*V)ac -> Vac=$FN:1
49    FN=(*V)dc -> Vdc=$FN:1
50
51    #
52    # Hack: some companies specify the class of varistors with Vdc = 9 V
53    # as Vac = 6.5 V while others use Vac = 7 V. Sometimes, Vac is even
54    # omitted entirely.
55    #
56    # Here, we work around the issue that Karmax use Vac = 6.5 V,
57    # Cooper/Bussmann use Vac = 7V if at all, and out schematics specify
58    # Vac = 6.5 V.
59    #
60    Vac=6.5V {
61        -> Vac=
62        -> Vdc=9V
63    }
64    }
65}
66

Archive Download this file

Branches:
master



interactive