tagged release 0.6.4
[parrot.git] / languages / pynie / pynie.pir
blobde86bb9457e5a0c61ed1b27b5e5e27891662f0d9
1 =head1 TITLE
3 pynie.pir - A Python compiler.
5 =head2 Description
7 This is the base file for the Pynie compiler.
9 =head2 Functions
11 =over 4
13 =item __onload()
15 Loads the PGE libraries needed for running the parser,
16 and registers the Pynie compiler using a C<HLLCompiler>
17 object.
19 =cut
21 .sub '__onload' :load :init
22     load_bytecode 'PCT.pbc'
24     $P0 = get_hll_global ['PCT'], 'HLLCompiler'
25     $P0 = $P0.'new'()
26     $P0.'language'('Pynie')
27     $P0.'parsegrammar'('Pynie::Grammar')
28     $P0.'parseactions'('Pynie::Grammar::Actions')
30     $P0.'commandline_banner'("Pynie: a Python compiler for Parrot.\n")
31     $P0.'commandline_prompt'('>>> ')
33 .end
36 =item main(args :slurpy)  :main
38 Start compilation by passing any command line C<args>
39 to the Pynie compiler.
41 =cut
43 .sub 'main' :main
44     .param pmc args
45     load_bytecode 'PGE/Dumper.pbc'
46     $P0 = compreg 'Pynie'
47     .return $P0.'command_line'(args)
48 .end
51 .include 'src/gen_grammar.pir'
52 .include 'src/gen_actions.pir'
53 .include 'src/parser/indent.pir'
55 .include 'src/builtins/io.pir'
56 .include 'src/builtins/lists.pir'
57 .include 'src/builtins/oper.pir'
59 =back
61 =cut
63 # Local Variables:
64 #   mode: pir
65 #   fill-column: 100
66 # End:
67 # vim: expandtab shiftwidth=4 ft=pir: