Code Monkey home page Code Monkey logo

pltest's Introduction

PLTest

这是基于Java语言编写的计算器表达式分析器其中包括词法分析和语法分析部分 一、 字符集定义 1. <字符> → <数字>│<单界符>│. 2. <数字> → 0│<非零数字> 3. <非零数字>→ 1│2│…│9 4. <单界符> →<运算符>│(│) 5. <运算符> → +│-│*│/

二、 单词集定义 6.<单词> → <单界符>│<常数> 7.<常数> → <无符号整数>│<无符号浮点数> 8.<无符号整数> →0│<非零整数> 9.<非零整数> → <非零数字> <数字串> 10.<数字串> → <数字> <数字串>│NULL 11.<无符号浮点数> →<无符号整数>. <数字> <数字串> 三、 数据类型定义 12.<类型> → int│double 四、 表达式定 13.<算术表达式> → <项> + <算术表达式>│<项> - <算术表达式>│<项> 14.<项> → <因子> * <项>│<因子> / <项>│<因子> 15.<因子> → <算数量>│- <因子> 16.<算术量> → <常数>│( <算术表达式> 五、文法符号化 E T E E T T <算术表达式> → <项> + <算术表达式>│<算术表达式>-<项>│<项> T F T F T F <项> → <因子> * <项>│<因子> / <项>│<因子> F i F <因子> → <常数>│- <因子> 六、 表达式计算器的单词编码 单 词 种别码 单 词 种别码 单 词 种别码

  •    1		   /	      4		  (        	6
    
  •    2		 无符号整数	5	   	)      	 7
    
  •    3	无符号浮点数	 8			
    

pltest's People

Contributors

kingxiusam avatar

Stargazers

lensfrex avatar ab avatar  avatar lot avatar realEago avatar  avatar  avatar

Watchers

 avatar

Forkers

zhou997

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.