6 instantiations of Rule
System.Speech (6)
Internal\SrgsCompiler\BackEnd.cs (2)
297
Rule rule =
new
(this, name, _symbols.Add(name, out idString), attributes, _ruleIndex, 0, _grammarOptions & GrammarOptions.TagFormat, ref cImportedRule);
1101
Rule rule =
new
(this, ruleName, cfgRule, i + previousCfgLastRules, _grammarOptions & GrammarOptions.TagFormat, ref _cImportedRules);
Internal\SrgsCompiler\CFGGrammar.cs (3)
548
internal static readonly Rule SPRULETRANS_TEXTBUFFER =
new
(-1);
550
internal static readonly Rule SPRULETRANS_WILDCARD =
new
(-2);
552
internal static readonly Rule SPRULETRANS_DICTATION =
new
(-3);
Internal\SrgsCompiler\Rule.cs (1)
127
Rule rule =
new
(_iSerialize);
81 references to Rule
System.Speech (81)
Internal\SrgsCompiler\Arc.cs (6)
56
internal Arc(string? sWord,
Rule
? ruleRef, StringBlob words, float flWeight, int confidence,
Rule
? specialRule, MatchMode matchMode, ref bool fNeedWeightTable)
61
private Arc(string? sWord,
Rule
? ruleRef, StringBlob words, float flWeight, int confidence,
Rule
? specialRule, uint iSerialize, MatchMode matchMode, ref bool fNeedWeightTable)
657
internal
Rule
? RuleRef
806
private
Rule
? _ruleRef;
Internal\SrgsCompiler\BackEnd.cs (36)
111
foreach (
Rule
rule in _rules)
210
foreach (
Rule
orgRule in org._rules)
220
internal State CreateNewState(
Rule
rule)
257
internal
Rule
CreateRule(string name, SPCFGRULEATTRIBUTES attributes)
284
foreach (
Rule
r in _rules)
297
Rule
rule = new(this, name, _symbols.Add(name, out idString), attributes, _ruleIndex, 0, _grammarOptions & GrammarOptions.TagFormat, ref cImportedRule);
333
internal
Rule
? FindRule(string sRule)
335
Rule
? rule = null;
348
rule = dwSymbolOffset > 0 && _nameOffsetRules.TryGetValue(dwSymbolOffset, out
Rule
? value) ? value : null;
398
internal Arc RuleTransition(
Rule
rule,
Rule
? parentRule, float flWeight)
400
Rule
? ruleToTransitionTo = null;
407
Rule
? specialRuleTrans = null;
526
internal void CloneSubGraph(
Rule
rule, Backend org, Backend extra, Dictionary<State, State> srcToDestHash, bool fromOrg)
584
Rule
? ruleExtra = extra.FindInRules(ruleName);
597
Rule
? ruleOrg = org.FindInRules(ruleName);
608
Rule
? ruleExtra = org.FindInRules(ruleName);
614
Rule
? refRule = FindInRules(ruleName);
680
internal void SetRuleAttributes(
Rule
rule, SPCFGRULEATTRIBUTES dwAttributes)
815
SortedDictionary<int,
Rule
> ruleFirstArcs = new();
832
SortedDictionary<int,
Rule
>.Enumerator ieFirstArcs = ruleFirstArcs.GetEnumerator();
837
KeyValuePair<int,
Rule
> kvFirstArc = ieFirstArcs.Current;
838
Rule
ruleCur = kvFirstArc.Value;
906
Rule
ruleToTransitionTo = _rules[(int)arc.TransitionIndex];
1089
private CfgGrammar.CfgHeader BuildRulesFromBinaryGrammar(CfgGrammar.CfgHeader header, State?[] apStateTable, SortedDictionary<int,
Rule
> ruleFirstArcs, int previousCfgLastRules)
1101
Rule
rule = new(this, ruleName, cfgRule, i + previousCfgLastRules, _grammarOptions & GrammarOptions.TagFormat, ref _cImportedRules);
1146
private
Rule
CloneState(State srcToState, List<State> CloneStack, Dictionary<State, State> srcToDestHash)
1151
Rule
? dstRule = FindInRules(ruleName);
1177
private
Rule
? FindInRules(string ruleName)
1179
foreach (
Rule
rule in _rules)
1218
foreach (
Rule
rule in _rules)
1231
foreach (
Rule
rule in _rules)
1242
foreach (
Rule
rule in _rules)
1361
private List<
Rule
> _rules = new();
1365
private Dictionary<int,
Rule
> _nameOffsetRules = new();
1367
private
Rule
? _rootRule;
Internal\SrgsCompiler\CFGGrammar.cs (3)
548
internal static readonly
Rule
SPRULETRANS_TEXTBUFFER = new(-1);
550
internal static readonly
Rule
SPRULETRANS_WILDCARD = new(-2);
552
internal static readonly
Rule
SPRULETRANS_DICTATION = new(-3);
Internal\SrgsCompiler\CustomGrammar.cs (3)
87
foreach (
Rule
rule in cg._rules)
110
foreach (
Rule
rule in _rules)
144
internal List<
Rule
> _rules = new();
Internal\SrgsCompiler\GrammarElement.cs (7)
69
Rule
rule = GetRule(id, dwRuleAttributes);
90
Rule
rule = _undefRules[0];
104
foreach (
Rule
rule in _cg._rules)
197
internal List<
Rule
> UndefRules
317
private
Rule
GetRule(string sRuleId, SPCFGRULEATTRIBUTES dwAttributes)
322
Rule
? rule = _backend.FindRule(sRuleId);
361
private List<
Rule
> _undefRules = new();
Internal\SrgsCompiler\Graph.cs (1)
69
internal State CreateNewState(
Rule
rule)
Internal\SrgsCompiler\Item.cs (1)
12
internal Item(Backend backend,
Rule
rule, int minRepeat, int maxRepeat, float repeatProbability, float weight)
Internal\SrgsCompiler\OneOf.cs (1)
19
public OneOf(
Rule
rule, Backend backend)
Internal\SrgsCompiler\ParseElement.cs (2)
38
internal ParseElement(
Rule
rule)
50
internal
Rule
_rule;
Internal\SrgsCompiler\ParseElementCollection.cs (1)
14
protected ParseElementCollection(Backend backend,
Rule
rule)
Internal\SrgsCompiler\Rule.cs (8)
14
internal sealed class Rule : ParseElementCollection, IRule, IComparable<
Rule
>
56
int IComparable<
Rule
>.CompareTo(
Rule
? rule2)
63
Rule
rule1 = this;
115
foreach (
Rule
rule in _listRules)
125
internal
Rule
Clone(StringBlob symbol, string ruleName)
127
Rule
rule = new(_iSerialize);
288
internal List<
Rule
> _listRules = new();
Internal\SrgsCompiler\RuleRef.cs (6)
31
internal RuleRef(ParseElementCollection parent, Backend backend, Uri uri, List<
Rule
> undefRules, string? semanticKey, string? initParameters)
36
Rule
? ruleRef = null;
97
Rule
? rule = null;
141
private static
Rule
GetRuleRef(Backend backend, string sRuleId, List<
Rule
> undefRules)
146
Rule
? rule = backend.FindRule(sRuleId);
Internal\SrgsCompiler\SrgsElementCompilerFactory.cs (2)
57
return new Item(_backend, (
Rule
)rule, minRepeat, maxRepeat, repeatProbability, weight);
77
return new OneOf((
Rule
)rule, _backend);
Internal\SrgsCompiler\State.cs (4)
23
internal State(
Rule
rule, uint hState, int iSerialize)
30
internal State(
Rule
rule, uint hState)
337
internal
Rule
Rule
487
private
Rule
_rule;