Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Seeking Advice: Writing a parser

by Zaxo (Archbishop)
on Feb 08, 2002 at 05:14 UTC ( #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


Comment on Re: Seeking Advice: Writing a parser

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (14)
As of 2015-07-30 19:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls