summaryrefslogtreecommitdiff
path: root/src/runtime/dotNet
diff options
context:
space:
mode:
authorKrasimir Angelov <kr.angelov@gmail.com>2017-08-07 16:39:19 +0200
committerKrasimir Angelov <kr.angelov@gmail.com>2017-08-07 16:39:19 +0200
commita8eeb497670fb0f2ffab1f9b070808df965415be (patch)
tree5f169893da63183df272b0d281b5eaf5857ed955 /src/runtime/dotNet
parenta4c19875ed4a97671d17d6d6f062b465ae1f87a6 (diff)
the linearizer API now allows to detect metavariables. This is used for instancein the lookup where the tokens produced from the metavariables are interpreted as distinct from all other tokens.
Diffstat (limited to 'src/runtime/dotNet')
-rw-r--r--src/runtime/dotNet/Bracket.cs7
-rw-r--r--src/runtime/dotNet/Native.cs6
2 files changed, 12 insertions, 1 deletions
diff --git a/src/runtime/dotNet/Bracket.cs b/src/runtime/dotNet/Bracket.cs
index 8fa005704..1fc4c0db7 100644
--- a/src/runtime/dotNet/Bracket.cs
+++ b/src/runtime/dotNet/Bracket.cs
@@ -52,7 +52,8 @@ namespace PGFSharp
end_phrase = EndPhrase,
symbol_ne = null,
symbol_bind = null,
- symbol_capit = null
+ symbol_capit = null,
+ symbol_meta = SymbolMeta
};
}
@@ -80,6 +81,10 @@ namespace PGFSharp
else
stack.Peek ().AddChild (b);
}
+
+ private void SymbolMeta(IntPtr self, int meta_id) {
+ stack.Peek().AddChild(new StringChildBracket("?"));
+ }
public Bracket Build() {
return final;
diff --git a/src/runtime/dotNet/Native.cs b/src/runtime/dotNet/Native.cs
index 346f85905..5c750e010 100644
--- a/src/runtime/dotNet/Native.cs
+++ b/src/runtime/dotNet/Native.cs
@@ -221,6 +221,9 @@ namespace PGFSharp
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void LinFuncSymbolCapitalization(IntPtr self);
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ public delegate void LinFuncSymbolMeta(IntPtr self, int meta_id);
+
[StructLayout(LayoutKind.Sequential)]
public struct PgfLinFuncs
{
@@ -241,6 +244,9 @@ namespace PGFSharp
[MarshalAs(UnmanagedType.FunctionPtr)]
public LinFuncSymbolCapitalization symbol_capit;
+
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ public LinFuncSymbolMeta symbol_meta;
}
#endregion