Package com.singularsys.jep.configurableparser.matchers
package com.singularsys.jep.configurableparser.matchers
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 /* ... */ commentCommentTokenMatcher.multiLineSlashStarCommentMatcher()
matches a multi-line line java style /* ... */ comment
- Whitespace
defaultWhiteSpaceTokenMatcher()
matches standard whitespace 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.basicIdentifierMatcher()
java-style names.IdentifierTokenMatcher.dottedIdentifierMatcher()
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.
-
ClassDescriptionMatches syntax for array element access a[3].A GrammarMatcher which matches lists of items with the syntax or a simple list
[1,2,3,4]
.Matches various styles of comments.A GrammarMatcher which matches functions in the form 'atan2(y,x)'.A GrammarMatcher which matches functions in the formatan2(seq)
whereseq
is a sequence of terms.Signals grammatical errors.Interface defining matchers for custom grammatical elements.Matches hexadecimal numbers, in the format 0xff.Matches identifiers: variables or function names.A GrammarMatcher which matches lists of items.A GrammarMatcher which matches overloaded lists of items or brackets.Matches tokens which span multiple lines of the input.Matches numbers.TokenMatcher for matching operators from the operator set.An abstract TokenMatcher which uses RegExp patterns to match patterns.A GrammarMatcher which matches bracketed expressions.A matcher for functions like "sin 30" without brackets and a single simple argument.Base class for matching quoted strings.Base class for matching quoted strings.Matches a fixed set of symbols, each represented by a SymbolToken.A token matcher which matches the end of an expressionSub-interface of TokenMatcher which allows tokens to be created without matching input text.Interface defining classes which match tokensA case-insensitive operator token matcher.Matches whitespace.