com.singularsys.jep.configurableparser.matchers

## Class IdentifierTokenMatcher

- java.lang.Object
- - com.singularsys.jep.configurableparser.matchers.RegExpTokenMatcher
  - - com.singularsys.jep.configurableparser.matchers.IdentifierTokenMatcher

- All Implemented Interfaces:
    TokenBuilder, TokenMatcher, java.io.Serializable

      public class IdentifierTokenMatcher
      extends RegExpTokenMatcher

  Matches identifiers: variables or function names.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IdentifierTokenMatcher(java.util.regex.Pattern pattern)`
    `IdentifierTokenMatcher(java.lang.String regex)` Construct and identifier matcher.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static IdentifierTokenMatcher` | `basicIdentifierMatcher()` Matches identifiers which start with a letter or underscore and are followed by 0 or more letters digits or underscores.
    `static IdentifierTokenMatcher` | `basicIndetifierMatcher()` Deprecated. replace by corectly spelt version.
    `Token` | `buildToken(java.lang.String s)` Create the token, if the name matches a function name return a FunctionToken otherwise return an IdentifierToken.
    `static IdentifierTokenMatcher` | `dottedIdentifierMatcher()` Matches identifiers which start with a letter or underscore and are followed by 0 or more letters digits or underscores or . characters.
    `static IdentifierTokenMatcher` | `dottedIndetifierMatcher()` Deprecated. replace by corectly spelt version.
    `void` | `init(Jep j)` Initialize the matcher when the Jep instance is known.

    - ### Methods inherited from class com.singularsys.jep.configurableparser.matchers.RegExpTokenMatcher

      `match`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### IdentifierTokenMatcher

          public IdentifierTokenMatcher(java.util.regex.Pattern pattern)

    - #### IdentifierTokenMatcher

          public IdentifierTokenMatcher(java.lang.String regex)

      Construct and identifier matcher.
      Parameters:
        `regex` - a regular expression specifying the allowed identifier names.
      See Also:
        `Pattern`

  - ### Method Detail

    - #### buildToken

          public Token buildToken(java.lang.String s)

      Create the token, if the name matches a function name return a FunctionToken otherwise return an IdentifierToken.
      Specified by:
        `buildToken` in interface `TokenBuilder`
      Specified by:
        `buildToken` in class `RegExpTokenMatcher`
      Parameters:
        `s` - String representing the completed matched token
      Returns:
        the appropriate type of token.

    - #### basicIndetifierMatcher

          @Deprecated
          public static IdentifierTokenMatcher basicIndetifierMatcher()

      Deprecated. replace by corectly spelt version.
      Matches identifiers which start with a letter or underscore and are followed by 0 or more letters digits or underscores.

    - #### dottedIndetifierMatcher

          @Deprecated
          public static IdentifierTokenMatcher dottedIndetifierMatcher()

      Deprecated. replace by corectly spelt version.
      Matches identifiers which start with a letter or underscore and are followed by 0 or more letters digits or underscores or . characters.

    - #### basicIdentifierMatcher

          public static IdentifierTokenMatcher basicIdentifierMatcher()

      Matches identifiers which start with a letter or underscore and are followed by 0 or more letters digits or underscores. Correctly spelt version
      Since:
        3.5

    - #### dottedIdentifierMatcher

          public static IdentifierTokenMatcher dottedIdentifierMatcher()

      Matches identifiers which start with a letter or underscore and are followed by 0 or more letters digits or underscores or . characters. Correctly spelt version
      Since:
        3.5

    - #### init

          public void init(Jep j)

      Description copied from interface: `TokenMatcher`
      Initialize the matcher when the Jep instance is known.
      Parameters:
        `j` - Jep instance

Copyright © 2018 Singular Systems http://www.singularsys.com/jep