Parser

Discussions about design and architecture principles, including native JADE systems and JADE interoperating with other technologies
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Parser

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:12 am

by JADE News Administrator >> Thu, 29 Oct 1998 1:11:20 GMT

I'm writing an application in which I want to store a formula (as a string), and calculate the result when required. Has anyone out there worked on writing a parser to do this kind of thing please ?

--
Darrell Duniam
dduniam@cardinal.co.nz

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Parser

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:12 am

by JADE News Administrator >> Thu, 29 Oct 1998 1:11:45 GMT

In case anyone's interested, I've now written a parser to calculate equations, which also handles precedence parentheses. I'm still working on an interpreter for mathematical functions (and rapidly ageing in the process).
--
Darrell Duniam
dduniam@cardinal.co.nz

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Parser

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:12 am

by JADE News Administrator >> Thu, 29 Oct 1998 1:12:17 GMT
In case anyone's interested, I've now written a parser to calculate equations, which also handles precedence parentheses. I'm still working on an interpreter for mathematical functions (and rapidly ageing in the process).
--


Darrell,

It seems a pity that you had to do this given that JADE laready has a perfectly good compiler and interpreter. As you know the JADE development environment (a runtime application which is written in JADE) can compile and execute JADE methods on the fly. It wouldn't be such a large step to make this capability available to users. If you can express the formulas in JADE syntax then using the JADE compiler/interpreter would be an ideal approach.
Anyway, perhaps rolling your own will provide a useful learning experience :)


What was that stuff about code reuse again?


Return to “Design and Architecture”

Who is online

Users browsing this forum: No registered users and 2 guests