这样做的原因是我将尝试在各种版本的the GEDCOM standard(用于族谱)之后完美地解析数据集,并且需要在到达令牌时处理从一个州到另一个州的文件.我更喜欢一个自动程序来完成设置基本pascal代码的繁琐工作,为我做状态处理.@H_403_3@
否则,我将不得不自己手动构建状态结构.@H_403_3@
我确实看到了以下问题(和TinyPG看起来不错,但我需要Delphi代码):
Parser-generator that outputs C# given a BNF grammar?@H_403_3@
如果没有这样的野兽,是否还有其他工具可以使这项任务更容易?@H_403_3@
解决方法
资源@H_403_3@
> gold-parser
> Wikipedia entry page
> Yahoo group@H_403_3@
引擎@H_403_3@
Rob van den Brink的one对象Pascal可能会引起人们的兴趣.@H_403_3@
引用:@H_403_3@
Rob van den Brink updated his engine for the Object Pascal Programming
Language. His implementation uses a program template to create a
full-functioning program. This approach embeds the parse tables
directly in the source code. As a result,you do not need to load a
Compiled Grammar Table file. The download contains a program template
as well as several examples.@H_403_3@
使用GOLD的示例项目@H_403_3@
GOLD很强大,它被用作dcu2pas的解析引擎,这是一个Delphi编译单元(dcu文件)反编译器,它是托管here(bitbucket.org).请注意它是在d写的.@H_403_3@