Location:
Search - fct
Search list
Description: /*PL/0编译系统C版本头文件pl0.h*/
/*
typedef enum
{
false,
true
} bool;
*/
#define norw 13 /*关键字个数*/
#define txmax 100 /*名字表容量*/
#define nmax 14 /*number的最大位数*/
#define al 10 /*符号的最大长度*/
#define amax 2047 /*地址上界*/
#define levmax 3 /*最大允许过程嵌套声明层数[0,levmax]*/
#define cxmax 200 /*最多的虚拟机代码数*/
/*符号*/
enum symbol{
nul, ident, number, plus, minus,
times, slash, oddsym, eql, neq,
lss, leq, gtr, geq, lparen,
rparen, comma, semicolon, period, becomes,
beginsym, endsym, ifsym, thensym, whilesym,
writesym, readsym, dosym, callsym, constsym,
varsym, procsym,
};
#define symnum 32
/*名字表中的类型*/
enum object{
constant,
variable,
procedur,
};
/*虚拟机代码*/
enum fct{
lit, opr, lod,
sto, cal, inte,
jmp, jpc,
};
#define fctnum 8
/*虚拟机结构代码*/
struct instruction
{
/*454*/
enum fct f; // 虚拟机代码指令
int l; //引用层与声明层的层次差
int a; //根据f的不同而不同
};
FILE * fas; //输出名字表
FILE * fa; //输出虚拟机代码
FILE * fa1; //输出源文件及其各行对应的首地址
FILE * fa2; //输出结果
bool listswitch; //显示虚拟机代码与否
bool tableswitch; //显示名字与否
char ch; //获取字符的缓冲区,getch使用
enum symbol sym; //当前的符号
char id[al+1]; //当前ident,多出的一个字节用于存放0
int num; //当前number
int cc,ll; //getch使用的计数器,cc表示当前字符(ch)的位置
int cx; //虚拟机代码指针,取值范围[0,cxmax-1]
char line[81]; //读取行缓冲区
char a[al+1]; //临时符号,多出的一个字节用于存放0
struct instruction code[cxmax]; //存放虚拟机代码的数组
char word[norw][al]; //保留字
enum symbol wsym[norw]; //保留字对应的符号值
enum symbol ssym[256]; //单字符的符号值
char mnemonic[fctnum][5]; //虚拟机代码指令名称
bool declbegsys[symnum]; //表示声明开始的符号集合
bool statbegsys[symnum]; //表示语句开始的符号集合
bool facbegsys[symnum]; //表示因子开始的符号集合
//名字表结构
struct tablestruct
{
char name[al]; //名字
enum object kind; //类型:const,var,array or procedure
int val; //数值,仅const使用
int level; //所须层,仅const不能用
int adr; //地址,仅const不能用
int size; //需要分配的数据空间,仅procedure使用
};
struct tablestruct table[txmax]; //名字表
FILE * fin;
FILE * fout;
char fname[al];
int err; //错误计数器
//当函数中发生fatal error时,返回-1告知调用它的函数,最终退出程序
#define getsymdo if(-1==getsym()) return -1
#define getchdo if(-1==getch()) return -1
#define testdo(a,b,c) if(-1==test(a,b,c)) return -1
#define gendo(a,b,c) if(-1==gen(a,b,c)) return -1
#define expressiondo(a,b,c) if(-1==expression(a,b,c)) return -1
#define factordo(a,b,c) if(-1==factor(a,b,c)) return -1
#define termdo(a,b,c) if(-1==term(a,b,c)) return -1
#define conditiondo(a,b,c) if(-1==condition(a,b,c)) return -1
#define statementdo(a,b,c) if(-1==statement(a,b,c)) return -1
#define constdeclarationdo(a,b,c) if(-1==constdeclaration(a,b,c)) return -1
#define vardeclarationdo(a,b,c) if(-1==vardeclaration(a,b,c)) return -1
void error(int n);
int getsym();
int getch();
void init();
int gen(enum fct x,int y ,int z);
int test(bool *s1,bool *s2,int n);
int inset(int e,bool *s);
int addset(bool *str,bool * s1,bool * s2,int n);
int subset(bool *str,bool * s1,bool * s2,int n);
int mulset(bool *str,bool * s1,bool * s2,int n);
int block(int lev,int tx,bool * fsys);
void interpret();
int factor(bool * fsys,int * ptx,int lev);
int term(bool * fsys,int * ptx,int lev);
int condition(bool * fsys,int * ptx,int lev);
int expression(bool * fsys,int * ptx,int lev);
int statement(bool * fsys,int * ptx,int lev);
void listcode(int cx0);
int vardeclaration(int *ptr, int lev,int *ptx);
int constdeclaration(int *ptr, int lev,int *ptx);
int position(char * idt,int tx);
void enter(enum object k,int * ptx,int lev, int * pdx);
int base(int l,int * s,int b)
Platform: |
Size: 25139 |
Author: xqq771084591 |
Hits:
Description: 刘儒勋的运动界面追踪-VOF源代码-Mathematics, tracking the movement interface-VOF source code
Platform: |
Size: 10240 |
Author: 匡唐清 |
Hits:
Description: VB开发的一个FCT测试系统,使用到了WT1600功率计和PCL734数字I/O卡和NI的GPIB卡,程序还没最终完成,但主要功能已经可以使用-VB developed a FCT testing system, using the WT1600 power meter and PCL734 digital I/O cards and NI s GPIB card, procedures not yet finalized, but the main function has been to use
Platform: |
Size: 202752 |
Author: 张鹏 |
Hits:
Description: volume of fluid方法中的一种FCT方法的源代码-volume of fluid method in a source code FCT method
Platform: |
Size: 2048 |
Author: 廖斌 |
Hits:
Description: 使用Fortran软件编译的vof模型源程序,对初学者是一个很好的参考例子!-Software compiled using the Fortran source vof model for beginners is a good reference for an example!
Platform: |
Size: 2048 |
Author: 清道夫 |
Hits:
Description: FCT-通量修正输运,一种高精度数值计算格式,在CFD中应用广泛。这里给出的对于一维标量守恒方程的C语言程序,是该格式入门的绝好资料。-FCT-flux corrected transportation, is a a high order numerical scheme, which is wiedly usd in CFD field. Enclosed herewith is a C vesion for 1D scalar equation, and hope to be helpful for beginners.
Platform: |
Size: 22528 |
Author: Jinguang Yang |
Hits:
Description: 快速脊波变换,三角波,或者基波变换,没有什么其他要说明的了-fct-Fast Curvelet Transform.function C = FCT(x, is_real, nbscales, nbangles_coarse)
Platform: |
Size: 3072 |
Author: 胡大帅 |
Hits:
Description: 分岔图的matlab仿真程序,改成适合自己的系统即可用-Bifurcation diagram of matlab simulation program, change to be suitable for their own systems can use
Platform: |
Size: 1024 |
Author: 尹晋文 |
Hits:
Description: 2D的fct调用子程序,功能强大,计算稳定,适用于处理具有大的梯度或者不连续情况的模型问题。-2D fct subroutine,is powerful and computational stability.this subroutine is well satified in situation of a large gradient and discontinuous .
Platform: |
Size: 4096 |
Author: guan |
Hits:
Description: the function calculate the derivarive in an image
Platform: |
Size: 1024 |
Author: red |
Hits:
Description: 控制压床上下,配合ICT FCT自动化测试,以及自动盖章的程序-Control the pressure of the bed, with the ICT FCT automated testing program, as well as automatically seal
Platform: |
Size: 71680 |
Author: |
Hits:
Description: this code is for ga fct cross ,mutat,,,,,,,,,,,,,,convert.
constructif code.
it is usefull.
Platform: |
Size: 3072 |
Author: hussein |
Hits:
Description: lax-wendoff格式求解一维欧拉方程组,从而求解一维激波问题-The Lax-wendoff formats for solving one-dimensional Euler equations, thus solving the problem of one-dimensional shock
Platform: |
Size: 2048 |
Author: yimiaorong |
Hits:
Description: CFD数值模拟,高精度数值计算格式,FCT-通量修正输运,一种高精度数值计算格式,在CFD中应用广泛。这里给出的对于一维标量守恒方程的FOR语言程序,是该格式入门的绝好资料。-CFD numerical simulation, high-precision numerical calculation format, FCT-flux correction transport, a high-precision numerical algorithm, widely used in CFD. Given here for the one-dimensional scalar conservation equations FOR language program is an excellent entry of the format.
Platform: |
Size: 2048 |
Author: vanadium609 |
Hits:
Description: Fast Chirp Transform (FCT) is an algorithm designed to detect varying frequency signals.
Platform: |
Size: 8192 |
Author: Michael |
Hits:
Description: Fake Currency Detector (Indian Currency): This program can detect counterfeit currency of INR 100 and INR 500.-Fake Currency Detector (Indian Currency): This program can detect counterfeit currency of INR 100 and INR 500.
Platform: |
Size: 2620416 |
Author: Yuvraj Deshmukh |
Hits:
Description: 镇流器功能测试系统,采用WT1600功率计和研华PCL-1733/PCL-1734/NI GPIB卡进行控制-Ballast functional test system, using WT1600 power meter and Advantech PCL-1733/PCL-1734/NI GPIB card control
Platform: |
Size: 1235968 |
Author: naijiu.zhang |
Hits:
Description: 地球物理正演模拟中FCT方法压制数值频散的程序(Method of suppressing numerical dispersion by FCT method in geophysical forward modeling)
Platform: |
Size: 4096 |
Author: 在路上、
|
Hits:
Description: fct测试版的功能说明,主要用于国网电能表的pcb板检测,(The functional description of the FCT test version is mainly used for the PCB board detection of the national grid energy meter.)
Platform: |
Size: 19456 |
Author: 吐司哥 |
Hits:
Description: FCT消除频散(FCT elimination dispersion)
Platform: |
Size: 10535936 |
Author: lpppppp |
Hits: