Main > Free Download Search >

Free parses software for linux

parses

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 1250
DParser 1.15

DParser 1.15


DParser is an simple but powerful tool for parsing. more>>
DParser project is an simple but powerful tool for parsing. You can specify the form of the text to be parsed using a combination of regular expressions and grammar productions.
Because of the parsing technique (technically a scannerless GLR parser based on the Tomita algorithm) there are no restrictions.
The grammar can be ambiguous, right or left recursive, have any number of null productions, and because there is no seperate tokenizer, can include whitespace in terminals and have terminals which are prefixes of other terminals.
DParser handles not just well formed computer languages and data files, but just about any wacky situation that occurs in the real world.
Main features:
- Powerful GLR parsing
- Simple EBNF-style grammars and regular expression terminals
- Priorities and associativities for token and rules
- Built-in error recovery
- Speculative actions (for semantic disambiguation)
- Auto-building of parse tree (optionally)
- Final actions as you go, or on the complete parse tree
- Tree walkers and default actions (multi-pass compilation support)
- Symbol table built for ambiguous parsing
- Partial parses, recursive parsing, parsing starting with any non-terminal
- Whitespace can be specified as a subgrammar
- External (C call interface) tokenizers and external terminal scanners
- Good asymptotically efficiency
- Comes with ANSI-C, Python and Verilog grammars
- Comes with full source
- Portable C for easy compilation and linking
- BSD licence, so you can included it in your application without worrying about licensing
Enhancements:
- Removed call to exec in python interface (Brian Sabbey)
- Fix binary_op_left in python interface (Brian Sabbey)
<<less
Download (0.26MB)
Added: 2006-10-18 License: BSD License Price:
1103 downloads
Parse::RPN 2.34

Parse::RPN 2.34


Parse::RPN is a minimalist RPN parser/processor (a little like FORTH). more>>
Parse::RPN is a minimalist RPN parser/processor (a little like FORTH).

SYNOPSIS

use Parse::RPN;
$result=rpn(string ...);
@results=rpn(string ...);

$error=rpn_error();

string... is a list of RPN operator and value separated by a coma in scalar mode RPN return the result of the calculation (If the stack contain more then one element, you receive a warning and the top value on the stack) in array mode, you receive the content of the stack after evaluation

rpn() receive in entry a scalar of one or more elements coma separated and evaluate as an RPN (Reverse Polish Notation) command. The function split all elements and put in the stack. The operator are case sensitive. The operator are detect as is, if they are alone in the element of the stack. Extra space before or after are allowed (e.g "3,4,ADD" here ADD is an opeartor but it is not the case in "3,4,ADD 1") If element is not part of the predefined operator (dictionary), the element is push as a litteral.

If you would like to put a string which is part of the dictionary, put it between quote or double-quote (e.g "3,4,ADD" here ADD is a literal and the evaluation reurn ADD and a warning because the stack is not empty) If the string contain a coma, you need also to quote or double-quote the string. (be care to close your quoted or double-quoted string)

The evaluation follow the rule of RPN or FORTH or POSTCRIPT or pockect calcutor HP. Look on web for documentation about the use of RPN notation.

I use this module in a application where the final user need to create an maintain a configuration file with the possibility to do calculation on variable returned from application.

The idea of this module is comming from Math::RPN of Owen DeLong, owen@delong.com that I used for more then a year before some of my customer would like more ... I correct a bug (interversion of > and >=), add the STRING function, pattern search and some STACK functions.

rpn_error() return the last error from the evaluation (illegal division by 0, error from the PERL function execution...) each time that rpn() is call the rpn_error() is reinitianised.

<<less
Download (0.025MB)
Added: 2007-06-27 License: Perl Artistic License Price:
851 downloads
Parsing 1.3

Parsing 1.3


Parsing module is a pure-Python module that implements an LR(1) parser generator, as well as CFSM and GLR parser drivers. more>> <<less
Download (0.081MB)
Added: 2007-08-14 License: MIT/X Consortium License Price:
805 downloads
Parse::Java 0.01

Parse::Java 0.01


Parse::Java is a Perl module that acts like a parser for Java code. more>>
Parse::Java is a Perl module that acts like a parser for Java code.

SYNOPSIS

use Parse::Java;

my $ast = Parse::Java->parse_file(MyClass.java);

Parse::Java parses Java code into an Abstract Syntax Tree which can be used for many things like writing compilers and stuff.

As this module is currently under development it isnt yet able to parse much Java. Whats in the t/*.t basically works but not much else.

The lexer should also more or less work fine except expansion of unicode escapes uNNNN.

INTERFACE

This module uses an object-oriented interface.

CLASS METHODS

parse_file ( $path )

Parses the contents of the file $path. Returns an AST representing the code.

parse_string

Parses the source in $string. Returns an AST representing the code.

detokenize ( $ast )

Walks the AST and replaces all Parse::Java::Token-objects with their stringified value.

INSTANCE METHODS

_set_input ( $source )

Sets the input to the lexer.

_next_token

Returns a list with the next token from the stream and its value.

<<less
Download (0.018MB)
Added: 2007-01-16 License: Perl Artistic License Price:
1012 downloads
Kismet Parse 0.2

Kismet Parse 0.2


Kismet Parse project can be used after kismet has sniffed 802.11 traffic and produced .network files. more>>
Kismet Parse project can be used after kismet has sniffed 802.11 traffic and produced .network files.

Kismet Parse is a Perl script that will parse these files to map the MAC addresses of the discovered wireless access point and clients to useful information. The information includes the hardware manufacturer of the device.

<<less
Download (0.007MB)
Added: 2007-08-22 License: GPL (GNU General Public License) Price:
568 downloads
MRTG::Parse 0.03

MRTG::Parse 0.03


MRTG::Parse is a Perl extension for parsing and utilizing the logfiles generated by the famous MRTG Tool. more>>
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 = "GB";

my ($traffic_incoming, $traffic_outgoing, $traffic_sum) = mrtg_parse($mrtg_logfile, $period, $desired_unit);

print "Incoming Traffic: $traffic_incomingn";
print "Outgoing Traffic: $traffic_outgoingn";
print "= Sum $traffic_sumn";

This perl extension enables its users to parse and utilize the logfiles that are generated by the famous MRTG (Multi Router Traffic Grapher) tool.

mrtg_parse() takes three argument:

1st: filename of the mrtg logfile
2nd: time period to genereate the output for
valid values are:
- individual time periods like: 20040821-20050130 (ISO 8601)
- static values: day, month, year
3rd: the desired unit (optional)
valid values are:
- B, KB, MB, GB, TB
- if missing mrtg_parse will chose an adequate one for you
mrtg_parse() returns three values:

1st: Incoming traffic
2nd: Outgoing traffic
3rd: Sum of incoming and outgoing

<<less
Download (0.005MB)
Added: 2007-04-03 License: Perl Artistic License Price:
938 downloads
RDFParser 2.0.0

RDFParser 2.0.0


RDFParser project is a PHP class that loads and parses RDF/RSS files. more>>
RDFParser project is a PHP class that loads and parses RDF and RSS files. These are XML files that are used by many Websites to syndicate headlines.
The class provides an interface to the loaded file and makes it simple to generate lists/ tables of the source sites headlines.
Enhancements:
- The old PHP3 code has been completely replaced with new a new PHP4/5 compliant parser.
- The new code uses PHPs built-in SAX parser (rather than regular expressions), which means it is much faster than the old code; even a large RSS file like freshmeats is parsed in under two hundredths of a second (2800XP/PHP 4.4.0/ Apache 2.0.55).
- The new code is also more flexible with regard to parsing slightly non-standard RSS/RDF files.
<<less
Download (0.011MB)
Added: 2006-01-30 License: GPL (GNU General Public License) Price:
1363 downloads
Parse::RecDescent 1.94

Parse::RecDescent 1.94


Parse::RecDescent is a Perl module to generate Recursive-Descent Parsers. more>>
Parse::RecDescent is a Perl module to generate Recursive-Descent Parsers.
SYNOPSIS
use Parse::RecDescent;
# Generate a parser from the specification in $grammar:
$parser = new Parse::RecDescent ($grammar);
# Generate a parser from the specification in $othergrammar
$anotherparser = new Parse::RecDescent ($othergrammar);
# Parse $text using rule startrule (which must be
# defined in $grammar):
$parser->startrule($text);
# Parse $text using rule otherrule (which must also
# be defined in $grammar):
$parser->otherrule($text);
# Change the universal token prefix pattern
# (the default is: s*):
$Parse::RecDescent::skip = [ t]+;
# Replace productions of existing rules (or create new ones)
# with the productions defined in $newgrammar:
$parser->Replace($newgrammar);
# Extend existing rules (or create new ones)
# by adding extra productions defined in $moregrammar:
$parser->Extend($moregrammar);
# Global flags (useful as command line arguments under -s):
$::RD_ERRORS # unless undefined, report fatal errors
$::RD_WARN # unless undefined, also report non-fatal problems
$::RD_HINT # if defined, also suggestion remedies
$::RD_TRACE # if defined, also trace parsers behaviour
$::RD_AUTOSTUB # if defined, generates "stubs" for undefined rules
$::RD_AUTOACTION # if defined, appends specified action to productions
Parse::RecDescent incrementally generates top-down recursive-descent text parsers from simple yacc-like grammar specifications.
Main features:
- Regular expressions or literal strings as terminals (tokens),
- Multiple (non-contiguous) productions for any rule,
- Repeated and optional subrules within productions,
- Full access to Perl within actions specified as part of the grammar,
- Simple automated error reporting during parser generation and parsing,
- The ability to commit to, uncommit to, or reject particular productions during a parse,
- The ability to pass data up and down the parse tree ("down" via subrule argument lists, "up" via subrule return values)
- Incremental extension of the parsing grammar (even during a parse),
- Precompilation of parser objects,
- User-definable reduce-reduce conflict resolution via "scoring" of matching productions.
<<less
Download (0.12MB)
Added: 2006-09-23 License: Perl Artistic License Price:
1131 downloads
LogicParser 0.7.2

LogicParser 0.7.2


LogicParser project is a simple parser for logical expressions. more>>
LogicParser project is a simple parser for logical expressions.

This small application parses a logical expression and shows his tree representation (in a TreeView), along with its DOT format and PNG graph. It also calculate the result of the proposition based on given values.

<<less
Download (0.028MB)
Added: 2007-02-16 License: GPL (GNU General Public License) Price:
981 downloads
HTML::Parser 3.54

HTML::Parser 3.54


HTML::Parser is a HTML parser class. more>>
HTML::Parser is a HTML parser class. Objects of the HTML::Parser class will recognize markup and separate it from plain text (alias data content) in HTML documents. As different kinds of markup and text are recognized, the corresponding event handlers are invoked.
HTML::Parser is not a generic SGML parser.

We have tried to make it able to deal with the HTML that is actually "out there", and it normally parses as closely as possible to the way the popular web browsers do it instead of strictly following one of the many HTML specifications from W3C. Where there is disagreement, there is often an option that you can enable to get the official behaviour.

The document to be parsed may be supplied in arbitrary chunks. This makes on-the-fly parsing as documents are received from the network possible.
If event driven parsing does not feel right for your application, you might want to use HTML::PullParser. This is an HTML::Parser subclass that allows a more conventional program structure.

SYNOPSIS:

use HTML::Parser ();

# Create parser object
$p = HTML::Parser->new( api_version => 3,
start_h => [&start, "tagname, attr"],
end_h => [&end, "tagname"],
marked_sections => 1,
);

# Parse document text chunk by chunk
$p->parse($chunk1);
$p->parse($chunk2);
#...
$p->eof; # signal end of document

# Parse directly from file
$p->parse_file("foo.html");
# or
open(my $fh, "<<less
Download (0.082MB)
Added: 2006-05-05 License: Perl Artistic License Price:
1269 downloads
Parse::Nibbler 1.10

Parse::Nibbler 1.10


Parse::Nibbler is Perl module to parse huge files using grammars written in pure perl. more>>
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 the Parse::Nibbler module is the Register subroutine. This subroutine is used to define the rules of your grammar. The Register subroutine takes two parameters: A string and a code reference.

The string is the name of the rule (i.e. the name of the subroutine/method)

The code reference is a reference to the code to execute for this rule.

The Register subroutine will take the code reference, wrap it up in another subroutine that acts as a closure, and then installs that code reference as a subroutine with the name matching the given string.

The wrapper code (the closure) is the same for every rule. The wrapper code handles quantifiers, calls the rule, and decides what to do based on the rule passing or failing.
A rule is a code reference with a given string name that have been passed to Register. Here is an example of a rule:
Register ( Name, sub { my $p = shift; $p->AlternateValues( Jim, Scotty, Spock );
}
);

The parser object will always be passed in as the first parameter to your rule. You must pass this into any further rules or any Parse::Nibbler methods.

In the above example, the rule, "Name" is Registered. "Name" calls one of the builtin methods, AlternateValues, defined below. Once a rule is Registered, other rules can call it:
Register ( MedicalDiagnosis, sub { my $p = shift; $p->AlternateValues("Hes", "Shes"); $p->ValueIs("dead"); $p->ValueIs(","); $p->Name; $p->ValueIs("!"); } );

This code registers a rule called "MedicalDiagnosis". It uses some builtin methods, but it also calls the rule just registered, "Name".

Once a user defines a rule, they can use it in other rules by simply calling it as they would call a method.

Rules registered with the Parse::Nibbler module can be called with quantifiers. Quantifiers are passed into the Rule when you call it in your grammar by passing in a string that matches the format described here.

Quantifiers allow you to specify the quantity of rules present. Quantifiers also allow you to specify whether multiple rules have separators.

Quantifiers are specified using the following string format:

{quantifier}

This indicates that there are zero or one Name rules expected: $p->Name({?});
This indicates that there are zero or more Name rules expected: $p->Name({*});
This indicates that there are one or more Name rules expected: $p->Name({+});
This indicates that there are exactly three Name rules expected: $p->Name({3});
This indicates there are 1 to 3 Name rules expected: $p->Name({1:3});
This indicates there are at least 2 Name rules expected: $p->Name({2:);

Separators are specified using the following string format:

/separator/

This indicates 1 or more Name rules, each separated by a comma:

$p->Name({1:}/,/);

It is the job of the Register function to make sure this additional functionality is provided transparently and automagically to you.

If you call a rule with no quantifier and no separator, the rule will assume the quantifier is 1 and there is no separator.

Additional Parse::Nibbler methods are provided to simplify rule definition and to provide smart, automatic error handling, etc. You grammars should only call other rules that you defined, or these methods explained below.

(Note: these methods do not take quantifiers)
############### Method: ValueIs ###############
Parameters: One parameter, required. A string containing the expected value.
Example: $p->ValueIs( stringvalue );
Description:
This method will look at the next lexical and determine if its value matches that of the stringvalue given as a parameter. If it does not match, an exception is raised and the rule fails.
If the values do match, then the parser stores the lexical, and the rule continues.
####################### Method: AlternateValues #######################
Parameters: A list of string parameters, at least two values.
Example: $p-AlternateValues( value1, value2 );
Description:
This method behaves like the ValueIs method, except that it will recieve a list of allowed alternate expected values. The first match that succeeds causes the rule to pass and return.
If no match occurs, then an exception is raised and the rule aborts.
If a match does occur, the parser stores the lexical, and the rule continues.
############## Method: TypeIs ##############
Parameters: One parameter, required. A string containing the expected type.
Description:
This method will look at the next lexical item, and determine if the lexical type matches the type given as a parameter.
Valid type values depend on the Lexer that you use, but possible values may include "Identifier" and "Number", etc.
Use this in a case where your rule requires an identifier type, for example, but it does not care what the name of the identifier is for the rule.
If a match occurs, the parser stores the lexical and the rule continues.
If a match does not occur, an exception is raised, and the rule aborts.
###################### Method: AlternateRules ######################
Parameters: A list of string parameters, at least two.
Example: $p->AlternateRules( Rule1, Rule2 );
Description:
You can describe rule alternation in your rule by calling this method. The method takes a list of strings whose string values match the names of the valid alternate rule names.
In the above example, the McCoy rule is either a declaration of profession or a medical diagnosis. These are two rules that are defined in the same package. The AlternateRules method allows you to define multiple rules that may be valid at the same point in the text.
If a rule in the parameter list succeeds, the AlternateRule method succeeds, and returns immediately.
If no rule succeeds, an exception is thrown, and the rule aborts.
This rule expects either a "DeclareProfession" rule or a "MedicalDiagnosis" rule to be present.
Register ( McCoy, sub { my $p = shift; $p->AlternateRules( DeclareProfession, MedicalDiagnosis ); } );
You can specify quantifiers as part of the alternate rule strings.
$p->AlternateRules( DeclareProfession({+}), MedicalDiagnosis );
The above example indicates that you can have one or more DeclareProfession rules OR ALTERNATELY you can have exactly one MedicalDiagnosis rule.

EXPORT

Register, used to register the rules in your grammar.

<<less
Download (0.033MB)
Added: 2007-02-22 License: Perl Artistic License Price:
974 downloads
BBCode::Parser 0.34

BBCode::Parser 0.34


BBCode::Parser is a Perl module that parses BBCode tags. more>>
BBCode::Parser is a Perl module that parses BBCode tags.

BBCode is a simplified markup language used in several online forums and bulletin boards. It originated with phpBB, and remains most popular among applications written in PHP. Generally, users author their posts in BBCode, and the forum converts it to a permitted subset of well-formed HTML.
BBCode::Parser is a proper recursive parser for BBCode-formatted text.

OVERVIEW

A BBCode::Parser object stores various settings that affect the parsing process. Simple settings are typically set when the parser is created using new(), but they can be queried using get() and altered using set().

See "SETTINGS" for more information.

In addition to the simple settings, specific BBCode tags (or classes of tags) can be permitted or forbidden, using permit() and forbid() respectively. By default, the only forbidden tag is [HTML], which is normally a security violation if permitted.

See "CLASSES" for a list of tag classes.

Once the parser has been configured appropriately, parse trees can be created using the parse() method. The parse tree will consist of objects derived from BBCode::Tag; the root of the tree will be a BBCode::Body object.

Converting the parse tree to HTML is quite simple: call toHTML() on the root of the tree. Likewise, the parse tree can be converted back to BBCode by calling toBBCode(). See "METHODS" in BBCode::Tag to find out what other output methods are available.

<<less
Download (0.050MB)
Added: 2007-03-20 License: Perl Artistic License Price:
951 downloads
Parse::Eyapp 1.069577

Parse::Eyapp 1.069577


Parse::Eyapp module contains extensions for Parse::Yapp. more>>
Parse::Eyapp module contains extensions for Parse::Yapp.

SYNOPSIS

use strict;
use Parse::Eyapp;
use Parse::Eyapp::Treeregexp;

sub TERMINAL::info {
$_[0]{attr}
}

my $grammar = q{
%right = # Lowest precedence
%left - + # + and - have more precedence than = Disambiguate a-b-c as (a-b)-c
%left * / # * and / have more precedence than + Disambiguate a/b/c as (a/b)/c
%left NEG # Disambiguate -a-b as (-a)-b and not as -(a-b)
%tree # Let us build an abstract syntax tree ...

%%
line: exp { $_[1] } /* list of expressions separated by ; */
;

