https://github.com/yjl9903/nfa-to-dfa
A simple NFA to DFA converter.
https://github.com/yjl9903/nfa-to-dfa
dfa nfa typescript
Last synced: about 2 months ago
JSON representation
A simple NFA to DFA converter.
- Host: GitHub
- URL: https://github.com/yjl9903/nfa-to-dfa
- Owner: yjl9903
- License: mit
- Created: 2019-09-26T11:26:28.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-14T16:27:58.000Z (over 3 years ago)
- Last Synced: 2025-01-04T00:39:13.683Z (9 months ago)
- Topics: dfa, nfa, typescript
- Language: TypeScript
- Size: 7.81 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NFA to DFA
非确定性有限状态自动机转化为确定性有限状态自动机。
## 安装
请确保您的电脑上配置有 Node 环境。
全局安装 TypeScript。
```bash
yarn global add typescript
```安装依赖。
```bash
yarn
```TypeScript 编译。
```bash
tsc
```## 使用
读取 `testdata/in.txt`,并输出转化的 DFA。
```bash
yarn run start
```### 输入格式说明
第一行一个字符串,表示 NFA 的根节点。
第二行有任意个字符串(用空格分割),表示 NFA 的终止结点。
剩下的,每行有 3 个字符串 u v w(用空格分割),表示结点 u 连接一条字符为 w 的边向结点 v。
输入文件忽略空行和 `//` 开头的行。