Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - lexical program in c
Search - lexical program in c - List
对简单的C程序或者Pascal程序进行词法分析以TOKEN字的形式放入结果文件-of simple C program or Pascal procedures lexical analysis in the form of the word TOKEN Add outcome document
Date : 2008-10-13 Size : 8.39kb User : 杨鼎新

DL : 0
简单的词法分析小例子- Simple lexical analysis small example
Date : 2025-12-18 Size : 7kb User : 站长

对简单的C程序或者Pascal程序进行词法分析以TOKEN字的形式放入结果文件-of simple C program or Pascal procedures lexical analysis in the form of the word TOKEN Add outcome document
Date : 2025-12-18 Size : 183kb User : 杨鼎新

这是一个非常优秀的运用VC++.net编写的词法分析程序。可以用来辨别一段高级语言C语言编写的程序是否符合词法规范,比较不错-This is a very good use of VC++. Net written procedures for lexical analysis. Can be used to identify a section of high-level language program written in C language with the lexical norms, compare well
Date : 2025-12-18 Size : 5kb User : 3035037

编译课上做的小程序,用四种分析方法分别实现(LL1,算符优先,递归下降,简单词法分析) 完成对正则文法所描述的Pascal语言子集单词符号的词法分析程序。 <标识符>→字母︱ <标识符>字母︱ <标识符>数字 <无符号整数>→数字︱ <无符号整数>数字 <单字符分界符> →+ ︱- ︱* ︱ ︱(︱) <双字符分界符>→<大于>=︱<小于>=︱<小于>>︱<冒号>=︱<斜竖>* <小于>→< <等于>→= <大于>→> <冒号> →: <斜竖> →/ 识别语言的保留字 :begin end if then else for do while and or not-Compiler class to do a small procedure, analytical methods were used to achieve four (LL1, operator priority, recursive descent, a simple lexical analysis) to complete the grammar is described in a subset of the Pascal language word lexical analysis program symbols. < Identifier> → letters ︱ < identifier> letters ︱ < identifier> figures < unsigned integer> → Digital ︱ < unsigned integer> figures < single character boundaries Fu> →+ ︱- ︱ ︱* ︱ (︱) < two-character boundaries Fu> → < greater than> = ︱ < less than> = ︱ < less than> > ︱ < colon> = ︱ < oblique vertical> * < less than> → < < equal> → = < greater than> →> < colon> →: < oblique vertical> →/recognition of language reserved word: begin end if then else for do while and or not
Date : 2025-12-18 Size : 472kb User : 丁丁

DL : 0
否符合while语句的文法,或者能不能通过文法的开始符号推导出该语句。 (2) 该程序应该包括词法分析器,能对输入的语句进行词法分析,然后再对输出结果。词法分析器应能识别关键字,标示符,常量,操作符等。 (3) 该程序的语法分析器能对输入的语法进行分析,判断输入语句能否满足while循环语句的文法。通过简单优先的方法对语句进行分析,看能否能归约到文法的开始符号。 (4) 该程序的语义分析器就是对分析结果进行输出,要求输出结果是三地址形式的。-Compliance with the statement while the grammar, or to the beginning of grammar symbols can not be derived from the statement. (2) The program should include the lexical analyzer, the statement can be carried out input lexical analysis, and then output the results. Lexical analyzer should be able to identify the keywords, identifiers, constants, operators and so on. (3) parser of the program can analyze the syntax of input to determine whether the input statement to meet the loop while the grammar. Priorities through a simple statement of the method of analysis to see whether it can reduce to the beginning of grammar symbols. (4) the program analyzer is the semantic analysis of the results of the output requirements of the output is three-address form.
Date : 2025-12-18 Size : 59kb User : 李伟霞

这是一个使用了LEX所编写的Simple语言的词法分析器。Simple语言的定义说明请看附件。这个LEX的源代码可以通过Parser Generator 2来转化成为h文件跟cpp文件。由于编译这两个文件需要使用到Parser Generator 2的C++库,所以就只上传了LEX的源代码,谁感兴趣的可以自己通过Parser Generator 2来转化。至于UNIX下面的LEX工具如果想要转化的话需要修改其主程序,另外需要将LEX源代码之中有关C++语言的表达形式修改成为相应的C语言的表现形式才行之。总体这样子。-This is one written by using the LEX lexical analyzer Simple language. Simple definition of the language description see annex. The LEX source code can be transformed into Parser Generator 2 to h file with the cpp file. As the compilation of these two files need to use the Parser Generator 2 in C++ library, so we just uploaded the source code for LEX, who may be of interest to themselves through Parser Generator 2 to transform. As for the UNIX tools LEX below if you want converted, then need to modify its main program, another will need to LEX source code into the C++ language, forms of expression changes as the corresponding C-language expressions of Caixing. Overall like this.
Date : 2025-12-18 Size : 178kb User : 林宇浩

