Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2 | Rev 11 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | #include "expression.h" |
15 | #include "expression.h" |
16 | #include "generic.h" |
16 | #include "generic.h" |
17 | #include "database.h" |
17 | #include "database.h" |
18 | 18 | ||
19 | 19 | ||
20 | #ident "@(#)$Header: C:/cvsroot/Vert03/protel_src/protel_yacc.y,v 1.1.1.1 2003/11/04 23:34:56 mjames Exp $" |
20 | #ident "@(#)$Header: C:/cvsroot/Vert03/eagle_src/eagle_yacc.y,v 1.1.1.1 2003/11/04 23:34:56 mjames Exp $" |
21 | 21 | ||
22 | 22 | ||
23 | static char text_buff[1024]; |
23 | static char text_buff[1024]; |
24 | 24 | ||
25 | static socket_t * current_chip; |
25 | static socket_t * current_chip; |
26 | static char curr_net_nam[MAXIDLEN]; |
26 | static char curr_net_nam[MAXIDLEN]; |
27 | 27 | ||
28 | %} |
28 | %} |
29 | %union { char * string; } |
29 | %union { char * string; } |
30 | %token SPC NL LBRK RBRK LB2 RB2 MINUS ASTERISK |
30 | %token SPC NL LBRK RBRK LB2 RB2 MINUS |
31 | %token PROTEL NETLIST VERSION |
- | |
32 | %token <string> ASTRING |
31 | %token <string> ASTRING |
33 | 32 | ||
34 | %start version |
- | |
35 | %% |
33 | %% |
36 | protelfile : version objects; |
34 | protelfile : objects; |
37 | 35 | ||
38 | version : PROTEL SPC NETLIST SPC VERSION NL; |
- | |
39 | 36 | ||
40 | objects : objects object |
37 | objects : objects object |
41 | | object |
38 | | object |
42 | ; |
39 | ; |
43 | 40 | ||
44 | 41 | ||
45 | object : component_obj |
42 | object : component_obj |
46 | | net_obj |
43 | | net_obj |
47 | | /*empty */ |
- | |
48 | ; |
- | |
49 | 44 | ||
50 | 45 | ||
51 | 46 | ||
52 | component_obj : LBRK ASTRING NL comp_ident NL ASTRING NL comp_value NL ASTRING NL comp_type NL skip_lines ASTERISK NL RBRK NL { free_lex_strings(); }; |
47 | component_obj : LBRK NL comp_ident NL comp_value NL comp_type NL skip_line skip_line skip_line RBRK NL { free_lex_strings(); }; |
53 | 48 | ||
54 | 49 | ||
55 | comp_ident: ASTRING {current_chip = find_socket(Ident,$1,Create,&socket_head); }; |
50 | comp_ident: ASTRING {current_chip = find_socket(Ident,$1,Create,&socket_head); }; |
56 | 51 | ||
57 | comp_type : ASTRING { |
52 | comp_type : ASTRING { |
Line 75... | Line 70... | ||
75 | 70 | ||
76 | 71 | ||
77 | skip_line : NL |
72 | skip_line : NL |
78 | | SPC NL |
73 | | SPC NL |
79 | ; |
74 | ; |
80 | - | ||
81 | skip_lines: skip_lines skip_line |
- | |
82 | | skip_line |
- | |
83 | | /* Nothing */ |
- | |
84 | ; |
- | |
85 | - | ||
86 | - | ||
87 | 75 | ||
88 | 76 | ||
89 | socket_pin : socket_ident MINUS ASTRING NL { define_pin(&routed_list, |
77 | socket_pin : socket_ident MINUS ASTRING NL { define_pin(&routed_list, |
90 | current_chip, |
78 | current_chip, |
91 | curr_net_nam,BIDIR,0,$3, |
79 | curr_net_nam,BIDIR,0,$3, |