|Re: [TCS] TCS reference [message #376936]
||Wed, 02 May 2007 13:56
| Frédéric Jouault
Registered: July 2009
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
There have already been several TCS-related posts in the GMT newsgroup
and on the old ATL mailing list (archives available from:
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
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).
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
> http://wiki.eclipse.org/index.php/TCS .
> For example I do not understand the "lexer" block, the operatorTemplate
> and the "token" lines.
> Could you please point me in the right direction?
Powered by FUDForum
. Page generated in 0.02073 seconds