是否有使用ANTLR或类似语言实现的简单语言? [英] Are there any simple languages implemented using ANTLR or similar?

查看:147
本文介绍了是否有使用ANTLR或类似语言实现的简单语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建一种简单的解释性语言以用于学习.我已经阅读了无数有关ANTLR和JavaCC的理论和教程,但是我不知道如何使它真正有用.

I'm trying to build a simple interpreted language for learning purposes. I've read countless theory and tutorials on ANTLR and JavaCC, but I can't figure out how to actually make it do something useful.

通过拆散某些东西再放回去",我学得最好,那么,有没有借助ANTLR之类的工具或简单工具实现的简单语言的工作示例?

I learn best by "taking something apart and putting it back together again", so, are there any working examples of simple languages implemented with the help of tools such as ANTLR, or similar?

类似以下的内容可能会很好:

Something like the following might be nice:

x = 1

if x == 1  
     print "true"

推荐答案

[无耻的插件]为什么不买我的语言实施模式这本书?我拥有将多种语言组合在一起所需要的所有组件,...

[shameless plug] Why not buy my Language Implementation Patterns book? I have all the pieces you need to put together a language including multiple interpreters etc...

这篇关于是否有使用ANTLR或类似语言实现的简单语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