Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 lurking in the Monastery: (8)
As of 2014-09-19 12:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (137 votes), past polls