.NET Framework Developer Center >
.NET Development Forums
>
Microsoft SQL Server Modeling
>
Token Alias problem ?
Token Alias problem ?
- Hi,
I am currently crafting a DSL and have discovered what I think may be a problem. In my reseach, I have discovered a similar problem which relates to the use of the CaseInsensitive attribute, but I will document it here anyway.
for a syntax defined as such ...
token tRelation
= "<" => "LessThan"
| ">" => "GreaterThan"
| "<=" => "LessThanOrEqual"
| ">=" => "GreaterThanOrEqual"
;
syntax RelationalExpression
= p:AdditiveExpression => p
| l:RelationalExpression t:tRelation r:AdditiveExpression => id(t){Left=>l,Right=>r}
| l:RelationalExpression t:tRelation error
;
You will notice that I use the "id(x)" form. This works very well for me, but with one exception. The AST is built perfectly, but for some reason the syntax highlighting does not work for any token with an alias. Interestingly, there problem also exists for ActiPro's SyntaxEditor with their Oslo plugin.
Can anyone comment on this, or is this by design?
Regards,
Gary Ranson.
Answers
- Gary--do you have any more info here? Otherwise this question is getting old and I'd like to close the thread instead of leaving it dangling.
.Kraig- Proposed As Answer byedhickeyMSFT, OwnerWednesday, November 04, 2009 4:45 PM
- Marked As Answer byGary Ranson Thursday, November 05, 2009 1:32 PM
All Replies
- HI Gary--one of the members of the "M" team (who help he get answers for these question) asked if you could explain what's happening a little more. Could you supply your grammar file, an example input file, and both your expected and observed behaviors?
Thanks
.Kraig - The syntax highlighting is driven at a pretty low level, so I can belive that if its going wrong in one place that it's going wrong in another.
Where is the attribute that declares the token as an operator? - Gary--do you have any more info here? Otherwise this question is getting old and I'd like to close the thread instead of leaving it dangling.
.Kraig- Proposed As Answer byedhickeyMSFT, OwnerWednesday, November 04, 2009 4:45 PM
- Marked As Answer byGary Ranson Thursday, November 05, 2009 1:32 PM