/* The %name directive defines the name of the class to which the node being built belongs */
exp:
%name NUM NUM | %name VAR VAR | %name ASSIGN VAR = exp
| %name PLUS exp + exp | %name MINUS exp - exp | %name TIMES exp * exp
| %name DIV exp / exp | %name UMINUS - exp %prec NEG
| ( exp ) { $_[2] } /* Let us simplify a bit the tree */
;

%%
sub _Error { die "Syntax error near ".($_[0]->YYCurval?$_[0]->YYCurval:"end of file")."n" }

sub _Lexer {
my($parser)=shift; # The parser object

for ($parser->YYData->{INPUT}) { # Topicalize
m{Gs+}gc;
$_ eq and return(,undef);
m{G([0-9]+(?:.[0-9]+)?)}gc and return(NUM,$1);
m{G([A-Za-z][A-Za-z0-9_]*)}gc and return(VAR,$1);
m{G(.)}gcs and return($1,$1);
}
}

sub Run {
my($self)=shift;
$self->YYParse( yylex => &_Lexer, yyerror => &_Error, );
}
}; # end grammar

our (@all, $uminus);

Parse::Eyapp->new_grammar( # Create the parser package/class
input=>$grammar,
classname=>Calc, # The name of the package containing the parser
firstline=>7 # String $grammar starts at line 7 (for error diagnostics)
);
my $parser = Calc->new(); # Create a parser
$parser->YYData->{INPUT} = "2*-3+b*0;--2n"; # Set the input
my $t = $parser->Run; # Parse it!
local $Parse::Eyapp::Node::INDENT=2;
print "Syntax Tree:",$t->str;

# Let us transform the tree. Define the tree-regular expressions ..
my $p = Parse::Eyapp::Treeregexp->new( STRING => q{
{ # Example of support code
my %Op = (PLUS=>+, MINUS => -, TIMES=>*, DIV => /);
}
constantfold: /TIMES|PLUS|DIV|MINUS/:bin(NUM($x), NUM($y))
=> {
my $op = $Op{ref($bin)};
$x->{attr} = eval "$x->{attr} $op $y->{attr}";
$_[0] = $NUM[0];
}
uminus: UMINUS(NUM($x)) => { $x->{attr} = -$x->{attr}; $_[0] = $NUM }
zero_times_whatever: TIMES(NUM($x), .) and { $x->{attr} == 0 } => { $_[0] = $NUM }
whatever_times_zero: TIMES(., NUM($x)) and { $x->{attr} == 0 } => { $_[0] = $NUM }
},
OUTPUTFILE=> main.pm
);
$p->generate(); # Create the tranformations

$t->s($uminus); # Transform UMINUS nodes
$t->s(@all); # constant folding and mult. by zero

local $Parse::Eyapp::Node::INDENT=0;
print "nSyntax Tree after transformations:n",$t->str,"n";

<<less
Download (0.36MB)
Added: 2007-06-27 License: Perl Artistic License Price:
849 downloads
Chess::PGN::Parse 0.19

