Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.970.591 Times

Math::Expr 0.2

  Date Added: March 18, 2010  |  Visits: 586

Math::Expr

Report Broken Link
Printer Friendly Version


Product Homepage
Download (77 downloads)



Math::Expr is a Perl module that parses mathematical expressions. SYNOPSIS require Math::Expr; $p=new Math::Expr; $e=$p->Parse("a+4*b-d/log(s)+f(d,e)"); 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. The operators can even be longer than one character! The only limitation is that a variable or function name may not start on a digit, and not all chars are accepted as operations. To be exact, here is the grammatic (in perl regexp notation): < Expr > = -?< Elem >(< OpChr >< Elem >)* < Elem > = < Number >|< Var >|< Function >|(< Expr >) < Number > = < Integer >|< Float > < Integer > = d+ < Float > = d*.d+ < Var > = [a-zA-Z][a-zA-Z0-9]*(:[a-zA-Z][a-zA-Z0-9]*)? < Function > = [a-zA-Z][a-zA-Z0-9]*(< Expr >(,< Expr >)*) < OpChr > = [^a-zA-Z0-9(),.:]+ If the - sign is present at the beginning of an < Expr > it is parsed in the exact same structure as 0< Expr >. That is to allow constructions like "-a*b" or "b+3*(-7)". A variable consists of two parts separated by a :-char. The first part is the variable name, and the second optional part is its type. Default type is Real. METHODS $p = new Math::Expr This is the constructor, it creates an object which later can be used to parse the strings. $e=$p->Parse($str) This will parse the string $str and return an expression tree, in the form of a Math::Expr::Opp object (or in simple cases only a Math::Expr::Var or Math::Expr::Num object). $p->Priority({^=>50, /=>40, *=>30, -=>20, +=>10}) This will set the priority of ALL the operands (there is currently no way to change only one of them). The priority decides what should be constructed if several operands is listed without delimiters. Eg if a+b*c should be treated as (a+b)*c or a+(b*c). (Default is listed in header). $p->SetOppDB($db) Sets the OpperationDB to be used to $db. See Math::Expr::OpperationDB for more info. This will be passed down to all objects returned by the parser aswell..

Requirements: No special requirements
Platforms: Linux
Keyword: Expr Libraries Mathematical Mathexpr Parse Parses Perl Perl Module Programming Variable
Users rating: 0/10

License: Freeware Size: 13.31 KB
USER REVIEWS
More Reviews or Write Review


MATH::EXPR RELATED
Libraries  -  Chess::PGN::Parse 0.19
Chess::PGN::Parse is a Perl module that reads and parses PGN (Portable Game Notation) Chess files. SYNOPSIS use Chess::PGN::Parse; use English qw( -no_match_vars ); my $pgnfile = "kk_2001.pgn"; my $pgn = new Chess::PGN::Parse $pgnfile or...
26.62 KB  
Libraries  -  Template::Alloy::Parse 1.006
Template::Alloy::Parse is a Perl module with common parsing role for creating AST from templates. The Template::Alloy::Parse role is reponsible for storing the majority of directive parsing code, as well as for delegating to the TT, HTE, Tmpl,...
143.36 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  MRTG::Parse 0.03
MRTG::Parse is a Perl extension for parsing and utilizing the logfiles generated by the famous MRTG Tool. SYNOPSIS use strict; use MRTG::Parse; my $mrtg_logfile = "/var/www/htdocs/mrtg/eth0.log"; my $period = "day"; my $desired_unit =...
5.12 KB  
Libraries  -  Parse::Nibbler 1.10
Parse::Nibbler is Perl module to parse huge files using grammars written in pure perl. Create a parser object using the ->new method. This method is provided by the Parse::Nibbler module and should not be overridden. The main functionality of...
33.79 KB  
Libraries  -  Wx::Perl::Packager 0.07
Wx::Perl::Packager provides a module to assist packaging Wx based applications with PAR, ActiveState PerlApp / PDK and Perl A module to assist packaging Wx based applications with PAR, ActiveState PerlApp / PDK and Perl2Exe. All that is needed...
12.29 KB  
Libraries  -  Tuxedo 2.08
Tuxedo is a Perl extension module for Tuxedo. This module provides the following functionality... C style interface The Tuxedo perl module gives you access to almost all of the tuxedo 8.1 apis from perl. In most cases you can take the C API...
33.79 KB  
Libraries  -  Sort::Versions 1.5
Sort::Versions is a Perl 5 module for sorting of revision-like numbers. SYNOPSIS use Sort::Versions; @l = sort { versioncmp($a, $b) } qw( 1.2 1.2.0 1.2a.0 1.2.a 1.a 02.a ); ... use Sort::Versions; print lower if versioncmp(1.2, 1.2a) ==...
5.12 KB  
Libraries  -  perlrpcgen 0.71
perlrpcgen is a Perl module that can generate Perl interfaces from ONC RPC interface definitions. SYNOPSIS perlrpcgen [--makefile] [--all] [--client] [--server] [--data] [--constants] [--module module] [--typemap typemap] [--fork] [--perl...
37.89 KB  
Science  -  Entrez Gene Parser in Perl 1.09
Perl Entrez Gene Parser project provides Perl parsers for NCBI's Entrez Gene based on regular expression, Parse::RecDescent, Parse::Yapp and Perl-byacc. Some can parse human genome annotations in minutes. Documentation and user guides are provided.
35.3 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.12.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
2.73 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB