Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/17/13 15:19:45 (11 years ago)
Author:
gkronber
Message:

#2026 worked on a plugin for grammars (work-in-progress)

Location:
branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces/IAttribute.cs

    r10031 r10051  
    2222namespace HeuristicLab.Grammars {
    2323  public enum AttributeType { In, Out, Ref };
    24   interface IAttribute {
     24  public interface IAttribute {
    2525    AttributeType AttributeType { get; }
    2626    string Type { get; }
  • branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces/IAttributedGrammar.cs

    r10031 r10051  
    2424namespace HeuristicLab.Grammars {
    2525  interface IAttributedGrammar : IGrammar {
    26     IEnumerable<IAttribute> GetAttributes(string symbol);
    27     void AddAttribute(string symbol, IAttribute attribute);
     26    ISymbol StartSymbol { get; set; }
     27    IEnumerable<ISymbol> TerminalSymbols { get; }
     28    IEnumerable<ISymbol> NonTerminalSymbols { get; }
     29    IEnumerable<ISymbol> Symbols { get; }
     30    bool IsTerminal(ISymbol symbol);
     31    bool IsNonTerminal(ISymbol symbol);
     32
     33    int NumberOfAlternatives(ISymbol ntSymbol);
     34    IEnumerable<Sequence> GetAlternatives(ISymbol ntSymbol);
     35    Sequence GetAlternative(ISymbol ntSymbol, int index);
     36
     37    void AddProductionRule(ISymbol ntSymbol, Sequence production);
    2838  }
    2939}
  • branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces/IGrammar.cs

    r10031 r10051  
    2323
    2424namespace HeuristicLab.Grammars {
    25   using Sequence = IEnumerable<string>;
    2625
    2726  public interface IGrammar {
    28     string StartSymbol { get; set; }
    29     IEnumerable<string> TerminalSymbols { get; }
    30     IEnumerable<string> NonTerminalSymbols { get; }
    31     IEnumerable<string> Symbols { get; }
     27    ISymbol StartSymbol { get; set; }
     28    IEnumerable<ISymbol> TerminalSymbols { get; }
     29    IEnumerable<ISymbol> NonTerminalSymbols { get; }
     30    IEnumerable<ISymbol> Symbols { get; }
     31    bool IsTerminal(ISymbol symbol);
     32    bool IsNonTerminal(ISymbol symbol);
    3233
    33     int NumberOfAlternatives(string ntSymbol);
    34     IEnumerable<Sequence> GetAlternatives(string ntSymbol);
    35     Sequence GetAlternative(string ntSymbol, int index);
     34    int NumberOfAlternatives(ISymbol ntSymbol);
     35    IEnumerable<Sequence> GetAlternatives(ISymbol ntSymbol);
     36    Sequence GetAlternative(ISymbol ntSymbol, int index);
    3637
    37     void AddProductionRule(string ntSymbol, Sequence production);
     38    void AddProductionRule(ISymbol ntSymbol, Sequence production);
    3839  }
    3940}
  • branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces/ISymbol.cs

    r10031 r10051  
    2020#endregion
    2121
    22 /*
    2322namespace HeuristicLab.Grammars {
    24   interface ISymbol {
     23  public interface ISymbol {
    2524    string Name { get; }
    26     bool IsTerminal { get; }
     25    IAttribute Attribute { get; }
    2726  }
    2827}
    29 */
Note: See TracChangeset for help on using the changeset viewer.