Daily update on 20250320-081135 by Nitload Youmu. Additional Message : Compiler Framework rebuild compelte, working on reverse converter
Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
+26
-33
@@ -49,7 +49,7 @@ using System.Xml.XPath;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
internal static class Program
|
||||
internal static partial class Program
|
||||
{
|
||||
|
||||
private static string testExpPath = @"D:\Programmer\stepcode\data\ap203\ap203.exp";
|
||||
@@ -59,42 +59,35 @@ namespace StgSharp
|
||||
try {
|
||||
StgSharp.Init();
|
||||
|
||||
/**/
|
||||
ExpCompile.InitCompile();
|
||||
ExpFileSource reader = new ExpFileSource( testExpPath );
|
||||
ExpSchemaSource schemaSource = new ExpSchemaSource();
|
||||
schemaSource.ReadSchema( reader );
|
||||
CompileStack<ExpNode, IExpElementSource> stack = new CompileStack<ExpNode, IExpElementSource>(
|
||||
);
|
||||
|
||||
ExpSchema schema = schemaSource.Compile(
|
||||
ExpressCompileOption.Translate );
|
||||
for( int i = 0; i < 10; i++ ) {
|
||||
stack.PushOperand(
|
||||
new Token( $"{i}", 0, 0, TokenFlag.Number ) );
|
||||
}
|
||||
for( int i = 0; i < 10; i++ ) {
|
||||
stack.PushOperator(
|
||||
new Token( $"op_{i}", 0, 0, TokenFlag.Member ) );
|
||||
}
|
||||
stack.IncreaseDepth( 0 );
|
||||
|
||||
/**/
|
||||
/*
|
||||
|
||||
StgSharp.InitGL( 4, 6 );
|
||||
StgSharp.GlobalSetting.VSyncActivated = false;
|
||||
|
||||
ViewPort vp = new ViewPort(
|
||||
800, 600, "Hello StgSharp!", IntPtr.Zero );
|
||||
|
||||
//throw new NotImplementedException();
|
||||
|
||||
StringHashMultiplexer mul = new StringHashMultiplexer();
|
||||
IEqualityComparer<string> com = mul;
|
||||
string str = "1234567012345670";
|
||||
for( int i = 1; i < 100; i++ ) {
|
||||
str += $"{(i%8)}";
|
||||
int hash = mul.ForceComputeHash( str );
|
||||
Thread.Sleep( 20 );
|
||||
for( int i = 0; i < 10; i++ ) {
|
||||
stack.PushOperand(
|
||||
new Token( $"{i}", 0, 0, TokenFlag.Number ) );
|
||||
}
|
||||
for( int i = 0; i < 10; i++ ) {
|
||||
stack.PushOperator(
|
||||
new Token( $"op_{i}", 0, 0, TokenFlag.Member ) );
|
||||
}
|
||||
|
||||
ViewModelBase mainModel = new ViewModelMain( vp );
|
||||
mainModel.CreateAndBindView<ViewMain>( "MainView", (1, 1, 1) );
|
||||
|
||||
mainModel.UseViewModel( "MainView" );
|
||||
|
||||
StgSharp.Terminate();
|
||||
/**/
|
||||
while( stack.TryPopOperand(
|
||||
out bool isNode, out Token t, out ExpNode n ) ) {
|
||||
Console.WriteLine( t.Value );
|
||||
}
|
||||
while( stack.TryPopOperator( out Token op ) ) {
|
||||
Console.WriteLine( op.Value );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user