一个有趣的项目来学习 Antlr
我正在从《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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
编写 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.
自己编写规则引擎的语法。然后编写Rete算法实现来使用它们。
Write yourself a grammar for a rules engine. Then write the Rete algorithm implementation to use them.
编写一个可配置语法如下的 cron 实用程序:
Write a cron utility that is configurable with syntax such as:
我正在实现我自己的编程语言作为 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.