Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 2 | mjames | 1 | %{ |
| 2 | /* |
||
| 3 | * $Id: rep2_lex.l,v 1.1.1.1 2003/11/04 23:34:58 mjames Exp $ |
||
| 4 | * |
||
| 5 | * $Log: rep2_lex.l,v $ |
||
| 6 | * Revision 1.1.1.1 2003/11/04 23:34:58 mjames |
||
| 7 | * Imported into local repositrory |
||
| 8 | * |
||
| 9 | * Revision 1.7 2002/10/02 19:37:27 MJAMES |
||
| 10 | * Moved dummy functions to a separate support file. |
||
| 11 | * |
||
| 12 | * Used correct number of arguments to define_pin |
||
| 13 | * |
||
| 14 | * Revision 1.6 2002/09/18 09:18:37 mjames |
||
| 15 | * Added dummy function to make code link to create final application |
||
| 16 | * |
||
| 17 | * Revision 1.5 2002/09/09 10:16:42 mjames |
||
| 18 | * Modified expression parser to match CC as previous one was |
||
| 19 | * broken |
||
| 20 | * |
||
| 21 | * Revision 1.4 2002/01/16 11:22:48 mjames |
||
| 22 | * database.h header file is read in first as it undefined DLL stuff irrelevant |
||
| 23 | * to HPUX |
||
| 24 | * |
||
| 25 | * Revision 1.3 2001/12/13 22:11:10 mjames |
||
| 26 | * Added dummy tidy_lex function : used in Vertical reader only |
||
| 27 | * |
||
| 28 | * Revision 1.2 2001/10/31 22:20:15 mjames |
||
| 29 | * Tidying up problematical comments caused by CVS |
||
| 30 | * 'intelligent' comment guessing |
||
| 31 | * |
||
| 32 | * Revision 1.1 2001/10/02 20:53:06 mjames |
||
| 33 | * Another .REP file format reader |
||
| 34 | * |
||
| 35 | * |
||
| 36 | * */ |
||
| 37 | #include <stdio.h> |
||
| 38 | |||
| 39 | #if defined HAS_TCL |
||
| 40 | #include "tcl_l.h" |
||
| 41 | #endif |
||
| 42 | #include "expression.h" |
||
| 43 | #include "generic.h" |
||
| 44 | #include "database.h" |
||
| 45 | |||
| 46 | /* see makefile for why */ |
||
| 47 | #include "rep2_yacc.h" |
||
| 48 | #include "lx_support.h" |
||
| 49 | #define YYLMAX MAXIDLEN |
||
| 50 | |||
| 51 | #ident "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/rep2_src/rep2_lex.l,v 1.1.1.1 2003/11/04 23:34:58 mjames Exp $" |
||
| 52 | |||
| 53 | extern int yyval; |
||
| 54 | |||
| 55 | extern int lineno; |
||
| 56 | %} |
||
| 57 | |||
| 58 | L [A-Za-z\~\+\-] |
||
| 59 | |||
| 60 | L2 [A-Za-z0-9_/\~\+\-\*\$\#\.] |
||
| 61 | |||
| 62 | Ct [ -\~] |
||
| 63 | |||
| 64 | Cm [^\n] |
||
| 65 | |||
| 66 | D [0-9] |
||
| 67 | Spc [ \t] |
||
| 68 | |||
| 69 | S [^\"] |
||
| 70 | Q [\"] |
||
| 71 | |||
| 72 | |||
| 73 | %% |
||
| 74 | |||
| 75 | |||
| 76 | {Q}{S}*{Q} { yylval.string = make_string(yytext,&lx_first,&lx_last) ; /* do it anyway */ |
||
| 77 | return(ASTRING); }; |
||
| 78 | {L2}{L2}* { yylval.string = make_string(yytext,&lx_first,&lx_last) ; /* do it anyway */ |
||
| 79 | return(ASTRING); }; |
||
| 80 | |||
| 81 | "--"{Cm}*"\n" { lineno++; return(LF);/* VHDL comment */ }; |
||
| 82 | "/\*"{Ct}*"*\/" { break; /* c comment */ }; |
||
| 83 | |||
| 84 | {Spc} { return(SPACE); /* single char white space */ }; |
||
| 85 | "\r" { return(CR); }; |
||
| 86 | "\n" { lineno++; return(LF); }; |
||
| 87 | |||
| 88 | <<EOF>> { yyterminate(); }; |
||
| 89 | |||
| 90 | |||
| 91 | %% |