GithubHelp home page GithubHelp logo

compiler's Introduction

Compiler

This is a Compiler project. Now I just finish the hand craft scanner. grammar analysis part isn't here

Lexical analysis

File Hierarchy

  • bin

    • build: 可执行文件.1.从regex.txt获取词法规则 2.从sourfile获取源程序 3.输出token序列.
  • file

    • dfaviz.dot : 由build生成的dfa,描述方式为dot语言.
    • dfaviz.jpg : 使用graphviz程序,由dfaviz.dot生成的dfa图片.
    • nfaviz.dot : 由build生成的nfa,描述方式为dot语言.
    • nfaviz.jpg : 使用graphviz程序,由nfaviz.dot生成的nfa图片.
    • regex.txt : 描述语言的词法规则.
    • sourcefile.txt : 等待解析的源程序.
    • tokens.txt : 生成的token序列.
    • makefile : 根据dfaviz.dot和nfaviz.dot生成相应的图片.
    • 其他 : 测试使用的文件,忽视即可.
  • obj

    • *.o : 链接过程中生成的目标文件.
  • src

    • fa_struct.h : 声明了nfa和dfa的相关结构和函数.
    • fa_struct.c : 定义了fa_struct.h中声明的内容.
    • regex_engine.h : 声明了将单个正则表达式转换为nfa和dfa的函数.
    • regex_engine.c : 定义了regex_engine.h中声明的内容.
    • scanner_generator.h: 1.声明了将正则表达式集合转化为dfa的函数 ;2.声明了词法分析函数.
    • scanner_generator.c:定义了scanner_generator.h中的声明.
    • lexical.c: 包含主函数,完成词法分析.
  • makefile : 编译链接

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.