Пример #1
0
 /// <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
 }
Пример #2
0
 /// <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));
 }
Пример #3
0
 /// <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));
 }
Пример #4
0
 /// <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)));
 }
Пример #5
0
 /// <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)));
 }