GithubHelp home page GithubHelp logo

complieex's Introduction

#词法分析

##CiFa.java:

编译原理课的词法分析实验 读取的文件名放在args[0]中 例子:

输入文件名:test.txt
test.txt 的内容如下:
  main()                                                                         
  {
  int  a,b;
  a = 10;
        b = a + 20;
  }
输出:
(1 , "main")
(5 , "(")
(5 , ")")
(5 , "{")
(1 , "int")
(2 , "a")
(5 , ",")
(2 , "b")
(5 , ";")
(2 , "a")
(4 , "=")
(3 , "10")
(5 , ";")
(2 , "b")
(4 , "=")
(2 , "a")
(4 , "+")
(3 , "20")
(5 , ";")
(5 , "}")`

#语法分析

##YuFa.java:

语法分析的接口。 已实现预测分析法,打算再写一个LR(1)的,因为自己写的文法不支持算法优先文法,而LR(1)相比LR(0),SLR难度差别也不大,学过的也就这几种。 ##YuCeFenXi.java:

预测分析法是自己先写出问法,然后把分析表画好再查表完成的。文法有挺多局限性,毕竟很多地方都不会写出问法(也有怕麻烦的原因),而且最重点的是先写出来哈。 ###预测分析表: ![](https://github.com/wenRC/ComplieEx/raw/master/yucefenxi map.jpg)

complieex's People

Contributors

wenrc avatar

Watchers

 avatar

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.