Find file
Fetching contributors…
Cannot retrieve contributors at this time
81 lines (52 sloc) 1.28 KB
# $Id$
# Copyright (C) 2008, Parrot Foundation.
=head1 TITLE
c99.pir - A C99 compiler.
=head2 Description
This is the base file for the C99 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 'C99'.
=head2 Functions
=over 4
=item onload()
Creates the C compiler using a C<PCT::HLLCompiler>
.namespace [ 'C99';'Compiler' ]
.loadlib 'c99_group'
.sub 'onload' :anon :load :init
load_bytecode 'PCT.pbc'
$P0 = get_hll_global ['PCT'], 'HLLCompiler'
$P1 = $P0.'new'()
=item main(args :slurpy) :main
Start compilation by passing any command line C<args>
to the C compiler.
.sub 'main' :main
.param pmc args
$P0 = compreg 'C99'
$P1 = $P0.'command_line'(args)
.include 'src/gen_builtins.pir'
.include 'src/gen_grammar.pir'
.include 'src/gen_actions.pir'
.namespace [ 'C99';'Grammar' ]
.sub 'debug'
.param pmc match
.param pmc arg
.param pmc attrs :slurpy
printerr arg
printerr "\n"
# Local Variables:
# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir: