Subversion Repositories Vertical

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 mjames 1
%{
2
/*
3
 * $Header: c:\\cygwin\\cvsroot/Vert03/rep_src/rep_lex.l,v 1.1.1.1 2003/11/04 23:34:58 mjames Exp $ 
4
 * $Log: rep_lex.l,v $
5
 * Revision 1.1.1.1  2003/11/04 23:34:58  mjames
6
 * Imported into local repositrory
7
 *
8
 * Revision 1.8  2002/10/02 19:37:27  MJAMES
9
 * Moved dummy functions to a separate support file.
10
 *
11
 * Used correct number of arguments to define_pin
12
 *
13
 * Revision 1.7  2002/09/18 09:18:37  mjames
14
 * Added dummy function to make code link to create final application
15
 *
16
 * Revision 1.6  2002/01/16 11:22:48  mjames
17
 * database.h header file is read in first as it undefined DLL stuff irrelevant
18
 * to HPUX
19
 *
20
 * Revision 1.5  2001/12/13 22:10:56  mjames
21
 * Added dummy tidy_lex function : used in Vertical reader only
22
 *
23
 * Revision 1.4  2001/10/31 22:20:15  mjames
24
 * Tidying up problematical comments caused by CVS
25
 * 'intelligent' comment guessing
26
 *
27
 * Revision 1.3  2001/09/16 19:55:03  mjames
28
 * tidying
29
 *
30
 * Revision 1.2  2001/06/06 12:10:18  mjames
31
 * Move from HPUX
32
 *
33
 * Revision 1.1  2001/02/12 10:51:29  mjames
34
 * Inserted new correct version number in vertcl_main.c
35
 *
36
 * Added lex files to the list.
37
 *
38
 * 
39
 * Revision 1.10  2000/05/31  11:14:46  11:14:46  mjames (Mike James)
40
 * Added '#' to valid characters in identifiers
41
 * 
42
 * Revision 1.9  2000/05/08  17:01:39  17:01:39  mjames (Mike James)
43
 * Part of Release May__8_2000
44
 * 
45
 * Revision 1.8  2000/05/08  16:59:32  16:59:32  mjames (Mike James)
46
 * Part of Release May__8_2000
47
 * 
48
 * Revision 1.7  2000/05/08  16:57:08  16:57:08  mjames (Mike James)
49
 * Part of Release May__8_2000
50
 * 
51
 * Revision 1.6  2000/03/08  16:19:27  16:19:27  mjames (Mike James)
52
 * New version including PC
53
 * 
54
 * Revision 1.3  2000/01/20  15:58:48  15:58:48  mjames (Mike James)
55
 * Part of Release R22
56
 * 
57
 * Revision 1.2  99/12/22  11:15:29  11:15:29  mjames (Mike James)
58
 * Part of Release Dec_22_1999
59
 * 
60
 * Revision 1.1  99/11/23  13:54:16  13:54:16  mjames (Mike James)
61
 * Initial revision
62
 * 
63
 *
64
 *  */
65
#include <stdio.h>
66
/* see makefile for why */
67
#include "expression.h"
68
#if defined HAS_TCL
69
#include "tcl_l.h"
70
#endif
71
#include "generic.h"
72
#include "database.h"
73
 
74
#include "rep_yacc.h"
75
#include "lx_support.h"
76
#define YYLMAX MAXIDLEN
77
 
78
#ident "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/rep_src/rep_lex.l,v 1.1.1.1 2003/11/04 23:34:58 mjames Exp $"
79
 
80
extern  int yyval;
81
 
82
extern int lineno;
83
%}
84
 
85
L [A-Za-z\~\-]
86
 
87
L2 [A-Za-z0-9_/\~\-\*\$\#\.]
88
 
89
Ct [ -\~]
90
 
91
Cm [^\n]
92
 
93
D [0-9]
94
Spc [ \t]
95
 
96
S [^\"]
97
Q [\"]
98
 
99
 
100
%%
101
 
102
 
103
{Q}{S}*{Q}        {  yylval.string = make_string(yytext,&lx_first,&lx_last) ; /* do it anyway */
104
                   return(ASTRING); };
105
{L2}{L2}*         { yylval.string = make_string(yytext,&lx_first,&lx_last) ; /* do it anyway */
106
                   return(ASTRING); };
107
 
108
"--"{Cm}*"\n"     { lineno++; return(LF);/* VHDL comment */  };
109
"/\*"{Ct}*"*\/"   { break; /* c comment */   };
110
 
111
{Spc}*            { return(SPACE); /* white space */ };
112
"\r"              { return(CR); };
113
"\n"              { lineno++; return(LF); };
114
 
115
<<EOF>>           { yyterminate(); };
116
%%