CodeQL library for Java
codeql/java-all 0.3.2 (changelog, source)
Search

Module RegexTreeView

Provides a class hierarchy corresponding to a parse tree of regular expressions.

Import path

import semmle.code.java.regex.RegexTreeView

Predicates

getParsedRegExp

Gets the parse tree resulting from parsing re, if such has been constructed.

Classes

InfiniteRepetitionQuantifier

A regular expression term that permits unlimited repetitions.

RegExpAlt

An alternative term, that is, a term of the form a|b.

RegExpBackRef

A back reference, that is, a term of the form \i or \k<name> in a regular expression.

RegExpCaret

A caret assertion ^ matching the beginning of a line.

RegExpCharacterClass

A character class in a regular expression.

RegExpCharacterClassEscape

A character class escape in a regular expression. That is, an escaped character that denotes multiple characters.

RegExpCharacterRange

A character range in a character class in a regular expression.

RegExpConstant

A constant regular expression term, that is, a regular expression term matching a single string. This can be a single character or a quoted sequence.

RegExpDollar

A dollar assertion $ matching the end of a line.

RegExpDot

A dot regular expression.

RegExpEscape

An escaped regular expression term, that is, a regular expression term starting with a backslash, which is not a backreference.

RegExpGroup

A grouped regular expression.

RegExpLiteral

A string literal used as a regular expression.

RegExpLookahead

A zero-width lookahead assertion.

RegExpLookbehind

A zero-width lookbehind assertion.

RegExpNamedProperty

A named character class in a regular expression.

RegExpNegativeLookahead

A negative-lookahead assertion.

RegExpNegativeLookbehind

A negative-lookbehind assertion.

RegExpNormalChar

A normal character in a regular expression, that is, a character without special meaning. This includes escaped characters. It also includes escape sequences that represent character classes.

RegExpOpt

An optional term.

RegExpParent

An element containing a regular expression term, that is, either a string literal (parsed as a regular expression; the root of the parse tree) or another regular expression term (a decendent of the root).

RegExpPlus

A plus-quantified term.

RegExpPositiveLookahead

A positive-lookahead assertion.

RegExpPositiveLookbehind

A positive-lookbehind assertion.

RegExpQuantifier

A quantified regular expression term.

RegExpQuote

A quoted sequence.

RegExpRange

A range-quantified term

RegExpSequence

A sequence term.

RegExpSpecialChar

A special character in a regular expression.

RegExpStar

A star-quantified term.

RegExpSubPattern

A zero-width lookahead or lookbehind assertion.

RegExpTerm

A regular expression term, that is, a syntactic part of a regular expression. These are the tree nodes that form the parse tree of a regular expression literal.

RegExpZeroWidthMatch

A zero-width match, that is, either an empty group or an assertion.