Location:
Search - FSYS
Search list
Description: 这是复数的加减法运算源代码.使用C++在VC环境中实现.-This is the plural of addition and subtraction operations source. The use of C in the VC environment to achieve.
Platform: |
Size: 2524 |
Author: 刘志铭 |
Hits:
Description: 用单片机C51语言实现复数运算,在工控编程中很有借鉴意义。
Platform: |
Size: 6116 |
Author: zhang |
Hits:
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: 这是复数的加减法运算源代码.使用C++在VC环境中实现.-This is the plural of addition and subtraction operations source. The use of C in the VC environment to achieve.
Platform: |
Size: 2048 |
Author: 刘志铭 |
Hits:
Description: 用单片机C51语言实现复数运算,在工控编程中很有借鉴意义。-MCU C51 realize the plural language computing in industrial control programming of referential significance.
Platform: |
Size: 6144 |
Author: zhang |
Hits:
Description: 以一个简单的例子对于复数运算的应用进行了分析和介绍-With a simple example of computing for the application of complex analysis and presentation of
Platform: |
Size: 5120 |
Author: 王 |
Hits:
Description: ramfs源代码,想研究文件系统的朋友可以看一下,不长,最简单的内存文件系统-ramfs source code, to study the file system of friends can take a look at, not long, the simplest memory file system
Platform: |
Size: 6144 |
Author: LIU |
Hits:
Description: HT82K95E应用范例
详细的usb程序
HT82K95E datasheet -HT82K95E datasheet Features
Operating voltage:
fSYS=6M/12MHz: 3.3V~5.5V
Low voltage reset function
32 bidirectional I/O lines (max.)
8-bit programmable timer/event counter with
overflow interrupt
16-bit programmable timer/event counter and
overflow interrupts
Crystal oscillator (6MHz or 12MHz)
Watchdog Timer
PS2 and USB modes supported
USB 2.0 low speed function
3 endpoints supported (endpoint 0 included)
Platform: |
Size: 681984 |
Author: 兰顺华 |
Hits:
Description: 简单的ASP页面设计,可以供您在学习ASP时参考,入门的简单小页面-A simple ASP page design can be used for reference in learning ASP, simple entry page...
Platform: |
Size: 886784 |
Author: 云飞 |
Hits:
Description: See Documentation ia64 fsys.txt for details on fsyscalls.
Platform: |
Size: 8192 |
Author: cgcpjh |
Hits:
Description: Finalizes DPLL registration process. In case a failure (clk-ref or clk-bypass is missing), the clock is added to retry list and the initialization is retried on later stage.
Platform: |
Size: 15360 |
Author: menlangmv |
Hits: