parrotcode: A Markdown compiler. | |
Contents | Language Implementations | Markdown |
markdown.pir - A Markdown compiler.
as a command line (without interactive mode) :
$ parrot markdown.pbc document.text
$ parrot markdown.pbc --target=parse document.text
PAST
HTML
or as a library :
load_bytecode 'Markdown.pbc'
$P0 = compreg 'Markdown'
$S0 = <<'MARKDOWN'
Title
=====
Some text.
MARKDOWN
$P1 = $P0.'compile'($S0)
print $P1
This is the base file for the Markdown compiler.
This file includes the parsing and grammar rules from the src/ directory, loads the relevant PGE libraries, and registers the compiler under the name 'Markdown'.
PCT::HLLCompiler
object.source
into a String containing HTML.args
to the Markdown compiler.http://daringfireball.net/projects/markdown/
|