mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 01:30:27 +02:00
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.
This commit is contained in:
parent
6370a6ad25
commit
e63d888ef6
4 changed files with 124 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue