Erlang source code parser for Perl.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Nicole Izumi e3c142823e
Release 0.6.
4 years ago
lib/Erlang Release 0.6. 4 years ago
t Disable POD tests for normal installs (per CPAN RT #115216). 4 years ago
.gitignore Including in the release. 9 years ago
.travis.yml Travis-ready. 8 years ago
Changes Release 0.6. 4 years ago
MANIFEST Including in the release. 9 years ago
Makefile.PL Release 0.5.3. 4 years ago
README Release 0.6. 4 years ago
TODO Retab; precedence parsing fixes; missing keywords 8 years ago
ignore.txt ignore .git 9 years ago


Erlang::Parser - Erlang source code parser

This document describes version 0.6 of Erlang::Parser released

use Erlang::Parser;

# Parse the code found in DATA; return all root-level nodes.
my @nodes = Erlang::Parser->parse(\*DATA);

# Each object in @nodes implements the Erlang::Parser::Node role, which
# is the function 'print'. It takes one argument, the filehandle to
# pretty-print to.
$_->print(*STDOUT) for @nodes;

# Use the accessors of each node type to get at the innards:
my ($directive, $def) = Erlang::Parser->parse(<<ERL);
my_fun(X, Y) -> X + Y.

# Have fun!

Erlang::Parser is an Erlang source code parser. You can feed "parse()"
any fragment of code which would be acceptable at the top-level of a
".erl" file, including a full file.

Parses an top-level Erlang declarations from a string, list of lines
of code, or filehandle. Returns a list of top-level nodes.

my @nodes = Erlang::Parser->parse(
'myfun(X) -> X + X.',
'myfun(X, Y) -> X + Y.',

Called when an error occurs. Reports based on the parser given as
the first argument.

Yuki Izumi (

You can find documentation for Erlang::Parser with the perldoc command.

perldoc Erlang::Parser

Other places of interest:

* GitHub: source code repository


* GitHub: open an issue


* Twitter: the author


Copyright (c) 2011-2016, Yuki Izumi "<>". All rights

This module is free software; you can redistribute it and/or modify it
under the same terms as Perl itself. See perlartistic.