On 26 July 2011 21:28, Edson Tirelli <ed.tirelli@gmail.com> wrote:
QUESTION:As we can see above, we will need several new constructs in order to support features in our roadmap. We have the choice of making them all top level constructs, making the error recovery in the parser a lot more complicated, or we can re-use our declare construct to define these new structures as I presented in the pseudo-code above. Any pros/cons you can see in such approach?
OPTION 1 (more verbose, but simpler and more stable):<epDeclaration> ::= declare entry-point <epName> [, <epName]*<windowDeclaration> ::= declare window <windowName> <restOfTheWindowDeclaration> end<typeDeclaration> ::= declare [type] <typeName> <restOfTheTypeDeclaration> endOPTION 2 (makes error recovery harder, but it is less verbose):<epDeclaration> ::= entry-point <epName> [, <epName]*<windowDeclaration> ::= window <windowName> <restOfTheWindowDeclaration> end<typeDeclaration> ::= declare <typeName> <restOfTheTypeDeclaration> endOPTION 3:<epDeclaration> ::= someOtherKeyword entry-point <epName> [, <epName]*<windowDeclaration> ::= someOtherKeyword window <windowName> <restOfTheWindowDeclaration> end<typeDeclaration> ::= declare [type] <typeName> <restOfTheTypeDeclaration> endEdson--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev