Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 2 | mjames | 1 | %{ |
| 2 | |||
| 3 | /* |
||
| 4 | * $Id: frb_lex.l,v 1.1.1.1 2003/11/04 23:34:59 mjames Exp $ |
||
| 5 | * |
||
| 6 | * $Log: frb_lex.l,v $ |
||
| 7 | * Revision 1.1.1.1 2003/11/04 23:34:59 mjames |
||
| 8 | * Imported into local repositrory |
||
| 9 | * |
||
| 10 | * Revision 1.11 2002/10/02 19:37:29 MJAMES |
||
| 11 | * Moved dummy functions to a separate support file. |
||
| 12 | * |
||
| 13 | * Used correct number of arguments to define_pin |
||
| 14 | * |
||
| 15 | * Revision 1.10 2002/09/18 09:18:37 mjames |
||
| 16 | * Added dummy function to make code link to create final application |
||
| 17 | * |
||
| 18 | * Revision 1.9 2002/01/21 09:34:50 mjames |
||
| 19 | * FRBread adds the ability to ignore .ATT_PIN construct that appears in |
||
| 20 | * a recent FRB file. |
||
| 21 | * |
||
| 22 | * Revision 1.8 2002/01/16 11:22:44 mjames |
||
| 23 | * database.h header file is read in first as it undefined DLL stuff irrelevant |
||
| 24 | * to HPUX |
||
| 25 | * |
||
| 26 | * Revision 1.7 2001/12/13 22:21:37 mjames |
||
| 27 | * Using #ident with header to identify file |
||
| 28 | * |
||
| 29 | * Added dummy function to satisfy linker needs for read command |
||
| 30 | * |
||
| 31 | * Revision 1.6 2001/10/31 22:20:05 mjames |
||
| 32 | * Tidying up problematical comments caused by CVS |
||
| 33 | * 'intelligent' comment guessing |
||
| 34 | * |
||
| 35 | * Revision 1.5 2001/09/16 19:57:29 mjames |
||
| 36 | * tidying |
||
| 37 | * |
||
| 38 | * Revision 1.4 2001/06/06 12:10:22 mjames |
||
| 39 | * Move from HPUX |
||
| 40 | * |
||
| 41 | * Revision 1.3 2001/05/01 15:20:39 mjames |
||
| 42 | * Added comment leaders on some patterns matched but not used |
||
| 43 | * |
||
| 44 | * Revision 1.2 2001/03/29 08:27:07 mjames |
||
| 45 | * Converted frbread for use with the newer files from the drawing office |
||
| 46 | * |
||
| 47 | * Revision 1.1 2001/02/12 10:51:28 mjames |
||
| 48 | * Inserted new correct version number in vertcl_main.c |
||
| 49 | * |
||
| 50 | * Added lex files to the list. |
||
| 51 | * |
||
| 52 | * Revision 1.22 2000/03/08 16:19:01 16:19:01 mjames (Mike James) |
||
| 53 | * New version including PC |
||
| 54 | * |
||
| 55 | * Revision 1.19 2000/01/20 15:58:43 15:58:43 mjames (Mike James) |
||
| 56 | * Part of Release R22 |
||
| 57 | * |
||
| 58 | * Revision 1.18 99/12/22 11:15:24 11:15:24 mjames (Mike James) |
||
| 59 | * Part of Release Dec_22_1999 |
||
| 60 | * |
||
| 61 | * Revision 1.17 99/06/25 14:35:31 14:35:31 mjames (Mike James) |
||
| 62 | * Added in reference to expression.h, but no changes made |
||
| 63 | * to the function of acfread yet. |
||
| 64 | * |
||
| 65 | * Revision 1.16 98/02/11 11:25:59 11:25:59 mjames (Mike James) |
||
| 66 | * Checked in for version 6.2a |
||
| 67 | * |
||
| 68 | * Revision 1.15 97/04/23 08:45:03 08:45:03 mjames (Mike James) |
||
| 69 | * CHecked in for release rel23041997 |
||
| 70 | * |
||
| 71 | * Revision 1.14 96/07/19 14:38:28 14:38:28 mjames (Mike James) |
||
| 72 | * Update to give to PRL |
||
| 73 | * |
||
| 74 | * Revision 1.13 1996/07/12 15:52:12 mjames |
||
| 75 | * Sorted out things like Alias and Jumpers |
||
| 76 | * Work Correctly |
||
| 77 | * Print COrrectly |
||
| 78 | * |
||
| 79 | * Revision 1.12 96/06/17 10:52:22 10:52:22 mjames (Mike James) |
||
| 80 | * Tidying up |
||
| 81 | * |
||
| 82 | * Revision 1.11 96/06/04 11:52:43 11:52:43 mjames (Mike James) |
||
| 83 | * Slight modifications |
||
| 84 | * |
||
| 85 | * Revision 1.10 96/04/26 16:03:54 16:03:54 mjames (Mike James) |
||
| 86 | * Set the limit on token length to be consistent with the rest of the code |
||
| 87 | * |
||
| 88 | * Revision 1.9 96/03/29 14:47:24 14:47:24 mjames (Mike James) |
||
| 89 | * Added VHDL netlist writing to the capabilities of ACFREAD |
||
| 90 | * |
||
| 91 | * Revision 1.8 96/03/18 13:51:30 13:51:30 mjames (Mike James) |
||
| 92 | * Real Revision 2.1 |
||
| 93 | * |
||
| 94 | * Revision 1.6 96/02/13 09:13:19 09:13:19 mjames (Mike James) |
||
| 95 | * Updated to be version 2.0 with net joining |
||
| 96 | * |
||
| 97 | * Revision 1.5 96/02/07 16:01:27 16:01:27 mjames (Mike James) |
||
| 98 | * Added correct RCS header |
||
| 99 | * |
||
| 100 | * Revision 1.4 96/02/07 15:50:32 15:50:32 mjames (Mike James) |
||
| 101 | * Added RCS ident message |
||
| 102 | * |
||
| 103 | * Revision 1.3 96/01/10 13:13:24 13:13:24 mjames (Mike James) |
||
| 104 | * Works in debug mode with EPLD listings and PCB layout |
||
| 105 | * |
||
| 106 | * Revision 1.2 96/01/08 15:23:44 15:23:44 mjames (Mike James) |
||
| 107 | * Managing to make sense of things now |
||
| 108 | * |
||
| 109 | * Revision 1.1 96/01/07 12:40:11 Mike_James |
||
| 110 | * Initial revision |
||
| 111 | * |
||
| 112 | * Revision 1.1 96/01/04 17:55:24 17:55:24 mjames (Mike James) |
||
| 113 | * Initial revision |
||
| 114 | * |
||
| 115 | * Revision 1.2 96/01/04 11:37:16 11:37:16 mjames (Mike James) |
||
| 116 | * Compete parsing of FIT and ACF with ignore of junk . |
||
| 117 | * |
||
| 118 | * Revision 1.1 96/01/04 10:18:25 10:18:25 mjames (Mike James) |
||
| 119 | * Initial revision |
||
| 120 | * |
||
| 121 | * */ |
||
| 122 | #include <stdio.h> |
||
| 123 | /* see makefile for why */ |
||
| 124 | #include "expression.h" |
||
| 125 | #if defined HAS_TCL |
||
| 126 | #include "tcl_l.h" |
||
| 127 | #endif |
||
| 128 | #include "generic.h" |
||
| 129 | #include "database.h" |
||
| 130 | |||
| 131 | #include "frb_yacc.h" |
||
| 132 | #include "lx_support.h" |
||
| 133 | |||
| 134 | #define YYLMAX MAXIDLEN |
||
| 135 | |||
| 136 | #ident "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/frb_src/frb_lex.l,v 1.1.1.1 2003/11/04 23:34:59 mjames Exp $" |
||
| 137 | |||
| 138 | extern int yyval; |
||
| 139 | |||
| 140 | extern int lineno; |
||
| 141 | %} |
||
| 142 | |||
| 143 | L [A-Za-z\~\-] |
||
| 144 | |||
| 145 | L2 [A-Za-z0-9_/\~\-.\*] |
||
| 146 | |||
| 147 | Ct [ -\~] |
||
| 148 | |||
| 149 | Cm [^\n] |
||
| 150 | |||
| 151 | D [0-9] |
||
| 152 | Spc [ \r\t] |
||
| 153 | |||
| 154 | S [^\"] |
||
| 155 | Q [\"] |
||
| 156 | |||
| 157 | |||
| 158 | %% |
||
| 159 | ".HEA" { return (HEADER); }; |
||
| 160 | ".END" { return (END); }; |
||
| 161 | ".TIM" { return (TIME); }; |
||
| 162 | ".UNI" { return (UNITS); }; |
||
| 163 | ".JOB" { return (JOB); }; |
||
| 164 | ".TYP" { return (TYPE); }; |
||
| 165 | ".APP" { return (APP); }; |
||
| 166 | ".ADD_COM" { free_strings(&lx_first,&lx_last);return(ADD_COM); }; |
||
| 167 | ".ADD_TER" { free_strings(&lx_first,&lx_last);return(ADD_TER); }; |
||
| 168 | ".ATT_COM" { free_strings(&lx_first,&lx_last);return(ATT_COM); }; |
||
| 169 | ".ATT_PIN" { free_strings(&lx_first,&lx_last);return(ATT_PIN); }; |
||
| 170 | ".ATT_TRE" { free_strings(&lx_first,&lx_last);return(ATT_TRE); }; |
||
| 171 | ".TER" { free_strings(&lx_first,&lx_last);return(TER); }; |
||
| 172 | |||
| 173 | {Q}{S}*{Q} { yylval.string = make_string(yytext,&lx_first,&lx_last) ; /* do it anyway */ |
||
| 174 | return(ASTRING); }; |
||
| 175 | {L2}+ { yylval.string = make_string(yytext,&lx_first,&lx_last) ; /* do it anyway */ |
||
| 176 | return(ASTRING); }; |
||
| 177 | |||
| 178 | |||
| 179 | |||
| 180 | "--"{Cm}*"\n" { lineno++; return(NL);/* VHDL comment */ }; |
||
| 181 | "/\*"{Ct}*"*\/" { break; /* c comment */ }; |
||
| 182 | |||
| 183 | {Spc} { break; /* white space */ }; |
||
| 184 | "\r"|"\n" { lineno++; return(NL); }; |
||
| 185 | . { printf("?? unexpected char '%c' code %02X\n",yytext[0]>31?yytext[0]:' ',yytext[0]); }; |
||
| 186 | <<EOF>> { yyterminate(); }; |
||
| 187 | %% |