defnext.c

来自「一个c语言写做的编译器的源码」· C语言 代码 · 共 24 行

C
24
字号
/*@A (C) 1992 Allen I. Holub                                                */

#include <stdio.h>
#include <tools/debug.h>
#include <tools/compiler.h>	/* needed only for prototype */

PUBLIC	void	defnext(fp, name)
FILE	*fp;
char	*name;
{
    /* Print the default yy_next(s,c) subroutine for an uncompressed table. */

    static char	 *comment_text[] =
    {
	"yy_next(state,c) is given the current state and input character and",
	"evaluates to the next state.",
	NULL
    };

    comment( fp, comment_text );
    fprintf( fp, "#define yy_next(state, c)  %s[ state ][ c ]\n", name );
}

⌨️ 快捷键说明

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