net.sf.parser4j.parser.entity.parsestate
Class SyntaxParseState

java.lang.Object
  extended by net.sf.parser4j.parser.entity.parsestate.AbstractParseState
      extended by net.sf.parser4j.parser.entity.parsestate.SyntaxParseState
All Implemented Interfaces:
java.lang.Iterable<ParseStack>, IParseState

public class SyntaxParseState
extends AbstractParseState

specialization for syntax analysis: token recognition management

Author:
luc peuvrier

Field Summary
 
Fields inherited from class net.sf.parser4j.parser.entity.parsestate.AbstractParseState
_log, acceptAmbiguity, maxNumberOfAlternative, parseStackSet, stringTokenRecognition, tokenRecognition
 
Constructor Summary
SyntaxParseState(boolean acceptAmbiguity, int maxNumberOfAlternative, boolean[] tokenRecognition, boolean[] stringTokenRecognition, ParsingToStringUtil parsingToStringUtil)
           
 
Method Summary
 boolean add(ParseStack parseStack)
           
 void clearStringTokenRecognition()
           
 boolean hasStringTokenRecognition()
           
 boolean hasTokenRecognition()
           
 java.util.List<ParseStack> poolTokenRecognitionParseStackList()
           
 
Methods inherited from class net.sf.parser4j.parser.entity.parsestate.AbstractParseState
clear, getMatchParseNode, getParseNodeList, hasAlternativeForAmbiguity, isEmpty, iterator, remove, size, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyntaxParseState

public SyntaxParseState(boolean acceptAmbiguity,
                        int maxNumberOfAlternative,
                        boolean[] tokenRecognition,
                        boolean[] stringTokenRecognition,
                        ParsingToStringUtil parsingToStringUtil)
Method Detail

add

public boolean add(ParseStack parseStack)
            throws ParserException,
                   HasAmbiguityParserException
Specified by:
add in interface IParseState
Overrides:
add in class AbstractParseState
Returns:
true if added, else it is an alternative to existing ( ambiguous)
Throws:
ParserException
HasAmbiguityParserException - reject ambiguity

hasTokenRecognition

public boolean hasTokenRecognition()

hasStringTokenRecognition

public boolean hasStringTokenRecognition()

poolTokenRecognitionParseStackList

public java.util.List<ParseStack> poolTokenRecognitionParseStackList()

clearStringTokenRecognition

public void clearStringTokenRecognition()


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