File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 */
44
55grammar ElectroGrammar;
6- import Alphabet ;
6+ import PackageSize, Units ;
77
8- electro_grammar : capacitance ;
8+ electro_grammar : capacitor ;
99
10- capacitance : NUMBER CPREFIX FARAD ?;
11-
12- fragment DIGIT : [0-9];
13- NUMBER : DIGIT * ' .' ? DIGIT + | DIGIT + ' .' ? DIGIT *;
14-
15- fragment NANO : ' n' | N A N O ;
16- fragment PICO : ' p' | P I C O ;
17- fragment MICRO : ' u' | M I C R O ;
18- CPREFIX : MICRO | NANO | PICO ;
19-
20- FARAD : F | F A R A D ;
10+ capacitor : capacitance package_size?;
2111
2212WHITESPACE : [\p{White_Space} ] -> skip;
Original file line number Diff line number Diff line change 1+ grammar PackageSize;
2+ import Alphabet;
3+
4+ package_size : IMPERIAL_SIZE | METRIC_SIZE ;
5+
6+ IMPERIAL_SIZE : ' 01005'
7+ | ' 0201'
8+ | ' 0805'
9+ | ' 1008'
10+ | ' 1206'
11+ | ' 1806'
12+ | ' 2010'
13+ | ' 2512'
14+ | IMPERIAL AMBIGUOUS_SIZE
15+ | AMBIGUOUS_SIZE IMPERIAL ;
16+
17+ METRIC_SIZE : ' 1005'
18+ | ' 1608'
19+ | ' 2012'
20+ | ' 2520'
21+ | ' 3216'
22+ | ' 3225'
23+ | ' 4516'
24+ | ' 5025'
25+ | ' 6332'
26+ | METRIC AMBIGUOUS_SIZE
27+ | AMBIGUOUS_SIZE METRIC ;
28+
29+ AMBIGUOUS_SIZE : ' 0402'
30+ | ' 0603' ;
31+
32+ METRIC : M | M E T R I C ;
33+ IMPERIAL : I | I M P E R I A L ;
Original file line number Diff line number Diff line change 1+ grammar Units;
2+ import Alphabet;
3+
4+ capacitance : NUMBER CPREFIX FARAD ?;
5+
6+ fragment DIGIT : [0-9];
7+ NUMBER : DIGIT * ' .' ? DIGIT + | DIGIT + ' .' ? DIGIT *;
8+
9+ fragment NANO : ' n' | N A N O ;
10+ fragment PICO : ' p' | P I C O ;
11+ fragment MICRO : ' u' | M I C R O ;
12+ CPREFIX : MICRO | NANO | PICO ;
13+
14+ FARAD : F | F A R A D ;
You can’t perform that action at this time.
0 commit comments