final class · System.Text

RegexNode

public final class RegexNode

A node of a parsed pattern. Kind: 0 the end of the pattern, 1 a literal unit, 2 a class (Table), 3 ., 4 a sequence, 5 alternatives, 6 a group's start, 7 its end, 8 a repeat, 9 the end of one iteration of a repeat, 10 ^, 11 $, 12 \b, 13 \B. Once the pattern is parsed, every node knows the node after it (Next), so matching walks fixed links and allocates nothing.

Tipo
final class
Espacio de nombres
System.Text
Ensamblado
System.Core
Acceso
public, final
Archivo fuente
Regex.ant

Herencia

Clases base
Any RegexNode

Constructores

new(i32 kind)
#

Campos

i32 Kind
#
u8 Literal
#
u8[] Table
#
List<RegexNode> Children
#
RegexNode Child
#
RegexNode Repeat
#
RegexNode Next
#
i32 Index
#
i32 Min
#
i32 Max
#
i32 Count
#
bool Lazy
#
bool Units
#

A repeat of one literal, class or .: matched by a loop over the units (no iterations).

Miembros heredados (5)

Código fuente

RegexNode en Antril, descompilado a partir de su Larva HIR.

System.Text.RegexNode.ant
// System.Text.RegexNode — System.Core (decompiled from Larva HIR)

import System;

into namespace System.Text
{
	/// A node of a parsed pattern. Kind: 0 the end of the pattern, 1 a literal unit, 2 a class (Table), 3 `.`, 4 a
	/// sequence, 5 alternatives, 6 a group's start, 7 its end, 8 a repeat, 9 the end of one iteration of a repeat, 10 `^`,
	/// 11 `$`, 12 `\b`, 13 `\B`. Once the pattern is parsed, every node knows the node after it (Next), so matching walks
	/// fixed links and allocates nothing.
	public final class RegexNode
	{
		public:
			i32 Kind;
			u8 Literal;
			u8[] Table;
			List<RegexNode> Children;
			RegexNode Child;
			RegexNode Repeat;
			RegexNode Next;
			i32 Index;
			i32 Min;
			i32 Max;
			i32 Count;
			bool Lazy;

			/// A repeat of one literal, class or `.`: matched by a loop over the units (no iterations).
			bool Units;

			new(i32 kind)
			{
				Kind = kind;
				Table = new u8[0];
				Children = new List<RegexNode>();
				Child = this;
				Repeat = this;
				Next = this;
				Max = -1;
			}
	}
}
Esc