Chess::PGN::Parse 0.19


Chess::PGN::Parse is a Perl module that reads and parses PGN (Portable Game Notation) Chess files. more>>
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 die "cant open $pgnfilen";
while ($pgn->read_game()) {
print $pgn->white, ", " , $pgn->black, ", ",
$pgn->result, ", ",
$pgn->game, "n";
}


use Chess::PGN::Parse;
my $text ="";
{
local $INPUT_RECORD_SEPARATOR = undef;
open PGN "< $pgnfile" or die;
$text = ;
close $text;
}
# reads from string instead of a file
my $pgn = new Chess::PGN::Parse undef, $text;
while ($pgn->read_game()) {
print $pgn->white, ", " , $pgn->black, ", ",
$pgn->result, ", ",
$pgn->game, "n";
}

use Chess::PGN::Parse;
my $pgnfile = "kk_2001.pgn";
my $pgn = new Chess::PGN::Parse $pgnfile
or die "cant open $pgnfilen";
my @games = $pgn->smart_read_all();

Chess::PGN::Parse offers a range of methods to read and manipulate Portable Game Notation files. PGN files contain chess games produced by chess programs following a standard format (http://www.schachprobleme.de/chessml/faq/pgn/). It is among the preferred means of chess games distribution. Being a public, well established standard, PGN is understood by many chess archive programs. Parsing simple PGN files is not difficult. However, dealing with some of the intricacies of the Standard is less than trivial. This module offers a clean handle toward reading and parsing complex PGN files.

A PGN file has several tags, which are key/values pairs at the header of each game, in the format [key "value"]
After the header, the game follows. A string of numbered chess moves, optionally interrupted by braced comments and recursive parenthesized variants and comments. While dealing with simple braced comments is straightforward, parsing nested comments can give you more than a headache.

Chess::PGN::Parse most immediate methods are: read_game() reads one game, separating the tags and the game text.

parse_game() parse the current game, and stores the moves into an
array and optionally saves the comments into an array of hashes
for furter usage. It can deal with nested comments and recursive
variations.

quick_parse_game() Same as the above, but doesnt save the comments,
which are just stripped from the text. It cant deal with nested
comments. Should be the preferred method when we know that we are
dealing with simple PGNs.

smart_parse_game() Best of the above methods. A preliminary check
will call parse_game() or quick_parse_game(), depending on the
presence of nested comments in the game.

read_all(), quick_read_all(), smart_read_all() will read all the records
in the current PGN file and return an array of hashes with all the
parsed details from the games.

<<less
Download (0.026MB)
Added: 2007-08-01 License: Perl Artistic License Price:
818 downloads
XML::Parser::PerlSAX 0.08

XML::Parser::PerlSAX 0.08


XML::Parser::PerlSAX is a Perl SAX parser using XML::Parser. more>>
XML::Parser::PerlSAX is a Perl SAX parser using XML::Parser.

SYNOPSIS

use XML::Parser::PerlSAX;

$parser = XML::Parser::PerlSAX->new( [OPTIONS] );
$result = $parser->parse( [OPTIONS] );

$result = $parser->parse($string);

XML::Parser::PerlSAX is a PerlSAX parser using the XML::Parser module. This man page summarizes the specific options, handlers, and properties supported by XML::Parser::PerlSAX; please refer to the PerlSAX standard in `PerlSAX.pod for general usage information.

METHODS

new

Creates a new parser object. Default options for parsing, described below, are passed as key-value pairs or as a single hash. Options may be changed directly in the parser object unless stated otherwise. Options passed to `parse() override the default options in the parser object for the duration of the parse.

parse

Parses a document. Options, described below, are passed as key-value pairs or as a single hash. Options passed to `parse() override default options in the parser object.

location

Returns the location as a hash:

ColumnNumber The column number of the parse.
LineNumber The line number of the parse.
BytePosition The current byte position of the parse.
PublicId A string containing the public identifier, or undef
if none is available.
SystemId A string containing the system identifier, or undef
if none is available.
Base The current value of the base for resolving relative
URIs.

ALPHA WARNING: The `SystemId and `PublicId properties returned are the system and public identifiers of the document passed to `parse(), not the identifiers of the currently parsing external entity. The column, line, and byte positions are of the current entity being parsed.

<<less
Download (0.063MB)
Added: 2006-06-14 License: GPL (GNU General Public License) Price:
1234 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 5
  • 1
  • 2
  • 3
  • 4
  • 5