Blame | Last modification | View Log | Download | RSS feed
%{
/*
* $Id: orcad_lex.l,v 1.1.1.1 2003/11/04 23:34:58 mjames Exp $
*
* $Log: orcad_lex.l,v $
* Revision 1.1.1.1 2003/11/04 23:34:58 mjames
* Imported into local repositrory
*
* Revision 1.6 2002/10/02 19:37:28 MJAMES
* Moved dummy functions to a separate support file.
*
* Used correct number of arguments to define_pin
*
* Revision 1.5 2002/09/18 09:18:37 mjames
* Added dummy function to make code link to create final application
*
* Revision 1.4 2002/01/16 11:22:46 mjames
* database.h header file is read in first as it undefined DLL stuff irrelevant
* to HPUX
*
* Revision 1.3 2001/12/13 22:21:36 mjames
* Using #ident with header to identify file
*
* Added dummy function to satisfy linker needs for read command
*
* Revision 1.2 2001/10/31 22:20:09 mjames
* Tidying up problematical comments caused by CVS
* 'intelligent' comment guessing
*
* Revision 1.1 2001/10/23 21:11:39 mjames
* Added in an Orcad reader into Vertical
*
*
*
* */
#include <stdio.h>
#if defined HAS_TCL
#include "tcl_l.h"
#endif
#include "expression.h"
#include "generic.h"
#include "database.h"
/* see makefile for why */
#include "orcad_yacc.h"
#include "lx_support.h"
#define YYLMAX MAXIDLEN
#ident "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/orcad_src/orcad_lex.l,v 1.1.1.1 2003/11/04 23:34:58 mjames Exp $"
extern int yyval;
extern int lineno;
%}
L [A-Za-z\~\+\-]
L2 [A-Za-z0-9_/\~\+\-\*\$\#]
Ct [ -\~]
Cm [^\n]
D [0-9]
Spc [ \t]
S [^\"]
Q [\"]
%x net
%%
"\*"{Cm}*"\n\r" { lineno++; break;/* Orcad comment */ };
<INITIAL>"-"* { lineno++; printf("-- doing net list from line=%d\n",lineno);BEGIN(net); break; /* minus signs mean net follows */};
<INITIAL>{Spc}+ { break; };
<INITIAL>"\n" { lineno++;break; };
<INITIAL>. { break; };
<net>{L2}{L2}* { yylval.string = make_string(yytext,&lx_first,&lx_last) ; /* do it anyway */
return(ASTRING); };
<net>"\." { return('.') ; };
<net>{Spc}+ { return(SPACE); /* single char white space */ };
<net>"\r" { return(CR); };
<net>"\n" { lineno++; return(LF); };
<<EOF>> { yyterminate(); };
%%