Rev 2 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
%{
/*
* $Id: rep2_lex.l,v 1.1.1.1 2003/11/04 23:34:58 mjames Exp $
*
* $Log: rep2_lex.l,v $
* Revision 1.1.1.1 2003/11/04 23:34:58 mjames
* Imported into local repositrory
*
* Revision 1.7 2002/10/02 19:37:27 MJAMES
* Moved dummy functions to a separate support file.
*
* Used correct number of arguments to define_pin
*
* Revision 1.6 2002/09/18 09:18:37 mjames
* Added dummy function to make code link to create final application
*
* Revision 1.5 2002/09/09 10:16:42 mjames
* Modified expression parser to match CC as previous one was
* broken
*
* Revision 1.4 2002/01/16 11:22:48 mjames
* database.h header file is read in first as it undefined DLL stuff irrelevant
* to HPUX
*
* Revision 1.3 2001/12/13 22:11:10 mjames
* Added dummy tidy_lex function : used in Vertical reader only
*
* Revision 1.2 2001/10/31 22:20:15 mjames
* Tidying up problematical comments caused by CVS
* 'intelligent' comment guessing
*
* Revision 1.1 2001/10/02 20:53:06 mjames
* Another .REP file format 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 "rep2_yacc.h"
#include "lx_support.h"
#define YYLMAX MAXIDLEN
#ident "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/rep2_src/rep2_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 [\"]
%%
{Q}{S}*{Q} { yylval.string = make_string(yytext,&lx_first,&lx_last) ; /* do it anyway */
return(ASTRING); };
{L2}{L2}* { yylval.string = make_string(yytext,&lx_first,&lx_last) ; /* do it anyway */
return(ASTRING); };
"--"{Cm}*"\n" { lineno++; return(LF);/* VHDL comment */ };
"/\*"{Ct}*"*\/" { break; /* c comment */ };
{Spc} { return(SPACE); /* single char white space */ };
"\r" { return(CR); };
"\n" { lineno++; return(LF); };
<<EOF>> { yyterminate(); };
%%