⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e_token.l

📁 对于研究FPGA结构的人来说
💻 L
字号:
%{/*------------------------------------------------------------------------** Copyright 1998 by Paul Leventis, Jonathan Rose and the University of    ** Toronto.  Use is permitted, provided that this attribution is retained  ** and no part of the code is re-distributed or included in any commercial ** product except by written agreement with the above parties.             **                                                                         ** For more information, contact us directly:                              **    Paul Leventis (leventi@eecg.utoronto.ca)                             **    Jonathan Rose  (jayar@eecg.toronto.edu)                              **    Department of Electrical and Computer Engineering                    **    University of Toronto, 10 King's College Rd.,                        **    Toronto, Ontario, CANADA M5S 1A4                                     **    Phone: (416) 978-6992  Fax: (416) 971-2286                           **------------------------------------------------------------------------*//* Lexer for EDIF Parser   Paul Leventis, July 1997*//* $Revision ..$ * $Log: e_token.l,v $ * Revision 3.2  1997/07/31  20:17:37  leventi * Minor changes * * Revision 3.1  1997/07/29  18:21:15  leventi * Add $Log: e_token.l,v $ * Revision 3.2  1997/07/31  20:17:37  leventi * Minor changes * * */#include "e_graph.h"#include <math.h>#include <errno.h>#include <string.h>#include <stdlib.h>#define RETURN(val) { EP_tokenpos+=yyleng; if(!EP_skipping) return val; }%}%%acload		RETURN(EP_acload);after		RETURN(EP_after);annotate	RETURN(EP_annotate);apply		RETURN(EP_apply);arc		RETURN(EP_arc);array		RETURN(EP_array);arrayMacro	RETURN(EP_arrayMacro);arrayRelatedInfo	RETURN(EP_arrayRelatedInfo);arraySite	RETURN(EP_arraySite);atLeast		RETURN(EP_atLeast);atMost		RETURN(EP_atMost);author		RETURN(EP_author);baseArray	RETURN(EP_baseArray);becomes		RETURN(EP_becomes);between		RETURN(EP_between);boolean		RETURN(EP_boolean);booleanDisplay	RETURN(EP_booleanDisplay);booleanMap	RETURN(EP_booleanMap);booleanValue	RETURN(EP_booleanValue);borderPattern	RETURN(EP_borderPattern);borderWidth	RETURN(EP_borderWidth);boundingBox	RETURN(EP_boundingBox);cell		RETURN(EP_cell);cellNameDef	RETURN(EP_cellNameDef);cellNameRef	RETURN(EP_cellNameRef);cellRef		RETURN(EP_cellRef);cellType	RETURN(EP_cellType);change		RETURN(EP_change);circle		RETURN(EP_circle);color		RETURN(EP_color);comment		RETURN(EP_comment);commentGraphics	RETURN(EP_commentGraphics);compound	RETURN(EP_compound);connectLocation	RETURN(EP_connectLocation);contents	RETURN(EP_contents);cornerType	RETURN(EP_cornerType);criticality	RETURN(EP_criticality);currentMap	RETURN(EP_currentMap);curve		RETURN(EP_curve);cycle		RETURN(EP_cycle);dataOrigin	RETURN(EP_dataOrigin);dcFaninLoad	RETURN(EP_dcFaninLoad);dcFanoutLoad	RETURN(EP_dcFanoutLoad);dcMaxFanin	RETURN(EP_dcMaxFanin);dcMaxFanout	RETURN(EP_dcMaxFanout);delay		RETURN(EP_delay);delta		RETURN(EP_delta);derivation	RETURN(EP_derivation);design		RETURN(EP_design);designator	RETURN(EP_designator);designNameDef	RETURN(EP_designNameDef);difference	RETURN(EP_difference);direction	RETURN(EP_direction);display		RETURN(EP_display);dominates	RETURN(EP_dominates);dot		RETURN(EP_dot);duration	RETURN(EP_duration);edif		RETURN(EP_edif);ediffileNameDef	RETURN(EP_ediffileNameDef);edifLevel	RETURN(EP_edifLevel);edifVersion	RETURN(EP_edifVersion);enclosureDistance	RETURN(EP_enclosureDistance);endType		RETURN(EP_endType);entry		RETURN(EP_entry);event		RETURN(EP_event);exactly		RETURN(EP_exactly);external	RETURN(EP_external);fabricate	RETURN(EP_fabricate);false		RETURN(EP_false);figure		RETURN(EP_figure);figureArea	RETURN(EP_figureArea);figureGroup	RETURN(EP_figureGroup);figuregroupNameDef	RETURN(EP_figuregroupNameDef);figuregroupNameRef	RETURN(EP_figuregroupNameRef);figureGroupObject	RETURN(EP_figureGroupObject);figureGroupOverride	RETURN(EP_figureGroupOverride);figureGroupRef	RETURN(EP_figureGroupRef);figureOp	RETURN(EP_figureOp);figurePerimeter	RETURN(EP_figurePerimeter);figureWidth	RETURN(EP_figureWidth);fillPattern	RETURN(EP_fillPattern);follow		RETURN(EP_follow);forbiddenEvent	RETURN(EP_forbiddenEvent);form		RETURN(EP_form);globalPortRef	RETURN(EP_globalPortRef);greaterThan	RETURN(EP_greaterThan);gridMap		RETURN(EP_gridMap);ignore		RETURN(EP_ignore);includeFiguregroup	RETURN(EP_includeFiguregroup);initial		RETURN(EP_initial);instance	RETURN(EP_instance);instanceBackAnnotate	RETURN(EP_instanceBackAnnotate);instanceGroup	RETURN(EP_instanceGroup);instanceMap	RETURN(EP_instanceMap);instanceNameDef	RETURN(EP_instanceNameDef);instanceNameRef	RETURN(EP_instanceNameRef);instanceRef	RETURN(EP_instanceRef);integer		RETURN(EP_integer);integerDisplay	RETURN(EP_integerDisplay);integerValue	RETURN(EP_integerValue);interface	RETURN(EP_interface);interFiguregroupSpacing	RETURN(EP_interFiguregroupSpacing);intersection	RETURN(EP_intersection);intraFigureGroupSpacing	RETURN(EP_intraFigureGroupSpacing);inverse		RETURN(EP_inverse);isolated	RETURN(EP_isolated);joined		RETURN(EP_joined);justify		RETURN(EP_justify);keywordDisplay	RETURN(EP_keywordDisplay);keywordLevel	RETURN(EP_keywordLevel);keywordMap	RETURN(EP_keywordMap);keywordNameRef	RETURN(EP_keywordNameRef);layerNameDef	RETURN(EP_layerNameDef);lessThan	RETURN(EP_lessThan);library		RETURN(EP_library);libraryRef	RETURN(EP_libraryRef);listOfNets	RETURN(EP_listOfNets);listOfPorts	RETURN(EP_listOfPorts);loadDelay	RETURN(EP_loadDelay);logicAssign	RETURN(EP_logicAssign);logicInput	RETURN(EP_logicInput);logicList	RETURN(EP_logicList);logicMapInput	RETURN(EP_logicMapInput);logicMapOutput	RETURN(EP_logicMapOutput);logicNameDef	RETURN(EP_logicNameDef);logicNameRef	RETURN(EP_logicNameRef);logicOneOf	RETURN(EP_logicOneOf);logicOutput	RETURN(EP_logicOutput);logicPort	RETURN(EP_logicPort);logicRef	RETURN(EP_logicRef);logicValue	RETURN(EP_logicValue);logicWaveform	RETURN(EP_logicWaveform);maintain	RETURN(EP_maintain);match		RETURN(EP_match);member		RETURN(EP_member);mnm		RETURN(EP_mnm);minomax 	RETURN(EP_minomax);multipleValueSet	RETURN(EP_multipleValueSet);mustJoin	RETURN(EP_mustJoin);name		RETURN(EP_name);nameDef		RETURN(EP_nameDef);nameRef		RETURN(EP_nameRef);net		RETURN(EP_net);netBackAnnotate	RETURN(EP_netBackAnnotate);netBundle	RETURN(EP_netBundle);netDelay	RETURN(EP_netDelay);netgroup	RETURN(EP_netgroup);netMap		RETURN(EP_netMap);netRef		RETURN(EP_netRef);noChange	RETURN(EP_noChange);nonPermutable	RETURN(EP_nonPermutable);notAllowed	RETURN(EP_notAllowed);notchSpacing	RETURN(EP_notchSpacing);number		RETURN(EP_number);numberDefinition	RETURN(EP_numberDefinition);numberDisplay	RETURN(EP_numberDisplay);numberValue	RETURN(EP_numberValue);offPageConnector	RETURN(EP_offPageConnector);offsetEvent	RETURN(EP_offsetEvent);openShape	RETURN(EP_openShape);orientation	RETURN(EP_orientation);origin		RETURN(EP_origin);overhangDistance	RETURN(EP_overhangDistance);overlapDistance	RETURN(EP_overlapDistance);oversize	RETURN(EP_oversize);owner		RETURN(EP_owner);page		RETURN(EP_page);pageSize	RETURN(EP_pageSize);parameter	RETURN(EP_parameter);parameterAssign	RETURN(EP_parameterAssign);parameterDisplay	RETURN(EP_parameterDisplay);path		RETURN(EP_path);pathDelay	RETURN(EP_pathDelay);pathWidth	RETURN(EP_pathWidth);permutable	RETURN(EP_permutable);physicalDesignRule	RETURN(EP_physicalDesignRule);plug		RETURN(EP_plug);point		RETURN(EP_point);pointDisplay	RETURN(EP_pointDisplay);pointList	RETURN(EP_pointList);pointValue	RETURN(EP_pointValue);polygon		RETURN(EP_polygon);port		RETURN(EP_port);portBackAnnotate	RETURN(EP_portBackAnnotate);portBundle	RETURN(EP_portBundle);portDelay	RETURN(EP_portDelay);portGroup	RETURN(EP_portGroup);portImplementation	RETURN(EP_portImplementation);portInstance	RETURN(EP_portInstance);portList	RETURN(EP_portList);portListAlias	RETURN(EP_portListAlias);portMap		RETURN(EP_portMap);portRef		RETURN(EP_portRef);program		RETURN(EP_program);property	RETURN(EP_property);propertyDisplay	RETURN(EP_propertyDisplay);propertyNameDef	RETURN(EP_propertyNameDef);propertyNameRef	RETURN(EP_propertyNameRef);protectionFrame	RETURN(EP_protectionFrame);pt		RETURN(EP_pt);range		RETURN(EP_range);rangeVector	RETURN(EP_rangeVector);rectangle	RETURN(EP_rectangle);rectangleSize	RETURN(EP_rectangleSize);rename		RETURN(EP_rename);resolves	RETURN(EP_resolves);ruleNameDef	RETURN(EP_ruleNameDef);scale		RETURN(EP_scale);scaledInteger	RETURN(EP_scaledInteger);scaleX		RETURN(EP_scaleX);scaleY		RETURN(EP_scaleY);section		RETURN(EP_section);shape		RETURN(EP_shape);simulate	RETURN(EP_simulate);simulateNameDef	RETURN(EP_simulateNameDef);simulationInfo	RETURN(EP_simulationInfo);singleValueSet	RETURN(EP_singleValueSet);site		RETURN(EP_site);socket		RETURN(EP_socket);socketSet	RETURN(EP_socketSet);status		RETURN(EP_status);steady		RETURN(EP_steady);string		RETURN(EP_string);stringDisplay	RETURN(EP_stringDisplay);stringValue RETURN(EP_stringValue);strong		RETURN(EP_strong);symbol		RETURN(EP_symbol);symmetry	RETURN(EP_symmetry);table		RETURN(EP_table);tableDefault	RETURN(EP_tableDefault);technology	RETURN(EP_technology);textHeight	RETURN(EP_textHeight);timeInterval	RETURN(EP_timeInterval);timeStamp	RETURN(EP_timeStamp);timing		RETURN(EP_timing);transform	RETURN(EP_transform);transition	RETURN(EP_transition);trigger		RETURN(EP_trigger);true		RETURN(EP_true);typedValue	RETURN(EP_typedValue);unconstrained	RETURN(EP_unconstrained);undefined	RETURN(EP_undefined);union		RETURN(EP_union);unit		RETURN(EP_unit);unused		RETURN(EP_unused);userData	RETURN(EP_userData);version		RETURN(EP_version);Version		RETURN(EP_version);view		RETURN(EP_view);viewList	RETURN(EP_viewList);viewMap		RETURN(EP_viewMap);viewNameDef	RETURN(EP_viewNameDef);viewNameRef	RETURN(EP_viewNameRef);viewRef		RETURN(EP_viewRef);viewType	RETURN(EP_viewType);visible		RETURN(EP_visible);voltageMap	RETURN(EP_voltageMap);waveValue	RETURN(EP_waveValue);weak		RETURN(EP_weak);weakJoined	RETURN(EP_weakJoined);when		RETURN(EP_when);written		RETURN(EP_written);\n	{ EP_tokenpos=1; EP_lineno++; }[ ] 	{ EP_tokenpos++; }		[\t]	{ EP_tokenpos=((EP_tokenpos-1)/8)*8+9+(EP_tokenpos-1)%8; }[-+]?[0-9]+ { 	EP_tokenpos+=yyleng;	if(!EP_skipping) {		yylval.iVal = atoi(yytext); 		if(errno==ERANGE) {			yyerror("Integer constant out of range");			exit(1);		}		return IntegerToken;	}}\"[^\"\n]*\" {	EP_tokenpos+=yyleng;	if(!EP_skipping) {		if(yytext[strlen(yytext)-1]!='"') {			yyerror("Unterminated quoted string");			exit(1);		}		yylval.sVal = strdup(yytext+1);		yylval.sVal[strlen(yytext)-2] = 0;		return StringToken;	}}[a-zA-Z_&@$%][a-zA-Z0-9_&@$%]* {	EP_tokenpos+=yyleng;	if(!EP_skipping) {		yylval.sVal = strdup(yytext);		return NameToken;	}}[(]	{ EP_tokenpos++; if(!EP_skipping) return '('; else EP_skipping++; }[)]	{ EP_tokenpos++; if(!EP_skipping) return ')'; else EP_skipping--; }.	{ 	EP_tokenpos+=yyleng;	if(!EP_skipping)		return yytext[0];	} 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -