如何使用antlr 4进行在线解析? [英] How to do online parse using antlr 4 ?

查看:454
本文介绍了如何使用antlr 4进行在线解析?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用ANTLR搜索我的自定义语言的Web IDE,但我找不到所以我尝试使用antlr 4和codemirror编辑器构建一个,我需要在线解析但是我不知道怎么做使用antlr 4,所以任何身体都可以帮助我知道如何使用ANTLR 4在线解析?



我尝试过:



我认为算法是这样做的...我想我必须在textarea更改时自动提交然后计数5秒然后通过Ajax自动提交..任何正文都可以帮助改进算法

I search on a web IDE using ANTLR for my custom language ,But I can't find so I try to build one using antlr 4 and codemirror editor, I need to parse online But I did't knew How to do it with antlr 4 , so can any body help me to knew How to make parse online with ANTLR 4 ?

What I have tried:

I think to algorithms to do it so ... I think I must to do submit autmaticly when the textarea change then count 5 seconds then do submit autmaticly by Ajax ... any body can help to improve the algorithm

推荐答案

你的方法看起来是正确的:提交文本进行编译并将其用作ANTLR的输入,在服务器上执行。 br />
如果您对使用Ajax发布文本有疑问,那么只需 Google for 即可。网上有很多样本。
Your approach looks correct: submit the text to compile and use it as input to ANTLR, executing on the server.
If you have doubts on posting text using Ajax, then just Google for it. There are many many samples available on the web.


这篇关于如何使用antlr 4进行在线解析?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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