将一个BNF语法文件转换为Java中的移位-归约解析器,可以使用go gocc来实现。

huangapple 未分类评论61阅读模式
英文:

equivalent to go gocc to generate a shift reduce parser from a bnf grammar file in Java

问题

我使用gocc(https://code.google.com/p/gocc/)生成了一个使用BNF语法文件的移位归约解析器,我想使用相同的BNF文件在Java中生成几乎等效的解析器和词法分析器的类。

你知道有什么工具可以做到这一点,并生成与gocc生成的解析器和词法分析器在结构和算法上相似的解析器和词法分析器吗?

谢谢。

英文:

I generated a shift reduce parser using a bnf grammar file using gocc (https://code.google.com/p/gocc/) i would like to generate almost equivalent classes for my parser and lexer in java using the same bnf file.

Any tool you know of that does this and generates a lexer and parser that are close in their structure and algorithms as those generated by gocc ?

Thanks.

huangapple
  • 本文由 发表于 2014年12月22日 14:51:27
  • 转载请务必保留本文链接:https://java.coder-hub.com/27597808.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定