Exemple #1
0
        public static void Rule(Term lhs, Atom atom, OptionalTermBody optionalTermBody)
        {
            CodeCompoundTerm codeCompoundTerm;

            if (optionalTermBody.CodeTerms == null)
            {
                CodeFunctor codeFunctor = new CodeFunctor(atom.Text);

                codeCompoundTerm = new CodeCompoundTerm(codeFunctor);
            }
            else
            {
                CodeFunctor codeFunctor = new CodeFunctor(atom.Text, optionalTermBody.CodeTerms.Count);

                if (codeFunctor.Arity == 0)
                {
                    codeCompoundTerm = new CodeCompoundTerm(codeFunctor);
                }
                else
                {
                    codeCompoundTerm = new CodeCompoundTerm(codeFunctor, optionalTermBody.CodeTerms);
                }
            }

            lhs.CodeCompoundTerm = codeCompoundTerm;
        }
Exemple #2
0
        public static void Rule(Term lhs, Atom atom, OptionalTermBody optionalTermBody)
        {
            CodeCompoundTerm codeCompoundTerm;

            if (optionalTermBody.CodeTerms == null)
            {
                CodeFunctor codeFunctor = new CodeFunctor(atom.Text);

                codeCompoundTerm = new CodeCompoundTerm(codeFunctor);
            }
            else
            {
                CodeFunctor codeFunctor = new CodeFunctor(atom.Text, optionalTermBody.CodeTerms.Count);

                if (codeFunctor.Arity == 0)
                {
                    codeCompoundTerm = new CodeCompoundTerm(codeFunctor);
                }
                else
                {
                    codeCompoundTerm = new CodeCompoundTerm(codeFunctor, optionalTermBody.CodeTerms);
                }
            }

            lhs.CodeCompoundTerm = codeCompoundTerm;
        }
 public static void Rule(OptionalTermBody lhs, OpenParenthesis openParenthesis, OptionalCompoundTermBody optionalCompoundTermBody, CloseParenthesis closeParenthesis)
 {
     lhs.CodeTerms = new List <CodeTerm>();
     if (optionalCompoundTermBody.CodeTerms != null)
     {
         lhs.CodeTerms.AddRange(optionalCompoundTermBody.CodeTerms);
     }
 }
 public static void Rule(OptionalTermBody lhs, OpenParenthesis openParenthesis, OptionalCompoundTermBody optionalCompoundTermBody, CloseParenthesis closeParenthesis)
 {
     lhs.CodeTerms = new List<CodeTerm>();
     if (optionalCompoundTermBody.CodeTerms != null)
     {
         lhs.CodeTerms.AddRange(optionalCompoundTermBody.CodeTerms);
     }
 }
 public static void Rule(OptionalTermBody lhs)
 {
 }
 public static void Rule(OptionalTermBody lhs)
 { }