Browse Source

添加逗号解析

myuan 3 years ago
parent
commit
2d82614d26

+ 4 - 2
2. 词法分析科学计算器/词法分析科学计算器.代码/代码/词法分析程序集.static.e.txt

@@ -19,10 +19,11 @@
     ' 算符 [\+\-\*\/\^]
     ' 括号 [\(\)]
     ' 注释 \#.+
+    ' 逗号 ,
     
     ' 易语言的正则表达式没办法用\u, 也没办法写希腊字母, 也没办法写「°」, 因此去掉希腊字母和「°」, 加上空白, 合起来就是这样的
     .如果真 (正则.是否为空 ())
-        正则.创建 (“((\d+)(\.\d+)*)|([a-zA-Z_][a-zA-Z0-9_]*)|([\+\-\*\/\^])|([\(\)])|(\#.+)|[ ]+$”, )
+        正则.创建 (“((\d+)(\.\d+)*)|([a-zA-Z_][a-zA-Z0-9_]*)|([\+\-\*\/\^])|([\(\)])|(\#.+)|([,])|[ ]+$”, )
     .如果真结束
     
     ' ________________m1______________ -> 数字
@@ -31,8 +32,9 @@
     ' _______________________________________________________________m5______ -> 算符, +-*/^
     ' __________________________________________________________________________m6___ -> 括号
     ' _________________________________________________________________________________m7___ -> 注释
+    ' _______________________________________________________________________________________m8___ -> 逗号
     
-    ' 调试输出 (正则.取子表达式个数 ())  ' 总共七个匹配组
+    ' 调试输出 (正则.取子表达式个数 ())
     
     清除数组 (返回值)
     上次结果位置 = 1

+ 3 - 2
2. 词法分析科学计算器/词法分析科学计算器.代码/常量.e.txt

@@ -8,8 +8,9 @@
 .常量 词类_算符, "5"
 .常量 词类_括号, "6"
 .常量 词类_注释, "7"
-.常量 词类_空格, "8"
-.常量 词类型枚举数量, "8"
+.常量 词类_逗号, "8"
+.常量 词类_空格, "9"
+.常量 词类型枚举数量, "9"
 
 
 .常量 语法树节点_函数名最大长度, "16"

+ 25 - 25
2. 词法分析科学计算器/词法分析科学计算器.代码/日志/信息.log

@@ -1,25 +1,25 @@
-2021-11-07 17:48:48 [信息] [ SectionCode::ParseLibInfo ]               开始解析【支持库】数据
-2021-11-07 17:48:48 [信息] [ SectionCode::ParseLibInfo ]               完成解析【支持库】数据
-2021-11-07 17:48:48 [信息] [ SectionCode::ParseClasses ]               开始解析【类/程序集】数据
-2021-11-07 17:48:48 [信息] [ SectionCode::ParseClasses ]               完成解析【类/程序集】数据
-2021-11-07 17:48:48 [信息] [ SectionCode::ParseStructs ]               开始解析【自定义】数据
-2021-11-07 17:48:48 [信息] [ SectionCode::ParseStructs ]               完成解析【自定义】数据
-2021-11-07 17:48:48 [信息] [ SectionCode::WriteTxtCode ]               开始写出文本代码
-2021-11-07 17:48:48 [信息] [ SectionCode::WriteTxtCode ]               正在创建代码目录 [目录] C:/Users/myuan/Desktop/elang/2. 词法分析科学计算器/词法分析科学计算器.代码/代码
-2021-11-07 17:48:48 [信息] [ SectionCode::WriteTxtCode ]               开始写出【类/程序集】文本代码
-2021-11-07 17:48:48 [信息] [ SectionCode::WriteTxtCode_Class ]         正在写出【程序集】文本代码 [程序集] 程序集1
-2021-11-07 17:48:48 [信息] [ SectionCode::WriteTxtCode_Class ]         正在写出【程序集】文本代码 [程序集] 词法分析程序集
-2021-11-07 17:48:48 [信息] [ SectionCode::WriteTxtCode_Class ]         正在写出【程序集】文本代码 [程序集] 来自精易模块
-2021-11-07 17:48:48 [信息] [ SectionCode::WriteTxtCode_Class ]         正在写出【程序集】文本代码 [程序集] 语法分析程序集
-2021-11-07 17:48:48 [信息] [ SectionCode::WriteTxtCode_Class ]         正在写出【类】文本代码 [类] 抽象语法树节点
-2021-11-07 17:48:48 [信息] [ SectionCode::WriteTxtCode_Class ]         正在写出【程序集】文本代码 [程序集] 内存读写
-2021-11-07 17:48:48 [信息] [ SectionCode::WriteTxtCode ]               开始写出【DLL】文本代码
-2021-11-07 17:48:48 [信息] [ SectionCode::WriteTxtCode_Dlls ]          开始写出【DLL】文本代码
-2021-11-07 17:48:48 [信息] [ SectionCode::WriteTxtCode_Dlls ]          完成写出【DLL】文本代码
-2021-11-07 17:48:48 [信息] [ SectionCode::WriteTxtCode ]               开始写出【全局变量】文本代码
-2021-11-07 17:48:48 [信息] [ SectionCode::WriteTxtCode ]               开始写出【自定义数据】文本代码
-2021-11-07 17:48:48 [信息] [ SectionCode::WriteTxtCode_Structs ]       开始写出【自定义】文本代码
-2021-11-07 17:48:48 [信息] [ SectionCode::WriteTxtCode_Structs ]       完成写出【自定义】文本代码
-2021-11-07 17:48:48 [信息] [ SectionCode::WriteTxtCode ]               开始写出【支持库】信息
-2021-11-07 17:48:48 [信息] [ SectionCode::WriteTxtCode ]               开始写出【图标】文件 [路径] C:/Users/myuan/Desktop/elang/2. 词法分析科学计算器/词法分析科学计算器.代码/图标.ico
-2021-11-07 17:48:48 [信息] [ SectionCode::WriteTxtCode ]               完成写出文本代码
+2021-11-07 18:50:05 [信息] [ SectionCode::ParseLibInfo ]               开始解析【支持库】数据
+2021-11-07 18:50:05 [信息] [ SectionCode::ParseLibInfo ]               完成解析【支持库】数据
+2021-11-07 18:50:05 [信息] [ SectionCode::ParseClasses ]               开始解析【类/程序集】数据
+2021-11-07 18:50:05 [信息] [ SectionCode::ParseClasses ]               完成解析【类/程序集】数据
+2021-11-07 18:50:05 [信息] [ SectionCode::ParseStructs ]               开始解析【自定义】数据
+2021-11-07 18:50:05 [信息] [ SectionCode::ParseStructs ]               完成解析【自定义】数据
+2021-11-07 18:50:05 [信息] [ SectionCode::WriteTxtCode ]               开始写出文本代码
+2021-11-07 18:50:05 [信息] [ SectionCode::WriteTxtCode ]               正在创建代码目录 [目录] C:/Users/myuan/Desktop/elang/2. 词法分析科学计算器/词法分析科学计算器.代码/代码
+2021-11-07 18:50:05 [信息] [ SectionCode::WriteTxtCode ]               开始写出【类/程序集】文本代码
+2021-11-07 18:50:05 [信息] [ SectionCode::WriteTxtCode_Class ]         正在写出【程序集】文本代码 [程序集] 程序集1
+2021-11-07 18:50:05 [信息] [ SectionCode::WriteTxtCode_Class ]         正在写出【程序集】文本代码 [程序集] 词法分析程序集
+2021-11-07 18:50:05 [信息] [ SectionCode::WriteTxtCode_Class ]         正在写出【程序集】文本代码 [程序集] 来自精易模块
+2021-11-07 18:50:05 [信息] [ SectionCode::WriteTxtCode_Class ]         正在写出【程序集】文本代码 [程序集] 语法分析程序集
+2021-11-07 18:50:05 [信息] [ SectionCode::WriteTxtCode_Class ]         正在写出【类】文本代码 [类] 抽象语法树节点
+2021-11-07 18:50:05 [信息] [ SectionCode::WriteTxtCode_Class ]         正在写出【程序集】文本代码 [程序集] 内存读写
+2021-11-07 18:50:05 [信息] [ SectionCode::WriteTxtCode ]               开始写出【DLL】文本代码
+2021-11-07 18:50:05 [信息] [ SectionCode::WriteTxtCode_Dlls ]          开始写出【DLL】文本代码
+2021-11-07 18:50:05 [信息] [ SectionCode::WriteTxtCode_Dlls ]          完成写出【DLL】文本代码
+2021-11-07 18:50:05 [信息] [ SectionCode::WriteTxtCode ]               开始写出【全局变量】文本代码
+2021-11-07 18:50:05 [信息] [ SectionCode::WriteTxtCode ]               开始写出【自定义数据】文本代码
+2021-11-07 18:50:05 [信息] [ SectionCode::WriteTxtCode_Structs ]       开始写出【自定义】文本代码
+2021-11-07 18:50:05 [信息] [ SectionCode::WriteTxtCode_Structs ]       完成写出【自定义】文本代码
+2021-11-07 18:50:05 [信息] [ SectionCode::WriteTxtCode ]               开始写出【支持库】信息
+2021-11-07 18:50:05 [信息] [ SectionCode::WriteTxtCode ]               开始写出【图标】文件 [路径] C:/Users/myuan/Desktop/elang/2. 词法分析科学计算器/词法分析科学计算器.代码/图标.ico
+2021-11-07 18:50:05 [信息] [ SectionCode::WriteTxtCode ]               完成写出文本代码