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 | UNAMBIGUOUS_METRIC_SIZE ;
5+
6+ IMPERIAL_SIZE : ' 01005'
7+ | ' 0201'
8+ | ' 0402'
9+ | ' 0603'
10+ | ' 0805'
11+ | ' 1008'
12+ | ' 1206'
13+ | ' 1806'
14+ | ' 2010'
15+ | ' 2512' ;
16+
17+ METRIC_SIZE : UNAMBIGUOUS_METRIC_SIZE
18+ | ' 0402'
19+ | ' 0603' ;
20+
21+ UNAMBIGUOUS_METRIC_SIZE : ' 1005'
22+ | ' 1608'
23+ | ' 2012'
24+ | ' 2520'
25+ | ' 3216'
26+ | ' 3225'
27+ | ' 4516'
28+ | ' 5025'
29+ | ' 6332' ;
30+
31+ METRIC : M E T R I C ;
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