This is how i would translate 'nestedConstraint()' to a regular
expression 
ID? ( (DOT | HASH) ID)* DOT LEFT_PARENT constraints
RIGHT_PARENT 
And this is the description in his header 
"( ID ( DOT |
HASH ) )* ID DOT LEFT_PAREN constraints RIGHT_PAREN" 
The difference is
that 'nestedConstraint()' never checks if really starts with ID, so can
starts with DOT or HASH, which contradicts his header. 
El 2014-01-30
22:18, Edson Tirelli escribió: 
 Claudio, 
 
 I am not sure I 
understand your question? 
 
 I was looking into the method, and, 
although I would implement it in a different
way myself, the current
implementation looks correct to me... am I missing something? 
 
 
Edson 
 
 On Thu, Jan 30, 2014 at 11:16 AM, Claudio Jesús Sánchez 
Casanueva
<claudio.sanchez(a)andanta.es> wrote:
 
> I am studying the 
drools code and i have seen strange the method
'getNestedConstraintPrefixLenght()' in DRL6Parser.java: If i translate
that function to a regular expression in antlr lexer, it would be "ID? (
(DOT | HASH) ID)* DOT LEFT_PARENT", which have few sense. 
> 
> The 
header of 'nestedConstraint()' describes the expected the expected
result as "( ID ( DOT | HASH ) )* ID DOT LEFT_PAREN constraints
RIGHT_PAREN" : it internally calls to
'getNestedConstraintPrefixLenght()', consumes the numbers of items
retuned by this, calls to 'constrains()' and cosumes a RIGHT_TOKEN.
> 
For me the expected results described in the header of
'nestedConstraint()' do not correspond with the real results. 
>> 
> 
_______________________________________________
> rules-dev mailing 
list
>> rules-dev(a)lists.jboss.org
> 
https://lists.jboss.org/mailman/listinfo/rules-dev [1]
> 
> -- 
 
 
Edson Tirelli
 Principal Software Engineer 
 Red Hat Business Systems 
and Intelligence Group
 
 
_______________________________________________
 rules-dev mailing 
list
 rules-dev(a)lists.jboss.org
 
https://lists.jboss.org/mailman/listinfo/rules-dev [1]
Links:
------
[1] 
https://lists.jboss.org/mailman/listinfo/rules-dev