Giter Club home page Giter Club logo

snl-compiler's Introduction

SNL-Compiler

SNL(Small Nested Language) Compiler. Maven jUnit Tokenizer Lexer Syntax Parser.
编译原理 词法分析 语法分析

进展

  • 2016-05-24 开始构思
  • 2016-05-27 查资料
  • 2016-05-28 1.开始编码
  • 2016-05-28 2.初步完成词法分析,开始写语法分析
  • 2016-05-29 开始递归下降
  • 2016-05-30 递归下降基本完成
  • 2016-05-31 1.完成递归下降
  • 2016-05-31 2.语法树的输出(竖版)
  • 2016-05-31 3.添加主程序,使用 Commons-Cli 解析命令行参数
  • 2016-05-31 4.添加几个发现的错误如下
  • 2016-06-01 开始 LL1
  • 2016-06-02 1.初步完成 LL1
  • 2016-06-02 2.增加自动识别文件编码。修复标识符结点值错误的 Bug.
  • 2016-06-02 3.查错,基本上完成了.
  • 2016-06-16 修复词法分析点号处理的 Bug (如 end.+ 应该报语法错误,在这里当作词法错误处理).

参考书籍

《编译程序的设计与实现》刘磊 金英 张晶 张荷花 单郸;高等教育出版社,ISBN 978-7-04-014620-7.

勘误

其中《编译程序的设计与实现》:

  1. 第 10 页,产生式 (43) 应为:ProcDecMore -> ProcDec. (而不是 ProcDeclare)
  2. 第 63 页,产生式 (67) Predict 集应为 [ (左中括号), . (句点), := (赋值号).
  3. 第 64 页,产生式 (93) Predict 集应包含 ] (右中括号).
  4. 第 55 页,例子中 v2:='a'; 只能通过词法分析,而不能通过语法分析,因为按照给定的产生式(Exp)不能推出字符型。
  5. 第 10 页,产生式 (42), (43) 完全多余。可以去掉,并且把产生式 (41) 右部的 ProcDecMore 改为 ProcDecpart.
  6. 第 10 页,产生式 (48), 预测符集应为 ) (右括号),而不是左括号。(第 62 页)

snl-compiler's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

snl-compiler's Issues

谢谢

谢谢作者提供光盘资源,吉大这个编译原理搞得真的很棒!!!

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.