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

📄 scc.h

📁 《游戏编程精粹》AI程序设计源代码
💻 H
字号:
#ifndef __SCC_H__
#define __SCC_H__

// Silly useless VC++ warnings...
#pragma warning( disable : 4786 )

#include <assert.h>
#include <string>
#include <map>

#include "PTNode.H"

// The symbol table contains mappings from a string that the script contains
// to the compiler's identifier node that represents this symbol.  The symbol
// table ensures that all references to a variable points to the same internal
// data structure.  In a more sophisticated compiler, the symbol table is more
// sophisticated to allow for scopes, objects, functions, etc.
using namespace std;

typedef map< string, IdentifierNodePtr > SymbolTable;
extern SymbolTable symtbl;


// Every rule in Bison have an associated type or "lvalue".  Bison expects a
// program to override the 'YYSTYPE' macro with the type name.  Here, we
// define all rules in Bison are a PTNode smart pointer.
#define YYSTYPE PTNodePtr

// Extern a few functions that are needed by Flex & Bison to communicate to
// each other.
extern int yyerror( char *err );
extern int yylex();
extern int yyparse();


#endif // __SCC_H__

⌨️ 快捷键说明

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