com.bbn.swede.editor.rules
Class NestedConstructRule

java.lang.Object
  extended byMultiLineRule
      extended bycom.bbn.swede.editor.rules.NestedConstructRule

public class NestedConstructRule
extends MultiLineRule

A pattern-based multiple line rule that will ignore nested subsequences matching a secondary pattern.

Author:
jlerner
See Also:
Serialized Form

Constructor Summary
NestedConstructRule(String sStartSequence, String sEndSequence, IToken token, String sStartIgnoreSequence, String sEndIgnoreSequence)
          Creates a new NestedConstructRule based on specified patterns.
 
Method Summary
 IToken evaluate(ICharacterScanner scanner)
           
 IToken evaluate(ICharacterScanner scanner, boolean resume)
           
protected  boolean findEndSequence(ICharacterScanner scanner)
          Locates the end of the rule's pattern by examining the characters in the provided scanner.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NestedConstructRule

public NestedConstructRule(String sStartSequence,
                           String sEndSequence,
                           IToken token,
                           String sStartIgnoreSequence,
                           String sEndIgnoreSequence)
Creates a new NestedConstructRule based on specified patterns.

Parameters:
sStartSequence - Start sequence for MultiLineRule
sEndSequence - End sequence for MultieLineRule
token - Success token
sStartIgnoreSequence - Starting sequence for the subsequence to be ignored
sEndIgnoreSequence - Ending sequence for the subsequence to be ignored
Method Detail

findEndSequence

protected boolean findEndSequence(ICharacterScanner scanner)
Locates the end of the rule's pattern by examining the characters in the provided scanner.

Parameters:
scanner - The scanner being used by this rule
Returns:
true if pattern end is found, false if not

evaluate

public IToken evaluate(ICharacterScanner scanner,
                       boolean resume)

evaluate

public IToken evaluate(ICharacterScanner scanner)


Copyright © 2004-2005 BBN Technologies. All Rights Reserved.