3 lolcode.pir - A lolcode compiler.
7 This is the base file for the lolcode compiler.
9 This file includes the parsing and grammar rules from
10 the src/ directory, loads the relevant PGE libraries,
11 and registers the compiler under the name 'lolcode'.
19 Creates the lolcode compiler using a C<PCT::HLLCompiler>
24 .namespace [ 'lolcode::Compiler' ]
26 .loadlib 'lolcode_group'
28 .sub 'onload' :anon :load :init
29 load_bytecode 'PCT.pbc'
31 $P0 = new 'ResizablePMCArray'
32 set_hll_global ['lolcode';'Grammar';'Actions'], '@?BLOCK', $P0
34 $P0 = new 'PAST::Stmts'
35 set_hll_global ['lolcode';'Grammar';'Actions'], '$?BLOCK_SIGNATURE', $P0
37 $P0 = get_hll_global ['PCT'], 'HLLCompiler'
39 $P1.'language'('lolcode')
40 $P1.'parsegrammar'('lolcode::Grammar')
41 $P1.'parseactions'('lolcode::Grammar::Actions')
44 =item main(args :slurpy) :main
46 Start compilation by passing any command line C<args>
47 to the lolcode compiler.
54 $P0 = compreg 'lolcode'
55 $P1 = $P0.'command_line'(args)
59 .include 'src/gen_builtins.pir'
60 .include 'src/gen_grammar.pir'
61 .include 'src/parser/yarn_literal.pir'
62 .include 'src/gen_actions.pir'
72 # vim: expandtab shiftwidth=4 ft=pir: