Subversion Repositories Vertical

Rev

Rev 2 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

%{
/*
 * $Header: c:\\cygwin\\cvsroot/Vert03/eagle_src/eagle_lex.l,v 1.1.1.1 2003/11/04 23:34:56 mjames Exp $
 *
 * $Log: eagle_lex.l,v $
 * Revision 1.1.1.1  2003/11/04 23:34:56  mjames
 * Imported into local repositrory
 *
 * Revision 1.1  2002/12/04 22:28:28  mjames
 * Initial release Eagle PCB reader
 *
 *
 *  */
#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 "eagle_yacc.h"
#include "lx_support.h"

#define YYLMAX MAXIDLEN

#ident "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/eagle_src/eagle_lex.l,v 1.1.1.1 2003/11/04 23:34:56 mjames Exp $"

extern  int yyval;

extern int yydebug;


extern int lineno;
%}
%x netlist


L2 [A-Za-z0-9_/\~\-\*\+\$]

S [^\"]
Q [\"]

Spc [ \t]

%%
<INITIAL>"Pad"             { BEGIN(netlist); /* catch Pad tag at end of last header line */ };
<INITIAL>"\n"              { lineno++; };

<netlist>{Q}{S}*{Q}        {  yylval.string = make_string(yytext,&lx_first,&lx_last) ; /* do it anyway */
                           if(yydebug) fprintf(stderr,"String (%s)\n",yylval.string);  return(ASTRING); };
<netlist>{L2}{L2}*         { yylval.string = make_string(yytext,&lx_first,&lx_last) ; /* do it anyway */
                           if(yydebug) fprintf(stderr,"String (%s)\n",yylval.string); return(ASTRING); };

<netlist>{Spc}+            { return (SPC); /* white space */ };
<netlist>"\n"              { lineno++; return(NL); };

. { break; };

%%