NAME
STD_syntax_highlight - Highlights Perl 6 source code using STD.pm
SYNOPSIS
# read from standard input
STD_syntax_highlight
# print ansi-escaped text for 'TOP'
STD_syntax_highlight foo.pl
# print separate html, css and javascript files
STD_syntax_highlight --full-html=foo.full.html --clean-html foo.pl
# print ansi-escaped text for with 'statementlist' as the top-level rule
STD_syntax_highlight foo.pl statementlist
# write simple html output to foo.pl.html
STD_syntax_highlight --simple-html=foo.pl.html foo.pl
# write simple snippet html output to foo.pl.html
STD_syntax_highlight --snippet-html=foo.pl.html foo.pl
# write simple ansi-colored output to STDOUT
STD_syntax_highlight --ansi-text=- foo.pl
# write output with mIRC color codes to STDOUT
STD_syntax_highlight --mirc-text=- foo.pl
# write yaml output to STDOUT (can be useful to build filters)
STD_syntax_highlight --yaml=- foo.pl
=head1 SUBROUTINES
- main
-
Your standard main method
- write_output
-
Writes the output to a file or STDOUT
- highlight_match
-
Returns the generated Perl6 highlighted HTML from
highlight_perl6_*
subroutine using redspans. - highlight_perl6_full
-
Generates the Perl6 highlighted HTML string for STD parse tree provided. The resources can be inlined (by default) or externalized (--clean-html).
- highlight_perl6_simple
-
This is same as
highlight_perl6_full
when --simple-html is used. No more javascript tree viewer or anything fancy. Only nodes that have a color are printed. Not optimal but works ;-) - highlight_perl6_snippet_html
-
This is same as
highlight_perl6_full
when --snippet-html is used. No more javascript tree viewer or anything fancy. Only nodes that have a color are printed. Not optimal but works ;-) - highlight_perl6_ansi
-
This is same as
highlight_perl6_full
when --ansi-text is used. No more javascript tree viewer or anything fancy. Only nodes that have a color are printed. Not optimal but works ;-) - highlight_perl6_mirc
-
This is same as
highlight_perl6_full
when --mirc-text is used. No more javascript tree viewer or anything fancy. Only nodes that have a color are printed. Not optimal but works ;-) - highlight_perl6_yaml
-
Spits out YAML that can be useful for the future
- redspans_traverse
-
Walk the path that no one wanted to travel ;)
- escape_html
-
Converts some characters to their equivalent html entities
AUTHOR
Written by Ahmad M. Zawawi (azawawi), Moritz Lenz and Paweł Murias (pmurias)
The project idea was inspired by Moritz Lenz (moritz) See http://www.nntp.perl.org/group/perl.perl6.users/2008/07/msg788.html
The initial STD tree traversal code was written by Paweł Murias (pmurias).
The redspans traversal code was written by Larry Wall (TimToady). redspans stands for "...'red' for "reductions", and 'spans' from the from/to span calculations"
The browser code was written by Ahmad M. Zawawi (azawawi)
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 600:
Non-ASCII character seen before =encoding in 'Paweł'. Assuming UTF-8