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

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

Serving Software Downloads in 956 Categories, Downloaded 50.183.408 Times

Template::Alloy::Parse 1.006

  Date Added: September 14, 2010  |  Visits: 997

Template::Alloy::Parse

Report Broken Link
Printer Friendly Version


Product Homepage
Download (93 downloads)



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, and Velocity roles for finding variables and directives. ROLE METHODS parse_tree Used by load_tree. This is the main grammar engine of the program. It delegates to the syntax found in $self->{SYNTAX} (defaults to alloy) and calls the function found in the $SYNTAX hashref. The majority of these syntaxes use methods found in the $DIRECTIVES hashref to parse different DIRECTIVE types for each particular syntax. A template that looked like the following: Foo [%- GET foo -%] [%- GET bar -%] Bar would parse to the following AST: [ Foo, [GET, 6, 15, [foo, 0]], [GET, 22, 31, [bar, 0]], Bar, ] The "GET" words represent the directive used. The 6, 15 represent the beginning and ending characters of the directive in the document. The remaining items are the variables necessary for running the particular directive. parse_expr Used to parse a variable, an expression, a literal string, or a number. It returns a parsed variable tree. Samples of parsed variables can be found in the VARIABLE PARSE TREE section. my $str = "1 + 2 * 3"; my $ast = $self->parse_expr($str); # $ast looks like [[undef, +, 1, [[undef, *, 2, 3], 0]], 0] parse_args Allow for the multitudinous ways that TT parses arguments. This allows for positional as well as named arguments. Named arguments can be separated with a "=" or "=>", and positional arguments should be separated by " " or ",". This only returns an array of parsed variables. To get the actual values, you must call play_expr on each value. dump_parse_tree This method allows for returning a string of perl code representing the AST of the parsed tree. It is mainly used for testing. dump_parse_expr This method allows for returning a Data::Dumper dump of a parsed variable. It is mainly used for testing. parse_* Methods by these names are used by parse_tree to parse the template. These are the grammar. They are used by all of the various template syntaxes Unless otherwise mentioned, these methods are not exposed via the role..

Requirements: No special requirements
Platforms: Linux
Keyword: Ast Directive Get Libraries Parse Parsed Perl Module Programming Role Templatealloyparse Tree Used
Users rating: 0/10

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


TEMPLATE::ALLOY::PARSE RELATED
Science  -  Bio::Parse::SwissProt - perl module 0.5
A Perl module that provides methods for retrieving each and every field from a standard SwissProt file.
9.61 KB  
Libraries  -  Alien Perl module 0.91
Alien Perl module package contains external libraries wrapped up for your viewing pleasure! SYNOPSIS perldoc Alien; Alien is a package that exists just to hold together an idea, the idea of Alien:: packages, so there is no code here, just...
10.24 KB  
Libraries  -  OpenGeoDB Perl module 0.4
OpenGeDB Perl module is a module to access the OpenGeoDB database and calculate all ZIP codes in a certain radius..
3.07 KB  
Network & Internet  -  MyCMS perl module 1.0
MyCMS perl module provides the MN::CMS Perl module used by the MyCMS. MyCMS perl module contains Perl object classes to manage the data of MyCMS (such as articles, links, and images). MN::CMS is a perl module that allows you to manage an...
16.38 KB  
Libraries  -  Bio::Tree::DistanceFactory 1.5.2_102
Bio::Tree::DistanceFactory is a Perl module to construct a tree using distance based methods. SYNOPSIS use Bio::Tree::DistanceFactory; use Bio::AlignIO; use Bio::Align::DNAStatistics; my $tfactory = Bio::Tree::DistanceFactory->new(-method...
5.6 MB  
Libraries  -  ASNMTAP::Asnmtap::Plugins::WebTransact 3.000014
ASNMTAP::Asnmtap::Plugins::WebTransact is a Perl module that provides WebTransact functions used by ASNMTAP-based plugins. SYNOPSIS use ASNMTAP::Asnmtap::Plugins::WebTransact; my @URLS = (); my $objectWebTransact =...
1.7 MB  
Libraries  -  XML::XQL 0.68
XML::XQL is a perl module for querying XML tree structures with XQL. SYNOPSIS use XML::XQL; use XML::XQL::DOM; $parser = new XML::DOM::Parser; $doc = $parser->parsefile ("file.xml"); # Return all elements with tagName=title under the...
112.64 KB  
Libraries  -  ASNMTAP::Asnmtap::Plugins::Mail 3.000.010
ASNMTAP::Asnmtap::Plugins::Mail is a Perl module that provides Mail functions used by ASNMTAP-based plugins. SYNOPSIS use ASNMTAP::Asnmtap::Plugins::Mail; my $objectNagios = ASNMTAP::Asnmtap::Plugins::Mail->new (); Sending and receiving...
1.6 MB  
Libraries  -  ASNMTAP::Asnmtap::Plugins::SOAP 3.000.010
ASNMTAP::Asnmtap::Plugins::SOAP is a Perl module that provides SOAP functions used by ASNMTAP-based plugins. SYNOPSIS use ASNMTAP::Asnmtap::Plugins v3.000.010; use ASNMTAP::Asnmtap::Plugins qw(:PLUGINS); my $objectPlugins =...
1.6 MB  
Libraries  -  XML::Code 0.04
XML::Diff is a Perl module for XML DOM-Tree based Diff & Patch Module. SYNOPSIS my $diff = XML::Diff->new(); # to generate a diffgram of two XML files, use compare. # $old and $new can be filepaths, XML as a string, # XML::LibXML::Document...
17.41 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
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  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.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...
3.88 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