Windows 上的 LALR(1) 或 GLR - Bison++ 的替代品/ Flex++哪些是当前的?

发布于 2024-08-25 18:26:04 字数 520 浏览 4 评论 0原文

更新:此问题已过时,但仅供参考。

原始问题

自 2002 年以来,我一直在使用相同版本的 bison++ (1.21-8) 和 flex++ (2.3.8-7)。

我目前并不是在寻找 LALR(1) 或 GLR 的替代品,只是在寻找最新的选项。有谁知道这些比原始版本更晚的、不依赖 Cygwin 的端口吗?

其他人在 Windows 环境中使用什么来进行 C++ 编译器开发(除了 ANTLR 或 Boost.spirit)?如果您有第一手经验,商业选择是可以的。我也需要在 Linux 上编译。

更新:这个老问题是在我不知道有关工具推荐的政策时提出的(不确定 2010 年是否存在政策,但无论如何......

我更新到具有 GLR 功能的 Bison 3.0 并开始对此进行试验。

我最终决定我的解析器的任何重写都将是递归下降,以改进错误报告并允许在编译器之外的工具中更轻松地使用,因此现在我将在 Bison 中完成参考版本,我认为转换为不同的 PG 没有什么意义。此时的工具。

UPDATE: This question is out of date, but left for informational purposes.

Original Question

I have been using the same version of bison++ (1.21-8) and flex++ (2.3.8-7) since 2002.

I'm not looking for an alternative to LALR(1) or GLR at this time, just looking for the most current options. Is anyone aware of any later ports of these than the original that aren't Cygwin dependent?

What are other folks using in Windows environments for C++ compiler development (besides ANTLR or Boost.spirit)? Commercial options are ok, if you have firsthand experience. I do need to compile on Linux as well.

UPDATE: This old question was asked when I wasn't aware of the policies about tool recommendations (not sure if policy existed in 2010 but regardless...

I since updated to Bison 3.0 which has GLR capabilities and have begun experimenting with that.

I eventually decided that any rewrite of my parser would be a recursive descent, to improve error reporting and allow easier use in tools besides the compiler, so for now I will complete the reference version in Bison. I see little point in converting to a different PG tool at this time.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

把昨日还给我 2024-09-01 18:26:04

你可以试试Elsa(现在它是Oink项目的一部分)。但现在它已经快死了。它唯一吸引人的特点是在其之上编写了一个完整且健壮的 C 和 C++ 解析器。

LLVM 包含一个相当现代的解析框架。还有一个 C++ 解析器(请参阅 clang 项目)。

一些 C++ 的 Packrat 实现是可用的,这是解析中最流行的东西。

You can try Elsa (now it is a part of Oink project). But it is almost dead now. The only attractive feature of it is that there is a complete and robust C and C++ parser is written on top of it.

LLVM contains a reasonably modern parsing framework. And there is a C++ parser as well (see clang project).

Some Packrat implementations for C++ are available, sort of the most trendy thing in parsing.

烟花肆意 2024-09-01 18:26:04

我非常喜欢ANTLR。对于严肃的生产应用程序来说,Boost Spirit 有点“出格”。

I like ANTLR a lot. Boost Spirit is a bit "out there" for serious production applications.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文