コード例 #1
0
        public static TrsTerm Convert(this AstTerm astIn)
        {
            var tokenTermName = astIn.TermName;

            return(new TrsTerm(tokenTermName.TokenString,
                               astIn.TermArguments.Arguments.Select(astTermArg => ConvertAstTermBase(astTermArg)), astIn));
        }
コード例 #2
0
ファイル: TrsTerm.cs プロジェクト: WCoetser/TRL
 public TrsTerm(string name, IEnumerable<TrsTermBase> arguments, AstTerm sourceTerm)
 {
     if (arguments == null || arguments.Count() == 0)
     throw new ArgumentException("Expected at least one argument for term definition, otherwise use atom.");
       Name = name;
       Arguments = arguments.ToList();
       AstSource = sourceTerm;
 }
コード例 #3
0
 public TrsTerm(string name, IEnumerable <TrsTermBase> arguments, AstTerm sourceTerm)
 {
     if (arguments == null || arguments.Count() == 0)
     {
         throw new ArgumentException("Expected at least one argument for term definition, otherwise use atom.");
     }
     Name      = name;
     Arguments = arguments.ToList();
     AstSource = sourceTerm;
 }