游戏编写报告的 SDL 用法,第 4 部分:lex 和 yacc 构建用于脚本和 GUI 设计的语法分析器 (developerWorks,2000 年 5 月)展示了作者如何使用 lex 和 yacc 为 游戏整合出一个配置文件解析器。
game-writing saga shows how the authors put together a configuration file parser for the game using lex and yacc.
该方法允许您提供自己的实体解析,从而防止语法分析器使用 DTD 来做这件事。
This method allows you to provide your own entity resolution, preventing the parser from using the DTD for this task.
如果将它设置为true(缺省值),则在调用ContentHandler的方法时,语法分析器将识别出名称空间并解析前缀。
When set to true (the default), the parser recognizes namespaces and resolves prefix when calling ContentHandler's methods.
应用推荐