2.5 KiB
2.5 KiB
GrammarRule
Namespace: LLama.Grammars
A single rule in a Grammar
public sealed class GrammarRule : System.IEquatable`1[[LLama.Grammars.GrammarRule, LLamaSharp, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null]]
Inheritance Object → GrammarRule
Implements IEquatable<GrammarRule>
Properties
Name
Name of this rule
public string Name { get; }
Property Value
Elements
The elements of this grammar rule
public IReadOnlyList<LLamaGrammarElement> Elements { get; }
Property Value
IReadOnlyList<LLamaGrammarElement>
Constructors
GrammarRule(String, IReadOnlyList<LLamaGrammarElement>)
Create a new GrammarRule containing the given elements
public GrammarRule(string name, IReadOnlyList<LLamaGrammarElement> elements)
Parameters
name
String
elements
IReadOnlyList<LLamaGrammarElement>
Exceptions
Methods
ToString()
public string ToString()
Returns
GetHashCode()
public int GetHashCode()
Returns
Equals(Object)
public bool Equals(object obj)
Parameters
obj
Object
Returns
Equals(GrammarRule)
public bool Equals(GrammarRule other)
Parameters
other
GrammarRule
Returns
<Clone>$()
public GrammarRule <Clone>$()