由于时间紧迫及事先准备不足,编译器最后定型时暴露出不少问题及不足之处,主要有以下一些方面: 不支持数组数据类型,这是文法分析器设计时的一个疏漏,由于时间关系,最后只得把扫描器中已做好的相关的数组部分删去。 对于float数据类型的支持,直到语义分析都是正常的,也能生成相应的汇编代码,但由于我们对8086/8088指令系统本身了解不足,这样的汇编代码将只能做到含义上完全忠实于源程序,但不能运行。 对于局部变量的支持,则于时间紧迫,所有的局部变量全被处理成静态变量。使递归函数不能得到正确的结果。 对于函数调用语句,不进行参数匹配检查,如果参数数量不对,也将能通过编译,但运行时将产生非法操作。 对&& !等逻辑操作在最后生成代码时处理比较粗燥,生成的代码在逻辑复杂时将不能保证运行正常。 接下来有一些,不能说是缺陷,但必须说明的问题: 对于main函数,没有参数表,通回类型也必须为void,但如果写上参数表及其他返回类型也能编译通过,生成代码时将简单地忽略,不影响最后的代码的运行。 对于while,for,if语句,其语句体不管是一句还是多句,必须都有{}围起来。这跟C语言中若是一句则可省略{}不同。
标签:
上传时间: 2015-03-14
上传用户:gmh1314
c语言编程规范Style guidelines and programming practices for C/C++ code for Dynamic Software Solutions. Use the checklist at the end of this document prior to submitting code for peer review.
标签: programming guidelines Solutions for
上传时间: 2014-07-11
上传用户:aeiouetla
此代码可以实现以下功能 使用wordappalication 组件,代码如下 启动Word时用如下代码: begin try Wordapplication.Connect except MessageDlg(’Word may not be installed’, mtError, [mbOk], 0) Abort end Wordapplication.Visible := True WordApplication.Caption := ’Delphi automation’ end
标签: wordappalication 代码
上传时间: 2014-01-22
上传用户:Divine
词法分析程序,可对以下的C源程序进行分析:main() {int a[12] ,sum for(i=1 i<=12 i++) {for(j=1 j<=12 j++)scanf("%d",&a[i][j]) } for(i=12 i>=1 i--){ for(j=12 j>=1 j--){ if(i==j&&i+j==13)sum+=a[i][j] } } printf("%c",sum) }
上传时间: 2013-12-26
上传用户:skhlm
经典c程序100例==1--10 【程序1】 题目:有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少? 1.程序分析:可填在百位、十位、个位的数字都是1、2、3、4。组成所有的排列后再去 掉不满足条件的排列。 2.程序源代码: main() { int i,j,k printf("\n") for(i=1 i<5 i++) /*以下为三重循环*/ for(j=1 j<5 j++) for (k=1 k<5 k++) { if (i!=k&&i!=j&&j!=k) /*确保i、j、k三位互不相同*/ printf("%d,%d,%d\n",i,j,k) }
上传时间: 2014-01-07
上传用户:lizhizheng88
In each step the LZSS algorithm sends either a character or a <position, length> pair. Among these, perhaps character "e" appears more frequently than "x", and a <position, length> pair of length 3 might be commoner than one of length 18, say. Thus, if we encode the more frequent in fewer bits and the less frequent in more bits, the total length of the encoded text will be diminished. This consideration suggests that we use Huffman or arithmetic coding, preferably of adaptive kind, along with LZSS.
标签: algorithm character position either
上传时间: 2014-01-27
上传用户:wang0123456789
UnZip is a small zipfile extract utility. It is written to be assmall portable as possible and is intended to be starting point for im-plementation of .ZIP files in non-IBM environments.Source code is provided in C and Turbo Pascal. If you port this programto a non-IBM system, I would appreciate a copy of the ported source andexe files.
标签: is portable possible extract
上传时间: 2014-01-20
上传用户:维子哥哥
This program demonstrates how to do disconnected briefcase applications with ADO. When the Connected checkbox is unchecked the application is switched into offline mode. If the application is exited at that point then the data is persisted to a file on disk (along with any edits to the data). When the application is restarted it will load the persisted data if present, otherwise it will fetch the data from the database.
标签: demonstrates applications disconnected Connected
上传时间: 2015-03-24
上传用户:xcy122677
啥也不说了,请看代码示例 File : fat_dir.c FS_DIR *FS__fat_opendir(const char *pDirName, FS_DIR *pDir) { FS_size_t len FS_u32 unit FS_u32 dstart ....... FS_u32 dsize FS_i32 i char realname[12] char *filename if (!pDir) { return 0 /* No valid pointer to a FS_DIR structure */ }
标签:
上传时间: 2013-12-14
上传用户:梧桐
Altera recommends the following system configuration: * Pentium II 400 with 512-MB system memory (faster systems give better software performance) * SVGA monitor * CD-ROM drive * One or more of the following I/O ports: - USB port (if using Windows XP or Windows 2000) for USB-Blaster(TM) or MasterBlaster(TM) communications cables, or APU programming unit - Parallel port for ByteBlasterMV(TM) or ByteBlaster(TM) II download cables - Serial port for MasterBlaster communications cable * TCP/IP networking protocol installed * Windows 2000, Windows NT 4.0 with Service Pack 3 or later, or Windows XP * Internet Explorer 5.0 or later Memory & Disk Space Requirements USB开发
标签: system configuration recommends following
上传时间: 2015-03-27
上传用户:13188549192