CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - c l
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Sub Category
assembly language
SCSI-ASPI
ELanguage
Disk Tools
Speech/Voice recognition/combine
Editor
Anti-virus
MultiLanguage
MPI
source in ebook
Delphi VCL
OS Develop
MiddleWare
MacOS develop
LabView
e-language
python
Search - c l - List
[
ELanguage
]
Lex_Yacc_Parser
DL : 0
语法分析器lex和词法分析器yacc的C++语言实现 1.Lex (1)Lex输入文件的解析 (2)正规表达式的解析 (3)一个正规表达式到NFA的转换算法实现 (4)多个NFA的合并 (5)NFA的确定化和最小化算法实现 (6)返回状态与返回内容的对应 2.Yacc (1)Yacc输入文件的解析 (2)上下文无关文法到对应LR(1)文法的下推自动机的构造 (3)LR(1)文法的下推自动机到相应分析表的构造 (4)LR(1)总控程序的构造(查表程序) (5)符号表的构建与相应管理程序 (6)语义动作程序的加入 环境:Visual Studio.NET 2003-Parser lex and yacc lexical analyzer C language 1.Lex (1) Lex lose into the analytical document (2) Analysis of the formal expression (3) a formal expression of the NFA conversion algorithm (4 ) more than the combined NFA (5) NFA and the determination of the smallest algorithm (6) to return to state and the return of the contents 2.Yacc counterparts (1) Yacc the analytical input file (2) context-free grammar to the corresponding LR (1) grammar pushdown automata Construction (3) LR (1) grammar pushdown automata corresponding to the tectonic analysis table (4) L R (1) General procedures for the control structure (look-up table) (5) Construction of the symbol table with the corresponding management procedures (6) semantic action procedures to the environment : Visual Studio 2003
Date
: 2008-10-13
Size
: 40.52kb
User
:
尤冉
[
ELanguage
]
l-language-in-c
DL : 0
本学期编译课程需要实现L语言,本源码用c实现了L语言的词法语法的分析部分-compile this semester courses need to achieve L language, the source code used to achieve the L c language lexical analysis of the grammatical
Date
: 2008-10-13
Size
: 174.1kb
User
:
digg
[
ELanguage
]
ucw-src129
DL : 0
UC Library Extensions UnderC comes with a pocket implementation of the standard C++ libraries, which is a reasonably faithful subset. This documentation describes those UnderC functions and classes which are not part of the C++ standard. UC Library Builtin functions: Most of these are standard C functions, but there are a few unique to the UnderC system which give you runtime access to the compiler. You may evaluate expressions, execute commands, compile code, etc. * Expands the text in expr using the UnderC preprocessor, putting the result into buff. void uc_macro_subst(const char* expr, char* buff, int buffsize) * Executes a UC #-command, like #l or #help. uc_cmd() expects the name of the command, _without_ the hash, e.g. uc_cmd(\"l fred.cpp\") or uc_cmd(\"help\"). void uc_cmd(const char* cmd) * Evaluates any C++ expression or statement will return non-zero if unsuccessful.
Date
: 2008-10-13
Size
: 418.61kb
User
:
lee
[
ELanguage
]
pl/0
DL : 0
/*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)
Date
: 2010-09-13
Size
: 24.55kb
User
:
xqq771084591
[
ELanguage
]
yacc_lex
DL : 0
编译原理的一个小实例 YACC(Yet Another Compiler-Compiler)是LALR(1)分析器的自动生成工具,它的第一版于70年代初发表,是美国贝尔实验室的软件产品(作者为S.C.Johnson) YACC将一前后文无关文法转换为一LALR(1)分析表,并提供使用该分析表进行语法分析的总控程序yyparse().-compiler principles of a small example of YACC (Yet Another Compiler- Compiler) is LALR (1) the automatic generation analyzer tool, its first edition in the early 1970s, was published in the United States Bell Labs software products (the author S. C. Johnson) will be a before and after YACC grammar unrelated to the text converted to a LALR (1) Analysis Table, and provide analysis of the use of the table for syntax analysis of the total control procedures yyparse ().
Date
: 2025-12-27
Size
: 108kb
User
:
张雷
[
ELanguage
]
Lex_Yacc_Parser
DL : 0
语法分析器lex和词法分析器yacc的C++语言实现 1.Lex (1)Lex输入文件的解析 (2)正规表达式的解析 (3)一个正规表达式到NFA的转换算法实现 (4)多个NFA的合并 (5)NFA的确定化和最小化算法实现 (6)返回状态与返回内容的对应 2.Yacc (1)Yacc输入文件的解析 (2)上下文无关文法到对应LR(1)文法的下推自动机的构造 (3)LR(1)文法的下推自动机到相应分析表的构造 (4)LR(1)总控程序的构造(查表程序) (5)符号表的构建与相应管理程序 (6)语义动作程序的加入 环境:Visual Studio.NET 2003-Parser lex and yacc lexical analyzer C language 1.Lex (1) Lex lose into the analytical document (2) Analysis of the formal expression (3) a formal expression of the NFA conversion algorithm (4 ) more than the combined NFA (5) NFA and the determination of the smallest algorithm (6) to return to state and the return of the contents 2.Yacc counterparts (1) Yacc the analytical input file (2) context-free grammar to the corresponding LR (1) grammar pushdown automata Construction (3) LR (1) grammar pushdown automata corresponding to the tectonic analysis table (4) L R (1) General procedures for the control structure (look-up table) (5) Construction of the symbol table with the corresponding management procedures (6) semantic action procedures to the environment : Visual Studio 2003
Date
: 2025-12-27
Size
: 40kb
User
:
尤冉
[
ELanguage
]
l-language-in-c
DL : 0
本学期编译课程需要实现L语言,本源码用c实现了L语言的词法语法的分析部分-compile this semester courses need to achieve L language, the source code used to achieve the L c language lexical analysis of the grammatical
Date
: 2025-12-27
Size
: 3.3mb
User
:
digg
[
ELanguage
]
ucw-src129
DL : 1
UC Library Extensions UnderC comes with a pocket implementation of the standard C++ libraries, which is a reasonably faithful subset. This documentation describes those UnderC functions and classes which are not part of the C++ standard. UC Library Builtin functions: Most of these are standard C functions, but there are a few unique to the UnderC system which give you runtime access to the compiler. You may evaluate expressions, execute commands, compile code, etc. * Expands the text in expr using the UnderC preprocessor, putting the result into buff. void uc_macro_subst(const char* expr, char* buff, int buffsize) * Executes a UC #-command, like #l or #help. uc_cmd() expects the name of the command, _without_ the hash, e.g. uc_cmd("l fred.cpp") or uc_cmd("help"). void uc_cmd(const char* cmd) * Evaluates any C++ expression or statement will return non-zero if unsuccessful. -UC Library Extensions UnderC comes with a pocket implementation of the standard C++ libraries, which is a reasonably faithful subset. This documentation describes those UnderC functions and classes which are not part of the C++ standard. UC Library Builtin functions: Most of these are standard C functions, but there are a few unique to the UnderC system which give you runtime access to the compiler. You may evaluate expressions, execute commands, compile code, etc. * Expands the text in expr using the UnderC preprocessor, putting the result into buff. void uc_macro_subst(const char* expr, char* buff, int buffsize) * Executes a UC#-command, like#l or#help. uc_cmd() expects the name of the command, _without_ the hash, e.g. uc_cmd("l fred.cpp") or uc_cmd("help"). void uc_cmd(const char* cmd) * Evaluates any C++ expression or statement will return non-zero if unsuccessful.
Date
: 2025-12-27
Size
: 418kb
User
:
lee
[
ELanguage
]
DCC0.11VC6
DL : 0
用C++编写的一个编译器,功能很强大,花了我两个月时间,是编译原理一个大作业。-With C++ Prepared a compiler, function very strong, I spent two months compiling principle is a big operation.
Date
: 2025-12-27
Size
: 1.58mb
User
:
于沛
[
ELanguage
]
c--.l
DL : 0
用yacc写的c编译器,包括各种运算符,逻辑运算符等等。-With yacc written c compiler, including operators, logical operators and so on.
Date
: 2025-12-27
Size
: 1kb
User
:
kaka
[
ELanguage
]
TrickTools
DL : 0
生成Trick文件工具 1.Open command line 2.input tricktest Usage: TrickTest -f -o -i -f source mpeg2 file to trick -o trick output directory -i output file id -m max coding error, default 0 -b max bitrate for trick generate, default 0 mean no limit -s trick buffer block size, must be n*188 -l log file, default c:\tricktest.log example: tricktest -f 黑鹰行动.mpg -o c:\temp -i A -m 1000 -b 3750000 soure file: 黑鹰行动.mpg output directory: c:\temp filename: 000000A,000000A.ff,000000A.fr,000000A.vvx max coding error: 1000 trick generation speed: 3750000 bps a-Trick document generation tool 1.Open command line 2.input tricktest Usage: TrickTest-f-o-i-f source mpeg2 file to trick-o trick output directory-i output file id-m max coding error, default 0-b max bitrate for trick generate, default 0 mean no limit-s trick buffer block size, must be n* 188-l log file, default c: \ tricktest.log example: tricktest-f Black Hawk operations. mpg-oc: \ temp-- i A-m 1000-b 3750000 soure file: Black Hawk Down. mpg output directory: c: \ temp filename: 000000A, 000000A.ff, 000000A.fr, 000000A.vvx max coding error: 1000 trick generation speed: 3750000 bps a
Date
: 2025-12-27
Size
: 540kb
User
:
Jiang
[
ELanguage
]
3_wire_lcd
DL : 0
lcd 3 wire 74HC164 avr codevisionavr C
Date
: 2025-12-27
Size
: 2kb
User
:
mn
[
ELanguage
]
l
DL : 0
旨在通过lex实现的词法分析器的C++源代码-Aims to achieve through the lex lexical analyzer of C++ source code
Date
: 2025-12-27
Size
: 169kb
User
:
liang
[
ELanguage
]
bianyiyuanli
DL : 0
将pascal语言编译为c,然后编译运行-Pascal language will be compiled to c, and then compile and run
Date
: 2025-12-27
Size
: 91kb
User
:
王龙
[
ELanguage
]
translatorHTML2RTF
DL : 0
This a HTML to RTF translator. This translator is done in LEX and YACC. You need to pass to the translator the html file and the application will output a file formatted in rtf style according to the html you ve entered. For using: lex file.l, yacc -d file.y, gcc -o app lex.yy.c y.tab.c -lfl. Recommended to use on a linux platform: ubuntu, fedora.
Date
: 2025-12-27
Size
: 28kb
User
:
mihai
[
ELanguage
]
lex_simple
DL : 0
简单的lex编程,详细见英文描述 Running the Lex program 1. Write the Lex specifications as described above in a file, say, prog1.l 2. On moon.cse.yzu.edu.tw, do the following: flex prog1.l (Produces lex.yy.c as the output) gcc lex.yy.c -lfl (Compile the C file and link with Lex library) a.out (Run the executable, and type the input, followed by ) or, if the input is in a file, say, hw1.in, then do the following: a.out < hw1.in-Write the LEX program as per the specifications below. -------------------------------------------------------------------------------- Recognize Action Arithmetic (+,-,*, /) Print the operator along with the line number Relational (<, <=, >, >=, !=, ==) Print the operator along with the line number Assignment (=) Print the operator along with the line number Parenthesis (left and right ones) No action for now Some set of Reserved Words (for, if, while, int, ...) Print the Reserved word along with the line number Identifiers Insert into a table and keep track of the line number Numbers Print the number (should handle integer and floating point) along with the line number Keep explicit track of the current line number by recognizing "\n" as a separate token. Do not use the LEX line number variable. At the end, print the number of distinct identifiers and the line numbers on which they occur. Sample Input: int i, n, sum i =
Date
: 2025-12-27
Size
: 23kb
User
:
yifuren
[
ELanguage
]
c-tools
DL : 0
安装C语言编译器1 7 . 2 . 1 安装基本C语言函数库1 7 . 2 . 2 安装内核函数库1 7 . 2 . 3 安装b u i l d管理器1 7 . 2 . 4 安装C语言预处理器1 7 . 2 . 5 安装文件比较工具软件1 7 . 2 . 6 安装源代码补丁修补软件1 7 . 2 . 7 寻找专业函数库1 7 . 2 . 8 建立一个简单的制作文件1-c programming tools docment.
Date
: 2025-12-27
Size
: 125kb
User
:
mahande
[
ELanguage
]
PL0Compiler-C
DL : 0
PL/0编译器C++/C版本 1. 测试文件必须是以testin.pl0命名的文件。 2. 成功运行测试程序后,会生成testout.txt的文件,里面包括代码、指令和运行结果。 3、First.cpp--只包含词法语法分析,Error.cpp--加入了出错处理,All.cpp--包含代码生成和解释程序,是完整编译器。-请键入文字或网站地址,或者上传文档。 取消 PL/0 biānyì qì C++/C bǎnběn 1. Cèshì wénjiàn bìxū shì yǐ testin.Pl0 mìngmíng de wénjiàn. 2. Chénggōng yùnxíng cèshì chéngxù hòu, huì shēngchéng testout.Txt de wénjiàn, lǐmiàn bāokuò dàimǎ, zhǐlìng hé yùn háng jiéguǒ. 3,First.Cpp--zhǐ bāohán cífǎ yǔfǎ fēnxī,Error.Cpp--jiārùle chūcuò chu lǐ,All.Cpp--bāohán dàimǎ shēngchéng hé jiěshì chéngxù, shì wánzhěng biānyì qì. 您是不是要找: pascal 子语言 pl 0编译器 解释器 pascal编写 PL/0 compiler C++/C version 1 test file named file must be based testin.pl0. (2) After successfully running the test program will generate testout.txt file, which includes the code, instructions and operating results. 3, First.cpp-- contains only syntax analysis, Error.cpp-- added error handling, All.cpp-- include code generation and interpretation procedures are complete compiler.
Date
: 2025-12-27
Size
: 10kb
User
:
夏日星
[
ELanguage
]
myshell.c
DL : 0
Your shell prompt MUST adhere to the following format: o Current date (optional) and time (mandatory) followed by the hash sign (e.g., 13:03:00#) Your shell MUST support, at minimum, the following commands: o The internal shell command “exit” to terminate the shell o ls, with no arguments o ls, with arguments (e.g., ls –l) o echo Your shell WILL NEED system calls fork(), waitpid(), and one of execv, execve or execvp. You MUST NOT use the C library function system(). You WILL receive a grade of zero if you do so. You MUST check and correctly handle all return values. This means that you need to read the man pages for the system calls to figure out what the possible return values are and the types of errors they indicate, and what you must do when you get that error. - Your shell prompt MUST adhere to the following format: o Current date (optional) and time (mandatory) followed by the hash sign (e.g., 13:03:00#) Your shell MUST support, at minimum, the following commands: o The internal shell command “exit” to terminate the shell o ls, with no arguments o ls, with arguments (e.g., ls –l) o echo Your shell WILL NEED system calls fork(), waitpid(), and one of execv, execve or execvp. You MUST NOT use the C library function system(). You WILL receive a grade of zero if you do so. You MUST check and correctly handle all return values. This means that you need to read the man pages for the system calls to figure out what the possible return values are and the types of errors they indicate, and what you must do when you get that error.
Date
: 2025-12-27
Size
: 1kb
User
:
Jason
[
ELanguage
]
c`1
DL : 0
Da ay klam shoukrn nfs l brnamg l fat nfs l ay klam
Date
: 2025-12-27
Size
: 2kb
User
:
domm
«
1
2
»
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.