At 13:07 28/02/2009, Laurent Caillette wrote: >part > : ( mediumbreak | largebreak )? > > ( p += levelIntroducer > | p += paragraph > | p += blockQuote > | p += literal > | p += bigDashedListItem > | p += cellRowSequence > ) [...] >/Users/Shared/Scratch/Novelang/antlrworks/java/NovelangParser.java: >754: >incompatible types >found : NovelangParser.levelIntroducer_return >required: NovelangParser.cellRowSequence_return > p=levelIntroducer(); > ^ > >It seems that p has taken the type of the first rule >(levelIntroducer). Then attempting to set the result of >cellRowSequence doesn't work.
I'm surprised that you managed to get it to work as long as you did -- that's been on my list of "don't do that" for most of v3. You can fix it by creating a subrule: content : levelIntroducer | paragraph | blockQuote | literal | bigDashedListItem | cellRowSequence ; And then use p+=content in your original rule. List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