此应用程序是用c语言编写的词法分析程序,上机调试成功通过测试。-This application is written in c language lexical analysis program, successfully tested on the machine commissioning.
Date : 2025-12-18 Size : 5kb User : 黄岩

一份完整的编译原理课程设计.设计了一个词法分析器和一个利用LL(1)算法实现的语法分析器.可以对C-语言编写的程序进行词法分析和语法分析,当出现错误时推断可能的原因.并最终用直观的方式构建起一棵语法分析树.-A complete compilation Principle. Designed a lexical analyzer and a use of LL (1) parser algorithm. Can be written in C-language program for lexical analysis and syntax analysis, may be inferred when an error occurs reasons. and eventually built up with an intuitive way to parse tree.
Date : 2025-12-18 Size : 263kb User : 无意乂

设计一个简单的词法分析器,从而进一步加深对词法分析器工作原理的理解。了解编译原理中词法分析器的原理,并用一种编程语言的具体代码实现简单的词法分析器的功能(在这里我使用C语言实现,代码可以完成简单的C语言程序中的关键词,变量,分界符,数字,运算符,赋值符。)-Design a simple lexical analyzer to further deepen the understanding of the lexical analyzer works. Compiler theory to understand the principles of lexical analyzer, and using a programming language specific code to achieve a simple lexical analyzer function (here I use the C language, the code can complete a simple C language program in the key words, variables, delimiter, numbers, operators, assignment operator.)
Date : 2025-12-18 Size : 107kb User :

设计并实现C语言词法分析程序。要求如下: 可以识别出用C语言编写的源程序中的每个单词符号,并以记号的形式输出每个单词符号。 可以识别并读取源程序中的注释。 可以统计源程序中的语句行数,单词个数和字符个数,其中标点和空格不计算为单词,并输出统计结果。 检查源程序中存在的错误,并可以报告错误所在的行列位置。 发现源程序中存在的错误后,进行适当的恢复,使词法分析可以继续进行,通过一次词法分析处理,可检查并报告源程序中存在的所有错误。 采用C/C++作为实现语言,手工编写此法分析程序。-Design and implementation of C language lexical analysis program. Requirements are as follows: Can identify the source with the C language symbol for each word, and to mark each word in the form of output symbols. Can identify and read the source of the comment. Statistical source of the statement could be the number of lines, words, numbers and character numbers, punctuation and spaces which are not counted as words, and output results. Check the source of errors, and can report the errors in the ranks of the position. Found that errors exist in the source program after the appropriate recovery, so that lexical analysis can proceed, through a lexical analysis, may inspect and report all errors that exist in the source program. Using C/C++ as implementation language, hand-written procedure for this method.
Date : 2025-12-18 Size : 3kb User : moontea

该程序是词法分析器。它的的主要功能是实现在C原程序的编译。简单容易理解。-The program is the lexical analyzer. Its main function is to achieve the original program in the C compiler. Simple and easy to understand.
Date : 2025-12-18 Size : 3kb User : success

C语言 词法分析器。 (1) 可以识别出用C语言编写的源程序中的每个单词符号,并以记号的形式输出每个单词符号. (2) 可以识别并读取源程序中的注释. (3) 可以统计源程序中的语句行数、单词个数和字符个数,其中标点和空格不计算为单词,输出统计结果. (4) 检查源程序中存在的非法字符错误,并可以报告错误所在的行列位置. (5) 发现源程序中存在错误后,进行适当的恢复,使词法分析可以继续进行,通过一次词法分析处理, 可以检查并报告源程序中存在的所有词法拼写错误.-C language lexical analyzer. (1) can be identified with the C source program written in symbols for each word, and to mark each word in the form of output symbols. (2) to identify and read the comments in the source program. (3) can be statistical source of the statement line number, word number and the number of characters, including punctuation and spaces are not counted as words, the output results. (4) Check the source in the presence of illegal character errors, and the ranks of the errors can be reported position. (5) found that there is an error source, the proper recovery, so that lexical analysis can proceed, through a lexical analysis and processing, you can check and report on all of the lexical source spelling errors.
Date : 2025-12-18 Size : 2kb User : lili

