GXPARSE hosted by SourceForge.net Logo

ca.gorman.util.scan
Interface RuleList

All Known Implementing Classes:
AbstractRuleList

public interface RuleList

List of rules used by a Scanner to recognize and act on character sequences.

A list may be changed during the operation of a Scanner, but only one list can be active at any particular time. Every rule in the list is a candidate for matching data in the ScanBuffer. However, each string of data will be matched only once.

When more than one rule can match strings with the same starting point, the choice of rule is implementation-dependent. When the choice is not documented, the rule closest to the beginning of the list will be chosen, except when the rule matches a zero-length subsequence. Rules that match a a zero-length subsequence will not match again from the same RuleList until after another rule has matched at a subsequence containing at least one character.


Method Summary
 ScanRule get(int n)
           Get a rule from the list.
 int size()
           Get the number of rules in the list.
 

Method Detail

size

int size()

Get the number of rules in the list.


get

ScanRule get(int n)

Get a rule from the list.


GXPARSE download

GXPARSE Generic XML Stream Parser API and supporting tools.   Release $Name: gxparse-sf-alpha-2_0 $
Copyright 2003-2004 Ian E. Gorman
Released under GNU Lesser General Public License