Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > General purpose Expression Parser

Reply
Thread Tools

General purpose Expression Parser

 
 
Dexter
Guest
Posts: n/a
 
      03-20-2008
This Java based utility may be invoked from Java code to parse
mathematical expressions. It is useful for programmers developing
calculators, graphing utilities or other math related programs.

Download for free at http://www.thinkanddone.com/prog/java/parser.html

If the above link does not work try http://www.britishcomputercolleges.c...a/parser2.html

 
Reply With Quote
 
 
 
 
Ioannis Vranos
Guest
Posts: n/a
 
      03-20-2008
Dexter wrote:
> This Java based utility may be invoked from Java code to parse
> mathematical expressions. It is useful for programmers developing
> calculators, graphing utilities or other math related programs.
>
> Download for free at http://www.thinkanddone.com/prog/java/parser.html
>
> If the above link does not work try http://www.britishcomputercolleges.c...a/parser2.html



An interview of the inventor of C++ templates, Alexander Stepanov, where
it mentions Java:

http://www.stlport.org/resources/StepanovUSA.html



An interesting link I came across the web:

http://icl.pku.edu.cn/bswen/_old_stu...va-to-cpp.html

 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      03-20-2008
Ioannis Vranos wrote:
> Dexter wrote:
>> This Java based utility may be invoked from Java code to parse
>> mathematical expressions. It is useful for programmers developing
>> calculators, graphing utilities or other math related programs.
>>
>> Download for free at http://www.thinkanddone.com/prog/java/parser.html
>>
>> If the above link does not work try
>> http://www.britishcomputercolleges.c...a/parser2.html

>
>
> An interview of the inventor of C++ templates, Alexander Stepanov, where
> it mentions Java:
>

<EvenMoreOT>He didn't invent templates, he was the authour of the
Standard Template Library</EvenMoreOT>

What has this to do with C anyway?

--
Ian Collins.
 
Reply With Quote
 
Ioannis Vranos
Guest
Posts: n/a
 
      03-20-2008
Ian Collins wrote:
> Ioannis Vranos wrote:
>> Dexter wrote:
>>> This Java based utility may be invoked from Java code to parse
>>> mathematical expressions. It is useful for programmers developing
>>> calculators, graphing utilities or other math related programs.
>>>
>>> Download for free at http://www.thinkanddone.com/prog/java/parser.html
>>>
>>> If the above link does not work try
>>> http://www.britishcomputercolleges.c...a/parser2.html

>>
>> An interview of the inventor of C++ templates, Alexander Stepanov, where
>> it mentions Java:
>>

> <EvenMoreOT>He didn't invent templates, he was the authour of the
> Standard Template Library</EvenMoreOT>



AFAIK he invented templates.

> What has this to do with C anyway?



Nothing right now. However I think template functions and structs could
be introduced in C.
 
Reply With Quote
 
Ben Pfaff
Guest
Posts: n/a
 
      03-20-2008
Ioannis Vranos <(E-Mail Removed)> writes:

> I think template functions and structs could be introduced in
> C.


You can already use them in C++. There is no need for them in C.
--
Ben Pfaff
http://benpfaff.org
 
Reply With Quote
 
Ioannis Vranos
Guest
Posts: n/a
 
      03-21-2008
Ben Pfaff wrote:
> Ioannis Vranos <(E-Mail Removed)> writes:
>
>> I think template functions and structs could be introduced in
>> C.

>
> You can already use them in C++. There is no need for them in C.



So, whatever we can use in C++ needs not be provided in C. In other
words you are saying that C is obsolete.

Templates can replace elegantly C's generic programming which is now
done by using void pointers and indentifiers.
 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      03-21-2008
Ioannis Vranos wrote:
> Ben Pfaff wrote:
>> Ioannis Vranos <(E-Mail Removed)> writes:
>>
>>> I think template functions and structs could be introduced in
>>> C.

>>
>> You can already use them in C++. There is no need for them in C.

>
>
> So, whatever we can use in C++ needs not be provided in C. In other
> words you are saying that C is obsolete.
>
> Templates can replace elegantly C's generic programming which is now
> done by using void pointers and indentifiers.


King 'ell not again!

You could say that any C++ feature would enhance C, when all you would
end up with is an early C++ compiler and you know where they ended up.
Templates lead to function over loading which leads to....

We all have our pet C enhancements, which can be suggested on comp.std.c.

--
Ian Collins.
 
Reply With Quote
 
Richard Tobin
Guest
Posts: n/a
 
      03-21-2008
In article <fruuv3$nl4$(E-Mail Removed)>,
Ioannis Vranos <(E-Mail Removed)> wrote:

>>> I think template functions and structs could be introduced in
>>> C.


>> You can already use them in C++. There is no need for them in C.


>So, whatever we can use in C++ needs not be provided in C. In other
>words you are saying that C is obsolete.


Not at all. He's saying there's no point making C be the same
as C++. If you want C++, you know where to find it.

Of course, both positions are too extreme.

-- Richard
--
:wq
 
Reply With Quote
 
Ioannis Vranos
Guest
Posts: n/a
 
      03-21-2008
Ian Collins wrote:
> Ioannis Vranos wrote:
>> Ben Pfaff wrote:
>>> Ioannis Vranos <(E-Mail Removed)> writes:
>>>
>>>> I think template functions and structs could be introduced in
>>>> C.
>>> You can already use them in C++. There is no need for them in C.

>>
>> So, whatever we can use in C++ needs not be provided in C. In other
>> words you are saying that C is obsolete.
>>
>> Templates can replace elegantly C's generic programming which is now
>> done by using void pointers and indentifiers.

>
> King 'ell not again!
>
> You could say that any C++ feature would enhance C, when all you would
> end up with is an early C++ compiler and you know where they ended up.
> Templates lead to function over loading which leads to....
>
> We all have our pet C enhancements, which can be suggested on comp.std.c.



Actually making "versions" inside a generic C function which uses void
pointers, for every type it can accept, I think is usually more bloated
code than providing a simple template function. Also the template one is
faster since it has not those conditional-specialisations.

A C programmer, as a C++ programmer does now, could control his code and
not let it become bloated.


In general, templates are more elegant (simpler) and more efficient than
bloated generic functions using void pointers and conditional statements
to determine the type(s) of object(s) passed.

Also they can replace macros in 99% of the times leading to more robust
code.


I think C can borrow these things from C++, as it has borrowed things
from C++ in the past (function prototypes etc).
 
Reply With Quote
 
CBFalconer
Guest
Posts: n/a
 
      03-21-2008
Ioannis Vranos wrote:
> Ben Pfaff wrote:
>> Ioannis Vranos <(E-Mail Removed)> writes:
>>
>>> I think template functions and structs could be introduced in
>>> C.

>>
>> You can already use them in C++. There is no need for them in C.

>
> So, whatever we can use in C++ needs not be provided in C. In
> other words you are saying that C is obsolete.


Don't be silly. You select a language to suit the job. If you
really need template functions use C++ or better languages (Ada,
for example). You probably don't need them.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.



--
Posted via a free Usenet account from http://www.teranews.com

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
recommended general-purpose string template packages? John Machin Python 6 08-16-2006 01:35 PM
NEWB: General purpose list iteration? Donald Newcomb Python 4 08-12-2005 10:33 PM
Storing general-purpose and specific entries Robert Bj?rn XML 0 06-01-2004 11:36 AM
Python is the best and most popular general purpose scripting language; the universal scripting language Ron Stephens Python 23 04-12-2004 05:32 PM
Looking for very simple general purpose tokenizer Maarten van Reeuwijk Python 6 01-21-2004 04:37 AM



Advertisments