<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Michael Neale wrote:
<blockquote cite="mid:5ECF0216-27F1-4411-A2CC-7F81F032ABAE@gmail.com"
type="cite">
<pre wrap="">I think it would be mvel - kind of an external dsl, but mvel is a
languge as well, so not sure how you would classify it.
</pre>
</blockquote>
No it's a simple java line parser. I just chunk based on indendation. I
do evaluate parts of those chunks with MVEL, for things like array
building. I did it like this as I found any other DSL language just had
too much extra verbage, like more brackets or symbols, because it's
restricted to the way it's parser works.<br>
trunk/drools-core/src/test/java/org/drools/reteoo/test/ReteDslTestEngine.java<br>
<br>
So first I put it through chunkReader<span class="annLine"
title="30150 mark.proctor@jboss.com">(). This turns it into a list of
strings, it removes any comments but keeps spacing<br>
<br>
The chunkReader is used by </span><span class="annLine"
title="30150 mark.proctor@jboss.com"><span class="hl_identifier">buildDslCommands().
This iterates each String in the list and uses indentation position to
know which commands execute against which steps. I chose indentation
rather than { ... } brackets as I wanted something that was more easily
readable. It does make the authoring slightly more fragile, but
readability was important here.<br>
<br>
Once we have the list of steps we can evaluate them with </span></span><span
class="annLine" title="30150 mark.proctor@jboss.com"><span
class="hl_identifier">run().</span></span><span class="annLine"
title="30150 mark.proctor@jboss.com"><span class="hl_identifier"></span></span><br>
<span class="annLine" title="30150 mark.proctor@jboss.com"><span
class="hl_identifier"><br>
Mark<br>
</span></span>
<blockquote cite="mid:5ECF0216-27F1-4411-A2CC-7F81F032ABAE@gmail.com"
type="cite">
<pre wrap="">
Sent from my phone.
On 02/12/2009, at 8:53 PM, leo_gomes <a class="moz-txt-link-rfc2396E" href="mailto:leonardo.f.gomes@gmail.com"><leonardo.f.gomes@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Is it an internal dsl written in jython or something like that, or an
external one that you crafted with antlr?
Is it on trunk?
Leo.
Mark Proctor wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Thought i'd flash this up on dev mailing list, incase anyone wanted
to
discuss it - or help :)
<a class="moz-txt-link-freetext" href="http://blog.athico.com/2009/11/rete-dsl-testing-harness.html">http://blog.athico.com/2009/11/rete-dsl-testing-harness.html</a>
Mark
_______________________________________________
rules-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
</pre>
</blockquote>
<pre wrap="">--
View this message in context: <a class="moz-txt-link-freetext" href="http://n3.nabble.com/Rete-DSL-testing-harness-tp63446p66217.html">http://n3.nabble.com/Rete-DSL-testing-harness-tp63446p66217.html</a>
Sent from the Drools - Dev mailing list archive at Nabble.com.
_______________________________________________
rules-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
</pre>
</blockquote>
<pre wrap=""><!---->_______________________________________________
rules-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>