From 2bbcf1b832ef5ee9de1f482f7a8a0b54dd0c2906 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Mon, 3 Jun 2013 18:20:10 +0200 Subject: [PATCH] docs: add docs for the program directives --- doc/Makefile.am | 3 +- doc/orc-docs.sgml | 1 + doc/program.xml | 129 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 doc/program.xml diff --git a/doc/Makefile.am b/doc/Makefile.am index 770b755..1427a78 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -66,7 +66,8 @@ HTML_IMAGES= # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.sgml building.sgml changes-2.0.sgml -content_files=building.xml concepts.xml opcode_table.xml opcodes.xml running.xml tutorial.xml table.xml +content_files=building.xml concepts.xml opcode_table.xml opcodes.xml \ + program.xml running.xml tutorial.xml table.xml # SGML files where gtk-doc abbrevations (#GtkWidget) are expanded # These files must be listed here *and* in content_files diff --git a/doc/orc-docs.sgml b/doc/orc-docs.sgml index f8aee88..7e62b91 100644 --- a/doc/orc-docs.sgml +++ b/doc/orc-docs.sgml @@ -28,6 +28,7 @@ + diff --git a/doc/program.xml b/doc/program.xml new file mode 100644 index 0000000..2c39805 --- /dev/null +++ b/doc/program.xml @@ -0,0 +1,129 @@ + + +%version-entities; + +]> + + +Orc Program Syntax +3 +Orc + + + +Orc Program + +Description of the Orc program syntax + + + + +Orc Program + + + An orc program is an UTF-8 file containing the source read by the + Orc-compiler. Each program consists of several blocks. Each block contains a + directives and opcodes. + + + + .init + + Global initialisation for a module. + + + + + .function + +.function <function-name> + + Starts a new function. Takes one arg which is the function name. + + + + + .flags + +.flags (1d|2d) + + Tells wheter arrays are 1 or 2 dimensional. The default is 1d. + + + + + + + .source + +.source <size> <var-name> [<type-name>] + + Input data array parameter for functions. Arguments denote size of the items + in the array (1,2,4,8), name of the variable and optional name of the type. + Only reads are allowed. + + + + + + .dest + +.dest <size> <var-name> [<type-name>] + + Output data array parameter for functions. Arguments denote size of the + items in the array (1,2,4,8), name of the variable and optional name of the + type. This directive can also be used for in/out array parameters. + + + + + + .accumulator + +.accumulator <size> <var-name> [<type-name>] + + Output value parameter for functions. Arguments denote size of the variable + (1,2,4,8), name of the variable and optional name of the type. + + + + + .param + +.param <size> <var-name> [<type-name>] + + Parameter for functions. Arguments denote size of the variable (1,2,4,8), + name of the variable and optional name of the type. + + + This directive has variants named: .longparam, .floatparam and .doubleparam. + + + + + .const + +.const <size> <var-name> + + Constant for functions. Arguments denote size of the constant (1,2,4,8) and + the name. + + + + + .temp + +.temp <size> <var-name> + + Local variable for functions. Arguments denote size of the variable + (1,2,4,8) and then name. + + + + + -- 2.7.4