well one thing I can see is that there is no way to decide between ClassType and InterfaceType
because both have the exact same definition (or is it a mistake in the mail?)

I wouldn't think this can crash petitparser, I would have think it would just always go for classtype and never interfacetype
But this sure looks strange. Why would you need both? if they are the same?



Another thing I am spotting is that there is a kind of recursive loop:

ClassOrInterfaceType > ClassType > TypeDeclSpecifier > ClassOrInterfaceType

So may be it is entering an infinite recursion always following this same path ... ?
In a typical grammar, you would need something before the recursive call to make sure some token is consumed at some point otherwise it can just call rules recursively without consuming any otken in the input stream


nicolas


On 12/17/2013 11:32 PM, Benjamin AREZKI wrote:
Unfortunately no, I am actually in an other university ... Do you have any idea about this problem ? 


2013/12/17 Uko2 [via Smalltalk] <[hidden email]>
Can we meet in next 3 days at Inria?

On 17 Dec 2013, at 23:22, Benjamin AREZKI <[hidden email]> wrote:

Hi,

To explain my problem I will take this sample , my parser is a PPCompositeParser.

ClassOrInterfaceType: ClassType / InterfaceType

ClassType:TypeDeclSpecifier, TypeArgumentsopt

InterfaceType: TypeDeclSpecifier, TypeArgumentsopt

TypeDeclSpecifier: TypeName / ClassOrInterfaceType . Identifier

TypeName: Identifier /TypeName . Identifier 

Ok, so Identifier works well, no problem but when I tested typeDeclSpecifier, I lost the contral of Pharo but I don't know why because  I use a PPCompositeParser. For the moment I use some tricks but I would like it works normally.

Thanks for your help.

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/PetitParser-PPCompositeParser-Infinite-loop-tp4730844p4730845.html
To start a new topic under Moose, email [hidden email]
To unsubscribe from Smalltalk, click here.
NAML



View this message in context: Re: PetitParser PPCompositeParser, Infinite loop ?
Sent from the Moose mailing list archive at Nabble.com.


_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

-- 
Nicolas Anquetil -- RMod research team (Inria)