diff --git a/Header/README.md b/Header/README.md new file mode 100644 index 0000000..01ead83 --- /dev/null +++ b/Header/README.md @@ -0,0 +1,21 @@ +# Index + +本系列头文件旨在于修正各种难以定位而又知名而致命的拼写错误 +This header file series is intended to fix a variety of difficult to locate, well-known and fatal spelling-errors + +本系列头文件仅能进行对全文进行预处理,若您在例如输出文本中刻意书写了一些需要展现出来的“拼写错误”,很遗憾它们将一并被修正,在执行版中将不会如此。 +This header file series can only preprocess the full text. +If you intentionally write some "spelling errors" in the output text, they will be unfortunately corrected together. +This feature will not ocurred in execution version. + +有一部分美好的设想似乎因为双字节问题或者编译器问题而不能实践,但我们将在执行版中完整的引入这些支持 +There are some good ideas that seem to be impractical due to double-byte issues or compiler issues +but we will fully introduce these support in the executive version + +----- + +## fuck_ChineseSyntax.h + +中文标点 有效8组 共计18组 + +ChineseSyntax 8Vaild 18Total \ No newline at end of file diff --git a/Header/fuck_ChineseSyntax.h b/Header/fuck_ChineseSyntax.h new file mode 100644 index 0000000..33621e8 --- /dev/null +++ b/Header/fuck_ChineseSyntax.h @@ -0,0 +1,19 @@ +//ı +#define : +#define ; +//C3873: 0x2018: ַΪʶĵһַ C2001: лз #define ' +//C3873: 0x2019: ַΪʶĵһַ C2001: лз #define ' +//C3873: 0x201C: ַΪʶĵһַ C2001: лз #define " +//C3873: 0x201D: ַΪʶĵһַ C2001: лз #define " +#define , +//C3873: 0x3002: ַΪʶĵһַ #define . +#define ! +#define ? +//C3873: 0x3001: ַΪʶĵһַ #define , +#define ( +#define ) +#define $ +//C3873 : 0x3010: ַΪʶĵһַ #define [ +//C3873 : 0x3011: ַΪʶĵһַ #define ] +//C3873 : 0x301A: ַΪʶĵһַ #define < +//C3873 : 0x301B: ַΪʶĵһַ #define > \ No newline at end of file diff --git a/README.md b/README.md index ab1a237..23d2e0a 100644 --- a/README.md +++ b/README.md @@ -21,16 +21,33 @@ Fuck ALL fucking mistakes in C/C++ !!!! 望读完这些琐碎语句的诸位,学业进步、事业有成、事事顺心! -本程序旨在于更精确的修正C语言程序中所出现的各种难以定位的致命错误和部分虽然语法正确但将使执行不正常的错误 -在此感谢前人项目给予本项目的启迪: -本程序使用了C11标准,但是考虑兼容性问题,谁帮忙给搞一下也行 - -论如何做到在控制台内输入【fuck+文件/文件夹】就能实现自动修正 -论如何实现运行伊始自动加入环境变量 - -然后逐行的检查问题,并在检查到问题的时候throw一个带行数的exception -问如何中止这个while循环 -问如何检测if(a=0)这样的错误 +## 目标定位 + +本项目旨在于更精确的修正C语言程序中所出现的各种难以定位的致命错误和部分虽然语法正确但将使执行不正常的错误 + +## 项目结构 + +本项目分为两部分,分别是**Header**和**AutoFixer** + +### Header + +Header为若干个C语言头文件,以```.h```后缀名结尾,满足最大兼容性 + +分别对应某一类的错误类型 + +### AutoFixer + +是一个对单个代码文件自动修正的工具 + +## 技术信息 + +标准:基于C++11编写,不引入过多modern C++的实验性特性。 + +构建:基于MSBuild构建,降低使用和编译门槛论。 + +错误处理:Exception和Status并存,暂不考虑Log,会在未来添加。 + +参数:fuck {{文件/文件夹}} (您亦可将其加入环境变量) ## 裸露文件 diff --git a/fuck.h b/fuck.h index 8daa7f7..6490601 100644 --- a/fuck.h +++ b/fuck.h @@ -1,34 +1,6 @@ -//本头文件旨在于修正各种难以定位而又知名而致命的拼写错误 -//This header file is intended to fix a variety of difficult to locate, well-known and fatal spelling-errors -//本头文件仅能进行对全文进行预处理,若您在例如输出文本中刻意书写了一些需要展现出来的“拼写错误”,很遗憾它们将一并被修正,在执行版中将不会如此。 -//This header file can only preprocess the full text. -//If you intentionally write some "spelling errors" in the output text, they will be unfortunately corrected together. -//This feature will not ocurred in execution version. -//有一部分美好的设想似乎因为双字节问题或者编译器问题而不能实践,但我们将在执行版中完整的引入这些支持 -//There are some good ideas that seem to be impractical due to double-byte issues or compiler issues -//but we will fully introduce these support in the executive version -//中文标点 -#define : : -#define ; ; -//C3873: “0x2018”: 不允许将此字符作为标识符的第一个字符 C2001: 常量中有换行符 #define ‘ ' -//C3873: “0x2019”: 不允许将此字符作为标识符的第一个字符 C2001: 常量中有换行符 #define ’ ' -//C3873: “0x201C”: 不允许将此字符作为标识符的第一个字符 C2001: 常量中有换行符 #define “ " -//C3873: “0x201D”: 不允许将此字符作为标识符的第一个字符 C2001: 常量中有换行符 #define ” " -#define , , -//C3873: “0x3002”: 不允许将此字符作为标识符的第一个字符 #define 。 . -#define ! ! -#define ? ? -//C3873: “0x3001”: 不允许将此字符作为标识符的第一个字符 #define 、 , -#define ( ( -#define ) ) -#define ¥ $ -//C3873 : “0x3010”: 不允许将此字符作为标识符的第一个字符 #define 【 [ -//C3873 : “0x3011”: 不允许将此字符作为标识符的第一个字符 #define 】 ] -//C3873 : “0x301A”: 不允许将此字符作为标识符的第一个字符 #define 《 < -//C3873 : “0x301B”: 不允许将此字符作为标识符的第一个字符 #define 》 > //全角字符 #define A A