Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Perlito5 - docs update

  • Loading branch information...
commit 71b0905e7246a971c2c35d26d21c3269e5a90de5 1 parent 3fbe0da
@fglock authored
View
2  ChangeLog
@@ -2,6 +2,8 @@ Dev 2012-02-14
Perlito Perl 5:
- parser optimizations
+- it is now possible to add new words to the grammar from inside perl5 modules
+-- moved the non-standard "token" grammar to a module
- perl5 backend:
-- use native data structures and ops
View
5 TODO-perlito5
@@ -63,6 +63,7 @@ TODO list for Perlito5
-- bug: packages currently create lexical blocks
-- bug: "my" variables are block-wide; this doesn't work as expected: my $v = $v
+ possible fix: rename variables
-- bug: variable aliases create copies instead
@@ -73,7 +74,7 @@ TODO list for Perlito5
-- add symbol tables for scalar, array and hash
--- string increment and ranges
+-- string increment and string ranges
* Python backend
@@ -95,6 +96,7 @@ TODO list for Perlito5
-- run perltidy on the source code
+-- proper "use strict" and "use warnings"
-- use the same error messages and warnings as 'perl'
-- __PACKAGE__, __END__
@@ -104,6 +106,7 @@ TODO list for Perlito5
-- finish "overload" implementation
-- source code - remove Perl 6 code such as "token"
+ (fixed: This is only loaded if the grammar compiler is needed)
-- here-docs
View
8 src5/lib/Perlito5/Expression.pm
@@ -895,19 +895,13 @@ Perlito5::Expression - Parser and AST generator for Perlito
=head1 DESCRIPTION
-This module parses source code for Perl 6 statements and generates Perlito AST.
+This module parses source code for Perl 5 statements and generates Perlito5 AST.
=head1 AUTHORS
Flavio Soibelmann Glock <fglock@gmail.com>.
The Pugs Team E<lt>perl6-compiler@perl.orgE<gt>.
-=head1 SEE ALSO
-
-The Perl 6 homepage at L<http://dev.perl.org/perl6>.
-
-The Pugs homepage at L<http://pugscode.org/>.
-
=head1 COPYRIGHT
Copyright 2010, 2011 by Flavio Soibelmann Glock and others.
View
13 src5/lib/Perlito5/Grammar/Regex.pm
@@ -3,7 +3,10 @@ package Perlito5::Grammar::Regex;
use Perlito5::Precedence;
-# register the "token" keyword - XXX Perl6
+# Register the "token" keyword
+#
+# This is not a Perl5 word, but Perl6 - but it is useful inside the grammar compiler
+
token token {
<Perlito5::Grammar.opt_name> <.Perlito5::Grammar.opt_ws> \{
@@ -37,7 +40,7 @@ token term_token {
Perlito5::Precedence::add_term( 'token', sub { Perlito5::Grammar::Regex->term_token($_[0], $_[1]) } );
-# "grammar grammar"
+# this is the "grammar grammar"
token ws { <.Perlito5::Grammar.ws> }
@@ -199,13 +202,15 @@ Perlito5::Grammar::Regex - Grammar for Perlito Grammar
=head1 SYNOPSIS
- my $match = $source.rule;
+ my $match = Perlito5::Grammar::Regex->rule( $source, $pos );
$match->flat(); # generated Regex AST
=head1 DESCRIPTION
This module generates a syntax tree for the Regex compiler.
+This is not useful during runtime, and this module should never be loaded in the compiled programs.
+
=head1 AUTHORS
Flavio Soibelmann Glock <fglock@gmail.com>.
@@ -215,8 +220,6 @@ The Pugs Team E<lt>perl6-compiler@perl.orgE<gt>.
The Perl 6 homepage at L<http://dev.perl.org/perl6>.
-The Pugs homepage at L<http://pugscode.org/>.
-
=head1 COPYRIGHT
Copyright 2006, 2009, 2011 by Flavio Soibelmann Glock, Audrey Tang and others.
View
8 src5/lib/Perlito5/Precedence.pm
@@ -435,19 +435,13 @@ Perlito5::Precedence - precedence parser for Perlito
=head1 DESCRIPTION
-This module resolves the operator precedence in Perl 6 expressions.
+This module resolves the operator precedence in Perl 5 expressions.
=head1 AUTHORS
Flavio Soibelmann Glock <fglock@gmail.com>.
The Pugs Team E<lt>perl6-compiler@perl.orgE<gt>.
-=head1 SEE ALSO
-
-The Perl 6 homepage at L<http://dev.perl.org/perl6>.
-
-The Pugs homepage at L<http://pugscode.org/>.
-
=head1 COPYRIGHT
Copyright 2010, 2011 by Flavio Soibelmann Glock and others.
Please sign in to comment.
Something went wrong with that request. Please try again.