Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   i need a source code compute logical expressions in lex/yacc (http://www.velocityreviews.com/forums/t459575-i-need-a-source-code-compute-logical-expressions-in-lex-yacc.html)

deltaa5 01-02-2007 10:09 AM

i need a source code compute logical expressions in lex/yacc
 
Hi.
i need a source code compute logical expressions in lex/yacc.
for Example:
(20>5) or (6<=6)--->true
(1<=2) and (3==1) --->false.


Rolf Magnus 01-02-2007 10:21 AM

Re: i need a source code compute logical expressions in lex/yacc
 
deltaa5 wrote:

> Hi.
> i need a source code compute logical expressions in lex/yacc.


And your C++ language question is...?

> for Example:
> (20>5) or (6<=6)--->true
> (1<=2) and (3==1) --->false.


Doesn't look so logical to me.


Ondra Holub 01-02-2007 11:23 AM

Re: i need a source code compute logical expressions in lex/yacc
 

deltaa5 napsal:
> Hi.
> i need a source code compute logical expressions in lex/yacc.
> for Example:
> (20>5) or (6<=6)--->true
> (1<=2) and (3==1) --->false.


You can reuse example in bison manual. See
http://www.gnu.org/software/bison/ma...tml#Infix-Calc
it does almost the same you need, you have to change only operations.



All times are GMT. The time now is 12:41 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.