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.541.450 Times

B::Generate 1.06

  Date Added: January 18, 2010  |  Visits: 1.062

B::Generate

Report Broken Link
Printer Friendly Version


Product Homepage
Download (74 downloads)



B::Generate is a Perl module which you can create your own op trees. SYNOPSIS use B::Generate; # Do nothing, slowly. CHECK { my $null = new B::OP("null",0); my $enter = new B::OP("enter",0); my $cop = new B::COP(0, "hiya", 0); my $leave = new B::LISTOP("leave", 0, $enter, $null); $leave->children(3); $enter->sibling($cop); $enter->next($cop); $cop->sibling($null); $null->next($leave); $cop->next($leave); # Tell Perl where to find our tree. B::main_root($leave); B::main_start($enter); } WARNING This module will create segmentation faults if you dont know how to use it properly. Further warning: sometimes I dont know how to use it properly. There are lots of other methods and utility functions, but they are not documented here. This is deliberate, rather than just through laziness. You are expected to have read the Perl and XS sources to this module before attempting to do anything with it. Patches welcome. Malcolm Beatties B module allows you to examine the Perl op tree at runtime, in Perl space; its the basis of the Perl compiler. But what it doesnt let you do is manipulate that op tree: it wont let you create new ops, or modify old ones. Now you can. Well, if youre intimately familiar with Perls internals, you can. B::Generate turns Bs accessor methods into get-set methods. Hence, instead of merely saying $op2 = $op->next; you can now say $op->next($op2); to set the next op in the chain. It also adds constructor methods to create new ops. This is where it gets really hairy. new B::OP ( type, flags ) new B::UNOP ( type, flags, first ) new B::BINOP ( type, flags, first, last ) new B::LOGOP ( type, flags, first, other ) new B::LISTOP ( type, flags, first, last ) new B::COP ( flags, name, first ) In all of the above constructors, type is either a numeric value representing the op type (62 is the addition operator, for instance) or the name of the op. ("add") (Incidentally, if you know about custom ops and have registed them properly with the interpreter, you can create custom ops by name: new B::OP("mycustomop",0), or whatever.) first, last and other are ops to be attached to the current op; these should be B::OP objects. If you havent created the ops yet, dont worry; give a false value, and fill them in later: $x = new B::UNOP("negate", 0, undef); # ... create some more ops ... $x->first($y); In addition, one may create a new nextstate operator with newstate B::op ( flags, label, op) in the same manner as B::COP::new - this will also, however, add the lineseq op. Finally, you can set the main root and the starting op by passing ops to the B::main_root and B::main_start functions. This module can obviously be used for all sorts of fun purposes. The best one will be in conjuction with source filters; have your source filter parse an input file in a foreign language, create an op tree for it and get Perl to execute it. Then email me and tell me how you did it. And why..

Requirements: No special requirements
Platforms: Linux
Keyword: Bgenerate Cop Create Create Your Own Flags Libraries Module New Ops Perl Perl Module Programming Your Own
Users rating: 0/10

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


B::GENERATE RELATED
Games  -  ABC Spell - Fun Way To Learn 1.1
ABC Spell - Fun Way To Learn Teach your kids the alphabet, some new words, or even add in your own words you want to teach them. All thru this fun, entertaining and highly addictive game Alpha Catcher! The game is fun for all ages young and old!...
17.2 MB  
Application Add-Ins  -  1 day Alexa Rank Boost 1.0.0.0
Improve your Alexa rank for brand new sites, This works even if your site has zero links on the web.
398 KB  
Health & Fitness  -  Runtastic Squats 1.0.3.0
Do you want to shape and strengthen your legs and glutes? With the Runtastic Squats app as your personal trainer, you can now improve your leg strength and reach new fitness goals. The app is your personal squat trainer that implements an...
17 MB  
Libraries  -  Module::Starter::PBP 0.0.3
Module::Starter::PBP is a Perl module to create a module as recommended in "Perl Best Practices". SYNOPSIS # In your ~/.module-starter/config file... author: email: plugins: Module::Starter::PBP...
8.19 KB  
Sports  -  ESPN Radio 4.6.0
The ESPN Radio App is a FREE App and will remain FREE Take your sports wherever your ears go! Introducing the new and improved ESPN Radio App for your iPhone or iPad, with a host of expanded features and functionality for sports fans....
9.1 MB  
Libraries  -  Module::Crypt 0.04
Module::Crypt is a Perl module to encrypt your Perl code and compile it into XS. SYNOPSIS use Module::Crypt; # for a single file: CryptModule( file => Bar.pm, install_base => /path/to/my/lib ); # for multiple files: CryptModule(...
7.17 KB  
Games  -  Happy Monster School Run 1.0.1
Help the Scary beings of Monster U get to terror classes on time! Looks like College students arent the only ones staying up all night at frat parties! Jump, dodge and collect coins to pay your way in this crazy new adventure brought to you by...
13.7 MB  
Multimedia & Graphics  -  Buddy Icon Constructor FREE 1.1
Buddy Icon Constructor Free allows to create own buddy icon for on-line messengers.You can use your pictures, pictures of your friends and family.You can use you pictures, images from Internet, your art-works. Take any image (BMP, JPEG, GIF, PNG,...
509 KB  
Multi-Purpose Audio Players  -  Crawler Radio & MP3 Player 4.5.0.31
Listen to internet radio streams and at the same time make recordings of your favorite songs & radio shows, listen to the music stored on your PC now even faster thanks to cool "drag & drop" function and create your own playlists while browsing...
3.95 KB  
Libraries  -  OpenPlugin::Application 0.11
OpenPlugin::Application is a subclass of CGI::Application, meant to help you create reusable web applications. SYNOPSIS # Example from OpenThoughts Demo.pm package Demo; use base "OpenPlugin::Application"; sub setup { my $self = shift;...
78.85 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  -  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  
Libraries  -  App::SimpleScan::Substitution::Line 2.02
App::SimpleScan::Substitution::Line is a line with optional fixed variable values. SYNOPSIS my $line = App::SimpleScan::Substitution::Line->new(" this "); # Use only this value when substituting " ". $line->fix(substituite =>...
54.27 KB