<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: IDE for your own language embedded in Java? (part 1)</title>
	<atom:link href="http://blog.objectteams.org/2010/02/ide-for-your-own-language-embedded-in-java-part-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.objectteams.org/2010/02/ide-for-your-own-language-embedded-in-java-part-1/</link>
	<description>Everthing Object Teams - adding team spirit to your objects.</description>
	<pubDate>Fri, 10 Feb 2012 06:22:06 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: stephan</title>
		<link>http://blog.objectteams.org/2010/02/ide-for-your-own-language-embedded-in-java-part-1/#comment-156</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Wed, 17 Mar 2010 13:10:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.objectteams.org/?p=19#comment-156</guid>
		<description>Hi lgnord,
now I see your problem :)

When the scanner sees "&lt;&lt;%" it interprets this as a LEFT_SHIFT ("&lt;&lt;") plus trailing garbage.

If you really want to re-interpret this you'd just have to add a few lines to the ScannerAdaptor (let's see if the code get's through):

&lt;pre&gt;
} else if (token == TerminalTokens.TokenNameLEFT_SHIFT) {
    char[] source = getSource();
    int pos = getCurrentPosition();
    if (source[pos] == '%') { // detecting the opening "&lt;&lt;%" ?
        setCurrentPosition(pos-1); // put back the second '&lt;'
	return TerminalTokens.TokenNameLESS; // return the first '&lt;'
    }
&lt;/pre&gt;

So it is possible, though I think it would actually be confusing if "&lt;&lt;" is broken into two parts.

best
Stephan</description>
		<content:encoded><![CDATA[<p>Hi lgnord,<br />
now I see your problem <img src='http://blog.objectteams.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>When the scanner sees &#8220;< <%" it interprets this as a LEFT_SHIFT ("<<") plus trailing garbage.</p>
<p>If you really want to re-interpret this you'd just have to add a few lines to the ScannerAdaptor (let's see if the code get's through):</p>
<pre>
} else if (token == TerminalTokens.TokenNameLEFT_SHIFT) {
    char[] source = getSource();
    int pos = getCurrentPosition();
    if (source[pos] == &#8216;%&#8217;) { // detecting the opening &#8220;< <%" ?
        setCurrentPosition(pos-1); // put back the second '<'
	return TerminalTokens.TokenNameLESS; // return the first '<'
    }
</pre>
<p>So it is possible, though I think it would actually be confusing if &#8220;<<&#8221; is broken into two parts.</p>
<p>best<br />
Stephan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lgnord</title>
		<link>http://blog.objectteams.org/2010/02/ide-for-your-own-language-embedded-in-java-part-1/#comment-154</link>
		<dc:creator>lgnord</dc:creator>
		<pubDate>Mon, 15 Mar 2010 14:53:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.objectteams.org/?p=19#comment-154</guid>
		<description>#

Hi Stephan,

Thanks for answer and sorry for the delay of my new comments.

The first part of your explanation is very clear. I will now try to clarify my question on the ‘&#60;&#60;’ token.

First I write to write a conditional expression. 
‘if ( 1 &#60;=&#60;%one%&#62;) {}’
The compiler does not complain. Then I modify my code:
‘if ( 1 &#60;&#60;%one%&#62;) {}’
And the compiler complains. I do not understand why. I only replace a binary operator ‘&#60;=’ by a new one ‘&#60;’. Now if I add some layouts after the first ‘&#60;’, it works…
‘if ( 1 &#60; &#60;%one%&#62;) {}’

PS. I read again my first post and my &#60;%one%&#62;  disappeared. This perhaps explains why my question was difficult to understand</description>
		<content:encoded><![CDATA[<p>#</p>
<p>Hi Stephan,</p>
<p>Thanks for answer and sorry for the delay of my new comments.</p>
<p>The first part of your explanation is very clear. I will now try to clarify my question on the ‘&lt;&lt;’ token.</p>
<p>First I write to write a conditional expression.<br />
‘if ( 1 &lt;=&lt;%one%&gt;) {}’<br />
The compiler does not complain. Then I modify my code:<br />
‘if ( 1 &lt;&lt;%one%&gt;) {}’<br />
And the compiler complains. I do not understand why. I only replace a binary operator ‘&lt;=’ by a new one ‘&lt;’. Now if I add some layouts after the first ‘&lt;’, it works…<br />
‘if ( 1 &lt; &lt;%one%&gt;) {}’</p>
<p>PS. I read again my first post and my &lt;%one%&gt;  disappeared. This perhaps explains why my question was difficult to understand</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lgnord</title>
		<link>http://blog.objectteams.org/2010/02/ide-for-your-own-language-embedded-in-java-part-1/#comment-140</link>
		<dc:creator>lgnord</dc:creator>
		<pubDate>Wed, 10 Mar 2010 16:48:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.objectteams.org/?p=19#comment-140</guid>
		<description>Hi Stephan,

Thanks for answer and sorry for the delay of my new comments.

The first part of your explanation is very clear. I will now try to clarify my question on the '&#60;&#60;' token.

First I write to write a conditional expression. Of course, It uses a  expression:
‘if ( 1 &#60;=) {}’
The compiler does not complain. Then I modify my code:
‘if ( 1 &#60;) {}’
And the compiler complains. I do not understand why. I only replace a binary operator '&#60;=' by a new one '&#60;'. Now if I add some layouts after the first '&#60;', it works...
‘if ( 1 &#60; ) {}’



PS. I read again my first post and my  (whitout spaces) disappeared. This perhaps explains why my question was difficult to understand</description>
		<content:encoded><![CDATA[<p>Hi Stephan,</p>
<p>Thanks for answer and sorry for the delay of my new comments.</p>
<p>The first part of your explanation is very clear. I will now try to clarify my question on the &#8216;&lt;&lt;&#8217; token.</p>
<p>First I write to write a conditional expression. Of course, It uses a  expression:<br />
‘if ( 1 &lt;=) {}’<br />
The compiler does not complain. Then I modify my code:<br />
‘if ( 1 &lt;) {}’<br />
And the compiler complains. I do not understand why. I only replace a binary operator &#8216;&lt;=&#8217; by a new one &#8216;&lt;&#8217;. Now if I add some layouts after the first &#8216;&lt;&#8217;, it works&#8230;<br />
‘if ( 1 &lt; ) {}’</p>
<p>PS. I read again my first post and my  (whitout spaces) disappeared. This perhaps explains why my question was difficult to understand</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://blog.objectteams.org/2010/02/ide-for-your-own-language-embedded-in-java-part-1/#comment-115</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Tue, 02 Mar 2010 16:46:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.objectteams.org/?p=19#comment-115</guid>
		<description>Regarding delimiters: the only hard requirement is that the Scanner must detect the start and end of the custom syntax during getNextToken(). You could use something like the CustomParser from the part 2 post [1], call it already during getNextToken() and ask the parser how many chars it has consumed before calling setCurrentPosition() which tells the JDT parser where it should resume normal Java parsing.

I'm not sure I understand your syntax examples but yes, &lt;&lt; and &lt; are different tokens which could create a conflict (try asking for TokenNameLEFT_SHIFT etc.).

Is it any clearer now?
Stephan

[1] full sources are at http://www.objectteams.org/examples/embedded-expression-language-v2.zip</description>
		<content:encoded><![CDATA[<p>Regarding delimiters: the only hard requirement is that the Scanner must detect the start and end of the custom syntax during getNextToken(). You could use something like the CustomParser from the part 2 post [1], call it already during getNextToken() and ask the parser how many chars it has consumed before calling setCurrentPosition() which tells the JDT parser where it should resume normal Java parsing.</p>
<p>I&#8217;m not sure I understand your syntax examples but yes, < < and < are different tokens which could create a conflict (try asking for TokenNameLEFT_SHIFT etc.).</p>
<p>Is it any clearer now?<br />
Stephan</p>
<p>[1] full sources are at <a href="http://www.objectteams.org/examples/embedded-expression-language-v2.zip" rel="nofollow">http://www.objectteams.org/examples/embedded-expression-language-v2.zip</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lgnord</title>
		<link>http://blog.objectteams.org/2010/02/ide-for-your-own-language-embedded-in-java-part-1/#comment-114</link>
		<dc:creator>lgnord</dc:creator>
		<pubDate>Tue, 02 Mar 2010 15:39:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.objectteams.org/?p=19#comment-114</guid>
		<description>Hi,

Your project is existing and should help anybody who wants to develop java like language.

But I have some question:
 - Your sample uses  as delimiters. Is your solution still easy if I do not used delimiters (e.g.  becomes $one).
 - I tried you code and I made some tests:
The syntax 'if ( 1 &#60;=) {}' is valid but 'if ( 1 &#60;)' is not. I imagine that there is some conflicts between &#60;&#60; and &#60;&#60;%. Is this the problem ?

Thanks for your answer.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Your project is existing and should help anybody who wants to develop java like language.</p>
<p>But I have some question:<br />
 - Your sample uses  as delimiters. Is your solution still easy if I do not used delimiters (e.g.  becomes $one).<br />
 - I tried you code and I made some tests:<br />
The syntax &#8216;if ( 1 &lt;=) {}&#8217; is valid but &#8216;if ( 1 &lt;)&#8217; is not. I imagine that there is some conflicts between &lt;&lt; and &lt;&lt;%. Is this the problem ?</p>
<p>Thanks for your answer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: IDE for your own language embedded in Java? (part 2) at The Object Teams Blog</title>
		<link>http://blog.objectteams.org/2010/02/ide-for-your-own-language-embedded-in-java-part-1/#comment-88</link>
		<dc:creator>IDE for your own language embedded in Java? (part 2) at The Object Teams Blog</dc:creator>
		<pubDate>Fri, 26 Feb 2010 12:21:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.objectteams.org/?p=19#comment-88</guid>
		<description>[...] the first part I demonstrated how Object Teams can be used to extend the JDT compiler for a custom language to be [...]</description>
		<content:encoded><![CDATA[<p>[...] the first part I demonstrated how Object Teams can be used to extend the JDT compiler for a custom language to be [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://blog.objectteams.org/2010/02/ide-for-your-own-language-embedded-in-java-part-1/#comment-84</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Thu, 25 Feb 2010 13:57:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.objectteams.org/?p=19#comment-84</guid>
		<description>Thanks, Andrew. Me too, I'd love to continue our chat, but after all four of my submissions were rejected I can't come to EclipseCon. Too bad really. But yes, let's stay in touch anyway!

Whom would we kidnap this time to ensure your patches are committed? Pascal again? Olivier? ;-)</description>
		<content:encoded><![CDATA[<p>Thanks, Andrew. Me too, I&#8217;d love to continue our chat, but after all four of my submissions were rejected I can&#8217;t come to EclipseCon. Too bad really. But yes, let&#8217;s stay in touch anyway!</p>
<p>Whom would we kidnap this time to ensure your patches are committed? Pascal again? Olivier? <img src='http://blog.objectteams.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew E</title>
		<link>http://blog.objectteams.org/2010/02/ide-for-your-own-language-embedded-in-java-part-1/#comment-83</link>
		<dc:creator>Andrew E</dc:creator>
		<pubDate>Thu, 25 Feb 2010 03:31:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.objectteams.org/?p=19#comment-83</guid>
		<description>Very cool, Stephen.  I'm looking forward to chatting with you again at EclipseCon.</description>
		<content:encoded><![CDATA[<p>Very cool, Stephen.  I&#8217;m looking forward to chatting with you again at EclipseCon.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

