net.sf.parser4j.parser.service.match
Interface IMatchMgr

All Known Implementing Classes:
AbstractMatchMgr, AbstractMatchMgrAdapter, MatchAlternative, MatchAltStmList, MatchAltStmListElt1, MatchAltStmListElt2, MatchCariageReturn, MatchCatStmList, MatchChar, MatchCharClass, MatchCharClassList, MatchCharFromEscape, MatchCharFromHexa, MatchCharFromUnicode, MatchCharRange, MatchCharValue, MatchDefaultEquMatch, MatchEmptyAltStmStElt, MatchEqu, MatchGrammar, MatchGrammarSymbolId, MatchGrammarSymbolString, MatchId, MatchIdAfterFirst, MatchInClassListChar, MatchInclude, MatchMClass, MatchMClassId, MatchNewLine, MatchNoTokenRulesGroup, MatchPrimaryStmGroup, MatchRule, MatchRules, MatchRulesCat, MatchRulesGroupList, MatchRulesGroupListCat, MatchRuleStm1, MatchRuleStm2, MatchRuleStmSt1, MatchRuleStmSt2, MatchString, MatchStringTokenRule, MatchStrList, MatchStrListChar, MatchTab, MatchTerminalChar, MatchTokenRule, MatchTokenRulesGroup

public interface IMatchMgr

match manager interface

Author:
luc peuvrier

Method Summary
 boolean confirmReduction(IParseSessionForMatchMgr parseSession, IParseNode[] parseNodes, int[] notWhiteIndexes)
          confirm or cancel reduction
 boolean immediateReduction()
           
 boolean needsToConfirmReduction()
           
 void reduceAction(IParseSessionForMatchMgr parseSession, IParseNode fatherParseNode, IParseNode[] parseNodes, int[] notWhiteIndexes)
          do the reduction action
 

Method Detail

needsToConfirmReduction

boolean needsToConfirmReduction()
Returns:
true if confirm reduction must be invoked

confirmReduction

boolean confirmReduction(IParseSessionForMatchMgr parseSession,
                         IParseNode[] parseNodes,
                         int[] notWhiteIndexes)
                         throws ParserException
confirm or cancel reduction

Parameters:
parseSession - share with all match manager
parseNodes - the sons parse node
notWhiteIndexes - indexes of not white space parse node
Returns:
true if confirm reduction, else false to cancel reduction
Throws:
ParserException

immediateReduction

boolean immediateReduction()
Returns:
true if must do immediate reduction

reduceAction

void reduceAction(IParseSessionForMatchMgr parseSession,
                  IParseNode fatherParseNode,
                  IParseNode[] parseNodes,
                  int[] notWhiteIndexes)
                  throws ParserException
do the reduction action

Parameters:
parseSession - share with all match manager
fatherParseNode - the father parse node, reduction parse node result
parseNodes - the sons parse node
notWhiteIndexes - indexes of not white space parse node, can be empty if all parses nodes are whitespace
Throws:
ParserException


Copyright © 2008-2009 Luc Peuvrier. All Rights Reserved.