Subversion Repositories Vertical

Rev

Blame | Last modification | View Log | Download | RSS feed

%{
/*
 * $Header: c:\\cygwin\\cvsroot/Vert03/cdi_src/cdi_lex.l,v 1.1.1.1 2003/11/04 23:34:57 mjames Exp $ 
 *
 * $Log: cdi_lex.l,v $
 * Revision 1.1.1.1  2003/11/04 23:34:57  mjames
 * Imported into local repositrory
 *
 * Revision 1.9  2002/10/02 19:37:30  MJAMES
 * Moved dummy functions to a separate support file.
 *
 * Used correct number of arguments to define_pin
 *
 * Revision 1.8  2002/09/18 09:18:37  mjames
 * Added dummy function to make code link to create final application
 *
 * Revision 1.7  2002/09/09 10:36:19  mjames
 * Checkpoint checkin
 *
 * Revision 1.6  2002/01/16 11:22:41  mjames
 * database.h header file is read in first as it undefined DLL stuff irrelevant
 * to HPUX
 *
 * Revision 1.5  2001/12/13 22:21:37  mjames
 * Using #ident with header to identify file
 *
 * Added dummy function to satisfy linker needs for read command
 *
 * Revision 1.4  2001/10/31 22:19:58  mjames
 * Tidying up problematical comments caused by CVS
 * 'intelligent' comment guessing
 *
 * Revision 1.3  2001/06/06 12:10:26  mjames
 * Move from HPUX
 *
 * Revision 1.2  2000/12/04 13:03:06  mjames
 * Amended all the PCB netlist parsers to work with latest version of
 * database functions,
 *
 * Converted VHDL/Verliog parser so that a/2 was parsed as "a" "divided by"
 * "2" rather than the text string "a/2"
 *
 * This problem was derived from an earlier "universal" definition of what
 * constituted a valid identifier string. Maxplus2 uses "/" in the middle
 * of a name to indicate hierarchy.
 *
 * Revision 1.1.1.1  2000/10/19 21:58:34  mjames
 * Mike put it here
 *
 *
 * Revision 1.30  2000/10/04  10:37:01  10:37:01  mjames (Mike James)
 * Modified to become part of vertical2, complete
 * with VHDL COMPONENT and SIGNAL declarations.
 * 
 * Revision 1.30  2000/10/04  10:37:01  10:37:01  mjames (Mike James)
 * Part of Release PSAVAT01
 * 
 * Revision 1.29  2000/10/02  11:04:07  11:04:07  mjames (Mike James)
 * new_vhdl
 * 
 * Revision 1.28  2000/09/27  14:42:07  14:42:07  mjames (Mike James)
 * Part of Release Sep_27_ST_2000
 * 
 * Revision 1.27  2000/09/21  10:15:36  10:15:36  mjames (Mike James)
 * Part of Release Sep21Alpha
 * 
 * Revision 1.26  2000/08/25  09:57:05  09:57:05  mjames (Mike James)
 * Part of Release Aug25_alpha
 * 
 * Revision 1.25  2000/08/16  08:57:23  08:57:23  mjames (Mike James)
 * Part of Release CD01_Aug2000
 * 
 * Revision 1.24  2000/08/14  14:45:05  14:45:05  mjames (Mike James)
 * Part of Release Aug_14_2000
 * 
 * Revision 1.23  2000/08/11  08:30:26  08:30:26  mjames (Mike James)
 * Part of Release Aug_11_2000
 * 
 * Revision 1.22  2000/08/09  10:31:39  10:31:39  mjames (Mike James)
 * Part of Release Aug__9_2000
 * 
 * Revision 1.21  2000/05/31  11:42:44  11:42:44  mjames (Mike James)
 * Part of Release May_31_2000
 * 
 * Revision 1.20  2000/05/08  17:01:30  17:01:30  mjames (Mike James)
 * Part of Release May__8_2000
 * 
 * Revision 1.19  2000/05/08  16:59:23  16:59:23  mjames (Mike James)
 * Part of Release May__8_2000
 * 
 * Revision 1.18  2000/05/08  16:57:00  16:57:00  mjames (Mike James)
 * Part of Release May__8_2000
 * 
 * Revision 1.17  2000/03/08  16:17:17  16:17:17  mjames (Mike James)
 * Removed syntactically confused 'junk'
 * 
 * Revision 1.14  2000/01/20  15:58:38  15:58:38  mjames (Mike James)
 * Part of Release R22
 * 
 * Revision 1.13  99/12/22  11:15:18  11:15:18  mjames (Mike James)
 * Part of Release Dec_22_1999
 * 
 * Revision 1.12  99/06/25  14:34:24  14:34:24  mjames (Mike James)
 * Added in reference to expression.h, but no changes made 
 * to the function of acfread yet.
 * 
 * Revision 1.11  99/06/18  09:06:30  09:06:30  mjames (Mike James)
 * Checkin before major design changes
 * 
 * Revision 1.10  1999/06/14  10:47:18  mjames
 * *** empty log message ***
 *
 * Revision 1.10  1999/06/14  10:47:18  mjames
 * *** empty log message ***
 *
 * Revision 1.9  1999/06/11  14:21:15  mjames
 * *** empty log message ***
 *
 * Revision 1.9  1999/06/11  14:21:15  mjames
 * *** empty log message ***
 *
 * Revision 1.8  99/05/04  09:48:04  09:48:04  mjames (Mike James)
 * 
 * 
 * Revision 1.5  98/03/16  11:35:12  11:35:12  mjames (Mike James)
 * Made compatible with newer example of .cdi file
 * 
 * Revision 1.4  98/02/11  11:24:52  11:24:52  mjames (Mike James)
 * Checked in for version 6.2a
 * 
 * Revision 1.3  97/04/23  08:44:59  08:44:59  mjames (Mike James)
 * CHecked in for release rel23041997
 * 
 * Revision 1.2  97/01/03  13:34:11  13:34:11  mjames (Mike James)
 * Changed the order of printing the banner on startup so that it is before all 
 * other output from the tool.
 * 
 * Revision 1.1  96/12/13  08:43:57  08:43:57  mjames (Mike James)
 * Initial revision
 * 
 * Revision 1.14  96/07/19  14:38:28  14:38:28  mjames (Mike James)
 * Update to give to PRL
 *
 * Revision 1.13  1996/07/12  15:52:12  mjames
 * Sorted out things like Alias and Jumpers
 * Work Correctly
 * Print COrrectly
 *
 * Revision 1.12  96/06/17  10:52:22  10:52:22  mjames (Mike James)
 * Tidying up
 *
 * Revision 1.11  96/06/04  11:52:43  11:52:43  mjames (Mike James)
 * Slight modifications
 *
 * Revision 1.10  96/04/26  16:03:54  16:03:54  mjames (Mike James)
 *  Set the limit on token length to be consistent with the rest of the code
 *
 * Revision 1.9  96/03/29  14:47:24  14:47:24  mjames (Mike James)
 * Added VHDL netlist writing to the capabilities of ACFREAD
 *
 * Revision 1.8  96/03/18  13:51:30  13:51:30  mjames (Mike James)
 * Real Revision 2.1
 *
 * Revision 1.6  96/02/13  09:13:19  09:13:19  mjames (Mike James)
 * Updated to be version 2.0 with net joining
 *
 * Revision 1.5  96/02/07  16:01:27  16:01:27  mjames (Mike James)
 * Added correct RCS header
 *
 * Revision 1.4  96/02/07  15:50:32  15:50:32  mjames (Mike James)
 * Added RCS ident message
 *
 * Revision 1.3  96/01/10  13:13:24  13:13:24  mjames (Mike James)
 * Works in debug mode with EPLD listings and PCB layout
 *
 * Revision 1.2  96/01/08  15:23:44  15:23:44  mjames (Mike James)
 * Managing to make sense of things now
 *
 * Revision 1.1  96/01/07  12:40:11  Mike_James
 * Initial revision
 *
 * Revision 1.1  96/01/04  17:55:24  17:55:24  mjames (Mike James)
 * Initial revision
 *
 * Revision 1.2  96/01/04  11:37:16  11:37:16  mjames (Mike James)
 * Compete parsing of FIT and ACF with ignore of junk .
 *
 * Revision 1.1  96/01/04  10:18:25  10:18:25  mjames (Mike James)
 * Initial revision
 *
 *  */
#include <stdio.h>
/* see makefile for why */
#include "vertcl_main.h"
#include "expression.h"
#include "generic.h"
#include "database.h"

#include "cdi_yacc.h"
#include "lx_support.h"
#define YYLMAX MAXIDLEN

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

extern  int yyval;

extern int lineno;
%}

L [A-Za-z0-9_/\~\-\*]
L2 [A-Za-z0-9_/\~\-\*\.]

Spc [ \r\t]


%%
\.ASS              { free_strings(&lx_first,&lx_last);return (ASS); };
\.COD              { free_strings(&lx_first,&lx_last);return(COD); };
\.COM              { free_strings(&lx_first,&lx_last);return(COM); };
\.CON              { free_strings(&lx_first,&lx_last);return(CON); };
\.CSP              { free_strings(&lx_first,&lx_last);return (CSP); };
\.EOD              { free_strings(&lx_first,&lx_last);return(EOD); };
\.IMP              { free_strings(&lx_first,&lx_last);return (IMP); };
\.PCB              { free_strings(&lx_first,&lx_last);return (PCB); };
\.REM              { free_strings(&lx_first,&lx_last);return(REM); /*  comment */  };


\x22               {return(QUOTE); };

{L}{L2}*         { yylval.string = make_string(yytext,&lx_first,&lx_last) ; /* do it anyway */
                   return(ASTRING); };


{Spc}             { break; /* white space */ };
"\n"              { lineno++; return(NL); };
%%