Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [TCS] unused binary operators
[TCS] unused binary operators [message #7397] Tue, 25 March 2008 12:23 Go to next message
T Kruse is currently offline T KruseFriend
Messages: 73
Registered: July 2009
Member
Hi,

Assuming I have defined several operators in my TCS file, among these:
operators {
priority 0 { -- highest priority
opSlash = slash, 2;
}
...

And assumin my operatorTemplate does use other operators but not the given
one above, "opSlash", my generated grammar will look like this:

priority_0 returns[Object ret2] @init {java.lang.String opName=null;
org.antlr.runtime.Token firstToken=input.LT(1);}
: (ret=primary_expression ((SLASH {opName = "/";} ()))*)
{
ret2=ret;
}

This means any number of trailing slashes would be allowed, even though I
would think the intention of not using this operator in the
operatorTemplate would indicate this not to be wished.

Is this a bug, or would the TCS be invalid in this case (Meaning in the
future there might be an error:"Unused operator in OperatorList")?
Re: [TCS] unused binary operators [message #7410 is a reply to message #7397] Tue, 25 March 2008 22:33 Go to previous message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hello,

> Is this a bug, or would the TCS be invalid in this case (Meaning in the
> future there might be an error:"Unused operator in OperatorList")?

There will be an error marker: "Unused operator: <operator-name>" on the
operator.


Thanks for reporting this.


Regards,

Frédéric Jouault
Previous Topic:[TCS] possible bug in ContextIterator
Next Topic:[TCS] Performance of TCSRuntime.RefSetting
Goto Forum:
  


Current Time: Sat Nov 09 05:51:09 GMT 2024

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

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

Back to the top