文件名称:Lexer
介绍说明--下载内容均来自于网络,请自行研究使用
该任务需要你为数学表达式构建一个单纯的语法分析程序lexer,它将一段输入的字符串转变为token(值),token(值)里每个字符都属于数学表达式的组成部分。我们想将token(值)定义为如下几种(1)计算符号,+,-.(2)字母和下划线 (3)数字,这三者先不需要仔细区分。-In this assignment, you will build a simple lexer for arithmetic expressions. A lexer breaks an put str g to tokens, each of which is a unit of the expression. We consider the follow g as tokens: (1) the symbols,+,--‐, ( and ), (2) variable name consist g of alpha--‐
umeric characters and underscore, and (3) teger numeric constants. You do not have to dist guish between the three k ds of tokens for now.
umeric characters and underscore, and (3) teger numeric constants. You do not have to dist guish between the three k ds of tokens for now.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
lastassim.java
Lexer.java
Lexer.java