C# Класс Loyc.LLParserGenerator.Rule

Represents an LLLPG rule, which is a Predicate plus a Name and optional attributes (e.g. token, private, etc.).
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Basis LNode
EndOfRule EndOfRule
FullLLk bool?
IsExternal bool
IsPrivate bool?
IsRecognizer bool
IsToken bool
K int
Name Symbol
Pred Pred
ReturnType LNode
TryWrapperName LNode
_recognizer Rule

Открытые методы

Метод Описание
CreateMethod ( VList methodBody ) : LNode

Creates the default method definition to wrap around the body of the rule, which has already been generated. Returns Basis with the specified new method body. If Basis is null, a simple default method signature is used, e.g. public void R() {...} where R is the rule name.

GetMethodSignature ( ) : LNode

Returns Basis if it's a method signature; otherwise constructs a default signature.

MakeRecognizerVersion ( ) : Rule
MakeRecognizerVersion ( LNode prototype ) : Rule
MakeRecognizerVersion ( Symbol newName ) : Rule
Rule ( LNode basis, Symbol name, Pred pred, bool isStartingRule = true ) : System
ToString ( ) : string
TryWrapperNeeded ( ) : void
operator ( ) : Alts
operator ( ) : Pred

Приватные методы

Метод Описание
MakeRecognizerVersion ( LNode prototype, Symbol newName ) : Rule

Описание методов

CreateMethod() публичный Метод

Creates the default method definition to wrap around the body of the rule, which has already been generated. Returns Basis with the specified new method body. If Basis is null, a simple default method signature is used, e.g. public void R() {...} where R is the rule name.
public CreateMethod ( VList methodBody ) : LNode
methodBody VList The parsing code that was generated for this rule.
Результат LNode

GetMethodSignature() публичный Метод

Returns Basis if it's a method signature; otherwise constructs a default signature.
public GetMethodSignature ( ) : LNode
Результат LNode

MakeRecognizerVersion() публичный Метод

public MakeRecognizerVersion ( ) : Rule
Результат Rule

MakeRecognizerVersion() публичный Метод

public MakeRecognizerVersion ( LNode prototype ) : Rule
prototype LNode
Результат Rule

MakeRecognizerVersion() публичный Метод

public MakeRecognizerVersion ( Symbol newName ) : Rule
newName Symbol
Результат Rule

Rule() публичный Метод

public Rule ( LNode basis, Symbol name, Pred pred, bool isStartingRule = true ) : System
basis LNode
name Symbol
pred Pred
isStartingRule bool
Результат System

ToString() публичный Метод

public ToString ( ) : string
Результат string

TryWrapperNeeded() публичный Метод

public TryWrapperNeeded ( ) : void
Результат void

operator() публичный статический Метод

public static operator ( ) : Alts
Результат Alts

operator() публичный статический Метод

public static operator ( ) : Pred
Результат Pred

Описание свойств

Basis публичное свойство

A node that contains the original code of the rule, or, if the rule was created programmatically, the method prototype (e.g. #fn(int, Rule, #(#var(int, arg))), which means int Rule(int arg)). This can be null, in which case the default prototype is void Rule();, or if the rule is a starting rule or token, public void Rule();.
The Basis is also used to provide an error location.
public LNode Basis
Результат LNode

EndOfRule публичное свойство

public EndOfRule EndOfRule
Результат EndOfRule

FullLLk публичное свойство

public bool? FullLLk
Результат bool?

IsExternal публичное свойство

public bool IsExternal
Результат bool

IsPrivate публичное свойство

public bool? IsPrivate
Результат bool?

IsRecognizer публичное свойство

public bool IsRecognizer
Результат bool

IsToken публичное свойство

public bool IsToken
Результат bool

K публичное свойство

public int K
Результат int

Name публичное свойство

public Symbol Name
Результат Symbol

Pred публичное свойство

public Pred Pred
Результат Pred

ReturnType публичное свойство

public LNode ReturnType
Результат LNode

TryWrapperName публичное свойство

public LNode TryWrapperName
Результат LNode

_recognizer публичное свойство

public Rule,Loyc.LLParserGenerator _recognizer
Результат Rule