📄 initscan.c
字号:
#define YY_CHAR unsigned char#line 1 "/u/icdc/rdt/tools/lib/flexskel.cc"/* A lexical scanner generated by flex *//* scanner skeleton version: * $Header: /usr/fsys/odin/a/vern/flex/RCS/flex.skel,v 2.16 90/08/03 14:09:36 vern Exp $ *//* MODIFIED FOR C++ CLASS BY Alain Coetmeur: coetmeur(at)icdc.fr *//* Note that (at) mean the 'at' symbol that I cannot write *//* because it is expanded to the class name *//* made at Informatique-CDC, Research&development department *//* company from the Caisse Des Depots et Consignations *//* institutional financial group *//* theses symbols are added before this file *//* #define YY_CHAR 'unsigned char' if 8bit or 'char' if 7bit *//* #define FLEX_DEBUG if debug mode */#define FLEX_SCANNER/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */#ifdef c_plusplus#ifndef __cplusplus#define __cplusplus#endif#endif/* Old MSC, before c7 */#ifdef MSDOS#ifndef _MSDOS#define _MSDOS#endif#endif/* turboc */#ifdef __MSDOS__#ifndef _MSDOS#define _MSDOS#endif#endif#ifdef __cplusplus#include <stdlib.h>#define YY_USE_CONST#define YY_USE_PROTOS#ifndef YY_USE_CLASS#define YY_USE_CLASS#endif#ifndef _MSDOS#include <osfcn.h>#endif#else /* ! __cplusplus */#ifdef __STDC__#ifdef __GNUC__#include <stddef.h>void *malloc( size_t );void free( void* );int read();#else#include <stdlib.h>#endif /* __GNUC__ */#define YY_USE_PROTOS#define YY_USE_CONST#endif /* __STDC__ */#endif /* ! __cplusplus */#ifdef __TURBOC__#define YY_USE_CONST#endif#include <stdio.h>/*********************************************//* COMPILER DEPENDENT MACROS *//*********************************************//* use prototypes in function declarations *//* the "const" storage-class-modifier is valid */#ifndef YY_USE_CONST#define const#endif/* use prototypes in function declarations */#ifndef YY_PROTO#ifdef YY_USE_PROTOS#define YY_PROTO(proto) proto#else#define YY_PROTO(proto) ()#endif#endif/*********************//* parameters *//* amount of stuff to slurp up with each read */#ifndef YY_READ_BUF_SIZE#define YY_READ_BUF_SIZE 8192#endif/* size of default input buffer */#ifndef YY_BUF_SIZE#define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) #endif/***********************************//* to be redefined for application *//* returned upon end-of-file */#define YY_END_TOK 0/* no semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */#define yyterminate() return ( YY_NULL )/* code executed at the end of each rule */#define YY_BREAK break;/* #define YY_USER_ACTION *//* #define YY_USER_INIT */#ifndef YY_USE_CLASS/* copy whatever the last rule matched to the standard output *//* cast to (char *) is because for 8-bit chars, yy___text is (unsigned char *) *//* this used to be an fputs(), but since the string might contain NUL's, * we now use fwrite() */#define ECHO (void) fwrite( (char *) yy___text, yy___leng, 1, yy___out )/* gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */#ifdef _MSDOS#define YY_INPUT(buf,result,max_size) \ if ( (result = fread(buf,1,max_size,yy___in)) < 0 ) \ YY_FATAL_ERROR( "fread() in flex scanner failed" );#else#define YY_INPUT(buf,result,max_size) \ if ( (result = read( fileno(yy___in), (char *) buf, max_size )) < 0 ) \ YY_FATAL_ERROR( "read() in flex scanner failed" );#endif/* report a fatal error *//* The funky do-while is used to turn this macro definition into * a single C statement (which needs a semi-colon terminator). * This avoids problems with code like: * * if ( something_happens ) * YY_FATAL_ERROR( "oops, the something happened" ); * else * everything_okay(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all * done when it reached the ';' after the YY_FATAL_ERROR() call. */#define YY_FATAL_ERROR(msg) \ do \ { \ (void) fputs( msg, stderr ); \ (void) putc( '\n', stderr ); \ exit( 1 ); \ } \ while ( 0 )/* default yywrap function - always treat EOF as an EOF */#define yywrap() 1/* default declaration of generated scanner - a define so the user can * easily add parameters */#define YY_DECL int yylex YY_PROTO(( void )) #else /* c++ */#define ECHO yy___echo()#define YY_INPUT(buf,result,max_size) \ if ( yy___input((char *)buf, result,max_size) < 0 ) \ YY_FATAL_ERROR( "YY_INPUT() in flex scanner failed" );#define YY_FATAL_ERROR(msg) yy___fatal_error(msg)#define yywrap() yy___wrap()#endif/***********************************//* not to be changed */#define YY_NULL 0#define YY_END_OF_BUFFER_CHAR 0/* special action meaning "start processing a new file" */#define YY_NEW_FILE yy___newfile /* enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN */#define BEGIN yy_start = 1 + 2 */* action number for EOF rule of a given start state */#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)/* % section 1 definitions go here */ #line 1 "scan.l"#define INITIAL 0/* scan.l - scanner for flex input */#line 5 "scan.l"/*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * Vern Paxson. * * The United States Government has rights in this work pursuant * to contract no. DE-AC03-76SF00098 between the United States * Department of Energy and the University of California. * * Redistribution and use in source and binary forms are permitted provided * that: (1) source distributions retain this entire copyright notice and * comment, and (2) distributions including binaries display the following * acknowledgement: ``This product includes software developed by the * University of California, Berkeley and its contributors'' in the * documentation or other materials provided with the distribution and in * all advertising materials mentioning features or use of this software. * Neither the name of the University nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */#ifndef lintstatic char rcsid[] = "@(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/scan.l,v 2.9 90/06/27 23:48:34 vern Exp $ (LBL)";#endif#undef yywrap#include "flexdef.h"#include "parse.h"#define HEADER_ECHO fprintf(headerfile,"%s",yytext )#define ACTION_ECHO fprintf( temp_action_file, "%s", yytext )#define MARK_END_OF_PROLOG fprintf( temp_action_file, "%%%% end of prolog\n" );#undef YY_DECL#define YY_DECL \ int flexscan()#define RETURNCHAR \ yylval = yytext[0]; \ return ( CHAR );#define RETURNNAME \ (void) strcpy( nmstr, (char *) yytext ); \ return ( NAME );#define PUT_BACK_STRING(str, start) \ for ( i = strlen( (char *) (str) ) - 1; i >= start; --i ) \ unput((str)[i])#define CHECK_REJECT(str) \ if ( all_upper( str ) ) \ reject = true;#define CHECK_YYMORE(str) \ if ( all_lower( str ) ) \ yymore_used = true;#define SECT2 1#define SECT2PROLOG 2#define SECT3 3#define CODEBLOCK 4#define PICKUPDEF 5#define SC 6#define CARETISBOL 7#define NUM 8#define QUOTE 9#define FIRSTCCL 10#define CCL 11#define ACTION 12#define RECOVER 13#define BRACEERROR 14#define C_COMMENT 15#define ACTION_COMMENT 16#define ACTION_STRING 17#define PERCENT_BRACE_ACTION 18#define USED_LIST 19#define CODEBLOCK_2 20#define XLATION 21#define HEADER_BLOC 22#define HEADER2_BLOC 23#define NAME_DECLARE 24#define DEFINE_DECLARE 25#define DEFINE_CONTENT 26#define YY_lex_FLEX_SCANNER#define YY_lex_CHAR unsigned char#line 1 "/u/icdc/rdt/tools/lib/flexskel.h"/* A lexical scanner header generated by flex *//* MODIFIED FOR C++ CLASS BY Alain Coetmeur: coetmeur(at)icdc.fr *//* Note that (at) mean the 'at' symbol that I cannot write *//* because it is expanded to the class name *//* made at Informatique-CDC, Research&development department *//* company from the Caisse Des Depots et Consignations *//*********************************************//* SYSTEM dependent declaration, includes... *//*********************************************//* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */#ifdef c_plusplus#ifndef __cplusplus#define __cplusplus#endif#endif#ifdef __cplusplus#ifndef YY_USE_PROTOS#define YY_USE_PROTOS#endif#ifndef YY_USE_CLASS
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -