Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » how to get tokens?
how to get tokens? [message #1220633] Thu, 12 December 2013 19:08 Go to next message
td php is currently offline td phpFriend
Messages: 2
Registered: December 2013
Junior Member
My language is(example):

class test{
int a;
}

I want to get each symbol:

class --- symbol 0
test --- symbol 1
{ --- symbol 2
int --- symbol 3
a --- symbol 4
; --- symbol 5
} --- symbol 6

all this in the generator:

class MyDslGenerator implements IGenerator {

override void doGenerate(Resource resource, IFileSystemAccess fsa) {
//TODO implement me
//tokens hear
}
}
Re: how to get tokens? [message #1220695 is a reply to message #1220633] Fri, 13 December 2013 07:26 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13659
Registered: July 2009
Senior Member
Have a look at the node model
Nodemodelutil will be your friend


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Class / Method Resolution Issue
Next Topic:[SOLVED] Strange EOpposite proxy resolving issue
Goto Forum:
  


Current Time: Tue Nov 24 21:34:07 GMT 2020

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

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

Back to the top