Daily update on 20250328-131548 by Nitload Youmu. Additional Message : IF branch can be full functionally compiled. Next will be CASE_OF branch
Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
@@ -54,6 +54,8 @@ namespace StgSharp
|
||||
"c", new ExpIntNode( new Token( "c", 0, 0, TokenFlag.Number ), 1, false ) );
|
||||
LocalVariables.Add(
|
||||
"d", new ExpIntNode( new Token( "d", 0, 0, TokenFlag.Number ), 1, false ) );
|
||||
LocalVariables.Add(
|
||||
"e", new ExpIntNode( new Token( "e", 0, 0, TokenFlag.Number ), 1, false ) );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -119,21 +121,33 @@ namespace StgSharp
|
||||
internal static partial class Program
|
||||
{
|
||||
|
||||
private const string code = """
|
||||
a := ( b * E + d * 2 ) * d;
|
||||
(**)
|
||||
a := b + (c + d) - a;
|
||||
IF a = b THEN
|
||||
a := a * e;
|
||||
ELSE
|
||||
a := c * e;
|
||||
END_IF
|
||||
(**)
|
||||
""";
|
||||
|
||||
public static void ExpLinearExpressionTest()
|
||||
{
|
||||
ExpressCompile.InitCompile();
|
||||
ScriptSourceTransmitter transmitter = new ScriptSourceTransmitter( "END", 0 );
|
||||
|
||||
//Console.WriteLine( @$"a := ( b * E + d * 2 ) * d;" );
|
||||
transmitter.WriteLine( @$"a := ( b * E + d * 2 ) * d;" );
|
||||
|
||||
transmitter.WriteLine( @"a := b + (c + d) * a;" );
|
||||
foreach( string line in code.Split(
|
||||
Environment.NewLine, StringSplitOptions.RemoveEmptyEntries ) ) {
|
||||
transmitter.WriteLine( line );
|
||||
}
|
||||
transmitter.EndWriting();
|
||||
ExpSourceReader reader = new ExpSourceReader( transmitter );
|
||||
/**/
|
||||
ExpTestFuncSource func = new ExpTestFuncSource( "test", transmitter );
|
||||
TestSchema testSchema = new TestSchema( func );
|
||||
ExpNodeGenerator generator = new ExpNodeGenerator( testSchema, func );
|
||||
ExpSyntaxAnalyzer generator = new ExpSyntaxAnalyzer( testSchema, func );
|
||||
/**/
|
||||
|
||||
while( reader.TryReadToken( out Token t ) )
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ffd5825a051f04f4105ac5ed02e754176ce6f608")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+36b6ad5a526ca6ef66d826f614e8476a99fe52f7")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/ffd5825a051f04f4105ac5ed02e754176ce6f608/*"}}
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/36b6ad5a526ca6ef66d826f614e8476a99fe52f7/*"}}
|
||||
Reference in New Issue
Block a user