mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-12 14:29:31 -06:00
the parser for abstract expressions in the C runtime now supports partial parses
This commit is contained in:
@@ -46,7 +46,7 @@ namespace PGFSharp
|
||||
using (var strNative = new Native.NativeString(exprStr))
|
||||
{
|
||||
var in_ = NativeGU.gu_data_in(strNative.Ptr, strNative.Size, tmp_pool.Ptr);
|
||||
var expr = Native.pgf_read_expr(in_, result_pool.Ptr, exn.Ptr);
|
||||
var expr = Native.pgf_read_expr(in_, result_pool.Ptr, tmp_pool.Ptr, exn.Ptr);
|
||||
if (exn.IsRaised || expr == IntPtr.Zero)
|
||||
{
|
||||
throw new PGFError();
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace PGFSharp
|
||||
public static extern IntPtr pgf_function_type(IntPtr pgf, IntPtr funNameStr);
|
||||
|
||||
[DllImport(LIBNAME, CallingConvention = CC)]
|
||||
public static extern IntPtr pgf_read_type(IntPtr in_, IntPtr pool, IntPtr err);
|
||||
public static extern IntPtr pgf_read_type(IntPtr in_, IntPtr pool, IntPtr tmp_pool, IntPtr err);
|
||||
|
||||
[DllImport(LIBNAME, CallingConvention = CC)]
|
||||
public static extern void pgf_print_type(IntPtr expr, IntPtr ctxt, int prec, IntPtr output, IntPtr err);
|
||||
@@ -139,7 +139,7 @@ namespace PGFSharp
|
||||
public static extern void pgf_print_expr(IntPtr expr, IntPtr ctxt, int prec, IntPtr output, IntPtr err);
|
||||
|
||||
[DllImport(LIBNAME, CallingConvention = CC)]
|
||||
public static extern IntPtr pgf_read_expr(IntPtr in_, IntPtr pool, IntPtr err);
|
||||
public static extern IntPtr pgf_read_expr(IntPtr in_, IntPtr pool, IntPtr tmp_pool, IntPtr err);
|
||||
|
||||
[DllImport(LIBNAME, CallingConvention = CC)]
|
||||
public static extern IntPtr pgf_compute(IntPtr pgf, IntPtr expr, IntPtr err, IntPtr tmp_pool, IntPtr res_pool);
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace PGFSharp
|
||||
using (var strNative = new Native.NativeString(typeStr))
|
||||
{
|
||||
var in_ = NativeGU.gu_data_in(strNative.Ptr, strNative.Size, tmp_pool.Ptr);
|
||||
var typ = Native.pgf_read_type(in_, result_pool.Ptr, exn.Ptr);
|
||||
var typ = Native.pgf_read_type(in_, result_pool.Ptr, tmp_pool.Ptr, exn.Ptr);
|
||||
if (exn.IsRaised || typ == IntPtr.Zero)
|
||||
{
|
||||
throw new PGFError();
|
||||
|
||||
Reference in New Issue
Block a user