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