From 148b0fed4a1abaaeaa3a28e7c7b088590805ebef Mon Sep 17 00:00:00 2001 From: Nitload Date: Sun, 23 Mar 2025 15:14:39 +0800 Subject: [PATCH] Daily update on 20250323-151439 by Nitload Youmu. Additional Message : none Signed-off-by: Nitload --- .../net8.0/StgSharp.Model.AssemblyInfo.cs | 2 +- .../net8.0/StgSharp.Model.sourcelink.json | 2 +- .../Express/Builtin/ExpCollection.cs | 8 +- .../Express/CompileEnv/BuiltinType.cs | 2 +- .../Express/CompileEnv/DefaultSchema.cs | 10 +- .../Express/CompileEnv/ExpCompile.cs | 12 +- .../CompileEnv/ExpOperatorPrecedence.cs | 2 +- StgSharp.Script/Express/CompileEnv/KeyWord.cs | 2 +- StgSharp.Script/Express/Element/ExpConst.cs | 4 +- .../Express/Element/ExpFunction.cs | 22 ++ .../ExpAstNode/ExpBinaryOperatorNode.cs | 22 +- .../ExpAstNode/ExpElementMemberNameNode.cs | 2 +- .../Express/ExpAstNode/ExpLiteralNode.cs | 12 +- .../Express/ExpAstNode/ExpRepeatNode.cs | 8 +- .../Express/ExpNodeGenerator.BranchParser.cs | 2 +- .../ExpNodeGenerator.OperatorParser.cs | 6 +- ...ExpNodeGenerator.PrefixReverseAnalysing.cs | 2 +- .../Express/ExpNodeGenerator.TokenSpliter.cs | 2 +- StgSharp.Script/Express/ExpNodeGenerator.cs | 16 +- StgSharp.Script/Express/ExpSchemaBase.cs | 4 +- StgSharp.Script/Express/ExpSourceReader.cs | 223 +++++++++++------- StgSharp.Script/Express/GeneratedExpSchema.cs | 2 +- .../net8.0/StgSharp.Script.AssemblyInfo.cs | 2 +- .../net8.0/StgSharp.Script.sourcelink.json | 2 +- StgSharpDebug/ExpLinearExpressionTest.cs | 82 +++++++ StgSharpDebug/Program.cs | 32 +-- StgSharpDebug/TestFileRead.cs | 2 +- .../net8.0/StgSharpDebug.AssemblyInfo.cs | 2 +- .../net8.0/StgSharpDebug.sourcelink.json | 2 +- 29 files changed, 313 insertions(+), 178 deletions(-) create mode 100644 StgSharpDebug/ExpLinearExpressionTest.cs diff --git a/StgSharp.Model/obj/x64/Debug/net8.0/StgSharp.Model.AssemblyInfo.cs b/StgSharp.Model/obj/x64/Debug/net8.0/StgSharp.Model.AssemblyInfo.cs index d2fcafa6..71c99ff8 100644 --- a/StgSharp.Model/obj/x64/Debug/net8.0/StgSharp.Model.AssemblyInfo.cs +++ b/StgSharp.Model/obj/x64/Debug/net8.0/StgSharp.Model.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp.Model")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6788bc4a0065508d7afa5f740da1b4ca6dd1efef")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+528d0c5462b4d3da107ad29b859f9c8006fb675a")] [assembly: System.Reflection.AssemblyProductAttribute("StgSharp.Model")] [assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.Model")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/StgSharp.Model/obj/x64/Debug/net8.0/StgSharp.Model.sourcelink.json b/StgSharp.Model/obj/x64/Debug/net8.0/StgSharp.Model.sourcelink.json index 2eeaae6f..2738e12a 100644 --- a/StgSharp.Model/obj/x64/Debug/net8.0/StgSharp.Model.sourcelink.json +++ b/StgSharp.Model/obj/x64/Debug/net8.0/StgSharp.Model.sourcelink.json @@ -1 +1 @@ -{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/6788bc4a0065508d7afa5f740da1b4ca6dd1efef/*"}} \ No newline at end of file +{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/528d0c5462b4d3da107ad29b859f9c8006fb675a/*"}} \ No newline at end of file diff --git a/StgSharp.Script/Express/Builtin/ExpCollection.cs b/StgSharp.Script/Express/Builtin/ExpCollection.cs index 8420d265..c6e2dbe4 100644 --- a/StgSharp.Script/Express/Builtin/ExpCollection.cs +++ b/StgSharp.Script/Express/Builtin/ExpCollection.cs @@ -103,7 +103,7 @@ namespace StgSharp.Script.Express public override int Count => _collection.Length; - public override string Name => ExpCompile.PoolString( "ARRAY" ); + public override string Name => ExpressCompile.PoolString( "ARRAY" ); public override ExpNode CreateInstanceNode() { @@ -128,7 +128,7 @@ namespace StgSharp.Script.Express public override int Count => _collection.Count; - public override string Name => ExpCompile.PoolString( "BAG" ); + public override string Name => ExpressCompile.PoolString( "BAG" ); public override ExpNode CreateInstanceNode() { @@ -152,7 +152,7 @@ namespace StgSharp.Script.Express public override int Count => _collection.Count; - public override string Name => ExpCompile.PoolString( "LIST" ); + public override string Name => ExpressCompile.PoolString( "LIST" ); public override ExpNode CreateInstanceNode() { @@ -175,7 +175,7 @@ namespace StgSharp.Script.Express public override int Count => _collection.Count; - public override string Name => ExpCompile.PoolString( "SET" ); + public override string Name => ExpressCompile.PoolString( "SET" ); public void Add( ExpElementInstanceBase token ) { diff --git a/StgSharp.Script/Express/CompileEnv/BuiltinType.cs b/StgSharp.Script/Express/CompileEnv/BuiltinType.cs index da90dd1c..53e5b44f 100644 --- a/StgSharp.Script/Express/CompileEnv/BuiltinType.cs +++ b/StgSharp.Script/Express/CompileEnv/BuiltinType.cs @@ -36,7 +36,7 @@ using System.Threading.Tasks; namespace StgSharp.Script.Express { - public static partial class ExpCompile + public static partial class ExpressCompile { public static ExpTypeSource ExpInt diff --git a/StgSharp.Script/Express/CompileEnv/DefaultSchema.cs b/StgSharp.Script/Express/CompileEnv/DefaultSchema.cs index c09aa765..e02d0989 100644 --- a/StgSharp.Script/Express/CompileEnv/DefaultSchema.cs +++ b/StgSharp.Script/Express/CompileEnv/DefaultSchema.cs @@ -34,23 +34,23 @@ using System.Collections.Frozen; using System.Collections.Generic; using System.Linq; -using static StgSharp.Script.Express.ExpCompile; +using static StgSharp.Script.Express.ExpressCompile; namespace StgSharp.Script.Express { - internal partial class ExpSchema_Nitload : ExpSchema + internal partial class ExpSchema_Builtin : ExpSchema { - private static readonly ExpSchema_Nitload _onlyInstance = new ExpSchema_Nitload( + private static readonly ExpSchema_Builtin _onlyInstance = new ExpSchema_Builtin( ); - private ExpSchema_Nitload() + private ExpSchema_Builtin() : base() { Name = "Nitload"; } - internal static ExpSchema_Nitload Only + internal static ExpSchema_Builtin Only { get => _onlyInstance; } diff --git a/StgSharp.Script/Express/CompileEnv/ExpCompile.cs b/StgSharp.Script/Express/CompileEnv/ExpCompile.cs index cb491d2f..f14f3721 100644 --- a/StgSharp.Script/Express/CompileEnv/ExpCompile.cs +++ b/StgSharp.Script/Express/CompileEnv/ExpCompile.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="ExpCompile.cs" +// file="ExpressCompile.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -42,7 +42,7 @@ using System.Text; namespace StgSharp.Script.Express { - public static partial class ExpCompile + public static partial class ExpressCompile { private static string[] _operatorsWithLetter; @@ -82,7 +82,7 @@ namespace StgSharp.Script.Express _compileStringCache = new StringPool(); _multiplexer = new ConcurrentStringHashMultiplexer(); - ExpSchema_Nitload.Only.Init(); + ExpSchema_Builtin.Only.Init(); PoolKeywords(); InitPrecedence(); @@ -99,18 +99,18 @@ namespace StgSharp.Script.Express KeyWord.Not, ]; - ExpSchema_Nitload.Only + ExpSchema_Builtin.Only .TryGetType( PoolString( KeyWord.Integer ), out ExpTypeSource? _expInt ); ExpInt = _expInt; - ExpSchema_Nitload.Only + ExpSchema_Builtin.Only .TryGetType( PoolString( KeyWord.Real ), out ExpTypeSource? _expReal ); ExpReal = _expReal; - ExpSchema_Nitload.Only + ExpSchema_Builtin.Only .TryGetType( PoolString( KeyWord.Boolean ), out ExpTypeSource? _expBool ); diff --git a/StgSharp.Script/Express/CompileEnv/ExpOperatorPrecedence.cs b/StgSharp.Script/Express/CompileEnv/ExpOperatorPrecedence.cs index 6731afe2..dc3e23eb 100644 --- a/StgSharp.Script/Express/CompileEnv/ExpOperatorPrecedence.cs +++ b/StgSharp.Script/Express/CompileEnv/ExpOperatorPrecedence.cs @@ -37,7 +37,7 @@ using System.Threading.Tasks; namespace StgSharp.Script.Express { - public static partial class ExpCompile + public static partial class ExpressCompile { public static bool TryGetOperatorPrecedence( diff --git a/StgSharp.Script/Express/CompileEnv/KeyWord.cs b/StgSharp.Script/Express/CompileEnv/KeyWord.cs index 2e9467da..f26217e1 100644 --- a/StgSharp.Script/Express/CompileEnv/KeyWord.cs +++ b/StgSharp.Script/Express/CompileEnv/KeyWord.cs @@ -37,7 +37,7 @@ using System.Threading.Tasks; namespace StgSharp.Script.Express { - public static partial class ExpCompile + public static partial class ExpressCompile { private static HashSet _keywordSet; diff --git a/StgSharp.Script/Express/Element/ExpConst.cs b/StgSharp.Script/Express/Element/ExpConst.cs index 4235dcae..de3ca2c3 100644 --- a/StgSharp.Script/Express/Element/ExpConst.cs +++ b/StgSharp.Script/Express/Element/ExpConst.cs @@ -50,7 +50,7 @@ namespace StgSharp.Script.Express { _sourceProvider = sourceProvider; _constants = new Dictionary( - ExpCompile.Multiplexer ); + ExpressCompile.Multiplexer ); } public override ExpElementType ElementType => ExpElementType.Const; @@ -59,7 +59,7 @@ namespace StgSharp.Script.Express public override string Name { - get => ExpCompile.KeyWord.Constant; + get => ExpressCompile.KeyWord.Constant; } public override void Analyse() diff --git a/StgSharp.Script/Express/Element/ExpFunction.cs b/StgSharp.Script/Express/Element/ExpFunction.cs index 1a9febfe..65858c77 100644 --- a/StgSharp.Script/Express/Element/ExpFunction.cs +++ b/StgSharp.Script/Express/Element/ExpFunction.cs @@ -48,6 +48,18 @@ namespace StgSharp.Script.Express _transmitter = transmitter; } + public Dictionary FuncParams + { + get; + init; + } = new Dictionary(); + + public Dictionary LocalVariables + { + get; + init; + } = new Dictionary(); + public override ExpElementType ElementType => ExpElementType.Function; public override IScriptSourceProvider SourceProvider => _transmitter; @@ -77,6 +89,16 @@ namespace StgSharp.Script.Express public override bool TryGetMember( string name, out ExpNode memberNode ) { + if( FuncParams.TryGetValue( + name, out ExpElementInstanceBase? param ) ) { + memberNode = param; + return true; + } + if( LocalVariables.TryGetValue( + name, out ExpElementInstanceBase? variable ) ) { + memberNode = variable; + return true; + } memberNode = ExpNode.Empty; return false; } diff --git a/StgSharp.Script/Express/ExpAstNode/ExpBinaryOperatorNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpBinaryOperatorNode.cs index ef98a254..f47ec651 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpBinaryOperatorNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpBinaryOperatorNode.cs @@ -68,7 +68,8 @@ namespace StgSharp.Script.Express 0; return new ExpBinaryOperatorNode( source ) { - _returnType = isFloat ? ExpCompile.ExpReal : ExpCompile.ExpInt, + _returnType = isFloat ? + ExpressCompile.ExpReal : ExpressCompile.ExpInt, _nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number, CodeConvertTemplate = "{0} + {1}", }; @@ -106,7 +107,8 @@ namespace StgSharp.Script.Express 0; return new ExpBinaryOperatorNode( source ) { - _returnType = isFloat ? ExpCompile.ExpReal : ExpCompile.ExpInt, + _returnType = isFloat ? + ExpressCompile.ExpReal : ExpressCompile.ExpInt, _nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number, CodeConvertTemplate = "{0} / {1}", }; @@ -124,7 +126,7 @@ namespace StgSharp.Script.Express } return new ExpBinaryOperatorNode( source ) { - _returnType = ExpCompile.ExpBool, + _returnType = ExpressCompile.ExpBool, _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, CodeConvertTemplate = "{0} == {1}", }; @@ -141,7 +143,7 @@ namespace StgSharp.Script.Express } return new ExpBinaryOperatorNode( source ) { - _returnType = ExpCompile.ExpBool, + _returnType = ExpressCompile.ExpBool, _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, CodeConvertTemplate = "{0} > {1}", }; @@ -158,7 +160,7 @@ namespace StgSharp.Script.Express } return new ExpBinaryOperatorNode( source ) { - _returnType = ExpCompile.ExpBool, + _returnType = ExpressCompile.ExpBool, _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, CodeConvertTemplate = "{0} < {1}", }; @@ -178,7 +180,8 @@ namespace StgSharp.Script.Express 0; return new ExpBinaryOperatorNode( source ) { - _returnType = isFloat ? ExpCompile.ExpReal : ExpCompile.ExpInt, + _returnType = isFloat ? + ExpressCompile.ExpReal : ExpressCompile.ExpInt, _nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number, CodeConvertTemplate = "{0} * {1}", }; @@ -196,7 +199,7 @@ namespace StgSharp.Script.Express } return new ExpBinaryOperatorNode( source ) { - _returnType = ExpCompile.ExpBool, + _returnType = ExpressCompile.ExpBool, _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, CodeConvertTemplate = "{0} != {1}", }; @@ -213,7 +216,7 @@ namespace StgSharp.Script.Express } return new ExpBinaryOperatorNode( source ) { - _returnType = ExpCompile.ExpBool, + _returnType = ExpressCompile.ExpBool, _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, CodeConvertTemplate = "{0} < {1}", }; @@ -233,7 +236,8 @@ namespace StgSharp.Script.Express 0; return new ExpBinaryOperatorNode( source ) { - _returnType = isFloat ? ExpCompile.ExpReal : ExpCompile.ExpInt, + _returnType = isFloat ? + ExpressCompile.ExpReal : ExpressCompile.ExpInt, _nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number, CodeConvertTemplate = "{0} - {1}", }; diff --git a/StgSharp.Script/Express/ExpAstNode/ExpElementMemberNameNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpElementMemberNameNode.cs index 87d39d22..b2a85cf5 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpElementMemberNameNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpElementMemberNameNode.cs @@ -56,7 +56,7 @@ namespace StgSharp.Script.Express { ExpSchema.BuiltinSchema .TryGetType( - ExpCompile.KeyWord.String, + ExpressCompile.KeyWord.String, out ExpTypeSource? strType ); return strType; } diff --git a/StgSharp.Script/Express/ExpAstNode/ExpLiteralNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpLiteralNode.cs index af000c5f..04f8d8e2 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpLiteralNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpLiteralNode.cs @@ -51,13 +51,13 @@ namespace StgSharp.Script.Express public override IExpElementSource EqualityTypeConvert => ExpSchema.BuiltinSchema .TryGetType( - ExpCompile.KeyWord.Integer, + ExpressCompile.KeyWord.Integer, out ExpTypeSource? type ) ? type : throw new ExpCompileNotInitializedException(); public int Value => _value; - public override string TypeName => ExpCompile.KeyWord.Integer; + public override string TypeName => ExpressCompile.KeyWord.Integer; } @@ -75,7 +75,7 @@ namespace StgSharp.Script.Express public override IExpElementSource EqualityTypeConvert => ExpSchema.BuiltinSchema .TryGetType( - ExpCompile.KeyWord.String, + ExpressCompile.KeyWord.String, out ExpTypeSource? type ) ? type : throw new ExpCompileNotInitializedException(); @@ -101,7 +101,7 @@ namespace StgSharp.Script.Express public override IExpElementSource EqualityTypeConvert => ExpSchema.BuiltinSchema .TryGetType( - ExpCompile.KeyWord.Boolean, + ExpressCompile.KeyWord.Boolean, out ExpTypeSource? type ) ? type : throw new ExpCompileNotInitializedException(); @@ -125,7 +125,7 @@ namespace StgSharp.Script.Express public override IExpElementSource EqualityTypeConvert => ExpSchema.BuiltinSchema .TryGetType( - ExpCompile.KeyWord.String, + ExpressCompile.KeyWord.String, out ExpTypeSource? type ) ? type : throw new ExpCompileNotInitializedException(); @@ -149,7 +149,7 @@ namespace StgSharp.Script.Express public override IExpElementSource EqualityTypeConvert => ExpSchema.BuiltinSchema .TryGetType( - ExpCompile.KeyWord.Logical, + ExpressCompile.KeyWord.Logical, out ExpTypeSource? type ) ? type : throw new ExpCompileNotInitializedException(); diff --git a/StgSharp.Script/Express/ExpAstNode/ExpRepeatNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpRepeatNode.cs index f95a616f..15c27778 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpRepeatNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpRepeatNode.cs @@ -36,7 +36,7 @@ using System.Text; namespace StgSharp.Script.Express { - public class ExpRepeatToken : ExpNode + public class ExpRepeatNode : ExpNode { //TODO: Current code cannot represent full functionality defined in ISO10303, need rewrite. @@ -45,7 +45,7 @@ namespace StgSharp.Script.Express private ExpNode _operationBegin; - public ExpRepeatToken( + public ExpRepeatNode( Token source, ExpNode operationBegin, ExpElementInstanceBase variable, @@ -64,14 +64,14 @@ namespace StgSharp.Script.Express case ExpNodeFlag.BuiltinType_Real: increment = new ExpRealNumberNode( new Token( - ExpCompile.PoolString( "1.0f" ), source.Line, + ExpressCompile.PoolString( "1.0f" ), source.Line, -1, TokenFlag.Number ), 1.0f ); break; case ExpNodeFlag.BuiltinType_Int: increment = new ExpIntNode( new Token( - ExpCompile.PoolString( "1" ), source.Line, -1, + ExpressCompile.PoolString( "1" ), source.Line, -1, TokenFlag.Number ), 1 ); break; diff --git a/StgSharp.Script/Express/ExpNodeGenerator.BranchParser.cs b/StgSharp.Script/Express/ExpNodeGenerator.BranchParser.cs index 696af5ec..f83d1163 100644 --- a/StgSharp.Script/Express/ExpNodeGenerator.BranchParser.cs +++ b/StgSharp.Script/Express/ExpNodeGenerator.BranchParser.cs @@ -34,7 +34,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using ExpKeyword = StgSharp.Script.Express.ExpCompile.KeyWord; +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.KeyWord; namespace StgSharp.Script.Express { diff --git a/StgSharp.Script/Express/ExpNodeGenerator.OperatorParser.cs b/StgSharp.Script/Express/ExpNodeGenerator.OperatorParser.cs index e31d8446..b54154a6 100644 --- a/StgSharp.Script/Express/ExpNodeGenerator.OperatorParser.cs +++ b/StgSharp.Script/Express/ExpNodeGenerator.OperatorParser.cs @@ -34,7 +34,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using ExpKeyword = StgSharp.Script.Express.ExpCompile.KeyWord; +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.KeyWord; namespace StgSharp.Script.Express { @@ -43,9 +43,9 @@ namespace StgSharp.Script.Express public int CompareOperatorPrecedence( Token left, Token right ) { - ExpCompile.TryGetOperatorPrecedence( + ExpressCompile.TryGetOperatorPrecedence( left.Value, out int leftPrecedence ); - ExpCompile.TryGetOperatorPrecedence( + ExpressCompile.TryGetOperatorPrecedence( right.Value, out int rightPrecedence ); return leftPrecedence - rightPrecedence; } diff --git a/StgSharp.Script/Express/ExpNodeGenerator.PrefixReverseAnalysing.cs b/StgSharp.Script/Express/ExpNodeGenerator.PrefixReverseAnalysing.cs index eaf6da4c..a803f3f3 100644 --- a/StgSharp.Script/Express/ExpNodeGenerator.PrefixReverseAnalysing.cs +++ b/StgSharp.Script/Express/ExpNodeGenerator.PrefixReverseAnalysing.cs @@ -35,7 +35,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using ExpKeyword = StgSharp.Script.Express.ExpCompile.KeyWord; +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.KeyWord; namespace StgSharp.Script.Express { diff --git a/StgSharp.Script/Express/ExpNodeGenerator.TokenSpliter.cs b/StgSharp.Script/Express/ExpNodeGenerator.TokenSpliter.cs index 7796bf0f..af008147 100644 --- a/StgSharp.Script/Express/ExpNodeGenerator.TokenSpliter.cs +++ b/StgSharp.Script/Express/ExpNodeGenerator.TokenSpliter.cs @@ -34,7 +34,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using ExpKeyword = StgSharp.Script.Express.ExpCompile.KeyWord; +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.KeyWord; namespace StgSharp.Script.Express { diff --git a/StgSharp.Script/Express/ExpNodeGenerator.cs b/StgSharp.Script/Express/ExpNodeGenerator.cs index d47d7dd9..9eee0140 100644 --- a/StgSharp.Script/Express/ExpNodeGenerator.cs +++ b/StgSharp.Script/Express/ExpNodeGenerator.cs @@ -40,7 +40,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using ExpKeyword = StgSharp.Script.Express.ExpCompile.KeyWord; +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.KeyWord; namespace StgSharp.Script.Express { @@ -55,7 +55,7 @@ namespace StgSharp.Script.Express private ExpNode _lastStatement; - private GeneratedExpSchema _context; + private ExpSchema _context; private IExpElementSource _local; public ExpNodeGenerator() @@ -63,6 +63,18 @@ namespace StgSharp.Script.Express _cache = new CompileStack(); } + public ExpNodeGenerator( ExpSchema context, IExpElementSource local ) + { + _cache = new CompileStack(); + ArgumentNullException.ThrowIfNull( context ); + if( context is not ExpSchema_Builtin ) { + _context = context; + } else { + throw new InvalidCastException( "Not a valid Schema type" ); + } + _local = local; + } + /**/ /// diff --git a/StgSharp.Script/Express/ExpSchemaBase.cs b/StgSharp.Script/Express/ExpSchemaBase.cs index 4e12653b..76813005 100644 --- a/StgSharp.Script/Express/ExpSchemaBase.cs +++ b/StgSharp.Script/Express/ExpSchemaBase.cs @@ -43,7 +43,7 @@ namespace StgSharp.Script.Express public static ExpSchema BuiltinSchema { - get => ExpSchema_Nitload.Only; + get => ExpSchema_Builtin.Only; } public string Name @@ -93,7 +93,7 @@ namespace StgSharp.Script.Express set; } - protected ConcurrentStringHashMultiplexer StringMultiplexer => ExpCompile.Multiplexer; + protected ConcurrentStringHashMultiplexer StringMultiplexer => ExpressCompile.Multiplexer; protected FrozenDictionary RuleDict { diff --git a/StgSharp.Script/Express/ExpSourceReader.cs b/StgSharp.Script/Express/ExpSourceReader.cs index 7cf2368f..0bad590e 100644 --- a/StgSharp.Script/Express/ExpSourceReader.cs +++ b/StgSharp.Script/Express/ExpSourceReader.cs @@ -44,7 +44,7 @@ namespace StgSharp.Script.Express private const int MultiLineEnd = 0x0029002A; // *) - private const string Token = "token", End = "end", Rest = "rest"; + private const string TokenMark = "token", EndMark = "end", RestMark = "rest"; private bool _isReadingMultiLineComment; private int _current, _lineNum; @@ -67,8 +67,7 @@ namespace StgSharp.Script.Express public bool IsEmpty { - get => ( ( string.IsNullOrEmpty( _lineCache ) || _current >= - _lineCache.Length ) ) && _provider.IsEmpty; + get => ( ( string.IsNullOrEmpty( _lineCache ) || _current >= _lineCache.Length ) ) && _provider.IsEmpty; } public int LineNumber @@ -77,38 +76,44 @@ namespace StgSharp.Script.Express } /// - /// Read code until end of a line. Lines in multi-line comment will be ignored. Line - /// begins with part of multi-line comment will automatically remove the comment part, but - /// beginning with a full multi-line comment will not causing removing. (*Just - /// Like The Comment Here*) Will Not Be Removed + /// Read code until end of a line. Lines in multi-line comment will be ignored. + /// Line begins with part of multi-line comment will automatically remove the comment + /// part, but beginning with a full multi-line comment will not causing removing. + /// (*Just Like The Comment Here*) Will Not Be Removed /// - /// + /// + /// + /// public unsafe ReadOnlySpan ReadLine() { - bool lineOver = string.IsNullOrEmpty( _lineCache ) || _current >= - _lineCache.Length; - while( lineOver || _isReadingMultiLineComment ) { - if( lineOver ) { - do { + bool lineOver = string.IsNullOrEmpty( _lineCache ) || _current >= _lineCache.Length; + while( lineOver || _isReadingMultiLineComment ) + { + if( lineOver ) + { + do + { _lineCache = _provider.ReadLine( out _lineNum ); } while (string.IsNullOrEmpty( _lineCache )); _current = 0; } - if( _isReadingMultiLineComment ) { + if( _isReadingMultiLineComment ) + { int index; fixed( char* cPtr = _lineCache.AsSpan( _current ) ) { index = UnsafeCompute.IndexOfCharPair( cPtr, MultiLineEnd, _lineCache.Length ); } - if( index == -1 ) { + if( index == -1 ) + { _lineCache = string.Empty; - } else { + } else + { _isReadingMultiLineComment = false; _current += index + 2; } } - lineOver = string.IsNullOrEmpty( _lineCache ) || _current >= - _lineCache.Length; + lineOver = string.IsNullOrEmpty( _lineCache ) || _current >= _lineCache.Length; } return _lineCache.AsSpan().Slice( _current ); } @@ -120,67 +125,71 @@ namespace StgSharp.Script.Express ReadOnlySpan source = ReadLine(); char c = source[ 0 ]; - if( char.IsLetter( c ) ) { - Match match = _nextWordTokenPattern.Match( - _lineCache, _current ); - if( match.Success ) { - begin = match.Groups[ Token ].Index; - end = match.Groups[ End ].Index; - rest = match.Groups[ Rest ].Index; + if( char.IsLetter( c ) ) + { + Match match = _nextWordTokenPattern.Match( _lineCache, _current ); + if( match.Success ) + { + begin = match.Groups[ TokenMark ].Index; + end = match.Groups[ EndMark ].Index; + rest = match.Groups[ RestMark ].Index; _current = rest; _last = new( - ExpCompile.PoolString( source[ .. ( end - begin ) ] ), - _lineNum, begin, TokenFlag.Member ); + ExpressCompile.PoolString( source[ .. ( end - begin ) ] ), _lineNum, begin, + TokenFlag.Member ); return _last; - } else { + } else + { throw new ExpInvalidTokenException( _current ); } - } else if( char.IsPunctuation( c ) || char.IsSymbol( c ) ) { - switch( c ) { + } else if( char.IsPunctuation( c ) || char.IsSymbol( c ) ) + { + switch( c ) + { case '"': char cNext = source[ 1 ]; if( cNext == '\"' ) //empty string { begin = _current; _current += 2; - return new( - string.Empty, _lineNum, begin, - TokenFlag.String ); + return new( string.Empty, _lineNum, begin, TokenFlag.String ); } - Match match = _nextStringLiteralPattern.Match( - _lineCache, _current ); - if( match.Success ) { + Match match = _nextStringLiteralPattern.Match( _lineCache, _current ); + if( match.Success ) + { begin = match.Groups[ "token" ].Index; end = match.Groups[ "end" ].Index; rest = match.Groups[ "rest" ].Index; _current = rest; _last = new( - ExpCompile.PoolString( - source[ 1..( end - begin ) ] ), - _lineNum, begin, TokenFlag.String ); + ExpressCompile.PoolString( source[ 1..( end - begin ) ] ), _lineNum, + begin, TokenFlag.String ); return _last; - } else { + } else + { throw new ExpInvalidCharException( '\"' ); } case '(': cNext = source[ 1 ]; - if( cNext == '*' ) { + if( cNext == '*' ) + { _isReadingMultiLineComment = true; _current += 2; goto readLine; - } else { + } else + { begin = _current; _current++; _last = new( - ExpCompile.PoolString( source[ ..1 ] ), - _lineNum, begin, TokenFlag.Separator_Left ); + ExpressCompile.PoolString( source[ ..1 ] ), _lineNum, begin, + TokenFlag.Separator_Left ); return _last; } case ')' or '}': begin = _current; _current++; _last = new Token( - ExpCompile.PoolString( ")" ), _lineNum, begin, + ExpressCompile.PoolString( ")" ), _lineNum, begin, TokenFlag.Separator_Right ); return _last; case '-': @@ -190,36 +199,41 @@ namespace StgSharp.Script.Express // 3. - number type param(UNARY) // 4. param - param(BINARY) cNext = source[ 1 ]; - if( char.IsNumber( cNext ) ) { - match = _nextNumberLiteralPattern.Match( - _lineCache, _current ); - if( match.Success ) { - begin = match.Groups[ Token ].Index; - end = match.Groups[ End ].Index; - rest = match.Groups[ Rest ].Index; + if( char.IsNumber( cNext ) ) + { + match = _nextNumberLiteralPattern.Match( _lineCache, _current ); + if( match.Success ) + { + begin = match.Groups[ TokenMark ].Index; + end = match.Groups[ EndMark ].Index; + rest = match.Groups[ RestMark ].Index; _current = rest; return new( - ExpCompile.PoolString( - source[ ..( end - begin ) ] ), + ExpressCompile.PoolString( source[ ..( end - begin ) ] ), _lineNum, begin, TokenFlag.Number ); - } else { + } else + { throw new ExpInvalidTokenException( _current ); } - } else if( cNext == '-' ) { + } else if( cNext == '-' ) + { _lineCache = string.Empty; _current = 0; goto readLine; - } else { + } else + { begin = _current; _current++; - if( _last.Flag != TokenFlag.Member ) { + if( _last.Flag != TokenFlag.Member ) + { _last = new( - ExpCompile.PoolString( source[ ..1 ] ), - _lineNum, begin, TokenFlag.Symbol_Unary ); - } else { + ExpressCompile.PoolString( source[ ..1 ] ), _lineNum, begin, + TokenFlag.Symbol_Unary ); + } else + { _last = new( - ExpCompile.PoolString( source[ ..1 ] ), - _lineNum, begin, TokenFlag.Symbol_Binary ); + ExpressCompile.PoolString( source[ ..1 ] ), _lineNum, begin, + TokenFlag.Symbol_Binary ); } return _last; } @@ -227,70 +241,101 @@ namespace StgSharp.Script.Express begin = _current; _current++; return new Token( - ExpCompile.PoolString( "{" ), _lineNum, begin, + ExpressCompile.PoolString( "{" ), _lineNum, begin, TokenFlag.Separator_Left ); case '[': begin = _current; _current++; return new Token( - ExpCompile.PoolString( "[" ), _lineNum, begin, + ExpressCompile.PoolString( "[" ), _lineNum, begin, TokenFlag.Index_Left ); case ']': begin = _current; _current++; return new Token( - ExpCompile.PoolString( "]" ), _lineNum, begin, + ExpressCompile.PoolString( "]" ), _lineNum, begin, TokenFlag.Index_Right ); case ';' or ',': begin = _current; _current++; return new Token( - ExpCompile.PoolString( source[ ..1 ] ), _lineNum, - begin, TokenFlag.Separator_Middle ); - case ':' or '+' or '/' or '\\' or '*' or '.': + ExpressCompile.PoolString( source[ ..1 ] ), _lineNum, begin, + TokenFlag.Separator_Middle ); + case ':': + if( source[ 1 ] == '=' ) + { + begin = _current; + _current += 2; + return new Token( + ExpressCompile.KeyWord.Assignment, _lineNum, begin, + TokenFlag.Index_Right ); + } + begin = _current; + _current++; + return new Token( + ExpressCompile.KeyWord.Colon, _lineNum, begin, TokenFlag.Index_Right ); + case '+' or '/' or '\\' or '*' or '.': begin = _current; _current++; return new( - ExpCompile.PoolString( source[ ..1 ] ), _lineNum, - begin, TokenFlag.Symbol_Binary ); + ExpressCompile.PoolString( source[ ..1 ] ), _lineNum, begin, + TokenFlag.Symbol_Binary ); default: throw new ExpInvalidCharException( c ); } - } else if( char.IsNumber( c ) ) { - Match match = _nextNumberLiteralPattern.Match( - _lineCache, _current ); - if( match.Success ) { - begin = match.Groups[ Token ].Index; - end = match.Groups[ End ].Index; - rest = match.Groups[ Rest ].Index; + } else if( char.IsNumber( c ) ) + { + Match match = _nextNumberLiteralPattern.Match( _lineCache, _current ); + if( match.Success ) + { + begin = match.Groups[ TokenMark ].Index; + end = match.Groups[ EndMark ].Index; + rest = match.Groups[ RestMark ].Index; _current = rest; - string str = ExpCompile.PoolString( - source[ ..( end - begin ) ] ); + string str = ExpressCompile.PoolString( source[ ..( end - begin ) ] ); TokenFlag flag; - if( ReferenceEquals( str, ExpCompile.KeyWord.Not ) ) { + if( ReferenceEquals( str, ExpressCompile.KeyWord.Not ) ) + { flag = TokenFlag.Symbol_Unary; - } else { - flag = ExpCompile.LetterIsOperator( str ) ? + } else + { + flag = ExpressCompile.LetterIsOperator( str ) ? TokenFlag.Symbol_Binary : TokenFlag.Member; } return new( str, _lineNum, begin, flag ); - } else { + } else + { throw new ExpInvalidTokenException( _current ); } - } else if( char.IsWhiteSpace( c ) ) { + } else if( char.IsWhiteSpace( c ) ) + { Match match = _skipBlankPattern.Match( _lineCache, _current ); - if( match.Success ) { - rest = match.Groups[ Rest ].Index; + if( match.Success ) + { + rest = match.Groups[ RestMark ].Index; _current = rest; goto readLine; - } else { + } else + { throw new ExpInvalidTokenException( _current ); } - } else { + } else + { throw new ExpInvalidCharException( c ); } } + public bool TryReadToken( out Token t ) + { + if( IsEmpty ) + { + t = Token.Empty; + return false; + } + t = ReadToken(); + return true; + } + [GeneratedRegex( @"(?[a-zA-Z][a-zA-Z0-9_]*)(?\s*?)(?\S|$)", RegexOptions.Singleline )] diff --git a/StgSharp.Script/Express/GeneratedExpSchema.cs b/StgSharp.Script/Express/GeneratedExpSchema.cs index 6eec5506..03477e82 100644 --- a/StgSharp.Script/Express/GeneratedExpSchema.cs +++ b/StgSharp.Script/Express/GeneratedExpSchema.cs @@ -46,7 +46,7 @@ namespace StgSharp.Script.Express public static ExpSchema DefaultSchema { - get => ExpSchema_Nitload.Only; + get => ExpSchema_Builtin.Only; } public ExpTypeSource GetExpType( string typeName ) diff --git a/StgSharp.Script/obj/x64/Debug/net8.0/StgSharp.Script.AssemblyInfo.cs b/StgSharp.Script/obj/x64/Debug/net8.0/StgSharp.Script.AssemblyInfo.cs index d04f0ca8..845e0287 100644 --- a/StgSharp.Script/obj/x64/Debug/net8.0/StgSharp.Script.AssemblyInfo.cs +++ b/StgSharp.Script/obj/x64/Debug/net8.0/StgSharp.Script.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp.Script")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e73d2fd7fb4e601c32cee66e276f219fc9b4a377")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+528d0c5462b4d3da107ad29b859f9c8006fb675a")] [assembly: System.Reflection.AssemblyProductAttribute("StgSharp.Script")] [assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.Script")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/StgSharp.Script/obj/x64/Debug/net8.0/StgSharp.Script.sourcelink.json b/StgSharp.Script/obj/x64/Debug/net8.0/StgSharp.Script.sourcelink.json index 5e5a4d9d..2738e12a 100644 --- a/StgSharp.Script/obj/x64/Debug/net8.0/StgSharp.Script.sourcelink.json +++ b/StgSharp.Script/obj/x64/Debug/net8.0/StgSharp.Script.sourcelink.json @@ -1 +1 @@ -{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/e73d2fd7fb4e601c32cee66e276f219fc9b4a377/*"}} \ No newline at end of file +{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/528d0c5462b4d3da107ad29b859f9c8006fb675a/*"}} \ No newline at end of file diff --git a/StgSharpDebug/ExpLinearExpressionTest.cs b/StgSharpDebug/ExpLinearExpressionTest.cs new file mode 100644 index 00000000..24199cac --- /dev/null +++ b/StgSharpDebug/ExpLinearExpressionTest.cs @@ -0,0 +1,82 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ExpLinearExpressionTest.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Script; +using StgSharp.Script.Express; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp +{ + internal class ExpTestFuncSource : ExpFunctionSource + { + + public ExpTestFuncSource( string name, ScriptSourceTransmitter source ) + : base( name, source ) + { + LocalVariables.Add( + "a", + ExpElementInstanceBase.CreateLiteral( new Token( "1", 0, 0, TokenFlag.Number ) ) ); + LocalVariables.Add( + "b", + ExpElementInstanceBase.CreateLiteral( new Token( "1", 0, 0, TokenFlag.Number ) ) ); + LocalVariables.Add( + "c", + ExpElementInstanceBase.CreateLiteral( new Token( "1", 0, 0, TokenFlag.Number ) ) ); + } + + } + + internal static partial class Program + { + + public static void ExpLinearExpressionTest() + { + ExpressCompile.InitCompile(); + ScriptSourceTransmitter transmitter = new ScriptSourceTransmitter( "END", 0 ); + transmitter.WriteLine( @"a := b + c;" ); + transmitter.EndWriting(); + ExpSourceReader reader = new ExpSourceReader( transmitter ); + /* + ExpNodeGenerator generator = new ExpNodeGenerator( + , new ExpTestFuncSource( "test", transmitter ) ); + /**/ + while( reader.TryReadToken( out Token t ) ) + { + Console.WriteLine( t.Value ); + } + } + + } +} diff --git a/StgSharpDebug/Program.cs b/StgSharpDebug/Program.cs index 2df24694..fa6f062e 100644 --- a/StgSharpDebug/Program.cs +++ b/StgSharpDebug/Program.cs @@ -58,37 +58,7 @@ namespace StgSharp { try { StgSharp.Init(); - - CompileStack stack = new CompileStack( - ); - - 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 ); - - 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 ) ); - } - - 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 ); - } - + ExpLinearExpressionTest(); return; } catch( Exception ex ) { diff --git a/StgSharpDebug/TestFileRead.cs b/StgSharpDebug/TestFileRead.cs index 6b242102..6ba42af4 100644 --- a/StgSharpDebug/TestFileRead.cs +++ b/StgSharpDebug/TestFileRead.cs @@ -43,7 +43,7 @@ namespace StgSharp private static void TestFileRead() { - ExpCompile.InitCompile(); + ExpressCompile.InitCompile(); ExpFileSource reader = new ExpFileSource( testExpPath ); ExpSchemaSource schemaSource = new ExpSchemaSource(); schemaSource.ReadSchema( reader ); diff --git a/StgSharpDebug/obj/x64/Debug/net8.0/StgSharpDebug.AssemblyInfo.cs b/StgSharpDebug/obj/x64/Debug/net8.0/StgSharpDebug.AssemblyInfo.cs index 8f7cea26..c0e95cc9 100644 --- a/StgSharpDebug/obj/x64/Debug/net8.0/StgSharpDebug.AssemblyInfo.cs +++ b/StgSharpDebug/obj/x64/Debug/net8.0/StgSharpDebug.AssemblyInfo.cs @@ -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+6788bc4a0065508d7afa5f740da1b4ca6dd1efef")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+528d0c5462b4d3da107ad29b859f9c8006fb675a")] [assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")] [assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/StgSharpDebug/obj/x64/Debug/net8.0/StgSharpDebug.sourcelink.json b/StgSharpDebug/obj/x64/Debug/net8.0/StgSharpDebug.sourcelink.json index 2eeaae6f..2738e12a 100644 --- a/StgSharpDebug/obj/x64/Debug/net8.0/StgSharpDebug.sourcelink.json +++ b/StgSharpDebug/obj/x64/Debug/net8.0/StgSharpDebug.sourcelink.json @@ -1 +1 @@ -{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/6788bc4a0065508d7afa5f740da1b4ca6dd1efef/*"}} \ No newline at end of file +{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/528d0c5462b4d3da107ad29b859f9c8006fb675a/*"}} \ No newline at end of file