I meant PPCompositeParser within PetitParser
Le 18/12/2013 11:15, Nicolas Anquetil a écrit :
ben there is nothing magic about PPCompositeParser, it is a parser like
all the other one
and if you call rules without consuming any input + have a loop in the
rule calls, then there will be a infinite loop
Yes and no. Some parsers can't handle left-recursion in rules (petit parser? LL parsers can't), some parsers don't have any problem with left recursion (LR parsers like SmaCC).
ClassOrInterfaceType:
ClassType
"/ InterfaceType -- this option is useless here as it is equal
to ClassType"
ClassType: TypeDeclSpecifier
TypeDeclSpecifier:
TypeName { . TypeDeclSpecifier }
TypeName: Identifier TypeArgumentsopt
InterfaceType: TypeDeclSpecifier, TypeArgumentsopt
-- Nicolas Anquetil -- RMod research team (Inria)