/// <summary> /// Adds a group and an alias for all operator symbols used in the grammar. /// </summary> /// <param name="alias">An alias for operator symbols.</param> protected void AddOperatorReportGroup(string alias) { TermReportGroups.Add(new TermReportGroup(alias, TermReportGroupType.Operator, null)); //operators will be filled later }
/// <summary> /// Adds symbols to a group with no-report type, so symbols will not be shown in expected lists in syntax error messages. /// </summary> /// <param name="terminals">Symbols to exclude.</param> protected void AddToNoReportGroup(params Terminal[] terminals) { TermReportGroups.Add(new TermReportGroup(string.Empty, TermReportGroupType.DoNotReport, terminals)); }
/// <summary> /// Creates a terminal reporting group, so all terminals in the group will be reported as a single "alias" in syntex error messages like /// "Syntax error, expected: [list of terms]" /// </summary> /// <param name="alias">An alias for all terminals in the group.</param> /// <param name="terminals">Terminals to be included into the group.</param> protected void AddTermsReportGroup(string alias, params Terminal[] terminals) { TermReportGroups.Add(new TermReportGroup(alias, TermReportGroupType.Normal, terminals)); }
/// <summary> /// Adds symbols to a group with no-report type, so symbols will not be shown in expected lists in syntax error messages. /// </summary> /// <param name="symbols">Symbols to exclude.</param> protected void AddToNoReportGroup(params string[] symbols) { TermReportGroups.Add(new TermReportGroup(string.Empty, TermReportGroupType.DoNotReport, SymbolsToTerms(symbols))); }
/// <summary> /// Creates a terminal reporting group, so all terminals in the group will be reported as a single "alias" in syntex error messages like /// "Syntax error, expected: [list of terms]" /// </summary> /// <param name="alias">An alias for all terminals in the group.</param> /// <param name="symbols">Symbols to be included into the group.</param> protected void AddTermsReportGroup(string alias, params string[] symbols) { TermReportGroups.Add(new TermReportGroup(alias, TermReportGroupType.Normal, SymbolsToTerms(symbols))); }