一个有趣的项目来学习 Antlr

发布于 2024-08-30 08:54:34 字数 180 浏览 2 评论 0原文

我正在从《The Definitive Antlr Reference》一书中学习 Antlr。我还处于起步阶段。我喜欢动手做一些事情,所以我认为做一个好的示例项目将是一次很好的学习经历。 我正在寻找一个规模合适的项目,而不是太大。但足够大和复杂来帮助我很好地学习 Antlr。

我们将非常感谢您的意见!

谢谢!

I am learning Antlr from the book 'The Definitive Antlr reference'. I am still in the beginning stages. I like to do hands on stuff, so I was thinking it would be a great learning experience to do a good sample project.
I am looking for a decently sized project, not too big. But just big and complicated enough to help me learn Antlr well.

Your inputs will be greatly appreciated!

Thanks!

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

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

发布评论

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

评论(4

只为一人 2024-09-06 08:54:34

编写 CSS 解析器和宏系统。是的,已经有几个这样的东西了,但这并不会让项目变得不那么有趣,而且你可以更快地应用它,你知道它是否“正确”。

为了好玩,将其移植到 JS,以便您可以在网页中动态加载它们。

Write a CSS parser and macro system. Yea there are several of these already but that doesn't make the project less interesting to do, plus you can apply it much more quickly, you know if it's "right" or not.

For fun, port it to JS so you can load them on the fly in the web pages.

只为守护你 2024-09-06 08:54:34

自己编写规则引擎的语法。然后编写Rete算法实现来使用它们。

Write yourself a grammar for a rules engine. Then write the Rete algorithm implementation to use them.

一个人的夜不怕黑 2024-09-06 08:54:34

编写一个可配置语法如下的 cron 实用程序:

every 12 hours
every 5 minutes from 10:00 to 14:00
2nd,third mon,wed,thu of march 17:00
every monday 09:00
1st monday of sep,oct,nov 17:00
every day 00:00

Write a cron utility that is configurable with syntax such as:

every 12 hours
every 5 minutes from 10:00 to 14:00
2nd,third mon,wed,thu of march 17:00
every monday 09:00
1st monday of sep,oct,nov 17:00
every day 00:00
所谓喜欢 2024-09-06 08:54:34

我正在实现我自己的编程语言作为 ANTLR 学习练习。我发现如果致力于一个项目并观察它的发展可以补充你的学习风格,那么效果会很好。

我的语言项目一开始根本没有做任何有用的事情,只是玩弄词法分析器和解析器语法。接下来是输入变量并将它们打印回来。随着知识的增加,人们可以在此基础上添加更多的东西,例如控制结构等。

I'm implementing my own programming language as an ANTLR learning exercise. I found it works well if working on a single project and watching it evolve complements your learning style.

My language project started off doing nothing useful at all, just playing about with lexer and parser syntax. Inputting variables and printing them back came next. As knowledge increases, one can build on this, adding further things like control structures etc.

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