没有合适的资源?快使用搜索试试~ 我知道了~
C#词法分析器的设计与实现,简单易用的代码。
资源推荐
资源详情
资源评论
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace LPascal
{
/// <summary>
/// 标识符
/// </summary>
class identifier
{
public string name;
public string type;
public int address;
public string Name
{
get
{
return this.name;
}
}
/// <summary>
/// 构建标识符节点
/// </summary>
/// <param name="name">标识符名称</param>
public identifier(string name)
{
this.name = name;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace LPascal
{
/// <summary>
/// 标识符
/// </summary>
class identifier
{
public string name;
public string type;
public int address;
public string Name
{
get
{
return this.name;
}
}
/// <summary>
/// 构建标识符节点
/// </summary>
/// <param name="name">标识符名称</param>
public identifier(string name)
{
this.name = name;
}
}
/// <summary>
/// 标识符队列
/// </summary>
class identifierList
{
public int front, rear;
public identifier[] id;
/// <summary>
/// 构建符号表
/// </summary>
public identifierList()
{
front = rear = -1;
id = new identifier[50];
}
/// <summary>
/// 标识符节点入队
/// </summary>
/// <param name="a">标识符对象</param>
public void push(identifier a)
{
this.rear++;
this.id[rear] = a;
}
/// <summary>
/// 判断指定名称的标识符是否存在
/// </summary>
/// <param name="name">标识符名称</param>
}
/// <summary>
/// 标识符队列
/// </summary>
class identifierList
{
public int front, rear;
public identifier[] id;
/// <summary>
/// 构建符号表
/// </summary>
public identifierList()
{
front = rear = -1;
id = new identifier[50];
}
/// <summary>
/// 标识符节点入队
/// </summary>
/// <param name="a">标识符对象</param>
public void push(identifier a)
{
this.rear++;
this.id[rear] = a;
}
/// <summary>
/// 判断指定名称的标识符是否存在
/// </summary>
/// <param name="name">标识符名称</param>
剩余12页未读,继续阅读
资源评论
TEEMOYA
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功