cgen.h

来自「根据编译器的基本原理」· C头文件 代码 · 共 29 行

H
29
字号
/****************************************************/
/* File: cgen.h                                     */
/* The code generator interface to the TINY compiler*/
/* Compiler Construction: Principles and Practice   */
/* Kenneth C. Louden                                */
/****************************************************/

#ifndef _CGEN_H_
#define _CGEN_H_

/* Procedure codeGen generates code to a code
 * file by traversal of the syntax tree. The
 * second parameter (codefile) is the file name
 * of the code file, and is used to print the
 * file name as a comment in the code file
 */
void codeGen(TreeNode*sytaxTree);
void cGen(TreeNode*tree);
void genStmt(TreeNode*tree);
void genExp(TreeNode*tree);
int connect(char**c1,char*c2);
int spaceconnect(char**c1,char*c2);
int lineconnect(char**c1,char*c2);
char*newtemp();
char*newlabel(char**l);
void newline();

#endif

⌨️ 快捷键说明

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