- Timestamp:
- 10/17/13 15:19:45 (11 years ago)
- 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 22 22 namespace HeuristicLab.Grammars { 23 23 public enum AttributeType { In, Out, Ref }; 24 interface IAttribute {24 public interface IAttribute { 25 25 AttributeType AttributeType { get; } 26 26 string Type { get; } -
branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces/IAttributedGrammar.cs
r10031 r10051 24 24 namespace HeuristicLab.Grammars { 25 25 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); 28 38 } 29 39 } -
branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces/IGrammar.cs
r10031 r10051 23 23 24 24 namespace HeuristicLab.Grammars { 25 using Sequence = IEnumerable<string>;26 25 27 26 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); 32 33 33 int NumberOfAlternatives( stringntSymbol);34 IEnumerable<Sequence> GetAlternatives( stringntSymbol);35 Sequence GetAlternative( stringntSymbol, int index);34 int NumberOfAlternatives(ISymbol ntSymbol); 35 IEnumerable<Sequence> GetAlternatives(ISymbol ntSymbol); 36 Sequence GetAlternative(ISymbol ntSymbol, int index); 36 37 37 void AddProductionRule( stringntSymbol, Sequence production);38 void AddProductionRule(ISymbol ntSymbol, Sequence production); 38 39 } 39 40 } -
branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces/ISymbol.cs
r10031 r10051 20 20 #endregion 21 21 22 /*23 22 namespace HeuristicLab.Grammars { 24 interface ISymbol {23 public interface ISymbol { 25 24 string Name { get; } 26 bool IsTerminal{ get; }25 IAttribute Attribute { get; } 27 26 } 28 27 } 29 */
Note: See TracChangeset
for help on using the changeset viewer.