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 #376936] Wed, 02 May 2007 13:56 Go to next 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
Re: [TCS] TCS reference [message #376941 is a reply to message #376936] Wed, 02 May 2007 17:49 Go to previous message
Lorenzo Dalla Vecchia is currently offline Lorenzo Dalla VecchiaFriend
Messages: 58
Registered: July 2009
Member
> I am putting the eclipse.modeling.gmt newsgroup in copy of my answer,
> because TCS is not part of the M2M project.

Sorry for posting in the wrong place and thank you for pointing me to the
right one!

--
Lorenzo
Re: [TCS] TCS reference [message #581664 is a reply to message #376936] Wed, 02 May 2007 17:49 Go to previous message
Lorenzo Dalla Vecchia is currently offline Lorenzo Dalla VecchiaFriend
Messages: 58
Registered: July 2009
Member
> I am putting the eclipse.modeling.gmt newsgroup in copy of my answer,
> because TCS is not part of the M2M project.

Sorry for posting in the wrong place and thank you for pointing me to the
right one!

--
Lorenzo
Previous Topic:[ATL] Datatype mapping during Ecore to KM3 extraction
Next Topic:[MOFScript] executing transformation
Goto Forum:
  


Current Time: Thu Apr 25 21:35:26 GMT 2024

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

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

Back to the top