DL : 0
这是学习编译原理时,为词法分析做准备,用C写的一个小程序,把一个文件中的空格去除掉,复制到另一个文件中保存。希望对初学者有用-This is the time to learn compiler theory, in preparation for the lexical analysis, using a small program written in C, the space of a file to remove, copy, save to another file. Want to be useful for beginners
Date : 2025-12-18 Size : 175kb User : 楚明阳

这是做毕业设计的时候找到的资料,很有用。词法和语法分析封装在一个类CFenXi中, 程序在Visual C++6.0下调试通过. 程序采用单文档设计,利用了分割窗体技术。这个软件用Visual C++6.0的MFC设计的,它的界面设计没问题,这个我试过,只是它分析的是Pascal语言代码。这个资源里附带了一个exe文件,可以直接运行。还有一个说明文档。说真的,这是我见过的资料最齐全的词法语法器软件了。很有用。 -This is the time to do graduation to find the information useful. Lexical and syntax analysis encapsulated in a class CFenXi, the program in Visual C++6.0 through debugging. Program using single document design, the use of a split form technology. This software use MFC Visual C++6.0 of design, its interface design is no problem, I tried this, but its analysis is the Pascal language code. This resource comes in an exe file can run directly. There is also a documentation. Really, this is the most complete information I' ve seen of the lexical grammar software. Useful.
Date : 2025-12-18 Size : 241kb User : CC

用C++编写的语义分析程序,基于LR文法,能实现词法分析,语法分析,返回相应结果,并返回归约过程和四元式。并附有实验报告和源工程。-Written in C++ semantic analysis program, based on the LR grammar, to achieve lexical analysis, parsing, returns the appropriate result, and return to the process of reduction and quaternary type. Together with the experimental reports and the source project.
Date : 2025-12-18 Size : 5.63mb User : 淼淼

用C语言实现的一个简单的词法分析程序,对学习编译原理的前期很有帮助。-Implemented in C language, a simple lexical analysis program, to learn the principles of pre-compiled helpful.
Date : 2025-12-18 Size : 6kb User : 张强

编译原理实验:词法分析程序源码(C++)版.用C++编写的词法分析程序,在vc++6.0中运行通过。-Compile principle experiment: lexical analysis of program source code (C++) version. Written in C++ lexical analyzer, in vc++6.0 to run through.
Date : 2025-12-18 Size : 4kb User : tiger

用MFC实现的C语言词法分析器,是学习编译原理的不错的参考资料,本程序用VS2010编写,此词法分析程序可分析出C语言中: 标识符(以字母或下划线开头,后面可以是数字字母或下划线) 字符串常量 字符常量 整数常量 普通实型 有+/-科学记数 无+/-科学记数 注释说明,还不能处理预处理命令33种运算符说明:,() [] .在界符中有,这里出 , ? : sizeof 也没给出11种分界符32种关键字程序使用转换表设计,运行速度快,本人还对每个能识别的符号进行了编号。本程序用VS2010 MFC 设计的,欢迎大家下载分享-A C language lexical analyzer, is a good learning compiler theory of reference, write the program with VS2010, the lexical analysis process can be analyzed in C: Identifier (a letter or underscore, followed can be alphanumeric or an underscore) String constants Character constants Integer constant General Real With+ /- scientific notation No+ /- scientific notation Notes, can not handle pre-order 33 kinds of operators Description:, () [] operator in the world, where a,?: Sizeof did not give 11 kinds of procedure delimiter 32 kinds of keyword use the conversion table design , run fast, I also can identify the symbols for each numbered. This program designed with the VS2010 MFC, welcome to download share. . . .
Date : 2025-12-18 Size : 20.2mb User : 杨兵

DL : 0
这是编译原理的源代码,涉及到了编译原理的词法分析,语法分析。本实验采用flex和bison工具,编写了一个lex程序和一个yacc程序,实现的功能是对源程序进行词法分析和语法分析,并输出语法分析的过程。-This is source code of principles of Compilers, involving lexical analysis, syntax analysis in principles of Compilers. This experiment used flex and bison tools, a lex program and a yacc program were wrote to implemented it, function of this source program is to analyse source code wrote in C, and output the results.
Date : 2025-12-18 Size : 427kb User : 戴珊珊
« 12 3 »
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.