Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Seeking Advice: Writing a parser

by Zaxo (Archbishop)
on Feb 08, 2002 at 05:14 UTC ( [id://144041]=note: print w/replies, xml ) Need Help??


in reply to Seeking Advice: Writing a parser

Math::Expr does exactly what you want. Release date is 2001-10-01, so it's fairly up to date.

     NAME
         Math::Expr - Parses mathematical expressions
SYNOPSIS use Math::Expr; SetOppDB(new Math::Expr::OpperationDB('<DBFileName>')); $e=Parse("a+4*b-d/log(s)+f(d,e)"); DESCRIPTION Parses mathematical expressions into a tree structure. The expressions may contain integers, real numbers, alphanumeric variable names, alphanumeric function names and most other characters might be used as operators...

From the pod. That's no reason not to write your own as an exercise :)

After Compline,
Zaxo

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://144041]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-24 08:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found