From 957bc999a3d72741e42c194b603faa8ab501dfca Mon Sep 17 00:00:00 2001 From: krasimir Date: Wed, 31 May 2017 18:48:56 +0000 Subject: bits of documentation for the .NET binding --- src/runtime/dotNet/PGF.cs | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'src/runtime/dotNet/PGF.cs') diff --git a/src/runtime/dotNet/PGF.cs b/src/runtime/dotNet/PGF.cs index e6efae1d5..0d2f1d251 100644 --- a/src/runtime/dotNet/PGF.cs +++ b/src/runtime/dotNet/PGF.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; namespace PGFSharp { /// - /// Grammatical Framework grammar. + /// This is the class for PGF grammars. /// public class PGF { @@ -18,10 +18,10 @@ namespace PGFSharp NativeGU.NativeMemoryPool pool; /// - /// Read grammar from PGF file. + /// Reads a grammar with the specified file path. /// - /// filename - /// + /// The path to the file. + /// an object representing the grammar in memory. public static PGF ReadPGF(string fn) { var obj = new PGF(); @@ -76,10 +76,9 @@ namespace PGFSharp public IEnumerable Functions => GetStringList(Native.pgf_iter_functions); /// - /// All functions producing the given category name. + /// Returns a list with all functions with a given return category. /// - /// - /// + /// The name of the return category. public IEnumerable FunctionByCategory(string catName) { using (var str = new Native.NativeString(catName)) @@ -89,9 +88,9 @@ namespace PGFSharp } /// - /// Get type from function name. + /// Returns the type of the function with the given name. /// - /// + /// The name of the function. /// public Type FunctionType(string funName) { @@ -104,10 +103,10 @@ namespace PGFSharp } /// - /// Reduce expression. + /// Normalizes an expression to its normal form by using the 'def' rules in the grammar. /// - /// - /// + /// the original expression. + /// the normalized expression. public Expr Compute(Expr expr) { var tmp_pool = new NativeGU.NativeMemoryPool(); @@ -126,9 +125,11 @@ namespace PGFSharp } /// - /// Enumerate all expressions in the given category. + /// Returns an enumerable over the set of all expression in + /// the given category. The expressions are enumerated in decreasing + /// probability order. /// - /// + /// the start category. /// public IEnumerable GenerateAll(Type cat = null) { -- cgit v1.2.3