Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » GMT (Generative Modeling Technologies) » Re: [TCS] TCS reference
Re: [TCS] TCS reference [message #581614] Wed, 02 May 2007 13:56
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member

I am putting the eclipse.modeling.gmt newsgroup in copy of my answer,
because TCS is not part of the M2M project.

There is currently not much more publicly available information than
what is on the wiki page of TCS. However, we are currently working on
improving this.

There have already been several TCS-related posts in the GMT newsgroup
and on the old ATL mailing list (archives available from: on_archive/).
They may contain information you need.

Do not hesitate to ask your TCS-related questions on the
eclipse.modeling.gmt newsgroup. Please, remember to prefix the subject
of your posts with [TCS] so that everybody knows what they are about :-).

To answer your questions:
- The lexer block is directly copied in the ANTLR grammar generated by
TCS (for more information, see "Symbols"
and "tokens" (see below) are appended to the lexer block.
- The operatorTemplate construct is used to define expressions (e.g., 1
+ 2 * 3) along with operator priorities.
- There are two places where "token" is used in TCS:
- in primitiveTemplates (these are used to match primitive types such
as Integer, and String to lexer terminals),
- to define lexer terminals directly in TCS rather than having to
write ANTLR code (e.g., it should be more portable to other parser
generators, and possibly simpler in some cases). However, this feature
is still being tested, and may not completely work yet.

My advice is that if you can live with the default lexer (i.e., single
quoted Strings, --.*\n comments, etc.), then keep it as is, at least in
the beginning of your project (you can still improve it later).


Frédéric Jouault

Lorenzo Dalla Vecchia wrote:
> Hello everyone.
> I am currently approaching TCS and I was wondering if there's more
> reference material available than the files linked at
> .
> For example I do not understand the "lexer" block, the operatorTemplate
> and the "token" lines.
> Could you please point me in the right direction?
> Thanks.
> --
> Lorenzo
Previous Topic:oaw: Outline View not working in xtext generated editor
Next Topic:[ATL] Datatype mapping during Ecore to KM3 extraction
Goto Forum:

Current Time: Tue May 22 02:50:39 GMT 2018

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

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

Back to the top