com.aptana.ide.lexer.matcher
Class OneOrMoreMatcher

java.lang.Object
  extended by com.aptana.xml.NodeBase
      extended by com.aptana.ide.lexer.matcher.model.MatcherElement
          extended by com.aptana.ide.lexer.matcher.AbstractTextMatcher
              extended by com.aptana.ide.lexer.matcher.OneOrMoreMatcher
All Implemented Interfaces:
ITextMatcher, IMatcherElement, INode, java.lang.Comparable

public class OneOrMoreMatcher
extends AbstractTextMatcher

Author:
Kevin Lindsey

Constructor Summary
OneOrMoreMatcher()
          OneOrMore
 
Method Summary
 void addChildTypes()
          addChildTypes
 void addFirstCharacters(MatcherMap map, ITextMatcher target)
          This functions the same as addFirstCharacter(MatcherMap); however, the matcher that will use this matcher's first character as a possible transition is specified in the target parameter.
 boolean canMatchNothing()
          Return a flag indicating if this matcher can return a positive match without consuming characters
protected  void createChildrenTokens(ITokenList tokenList)
          createChildrenTokens
 int match(char[] source, int offset, int eofOffset)
          Gets the ending position of the match starting at the offset.
 java.lang.String toString()
           
protected  void validateLocal()
          validateLocalAttributes
 
Methods inherited from class com.aptana.ide.lexer.matcher.AbstractTextMatcher
accept, accept, addFirstCharacters, addNameValueChangeListener, createToken, getExpressionRoot, getMatchedToken, getName, getNameValue, getToken, removeNameValueChangeListener, setMatchedToken, setName, setNameValue, setParent, setToken, wrapChildrenInAndElement
 
Methods inherited from class com.aptana.ide.lexer.matcher.model.MatcherElement
appendChild, createTokens, getCategory, getGroup, getSwitchTo, getType, getTypeDefinedInSubtree, setCategory, setGroup, setSwitchTo, setType, validate, validateChildren
 
Methods inherited from class com.aptana.xml.NodeBase
addChildType, appendText, compareTo, getChild, getChildCount, getColumnNumber, getDocument, getLineNumber, getParent, getText, removeChild, removeChildType, setColumnNumber, setLineNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.aptana.xml.INode
appendChild, appendText, getChild, getChildCount, getColumnNumber, getDocument, getLineNumber, getParent, getText, removeChild, setColumnNumber, setLineNumber
 

Constructor Detail

OneOrMoreMatcher

public OneOrMoreMatcher()
OneOrMore

Method Detail

addChildTypes

public void addChildTypes()
Description copied from class: AbstractTextMatcher
addChildTypes

Specified by:
addChildTypes in class AbstractTextMatcher
See Also:
AbstractTextMatcher.addChildTypes()

addFirstCharacters

public void addFirstCharacters(MatcherMap map,
                               ITextMatcher target)
Description copied from interface: ITextMatcher
This functions the same as addFirstCharacter(MatcherMap); however, the matcher that will use this matcher's first character as a possible transition is specified in the target parameter.

Specified by:
addFirstCharacters in interface ITextMatcher
Overrides:
addFirstCharacters in class AbstractTextMatcher
See Also:
AbstractTextMatcher.addFirstCharacters(com.aptana.ide.lexer.matcher.MatcherMap, com.aptana.ide.lexer.matcher.ITextMatcher)

canMatchNothing

public boolean canMatchNothing()
Description copied from interface: ITextMatcher
Return a flag indicating if this matcher can return a positive match without consuming characters

Specified by:
canMatchNothing in interface ITextMatcher
Overrides:
canMatchNothing in class AbstractTextMatcher
Returns:
boolean
See Also:
AbstractTextMatcher.canMatchNothing()

createChildrenTokens

protected void createChildrenTokens(ITokenList tokenList)
Description copied from class: MatcherElement
createChildrenTokens

Overrides:
createChildrenTokens in class MatcherElement
See Also:
MatcherElement.createChildrenTokens(com.aptana.ide.lexer.ITokenList)

match

public int match(char[] source,
                 int offset,
                 int eofOffset)
Description copied from interface: ITextMatcher
Gets the ending position of the match starting at the offset. Return -1 if no match occured.

Specified by:
match in interface ITextMatcher
Specified by:
match in class AbstractTextMatcher
Parameters:
source - character array to walk
offset - offset into array
eofOffset - end of file offset
Returns:
Returns the offset where the match ended or -1 if no match occurred
See Also:
AbstractTextMatcher.match(char[], int, int)

toString

public java.lang.String toString()
Overrides:
toString in class AbstractTextMatcher
See Also:
Object.toString()

validateLocal

protected void validateLocal()
Description copied from class: MatcherElement
validateLocalAttributes

Overrides:
validateLocal in class AbstractTextMatcher
See Also:
AbstractTextMatcher.validateLocal()