最近在倒腾 Lua 脚本引擎。Lua 现在广泛用于各种游戏、PSP中,速度极快,与 C++ 宿主代码“相处”能力强,还有第三方增强工程如 LuaPlus, LuaBind 等的支持,笔者正是在使用 LuaPlus 这个不错的 Lua C++ 封装,内置 Lua 5.1 引擎。
以 LuaPlus 为例(Visual Studio 2005 IDE环境下):
1. 找到 LuaPlus 工程下的 Lua Source Files 下的 llex.c;
2. 在该文件中找到下面所列函数;
- static int llex (LexState *ls, SemInfo *seminfo)
3