diff options
author | Daniel Kraft <d@domob.eu> | 2009-05-23 09:58:54 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-06-21 15:06:03 +0200 |
commit | e63d888ef64c9c96177d841fa9a1ee4e697db81d (patch) | |
tree | 8e08793a18bddf1cd85811d9362e91d397c33772 /doc/ref/compiler.texi | |
parent | 6370a6ad25ab0bc47e2f165937db8c7955b2b595 (diff) | |
download | guile-e63d888ef64c9c96177d841fa9a1ee4e697db81d.tar.gz |
added documenting comments to the brainfuck compiler and mention it in the VM documentation.
* doc/ref/compiler.texi: Mention the new brainfuck compiler as an example.
* module/language/brainfuck/compile-scheme.scm: Add a lot of documentation comments.
* module/language/brainfuck/parse.scm: Ditto.
* module/language/brainfuck/spec.scm: Ditto.
Diffstat (limited to 'doc/ref/compiler.texi')
-rw-r--r-- | doc/ref/compiler.texi | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/ref/compiler.texi b/doc/ref/compiler.texi index 0d68abfc6..06262b95a 100644 --- a/doc/ref/compiler.texi +++ b/doc/ref/compiler.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Guile Reference Manual. -@c Copyright (C) 2008 +@c Copyright (C) 2008, 2009 @c Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @@ -26,6 +26,7 @@ know how to compile your .scm file. * GLIL:: * Assembly:: * Bytecode and Objcode:: +* Writing New High-Level Languages:: * Extending the Compiler:: @end menu @@ -712,6 +713,17 @@ module, and @var{externals} should be a list of external variables. @code{#f} is also a valid object code environment. @end deffn +@node Writing New High-Level Languages +@subsection Writing New High-Level Languages + +In order to integrate a new language @var{lang} into Guile's compiler +system, one has to create the module @code{(language @var{lang} spec)} +containing the language definition and referencing the parser, +compiler and other routines processing it. The module hierarchy in +@code{(language brainfuck)} defines a very basic Brainfuck +implementation meant to serve as easy-to-understand example on how to +do this. + @node Extending the Compiler @subsection Extending the Compiler |