Daily update on 20250324-100332 by Nitload Youmu. Additional Message : Single line syntax analyzer ok, gonging on unit test of multi line, func call. Then building branch, loop, area syntax analyzer. Some of descriptors not supported.

Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
Nitload
2025-03-24 10:03:32 +08:00
parent 148b0fed4a
commit ffd5825a05
52 changed files with 522 additions and 560 deletions
@@ -1,51 +1,51 @@
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\build\stgsharp.c.bsc
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\dllmain.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\dllmain.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\dllmain.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat3.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat3.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat3.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\intrinsic.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\intrinsic.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\intrinsic.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vc143.pdb
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vc143.idb
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharpc.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharpc.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharpc.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\intrinsic.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\intrinsic.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\intrinsic.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\string.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\string.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\string.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat4.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat4.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat4.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat2.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat2.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat2.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\hash.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\hash.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\hash.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vector_dot.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vector_dot.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vector_dot.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vector.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vector.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vector.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\hash.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\hash.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\hash.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stb_image.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stb_image.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stb_image.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vc143.pdb
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat2.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat2.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat2.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat3.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat3.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat3.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vector_dot.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vector_dot.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vector_dot.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\dllmain.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\dllmain.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\dllmain.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\build\stgsharp.c.dll
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\build\stgsharp.c.pdb
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\build\stgsharp.c.lib
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\build\stgsharp.c.exp
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.ilk
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vc143.idb
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\bscmake.command.1.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\bscmake.read.1.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\bscmake.write.1.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\cl.11516.write.1.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\cl.command.1.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\cl.items.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\cl.read.1.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\cl.write.1.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\link.command.1.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\link.read.1.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\link.secondary.1.tlog
Binary file not shown.
Binary file not shown.
Binary file not shown.
+84 -75
View File
@@ -1,97 +1,48 @@
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(517,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
hash.c
dllmain.c
intrinsic.c
mat2.c
mat3.c
mat4.c
stb_image.c
StgSharpC.c
hash.c
string.c
vector.c
vector_dot.c
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(4,50): warning C4028: 形参 1 与声明不同
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\string.c(21,54): warning C4267: “return”: 从“size_t”转换到“int”,可能丢失数据
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(5,49): warning C4028: 形参 1 与声明不同
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(6,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(83,23): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\string.c(36,54): warning C4267: “return”: 从“size_t”转换到“int”,可能丢失数据
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(6,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(8,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(8,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(7,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(90,16): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(16,50): warning C4028: 形参 1 与声明不同
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(7,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(97,33): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(97,48): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(9,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(18,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\hash.c(29,43): warning C4244: “函数”: 从“uint64_t”转换到“unsigned char”,可能丢失数据
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(18,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(114,33): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(114,48): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(20,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\hash.c(30,50): warning C4244: “函数”: 从“uint64_t”转换到“unsigned char”,可能丢失数据
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(127,23): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(15,49): warning C4028: 形参 1 与声明不同
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\stb_image.c(882,25): warning C4047: “=”:“stbi_uc”与“char [33]”的间接级别不同
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\StgSharpC.c(14,30): warning C4244: “函数”: 从“uint64_t”转换到“GLuint”,可能丢失数据
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\StgSharpC.c(16,43): warning C4244: “函数”: 从“uint64_t”转换到“GLuint”,可能丢失数据
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(9,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(20,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(136,16): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\hash.c(7,15): warning C4090: “初始化”: 不同的“const”限定符
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(9,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(17,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(31,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\hash.c(7,34): warning C4090: “初始化”: 不同的“const”限定符
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(144,33): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(17,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(11,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(31,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(144,48): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(11,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(32,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(32,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(19,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(20,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(20,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(40,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(19,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(22,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(40,64): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(22,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(24,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(46,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(21,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(24,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(46,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(26,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(47,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(26,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(47,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(22,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(55,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(36,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(55,64): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(36,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(38,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(29,49): warning C4028: 形参 1 与声明不同
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(38,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(40,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(40,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(31,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(42,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(42,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(31,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(51,54): warning C4028: 形参 1 与声明不同
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(51,84): warning C4028: 形参 2 与声明不同
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(33,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(53,22): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(54,22): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(33,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(55,22): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(56,22): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(59,28): warning C4013: “det_mat3_internal”未定义;假设外部返回 int
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(35,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(59,28): warning C4244: “函数”: 从“int”转换到“float”,可能丢失数据
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(59,62): warning C4244: “函数”: 从“int”转换到“float”,可能丢失数据
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(60,28): warning C4244: “函数”: 从“int”转换到“float”,可能丢失数据
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(36,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(60,62): warning C4244: “函数”: 从“int”转换到“float”,可能丢失数据
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(61,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(69,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
@@ -99,43 +50,101 @@ D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\St
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(70,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(70,61): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(71,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(80,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(71,61): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(80,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(72,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(72,61): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(83,23): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(77,38): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(77,63): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(78,38): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(90,16): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(78,63): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(97,33): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(88,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(88,61): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(97,48): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(89,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(89,61): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(90,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(90,61): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(91,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(114,33): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(91,61): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(114,48): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(96,38): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(96,63): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(97,38): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(97,63): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(127,23): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(136,16): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(144,33): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(144,48): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(4,50): warning C4028: 形参 1 与声明不同
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(6,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(6,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(8,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(8,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(16,50): warning C4028: 形参 1 与声明不同
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(18,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(18,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(5,49): warning C4028: 形参 1 与声明不同
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(20,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(20,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(7,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(7,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(31,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(31,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(9,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(32,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(32,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(15,49): warning C4028: 形参 1 与声明不同
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(40,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(17,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(40,64): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(17,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(46,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(46,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(47,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(19,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(47,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(19,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(55,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(55,64): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(21,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(22,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(29,49): warning C4028: 形参 1 与声明不同
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(31,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(31,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(33,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(33,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(35,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(36,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(80,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(80,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(81,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(81,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(77,38): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(82,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(77,63): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(82,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(78,38): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(91,38): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(78,63): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(91,60): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(92,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(92,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(88,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(88,61): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(106,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(89,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(106,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(89,61): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(107,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(90,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(107,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(90,61): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(108,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(91,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(108,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(91,61): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(117,38): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(96,38): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(117,60): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(96,63): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(97,38): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(118,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(97,63): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(118,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\hash.c(29,43): warning C4244: “函数”: 从“uint64_t”转换到“unsigned char”,可能丢失数据
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\hash.c(30,50): warning C4244: “函数”: 从“uint64_t”转换到“unsigned char”,可能丢失数据
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\hash.c(7,15): warning C4090: “初始化”: 不同的“const”限定符
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\hash.c(7,34): warning C4090: “初始化”: 不同的“const”限定符
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\string.c(21,54): warning C4267: “return”: 从“size_t”转换到“int”,可能丢失数据
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\string.c(36,54): warning C4267: “return”: 从“size_t”转换到“int”,可能丢失数据
正在创建库 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\build\StgSharp.C.lib 和对象 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\build\StgSharp.C.exp
LINK : warning LNK4098: 默认库“MSVCRT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
StgSharpC.vcxproj -> D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\build\StgSharp.C.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp.Common")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e3741687a706609a1d0055c3fd11f41945838a70")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+148b0fed4a1abaaeaa3a28e7c7b088590805ebef")]
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp.Common")]
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.Common")]
[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/e3741687a706609a1d0055c3fd11f41945838a70/*"}}
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/148b0fed4a1abaaeaa3a28e7c7b088590805ebef/*"}}
@@ -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+528d0c5462b4d3da107ad29b859f9c8006fb675a")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+148b0fed4a1abaaeaa3a28e7c7b088590805ebef")]
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp.Model")]
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.Model")]
[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/528d0c5462b4d3da107ad29b859f9c8006fb675a/*"}}
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/148b0fed4a1abaaeaa3a28e7c7b088590805ebef/*"}}
+46 -38
View File
@@ -38,8 +38,7 @@ using System.Threading.Tasks;
namespace StgSharp.Script
{
public partial class CompileStack<TNode, TType>
where TNode: IASTNode<TNode, TType>
public partial class CompileStack<TNode, TType> where TNode: IASTNode<TNode, TType>
where TType: ITypeSource<TType>
{
@@ -48,11 +47,15 @@ namespace StgSharp.Script
private Token[] _tokenArray = new Token[4];
private int _nodeCount,_tokenCount, _operatorCount;
private Stack<CompileDepthMark> _depthStack = new Stack<CompileDepthMark>(
);
private Stack<CompileDepthMark> _depthStack = new Stack<CompileDepthMark>();
private Stack<bool> _isNode = new Stack<bool>();
public CompileStack()
{
_depthStack.Push( new CompileDepthMark( 0, 0, 0 ) );
}
public CompileDepthMark CurrentDepthMark
{
get => _depthStack.Peek();
@@ -82,28 +85,26 @@ namespace StgSharp.Script
public CompileDepthMark IncreaseDepth( int usage )
{
CompileDepthMark mark =
new CompileDepthMark
{
OperandBegin = OperandCount,
OperatorBegin = OperatorCount,
State = usage
};
new CompileDepthMark( OperatorCount, OperandCount, usage );
_depthStack.Push( mark );
return mark;
}
public bool PeekOperand( out Token t, out TNode n )
{
if( OperandAheadOfDepth <= 0 ) {
if( OperandAheadOfDepth <= 0 )
{
t = Token.Empty;
n = TNode.Empty;
return false;
}
if( _isNode.Pop() ) {
if( _isNode.Pop() )
{
t = Token.Empty;
n = _nodeArray[ _nodeCount - 1 ];
return true;
} else {
} else
{
t = _tokenArray[ _tokenCount - 1 ];
n = TNode.Empty;
return false;
@@ -120,16 +121,19 @@ namespace StgSharp.Script
public bool PopOperand( out Token t, out TNode n )
{
if( OperandAheadOfDepth <= 0 ) {
if( OperandAheadOfDepth <= 0 )
{
t = Token.Empty;
n = TNode.Empty;
return false;
}
if( _isNode.Pop() ) {
if( _isNode.Pop() )
{
t = Token.Empty;
n = _nodeArray[ --_nodeCount ];
return true;
} else {
} else
{
t = _tokenArray[ --_tokenCount ];
n = TNode.Empty;
return false;
@@ -138,7 +142,8 @@ namespace StgSharp.Script
public Token PopOperator()
{
if( OperatorAheadOfDepth > 0 ) {
if( OperatorAheadOfDepth > 0 )
{
_operatorCount--;
return _operatorArray[ _operatorCount ];
}
@@ -176,18 +181,21 @@ namespace StgSharp.Script
public bool TryPeekOperand( out bool isNode, out Token t, out TNode n )
{
if( OperandAheadOfDepth <= 0 ) {
if( OperandAheadOfDepth <= 0 )
{
t = Token.Empty;
n = TNode.Empty;
isNode = false;
return false;
}
if( _isNode.Pop() ) {
if( _isNode.Pop() )
{
t = Token.Empty;
n = _nodeArray[ _nodeCount - 1 ];
isNode = true;
return true;
} else {
} else
{
t = _tokenArray[ _tokenCount - 1 ];
n = TNode.Empty;
isNode = false;
@@ -197,7 +205,8 @@ namespace StgSharp.Script
public bool TryPeekOperator( out Token op )
{
if( OperatorAheadOfDepth > 0 ) {
if( OperatorAheadOfDepth > 0 )
{
op = _operatorArray[ _operatorCount - 1 ];
return true;
}
@@ -207,18 +216,21 @@ namespace StgSharp.Script
public bool TryPopOperand( out bool isNode, out Token t, out TNode n )
{
if( OperandAheadOfDepth <= 0 ) {
if( OperandAheadOfDepth <= 0 )
{
t = Token.Empty;
n = TNode.Empty;
isNode = false;
return false;
}
if( _isNode.Pop() ) {
if( _isNode.Pop() )
{
t = Token.Empty;
n = _nodeArray[ --_nodeCount ];
isNode = true;
return true;
} else {
} else
{
t = _tokenArray[ --_tokenCount ];
n = TNode.Empty;
isNode = false;
@@ -228,7 +240,8 @@ namespace StgSharp.Script
public bool TryPopOperator( out Token op )
{
if( OperatorAheadOfDepth > 0 ) {
if( OperatorAheadOfDepth > 0 )
{
op = _operatorArray[ --_operatorCount ];
return true;
}
@@ -241,23 +254,18 @@ namespace StgSharp.Script
public class CompileDepthMark
{
public int OperandBegin
public CompileDepthMark( int operatorBegin, int operandBegin, int state )
{
get;
internal set;
OperatorBegin = operatorBegin;
OperandBegin = operandBegin;
State = state;
}
public int OperatorBegin
{
get;
internal set;
}
public int OperandBegin { get; internal set; }
public int State
{
get;
internal set;
}
public int OperatorBegin { get; internal set; }
public int State { get; internal set; }
}
}
+10 -34
View File
@@ -43,47 +43,23 @@ namespace StgSharp.Script
where TType: ITypeSource<TType>
{
long NodeFlag
{
get;
}
long NodeFlag { get; }
string CodeConvertTemplate
{
get;
}
string CodeConvertTemplate { get; }
TNode Previous
{
get;
set;
}
TNode Previous { get; set; }
TNode Next
{
get;
set;
}
TNode Next { get; set; }
TNode Left
{
get;
}
TNode Left { get; }
TNode Right
{
get;
}
TNode Right { get; }
static abstract TNode Empty
{
get;
}
static abstract TNode Empty { get; }
TType EqualityTypeConvert
{
get;
}
Token Source { get; }
TType EqualityTypeConvert { get; }
void AppendNode( TNode nextToken );
@@ -41,8 +41,7 @@ namespace StgSharp.Script.Express
internal partial class ExpSchema_Builtin : ExpSchema
{
private static readonly ExpSchema_Builtin _onlyInstance = new ExpSchema_Builtin(
);
private static readonly ExpSchema_Builtin _onlyInstance = new ExpSchema_Builtin();
private ExpSchema_Builtin()
: base()
@@ -60,9 +59,7 @@ namespace StgSharp.Script.Express
return;
}
public override bool TryGetConst(
string name,
out ExpElementInstanceBase c )
public override bool TryGetConst( string name, out ExpElementInstanceBase c )
{
return ConstDict.TryGetValue( name, out c );
}
@@ -73,9 +70,7 @@ namespace StgSharp.Script.Express
return false;
}
public override bool TryGetFunction(
string name,
out ExpFunctionSource f )
public override bool TryGetFunction( string name, out ExpFunctionSource f )
{
return FunctionDict.TryGetValue( name, out f! );
}
@@ -86,9 +81,7 @@ namespace StgSharp.Script.Express
return false;
}
public override bool TryGetSchemaInclude(
string name,
out ExpSchema include )
public override bool TryGetSchemaInclude( string name, out ExpSchema include )
{
include = null!;
return false;
@@ -103,37 +96,33 @@ namespace StgSharp.Script.Express
{
IEnumerable<KeyValuePair<string, ExpTypeSource>> builtinTypeSource = [
new KeyValuePair<string, ExpTypeSource>(
PoolString( KeyWord.Integer ),
new ExpBuiltinType( KeyWord.Integer, typeof( int ) ) ),
PoolString( Keyword.Integer ),
new ExpBuiltinType( Keyword.Integer, typeof( int ) ) ),
new KeyValuePair<string, ExpTypeSource>(
PoolString( KeyWord.Real ),
new ExpBuiltinType( KeyWord.Real, typeof( float ) ) ),
PoolString( Keyword.Real ), new ExpBuiltinType( Keyword.Real, typeof( float ) ) ),
new KeyValuePair<string, ExpTypeSource>(
PoolString( KeyWord.Boolean ),
new ExpBuiltinType( KeyWord.Boolean, typeof( bool ) ) ),
PoolString( Keyword.Boolean ),
new ExpBuiltinType( Keyword.Boolean, typeof( bool ) ) ),
new KeyValuePair<string, ExpTypeSource>(
PoolString( KeyWord.Logical ),
new ExpBuiltinType( KeyWord.Logical, typeof( ExpLogic ) ) ),
PoolString( Keyword.Logical ),
new ExpBuiltinType( Keyword.Logical, typeof( ExpLogic ) ) ),
new KeyValuePair<string, ExpTypeSource>(
PoolString( KeyWord.String ),
new ExpBuiltinType( KeyWord.String, typeof( string ) ) ),
PoolString( Keyword.String ),
new ExpBuiltinType( Keyword.String, typeof( string ) ) ),
new KeyValuePair<string, ExpTypeSource>(
PoolString( KeyWord.Binary ),
new ExpBuiltinType( KeyWord.Binary, typeof( BitArray ) ) ),
PoolString( Keyword.Binary ),
new ExpBuiltinType( Keyword.Binary, typeof( BitArray ) ) ),
];
TypeDict = new Dictionary<string, ExpTypeSource>(
builtinTypeSource, Multiplexer ).ToFrozenDictionary();
TypeDict = new Dictionary<string, ExpTypeSource>( builtinTypeSource,
Multiplexer ).ToFrozenDictionary();
ConstDict = new Dictionary<string, ExpElementInstanceBase>(
Multiplexer ) {
ConstDict = new Dictionary<string, ExpElementInstanceBase>( Multiplexer ) {
{ PoolString( "PI" ), new ExpRealNumberNode(
new Token( PoolString( "PI" ), -1, -1, TokenFlag.Number ),
MathF.PI ) },
new Token( PoolString( "PI" ), -1, -1, TokenFlag.Number ), MathF.PI ) },
{ PoolString( "E" ), new ExpRealNumberNode(
new Token( PoolString( "E" ), -1, -1, TokenFlag.Number ),
MathF.E ) },
new Token( PoolString( "E" ), -1, -1, TokenFlag.Number ), MathF.E ) },
}.ToFrozenDictionary();
}
@@ -1,6 +1,6 @@
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
// file="ExpressCompile.cs"
// file="ExpCompile.cs"
// Project: StgSharp
// AuthorGroup: Nitload Space
// Copyright (c) Nitload Space. All rights reserved.
@@ -88,32 +88,28 @@ namespace StgSharp.Script.Express
InitPrecedence();
_operatorsWithLetter = [
KeyWord.Add,
KeyWord.Sub,
KeyWord.Mul,
KeyWord.Div,
KeyWord.And,
KeyWord.Or,
KeyWord.Xor,
KeyWord.AndOr,
KeyWord.Not,
Keyword.Add,
Keyword.Sub,
Keyword.Mul,
Keyword.Div,
Keyword.And,
Keyword.Or,
Keyword.Xor,
Keyword.AndOr,
Keyword.Not,
];
ExpSchema_Builtin.Only
.TryGetType(
PoolString( KeyWord.Integer ),
out ExpTypeSource? _expInt );
PoolString( Keyword.Integer ), out ExpTypeSource? _expInt );
ExpInt = _expInt;
ExpSchema_Builtin.Only
.TryGetType(
PoolString( KeyWord.Real ),
out ExpTypeSource? _expReal );
.TryGetType( PoolString( Keyword.Real ), out ExpTypeSource? _expReal );
ExpReal = _expReal;
ExpSchema_Builtin.Only
.TryGetType(
PoolString( KeyWord.Boolean ),
out ExpTypeSource? _expBool );
PoolString( Keyword.Boolean ), out ExpTypeSource? _expBool );
ExpBool = _expBool;
_emptyCache = new StringPool();
@@ -40,20 +40,16 @@ namespace StgSharp.Script.Express
public static partial class ExpressCompile
{
public static bool TryGetOperatorPrecedence(
string operatorName,
out int precedence )
public static bool TryGetOperatorPrecedence( string operatorName, out int precedence )
{
return _operatorPrecedence.TryGetValue(
operatorName, out precedence );
return _operatorPrecedence.TryGetValue( operatorName, out precedence );
}
public static bool TryGetSuperTypeOperatorPrecedence(
string operatorName,
out int precedence )
{
return _superTypeOperatorPrecedent.TryGetValue(
operatorName, out precedence );
return _superTypeOperatorPrecedent.TryGetValue( operatorName, out precedence );
}
private static void InitPrecedence()
@@ -86,16 +82,18 @@ namespace StgSharp.Script.Express
new KeyValuePair<string, int>( PoolString( ":<>:" ), 6 ),
new KeyValuePair<string, int>( PoolString( "IN" ), 6 ),
new KeyValuePair<string, int>( PoolString( "LIKE" ), 6 ),
new KeyValuePair<string, int>( PoolString( Keyword.Assignment ), 7 )
];
_operatorPrecedence = new Dictionary<string, int>(
source, _multiplexer ).ToFrozenDictionary();
_operatorPrecedence = new Dictionary<string, int>( source,
_multiplexer ).ToFrozenDictionary();
source = [
new KeyValuePair<string, int>( "ONEOF", 1 ),
new KeyValuePair<string, int>( "AND", 2 ),
new KeyValuePair<string, int>( "ANDOR", 3 ),
];
_superTypeOperatorPrecedent = new Dictionary<string, int>(
source, _multiplexer ).ToFrozenDictionary();
_superTypeOperatorPrecedent = new Dictionary<string, int>( source,
_multiplexer ).ToFrozenDictionary(
);
}
#pragma warning disable CS8618
+15 -49
View File
@@ -46,12 +46,11 @@ namespace StgSharp.Script.Express
{
_keywordSet = new();
FieldInfo[] fields = typeof( KeyWord ).GetFields(
BindingFlags.Public );
FieldInfo[] fields = typeof( Keyword ).GetFields( BindingFlags.Public );
ParallelLoopResult result = Parallel.ForEach(
fields, static( field ) => {
if( field.FieldType == typeof( string ) && field.GetValue(
null ) is string str ) {
if( field.FieldType == typeof( string ) && field.GetValue( null ) is string str )
{
_compileStringCache.GetOrAdd( str );
_keywordSet.Add( str );
}
@@ -59,7 +58,7 @@ namespace StgSharp.Script.Express
while( !result.IsCompleted ) { }
}
public static class KeyWord
public static class Keyword
{
public static HashSet<string> ScopeBlock = new HashSet<string> {
@@ -74,24 +73,15 @@ namespace StgSharp.Script.Express
CommentStart, CommentEnd, ColonEqualColon, ColonNotEqualColon
];
public static HashSet<string> DataTypes
{
get;
} = [
public static HashSet<string> DataTypes { get; } = [
Array, Bag, Binary, Boolean, Enumeration, Integer, List, Logical, Number, Of, Real, Set, String
];
public static HashSet<string> InternalProcess
{
get;
} = [
public static HashSet<string> InternalProcess { get; } = [
Insert, Remove
];
public static HashSet<string> BuiltinFunctions
{
get;
} = [
public static HashSet<string> BuiltinFunctions { get; } = [
Abs, Acos, Asin, Atan, BLength, Cos, Exists, Exp,
Format, HiBound, HiIndex, Length, LoBound, Log,
Log2, Log10, LoIndex, Nvl, Odd, Rolesof, Sin,
@@ -99,62 +89,38 @@ namespace StgSharp.Script.Express
ValueIn, ValueUnique
];
public static HashSet<string> Literals
{
get;
} = [
public static HashSet<string> Literals { get; } = [
QuestionMark, Self, Const, E, Pi, False, True, Unknown
];
public static HashSet<string> Operators
{
get;
} = [
public static HashSet<string> Operators { get; } = [
And, AndOr, Div, In, Like, Mod, Not, Or, Xor,
Add, Sub, Mul, Slash, Equal, NotEqual,
LessThan, GreaterThan, LessThanOrEqual, GreaterThanOrEqual
];
public static HashSet<string> Aliasing
{
get;
} = [
public static HashSet<string> Aliasing { get; } = [
Alias, Renamed
];
public static HashSet<string> ModifiersAttributes
{
get;
} = [
public static HashSet<string> ModifiersAttributes { get; } = [
Abstract, Aggregate, As, BasedOn, By, Escape, Fixed, From, Use, With
];
public static HashSet<string> QueryReference
{
get;
} = [
public static HashSet<string> QueryReference { get; } = [
Query, Reference, Select
];
public static HashSet<string> ConstraintsInheritance
{
get;
} = [
public static HashSet<string> ConstraintsInheritance { get; } = [
Oneof, Optional, Subtype, SubtypeConstraint, Supertype, TotalOver, Unique, Where
];
public static HashSet<string> Declarations
{
get;
} = [
public static HashSet<string> Declarations { get; } = [
Constant, Derive, Entity, Extensible, Fixed, Function, Generic,
GenericEntity, Inverse, Local, Procedure, Rule, Schema, Type, Var
];
public static HashSet<string> FlowControl
{
get;
} = [
public static HashSet<string> FlowControl { get; } = [
Begin, Case, Else, End, For, If, Otherwise, Repeat, Return, Skip, Then, To, Until, While
];
+6 -10
View File
@@ -45,8 +45,7 @@ namespace StgSharp.Script.Express
private Dictionary<string, ExpElementInstanceBase> _constants;
private IScriptSourceProvider _sourceProvider;
public ExpConstantCollectionSource(
IScriptSourceProvider sourceProvider )
public ExpConstantCollectionSource( IScriptSourceProvider sourceProvider )
{
_sourceProvider = sourceProvider;
_constants = new Dictionary<string, ExpElementInstanceBase>(
@@ -59,7 +58,7 @@ namespace StgSharp.Script.Express
public override string Name
{
get => ExpressCompile.KeyWord.Constant;
get => ExpressCompile.Keyword.Constant;
}
public override void Analyse()
@@ -75,24 +74,21 @@ namespace StgSharp.Script.Express
if( _constants.Count == 0 ) {
return null!;
}
if( _constants.TryGetValue( str,
out ExpElementInstanceBase? token ) ) {
if( _constants.TryGetValue( str, out ExpElementInstanceBase? token ) ) {
return token;
}
return null!;
}
public bool TryGetConstant(
string name,
out ExpElementInstanceBase instance )
public bool TryGetConstant( string name, out ExpElementInstanceBase instance )
{
return _constants.TryGetValue( name, out instance );
}
public override bool TryGetMember( string name, out ExpNode memberNode )
{
if( _constants.TryGetValue( name,
out ExpElementInstanceBase? node ) ) {
if( _constants.TryGetValue( name, out ExpElementInstanceBase? node ) )
{
memberNode = node;
return true;
}
@@ -46,7 +46,12 @@ namespace StgSharp.Script.Express
private ExpNode _left;
private ExpNode _right;
private ExpBinaryOperatorNode( Token source ) : base( source ) { }
private ExpBinaryOperatorNode( Token source, ExpNode left, ExpNode right )
: base( source )
{
_left = left;
_right = right;
}
public override ExpInstantiableElement EqualityTypeConvert => _returnType;
@@ -54,77 +59,59 @@ namespace StgSharp.Script.Express
public override ExpNode Right => _right;
public static ExpBinaryOperatorNode Add(
Token source,
ExpNode left,
ExpNode right )
public static ExpBinaryOperatorNode Add( Token source, ExpNode left, ExpNode right )
{
if( !left.IsNumber && !right.IsNumber ) {
throw new ExpInvalidTypeException(
"Number", left.EqualityTypeConvert.Name );
throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name );
}
bool isFloat =
( left._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == 0 || ( right._nodeFlag | ExpNodeFlag.BuiltinType_Real ) ==
0;
return new ExpBinaryOperatorNode( source )
return new ExpBinaryOperatorNode( source, left, right )
{
_returnType = isFloat ?
ExpressCompile.ExpReal : ExpressCompile.ExpInt,
_returnType = isFloat ? ExpressCompile.ExpReal : ExpressCompile.ExpInt,
_nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number,
CodeConvertTemplate = "{0} + {1}",
};
}
public static ExpBinaryOperatorNode Assign(
Token source,
ExpNode left,
ExpNode right )
public static ExpBinaryOperatorNode Assign( Token source, ExpNode left, ExpNode right )
{
if( left.EqualityTypeConvert != right.EqualityTypeConvert ) {
throw new ExpInvalidTypeException(
left.EqualityTypeConvert.Name,
right.EqualityTypeConvert.Name );
left.EqualityTypeConvert.Name, right.EqualityTypeConvert.Name );
}
return new ExpBinaryOperatorNode( source )
return new ExpBinaryOperatorNode( source, left, right )
{
_returnType = ExpInstantiableElement.Void,
_nodeFlag = ExpNodeFlag.Operator_Binary | left._nodeFlag,
CodeConvertTemplate = "{0} & {1}",
CodeConvertTemplate = "{0} = {1}",
};
}
public static ExpBinaryOperatorNode Div(
Token source,
ExpNode left,
ExpNode right )
public static ExpBinaryOperatorNode Div( Token source, ExpNode left, ExpNode right )
{
if( !left.IsNumber && !right.IsNumber ) {
throw new ExpInvalidTypeException(
"Number", left.EqualityTypeConvert.Name );
throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name );
}
bool isFloat =
( left._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == 0 || ( right._nodeFlag | ExpNodeFlag.BuiltinType_Real ) ==
0;
return new ExpBinaryOperatorNode( source )
return new ExpBinaryOperatorNode( source, left, right )
{
_returnType = isFloat ?
ExpressCompile.ExpReal : ExpressCompile.ExpInt,
_returnType = isFloat ? ExpressCompile.ExpReal : ExpressCompile.ExpInt,
_nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number,
CodeConvertTemplate = "{0} / {1}",
};
}
public static ExpBinaryOperatorNode EqualTo(
Token source,
ExpNode left,
ExpNode right )
public static ExpBinaryOperatorNode EqualTo( Token source, ExpNode left, ExpNode right )
{
if( left.EqualityTypeConvert != right.EqualityTypeConvert ) {
throw new ExpInvalidTypeException(
left.EqualityTypeConvert.Name,
right.EqualityTypeConvert.Name );
left.EqualityTypeConvert.Name, right.EqualityTypeConvert.Name );
}
return new ExpBinaryOperatorNode( source )
return new ExpBinaryOperatorNode( source, left, right )
{
_returnType = ExpressCompile.ExpBool,
_nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary,
@@ -132,16 +119,12 @@ namespace StgSharp.Script.Express
};
}
public static ExpBinaryOperatorNode GreaterThan(
Token source,
ExpNode left,
ExpNode right )
public static ExpBinaryOperatorNode GreaterThan( Token source, ExpNode left, ExpNode right )
{
if( !left.IsNumber && !right.IsNumber ) {
throw new ExpInvalidTypeException(
"Number", left.EqualityTypeConvert.Name );
throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name );
}
return new ExpBinaryOperatorNode( source )
return new ExpBinaryOperatorNode( source, left, right )
{
_returnType = ExpressCompile.ExpBool,
_nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary,
@@ -149,16 +132,12 @@ namespace StgSharp.Script.Express
};
}
public static ExpBinaryOperatorNode LessThan(
Token source,
ExpNode left,
ExpNode right )
public static ExpBinaryOperatorNode LessThan( Token source, ExpNode left, ExpNode right )
{
if( !left.IsNumber && !right.IsNumber ) {
throw new ExpInvalidTypeException(
"Number", left.EqualityTypeConvert.Name );
throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name );
}
return new ExpBinaryOperatorNode( source )
return new ExpBinaryOperatorNode( source, left, right )
{
_returnType = ExpressCompile.ExpBool,
_nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary,
@@ -166,38 +145,29 @@ namespace StgSharp.Script.Express
};
}
public static ExpBinaryOperatorNode Mul(
Token source,
ExpNode left,
ExpNode right )
public static ExpBinaryOperatorNode Mul( Token source, ExpNode left, ExpNode right )
{
if( !left.IsNumber && !right.IsNumber ) {
throw new ExpInvalidTypeException(
"Number", left.EqualityTypeConvert.Name );
throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name );
}
bool isFloat =
( left._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == 0 || ( right._nodeFlag | ExpNodeFlag.BuiltinType_Real ) ==
0;
return new ExpBinaryOperatorNode( source )
return new ExpBinaryOperatorNode( source, left, right )
{
_returnType = isFloat ?
ExpressCompile.ExpReal : ExpressCompile.ExpInt,
_returnType = isFloat ? ExpressCompile.ExpReal : ExpressCompile.ExpInt,
_nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number,
CodeConvertTemplate = "{0} * {1}",
};
}
public static ExpBinaryOperatorNode NotEqualTo(
Token source,
ExpNode left,
ExpNode right )
public static ExpBinaryOperatorNode NotEqualTo( Token source, ExpNode left, ExpNode right )
{
if( left.EqualityTypeConvert != right.EqualityTypeConvert ) {
throw new ExpInvalidTypeException(
left.EqualityTypeConvert.Name,
right.EqualityTypeConvert.Name );
left.EqualityTypeConvert.Name, right.EqualityTypeConvert.Name );
}
return new ExpBinaryOperatorNode( source )
return new ExpBinaryOperatorNode( source, left, right )
{
_returnType = ExpressCompile.ExpBool,
_nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary,
@@ -205,16 +175,12 @@ namespace StgSharp.Script.Express
};
}
public static ExpBinaryOperatorNode SmallerThan(
Token source,
ExpNode left,
ExpNode right )
public static ExpBinaryOperatorNode SmallerThan( Token source, ExpNode left, ExpNode right )
{
if( !left.IsNumber && !right.IsNumber ) {
throw new ExpInvalidTypeException(
"Number", left.EqualityTypeConvert.Name );
throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name );
}
return new ExpBinaryOperatorNode( source )
return new ExpBinaryOperatorNode( source, left, right )
{
_returnType = ExpressCompile.ExpBool,
_nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary,
@@ -222,22 +188,17 @@ namespace StgSharp.Script.Express
};
}
public static ExpBinaryOperatorNode Sub(
Token source,
ExpNode left,
ExpNode right )
public static ExpBinaryOperatorNode Sub( Token source, ExpNode left, ExpNode right )
{
if( !left.IsNumber && !right.IsNumber ) {
throw new ExpInvalidTypeException(
"Number", left.EqualityTypeConvert.Name );
throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name );
}
bool isFloat =
( left._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == 0 || ( right._nodeFlag | ExpNodeFlag.BuiltinType_Real ) ==
0;
return new ExpBinaryOperatorNode( source )
return new ExpBinaryOperatorNode( source, left, right )
{
_returnType = isFloat ?
ExpressCompile.ExpReal : ExpressCompile.ExpInt,
_returnType = isFloat ? ExpressCompile.ExpReal : ExpressCompile.ExpInt,
_nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number,
CodeConvertTemplate = "{0} - {1}",
};
@@ -55,9 +55,7 @@ namespace StgSharp.Script.Express
get
{
ExpSchema.BuiltinSchema
.TryGetType(
ExpressCompile.KeyWord.String,
out ExpTypeSource? strType );
.TryGetType( ExpressCompile.Keyword.String, out ExpTypeSource? strType );
return strType;
}
}
@@ -42,22 +42,19 @@ namespace StgSharp.Script.Express
private ExpElementInstanceBase _instance;
internal ExpInstanceReferenceNode(
Token source,
ExpElementInstanceBase instance )
internal ExpInstanceReferenceNode( Token source, ExpElementInstanceBase instance )
: base( source )
{
_instance = instance;
_nodeFlag = ( _instance._nodeFlag | ( ExpNodeFlag.Name_Any | ExpNodeFlag.Collection_Any ) );
}
internal ExpInstanceReferenceNode(
Token source,
ExpInstanceReferenceNode reference )
internal ExpInstanceReferenceNode( Token source, ExpInstanceReferenceNode reference )
: base( source )
{
_instance = reference._instance;
_nodeFlag = ( _instance._nodeFlag | ( ExpNodeFlag.Name_Any | ExpNodeFlag.Collection_Any ) );
CodeConvertTemplate = source.Value;
}
public override ExpNode Left => Empty;
@@ -71,6 +68,11 @@ namespace StgSharp.Script.Express
Token source,
ExpElementInstanceBase instance )
{
/*
if( instance.CodeConvertTemplate != source.Value ) {
throw new ExpCompileException( source, "Token point at a wrong instance" );
}
/**/
return new ExpInstanceReferenceNode( source, instance );
}
@@ -51,13 +51,13 @@ namespace StgSharp.Script.Express
public override IExpElementSource EqualityTypeConvert => ExpSchema.BuiltinSchema
.TryGetType(
ExpressCompile.KeyWord.Integer,
ExpressCompile.Keyword.Integer,
out ExpTypeSource? type ) ?
type : throw new ExpCompileNotInitializedException();
public int Value => _value;
public override string TypeName => ExpressCompile.KeyWord.Integer;
public override string TypeName => ExpressCompile.Keyword.Integer;
}
@@ -75,7 +75,7 @@ namespace StgSharp.Script.Express
public override IExpElementSource EqualityTypeConvert => ExpSchema.BuiltinSchema
.TryGetType(
ExpressCompile.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(
ExpressCompile.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(
ExpressCompile.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(
ExpressCompile.KeyWord.Logical,
ExpressCompile.Keyword.Logical,
out ExpTypeSource? type ) ?
type : throw new ExpCompileNotInitializedException();
+10 -27
View File
@@ -56,37 +56,20 @@ namespace StgSharp.Script.Express
get { return ( _nodeFlag | ExpNodeFlag.BuiltinType_Number ) != 0; }
}
public abstract ExpNode Left
{
get;
}
public abstract ExpNode Left { get; }
public static ExpNode Empty
{
get => ExpEmptyNode._only;
}
public ExpNode Next
{
get;
set;
}
public ExpNode Next { get; set; }
public abstract ExpNode Right
{
get;
}
public abstract ExpNode Right { get; }
public ExpNode Previous
{
get;
set;
}
public ExpNode Previous { get; set; }
public abstract IExpElementSource EqualityTypeConvert
{
get;
}
public abstract IExpElementSource EqualityTypeConvert { get; }
public int Line => _source.Line;
@@ -94,10 +77,11 @@ namespace StgSharp.Script.Express
public long NodeFlag => ( long )_nodeFlag;
public string CodeConvertTemplate
public string CodeConvertTemplate { get; init; }
public Token Source
{
get;
init;
get => _source;
}
public void AppendNode( ExpNode nextNode )
@@ -160,8 +144,7 @@ namespace StgSharp.Script.Express
public ExpEmptyNode() : base( Token.Empty ) { }
public ExpEmptyNode( int line, int column )
: base(
new Token( string.Empty, line, column, TokenFlag.None ) ) { }
: base( new Token( string.Empty, line, column, TokenFlag.None ) ) { }
public override ExpInstantiableElement EqualityTypeConvert => ExpInstantiableElement.Void;
@@ -56,33 +56,36 @@ namespace StgSharp.Script.Express
public abstract class ExpElementInstanceBase : ExpNode
{
protected ExpElementInstanceBase( Token source ) : base( source ) { }
public ExpElementType ElementType
protected ExpElementInstanceBase( Token source )
: base( source )
{
get;
CodeConvertTemplate = source.Value;
}
public ExpElementType ElementType { get; }
public override ExpNode Left => Empty;
public override ExpNode Right => Empty;
public abstract string TypeName
{
get;
}
public abstract string TypeName { get; }
public static ExpElementInstanceBase CreateLiteral( Token t )
{
if( int.TryParse( t.Value, out int _int ) ) {
if( int.TryParse( t.Value, out int _int ) )
{
return new ExpIntNode( t, _int );
} else if( float.TryParse( t.Value, out float _float ) ) {
} else if( float.TryParse( t.Value, out float _float ) )
{
return new ExpRealNumberNode( t, _float );
} else if( bool.TryParse( t.Value, out bool _bool ) ) {
} else if( bool.TryParse( t.Value, out bool _bool ) )
{
return new ExpBoolNode( t, _bool );
} else if( ExpLogic.TryParse( t.Value, out ExpLogic _logic ) ) {
} else if( ExpLogic.TryParse( t.Value, out ExpLogic _logic ) )
{
return new ExpLogicValueNode( t, _logic );
} else {
} else
{
return new ExpStringNode( t, t.Value );
}
}
@@ -34,7 +34,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ExpKeyword = StgSharp.Script.Express.ExpressCompile.KeyWord;
using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword;
namespace StgSharp.Script.Express
{
@@ -43,15 +43,18 @@ namespace StgSharp.Script.Express
private bool TryParseBranch( Token t )
{
if( t.Value == ExpKeyword.Case ) {
if( t.Value == ExpKeyword.Case )
{
_cache.PushOperator( t );
_cache.IncreaseDepth( ( int )ExpCompileStateCode.CaseBranch );
return true;
} else if( t.Value == ExpKeyword.If ) {
} else if( t.Value == ExpKeyword.If )
{
_cache.PushOperator( t );
_cache.IncreaseDepth( ( int )ExpCompileStateCode.IfBranch );
return true;
} else if( t.Value == ExpKeyword.Repeat ) {
} else if( t.Value == ExpKeyword.Repeat )
{
_cache.PushOperator( t );
_cache.IncreaseDepth( ( int )ExpCompileStateCode.RepeatLoop );
return true;
@@ -34,7 +34,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ExpKeyword = StgSharp.Script.Express.ExpressCompile.KeyWord;
using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword;
namespace StgSharp.Script.Express
{
@@ -43,17 +43,16 @@ namespace StgSharp.Script.Express
public int CompareOperatorPrecedence( Token left, Token right )
{
ExpressCompile.TryGetOperatorPrecedence(
left.Value, out int leftPrecedence );
ExpressCompile.TryGetOperatorPrecedence(
right.Value, out int rightPrecedence );
ExpressCompile.TryGetOperatorPrecedence( left.Value, out int leftPrecedence );
ExpressCompile.TryGetOperatorPrecedence( right.Value, out int rightPrecedence );
return leftPrecedence - rightPrecedence;
}
public bool TryGenerateUnaryNode( Token t, out ExpNode node )
{
ExpNode operand = GetNextOperandCache();
switch( t.Value ) {
switch( t.Value )
{
case ExpKeyword.UnaryPlus:
node = ExpUnaryOperatorNode.UnaryPlus( t, operand );
return true;
@@ -73,9 +72,10 @@ namespace StgSharp.Script.Express
/// WARNING: This method cannot process INDEXOF, FUNCTION CALLING, LOOP and any ENDING
/// SYMBOLS.
/// </summary>
private ExpNode ConvertOneOperator( Token op )
private ExpNode ConvertAndPushOneOperator( Token op )
{
switch( op.Flag )
{
switch( op.Flag ) {
case TokenFlag.Symbol_Unary:
TryGenerateUnaryNode( op, out ExpNode? node );
_cache.PushOperand( node );
@@ -85,31 +85,32 @@ namespace StgSharp.Script.Express
_cache.PushOperand( node );
return node;
case TokenFlag.Member:
if( _context.TryGetFunction(
op.Value, out ExpFunctionSource? f ) ) {
if( !_cache.PopOperand( out Token t,
out ExpNode? p ) ) {
node = ExpFunctionCallingNode.CallFunction(
op, f, p );
if( _context.TryGetFunction( op.Value, out ExpFunctionSource? f ) )
{
if( !_cache.PopOperand( out Token t, out ExpNode? p ) )
{
node = ExpFunctionCallingNode.CallFunction( op, f, p );
return node;
} else {
} else
{
throw new ExpCompileException(
t,
"An ExpNode for function calling is needed, but a token was popped" );
}
} else if( ExpSchema.BuiltinSchema
.TryGetFunction( op.Value, out f ) ) {
if( !_cache.PopOperand( out Token t,
out ExpNode? p ) ) {
node = ExpFunctionCallingNode.CallFunction(
op, f, p );
} else if( ExpSchema.BuiltinSchema.TryGetFunction( op.Value, out f ) )
{
if( !_cache.PopOperand( out Token t, out ExpNode? p ) )
{
node = ExpFunctionCallingNode.CallFunction( op, f, p );
return node;
} else {
} else
{
throw new ExpCompileException(
t,
"An ExpNode for function calling is needed, but a token was popped" );
}
} else {
} else
{
throw new NotImplementedException();
//uncertain case here
@@ -121,9 +122,10 @@ namespace StgSharp.Script.Express
private bool TryGenerateBinaryNode( Token t, out ExpNode node )
{
ExpNode left = GetNextOperandCache();
ExpNode right = GetNextOperandCache();
switch( t.Value ) {
ExpNode left = GetNextOperandCache();
switch( t.Value )
{
case ExpKeyword.Add:
node = ExpBinaryOperatorNode.Add( t, left, right );
return true;
@@ -148,6 +150,9 @@ namespace StgSharp.Script.Express
case ExpKeyword.LessThan:
node = ExpBinaryOperatorNode.LessThan( t, left, right );
return true;
case ExpKeyword.Assignment:
node = ExpBinaryOperatorNode.Assign( t, left, right );
return true;
default:
node = ExpNode.Empty;
return false;
@@ -35,7 +35,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ExpKeyword = StgSharp.Script.Express.ExpressCompile.KeyWord;
using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword;
namespace StgSharp.Script.Express
{
@@ -45,24 +45,24 @@ namespace StgSharp.Script.Express
private void ClosePrefixReverse( Token rightSeparator )
{
Token op;
while( _cache.TryPopOperator( out op ) ) {
if( op.Value == ExpKeyword.Comma ) {
if( !_cache.TryPopOperand(
out bool isNode, out Token t1, out ExpNode? n1 ) ) {
throw new ExpCompileException(
op, "No expression before a comma" );
while( _cache.TryPopOperator( out op ) )
{
if( op.Value == ExpKeyword.Comma )
{
if( !_cache.TryPopOperand( out bool isNode, out Token t1, out ExpNode? n1 ) ) {
throw new ExpCompileException( op, "No expression before a comma" );
}
if( !isNode ) {
if( !isNode )
{
//On some occasions, a token may found,
//but the processor is not implemented
throw new NotImplementedException();
}
if( !_cache.TryPopOperand(
out isNode, out Token t2, out ExpNode? n2 ) ) {
throw new ExpCompileException(
op, "No expression before a comma" );
if( !_cache.TryPopOperand( out isNode, out Token t2, out ExpNode? n2 ) ) {
throw new ExpCompileException( op, "No expression before a comma" );
}
if( !isNode ) {
if( !isNode )
{
//On some occasions, a token may found,
//but the processor is not implemented
throw new NotImplementedException();
@@ -71,20 +71,20 @@ namespace StgSharp.Script.Express
_cache.PushOperand( n1 );
continue;
}
ConvertOneOperator( op );
ExpNode node = GetNextOperandCache();
_cache.PushOperand( node );
ConvertAndPushOneOperator( op );
}
if( !_cache.TryPopOperand( out _, out _, out ExpNode? root ) ) {
_cache.PushOperand( ExpNode.Empty );
}
_cache.DecreaseDepth();
if( IsSeparatorMatch( _cache.PeekOperator(), rightSeparator ) ) {
if( IsSeparatorMatch( _cache.PeekOperator(), rightSeparator ) )
{
_cache.PopOperator();
} else {
// some unexpected occasions
throw new NotImplementedException();
_cache.PushOperand( root );
} else
{
throw new ExpCompileException(
rightSeparator, "Ending of block soes not match its begging" );
}
}
@@ -34,26 +34,21 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ExpKeyword = StgSharp.Script.Express.ExpressCompile.KeyWord;
using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword;
namespace StgSharp.Script.Express
{
public partial class ExpNodeGenerator
{
private bool IsSeparatorMatch(
Token leftSperator,
Token rightSeparator )
private bool IsSeparatorMatch( Token leftSperator, Token rightSeparator )
{
return leftSperator.Value switch
{
ExpKeyword.LeftBrace => rightSeparator.Value ==
ExpKeyword.RightBrace,
ExpKeyword.LeftParen => rightSeparator.Value ==
ExpKeyword.RightParen,
ExpKeyword.LeftBrace => rightSeparator.Value == ExpKeyword.RightBrace,
ExpKeyword.LeftParen => rightSeparator.Value == ExpKeyword.RightParen,
ExpKeyword.Comma => rightSeparator.Value == ExpKeyword.Comma,
ExpKeyword.Semicolon => rightSeparator.Value ==
ExpKeyword.Semicolon,
ExpKeyword.Semicolon => rightSeparator.Value == ExpKeyword.Semicolon,
_ => false
};
}
@@ -63,8 +58,8 @@ namespace StgSharp.Script.Express
if( t.Flag != TokenFlag.Index_Left ) {
return false;
}
if( _cache.TryPeekOperand(
out bool isNode, out _, out ExpNode? node ) ) {
if( _cache.TryPeekOperand( out bool isNode, out _, out ExpNode? node ) )
{
if( node.EqualityTypeConvert is not ExpCollectionBase ) {
ExpInvalidSyntaxException.ThrowNonCollectionIndex( t );
}
@@ -85,8 +80,7 @@ namespace StgSharp.Script.Express
//make index node
_cache.PopOperand( out _, out ExpNode? expNode );
if( !_cache.PopOperand(
out Token colleToken, out ExpNode? colleNode ) ) { }
if( !_cache.PopOperand( out Token colleToken, out ExpNode? colleNode ) ) { }
_cache.PushOperand(
ExpCollectionIndexNode.Create(
t, ( colleNode as ExpCollectionInstanceBase )!, expNode ) );
@@ -120,27 +114,32 @@ namespace StgSharp.Script.Express
if( t.Flag != TokenFlag.Separator_Middle ) {
return false;
}
if( _cache.OperatorAheadOfDepth == 0 ) {
if( _cache.OperandAheadOfDepth == 1 ) {
if( _cache.OperatorAheadOfDepth == 0 )
{
if( _cache.OperandAheadOfDepth == 1 )
{
_cache.PushOperand( t );
_cache.PushOperator( t );
return true;
} else {
} else
{
ExpInvalidSyntaxException.ThrowNoOperator( t );
}
}
Token op;
processOperator:
if( _cache.TryPopOperator( out op ) ) {
if( op.Value == t.Value ) {
if( _cache.TryPopOperator( out op ) )
{
if( op.Value == t.Value )
{
_cache.PopOperand( out _, out ExpNode? node );
//append node to tail
_cache.PushOperand( t );
_cache.PushOperator( t );
} else {
ExpNode node = ConvertOneOperator( op );
_cache.PushOperand( node );
} else
{
ExpNode node = ConvertAndPushOneOperator( op );
goto processOperator;
}
}
@@ -161,6 +160,7 @@ namespace StgSharp.Script.Express
if( t.Flag != TokenFlag.Separator_Left ) {
return false;
}
_cache.PushOperator( t );
_cache.IncreaseDepth( ( int )ExpCompileStateCode.PrefixSeparator );
return true;
}
@@ -176,31 +176,35 @@ namespace StgSharp.Script.Express
private bool TryAppendSymbol( Token t )
{
if( ( t.Flag & ( TokenFlag.Symbol_Unary | TokenFlag.Symbol_Binary ) ) ==
0 ) {
if( ( t.Flag & ( TokenFlag.Symbol_Unary | TokenFlag.Symbol_Binary ) ) == 0 ) {
return false;
}
int cmp = -1;
processPrecedence:
if( _cache.TryPopOperator( out Token tmp ) ) {
if( _cache.TryPeekOperator( out Token tmp ) )
{
cmp = CompareOperatorPrecedence( t, tmp );
if( cmp <= 0 ) {
ExpNode node = ConvertOneOperator( tmp );
if( cmp >= 0 )
{
_cache.PopOperator();
ExpNode node = ConvertAndPushOneOperator( tmp );
_cache.PushOperand( node );
goto processPrecedence;
}
}
_cache.PushOperand( t );
_cache.PushOperator( t );
return true;
}
private bool TryParseConstant( Token t )
{
if( t.Value == ExpKeyword.True ) {
if( t.Value == ExpKeyword.True )
{
_cache.PushOperand( new ExpBoolNode( t, true ) );
return true;
} else if( t.Value == ExpKeyword.False ) {
} else if( t.Value == ExpKeyword.False )
{
_cache.PushOperand( new ExpBoolNode( t, false ) );
return true;
}
@@ -209,11 +213,12 @@ namespace StgSharp.Script.Express
private bool TryParseFunction( Token t )
{
if( ExpKeyword.BuiltinFunctions.Contains( t.Value ) ) {
if( ExpKeyword.BuiltinFunctions.Contains( t.Value ) )
{
_cache.PushOperator( t );
return true;
} else if( _context.TryGetFunction(
t.Value, out ExpFunctionSource? f ) ) {
} else if( _context.TryGetFunction( t.Value, out ExpFunctionSource? f ) )
{
_cache.PushOperand( t );
return true;
}
@@ -223,9 +228,9 @@ namespace StgSharp.Script.Express
private bool TryParseInstance( Token t )
{
if( _local.TryGetMember( t.Value,
out ExpNode? node ) && node is ExpElementInstanceBase instance ) {
_cache.PushOperand(
ExpInstanceReferenceNode.Create( t, instance ) );
out ExpNode? node ) && node is ExpElementInstanceBase instance )
{
_cache.PushOperand( ExpInstanceReferenceNode.Create( t, instance ) );
return true;
}
return false;
+11 -7
View File
@@ -40,7 +40,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ExpKeyword = StgSharp.Script.Express.ExpressCompile.KeyWord;
using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword;
namespace StgSharp.Script.Express
{
@@ -67,9 +67,11 @@ namespace StgSharp.Script.Express
{
_cache = new CompileStack<ExpNode, IExpElementSource>();
ArgumentNullException.ThrowIfNull( context );
if( context is not ExpSchema_Builtin ) {
if( context is not ExpSchema_Builtin )
{
_context = context;
} else {
} else
{
throw new InvalidCastException( "Not a valid Schema type" );
}
_local = local;
@@ -78,12 +80,13 @@ namespace StgSharp.Script.Express
/**/
/// <summary>
/// Append a token to top of cache. This method will automatically convert token to node if
/// meets separators or operators.
/// Append a token to top of cache. This method will automatically convert token to node
/// if meets separators or operators.
/// </summary>
public void AppendToken( Token expToken )
{
switch( expToken.Flag ) {
switch( expToken.Flag )
{
case TokenFlag.Symbol_Unary or TokenFlag.Symbol_Binary:
TryAppendSymbol( expToken );
break;
@@ -112,7 +115,8 @@ namespace StgSharp.Script.Express
public ExpNode GetNextOperandCache()
{
if( _cache.PopOperand( out Token t, out ExpNode? n ) ) {
if( _cache.PopOperand( out Token t, out ExpNode? n ) )
{
return n;
} else { }
+6 -14
View File
@@ -189,7 +189,7 @@ namespace StgSharp.Script.Express
begin = _current;
_current++;
_last = new Token(
ExpressCompile.PoolString( ")" ), _lineNum, begin,
ExpressCompile.PoolString( source[ ..1 ] ), _lineNum, begin,
TokenFlag.Separator_Right );
return _last;
case '-':
@@ -267,13 +267,14 @@ namespace StgSharp.Script.Express
begin = _current;
_current += 2;
return new Token(
ExpressCompile.KeyWord.Assignment, _lineNum, begin,
TokenFlag.Index_Right );
ExpressCompile.Keyword.Assignment, _lineNum, begin,
TokenFlag.Symbol_Binary );
}
begin = _current;
_current++;
return new Token(
ExpressCompile.KeyWord.Colon, _lineNum, begin, TokenFlag.Index_Right );
ExpressCompile.Keyword.Colon, _lineNum, begin,
TokenFlag.Separator_Middle );
case '+' or '/' or '\\' or '*' or '.':
begin = _current;
_current++;
@@ -293,16 +294,7 @@ namespace StgSharp.Script.Express
rest = match.Groups[ RestMark ].Index;
_current = rest;
string str = ExpressCompile.PoolString( source[ ..( end - begin ) ] );
TokenFlag flag;
if( ReferenceEquals( str, ExpressCompile.KeyWord.Not ) )
{
flag = TokenFlag.Symbol_Unary;
} else
{
flag = ExpressCompile.LetterIsOperator( str ) ?
TokenFlag.Symbol_Binary : TokenFlag.Member;
}
return new( str, _lineNum, begin, flag );
return new( str, _lineNum, begin, TokenFlag.Number );
} else
{
throw new ExpInvalidTokenException( _current );
@@ -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+528d0c5462b4d3da107ad29b859f9c8006fb675a")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+148b0fed4a1abaaeaa3a28e7c7b088590805ebef")]
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp.Script")]
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.Script")]
[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/528d0c5462b4d3da107ad29b859f9c8006fb675a/*"}}
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/148b0fed4a1abaaeaa3a28e7c7b088590805ebef/*"}}
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp.TerminalDialogue")]
[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+148b0fed4a1abaaeaa3a28e7c7b088590805ebef")]
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp.TerminalDialogue")]
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.TerminalDialogue")]
[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/6788bc4a0065508d7afa5f740da1b4ca6dd1efef/*"}}
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/148b0fed4a1abaaeaa3a28e7c7b088590805ebef/*"}}
+72 -4
View File
@@ -36,6 +36,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Schema;
namespace StgSharp
{
@@ -54,6 +55,67 @@ namespace StgSharp
LocalVariables.Add(
"c",
ExpElementInstanceBase.CreateLiteral( new Token( "1", 0, 0, TokenFlag.Number ) ) );
LocalVariables.Add(
"d",
ExpElementInstanceBase.CreateLiteral( new Token( "1", 0, 0, TokenFlag.Number ) ) );
}
}
internal class TestSchema : ExpSchema
{
internal ExpTestFuncSource source;
public TestSchema( ExpTestFuncSource testType )
{
source = testType;
}
public override void LoadFromSource( ExpSchemaSource source )
{
return;
}
public override bool TryGetConst( string name, out ExpElementInstanceBase c )
{
c = null;
return false;
}
public override bool TryGetEntity( string name, out ExpEntitySource e )
{
e = null;
return false;
}
public override bool TryGetFunction( string name, out ExpFunctionSource f )
{
if( name == "TestFunc" )
{
f = source;
return true;
}
f = null;
return false;
}
public override bool TryGetRule( string name, out ExpRuleSource r )
{
r = null;
return false;
}
public override bool TryGetSchemaInclude( string name, out ExpSchema include )
{
include = null;
return false;
}
public override bool TryGetType( string name, out ExpTypeSource t )
{
t = null;
return false;
}
}
@@ -65,17 +127,23 @@ namespace StgSharp
{
ExpressCompile.InitCompile();
ScriptSourceTransmitter transmitter = new ScriptSourceTransmitter( "END", 0 );
transmitter.WriteLine( @"a := b + c;" );
transmitter.WriteLine( @"a := ( b + c + d * 2 ) * d;" );
//transmitter.WriteLine( @"a := b + (c + d) * a;" );
transmitter.EndWriting();
ExpSourceReader reader = new ExpSourceReader( transmitter );
/*
ExpNodeGenerator generator = new ExpNodeGenerator(
, new ExpTestFuncSource( "test", transmitter ) );
/**/
ExpTestFuncSource func = new ExpTestFuncSource( "test", transmitter );
TestSchema testSchema = new TestSchema( func );
ExpNodeGenerator generator = new ExpNodeGenerator( testSchema, func );
/**/
while( reader.TryReadToken( out Token t ) )
{
Console.WriteLine( t.Value );
generator.AppendToken( t );
}
Console.WriteLine( "OK" );
}
}
@@ -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+528d0c5462b4d3da107ad29b859f9c8006fb675a")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+148b0fed4a1abaaeaa3a28e7c7b088590805ebef")]
[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/528d0c5462b4d3da107ad29b859f9c8006fb675a/*"}}
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/148b0fed4a1abaaeaa3a28e7c7b088590805ebef/*"}}