Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Xtext] Generated Antlr parser artifacts
[Xtext] Generated Antlr parser artifacts [message #638548] Thu, 11 November 2010 15:44 Go to next message
Rafael Angarita is currently offline Rafael AngaritaFriend
Messages: 94
Registered: November 2010
Hello, I am still struggling with calling Xtext/Xpand from a Java project.

The Xtext editor is working fine with the grammar I defined. I exported the Xtext project as a plugin and added the Xtext Nature to my Java project.

Now, I would like to programmatically parse the files containing my language, for example, to check if it is correct or to get the names of the entities and save them in a data base. For example, if the file containg code written in my DSL looks like:

entity name_1 (
entity name_2 (

I would like to get "name_1" and "name_2" in my java code.

I have been looking to the generated classes in myproject.parser.antlr and I am wondering if maybe a class like MyprojectParser could be used for my purposes.

Thank you very much for your help.
Re: [Xtext] Generated Antlr parser artifacts [message #638611 is a reply to message #638548] Thu, 11 November 2010 19:05 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14652
Registered: July 2009
Senior Member
Hello Rafael,

have a look into the docs: processing_Xtext_models


Twitter : @chrdietrich
Blog :
Previous Topic:[Xtend] Support for dataTypes
Next Topic:[xpand] how to list elements of a containment reference (Ecore model)
Goto Forum:

Current Time: Mon Feb 26 05:45:33 GMT 2024

Powered by FUDForum. Page generated in 0.02096 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top