Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | mjames | 1 | %{ |
2 | /* |
||
3 | * $Id: orcad_lex.l,v 1.1.1.1 2003/11/04 23:34:58 mjames Exp $ |
||
4 | * |
||
5 | * $Log: orcad_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.6 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.5 2002/09/18 09:18:37 mjames |
||
15 | * Added dummy function to make code link to create final application |
||
16 | * |
||
17 | * Revision 1.4 2002/01/16 11:22:46 mjames |
||
18 | * database.h header file is read in first as it undefined DLL stuff irrelevant |
||
19 | * to HPUX |
||
20 | * |
||
21 | * Revision 1.3 2001/12/13 22:21:36 mjames |
||
22 | * Using #ident with header to identify file |
||
23 | * |
||
24 | * Added dummy function to satisfy linker needs for read command |
||
25 | * |
||
26 | * Revision 1.2 2001/10/31 22:20:09 mjames |
||
27 | * Tidying up problematical comments caused by CVS |
||
28 | * 'intelligent' comment guessing |
||
29 | * |
||
30 | * Revision 1.1 2001/10/23 21:11:39 mjames |
||
31 | * Added in an Orcad reader into Vertical |
||
32 | * |
||
33 | * |
||
34 | * |
||
35 | * */ |
||
36 | #include <stdio.h> |
||
37 | #if defined HAS_TCL |
||
38 | #include "tcl_l.h" |
||
39 | #endif |
||
40 | #include "expression.h" |
||
41 | #include "generic.h" |
||
42 | #include "database.h" |
||
43 | |||
44 | /* see makefile for why */ |
||
45 | #include "orcad_yacc.h" |
||
46 | #include "lx_support.h" |
||
47 | #define YYLMAX MAXIDLEN |
||
48 | |||
49 | #ident "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/orcad_src/orcad_lex.l,v 1.1.1.1 2003/11/04 23:34:58 mjames Exp $" |
||
50 | |||
51 | extern int yyval; |
||
52 | |||
53 | extern int lineno; |
||
54 | %} |
||
55 | |||
56 | L [A-Za-z\~\+\-] |
||
57 | |||
58 | L2 [A-Za-z0-9_/\~\+\-\*\$\#] |
||
59 | |||
60 | Ct [ -\~] |
||
61 | |||
62 | Cm [^\n] |
||
63 | |||
64 | D [0-9] |
||
65 | Spc [ \t] |
||
66 | |||
67 | S [^\"] |
||
68 | Q [\"] |
||
69 | |||
70 | %x net |
||
71 | %% |
||
72 | |||
73 | "\*"{Cm}*"\n\r" { lineno++; break;/* Orcad comment */ }; |
||
74 | |||
75 | |||
76 | <INITIAL>"-"* { lineno++; printf("-- doing net list from line=%d\n",lineno);BEGIN(net); break; /* minus signs mean net follows */}; |
||
77 | <INITIAL>{Spc}+ { break; }; |
||
78 | <INITIAL>"\n" { lineno++;break; }; |
||
79 | |||
80 | <INITIAL>. { break; }; |
||
81 | |||
82 | <net>{L2}{L2}* { yylval.string = make_string(yytext,&lx_first,&lx_last) ; /* do it anyway */ |
||
83 | return(ASTRING); }; |
||
84 | |||
85 | <net>"\." { return('.') ; }; |
||
86 | |||
87 | |||
88 | <net>{Spc}+ { return(SPACE); /* single char white space */ }; |
||
89 | <net>"\r" { return(CR); }; |
||
90 | <net>"\n" { lineno++; return(LF); }; |
||
91 | |||
92 | <<EOF>> { yyterminate(); }; |
||
93 | %% |