考虑文法 e → t | e t t → f / txf f → y (( e )按照以下格式的表写出输
时间: 2024-05-24 16:15:15 浏览: 95
| 序号 | 输入串 | 动作 |
| --- | --- | --- |
| 1 | y(y) | shift 1 |
| 2 | y(y)( | shift 2 |
| 3 | y(y)(y | shift 1 |
| 4 | y(y)(y) | reduce f → y |
| 5 | y(y)t | shift 6 |
| 6 | y(y)tx | shift 7 |
| 7 | y(y)t | reduce t → f/txf |
| 8 | y(y)e | shift 9 |
| 9 | y(y)ex | shift 10 |
| 10 | y(y)exy | shift 9 |
| 11 | y(y)ex) | reduce e → t |
| 12 | y(y)t | reduce t → e |
| 13 | y(e) | reduce f → y |
| 14 | y(t) | shift 15 |
| 15 | y(tx) | shift 16 |
| 16 | y(txy) | shift 15 |
| 17 | y(tx) | reduce t → f/txf |
| 18 | y(e) | shift 19 |
| 19 | y(ex) | shift 20 |
| 20 | y(exy) | shift 19 |
| 21 | y(ex) | reduce e → t |
| 22 | y(t) | reduce t → e |
| 23 | y(e) | reduce f → y |
| 24 | t | reduce e → t |
| 25 | y | reduce f → y |
| 26 | $ | accept |
阅读全文