#include "define.h"
#include
#include
#include
#include
FILE *fp
/*//////////////////////////////////////////////////////////////////////////////
This is a pretreatment.
/////////////////////////////////////////////////////////////////////////////*/
void readIntoBuffer(char buffer[256])
{
char ch1
char temp
int i
for(i=0 i
本人自己改进过的帧间差分方法,并且调试过,对于学习车辆检测算法的朋友,有些帮助-I own improved interframe difference method, and debugging, the vehicle detection algorithm for learning friends, and some help
由于时间紧迫及事先准备不足,编译器最后定型时暴露出不少问题及不足之处,主要有以下一些方面: 不支持数组数据类型,这是文法分析器设计时的一个疏漏,由于时间关系,最后只得把扫描器中已做好的相关的数组部分删去。 对于float数据类型的支持,直到语义分析都是正常的,也能生成相应的汇编代码,但由于我们对8086/8088指令系统本身了解不足,这样的汇编代码将只能做到含义上完全忠实于源程序,但不能运行。 对于局部变量的支持,则于时间紧迫,所有的局部变量全被处理成静态变量。使递归函数不能得到正确的结果。 对于函数调用语句,不进行参数匹配检查,如果参数数量不对,也将能通过编译,但运行时将产生非法操作。 对&& !等逻辑操作在最后生成代码时处理比较粗燥,生成的代码在逻辑复杂时将不能保证运行正常。 接下来有一些,不能说是缺陷,但必须说明的问题: 对于main函数,没有参数表,通回类型也必须为void,但如果写上参数表及其他返回类型也能编译通过,生成代码时将简单地忽略,不影响最后的代码的运行。 对于while,for,if语句,其语句体不管是一句还是多句,必须都有{}围起来。这跟C语言中若是一句则可省略{}不同。-Due to the time constraints and lack of preparation in advance, the compiler finalized when exposed numerous problems and shortcomings, mainly in the following aspects : no support for array data type, which is grammar analyzer design of an omission, because of the time, the final could only have scanners do phase customs array deleted. For float data types of support until semantic analysis is normal, and can generate the corresponding assembly code, but because of our 808
学习简单的Yacc说明的原理,掌握Yacc源文件的写法以及语法分析器生成工具BISON的使用方法和Yacc源文件的运行方法和基本步骤。
-Yacc study shows a simple principle, Yacc master source file written syntax analyzer and generate UML tools and the use of the source language Yacc pieces of the operation and basic steps.
这是我们学校平时实习的四个内容:词法分析、递归下降子程序、ll1语法分析、lr0语法分析 是我用c++编写的。-This our peacetime training schools of the four elements : lexical analysis, recursive decline subroutine, ll1 syntax analysis, lr0 syntax analysis is used c prepared.