# Package com.singularsys.jep.configurableparser.matchers

This package contains matchers for tokens and grammar elements.

See: Description

- Interface Summary
  Interface | Description
  --- | ---
  GrammarMatcher | Interface defining matchers for custom grammatical elements.
  TokenBuilder | Sub-interface of TokenMatcher which allows tokens to be created without matching input text.
  TokenMatcher | Interface defining classes which match tokens

- Class Summary
  Class | Description
  --- | ---
  ArrayAccessGrammarMatcher | Matches syntax for array element access a[3].
  CommentTokenMatcher | Matches various styles of comments.
  FunctionGrammarMatcher | A GrammarMatcher which matches functions in the form 'atan2(y,x)'.
  HexNumberTokenMatcher | Matches hexadecimal numbers, in the format 0xff.
  IdentifierTokenMatcher | Matches identifiers: variables or function names.
  ListGrammarMatcher | A GrammarMatcher which matches lists of items.
  ListOrBracketGrammarMatcher | A GrammarMatcher which matches overloaded lists of items or brackets.
  MultiLineMatcher | Matches tokens which span multiple lines of the input.
  NumberTokenMatcher | Matches numbers.
  OperatorTokenMatcher | TokenMatcher for matching operators from the operator set.
  RegExpTokenMatcher | An abstract TokenMatcher which uses RegExp patterns to match patterns.
  RoundBracketGrammarMatcher | A GrammarMatcher which matches bracketed expressions.
  SingleArgFunctionMatcher | A matcher for functions like "sin 30" without brackets and a single simple argument.
  StringTokenMatcher | Base class for matching quoted strings.
  StringTokenMatcher2 | Base class for matching quoted strings.
  SymbolTokenMatcher | Matches a fixed set of symbols, each represented by a SymbolToken.
  TerminatorTokenMatcher | A token matcher which matches the end of an expression
  UpperCaseOperatorTokenMatcher | A case insensitive operator token matcher.
  WhiteSpaceTokenMatcher | Matches whitespace.

- Exception Summary
  Exception | Description
  --- | ---
  GrammarException | Signals grammatical errors.

## Package com.singularsys.jep.configurableparser.matchers Description

This package contains matchers for tokens and grammar elements.

### TokenMatchers

The following classes implement the `TokenMatcher` interface and are responsible for matching various elements in the input .

Comments
  `CommentTokenMatcher` contains static factory methods for matching various styles of comments.
  - `CommentTokenMatcher.hashCommentMatcher()` match single line comments starting #
  - `CommentTokenMatcher.slashSlashCommentMatcher()` match single line comments starting //
  - `CommentTokenMatcher.slashStarCommentMatcher()` matches a single line java style /* ...*/ comment
  - `CommentTokenMatcher.multiLineSlashStarCommentMatcher()` matches a multi-line line java style /* ...*/ comment
Whitespace
  `WhiteSpaceTokenMatcher.defaultWhiteSpaceTokenMatcher()` matches standard white space characters.
Strings
  `StringTokenMatcher` contains static factory methods for matching single and double quoted string.
  - `StringTokenMatcher.doubleQuoteStringMatcher()` matches double quoted strings " ... "
  - `StringTokenMatcher.singleQuoteStringMatcher()` matches single quoted strings ' ... '
Numbers
  `NumberTokenMatcher` contains static factory methods for matching single and double quoted string.
  - `NumberTokenMatcher.defaultNumberTokenMatcher()` matches decimal numbers 123.456 without an exponent.
  - `NumberTokenMatcher.exponentNumberTokenMatcher()` matches decimal numbers 1.23456e2 with or without an exponent.
Identifiers
  `IdentifierTokenMatcher` is the basic class for matching variable and function names. Static factory methods are provided to match specific type of input.
  - `IdentifierTokenMatcher.basicIndetifierMatcher()` java-style names.
  - `IdentifierTokenMatcher.dottedIndetifierMatcher()` java-style names containing dots.
Operators
  `OperatorTokenMatcher` a token matcher which matches operators specified in the OperatorTable.
Symbols
  `SymbolTokenMatcher` matches other symbols used by the parser.

See Also:
  `Token`, `Tokenizer`

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