I heard that Xtext ultimately uses ANTLR but their grammar specification files have somewhat different formats. So what's the relationship between the two?
Asked
Active
Viewed 4,537 times
8
-
1XText's documentation doesn't tell you? – Ira Baxter Dec 29 '11 at 23:15
2 Answers
14
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.
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.

Sebastian Zarnekow
- 6,609
- 20
- 23
0
ANTLR grammar is generated from Xtext. You may find it in src-gen/org/example/dsl/parser/antlr/internal/InternalDsl.g
.

Eldar Abusalimov
- 24,387
- 4
- 67
- 71