Table of Contents

Class RuleRef

Namespace
Utils.Parser.Model
Assembly
Utils.Parser.dll

A reference to another rule, either lexer or parser depending on context. Optionally carries a label (x=child or xs+=child) and raw call-site argument text preserved from callee[...] syntax. Labels and raw arguments are metadata only: they are not evaluated, not bound automatically, and do not populate invocation-frame parameters.

public record RuleRef : RuleContent, IEquatable<RuleContent>, IEquatable<RuleRef>
Inheritance
RuleRef
Implements
Inherited Members
Extension Methods

Constructors

RuleRef(string, RuleLabel?, string?)

A reference to another rule, either lexer or parser depending on context. Optionally carries a label (x=child or xs+=child) and raw call-site argument text preserved from callee[...] syntax. Labels and raw arguments are metadata only: they are not evaluated, not bound automatically, and do not populate invocation-frame parameters.

public RuleRef(string RuleName, RuleLabel? Label = null, string? RawArguments = null)

Parameters

RuleName string
Label RuleLabel
RawArguments string

Properties

Label

public RuleLabel? Label { get; init; }

Property Value

RuleLabel

LabelKind

Gets the label kind derived from the optional Label. Returns None when the reference is unlabeled. Metadata only: no ANTLR-compatible label access is implemented.

public ParserRuleReferenceLabelKind LabelKind { get; }

Property Value

ParserRuleReferenceLabelKind

LabelName

Gets the label name from the optional Label, or null when unlabeled. Metadata only: no implicit variable, typed field, or automatic binding is generated.

public string? LabelName { get; }

Property Value

string

RawArguments

public string? RawArguments { get; init; }

Property Value

string

RuleName

public string RuleName { get; init; }

Property Value

string