Coder Social home page Coder Social logo

dalerkd / cpp_serialize Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 31 KB

通过对头文件进行分析构建中间结构,支持广泛的序列化和反序列化代码的自动生成。暂停设计:需要更好的 token分析方案.

C++ 87.36% C 12.64%

cpp_serialize's People

Contributors

dalerkd avatar

Watchers

 avatar

Forkers

gintian

cpp_serialize's Issues

本项目开发艰难原因总结

项目

此前越开发越累.所以暂停了.为什么累?陷入大量细节.逻辑越来越复杂.

最近在学<两周自制脚本语言>
阅读<平庸前端码农之蜕变 — AST>一文后豁然开朗.

现在明白了:是挂在了词法分析和语法分析混在一起的坑.
我将词法分析和语法分析一起做了,没有分开.

现在很乐观,因为症结已经找到,我会尝试先设计几个其他小Demo再按需求回来设计.
可以会推倒重搞,毕竟是5个月前的设计.又有了不少新技能Get.

本项目正确的地方

使用了多叉树来表达工作.

本项目需要改进的地方

我将词法分析语法分析混在一起了,导致到处是空白处理代码.大脑疲惫不堪.
因为每个地方都要考虑当前

  • 是否是空白符

而更好的方式是:将混合的逻辑区分开,使用单独的词法分析语法分析.

还有哪些地方可以用到这项技能?

  • 将IDA分析出的字节码翻译成伪C代码
    不足之处是其:命名过于死板.(其实已经不错了)
  • 依然DT的同事将XX翻译成C代码
    不足之处是其:中间过程存在大量的重复部分.eg:
str1 = a+b;
c=str1;

显然可以通过优化语法树来解决哈.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.