Package com.singularsys.jep.configurableparser.matchers

# Interface TokenMatcher

All Superinterfaces:
  `Serializable`

All Known Subinterfaces:
  `TokenBuilder`

All Known Implementing Classes:
  `BugsTest.CommaNumberTokenMatcher`, `BugsTest.NumberWithUnitTokenMatcher`, `CaseInsensitiveIdentifierTokenManager`, `CommentTokenMatcher`, `HexNumberTokenMatcher`, `IdentifierTokenMatcher`, `MultiLineMatcher`, `MultiLineToken`, `NumberTokenMatcher`, `OperatorTokenMatcher`, `RegExpTokenMatcher`, `StringTokenMatcher`, `StringTokenMatcher2`, `SymbolTokenMatcher`, `TerminatorTokenMatcher`, `UpperCaseOperatorTokenMatcher`, `WhiteSpaceTokenMatcher`

public interface TokenMatcher extends Serializable
Interface defining classes which match tokens

Author:
  Richard Morris
See Also:
  - `Token`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `init(Jep jep)`
  Initialize the matcher when the Jep instance is known.
  `Token`
  `match(String s)`
  Attempts to match the start of the string.

- ## Method Details

  - ### match

    Token match(String s) throws ParseException
    Attempts to match the start of the string. Note new objects should be created each time as error reporting information is later attached to tokens.
    Parameters:
      `s` - the string to match against
    Returns:
      if successful returns the corresponding token, return null if failed to match
    Throws:
      `ParseException` - on syntax error

  - ### init

    void init(Jep jep)
    Initialize the matcher when the Jep instance is known.
    Parameters:
      `jep` - Jep instance