Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | mjames | 1 | %{ |
2 | /* |
||
3 | * $Header: c:\\cygwin\\cvsroot/Vert03/eagle_src/eagle_lex.l,v 1.1.1.1 2003/11/04 23:34:56 mjames Exp $ |
||
4 | * |
||
5 | * $Log: eagle_lex.l,v $ |
||
6 | * Revision 1.1.1.1 2003/11/04 23:34:56 mjames |
||
7 | * Imported into local repositrory |
||
8 | * |
||
9 | * Revision 1.1 2002/12/04 22:28:28 mjames |
||
10 | * Initial release Eagle PCB reader |
||
11 | * |
||
12 | * |
||
13 | * */ |
||
14 | #include <stdio.h> |
||
15 | |||
16 | #if defined HAS_TCL |
||
17 | #include "tcl_l.h" |
||
18 | #endif |
||
19 | #include "expression.h" |
||
20 | #include "generic.h" |
||
21 | #include "database.h" |
||
22 | |||
23 | /* see makefile for why */ |
||
24 | #include "eagle_yacc.h" |
||
25 | #include "lx_support.h" |
||
26 | |||
27 | #define YYLMAX MAXIDLEN |
||
28 | |||
29 | #ident "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/eagle_src/eagle_lex.l,v 1.1.1.1 2003/11/04 23:34:56 mjames Exp $" |
||
30 | |||
31 | extern int yyval; |
||
32 | |||
33 | extern int yydebug; |
||
34 | |||
35 | |||
36 | extern int lineno; |
||
37 | %} |
||
38 | %x netlist |
||
39 | |||
40 | |||
41 | L2 [A-Za-z0-9_/\~\-\*\+\$] |
||
42 | |||
43 | S [^\"] |
||
44 | Q [\"] |
||
45 | |||
46 | Spc [ \t] |
||
47 | |||
48 | %% |
||
49 | <INITIAL>"Pad" { BEGIN(netlist); /* catch Pad tag at end of last header line */ }; |
||
50 | <INITIAL>"\n" { lineno++; }; |
||
51 | |||
52 | <netlist>{Q}{S}*{Q} { yylval.string = make_string(yytext,&lx_first,&lx_last) ; /* do it anyway */ |
||
53 | if(yydebug) fprintf(stderr,"String (%s)\n",yylval.string); return(ASTRING); }; |
||
54 | <netlist>{L2}{L2}* { yylval.string = make_string(yytext,&lx_first,&lx_last) ; /* do it anyway */ |
||
55 | if(yydebug) fprintf(stderr,"String (%s)\n",yylval.string); return(ASTRING); }; |
||
56 | |||
57 | <netlist>{Spc}+ { return (SPC); /* white space */ }; |
||
58 | <netlist>"\n" { lineno++; return(NL); }; |
||
59 | |||
60 | . { break; }; |
||
61 | |||
62 | %% |