Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | mjames | 1 | %{ |
2 | /* |
||
3 | * $Header: c:\\cygwin\\cvsroot/Vert03/pads_src/pads_lex.l,v 1.1.1.1 2003/11/04 23:34:58 mjames Exp $ |
||
4 | * |
||
5 | * $Log: pads_lex.l,v $ |
||
6 | * Revision 1.1.1.1 2003/11/04 23:34:58 mjames |
||
7 | * Imported into local repositrory |
||
8 | * |
||
9 | * Revision 1.7 2002/10/02 19:37:28 MJAMES |
||
10 | * Moved dummy functions to a separate support file. |
||
11 | * |
||
12 | * Used correct number of arguments to define_pin |
||
13 | * |
||
14 | * Revision 1.6 2002/09/18 09:18:37 mjames |
||
15 | * Added dummy function to make code link to create final application |
||
16 | * |
||
17 | * Revision 1.5 2002/09/09 10:16:42 mjames |
||
18 | * Modified expression parser to match CC as previous one was |
||
19 | * broken |
||
20 | * |
||
21 | * Revision 1.4 2002/01/16 11:22:47 mjames |
||
22 | * database.h header file is read in first as it undefined DLL stuff irrelevant |
||
23 | * to HPUX |
||
24 | * |
||
25 | * Revision 1.3 2001/12/13 22:21:36 mjames |
||
26 | * Using #ident with header to identify file |
||
27 | * |
||
28 | * Added dummy function to satisfy linker needs for read command |
||
29 | * |
||
30 | * Revision 1.2 2001/10/31 22:20:10 mjames |
||
31 | * Tidying up problematical comments caused by CVS |
||
32 | * 'intelligent' comment guessing |
||
33 | * |
||
34 | * Revision 1.1 2001/07/05 13:10:50 MJAMES |
||
35 | * Created padsread for PADS-PCB netlists |
||
36 | * |
||
37 | * Revision 1.2 2001/06/06 12:10:20 mjames |
||
38 | * Move from HPUX |
||
39 | * |
||
40 | * Revision 1.1 2001/02/12 10:51:29 mjames |
||
41 | * Inserted new correct version number in vertcl_main.c |
||
42 | * |
||
43 | * Added lex files to the list. |
||
44 | * |
||
45 | * Revision 1.22 2000/10/04 10:37:07 10:37:07 mjames (Mike James) |
||
46 | * Part of Release PSAVAT01 |
||
47 | * |
||
48 | * Revision 1.21 2000/10/02 11:04:16 11:04:16 mjames (Mike James) |
||
49 | * new_vhdl |
||
50 | * |
||
51 | * Revision 1.20 2000/09/27 14:42:16 14:42:16 mjames (Mike James) |
||
52 | * Part of Release Sep_27_ST_2000 |
||
53 | * |
||
54 | * Revision 1.19 2000/09/21 10:15:46 10:15:46 mjames (Mike James) |
||
55 | * Part of Release Sep21Alpha |
||
56 | * |
||
57 | * Revision 1.18 2000/08/25 09:57:13 09:57:13 mjames (Mike James) |
||
58 | * Part of Release Aug25_alpha |
||
59 | * |
||
60 | * Revision 1.17 2000/08/16 08:57:29 08:57:29 mjames (Mike James) |
||
61 | * Part of Release CD01_Aug2000 |
||
62 | * |
||
63 | * Revision 1.16 2000/08/14 14:45:10 14:45:10 mjames (Mike James) |
||
64 | * Part of Release Aug_14_2000 |
||
65 | * |
||
66 | * Revision 1.15 2000/08/11 08:30:31 08:30:31 mjames (Mike James) |
||
67 | * Part of Release Aug_11_2000 |
||
68 | * |
||
69 | * Revision 1.14 2000/08/09 10:31:45 10:31:45 mjames (Mike James) |
||
70 | * Part of Release Aug__9_2000 |
||
71 | * |
||
72 | * Revision 1.13 2000/05/31 11:42:55 11:42:55 mjames (Mike James) |
||
73 | * Part of Release May_31_2000 |
||
74 | * |
||
75 | * Revision 1.12 2000/05/08 17:01:36 17:01:36 mjames (Mike James) |
||
76 | * Part of Release May__8_2000 |
||
77 | * |
||
78 | * Revision 1.11 2000/05/08 16:59:29 16:59:29 mjames (Mike James) |
||
79 | * Part of Release May__8_2000 |
||
80 | * |
||
81 | * Revision 1.10 2000/05/08 16:57:06 16:57:06 mjames (Mike James) |
||
82 | * Part of Release May__8_2000 |
||
83 | * |
||
84 | * Revision 1.9 2000/03/08 16:19:17 16:19:17 mjames (Mike James) |
||
85 | * New version including PC |
||
86 | * |
||
87 | * Revision 1.6 2000/01/20 15:58:46 15:58:46 mjames (Mike James) |
||
88 | * Part of Release R22 |
||
89 | * |
||
90 | * Revision 1.5 99/12/22 11:15:26 11:15:26 mjames (Mike James) |
||
91 | * Part of Release Dec_22_1999 |
||
92 | * |
||
93 | * Revision 1.4 99/06/25 14:35:43 14:35:43 mjames (Mike James) |
||
94 | * Added in reference to expression.h, but no changes made |
||
95 | * to the function of acfread yet. |
||
96 | * |
||
97 | * Revision 1.3 98/02/11 11:26:42 11:26:42 mjames (Mike James) |
||
98 | * Checked in for version 6.2a |
||
99 | * |
||
100 | * Revision 1.2 97/04/23 08:45:04 08:45:04 mjames (Mike James) |
||
101 | * CHecked in for release rel23041997 |
||
102 | * |
||
103 | * Revision 1.1 96/12/13 08:43:24 08:43:24 mjames (Mike James) |
||
104 | * Initial revision |
||
105 | * |
||
106 | * Revision 1.14 96/07/19 14:38:28 14:38:28 mjames (Mike James) |
||
107 | * Update to give to PRL |
||
108 | * |
||
109 | * Revision 1.13 1996/07/12 15:52:12 mjames |
||
110 | * Sorted out things like Alias and Jumpers |
||
111 | * Work Correctly |
||
112 | * Print COrrectly |
||
113 | * |
||
114 | * Revision 1.12 96/06/17 10:52:22 10:52:22 mjames (Mike James) |
||
115 | * Tidying up |
||
116 | * |
||
117 | * Revision 1.11 96/06/04 11:52:43 11:52:43 mjames (Mike James) |
||
118 | * Slight modifications |
||
119 | * |
||
120 | * Revision 1.10 96/04/26 16:03:54 16:03:54 mjames (Mike James) |
||
121 | * Set the limit on token length to be consistent with the rest of the code |
||
122 | * |
||
123 | * Revision 1.9 96/03/29 14:47:24 14:47:24 mjames (Mike James) |
||
124 | * Added VHDL netlist writing to the capabilities of ACFREAD |
||
125 | * |
||
126 | * Revision 1.8 96/03/18 13:51:30 13:51:30 mjames (Mike James) |
||
127 | * Real Revision 2.1 |
||
128 | * |
||
129 | * Revision 1.6 96/02/13 09:13:19 09:13:19 mjames (Mike James) |
||
130 | * Updated to be version 2.0 with net joining |
||
131 | * |
||
132 | * Revision 1.5 96/02/07 16:01:27 16:01:27 mjames (Mike James) |
||
133 | * Added correct RCS header |
||
134 | * |
||
135 | * Revision 1.4 96/02/07 15:50:32 15:50:32 mjames (Mike James) |
||
136 | * Added RCS ident message |
||
137 | * |
||
138 | * Revision 1.3 96/01/10 13:13:24 13:13:24 mjames (Mike James) |
||
139 | * Works in debug mode with EPLD listings and PCB layout |
||
140 | * |
||
141 | * Revision 1.2 96/01/08 15:23:44 15:23:44 mjames (Mike James) |
||
142 | * Managing to make sense of things now |
||
143 | * |
||
144 | * Revision 1.1 96/01/07 12:40:11 Mike_James |
||
145 | * Initial revision |
||
146 | * |
||
147 | * Revision 1.1 96/01/04 17:55:24 17:55:24 mjames (Mike James) |
||
148 | * Initial revision |
||
149 | * |
||
150 | * Revision 1.2 96/01/04 11:37:16 11:37:16 mjames (Mike James) |
||
151 | * Compete parsing of FIT and ACF with ignore of junk . |
||
152 | * |
||
153 | * Revision 1.1 96/01/04 10:18:25 10:18:25 mjames (Mike James) |
||
154 | * Initial revision |
||
155 | * |
||
156 | * */ |
||
157 | #include <stdio.h> |
||
158 | |||
159 | #include "expression.h" |
||
160 | #if defined HAS_TCL |
||
161 | #include "tcl_l.h" |
||
162 | #endif |
||
163 | #include "generic.h" |
||
164 | #include "database.h" |
||
165 | |||
166 | /* see makefile for why */ |
||
167 | #include "pads_yacc.h" |
||
168 | #include "lx_support.h" |
||
169 | #define YYLMAX MAXIDLEN |
||
170 | |||
171 | #ident "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/pads_src/pads_lex.l,v 1.1.1.1 2003/11/04 23:34:58 mjames Exp $" |
||
172 | |||
173 | extern int yyval; |
||
174 | |||
175 | extern int yydebug; |
||
176 | |||
177 | |||
178 | extern int lineno; |
||
179 | %} |
||
180 | |||
181 | L [A-Za-z\~\-] |
||
182 | |||
183 | L2 [A-Za-z0-9_/\~\-\*] |
||
184 | |||
185 | Ct [ -\~] |
||
186 | |||
187 | Cm [^\n] |
||
188 | |||
189 | D [0-9] |
||
190 | Spc [ \r\t] |
||
191 | |||
192 | S [^\"] |
||
193 | Q [\"] |
||
194 | |||
195 | |||
196 | %% |
||
197 | "\*PADS-PCB\*" { free_strings(&lx_first,&lx_last);return (PADSPCB); }; |
||
198 | "\*PART\*" { free_strings(&lx_first,&lx_last);return (PART); }; |
||
199 | "\*NET\*" { free_strings(&lx_first,&lx_last);return(NET); }; |
||
200 | "\*SIGNAL\*" { free_strings(&lx_first,&lx_last);return(SIGNAL); }; |
||
201 | "\*END\*" { free_strings(&lx_first,&lx_last);return(END); }; |
||
202 | "\." { return ('.'); }; |
||
203 | |||
204 | {Q}{S}*{Q} { yylval.string = make_string(yytext,&lx_first,&lx_last) ; /* do it anyway */ |
||
205 | if(yydebug) fprintf(stderr,"String (%s)\n",yylval.string); return(ASTRING); }; |
||
206 | {L2}{L2}* { yylval.string = make_string(yytext,&lx_first,&lx_last) ; /* do it anyway */ |
||
207 | if(yydebug) fprintf(stderr,"String (%s)\n",yylval.string); return(ASTRING); }; |
||
208 | |||
209 | |||
210 | "--"{Cm}*"\n" { lineno++; return(NL);/* VHDL comment */ }; |
||
211 | "/\*"{Ct}*"*\/" { break; /* c comment */ }; |
||
212 | |||
213 | {Spc} { break; /* white space */ }; |
||
214 | "\n" { lineno++; return(NL); }; |
||
215 | |||
216 | . { break; }; |
||
217 | %% |