30 references to Production
CSharpSyntaxGenerator (30)
Grammar\GrammarGenerator.cs (30)
24var rules = types.ToDictionary(n => n.Name, _ => new List<Production>()); 114foreach (var production in sorted) 122private static void AddLexicalRules(Dictionary<string, List<Production>> rules) 264IEnumerable<Production> productionRange(char start, char end) 270IEnumerable<Production> repeat(Production production, int count) 273IEnumerable<Production> anyCasing(string value) 299private static List<Production> JoinWords(IEnumerable<string> strings) 305private static Production Text(string value) 308private static Production Join(IEnumerable<Production> productions, string delim) 311private static Production ToProduction(TreeTypeChild child) 320private static Production Choice(IEnumerable<Production> productions, bool parenthesize = true) 323private static Production Sequence(IEnumerable<Production> productions) 326private static Production HandleField(Field field) 335private static Production HandleSeparatedList(Field field, string elementType) 341private static Production HandleList(Field field, string elementType) 348private static Production HandleTokenField(Field field) 353private static Production HandleTokenName(string tokenName) 365private static Production RuleReference(string name) 377string text, IEnumerable<string> referencedRules = null) : IComparable<Production> 383public int CompareTo(Production other) => StringComparer.OrdinalIgnoreCase.Compare(this.Text, other.Text); 384public Production Prefix(string prefix) => new(prefix + this, ReferencedRules); 385public Production Suffix(string suffix, bool when = true) => when ? new(this + suffix, ReferencedRules) : this; 386public Production Parenthesize(bool when = true) => when ? Prefix("(").Suffix(")") : this; 387public Production Optional => Suffix("?"); 388public Production ZeroOrMany => Suffix("*"); 389public Production OneOrMany => Suffix("+");