Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » TCS reference
TCS reference [message #35599] Wed, 02 May 2007 13:22 Go to next message
Lorenzo Dalla Vecchia is currently offline Lorenzo Dalla VecchiaFriend
Messages: 58
Registered: July 2009
Member
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?

Thanks.

--
Lorenzo
Re: [TCS] TCS reference [message #35633 is a reply to message #35599] Wed, 02 May 2007 13:56 Go to previous message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hello,

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:
http://www.sciences.univ-nantes.fr/lina/atl/www/atl_discussi 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
http://antlr.org/doc/lexer.html#Lexical_Analysis_with_ANTLR). "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).


Regards,

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
> 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?
>
> Thanks.
>
> --
> Lorenzo
Previous Topic:[ATL] passing parameters to transformations
Next Topic:about the ATL use case: UML2OWL
Goto Forum:
  


Current Time: Mon Jan 18 08:32:49 GMT 2021

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

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

Back to the top