Welcome![Sign In][Sign Up]
Location:
Search - syntax tree in C

Search list

[OS program逆波兰表达式

Description: 计算用运算符后缀法表示的表达式的值。后缀表达式也称逆波兰表达式,比中缀表达式计算起来更方便简单些,中缀表达式要计算就存在着括号的匹配问题,所以在计算表达式值时一般都是先转换成后缀表达式,再用后缀法计算表达式的值。如:表达式(a+b*c)/d-e用后缀法表示应为abc*+d/e-。只考虑四则算术运算,且假设输入的操作数均为1位十进制数(0—9),并且输入的后缀形式表达式不含语法错误-calculated Operators suffix France said the value of the expression. Suffix expression also called inverse Poland expression, which is made up of formulas can be more convenient for some simple, ordinary expression to calculate the brackets on the existence of the matching problem, in the calculation of expression values are generally first converted into a suffix expression, reuse suffix calculated the value of the expression. Such as : The expression (a, b* c)/d-e suffix method used to be said for abc* d/e-. Consider only four arithmetic operations and the operation of input assumptions are a few decimal (0-9), and enter the suffix-free form expression syntax errors
Platform: | Size: 1024 | Author: 刘一 | Hits:

[ELanguage85018312345678

Description: 编译原理LR(0)文法分析器 录入合法的LR(0)文法,将输出LR(0)分析表,并可以对输入的句子进行语法分析输出相应语法树。程序中部分算法还很不简洁,有待改进,欢迎朋友与我多多交流。 -compiler theory LR (0) grammar analyzer input legitimate LR (0) grammar, will output LR (0) analysis table, and may import for the sentence syntax analysis syntax tree corresponding output. Some procedures also very simple algorithm, there is room for improvement, I welcome a lot of friends and exchange.
Platform: | Size: 24576 | Author: 张学友 | Hits:

[ELanguagetiger

Description: Tiger语言的一种编译器,在大学CS课程必做的,不过可惜的是没有完全完成,做好了词法语法分析,以及IR树的生成.-a language compiler, CS courses at the university will do, but it is a pity not to be completed, well, syntax analysis, and IR tree generation.
Platform: | Size: 35840 | Author: 侯锐 | Hits:

[ELanguageparser

Description: 采用递归下降分析法实现C0语言的语法分析器,其中中间表示采用抽象语法树的形式。 程序的输入:词法分析阶段的输出文件 程序的输出:存储了抽象语法树相关信息的XML格式的文件 -Decline in the use of recursive analysis method to achieve C0 language parser, which indicated that the use of intermediate abstract syntax tree form. Procedures for the importation of: lexical analysis phase of the procedure output file output: Storage of the abstract syntax tree of the XML information file
Platform: | Size: 3072 | Author: | Hits:

[ELanguageCompiler

Description: 本设计Tiger语言为源语言,制作了编译程序的前端部分,主要包括了词法分析、语法分析、抽象语法树和类型检查的设计和实现方法,以及课程设计中碰到的问题、实验心得、参考数据等。-Tiger of the design language for the source language, has produced a compiler front-end parts, including the lexical analysis, syntax analysis, abstract syntax tree and the type checking of the design and implementation, as well as curriculum design problems they encountered in the experimental experience, reference data.
Platform: | Size: 390144 | Author: jack sio | Hits:

[ELanguage11279_lr0forwin

Description: 分析文法是否是LR(0)文法,显示分析表。对输入的语句给出语法分析树-Analysis of whether the grammar is LR (0) grammar, analysis table shows. The statement given to the input syntax parse tree
Platform: | Size: 2731008 | Author: 飞天猪 | Hits:

[ELanguageok

Description: 小语言编译器[包含具体代码] TMMY.c 为TMMY虚拟机完整源代码 smmy.c 为小语言编译器完整源代码 大家玩的时候,先使用 “编译.bat” 编译try.tny代码将生成: THE1.txt (代码初始处理) 语法树.txt (初看和try.tny中的代码相似,但其实是通过生成好的语法树结构还原生成的代码。如果此代码和try.tny 有出路,那就是语法有误) 汇编代码.txt (最终目标代码) 再使用 “运行.bat” 就可以看到虚拟机运行 汇编代码.txt 的效果。-Small language compiler [include the specific code] TMMY.c for TMMY complete source code of a virtual machine for small smmy.c complete language compiler source code to play when you first use the " compiler. Bat" compiler will generate code try.tny: THE1.txt (code initial treatment) syntax tree. txt (at first glance, and the code try.tny similar, but in fact it is good through the syntax tree structure generated to restore the generated code. try.tny If the code and there is a way out, That is incorrect grammar) assembly code. txt (the ultimate goal of the code) to use " Run. bat" can be seen on the virtual machine to run assembly code. txt results.
Platform: | Size: 31744 | Author: | Hits:

[ELanguageParser_Dev

Description: 用C语言实现了C-程序的语法分析,以控制空格来显示层次,表示出了语法分析树-With the C language to implement the syntax of C-program analysis in order to control the space to show the level of expressed syntax parse tree
Platform: | Size: 24576 | Author: 张龙 | Hits:

[ELanguageTiny_Compiler_5r

Description: 解释器Tiny Compiler(此为第五版)是用c++写的解释器,语法规则类似于C和matlab,支持数组和函数调用,并用mfc做了简单界面。 内附详细说明及例子程序。 第五版新增特性:计算器工具中添加了公式的“立体显示”。 第四版新增特性:添加了语法树的可视化显示。 官方日志:http://wantnon.spaces.live.com/blog/cns!22376C1C5B93C0AD!464.entry-The interpreter(name:Tiny Compiler) (now is the fifth edition) is written in c++ , whose grammar rule is similar to C and matlab, It support array and function calls, with a simple interface made from mfc.And there are detailed description and sample programs with it. new features of the fifth edition: "tridimensional" display of formulas added to the Calculator tool. new features of the fourth edition: an visual display of the syntax tree added. Official Blog: http://wantnon.spaces.live.com/blog/cns!22376C1C5B93C0AD!464.entry
Platform: | Size: 259072 | Author: 杨超 | Hits:

[ELanguageCompiler

Description: 一份完整的编译原理课程设计.设计了一个词法分析器和一个利用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.
Platform: | Size: 269312 | Author: 无意乂 | Hits:

[OS DeveloplinuxC

Description: C语言本质。结合计算机和操作系统的原理讲解C程序是怎么编译、链接、运行的,同时全面介绍C的语法。位运算的章节改编自亚嵌教育林小竹老师的讲义,链表和二叉树的章节改编自亚嵌教育朱老师的讲义。汇编语言的章节改编自[ GroudUp],在这本书的最后一章提到,学习编程有两种Approach,一种是Bottom Up,一种是Top Down,各有优缺点,需要两者结合起来。所以我编这本书的思路是,第一部分Top Down,第二部分Bottom Up,第三部分可以算填了中间的空隙,三部分全都围绕C语言展开。 -C language nature. Combination of computer and operating system theory to explain how C program is compiled, link, running at the same time a comprehensive description C syntax. Bit operation section adapted from the Asian bamboo forest embedded education teacher handouts, list and binary tree embedded sections adapted from the Asia Education Zhu teacher handouts. Assembly language of the section adapted from [GroudUp], in the final chapter of the book mentioned, learning to program, there are two Approach, One is the Bottom Up, one is Top Down, advantages and disadvantages need to combine the two. So I compiled this book thinking that the first part of the Top Down, the second part of the Bottom Up, Part III can be counted among the gaps filled in, all three parts start around the C language.
Platform: | Size: 4527104 | Author: yanlg | Hits:

[CSharpExpresso

Description: The .NET framework provides a powerful class Regex for creating and using Regular Expressions. While regular expressions are a powerful way to parse, edit, and replace text, the complex syntax makes them hard to understand prone to errors, even for the experienced user. When developing code that uses regular expressions, I have found it very helpful to create and debug my expressions in a separate tool to avoid time consuming compile/debug cycles. Expresso enables me to do the following: Build complex regular expressions by selecting components from a palette Test expressions against real or sample input data Display all matches in a tree structure showing captured groups, and all captures within a group Build replacement strings and test the match and replace functionality Highlight matched text in the input data Automatically test for syntax errors Generate Visual Basic or C# code that can be incorporated directly into programs Read or save regular expressions and input data The .NET framework provides a powerful class Regex for creating and using Regular Expressions. While regular expressions are a powerful way to parse, edit, and replace text, the complex syntax makes them hard to understand and prone to errors, even for the experienced user. When developing code that uses regular expressions, I have found it very helpful to create and debug my expressions in a separate tool to avoid time consuming compile/debug cycles. Expresso enables me to do the following: Build complex regular expressions by selecting components from a palette Test expressions against real or sample input data Display all matches in a tree structure showing captured groups, and all captures within a group Build replacement strings and test the match and replace functionality Highlight matched text in the input data Automatically test for syntax errors Generate Visual Basic or C# code that can be incorporated directly into programs Read or save regular expressions and input data > Downloads > 源码/资料 > Windows编程-.NET framework provides a powerful class Regex for creating and using Regular Expressions. While regular expressions are a powerful way to parse, edit, and replace text, the complex syntax makes them hard to understand and prone to errors, even for the experienced user. When developing code that uses regular expressions, I have found it very helpful to create and debug my expressions in a separate tool to avoid time consuming compile/debug cycles. Expresso enables me to do the following: Build complex regular expressions by selecting components from a palette Test expressions against real or sample input data Display all matches in a tree structure showing captured groups, and all captures within a group Build replacement strings and test the match and replace functionality Highlight matched text in the input data Automatically test for syntax errors Generate Visual Basic or C# code that can be incorporated directly into programs Read or save regular expressions and input data > Downloads > 源码/资料 > Windows编程
Platform: | Size: 93184 | Author: sandy | Hits:

[Windows DevelopExpreesion

Description: 一个表达式和一棵二叉树之间,存在着自然的对应关系。写一个程序,实现基于二叉树表示的算术表达式Expression的操作。 【基本要求】 【一】【必做部分】 假设算术表达式Expression内可以含有变量(a-z),常量(0-9)和二元运算符(+,-,*,/,^(乘幂))。实现以下操作: (1)ReadExpr(E)――以字符序列的形式输入语法正确的前缀表达式并构造表达式E。 (2)WriteExpr(E)――用带括号的中缀表达式输出表达式E。 (3)Assign(V,c)――实现对变量V的赋值(V=c),变量的初值为0。 (4)Value(E)――对算术表达式E求值。 (5)CompoundExpr(p,E1,E2)――构造一个新的复合表达式(E1)p(E2)。 【二】【选做部分】 (1)以表达式的原书写形式输入,支持大于0的正整数常量; (2)增加常数合并操作MergeConst(E)——合并表达式E中所有常数运算。例如,对表达式E=(2+3-a)*(b+3*4)进行合并常数的操作后,求得E=(5-a)*(b+12) 【测试数据】 1) 分别输入0;a -91 +a*bc +*5x2*8x +++*3^*2^x2x6并输出。 2) 每当输入一个表达式后,对其中的变量赋值,然后对表达式求值。 3) 还有很多测试的数据,详细请见附上的文件Test.txt。 -Between an expression and a binary tree, there is a natural correspondence. Write a program to realize the arithmetic expression based on Binary Tree for Expression of the operation. Basic requirements of】 【 【1】 【will do some】 Suppose an arithmetic expression can contain variables in Expression (az), constant (0-9) and the binary operator (+,-,*,/,^( power)). To achieve the following: (1) ReadExpr (E)- in the form of a sequence of characters enter the correct prefix expression syntax and constructs the expression E. (2) WriteExpr (E)- with the infix expression with parentheses output expression E. (3) Assign (V, c)- to achieve the assignment of the variable V (V = c), the variable s initial value is 0. (4) Value (E)- E evaluation of arithmetic expressions. (5) CompoundExpr (p, E1, E2)- construct a new complex expression (E1) p (E2). 【2】 【choose to do some】 (1) the original written form of expression input, support for constant positive integer greater than 0 (2)
Platform: | Size: 250880 | Author: snake | Hits:

[JSP/Javaantlr

Description: ANTLR—Another Tool for Language Recognition,其前身是PCCTS,它为包括Java,C++,C#在内的语言提供了一个通过语法描述来自动构造自定义语言的识别器(recognizer),编译器(parser)和解释器(translator)的框架。ANTLR可以通过断言(Predicate)解决识别冲突;支持动作(Action)和返回值(Return Value)来;更棒的是,它可以根据输入自动生成语法树并可视化的显示出来(这一点我将在下面的例子中演示)。由此,计算机语言的翻译变成了一项普通的任务—在这之前YACC/LEX显得过于学院派,而以LL(k)为基础的ANTLR虽然在效率上还略有不足,但是经过近些年来的升级修改,使得ANTLR足以应付现存的绝大多数应用。感谢Terence Parr博士和他的同事们十几年来的出色工作,他们为编译理论的基础和语言工具的构造做了大量基础性工作,也直接导致了ANTLR的产生。-ANTLR-Another Tool for Language Recognition. Its predecessor, PCCTS, including Java, C++, C#, including the language provides a syntax description to automatically construct self-definition language identification (recognizer), the compiler (parser) and explain the framework of the (translator on). ANTLR by the assertion (the Predicate) to address the problems identified conflicts support action (Action) and the return value (Return Value) Even better, it can be automatically generated based on the input syntax tree and visualization is displayed (which I will The following example demonstrates). As a result, the computer language translation has become a common task- in this YACC to/LEX seem the too academic, ANTLR-based LL (k), although the efficiency is slightly less, but after a recent years of upgrade modifications, making the ANTLR enough to cope with the vast majority of the existing application. Thank the excellent work, Terence Parr, Ph.D., and his colleagues more than a dec
Platform: | Size: 420864 | Author: issacs | Hits:

[Othersyntax-analysis

Description: 使用C语言写的语法分析小程序,要借助flex和bison工具,输入符合LCC语言语法的程序段,程序会输出语法树。-Using C language to write the syntax analysis of small programs, with the aid of bison and flex tools, input in accordance with the LCC syntax of the program segment, the program will output the syntax tree.
Platform: | Size: 4096 | Author: majin | Hits:

[OtherTokenAnalysis

Description: 用C++编写的语法分析器,对于给定的TOKEN序列能进行良好的分析,从而建立一棵语法树。-A grammar tree written in C++ provides a good parsing of a given TOKEN sequence to create a syntax tree.
Platform: | Size: 1343488 | Author: 张丽娜 | Hits:

CodeBus www.codebus.net