文件名称:tiny-parse
- 所属分类:
- 编译器/词法分析
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1.21mb
- 下载次数:
- 0次
- 提 供 者:
- gavi*****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
Syntax of TINY+
An EBNF grammar for TINY+ is as follows (Strings in bold are terminals):
1. program -> declarations stmt-sequence
2. declarations -> decl declarations |²
3. decl -> type-specifi er varlist
4. type-specifi er -> int | bool | string
5. varlist -> identifi er { , identifi er }
6. stmt-sequence -> statement { statement }
7. statement -> if-stmt | repeat-stmt | assign-stmt | read-stmt | write-stmt
| while-stmt
8. while-stmt -> while bool-exp do stmt-sequence end
9. if-stmt -> if bool-exp then stmt-sequence [else stmt-sequence] end
10. repeat-stmt -> repeat stmt-sequence until bool-exp
11. assign-stmt -> identifi er := exp
12. read-stmt -> read identifi er
13. write-stmt -> write exp
14. exp -> arithmetic-exp | bool-exp | string-exp
15. arithmetic-exp -> term { addop term }
16. addop -> + | --Syntax of TINY+
An EBNF grammar for TINY+ is as follows (Strings in bold are terminals):
1. program-> declarations stmt-sequence
2. declarations-> decl declarations |²
3. decl-> type-specifi er varlist
4. type-specifi er-> int | bool | string
5. varlist-> identifi er { , identifi er }
6. stmt-sequence-> statement { statement }
7. statement-> if-stmt | repeat-stmt | assign-stmt | read-stmt | write-stmt
| while-stmt
8. while-stmt-> while bool-exp do stmt-sequence end
9. if-stmt-> if bool-exp then stmt-sequence [else stmt-sequence] end
10. repeat-stmt-> repeat stmt-sequence until bool-exp
11. assign-stmt-> identifi er := exp
12. read-stmt-> read identifi er
13. write-stmt-> write exp
14. exp-> arithmetic-exp | bool-exp | string-exp
15. arithmetic-exp-> term { addop term }
16. addop->+ |-
An EBNF grammar for TINY+ is as follows (Strings in bold are terminals):
1. program -> declarations stmt-sequence
2. declarations -> decl declarations |²
3. decl -> type-specifi er varlist
4. type-specifi er -> int | bool | string
5. varlist -> identifi er { , identifi er }
6. stmt-sequence -> statement { statement }
7. statement -> if-stmt | repeat-stmt | assign-stmt | read-stmt | write-stmt
| while-stmt
8. while-stmt -> while bool-exp do stmt-sequence end
9. if-stmt -> if bool-exp then stmt-sequence [else stmt-sequence] end
10. repeat-stmt -> repeat stmt-sequence until bool-exp
11. assign-stmt -> identifi er := exp
12. read-stmt -> read identifi er
13. write-stmt -> write exp
14. exp -> arithmetic-exp | bool-exp | string-exp
15. arithmetic-exp -> term { addop term }
16. addop -> + | --Syntax of TINY+
An EBNF grammar for TINY+ is as follows (Strings in bold are terminals):
1. program-> declarations stmt-sequence
2. declarations-> decl declarations |²
3. decl-> type-specifi er varlist
4. type-specifi er-> int | bool | string
5. varlist-> identifi er { , identifi er }
6. stmt-sequence-> statement { statement }
7. statement-> if-stmt | repeat-stmt | assign-stmt | read-stmt | write-stmt
| while-stmt
8. while-stmt-> while bool-exp do stmt-sequence end
9. if-stmt-> if bool-exp then stmt-sequence [else stmt-sequence] end
10. repeat-stmt-> repeat stmt-sequence until bool-exp
11. assign-stmt-> identifi er := exp
12. read-stmt-> read identifi er
13. write-stmt-> write exp
14. exp-> arithmetic-exp | bool-exp | string-exp
15. arithmetic-exp-> term { addop term }
16. addop->+ |-
(系统自动生成,下载前可以参看下载内容)
下载文件列表
TINY+1
......\TINY+实验报告.doc
......\源代码
......\......\Debug
......\......\.....\tiny.exe
......\......\.....\tiny.ilk
......\......\.....\tiny.pdb
......\......\tiny
......\......\....\ANALYZE.C
......\......\....\ANALYZE.H
......\......\....\CGEN.C
......\......\....\CGEN.H
......\......\....\CODE.C
......\......\....\CODE.H
......\......\....\Debug
......\......\....\.....\ANALYZE.obj
......\......\....\.....\BuildLog.htm
......\......\....\.....\CGEN.obj
......\......\....\.....\CODE.obj
......\......\....\.....\MAIN.obj
......\......\....\.....\mt.dep
......\......\....\.....\PARSE.obj
......\......\....\.....\scan.obj
......\......\....\.....\SYMTAB.obj
......\......\....\.....\tiny.exe.embed.manifest
......\......\....\.....\tiny.exe.embed.manifest.res
......\......\....\.....\tiny.exe.intermediate.manifest
......\......\....\.....\TM.obj
......\......\....\.....\UTIL.obj
......\......\....\.....\vc90.idb
......\......\....\.....\vc90.pdb
......\......\....\GLOBALS.H
......\......\....\lab1sample.tny
......\......\....\LEX
......\......\....\...\TINY.L
......\......\....\MAIN.C
......\......\....\MAKEFILE
......\......\....\PARSE.C
......\......\....\PARSE.H
......\......\....\README.DOS
......\......\....\sample+.tm
......\......\....\SAMPLE+.TNY
......\......\....\SAMPLE.TM
......\......\....\SAMPLE.TNY
......\......\....\SAMPLE2.TNY
......\......\....\SCAN.C
......\......\....\SCAN.H
......\......\....\SYMTAB.C
......\......\....\SYMTAB.H
......\......\....\TINY.EXE
......\......\....\tiny.vcproj
......\......\....\tiny.vcproj.B3-138-055.Administrator.user
......\......\....\tiny.vcproj.GAVIN-NB.GAVIN.user
......\......\....\TM.C
......\......\....\TM.EXE
......\......\....\UTIL.C
......\......\....\UTIL.H
......\......\....\YACC
......\......\....\....\GLOBALS.H
......\......\....\....\TINY.Y
......\......\tiny.ncb
......\......\tiny.sln
TINY+2
......\TINY+实验报告.doc
......\源代码
......\......\Debug
......\......\.....\tiny2.exe
......\......\.....\tiny2.ilk
......\......\.....\tiny2.pdb
......\......\tiny2
......\......\.....\ANALYZE.C
......\......\.....\ANALYZE.H
......\......\.....\CGEN.C
......\......\.....\CGEN.H
......\......\.....\CODE.C
......\......\.....\CODE.H
......\......\.....\Debug
......\......\.....\.....\ANALYZE.obj
......\......\.....\.....\BuildLog.htm
......\......\.....\.....\CGEN.obj
......\......\.....\.....\CODE.obj
......\......\.....\.....\MAIN.obj
......\......\.....\.....\mt.dep
......\......\.....\.....\PARSE.obj
......\......\.....\.....\SCAN.obj
......\......\.....\.....\SYMTAB.obj
......\......\.....\.....\tiny2.exe.embed.manifest
......\......\.....\.....\tiny2.exe.embed.manifest.res
......\......\.....\.....\tiny2.exe.intermediate.manifest
......\......\.....\.....\UTIL.obj
......\......\.....\.....\vc90.idb
......\......\.....\.....\vc90.pdb
......\......\.....\GLOBALS.H
......\......\.....\lab1sample.tny
......\......\.....\LEX
......\......\.....\...\TINY.L
......\......\.....\MAIN.C
......\......\.....\PARSE.C
......\......\.....\PARSE.H
......\......\.....\README.DOS
......\TINY+实验报告.doc
......\源代码
......\......\Debug
......\......\.....\tiny.exe
......\......\.....\tiny.ilk
......\......\.....\tiny.pdb
......\......\tiny
......\......\....\ANALYZE.C
......\......\....\ANALYZE.H
......\......\....\CGEN.C
......\......\....\CGEN.H
......\......\....\CODE.C
......\......\....\CODE.H
......\......\....\Debug
......\......\....\.....\ANALYZE.obj
......\......\....\.....\BuildLog.htm
......\......\....\.....\CGEN.obj
......\......\....\.....\CODE.obj
......\......\....\.....\MAIN.obj
......\......\....\.....\mt.dep
......\......\....\.....\PARSE.obj
......\......\....\.....\scan.obj
......\......\....\.....\SYMTAB.obj
......\......\....\.....\tiny.exe.embed.manifest
......\......\....\.....\tiny.exe.embed.manifest.res
......\......\....\.....\tiny.exe.intermediate.manifest
......\......\....\.....\TM.obj
......\......\....\.....\UTIL.obj
......\......\....\.....\vc90.idb
......\......\....\.....\vc90.pdb
......\......\....\GLOBALS.H
......\......\....\lab1sample.tny
......\......\....\LEX
......\......\....\...\TINY.L
......\......\....\MAIN.C
......\......\....\MAKEFILE
......\......\....\PARSE.C
......\......\....\PARSE.H
......\......\....\README.DOS
......\......\....\sample+.tm
......\......\....\SAMPLE+.TNY
......\......\....\SAMPLE.TM
......\......\....\SAMPLE.TNY
......\......\....\SAMPLE2.TNY
......\......\....\SCAN.C
......\......\....\SCAN.H
......\......\....\SYMTAB.C
......\......\....\SYMTAB.H
......\......\....\TINY.EXE
......\......\....\tiny.vcproj
......\......\....\tiny.vcproj.B3-138-055.Administrator.user
......\......\....\tiny.vcproj.GAVIN-NB.GAVIN.user
......\......\....\TM.C
......\......\....\TM.EXE
......\......\....\UTIL.C
......\......\....\UTIL.H
......\......\....\YACC
......\......\....\....\GLOBALS.H
......\......\....\....\TINY.Y
......\......\tiny.ncb
......\......\tiny.sln
TINY+2
......\TINY+实验报告.doc
......\源代码
......\......\Debug
......\......\.....\tiny2.exe
......\......\.....\tiny2.ilk
......\......\.....\tiny2.pdb
......\......\tiny2
......\......\.....\ANALYZE.C
......\......\.....\ANALYZE.H
......\......\.....\CGEN.C
......\......\.....\CGEN.H
......\......\.....\CODE.C
......\......\.....\CODE.H
......\......\.....\Debug
......\......\.....\.....\ANALYZE.obj
......\......\.....\.....\BuildLog.htm
......\......\.....\.....\CGEN.obj
......\......\.....\.....\CODE.obj
......\......\.....\.....\MAIN.obj
......\......\.....\.....\mt.dep
......\......\.....\.....\PARSE.obj
......\......\.....\.....\SCAN.obj
......\......\.....\.....\SYMTAB.obj
......\......\.....\.....\tiny2.exe.embed.manifest
......\......\.....\.....\tiny2.exe.embed.manifest.res
......\......\.....\.....\tiny2.exe.intermediate.manifest
......\......\.....\.....\UTIL.obj
......\......\.....\.....\vc90.idb
......\......\.....\.....\vc90.pdb
......\......\.....\GLOBALS.H
......\......\.....\lab1sample.tny
......\......\.....\LEX
......\......\.....\...\TINY.L
......\......\.....\MAIN.C
......\......\.....\PARSE.C
......\......\.....\PARSE.H
......\......\.....\README.DOS