Description: 语法分析正确后就可以求值了,求值时用到一个操作数堆栈和操作符堆栈,以及一个算符优先表(存储了运算符之间的优先关系),具体细节可以阅读源码。-syntax analysis is correct after it evaluates the value used for a number of operations and the operator stacks stack, and an operator priority list (stored Operators relations between the priority), specific details can be read source. Platform: |
Size: 1972193 |
Author:李平 |
Hits:
Description: 表达式分析, 支持算术运算,括号,关系运算,逻辑运算,字符串的like运算等。采用了有限自动机做词法分析, 语法分析用算符优先分析方法,正负号算符使文法不是OPG,因此这里作了特殊处理。分析的结果是逆波兰式, 存在一个链表中。在逆波兰式的基础上,用一个栈来进行求值。在vc++6.0下试验通过。
如有问题,可以mail: zch888email@163.com
我将尽快回复你。-expression analysis, supports arithmetic operations, brackets, relations operation, logic operation, like the string of such operations. Using a limited automatic machine lexical analysis, grammar analysis Operator priority analysis method, Operators of plus or minus grammar is not so OPG, it gave special treatment here. The results of the analysis of reverse Polish existence of a linked-list. The inverse Polish, on the basis of a stack used to evaluated. Under the pilot vc 6.0 through. If problems can mail : zch888email@163.com I will reply to you as soon as possible. Platform: |
Size: 22808 |
Author:大山 |
Hits:
Description: 用算符优先文法制作的算符优先分析器,实现了FIRSTVT跟LASTVT的输出跟优先表的输出以及栈的输出以及到文件的输出。-priority grammar operator with the operator priority to the production analyzer, achieved with LASTVT FIRSTVT output with the output of the priority list and stack output and the output of the document. Platform: |
Size: 10850 |
Author:姜鹏 |
Hits:
Description: 编译原理中算符优先表的生成,其中包含了每步骤的显示,进栈和出栈的过程都能完整的显示出来,仅供大家学习借鉴-compiler Principle operator of the priority list generation, which contains every step, into stacks and stack up the integrity of the process can show up only to learn from you Platform: |
Size: 3072 |
Author:dzg |
Hits:
Description: 用算符优先文法制作的算符优先分析器,实现了FIRSTVT跟LASTVT的输出跟优先表的输出以及栈的输出以及到文件的输出。-priority grammar operator with the operator priority to the production analyzer, achieved with LASTVT FIRSTVT output with the output of the priority list and stack output and the output of the document. Platform: |
Size: 10240 |
Author:姜鹏 |
Hits:
Description: 语法分析正确后就可以求值了,求值时用到一个操作数堆栈和操作符堆栈,以及一个算符优先表(存储了运算符之间的优先关系),具体细节可以阅读源码。-syntax analysis is correct after it evaluates the value used for a number of operations and the operator stacks stack, and an operator priority list (stored Operators relations between the priority), specific details can be read source. Platform: |
Size: 1972224 |
Author:李平 |
Hits:
Description: 表达式分析, 支持算术运算,括号,关系运算,逻辑运算,字符串的like运算等。采用了有限自动机做词法分析, 语法分析用算符优先分析方法,正负号算符使文法不是OPG,因此这里作了特殊处理。分析的结果是逆波兰式, 存在一个链表中。在逆波兰式的基础上,用一个栈来进行求值。在vc++6.0下试验通过。
如有问题,可以mail: zch888email@163.com
我将尽快回复你。-expression analysis, supports arithmetic operations, brackets, relations operation, logic operation, like the string of such operations. Using a limited automatic machine lexical analysis, grammar analysis Operator priority analysis method, Operators of plus or minus grammar is not so OPG, it gave special treatment here. The results of the analysis of reverse Polish existence of a linked-list. The inverse Polish, on the basis of a stack used to evaluated. Under the pilot vc 6.0 through. If problems can mail : zch888email@163.com I will reply to you as soon as possible. Platform: |
Size: 22528 |
Author:大山 |
Hits:
Description: 用算符优先法对算术表达式求值的过程。要求以字符序列的形式从终端输入语法正确的、不含变量的整数表达式。实现对算术四则混合运算表达式的求值,并在求值中运算符栈、运算数栈、输入字符和主要操作的变化过程。-Operator priority method with arithmetic expression evaluation process. Request to form a sequence of characters from the terminal input grammar correct, non-integer variable expression. 4 to realize a mixed computing arithmetic expression evaluator, and evaluation of operator stack, stack operands, input characters and major changes in the course of operation. Platform: |
Size: 1024 |
Author:叶子 |
Hits:
Description: 用C语言实现的算术表达式的运算,用了堆栈的方法,利用算术运算符的优先级实现,实现了包括+,-,*,/和()的运算,输入#号运算结束。-Using C language arithmetic expression computing, using the stack method, using arithmetic operator priority realize, realize, including 2B !,-,*,/ and () the operator, type# Its end computing. Platform: |
Size: 1024 |
Author:宋莹 |
Hits:
Description: 题目:设计一个题目,演示用算符优先法对算术表达式求值的过程。
概要设计
1、顺序扫描中缀算术表达式,当读到数字时直接将其送至输出队列中;
2、当读到运算符时,将栈中所有优先级高于或等于该运算符弹出,送至输出队列中,再将当前运算符入栈;
3、当读入左括号时,即入栈;
4、当读到右括号时,将靠近栈顶的第一个左括号上面的运算符全部一次弹出,送至输出队列中,再删除栈中的左括号。
5、使用VS栈来存储读入的操作和运算结果,然后进行数字字符到数值的转换。
-Title: Design of a topic, presentation operator priority method with arithmetic expression evaluation process. Summary of design 1, the order of scanning arithmetic infix expressions, when they read numbers directly to the output queue 2, when they read operator, it will stack all priority higher than or equal to the operator pop-up , sent to the output queue, and then the current operator入栈 3, when read left brackets, that is, when入栈 4, when they read the right brackets, it will be near the Top-left of the first operator in brackets above All a pop-up, sent to the output queue, and then delete stacks of left brackets. 5, the use of VS stack to store read operation and computing the results of numeric characters and then proceed to the numerical conversion. Platform: |
Size: 6144 |
Author:布瓜 |
Hits:
Description: 【目的】 设计一个算符优先分析器,理解优先分析方法的原理。
【要求】 使用算符优先分析算法分析下面的文法:
E’ → #E#
E → E+T | T
T → T*F | F
F → P^F | P
P → (E) | i
其中i可以看作是一个终结符,无需作词法分析。具体要求如下:
1. 如果输入符号串为正确句子,显示分析步骤,包括分析栈中的内容、优先关系、输入符号串的变化情况;
2. 如果输入符号串不是正确句子,则指示出错位置。
-[Objective] To design a priority analyzer operator, understanding the principle of priority analysis. ] [Requirements analysis algorithm using the operator priority grammar analysis of the following: E →# E# E → E+ T | TT → T* F | FF → P ^ F | PP → (E) | i which i can be seen as is a terminator, no analysis of Authors. Specific requirements are as follows: 1. If you enter the correct sentence for the string of symbols, showing analysis steps, including analysis of the contents of the stack to give priority to the relationship between input symbols string changes 2. If the input string is not correct sentence symbols are also given the wrong location . Platform: |
Size: 3072 |
Author:王东旭 |
Hits:
Description: 这是一款非常实用的计算器,我认为其实用程度远远胜过Windows系统提供的计算器.主要特色是支持多项式运算,即可以一次输入整个多项式,并能够识别运算的优先级(利用堆栈实现)-This is a very practical calculators, in fact, in my opinion much better than using Windows system calculator. Main features are support for polynomial computing, you can enter an entire polynomial, and be able to identify the priority operator class (using the stack implementation) Platform: |
Size: 68608 |
Author:陈 波 |
Hits:
Description: 算术运算的优先级运算,充分利用堆栈原理,进行优先级运算。-The priority of arithmetic operations, the principle of full use of the stack, the operator priority. Platform: |
Size: 10240 |
Author:王政博 |
Hits:
Description: 用栈实现算式的运算,通过把操作符压栈和操作符的优先级进行运算。-Formula used to achieve the computing stack, push through the operator and operator to operator priority. Platform: |
Size: 1014784 |
Author:xdb |
Hits:
Description: 1、 以字符序列的形式从终端输入语法正确的、不含变量的证书表达式。利用一定的运算符优先关系,实现对算术四则混合运算表达式的求值,并且在求值中运算符栈、运算数栈、输入字符和主要操作的的变化过程。
2、 设置运算符栈和运算数栈辅助分析算符的优先级。
3、 在读入表达式的字符序列的同时,完成运算符和运算数的识别处理,以及相应的运算。
4、 在识别处运算符的同时,要将其字符序列形式转换成整数形式。
5、 在程序的适当的位置输入运算符栈、运算数栈、输入字符和主要操作内容。
-1, to form a sequence of characters input from the terminal grammar correct, non-variable expression of the certificate. The use of a certain operator precedence relations and the realization of the four mixed arithmetic expression for computing the value, and value in order to stack operator, computing the number of stacks, input characters and major changes in the course of the operation.
2, set up operator stack operands stack and operator-assisted analysis of the priority.
3, in the time sequence of characters into the expression at the same time, the completion of operator and operator identification numbers, as well as the corresponding arithmetic.
4, in the identification Office operator at the same time, to form the character sequence into the form of an integer.
5, in place procedures for the importation of the operator stack, the number of stack operations, input characters and the main operation of the content. Platform: |
Size: 1024 |
Author:李涛 |
Hits:
Description: .采用算符优先数算法,能正确求值表达式
2.熟练掌握栈的应用
3.熟练掌握计算机系统的基本操作方法,了解如何编辑、编译、链接和运行一个C++程序
-. Using operator priority number algorithm, able to correctly evaluated expression 2. Familiar with the application of the stack 3. Familiar with the basic operation of computer systems, methods, learn how to edit, compile, link and run a C++ program Platform: |
Size: 482304 |
Author:liujianye |
Hits:
Description: 用C++编写带括号的算术表达式求值,利用堆栈实现,采用算符优先数算法。-Written with C++ arithmetic expression in parentheses is evaluated using the stack implementation, the use of operator priority number algorithm. Platform: |
Size: 440320 |
Author:JJWM |
Hits:
Description: 通过修改完善教材中的算法3.4,利用栈来实现算术表达式求值的算法。对算法3.4中调用的几个函数要给出其实现过程:
(1) 函数In(c):判断c是否为运算符;
(2) 函数Precede(t1,t2):判断运算符t1和t2的优先级;
(3) 函数Operate(a,theta,b):对a和b进行二元运算theta。
-Improve the teaching materials by modifying the algorithm 3.4, using the stack to achieve the arithmetic expression evaluation algorithm. Algorithm 3.4 on a few function call to give the implementation process: (1) The function In (c): determine whether the operator c (2) Function Precede (t1, t2): t1 and t2 to determine the operator priority (3) function Operate (a, theta, b): a and b of the binary operation theta. Platform: |
Size: 2048 |
Author:m47 |
Hits:
Description: 用栈实现表达式求解,包括栈的基本操作及运算符优先级比较,运算等。-Stack to achieve the expression evaluator, including the basic operation of the stack and the operator priority computing. Platform: |
Size: 3072 |
Author:mengzhen |
Hits:
Description: 此代码实现了算符优先文法分析器,实现对整数加减乘除运算表达式的分析和处理。
1.扫描程序,将任何一种整数运算表达式(无变量,操作数为正整数,允许加减乘除四种运算,允许使用括号和多层括号)识别为单词,并能发现单词的拼写错误
2.自底向上分析程序,在栈上实现对单词token串的自底向上分析
3. 根据算符优先文法的分析步骤,展示分析栈、token串的状态变化、相关量的优先级比较(算符优先分析表)结果输出 、判断当前是否进行规约或移进操作、(若须规约)显示当前应规约的串
4.展示语法树-This code implements the operator precedence grammar analyzer, analysis and processing to achieve subtraction multiplication and division of integers expression. 1. Scanning procedures, will any kind of integer arithmetic expression (no variable operand is a positive integer, subtraction, multiplication and division to allow operation, allowing the use of parentheses and multi parentheses) for word recognition and spelling errors can be found in 2. Bottom-up analysis program on the stack to achieve bottom-up analysis of the word token string 3. According to operator precedence grammar analysis step, showing the analysis of the stack, compares the priority token string status changes, an amount of correlation (operator priority table analysis) and outputs the result, it is determined whether the current statute or be moved into operation (if required statute) Displays the current string should Statute 4. Show syntax tree Platform: |
Size: 13312 |
Author:miao |
Hits: