From 0179fbd6ce40563862eb01c0fd8acf6c7bbb9f45 Mon Sep 17 00:00:00 2001 From: handa Date: Mon, 9 Nov 2009 05:56:16 +0000 Subject: [PATCH] *** empty log message *** --- XmlExpr.cs | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/XmlExpr.cs b/XmlExpr.cs index e37e7ea..0bc2421 100644 --- a/XmlExpr.cs +++ b/XmlExpr.cs @@ -415,6 +415,8 @@ namespace System.Xml // single list. internal readonly int max_args; + public delegate Term Builtin (Domain domain, Variable vari, Term[] terms); + public Function () { } public Function (Symbol name, bool with_var, int min_args, int max_args) @@ -434,10 +436,9 @@ namespace System.Xml internal class Subroutine : Function { - public Func builtin; + public Builtin builtin; - public Subroutine (Func builtin, - Symbol name, bool with_var, + public Subroutine (Builtin builtin, Symbol name, bool with_var, int min_args, int max_args) : base (name, with_var, min_args, max_args) { @@ -462,10 +463,9 @@ namespace System.Xml internal class SpecialForm : Function { - public Func builtin; + public Builtin builtin; - public SpecialForm (Func builtin, - Symbol name, bool with_var, + public SpecialForm (Builtin builtin, Symbol name, bool with_var, int min_args, int max_args) : base (name, with_var, min_args, max_args) { @@ -796,18 +796,16 @@ namespace System.Xml } } - public void DefSubr (Func builtin, - Symbol name, bool with_var, - int min_args, int max_args) + public void DefSubr (Function.Builtin builtin, Symbol name, + bool with_var, int min_args, int max_args) { check_func_head (name, with_var, min_args, max_args, false); functions[name] = new Function.Subroutine (builtin, name, with_var, min_args, max_args); } - public void DefSpecial (Func builtin, - Symbol name, bool with_var, - int min_args, int max_args) + public void DefSpecial (Function.Builtin builtin, Symbol name, + bool with_var, int min_args, int max_args) { check_func_head (name, with_var, min_args, max_args, false); functions[name] = new Function.SpecialForm (builtin, name, with_var, @@ -2408,8 +2406,9 @@ namespace System.Xml private static bool default_stop (XmlNode n) { return n == null; } - public static Term[] Parse (Domain domain, XmlNode node, - Func stop) + public delegate bool ParseStop (XmlNode node); + + public static Term[] Parse (Domain domain, XmlNode node, ParseStop stop) { if (stop == null) stop = default_stop; -- 1.7.10.4