Xtext和ANTLR之间有什么关系? [英] What's the relationshiop between Xtext and ANTLR?

查看:181
本文介绍了Xtext和ANTLR之间有什么关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我听说Xtext最终使用了ANTLR,但是它们的语法规范文件具有一些不同的格式.那么两者之间是什么关系?

I heard that Xtext ultimately uses ANTLR but their grammar specification files have somewhat different formats. So what's the relationship between the two?

推荐答案

Xtext依靠Antlr解析器生成器来解析输入文件.最重要的是,该框架提供了许多附加值,例如强类型的AST,用于链接和静态分析的抽象以及针对Eclipse的IDE集成.

Xtext relies on the Antlr parser generator for the parsing of input files. On top of that the framework provides lot's of added value such as strongly typed ASTs, abstractions for linking and static analysis as well as IDE integration for Eclipse.

为此,Xtext生成两个Antlr语法.一个用于生产实际AST的生产解析,另一个用于消费事件以为Eclipse编辑器计算内容建议的语法.

For that purpose, Xtext generates two Antlr grammars. One for the production parsing where the actual AST is produced, and a second grammar that is used to consume events to compute the content proposals for the Eclipse editor.

这篇关于Xtext和ANTLR之间有什么关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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