<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 22/09/2010 16:27, Anstis, Michael (M.) wrote:
<blockquote
cite="mid:C7774483B6A70C4BB10E917CC1A59DC1073C24E5@eu1wam35.warley.ford.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta content="MSHTML 6.00.2900.5921" name="GENERATOR">
<div dir="ltr" align="left"><span class="137182015-22092010"><font
color="#0000ff" face="Arial" size="2">Why the two different
operators for in- and cross-pattern "or" i.e. "||" and "or".
What a pain that surely would be from a user perspective...</font></span></div>
</blockquote>
At the moment you can use both 'or' and '||' infix between patterns,
probably becuse we couldn't decide what was best so added both.
Inside of patterns only '||' made sense. I think 'or' was added
between patterns to keep similarity to allow levels of comfort for
Clips and Jess users. In a way as other Conditional Elements are
keywords removing '||' between patterns and only using 'or' might be
easier, it also helps visually differentiate bewteen or inside of a
pattern and outside. But I'm also open to just using '||' everywhere
for consistency, this is something we need to decide and agree
between us.<br>
<blockquote
cite="mid:C7774483B6A70C4BB10E917CC1A59DC1073C24E5@eu1wam35.warley.ford.com"
type="cite">
<div dir="ltr" align="left"><span class="137182015-22092010"></span> </div>
<div dir="ltr" align="left"><span class="137182015-22092010"><font
color="#0000ff" face="Arial" size="2">Where does that fit in
with the language orthogonality too (blogged about by Edson
some time ago - sorry to drag the past up <a
moz-do-not-send="true"
href="http://tirelli.blogspot.com/2007/08/quick-catch-up-and-language.html">http://tirelli.blogspot.com/2007/08/quick-catch-up-and-language.html</a>)?</font></span></div>
</blockquote>
Simplying the language, removing redundanceis and special cases all
helps for that. Edsons work on generic expressions inside of
patterns helps remove a lot of cruft.<br>
<br>
Mark<br>
<blockquote
cite="mid:C7774483B6A70C4BB10E917CC1A59DC1073C24E5@eu1wam35.warley.ford.com"
type="cite">
<div dir="ltr" align="left"><span class="137182015-22092010"></span> </div>
<div dir="ltr" align="left"><span class="137182015-22092010"><font
color="#0000ff" face="Arial" size="2">+1 for infix too :-)</font></span></div>
</blockquote>
I think it will be infix, that's what most people seem to prefer.<br>
<br>
Mark<br>
<blockquote
cite="mid:C7774483B6A70C4BB10E917CC1A59DC1073C24E5@eu1wam35.warley.ford.com"
type="cite"><br>
<blockquote style="margin-right: 0px;">
<div class="OutlookMessageHeader" dir="ltr" align="left"
lang="en-us">
<hr tabindex="-1"> <font face="Tahoma" size="2"><b>From:</b>
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev-bounces@lists.jboss.org">rules-dev-bounces@lists.jboss.org</a>
[<a class="moz-txt-link-freetext" href="mailto:rules-dev-bounces@lists.jboss.org">mailto:rules-dev-bounces@lists.jboss.org</a>] <b>On Behalf Of
</b>Mark Proctor<br>
<b>Sent:</b> 22 September 2010 16:03<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<b>Subject:</b> Re: [rules-dev] Drools syntax diagrams -
redrawn<br>
</font><br>
</div>
On 22/09/2010 14:40, Wolfgang Laun wrote:
<blockquote
cite="mid:AANLkTi=FHWakj6UziQB-O6N_=R2zc2j4KJTBrvjsLkej@mail.gmail.com"
type="cite">Service:<br>
<a
href="http://www-cgi.uni-regensburg.de/%7Ebrf09510/syntax.html"
moz-do-not-send="true">http://www-cgi.uni-regensburg.de/~brf09510/syntax.html</a><br>
<br>
The grammar syntax is the same as used in DRL.g but stripped
of all the antsy additions, and simplified.<br>
<br>
@Mark: I'm well aware of the limitations of a 1:1 translation
of a parser's grammar into diagrams. I have reduced the splits
into separate rules in DRL.g considerably. But what do you
want to hide from the users? The syntax is the syntax, and
there's no sweet-talking around it after you have reduced all
the noise from technical splits.<br>
<br>
One thing that might help would be deprecating things like
infix or/and.<br>
</blockquote>
yes agreed. Simplifying the grammar, reducing ambigiiouty or
multiple ways of doing the same thing, will make any resulting
grammar both easier ot maintain and grok.<br>
<br>
Edson, Davide and I have already discuss this. Both are working
on a new parser and are trying to address these issues. So
things that are doing are:<br>
<br>
Single binding on 'or'<br>
$binding : ( Pattern() || Pattern() )<br>
<br>
We are thinking of only allowing 'or' between patterns and not
allowing users to mix and match 'or' and '||'. Inside of
patterns '||' is the only connective allowed and will remain so.<br>
<br>
We will also probably make a choice and only allow infix 'or'
and 'and', at the moment users can chose infix or prefix.
Personally I find prefix quite attractive as it works sort of
like a "choice":<br>
(or Person( ... )<br>
Person( ... )<br>
Person( ...) )<br>
<br>
But I think most peopel are more comfortable with infix:<br>
(Person( ... ) or<br>
Person( ... ) or<br>
Person( ...) )<br>
<br>
return value, eval, literal constraint, variable constraint are
going. These are left overs of a Clips based grammar. So instead
we'll have a generic "expr" class that follow more common modern
ASTs for expression engines, like say MVEL.<br>
<br>
Davide has also requested that we make $ prefix mandatory for
LHS bindings as that is deterministic and again makes the
grammar cleaner. I personally like it being optional and it's
still open to debate. But I recognise the need to have better
maintained grammar, that is more consistent and regular with
easy to main documentation.<br>
<br>
Mark<br>
<blockquote
cite="mid:AANLkTi=FHWakj6UziQB-O6N_=R2zc2j4KJTBrvjsLkej@mail.gmail.com"
type="cite"><br>
Some rules can be omitted if they coincide with Java's own
rules; just add an explanation.<br>
<br>
-W<br>
<br>
<br>
<div class="gmail_quote">On 22 September 2010 14:56, Anstis,
Michael (M.) <span dir="ltr"><<a
href="mailto:manstis1@ford.com" moz-do-not-send="true">manstis1@ford.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="padding-left: 1ex;
margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204,
204, 204);">What was the service and was it the ANTLR
grammar you uploaded to<br>
generate the images?<br>
<br>
Thanks,<br>
<br>
Mike<br>
<div>
<div class="h5"><br>
-----Original Message-----<br>
From: <a
href="mailto:rules-dev-bounces@lists.jboss.org"
moz-do-not-send="true">rules-dev-bounces@lists.jboss.org</a><br>
[mailto:<a
href="mailto:rules-dev-bounces@lists.jboss.org"
moz-do-not-send="true">rules-dev-bounces@lists.jboss.org</a>]
On Behalf Of Wolfgang Laun<br>
Sent: 22 September 2010 13:38<br>
To: Rules Dev List<br>
Subject: [rules-dev] Drools syntax diagrams - redrawn<br>
<br>
I've found this online service and stuffed the Drools
grammar into it.<br>
<br>
You may see the results while they are still there:<br>
<a
href="http://www-cgi.uni-regensburg.de/%7Ebrf09510/syntax.tmp/x45371x0x0x.ebnf.h%0Atml"
target="_blank" moz-do-not-send="true">http://www-cgi.uni-regensburg.de/~brf09510/syntax.tmp/x45371x0x0x.ebnf.h<br>
tml</a><br>
</div>
</div>
<<a
href="http://www-cgi.uni-regensburg.de/%7Ebrf09510/syntax.tmp/x45371x0x0x.ebn%0Af.html"
target="_blank" moz-do-not-send="true">http://www-cgi.uni-regensburg.de/%7Ebrf09510/syntax.tmp/x45371x0x0x.ebn<br>
f.html</a>><br>
<br>
-W<br>
<br>
<br>
<br>
_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org"
moz-do-not-send="true">rules-dev@lists.jboss.org</a><br>
<a
href="https://lists.jboss.org/mailman/listinfo/rules-dev"
target="_blank" moz-do-not-send="true">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
</blockquote>
</div>
<br>
<pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a moz-do-not-send="true" 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>
</blockquote>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
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>