This is pnettools.info, produced by makeinfo version 4.6 from
pnettools.texi.

INFO-DIR-SECTION DotGNU
START-INFO-DIR-ENTRY
* Portable .NET: (pnettools).   Development toolchain for applications
                                targeted at the CLI, such as those
                                written in C#.
END-INFO-DIR-ENTRY

INFO-DIR-SECTION Individual utilities
START-INFO-DIR-ENTRY
* csant: (pnettools)csant invocation.
                                Manage build scripts for C# programs.
* cscc: (pnettools)cscc invocation.
                                Compiling to DotGNU Portable .NET.
* csdoc: (pnettools)csdoc invocation.
                                Extracting C# program documentation.
* csdoc2hier: (pnettools)csdoc2hier invocation.
                                Viewing C# class hierarchies.
* csdoc2html: (pnettools)csdoc2html invocation.
                                Converting `csdoc' output to HTML.
* csdoc2texi: (pnettools)csdoc2texi invocation.
                                Converting `csdoc' output to Texinfo.
* ilalink: (pnettools)ilalink invocation.  Link Portable .NET objects.
* ilasm: (pnettools)ilasm invocation.    Assemble IL to Portable .NET
                                assemblies.
* ildasm: (pnettools)ildasm invocation.
                                Debug problems with Portable .NET
                                executables by disassembly.
* ildd: (pnettools)ildd invocation.
                                Portable .NET library dependencies.
* ilfind: (pnettools)ilfind invocation.     Search for patterns in
                                Portable .NET objects.
* ilnative: (pnettools)ilnative invocation.
                                List native methods used in a Portable
                                .NET assemblies/objects.
* ilsize: (pnettools)ilsize invocation.
                                List size information for CLI objects.
* resgen: (pnettools)resgen invocation.     Make data resources for
                                            Portable .NET assemblies.
END-INFO-DIR-ENTRY

   The Portable.NET development tools assist with building and
manipulating images in the portable executable format.  development.

Copyright (C) 2001, 2002, 2003 Southern Storm Software, Pty Ltd


File: pnettools.info,  Node: Top,  Next: Overview,  Up: (dir)

* Menu:

* Overview::                The tools in brief
* C# Compiler::             C# compiler
* C Compiler::              C compiler
* Documentation::           XML documentation tools
* Build Management::        Build management with csant
* Assembler::               Intermediate language assembler
* Disassembler::            Intermediate language disassembler
* Linker::                  Intermediate language assembly linker
* Size::                    Intermediate language size utility
* Native::                  Intermediate language native utility
* Find::                    Intermediate language name find utility
* Dependencies::            Intermediate language dependency utility
* Resources::               Resource generation and conversion
* ECMA Extensions::         ECMA file format extensions
* Load Errors::             Errors while loading IL binaries
* Index::                   Index of concepts and facilities


File: pnettools.info,  Node: Overview,  Next: C# Compiler,  Prev: Top,  Up: Top

Overview
********

This manual describes a set of tools that can be used to build and
manipulate applications for the Portable.NET platform.

`csant'
     The C# build management tool.  *Note Build Management::, for more
     information.

`cscc'
     The C# compiler.  *Note C# Compiler::, for more information.

`csdoc'
     The C# documentation conversion utility.  *Note Documentation::,
     for more information.

`csdoc2hier'
     Used to convert C# XML documentation into a tree hierarchy diagram.
     *Note csdoc2hier invocation::, for more information.

`csdoc2html'
     Used to convert C# XML documentation into HTML.  *Note csdoc2html
     invocation::, for more information.

`csdoc2texi'
     Used to convert C# XML documentation into texinfo.  *Note
     csdoc2texi invocation::, for more information.

`ilasm'
     The Intermediate Language (IL) assembler.  *Note Assembler::, for
     more information.

`ildasm'
     The IL disassembler.  *Note Disassembler::, for more information.

`ilalink'
     The IL assembly linker.  *Note Linker::, for more information.

`ilsize'
     The IL size utility.  *Note Size::, for more information.

`ilnative'
     The IL native utility.  *Note Native::, for more information.

`ilfind'
     The IL find utility.  *Note Find::, for more information.

`ildd'
     The IL dependency utility.  *Note Dependencies::, for more
     information.

`resgen'
     The resource generation utility.  *Note Resources::, for more
     information.


File: pnettools.info,  Node: C# Compiler,  Next: cscc invocation,  Prev: Overview,  Up: Top

C# Compiler
***********

Cscc compiles input source files, typically in the C# (pronounced
C-Sharp) programming language.

   The command-line syntax of cscc has been deliberately designed to
match that of C compilers such as gcc(1), to shorten the learning curve
for new users.

* Menu:

* cscc invocation::         Invoking cscc
* Option Summary::          Brief list of all options, without explainations
* Overall Options::         Controlling input, output, and overall behaviour
* Language Options::        Controlling the variant of C# that is compiled
* Warning Options::         Controlling how warnings are emitted
* Debugging Options::       Symbol tables and other debugging information
* Optimization Options::    Controlling the level of optimization
* Preprocessor Options::    Controlling conditional compilation and macros
* Assembler Options::       Controlling the behaviour of ilasm
* Directory Options::       Where to find include files
* Linker Options::          Controlling the behaviour of the linker
* Other Options::           Other options supported by cscc
* Language Plugins::        Adding other languages to cscc
* Compiling to the JVM::    Compiling source to JVM bytecode
* Differences::             Differences between cscc and standard C#


File: pnettools.info,  Node: cscc invocation,  Next: Option Summary,  Prev: C# Compiler,  Up: C# Compiler

Invoking cscc
=============

The general form of the cscc syntax is as follows:

     cscc [OPTIONS] input ...

   The exit status is 1 if an error occurred while processing the input.
Otherwise the exit status is 0.


File: pnettools.info,  Node: Option Summary,  Next: Overall Options,  Prev: cscc invocation,  Up: C# Compiler

Option summary for cscc
=======================

Overall Options
     *Note Overall Options::
          -c -S -E -o FILE -pipe -v -vv -x LANGUAGE

Language Options
     *Note Language Options::
          -flatin1-charset -foctal-chars -foctal-constants
          -fdecimal-constants -fchecked -funchecked -fsyntax-check
          -fsemantic-check -funsafe

Warning Options
     *Note Warning Options::
          -Wall -Werror -w -W -Woctal-chars -Woctal-constants
          -Wunknown-escapes -Winvalid-utf8 -Wlarge-unicode-chars
          -Wmulti-char-constant -Wunsafe -Wempty-input

Debugging Options
     *Note Debugging Options::
          -g

Optimization Options
     *Note Optimization Options::
          -O -O2 -O3 -O0 -fno-peephole

Preprocessor Options
     *Note Preprocessor Options::
          -C -P -DSYMBOL -USYMBOL -undef -dM -dN

Assembler Options
     *Note Assembler Options::
          -fno-short-insns -filasm-path=PATHNAME -mjvm
          -fstdlib-name=NAME
          -fsave-asm

Directory Options
     *Note Directory Options::
          -IDIR -nostdinc -nostdinc++

Linker Options
     *Note Linker Options::
          -e ENTRYPOINT -LDIR -nostdlib -lLIBRARY
          -shared -static -m32bit-only -fresources=RESFILE
          -mcui-subsystem -mgui-subsystem -gtk -gnome

Other Options
     *Note Other Options::
          -dumpversion --help -fplugin-KEY-path=PATHNAME


File: pnettools.info,  Node: Overall Options,  Next: Language Options,  Prev: Option Summary,  Up: C# Compiler

Overall options
===============

`-c'
     Compile or assemble the input source files to object files, but do
     not link.  The object file corresponding to the input file
     `FILE.EXT' will be called `FILE.obj' unless the `-o' option is
     supplied.

     If the language compiles multiple input source files at a time,
     then there will be a single output file.  The name of the output
     file will be based on the name of the first input file unless the
     `-o' option is supplied.

`-S'
     Compile the input source files to produce assembly language in the
     Intermediate Language format.  The assembly file corresponding to
     the input file `FILE.EXT' will be called `FILE.il' unless the `-o'
     option is supplied.

     If the language compiles multiple input source files at a time,
     then there will be a single output file.  The name of the output
     file will be based on the name of the first input file unless the
     `-o' option is supplied.

`-E'
     Preprocess the input files and write the preprocessed source to
     the output file.  If no output file is supplied, then the
     preprocessed source is written to standard output.

`-o FILE'
     Specify the name of the file to write the output to.  The default
     depends upon how cscc is invoked.  Specifying `FILE' as `-'
     indicates that the output should be set to standard output.
     Standard output can only be used for pre-processing.

     If none of `-c', `-S', or `-E' are supplied, then the default
     output file is `a.out.exe' or `a.out.dll'.  The latter is used
     when the `-shared' option is supplied.

`-pipe'
     Not used at present.  Provided for compatibility with gcc(1).

`-v'
     Print verbose debugging information about the files that are being
     compiled.

`-vv'
     Print the names of the command-lines that are executed by cscc to
     invoke external programs such as language plug-ins and the
     assembler, ilasm.

`-x language'
     Specify the source language to use to compile all input files.
     This is typically not needed, because cscc can guess the language
     from the input file's extension.

     The options `-x cs' and `-x csharp' specify that the language is
     C#.

     *Note Language Plugins::, for more information on this option.

   Default file extensions typically follow the Windows conventions of
`.obj', `.exe', and `.dll' rather than the Unix conventions of `.o', no
extension, and `.so' respectively.  This is due to the Windows nature
of IL binaries, and to prevent confusion with native Unix binaries.
The `-o' option can be used to override the defaults.


File: pnettools.info,  Node: Language Options,  Next: Warning Options,  Prev: Overall Options,  Up: C# Compiler

Language options
================

Every language supported by cscc has its own set of language, warning,
and other options.  The following sections describe the options for C#
only.

`-flatin1-charset'
     The input source file's character set is Latin-1, instead of the
     UTF-8 default.

     If the source is in a character set other than Latin-1 or UTF-8,
     the programmer must arrange for it to be converted into UTF-8
     prior to invoking the compiler.

`-foctal-chars'
     The C# language standard does not support octal characters
     constants by default.  This option is enabled by default.

     If this option is enabled, sequences such as ``\033'' will be
     processed as in C, with a warning.  The `-Wno-octal-chars' option
     can be used to disable the warning.  Use the `-fno-octal-chars'
     option to disable the use of octal character constants.

`-foctal-constants'
     The C# language standard does not support octal integer constants
     by default.  Selecting this option will enable them.

     If this option is not present, sequences such as `\033' will be
     parsed as decimal, and a warning will be displayed.  The
     `-Wno-octal-constants' or `-fdecimal-constants' options will
     disable the warning.

`-fdecimal-constants'
     Parse character sequences that look like octal integers as decimal
     and suppress the warning.  If both `-foctal-constants' and
     `-fdecimal-constants' are supplied, then the former takes
     precedence.

`-fchecked'
`-funchecked'
     Compile arithmetic expressions so that overflow exceptions will or
     will not be thrown, respectively.  The default is `-funchecked'.
     The `checked' and `unchecked' keywords can be used in source files
     to override this setting.

`-fsyntax-check'
     Parse the input source file to check its syntax, but don't go any
     further with compilation.

`-fsemantic-check'
     Parse the input source file to check its syntax and perform
     semantic analysis, but don't go any further with compilation.

`-funsafe'
     Permit the use of unsafe C# language constructs in the input
     source file.  If this option is not supplied, all unsafe
     constructs will result in an error.


File: pnettools.info,  Node: Warning Options,  Next: Debugging Options,  Prev: Language Options,  Up: C# Compiler

Warning options
===============

`-Wall'
`-W'
     Enable all warnings that are supported by the compiler.
     Individual warnings can be disabled with `-Wno-XXX' options.  For
     example, `-Wall -Wno-empty-input' will enable all warnings except
     the "empty input file" warning.

`-Werror'
     Convert all warnings into errors.

`-w'
     Suppress all warnings.

`-Woctal-chars'
     Warn if the programmer uses the octal form of a character.  The C#
     language standard only supports `\0', but this compiler also
     supports sequences such as `\033'.

`-Woctal-constants'
     Warn if the programmer uses a sequence that looks like an octal
     integer constant, but which is being parsed as decimal in
     accordance with the C# language standard.

`-Wunknown-escapes'
     Warn if an unknown escape sequence is used in a string or
     character constant.

`-Winvalid-utf8'
     Warn if an invalid UTF-8 sequence is encountered in the input
     source file.

`-Wlarge-unicode-chars'
     Warn if a character constant uses a Unicode character with a
     codepoint value greater than 65535.

`-Wmulti-char-constant'
     Warn if a character constant contains more than one character.

`-Wunsafe'
     Warn when an unsafe construct is used in the program.

`-Wempty-input'
     Warn if the input source file does not contain any declarations.


File: pnettools.info,  Node: Debugging Options,  Next: Optimization Options,  Prev: Warning Options,  Up: C# Compiler

Debugging options
=================

`-g'
     Enable the generation of debug symbol information in the output
     file.


File: pnettools.info,  Node: Optimization Options,  Next: Preprocessor Options,  Prev: Debugging Options,  Up: C# Compiler

Optimization options
====================

`-O'

`-O2'

`-O3'
     Enable various levels of optimization.

`-O0'
     Disable all optimizations.

`-fno-peephole'
     Disable peephole optimization of the code.


File: pnettools.info,  Node: Preprocessor Options,  Next: Assembler Options,  Prev: Optimization Options,  Up: C# Compiler

Preprocessor options
====================

`-C'
     Include comments in pre-processor output.  This option is not yet
     supported.

`-P'
     Don't use `#line' directives in pre-processor output.

`-DSYMBOL'
     Define the macro `SYMBOL' prior to pre-processing the input.

     C# does not support macros with values.  Supplying a command-line
     option of `-DSYMBOL=value' will result in a macro called
     `SYMBOL=value', which cannot be tested effectively in C# source
     code.

`-USYMBOL'
     Undefine the macro `SYMBOL' prior to pre-processing the input.

`-undef'
     Undefine all standard macros prior to pre-processing the input.

`-dM'
     Dump the macros that were defined in the input source instead of
     dumping the pre-processor output.  This can only be used with the
     `-E' option.

`-dN'
     Dump both the pre-processor output and the macros that were
     defined.  This can only be used with the `-E' option.

   The standard macro `__CSCC__' is defined to indicate that cscc is
being used to compile the source code.

   The standard macros `DEBUG' or `RELEASE' will be defined to indicate
if a debug (`-g') or release version is being built.

   The standard macro `__JVM__' is defined to indicate that the output
is JVM code instead of IL code.


File: pnettools.info,  Node: Assembler Options,  Next: Directory Options,  Prev: Preprocessor Options,  Up: C# Compiler

Assembler options
=================

`-fno-short-insns'
     Causes the `-no-short-insns' command-line option to be passed to
     the ilasm assembler.

     This alters how the assembler generates the final object code.
     You typically don't need to use this option.

`-filasm-path=PATHNAME'
     Specifies the full pathname of the ilasm assembler.  By default,
     cscc searches for ilasm along the PATH.

`-mjvm'
     Compile to JVM bytecode instead of IL bytecode.

`-fstdlib-name=NAME'
     Change the name of the standard library to NAME.  The default
     value is "mscorlib".

`-fsave-asm'
     Do not delete intermediate assembly output files.  This is useful
     for debugging compiler problems.


File: pnettools.info,  Node: Directory Options,  Next: Linker Options,  Prev: Assembler Options,  Up: C# Compiler

Directory options
=================

`-IDIR'
     Specify the name of a directory in which the compiler should search
     for included files.

`-fnostdinc'
     Don't use standard include directories.

`-fnostdinc++'
     Don't use standard C++ include directories.

   These options are not currently used by the C# compiler.  They are
provided for future language plug-ins that may use include files.


File: pnettools.info,  Node: Linker Options,  Next: Other Options,  Prev: Directory Options,  Up: C# Compiler

Linker options
==============

`-e ENTRYPOINT'
     Specify the name of the entry point for the program.  This may
     either be a class name (e.g. `MainClass') or a method name (e.g.
     `MainClass.Main').  If this option is not supplied, the linker
     will search for any class with a static method called `Main'.

`-LDIR'
     Specify the name of a directory in which the compiler should search
     for libraries that the program will be linked against.

`-nostdlib'
     Don't use standard library directories and libraries.

`-lLIBRARY'
     Link against the specified library.  For example, specifying
     `-lSystem.XML' will search for the library `System.XML.dll' along
     the library search path.

     Unless `-nostdlib' is supplied, the library `mscorlib' is
     implicitly assumed to always be linked against.

     Libraries can also be specified by listing their filenames
     explicitly on the command-line.  For example:
     `/usr/local/lib/cscc/System.XML.dll' would have the same effect as
     `-lSystem.XML'.

`-shared'
     Create a shared library (`.dll') instead of an executable (`.exe').

`-static'
     Link statically against the supplied libraries.  This will
     incorporate the object file data for the libraries into the
     program being built.

     You normally will not need to use this option, unless you are
     concerned that a foreign host may not have all of the libraries
     that are required to execute the program.

     This option will never statically link against a library that has
     native, internalcall, or PInvoke methods.  In particular,
     `mscorlib.dll' will never be linked statically.

`-m32bit-only'
     Mark the final output file as only suitable to be executed on
     32-bit platforms.  Use of this option is severely discouraged as
     it makes the resultant program less portable.

`-fresources=RESFILE'
     Specify the name of a resource file to be linked with the final
     library or executable.  Multiple `-fresources' options may be used
     to specify multiple resource files.

`-mcui-subsystem'
     Tag the output file so that it can run within the command-line
     subsystem under Windows.  This is the default.

`-mgui-subsystem'
     Tag the output file so that it can run within the GUI subsystem
     under Windows.

`-gtk'
     Link against all of the libraries that are necessary to use Gtk#.

`-gnome'
     Link against all of the libraries that are necessary to use Gnome#.

`-winforms'
     Link against all of the libraries that are necessary to use
     WinForms.


File: pnettools.info,  Node: Other Options,  Next: Language Plugins,  Prev: Linker Options,  Up: C# Compiler

Other options
=============

`-dumpversion'
     Dump the version of cscc to standard error and then exit.

`--help'
     Print a usage message about the supported options and then exit.

`-fplugin-KEY-path=PATHNAME'
     Specify the `PATHNAME' of a language plug-in to be used to compile
     the language identified by `KEY'.

   *Note Language Plugins::, for more information on plug-ins.


File: pnettools.info,  Node: Language Plugins,  Next: Compiling to the JVM,  Prev: Other Options,  Up: C# Compiler

Language plugins
================

The compiler can support plug-ins for other programming languages,
allowing the same front-end to be used to service multiple language
back-ends.  Using a plug-in allows you to avoid most of the work
involved in building a compiler.  The minimum you must provide is a
translator between the source language and IL assembly code.  The cscc
front-end takes care of assembly and linking for you.

   A plug-in must be a regular Unix executable with the name `cscc-KEY'
or `cscc-KEY-s' where `KEY' is either the file extension or a language
name.  e.g. to create a plug-in for a hypothetical `superc' language,
that uses `.sc' as its primary file extension, create an executable
called `cscc-superc', and a symbolic link called `cscc-sc' that points
at the executable.

   When cscc searches for an extension, it will first look for an exact
case match.  If that doesn't succeed, it will normalize the extension
to lower case and try again.  Thus, the `cscc-sc' plug-in will be
passed any file with an extension of `.sc', `.Sc', `.sC', or `.SC'.  If
`.SC' is a different language, then a separate plug-in must be supplied.

   A language name may be specified using the -x option.  For example:

     cscc -x superc -o hello.obj -c hello.c

   Use this when the extension is not the same as the primary extension
for the language type.  Note: `-x sc' could also have been used.

   The C# compiler is itself implemented as a plug-in called `cscc-cs',
with a symbolic link to it called `cscc-csharp'.

   If the name of the executable ends in `-s', then it indicates a
"single file" language, rather than the default "multiple file"
language.

   Single file languages are those that must be compiled one file at a
time.  C is an example of such a language: each source file is logically
independent.  The plugin is executed once for each source file on the
`cscc' command-line.

   Multiple file languages are those that must be compiled multiple
files at a time because each file may depend on definitions in the
others.  C# is such a language.  All files with a matching extension
are passed to a single execution of the plugin.  The plugin will output
a single assembly stream that contains the compiled versions of all of
the files.

   The executable is located as follows:

   * Look for a `-fplugin-KEY-path=XXX' command-line option.  If it is
     present, then `XXX' is used as the plug-in executable.  For
     example, `-fplugin-cs-path=../../../pnet/cscc/cscc-cs' is used in
     the compilation of the system library to ensure that the current
     version of the compiler is used, even if a previous version is
     already installed.

   * Look in the directories specified by the `CSCC_PLUGINS_PATH'
     environment variable for a file called `cscc-KEY' or `cscc-KEY-s'.

   * Look in the installation `plugins' directory, which is normally
     something like `/usr/local/lib/cscc/plugins' or
     `/usr/lib/cscc/plugins'.

   * Look in the same directory from which `cscc' was loaded, by
     inspecting the `argv[0]' value.

   * Search the PATH for the name.

   The cscc front-end passes the following options down to the plug-in:

`-E'
     Preprocess instead of compiling.  If the plug-in's language does
     not support preprocessing, then it should print a message to
     standard error and exit with a status of 1.

`-pipe'
     If the plug-in invokes other tools during compilation, then
     attempt to use pipes rather than temporary files.  If it is
     difficult for the plug-in to conform with this option, then it can
     be safely ignored.

`-o NAME'
     Specify the name of the output file.  The default is standard
     output.

     The plug-in should write preprocessed data to the output file if
     `-E' is supplied, or IL assembly code otherwise.

`-g'
     Output debug information.

`-O'
`-O2'
`-O3'
`-O0'
     Set the optimization level to 1, 2, 3, and 0 respectively.

`-DSYMBOL'
`-DSYMBOL=VALUE'
     Define a symbol within the plug-in language's preprocessor.  The
     second form can be used if the language supports values for
     preprocessor symbols.  C# itself does not support values for
     preprocessor symbols.

`-USYMBOL'
     Undefine a symbol within the plug-in language's preprocessor.

`-undef'
     Undefine all pre-defined preprocessor symbols that the language
     may support.

     The cscc front-end will always pass down pre-defined symbols such
     as `__CSCC__' and `DEBUG', unless `-undef' was supplied on its
     command-line.  Thus, the plug-in does not need to handle these
     standard macros itself.

`-IDIR'
     Specify an include directory that originated on the cscc
     command-line.

`-JDIR'
`-KDIR'
     Specify a system include directory, or a C++ system include
     directory.  The front-end adds `-J' options for each of the system
     include directories that it knows about.  The front-end adds `-K'
     options for each of the C++ system include directories that it
     knows about.

     Plug-ins can use this information, or ignore it and use their own
     notion of system include directories.

     The `-J' options will not appear if the `-nostdinc' option is
     present.  The `-K' options will not appear if the `-nostdincpp'
     option is present.

`-nostdinc'
`-nostdinc++'
     Don't use any system include directories, or C++ system include
     directories, that the plug-in is aware of.

`-LDIR'
     Specify a library directory that originated on the cscc
     command-line.

`-MDIR'
     Specify a system library directory.  The front-end adds `-M'
     options for each of the system library directories that it knows
     about.  This option will not appear if the `-nostdlib' option is
     present.

`-nostdlib'
     Don't use any system library directories that the plug-in is aware
     of.

`-lLIBRARY'
     Specify the name of a library that is being linked against.

     The last four options are provided for informational purposes only.
     The plug-in is responsible for compiling and not linking.
     However, some languages (e.g. C#) require information from system
     libraries to be able to compile successfully.  These options are
     supplied to help such compilers.

     It is unlikely that `-l' options will be seen by the plug-in unless
     the program is being compiled and linked in one step.  e.g.

          cscc -o testing.exe testing.sc -lSystem

`-Wall'
     Enable all warnings.

`-w'
     Suppress the display of all warnings.

`-Werror'
     Treat warning messages as errors.

`-WNAME, -Wno-NAME'
     Enable or disable the warning called `NAME'.

`-fNAME'
     Activate or deactive that compiler extension feature called `NAME'.

`-mNAME'
     Activate or deactive that machine extension feature called `NAME'.

     In gcc(1), the `-m' options are used to control machine-dependent
     features.  Since IL is a platform-independent language, these
     options will rarely be required by plug-ins.

     Plug-ins can choose to ignore `-m' options, or can treat them as a
     separate set of compiler extension flags that complement the `-f'
     options.

     The cscc front-end does support some `-m' options for controlling
     the output of the assembler.  For example, `-m32bit-only' is used
     to force the generation of IL binaries that can only run on 32-bit
     systems.

`-dM'
`-dN'
     Debugging flags used with languages that support preprocessing.

`-P'
     Don't output `#line' directives in preprocessor output.

`-C'
     Include comments in the preprocessor output.

`-v'
     Provide verbose messages for debugging purposes.  This can be
     safely ignored if the plug-in does not have a verbose mode.

`-mjvm'
     Compile to JVM assembly code instead of IL assembly code.  If the
     plug-in does not know how to compile to JVM assembly code, it
     should print a message to standard error and exit with a status of
     1.  All plug-ins must support this option, even if only to report
     an error.

   The options are followed by the name of the input file, which may be
`-' for stdin.  Standard input is only used for preprocessing.
Multiple file languages may have more than one input file supplied on
the command-line.

   Any options that are not understood by the plug-in should be ignored.
In particular, `-W', `-f', and `-m' options may not always be
understood by the plug-in, because they are intended for a different
language plug-in, cscc itself, ilasm, or the linker.  If the option is
understood, but it has an incorrect value, then the plug-in should
print a message to standard error and exit with a status of 1.

   The plug-in is only used for compilation and pre-processing tasks.
It is not used for assembling or linking.  It is expected that the
output is an IL assembly code stream suitable for input to ilasm.  The
plug-in does not need to be concerned with generating IL bytecode
directly, or with calling ilasm itself: cscc takes care of the rest.

   The following is an example of invoking cscc for a plug-in language,
and the plug-in command-line that results:

     cscc -fno-short-insns -O2 -g -I../include \
         -o hello.obj -c hello.sc
     
     cscc-sc -f no-short-insns -O2 -g -I ../include \
         -J /usr/local/lib/cscc/include \
         -K /usr/local/lib/cscc/cpp-include \
         -D __CSCC__ -D DEBUG -o hello.il hello.sc

   This is followed by a call to ilasm:

     ilasm --debug -f no-short-insns \
         --format obj -o hello.obj hello.il

   Note: in this case, the `-fno-short-insns' flag is intended for the
assembler, rather than the plug-in.  The plug-in silently ignores any
`-f' options that it doesn't understand.  It may also ignore options
like `-O2' if it does not support code optimization.

   Any non-zero status return from the plug-in will cause cscc to exit
with the same status code.  If the plug-in exits with a signal, then
cscc will exit with a status code of 1 after reporting the signal to
standard error.


File: pnettools.info,  Node: Compiling to the JVM,  Next: Differences,  Prev: Language Plugins,  Up: C# Compiler

Compiling to the JVM
====================

The C# compiler supports compiling to either Intermediate Language (IL)
bytecode, or to Java Virtual Machine (JVM) bytecode.  The `-mjvm'
command-line option to cscc selects the JVM mode.

   C# programs are typically compiled many classes at a time, with all
classes ending up in the same binary image.  The cscc compiler therefore
converts C# source code into Java `.jar' files, which can contain
multiple classes.  It can also compile to the `.class' format, but only
if the input source contains one class definition.

   Compiling to JVM modifies the behaviour of some command-line options.
The file extension `.jar' is used instead of `.obj', `.dll', or `.exe'.
The file extension `.jl' is used instead of `.il' for assembly code
streams.  IL-specific options such as `-m32bit-only' and
`-fno-short-insns' are ignored.

   The ilasm assembler supports dual bytecode formats.  A method with
the `java' implementation attribute will be assembled using the Java
instruction set instead of the IL instruction set.  For example:

     .method public instance int32 foo(int32 x) java
     {
         iload_0
         ireturn
     }

   The rest of the assembly code stream is identical to IL.  The ilasm
program will convert from IL to JVM conventions on the fly.  IL-specific
features, such as module references and assembly definitions, will be
ignored.

   This approach makes it relatively easy to support JVM in language
plug-ins that already support IL.  Only the bodies of methods need to
be compiled differently.

   Because C# supports some features that aren't present in Java, it is
necessary to perform some "name mangling" on the names of fields and
methods to accomodate the differences.  Mangling is performed on any
field or method that involves a C#-specific type.  The simple numeric
types are mapped as follows:

C# Type         Java Type       Problematic?    Mangled Code
`sbyte'         `byte'          No              
`byte'          `int'           Yes             `B'
`short'         `short'         No              
`ushort'        `int'           Yes             `S'
`int'           `int'           Sometimes       `i'
`uint'          `uint'          Yes             `I'
`long'          `long'          Sometimes       `l'
`ulong'         `long'          Yes             `L'
`char'          `char'          No              
`float'         `float'         No              
`double'        `double'        No              
`bool'          `boolean'       No              

   Enumerated and value types are always problematic.  Regular class
types are sometimes problematic.

   Enumerated types are mapped to their underlying type, and the mangled
code is `Ename$'.  Value types are mapped to object references and the
mangled code is `V'.  Regular class types are mapped to object
references and the mangled code is `C'.

   If a field is declared with a problematic type, then its name is
converted into `name__code' where `code' is the mangled code.  The
field's type will be the corresponding Java type.  If the field's type
is only sometimes problematic, then it is not mapped.

   If a method is declared with at least one problematic parameter or
the return type is problematic, then the method signature must be
converted.  All problematic and sometimes problematic types are
converted into mangled codes, in the order of declaration.  Consider
the following method definitions:

     void m1(int x);
     void m2(uint x);
     long m3(int x, byte y, uint z);
     decimal m4(decimal x, string y);
     void m5(System.TypeCode x);
     void m6(uint[] x);

   These will be converted into the following Java definitions after
mangling has been applied:

     void m1(int x);
     void m2__I(int x);
     long m3__iIl(int x, byte y, int z);
     System.Decimal m4__VCV(System.Decimal x, System.String y);
     void m5__ESystem.TypeCode$(int x);
     void m6__I(int[] x);

   Note that types that are sometimes problematic must be converted if
any of the other types are problematic.  The mangled code for an array
type is the mangled code for the element type.

   Any field or method that is mangled must also have the Java
attribute `CLI.NameMangle', which indicates that mangling has been
applied to the name.  The attribute's value is a non-zero unsigned
32-bit integer that indicates how many bytes at the end of the UTF-8
name make up the name mangling information.  This length does not
include the "__" separator.

   Properties are compiled to get and set methods, as in C#.  Then the
Java attribute `CLI.Properties' is added to the class.  The contents of
this attribute is a list of property names, plus the methods that
implement each property.

   Events are compiled in a similar fashion, with the Java attribute
`CLI.Events' indicating which methods correspond to events.

   The above mangled codes and attributes can be used to recover the
type information when a `.class' file is loaded by a C#-aware compiler
or runtime engine.


File: pnettools.info,  Node: Differences,  Next: Special Keywords,  Prev: Compiling to the JVM,  Up: C# Compiler

Differences between cscc and standard C#
========================================

This section describes the differences between the C# syntax supported
by cscc, and that described in the ECMA specification.

* Menu:

* Special Keywords::        Special cscc keywords
* Pre-defined Macros::      Macros that are pre-defined by cscc
* Pre-processor Syntax::    Differences in the pre-processor syntax


File: pnettools.info,  Node: Special Keywords,  Next: Pre-defined Macros,  Prev: Differences,  Up: Differences

Special cscc keywords
=====================

The C# standard reserves identifiers that begin with `__' for use by
the language implementation.  We provide five such extensions:
`__builtin_constant', `__arglist', `__makeref', `__reftype', and
`__refvalue'.

   The `__builtin_constant' keyword can be used to insert special
constants into the input stream that may otherwise be difficult to
represent accurately with regular C# language features.

`__builtin_constant("float_min")'
     The minimum value of type `float' that can be represented.  This
     is approximately -3.40282346638528859e38f.

`__builtin_constant("float_max")'
     The maximum value of type `float' that can be represented.  This
     is approximately 3.40282346638528859e38f.

`__builtin_constant("float_epsilon")'
     The smallest positive non-zero value that can be represented by the
     `float' type.  This is approximately 1.4e-45f.

`__builtin_constant("double_min")'
     The minimum value of type `double' that can be represented.  This
     is approximately -1.7976931348623157e+308.

`__builtin_constant("double_max")'
     The maximum value of type `double' that can be represented.  This
     is approximately 1.7976931348623157e+308.

`__builtin_constant("double_epsilon")'
     The smallest positive non-zero value that can be represented by the
     `double' type.  This is approximately 4.94065645841247e-324.

   The programmer will not normally use these constructs.  Instead,
they should use the corresponding constants in the `System.Single' and
`System.Double' classes.  The `__builtin_constant' keyword is intended
solely for use in implementing the C# library.

   The `__arglist' keyword is used to assist interoperation with C code
that uses variable argument lists.  For example:

     int AddInts(__arglist)
     {
         int sum = 0;
         ArgIterator iter = new ArgIterator(__arglist);
         while(iter.GetRemainingCount() > 0)
         {
             sum += __refvalue(iter.GetNextArg(), int);
         }
         return sum;
     }
     
     void Call()
     {
         int result = AddInts(__arglist(1, 2, 3, 4, 5));
     }

The `__arglist' keyword is typically used in three different places:

   * As the last formal parameter in a method declaration.  This
     indicates that the method takes a variable number of arguments.

   * As the parameter to the `System.ArgIterator' constructor.  This
     initializes an iterator to traverse the variable arguments.

   * As the last actual parameter in a method call to specify the
     variable arguments to be passed.  The construct `__arglist()' is
     used when there are no variable arguments to be passed.

   The `__makeref' keyword is used to convert a variable into an
instance of `System.TypedReference'.  The single argument can be any
l-value that can be passed by reference using the `ref' keyword (local
variables, object fields, array elements, etc).  For example:

     int x;
     TypedReference tref;
     ...
     tref = __makeref(x);

   The `__reftype' keyword is used to extract the type component from
an instance of `System.TypedReference'.  For example:

     TypedReference tref;
     Type type;
     ...
     type = __reftype(tref);

   The `__refvalue' keyword is used to extract the value component from
an instance of `System.TypedReference', where the second argument
specifies the type to extract.  `System.InvalidCastException' will be
thrown if the value component is not of the specified type.  For
example:

     TypedReference tref;
     int x;
     ...
     x = __refvalue(tref, int);

   The `__arglist', `__makeref', `__reftype', and `__refvalue'
extensions are present in C# compilers from other vendors.  The
`__builtin_constant' extension is unique to cscc.


File: pnettools.info,  Node: Pre-defined Macros,  Next: Pre-processor Syntax,  Prev: Special Keywords,  Up: Differences

Pre-defined pre-procesor macros
===============================

The `cscc' compiler defines a number of pre-processor macros prior to
processing source files.

`__CSCC__'
     This macro is defined by the compiler to let the source know that
     `cscc' is being used to process the source.

`__JVM__'
     This macro is defined by the compiler to let the source know that
     the output bytecode format is JVM instead of IL.

`DEBUG'
     This macro is defined if the `-g' command-line option is present.

`RELEASE'
     This macro is defined if the `-g' command-line option is not
     present.

   The programmer can disable all pre-defined macros using the `-undef'
command-line option.


File: pnettools.info,  Node: Pre-processor Syntax,  Next: C Compiler,  Prev: Pre-defined Macros,  Up: Differences

Pre-processor syntax
====================

Slight implementation differences between `cscc' and other C# compilers
result in the following issues when using pre-processing features:

   * Multi-line comments using `/*' and `*/' do not have to end on the
     same line.  The C# standard disallows the following:

          #if DEBUG /* multi-line comment on
          multiple lines */
              ...
          #endif

     Early C# compilers from other vendors did not allow `/*' style
     comments on pre-processor lines at all, so programmers who are
     writing portable code should always use `//' style comments on
     pre-processor lines.

   * `#define' and `#undef' directives can appear anywhere in the input
     source.  The C# standard disallows these directives after the
     first line of real code.  e.g.

          #define A
          namespace N
          {
              #define B
              #if B
              class Class1 {}
              #endif
          }

     The `cscc' compiler will accept this input.

   * In the C# standard, comments within excluded blocks are not
     processed.  The following will be parsed correctly if `DEBUG' is
     defined:

          #if DEBUG
              CheckConsistency();
          #else
              /* Do something else
          #endif

     The `cscc' compiler will report an error because the `#if' does
     not have a matching `#endif'.

   * `#region' and `#endregion' directives are ignored.  Unmatched
     region directives will not cause an error.


File: pnettools.info,  Node: C Compiler,  Next: Hello World,  Prev: Pre-processor Syntax,  Up: Top

C Compiler
**********

This section of the documentation describes the Portable.NET C
compiler.  We describe how to use it, the definitions that you may
expect to be in the language and library, and extensions that we have
added to ease integration with C# code.

   As much as possible, we try to present a standard ANSI C interface
to the programmer.  We did however have to make some implementation
decisions when adapting C to the CLI environment.  These decisions are
described in the sections that follow.

   Where we have borrowed syntax and semantics from other systems, we
tag them with [gcc], [Managed C++], or [C++], indicating the GNU C
compiler, Microsoft's Managed Extensions for C++, and ANSI standard C++
respectively.  We reserve [pnet] to tag features that are unique to our
implementation.

* Menu:

* Hello World::                Writing and compiling "Hello World" in C
* C# keywords::                Using C# keywords in C
* Referring to C# types::      Referring to C# types from C code
* Primitive types::            Primitive types that may be used in C
* String literals::            Wide and object string literals in C
* Setjmp and alloca::          Restrictions on using setjmp and alloca
* Typeof operator::            Getting the type of values in C
* Boxing and unboxing::        Boxing and unboxing values in C
* Labels as values::           Using goto labels as values in functions
* Reference parameters::       Passing values by reference to functions
* Thread-specific variables::  Declaring thread-specific variables
* PInvoke importing::          Importing external functions via PInvoke
* Calling C from C#::          Calling C code from C#
* Other keywords::             Other keywords in the C compiler


File: pnettools.info,  Node: Hello World,  Next: Primitive types,  Prev: C Compiler,  Up: C Compiler

Writing and compiling "Hello World" in C
========================================

The traditional "Hello World" program in C is as follows:

     #include <stdio.h>
     
     int main(int argc, char *argv[])
     {
         printf("Hello World!\n");
         return 0;
     }

   To compile and run this with Portable.NET, you would use the
following commands:

     $ cscc -o hello.exe hello.c
     $ ilrun hello.exe
     Hello World!
     $ _

   The output of the C compiler is a pure IL binary, just as for the C#
compiler.

   Note: you will need to install the `pnetC' package to compile and
run C programs.


File: pnettools.info,  Node: Primitive types,  Next: C# keywords,  Prev: Hello World,  Up: C Compiler

Primitive types that may be used in C
=====================================

Type                      Size    Description
`void'                    1       The void type.  [gcc] The size is 1 to
                                  be consistent with gcc.
`_Bool'                   1       [C++] 8-bit boolean value, which is
                                  identical to the C# `bool' type.
`char'                    1       Signed 8-bit integer type.
`unsigned char'           1       Unsigned 8-bit integer type.
`short'                   2       Signed 16-bit integer type.
`unsigned short'          2       Unsigned 16-bit integer type.
`__wchar__'               2       [pnet] 16-bit wide character type,
                                  which is identical to the C# `char'
                                  type.
`int'                     4       Signed 32-bit integer type.
`unsigned int'            4       Unsigned 32-bit integer type.
`long'                    4/8     Signed 32-bit or 64-bit integer type.
`unsigned long'           4/8     Unsigned 32-bit or 64-bit integer type.
`long long'               8       Signed 64-bit integer type.
`unsigned long long'      8       Unsigned 64-bit integer type.
`__int64'                 8       [Managed C++] Same as `long long'.
`unsigned __int64'        8       [Managed C++] Same as `unsigned long
                                  long'.
`float'                   4       32-bit IEEE floating point type.
`double'                  8       64-bit IEEE floating point type.
`long double'             8       Same as `double'.
`type *'                  4/8     Pointer to `type'.

The size of the long and pointer types may be either 32-bit or 64-bit,
depending upon the particular runtime engine that is used to execute
the application.  The expressions `sizeof(long)' and `sizeof(type *)'
are constant, but computed at runtime.

   You normally wouldn't use the `__wchar__' type directly.  Instead,
`#include <wchar.h>' and use the `wchar_t' type.

   You should `#include <stdbool.h>' to get the `bool' type and the
constants `true' and `false'.  Internally, `bool' is defined to `_Bool'.


File: pnettools.info,  Node: C# keywords,  Next: Referring to C# types,  Prev: Primitive types,  Up: C Compiler

Using C# keywords in C
======================

[pnet] The keywords `__catch__', `__checked__', `__false__',
`__finally__', `__lock__', `__null__', `__true__', `__try__', and
`__unchecked__' fulfill the same functions as their C# counterparts.

[Managed C++] The keyword `__finally' can be used in place of
`__finally__'.

   The keywords are quoted to prevent clashes with normal C identifiers.
The `<csharp.h>' file can be included to define these keywords to
friendlier versions without the underscores, to make it easier to
interface to C# code.


File: pnettools.info,  Node: Referring to C# types,  Next: String literals,  Prev: C# keywords,  Up: C Compiler

Referring to C# types from C code
=================================

[C++] A C# namespace can be imported with the `__using__ __namespace__'
construct:

     __using__ __namespace__ System;
     __using__ __namespace__ System::IO;
     __using__ __namespace__ System::Collections;

   The above lines result in all C# types in the `System', `System.IO',
and `System.Collections' namespaces being imported into the global
scope.  Alternatively, you can include the `<csharp.h>' file and then
write the above as follows (the `System' namespace is imported by the
header file and so doesn't appear here):

     #include <csharp.h>
     
     using namespace System::IO;
     using namespace System::Collections;

   Once you have imported the namespaces you want, you can refer to C#
types in your code as though they were C types.

     String *hello = "Hello World!";
     Object *obj;
     Int32 ivalue;

[Managed C++] Note that reference types are followed by `*', whereas
value types can be named directly.  This is for compatibility with
existing Managed C++ code.

   Types can also be imported individually if you don't wish to import
an entire namespace:

     __using__ System::Text::StringBuilder;
     
     StringBuilder *builder;

[Managed C++] By default, only `mscorlib.dll' is loaded when a C
program is compiled.  You can load other assemblies with the `#using'
pre-processor directive:

     #include <csharp.h>
     #using <System.Xml.dll>
     
     using namespace System::Xml;

   For convenience, we have provided header files for all of the major
C# assemblies which import their namespaces.  The following example
imports all definitions in `System.dll', `System.Xml.dll' and
`System.Windows.Forms.dll' into the global scope:

     #include <assembly/System.h>
     #include <assembly/System.Xml.h>
     #include <assembly/System.Windows.Forms.h>


File: pnettools.info,  Node: String literals,  Next: Setjmp and alloca,  Prev: Referring to C# types,  Up: C Compiler

Wide and object string literals in C
====================================

String literals follow the usual ANSI C syntax; i.e. a sequence of
characters and escape sequences delimited by double quotes:

     char *x = "Hello World!";

[gcc, Managed C++] Wide string literals, that contain 16-bit Unicode
characters can be specified using a "L" or "l" prefix:

     wchar_t *x = L"Hello World!";
     wchar_t *y = l"And Then Goodbye!";

[Managed C++] If you know that you want a C# string object, you can use
the "S" or "s" prefix on the literal:

     #include <csharp.h>
     
     String *x = S"Hello World!";
     String *y = s"And Then Goodbye!";

   If a normal or wide string literal is used in a context where a C#
string object is expected, it will be implicitly converted.


File: pnettools.info,  Node: Setjmp and alloca,  Next: Typeof operator,  Prev: String literals,  Up: C Compiler

Restrictions on using setjmp and alloca
=======================================

Because of the way that our C compiler builds programs, the `setjmp'
and `alloca' constructs must be used carefully.  In particular, they
must be used at the outermost "statement level" of an expression.  The
following code is correct:

     jmp_buf env;
     
     if(setjmp(env) != 0)
     {
         /* longjmp occurred */
     }

But the following code will give an error when compiled:

     jmp_buf env;
     
     if((1 + setjmp(env)) != 1)
     {
         /* longjmp occurred */
     }

   This is because the `setjmp' does not occur at the outermost level
of the expression (the value 1 is stored on the stack temporarily,
pending the addition operation).  The `alloca' construct has a similar
issue.  If you get such an error, you can split up your code to avoid
the problem:

     jmp_buf env;
     int result;
     
     result = setjmp(env);
     if((1 + result) != 1)
     {
         /* longjmp occurred */
     }

   The variable that you assign to will normally need to be a local
variable, global variable, or parameter.  Other kinds of variables
(e.g. array elements) will change the expression level and so cannot be
used.

   The restriction is imposed by the way that CLR's execute `setjmp'
and `alloca' internally.  Since most C programmers already use these
constructs at the statement level of an expression, this restriction is
not expected to affect much existing code.


File: pnettools.info,  Node: Typeof operator,  Next: Boxing and unboxing,  Prev: Setjmp and alloca,  Up: C Compiler

Getting the type of values in C
===============================

[gcc] The `typeof' operator can be used in any context where a C type
is expected:

     int x;
     typeof(x) y;

   The `typeof' operator in C is not the same as the `typeof' operator
in C#.  For that, you need to use the `__typeof' operator [Managed C++]:

     System::Type *t = __typeof(obj);


File: pnettools.info,  Node: Boxing and unboxing,  Next: Labels as values,  Prev: Typeof operator,  Up: C Compiler

Boxing and unboxing values in C
===============================

[Managed C++] A value can be boxed into an object using the `__box
(Expression)' operator.  If the expression is already a reference type
(e.g. a C# class or array reference), then it will be left unchanged.

     System::Object o = __box(3);  // Boxed object is of type "System::Int32".
     o = __box("Hello");           // No change - already a reference.

[Managed C++] The `__box' keyword can also be used to modify a value
type to convert it into its class form:

     __box int x;
     __box struct y z;

[pnet] An explicit C cast operation can be used to unbox a value:

     System::Object o = __box(6);
     int x = (int)o;               // x will be set to the value 6.


File: pnettools.info,  Node: Labels as values,  Next: Reference parameters,  Prev: Boxing and unboxing,  Up: C Compiler

Using goto labels as values in functions
========================================

[gcc] The address of a goto label can be obtained using the construct
`&&label', and then jumped to using `goto *value'.

   Because IL does not support taking the raw address of an instruction,
our compiler turns the `goto *' statement into a `switch' on the label
value.


File: pnettools.info,  Node: Reference parameters,  Next: Thread-specific variables,  Prev: Labels as values,  Up: C Compiler

Passing values by reference to functions
========================================

[C++] Parameters to functions can be passed by reference, rather than
value, using the `&' designator:

     void func(int& x)
     {
         x = 3;
     }
     
     int i;
     func(i);

   This syntax was borrowed from C++ because of the need to interact
with C# methods that have `ref' and `out' parameters.


File: pnettools.info,  Node: Thread-specific variables,  Next: PInvoke importing,  Prev: Reference parameters,  Up: C Compiler

Declaring thread-specific variables
===================================

[Managed C++] A global or static variable can be declared as
thread-specific by using the `__declspec(thread)' storage class
specifier:

     int __declspec(thread) xyzzy;

   This construct causes the C compiler to tag the variable with the
`[ThreadStatic]' custom attribute.  The runtime engine will then
automatically allocate a thread-specific slot for the variable.

   This is the only use of the `__declspec' keyword that is supported
by our compiler at present.  All other arguments (e.g. `dllimport',
`dllexport', `naked', etc) are ignored.


File: pnettools.info,  Node: PInvoke importing,  Next: Calling C from C#,  Prev: Thread-specific variables,  Up: C Compiler

Importing functions via PInvoke
===============================

Native functions may be imported via PInvoke using function attributes.
For example:

     extern int getpid(void) __attribute__((pinvoke("libc.so.6"), cdecl));

The following attributes may be present:

`pinvoke(LIB)'
     Specify that the function is imported via PInvoke from the
     specified native library.  The argument must be a string.

`name(STR)'
     Specify the raw name of the function in the library, if it is
     different from the declared name of the function.  The argument
     must be a string.

`ansi'
`unicode'
`auto'
     Specify the string marshalling conventions.

`winapi'
`cdecl'
`stdcall'
`thiscall'
`fastcall'
     Specify the calling conventions.  The default is `cdecl'.

`nomangle'
     Corresponds to the `ExactSpelling' property in
     `DllImportAttribute'.

`preservesig'
     Corresponds to the `PreserveSig' property in `DllImportAttribute'.

`lasterr'
     Corresponds to the `SetLastError' property in `DllImportAttribute'.

   The `__attribute__' keyword is adapted from gcc, but the actual
attribute names are unique to our compiler.  The attribute names can
also be specified with leading and trailing underscores (e.g.
`__pinvoke__', `__cdecl__', etc).


File: pnettools.info,  Node: Calling C from C#,  Next: Other keywords,  Prev: PInvoke importing,  Up: C Compiler

Calling C code from C#
======================

If the C function is in a library assembly, then you can access it as
though it was a regular C# method.  For example, the following program
will sleep for five seconds:

     public class Sleeper
     {
         public static void Main()
         {
             libc.sleep(5);
         }
     }

   All of the public functions and global variables for a library called
`libABC.dll' will be contained in a class called `libABC'.


File: pnettools.info,  Node: Other keywords,  Next: Documentation,  Prev: Calling C from C#,  Up: C Compiler

Other keywords in the C compiler
================================

[gcc] `__asm__', `__const__', `__inline__', `__signed__', `__typeof__',
and `__volatile__' can be used in place of their counterparts that lack
underscores.  This is for compatibility with GNU C library headers.

[gcc] The `__FUNCTION__', `__PRETTY_FUNCTION__', and `__func__'
keywords can be used to get the name of the current function in various
forms as a string.

[gcc] The `__attribute__' keyword is used to define function and
variable attributes.  Attributes that are not recognized are ignored.

[pnet] The `__unsigned_int__' keyword is used internally and may be
removed in a future version of the C compiler.


File: pnettools.info,  Node: Documentation,  Next: Documentation Sections,  Prev: Other keywords,  Up: Top

Documentation tools
*******************

The C# programming language supports embedded documentation in the form
of XML elements.  Such documentation can be added to types, methods,
fields, and other program items using the `///' commenting convention.
For example:

     /// <summary>
     /// Compute the n'th Fibonacci number.
     /// </summary>
     ///
     /// <param name="n">
     /// The index of the Fibonacci number to return.
     /// </param>
     ///
     /// <returns>
     /// The Fibonacci number which corresponds to
     /// <paramref name="n"/> in the sequence, where
     /// <c>fib(0) = 0</c> and <c>fib(1) = 1</c>.
     /// </returns>
     public static int fib(int n)
     {
         ...
     }

   To process documentation, the `csdoc' program is used to extract the
program structure and documentation comments.  The output is an XML
file.

   This XML file is then fed into another program to produce the
desired output format.  One such program, `csdoc2html', converts the
XML file into a collection of HTML files which can be viewed using a
standard Web browser.

   Another such program, `csdoc2texi', converts the XML file into
texinfo, from which online or printed manuals can be derived.

   A third program, `csdoc2hier', converts the XML file into a tree
hierarchy diagram of all types in the input.

* Menu:

* Documentation Sections::  XML tags used for documentation sections
* Documentation Markup::    XML tags used for marking up text
* Cross-References::        Specifying cross-references in XML tags
* csdoc invocation::        Invoking csdoc
* csdoc2html invocation::   Invoking csdoc2html
* csdoc2texi invocation::   Invoking csdoc2texi
* csdoc2hier invocation::   Invoking csdoc2hier


File: pnettools.info,  Node: Documentation Sections,  Next: Documentation Markup,  Prev: Documentation,  Up: Documentation

Documentation sections
======================

The following XML element tags are used to describe the major features
of a program item in separate sections:

`<summary> ... </summary>'
     Specify the summarised description for the current program item.

`<remarks> ... </remarks>'
     Specify the detailed description for the current program item.

`<param name="NAME"> ... </param>'
     Describe a particular method parameter.

`<returns> ... </returns>'
     Describe the value that is returned from a method.

`<value> ... </value>'
     Describe the value of a property.

`<exception cref="CREF"> ... </exception>'
     The text describes an exception that is thrown during the
     processing of the current program item.  The name of the exception
     is specified by `CREF'.

`<seealso cref="CREF"/>'
`<seealso topic="TOPIC"/>'
     Specify an item or topic to be added to the "See Also" section of
     a program item's documentation.

`<example> ... </example>'
     Specify the text of an example for the current program item.

`<overload> ... </overload>'
     Provides a description to use when a method is overloaded.  Some
     documentation systems group all of the variants of a method in the
     same section, with specific variant in sub-sections.  The
     `<overload>' element provides the description to use in the main
     section, and will normally be identical for all variants.

`<devdoc> ... </devdoc>'
     Provides supplemental documentation for developers.

`<altcompliant cref="CREF"/>'
     Describes an alternative program item that should be used instead
     of the current item in CLS-compliant applications.  `CREF' is a
     cross-reference string that describes the alternative.

`<altmember cref="CREF"/>'
     Specifies an alternative that can be used in place of this member.

`<internalonly/>'
     Marks a program item that is intended for internal use by the
     assembly that contains the item, and is not normally intended to
     be used directly by other developers.

     This may be used on methods that override a virtual method from a
     parent class to indicate that the parent class method is the
     primary entry point for developers.

`<nodoc/>'
     Indicate that this program item should be ignored when processed
     with conversion programs such as `csdoc2texi'.

`<permission cref="CREF"> ... </permission>'
     Specifies a security permission that the program item must have to
     be executed.

`<platnote platform="PLATFORM"> ... </platnote>'
     Specify a note that only applies to a specific platform.

`<threadsafe> ... </threadsafe>'
     Specify text that describes the thread-safety (or otherwise) of the
     program item.


File: pnettools.info,  Node: Documentation Markup,  Next: Cross-References,  Prev: Documentation Sections,  Up: Documentation

Documentation markup
====================

The following XML element tags are used within the body of the above
elements to mark up the text:

`<b> ... </b>'
     Format the text between `<b>' and `</b>' in a bold font.

`<block subset="SUBSET" type="TYPE"> ... </block>'
     Normally used inside a `<para>' element to indicate a block of
     text that is distinguished from the other text as some for of note.
     Optionally, an implementation subset may be specified.

     Typical values for `SUBSET' are `none' and `ECMAOnly'.  The
     typical value for `TYPE' is `note'.

     Note blocks are typically formatted as [Note: ...].  If the subset
     is something other than `none', then it will also be shown.  For
     example, [Note (ECMAOnly): ...].

`<c> ... </c>'
     Format the text between `<c>' and `</c>' in a fixed-width font
     that is suitable for displaying code or program output.  The
     normal formatting rules apply, in that paragraphs and line breaks
     must be explicitly marked.

`<code lang="LANG"> ... </code>'
     Format the text between `<code>' and `</code>' in a fixed-width
     font that is suitable for displaying code or program output.  End
     of line sequences within the text are treated as hard line breaks.
     The `LANG' value indicates that the text is an example in a
     specific programming language.  `LANG' is usually `C#'.

`<list type="LTYPE"> ... </list>'
     Format a list of terms and descriptions according to `LTYPE'.
     Valid types are `bullet', `number', and `table'.

`<item> ... </item>'
     Describe an item within a `<list>' element.

`<listheader> ... </listheader>'
     An alternative to `<item>' that is used to describe the headers
     for a `table' list.

`<term> ... </term>'
     Mark the text that indicates a term within an `<item>' element.
     This is only needed for definition lists.

`<description> ... </description>'
     Mark the text that is describing a term within an `<item>' element.

`<i> ... </i>'
     Format the text between `<i>' and `</i>' in an italicized font.

`<note type="TYPE"> ... <note>'
     An alternative way to write `<block subset="none" type="TYPE"> ...
     </block>'.

`<para> ... </para>'
     Mark the start and end of a paragraph within a documentation block.

`<paramref name="NAME"/>'
     Refer to a parameter within a documentation block.  The name may
     be formatted in an alternative font.

`<see cref="CREF"/>'
     Insert a link at the current point in the documentation to the
     program item referred to by `CREF'.  This is used inline within a
     documentation block.

`<see langword="WORD"/>'
     Insert a reference to a keyword called `WORD' in the C# language.
     The keyword will normally be output using the same font as
     `<code>'.

`<sub> ... </sub>'
     Format the text between `<sub>' and `</sub>' in a subscript font.

`<sup> ... </sup>'
     Format the text between `<sup>' and `</sup>' in a superscript font.

`<subscript term="TERM"/>'
     An alternative way of specifying `<sub>TERM</sub>'.

`<superscript term="TERM"/>'
     An alternative way of specifying `<sup>TERM</sup>'.


File: pnettools.info,  Node: Cross-References,  Next: csdoc invocation,  Prev: Documentation Markup,  Up: Documentation

Documentation cross-references
==============================

Cross-reference prefixes:

`E:'
     The prefix is followed by the fully-qualified name of an event.

`F:'
     The prefix is followed by the fully-qualified name of a field.

`M:'
     The prefix is followed by the fully-qualified name of a method.

`P:'
     The prefix is followed by the fully-qualified name of a property.

`T:'
     The prefix is followed by the fully-qualified name of a type.

`!:'
     The prefix is followed by an error string, which resulted because
     the cross-reference could not be resolved.


File: pnettools.info,  Node: csdoc invocation,  Next: csdoc2html invocation,  Prev: Cross-References,  Up: Documentation

Invoking csdoc
==============

The general form of the csdoc syntax is as follows:

     csdoc [OPTIONS] INPUT.cs ...

   Csdoc reads the supplied C# source files, and writes XML data to the
file specified by the `-o' option, or to standard output if `-o' is not
supplied.

   The supplied source files are parsed and processed using the first
phases of semantic analysis.  Thus, the source should be valid C#, or a
compilation error may occur.  Csdoc will not generate assembly or
object code output.

   The csdoc command-line accepts all of the options that may be
supplied to cscc.  *Note Option Summary::, for more information on cscc
options.  In addition, the following options have special significance
to csdoc:

`-o FILE'
     Specify the name of the file to write the XML output to.  The
     default is standard output.  Specifying `-o -' will also write the
     XML to standard output.

`-fprivate'
     By default, csdoc will only write public types and members to the
     XML output.  Specifying `-fprivate' will force csdoc to also
     include private types and members.

`-flibrary-name=NAME'
     Specify the library name to use for the types in the XML output
     file.  By default, no library name is used.

   The exit status is 1 if an error occurred while processing the input.
Otherwise the exit status is 0.

   When the input source is compiled, the symbol `__DOC__' will be
defined.  The programmer can use this to determine if the program is
being compiled by cscc, or converted into documentation using csdoc.


File: pnettools.info,  Node: csdoc2html invocation,  Next: csdoc2texi invocation,  Prev: csdoc invocation,  Up: Documentation

Invoking csdoc2html
===================

The general form of the csdoc2html syntax is as follows:

     csdoc2html [OPTIONS] INPUT.xml ...

   Csdoc2html reads the supplied XML input files, and converts them into
a collection of HTML files.  This collection can be viewed using a
standard Web browser.

   Specifying multiple input files is exactly the same as specifying
one input file which is the concatenation of all of the files.  Only
one output collection is created.  Csdoc2html must be invoked multiple
times to convert multiple input files into multiple output collections.

`-o PATH'
`--output PATH'
     In multi-file mode, this option specifies the name of the directory
     to write the HTML output to.  The default is the current directory.

     In single-file mode, this option specifies the name of the file to
     write the HTML output to.  The default is `INPUT.html'.  If there
     are multiple input files, then the name of the output file is
     based on the name of the first input file.  If the first input
     file is `-', then the output is written to standard output.  If
     `PATH' is `-', then the output is written to standard output.

`-fsingle-file'
     Write all HTML data to a single output file, rather than splitting
     the data across multiple files.

`-fmulti-file'
     Split the HTML data across multiple output files.  The file
     `index.html' in the output directory is the main entry point to
     browse the collection.  This is the default.

`-fframes'
     Use HTML frames when writing the output data in multi-file mode.
     This is the default.

`-fno-frames'
     Do not use HTML frames when writing the output data in multi-file
     mode.

`-fcombine-members'
     Combine the documentation for type members into the same output
     file as the type itself.  This is the default.

`-fseparate-members'
     Separate the documentation for type members into distinct output
     files.

`-fnamespace-directories'
     Write the contents of each namespace into a separate sub-directory.
     This is the default.

`-fno-namespace-directories'
     Write the contents of all namespaces into the primary output
     directory, and do not create any sub-directories.

`-ftitle=TITLE'
     Specify the title to use for the collection.  The default is the
     same as the first input filename.

`-fpage-color=COLOR'
     Specify the HTML color value to use for the background of pages.
     The default is `#FFFFFF'.

`-fdefn-color=COLOR'
     Specify the HTML color value to use for the background of type and
     member definitions.  The default is `#C0C0C0'.

`-fheader-color=COLOR'
     Specify the HTML color value to use for the background of table
     headers.  The default is `#C0C0C0'.

`--help'
     Print a usage message for the csdoc2html program.

`-v'
`--version'
     Print the version of the csdoc2html program.

`--'
     Marks the end of the command-line options, and the beginning of
     the input filenames.  You may need to use this if your filename
     begins with `-'.  e.g. `csdoc2html -- -input.xml'.  This is not
     needed if the input is stdin: `csdoc2html -' is perfectly valid.

   The exit status is 1 if an error occurred while processing the input.
Otherwise the exit status is 0.

   The simplest way to use this program is as follows:

     csdoc -o program.xml program.cs
     mkdir temp
     csdoc2html -o temp program.xml

   This will write a collection of HTML files to the `temp' directory
that describes all of the types and members in the `program.cs' source
file.


File: pnettools.info,  Node: csdoc2texi invocation,  Next: csdoc2hier invocation,  Prev: csdoc2html invocation,  Up: Documentation

Invoking csdoc2texi
===================

The general form of the csdoc2texi syntax is as follows:

     csdoc2texi [OPTIONS] INPUT.xml ...

   Csdoc2texi reads the supplied XML input files, and converts them into
texinfo.

   Specifying multiple input files is exactly the same as specifying
one input file which is the concatenation of all of the files.  Only
one output file is created.  Csdoc2texi must be invoked multiple times
to convert multiple input files into multiple output files.

`-o FILE'
`--output FILE'
     Specify the name of the file to write the texinfo output to.  The
     default is `INPUT.texi'.  If there are multiple input files, then
     the name of the output file is based on the name of the first
     input file.  If the first input file is `-', then the output is
     written to standard output.  If `FILE' is `-', then the output is
     written to standard output.

`-fstandalone'
     Make a stand-alone texinfo document that includes headers, a title
     page, and an index.  This is the default.

`-fembedded'
     Make an embedded texinfo document.  Use this if you wish to
     incorporate the texinfo output into a larger document.

`-fparent=NAME'
     Specify the name of the parent node for an embedded document.  The
     default value is `Top'.  This option is ignored in stand-alone
     documents.

`-ffilename=NAME'
     Specify the value for `@setfilename'.  The default is the same as
     the first input file with the extension changed to `.info'.  If
     the first input file is standard input, then the default value is
     `stdout.info'.  This option is ignored in embedded documents.

`-ftitle=TITLE'
     Specify the title to use for the document.  The default is the
     same as `-ffilename'.  This option is ignored in embedded
     documents.

`-fdescription=DESC'
     Specify the description to use in the info header of the document.
     The default is the same as `-ftitle'.  This option is ignored in
     embedded documents.

`-fchapternewpage=VALUE'
     Specify the value for `@setchapternewpage'.  The default value is
     `on'.  Valid values are `on', `off', or `odd'.  This option is
     ignored in embedded documents.

`-fcopyright=MSG'
     Specify the Copyright message to use for the document.  The default
     is no Copyright message.  This option is ignored in embedded
     documents.

`-findex'
     Include an index chapter in the output.  This is the default in
     stand-alone documents.

`-fno-index'
     Do not include an index chapter in the output.  This is the
     default in embedded documents.

`-fnewpage'
     Use a new page for each type member description.  This is the
     default.

`-fno-newpage'
     Do not use a new page for each type member description.

`--help'
     Print a usage message for the csdoc2texi program.

`-v'
`--version'
     Print the version of the csdoc2texi program.

`--'
     Marks the end of the command-line options, and the beginning of
     the input filenames.  You may need to use this if your filename
     begins with `-'.  e.g. `csdoc2texi -- -input.xml'.  This is not
     needed if the input is stdin: `csdoc2texi -' is perfectly valid.

   The exit status is 1 if an error occurred while processing the input.
Otherwise the exit status is 0.

   The texinfo output is arranged so that each namespace is placed in
its own chapter, with types in sections, and members in sub-sections.
Types in the global namespace are placed in a chapter entitled _Global
Namespace_.

   This arrangement can be modified by creating an embedded document,
including it into another document, and using `@lowersections' to
adjust the section nesting level.

   The following is an example of converting C# source code into online
HTML documentation, by way of csdoc2texi:

     csdoc -o program.xml program.cs
     csdoc2texi program.xml
     texi2html -split_node program.texi

   This produces a different output than csdoc2html, which may be useful
in some circumstances.  A better example is converting C# source code
into PDF documentation:

     csdoc -o program.xml program.cs
     csdoc2texi program.xml
     texi2dvi --pdf program.texi

   This assumes that you have `texi2dvi' and `pdftex' installed on your
system.  The resulting file, `program.pdf', can be viewed or printed
with the usual PDF tools.


File: pnettools.info,  Node: csdoc2hier invocation,  Next: Build Management,  Prev: csdoc2texi invocation,  Up: Documentation

Invoking csdoc2hier
===================

The general form of the csdoc2hier syntax is as follows:

     csdoc2hier [OPTIONS] INPUT.xml ...

   Csdoc2hier reads the supplied XML input files, and converts them into
a textual diagram of the type hierarchy.

   Specifying multiple input files is exactly the same as specifying
one input file which is the concatenation of all of the files.  Only
one output file is created.  Csdoc2hier must be invoked multiple times
to convert multiple input files into multiple output files.

`-o FILE'
`--output FILE'
     Specify the name of the file to write the output to.  The default
     is standard output.  If `FILE' is `-', then the output is also
     written to standard output.

`-fby-library'
     Organise the output by library.

`--help'
     Print a usage message for the csdoc2hier program.

`-v'
`--version'
     Print the version of the csdoc2hier program.

`--'
     Marks the end of the command-line options, and the beginning of
     the input filenames.  You may need to use this if your filename
     begins with `-'.  e.g. `csdoc2hier -- -input.xml'.  This is not
     needed if the input is stdin: `csdoc2hier -' is perfectly valid.

   The exit status is 1 if an error occurred while processing the input.
Otherwise the exit status is 0.


File: pnettools.info,  Node: Build Management,  Next: csant invocation,  Prev: csdoc2hier invocation,  Up: Top

Build management with csant
***************************

Csant is an XML based build tool used mainly to compile C# projects.
Csant supports multiple compilers and generates appropriate command line
specifications for each compiler.

* Menu:

* csant invocation::          Invoking csant
* Build file syntax::         Syntax of XML build files
* Compile tag::               Syntax of the <compile> tag
* Builtin build properties::  Builtin build properties
* Creating profiles::         Creating profiles to modify a build


File: pnettools.info,  Node: csant invocation,  Next: Build file syntax,  Prev: Build Management,  Up: Build Management

Invoking csant
**************

The general form of the csant syntax is as follows:

     csant [OPTIONS] [TARGET ...]

   The tool builds each of the specified targets.  If no target is
specified, then the default is obtained from the `<project>' tag in the
build file.

`-f FILE'
`--file FILE'
     Specify the name of the build file to use.  If this option is not
     present, then csant will look for a file in the base source
     directory ending with the extension `.csant' or `.build'.

`-b DIR'
`--base-src-dir DIR'
     Specify the base source directory for the build tree.  By default,
     this is the current directory.

`-B DIR'
`--base-build-dir DIR'
     Specify the base build directory for the build tree.  By default,
     this is the current directory.

`-D NAME=VALUE'
`--define NAME=VALUE'
     Define the property NAME and set it to VALUE.

`-p FILE'
`--profile FILE'
     Specify the definition profile to use.  The definition profile is
     loaded before the main build file, and typically modifies
     properties.  This can be used to create multiple build
     configurations.

`-n'
`--just-print'
     Print the names of the commands, but do not execute them.

`-d'
`--dummy-doc'
     Output dummy documentation files.

`-k'
`--keep-going'
     Keep processing even after an error.

`-s'
`--silent'
     Do not print the names of commands as they are executed.

`-c'
`--csc-redirect'
     Treat `<csc>' tags as `<compile>' tags (for NAnt compatibility).

`-m'
`--mono-corlib'
     Use Mono's corlib instead of mscorlib during C# compiles.

`-C NAME'
`--compiler NAME'
     Specify which compiler to use (`cscc' (default), `csc', or `mcs').
     Whenever csant encounters a `<compile>' tag, it will launch the
     specified compiler, using the appropriate command-line options.

`-v'
`--version'
     Print the version of the program.

`--help'
     Print the program's help message.


File: pnettools.info,  Node: Build file syntax,  Next: Compile tag,  Prev: csant invocation,  Up: Build Management

Syntax of XML build files
*************************

`<project name="NAME" default="TARGET" ...>'
     This must be the top-level tag in the build file.  It defines the
     `NAME' of the project, and the default `TARGET' to use if one
     wasn't specified on the csant command-line.

     If `TARGET' is not specified, then only those targets that are
     specified on the command-line will be built.

     The `srcdir' attribute can be supplied to specify the base source
     directory.  The `--base-src-dir' command-line option will always
     override this attribute value.  The default is the current
     directory.

     The `builddir' attribute can be supplied to specify the base build
     directory.  The `--base-build-dir' command-line option will always
     override this attribute value.  The default is the current
     directory.

`<target name="NAME" depends="DEPENDS">'
     This tag appears as a child of the `<project>' tag.  It specifies
     a single build target called `NAME'.  Optionally, a dependent
     target may be specified using the `depends' attribute.  The
     dependent target will be built before this target.

`<compile output="OUTPUT" ...>'
     Launch the compiler on a group of source files to create the
     specified `OUTPUT' file.  The compiler that is launched is
     specified using the `--compiler' command-line option.  *Note
     Compile tag::, for more information.

`<cscc output="OUTPUT" ...>'
     This is a special version of `<compile>' that forces the use of
     the `cscc' compiler.  It is otherwise identical to `<compile>'.

`<csc output="OUTPUT" target="TYPE" ...>'
     This is a special version of `<compile>' that forces the use of
     the `csc' compiler.  The `target' attribute must be supplied, for
     backwards-compatibility with NAnt.  It is otherwise identical to
     `<compile>'.

     If the `--csc-redirect' option was supplied on the command-line,
     then the `<csc>' tag will be forced to act like `<compile>',
     including its handling of multiple compilers.  This behaviour
     allows pre-existing NAnt build files to be used with csant.

`<mcs output="OUTPUT" ...>'
     This is a special version of `<compile>' that forces the use of
     the `mcs' compiler.  It is otherwise identical to `<compile>'.

`<csdoc output="OUTPUT" ...>'
     This is a special version of `<compile>' that builds XML
     documentation using `csdoc', rather than building a binary.

     The `library' attribute indicates the name to put into the
     `<Library>' tag in the output file.  The `private' attribute
     should be set to `true' if you also wish to dump private class
     definitions.

     If the `--dummy-doc' option was supplied on the command-line, then
     the `<csdoc>' tag will generate a dummy output file rather than
     running `csdoc'.  This is intended for systems that do not have
     `csdoc' installed.

`<property name="NAME" value="VALUE"/>'
     Define a property called NAME and set it to VALUE.  If there is an
     existing property called NAME, then its value will be modified.

     Properties can also be set on the command-line using the `--define'
     option.

     Properties may appear in any attribute value in the build file
     using the syntax `${NAME}'.  For example, `${csant.build.dir}'
     will insert the name of the build directory.

     *Note Builtin build properties::, for a list of standard builtin
     properties.

`<echo message="MSG"/>'
     Echo the message, MSG, to standard output.

`<fail message="MSG"/>'
     Echo the message, MSG, to standard output, and then fail the build.

`<delete file="FILE" [failonerror="FLAG"]/>'
     Delete the specified FILE, which is interpreted relative to the
     build directory.

     If `failonerror' is `false' (the default), then the build will
     continue normally if the file does not exist.  If `failonerror' is
     `true', then the build will fail if the file does not exist.

`<mkdir dir="DIRECTORY"/>'
     Make the specified DIRECTORY.  Does nothing if the directory
     already exists.  The DIRECTORY is interpreted relative to the
     build directory.

`<copy file="FROM" tofile="TO"/>'
     Copy the file at FROM to the pathname TO.  Both pathnames are
     interpreted relative to the build directory.

`<csant buildfile="FILE" [target="TARGET"] [basedir="DIR"]/>'
     Launch a copy of `csant' using the build file specified by FILE.
     This is typically used to build the contents of sub-directories.

     If `target' is supplied, it indicates the target to build instead
     of the default target for the new build file.

     If `basedir' is supplied, then it is used to modify the source and
     build directories before passing them to the new instance.

`<nant buildfile="FILE" [target="TARGET"] [basedir="DIR"]/>'
     This is identical to the `<csant>' tag, and is provided for
     backwards compatibility with NAnt.

   The following is an example of defining a project with two targets,
`all' and `clean':

     <?xml version="1.0"?>
     <project name="Foobar" default="all">
         <target name="all">
             <compile output="foobar.dll">
                 <sources>
                     <includes name="**/*.cs"/>
                 </sources>
             </compile>
         </target>
     
         <target name="clean">
             <delete file="foobar.dll"/>
         </target>
     </project>

   Executing `csant' in the same directory as this project file will
build `foobar.dll'.  Executing `csant clean' in the directory will
delete the file.


File: pnettools.info,  Node: Compile tag,  Next: Builtin build properties,  Prev: Build file syntax,  Up: Build Management

Syntax of the <compile> tag
***************************

The `<compile>' tag may have the following attributes:

`output'
     The name of the output file to be built by this rule.  This
     attribute is mandatory.

`target'
     The type of target to be built.  Typical values are `library' and
     `exe'.  If this attribute is not supplied, then the default is
     determined from the extension on the output file.  This attribute
     is mandatory for the `<csc>' tag, for backwards-compatibility with
     NAnt.

`debug'
     Set to `true' or `false', and indicates if debug symbol information
     should be generated for the output binary.  The default is `false'.

`checked'
     Set to `true' or `false', and indicates if checked operations
     should be used by the C# compiler.  The default is `false'.

`unsafe'
     Set to `true' or `false', and indicates if unsafe operations
     should be used by the C# compiler.  The default is `false'.

`nostdlib'
     Set to `true' or `false', and indicates if the standard library,
     `mscorlib.dll', should be disabled.  The default is `false',
     indicating that the standard library should be used.

`optimize'
     Set to `true' or `false', and indicates if code optimizations
     should be used by the C# compiler.  The default is `false'.

`warnaserror'
     Set to `true' or `false', and indicates if compiler warnings
     should be treated as errors.  The default is `false'.

`define'
     A semi-colon separated list of macro symbols to define.  For
     example, `define="FOO;BAR"' will result in `-DFOO -DBAR' being
     passed to the compiler.  The `<define>' tag can also used to define
     macro symbols.

The following tags may be present as children of `<compile>':

`<define name="NAME" value="VALUE"/>'
     Define the macro symbol NAME if VALUE is set to `true'.
     Otherwise, do not define the macro symbol NAME.

     The set of macro definitions that are passed to the compiler will
     be augmented by the profile definitions.  *Note Creating
     profiles::, for more information on profiles.

`<arg [compiler="COMPILER"] value="VALUE"/>'
     Adds an argument to the compiler's command-line.  If `compiler' is
     present, then the argument will only be added if the specified
     compiler is in use.  This allows compiler-specific options to be
     passed when necessary.

`<sources [basedir="DIR"]>'
     Specify a set of source files for the build.  If `basedir' is
     present, then it is used to modify the source directory to find the
     source files.

     The `<includes name="SPEC" [if="COND"]/>' child tag is used to
     specify a group of files to include in the set.  For example,
     `*.cs' will include all files in the source directory that end in
     `.cs'.  To recurse into sub-directories, use a specification such
     as `**/*.cs'.

     The `<excludes name="SPEC" [if="COND"]/>' child tag is used to
     specify a group of files to exclude from the set, even if they
     would otherwise be included by an `<includes>' tag.

     The `<file name="NAME" [basedir="DIR"]/>' child tag is used to add
     a single file to the set.

     If the `if' attribute is present on either `<includes>' or
     `<excludes>', then it indicates a condition that must be satisfied
     for the tag to be processed.  Usually this condition is the name of
     a profile definition.  e.g. `<includes name="foo/*.cs"
     if="${FOO}"/>' will only include the contents of the `foo'
     directory if the `FOO' definition is set to `true'.

`<references [basedir="DIR"]>'
     Specify a set of library assemblies for the build.  If `basedir' is
     present, then it is used to modify the build directory to find the
     library assemblies.

`<resources [basedir="DIR"]>'
     Specify a set of resource files for the build.  If `basedir' is
     present, then it is used to modify the build directory to find the
     resource files.


File: pnettools.info,  Node: Builtin build properties,  Next: Creating profiles,  Prev: Compile tag,  Up: Build Management

Builtin build properties
************************

`csant.build.dir'
     The pathname of the build directory.

`csant.buildfile'
     The pathname for the build file.

`csant.compiler'
     The name of the compiler to use with `<compile>' tags.  The allowed
     values are `cscc' (default), `csc', and `mcs'.

`csant.project.name'
     The name of the project, from the top-level `<project>' tag.

`csant.src.dir'
     The pathname of the source directory.

`cscc'
     The pathname of the `cscc' compiler's executable.  If this is not
     set, then csant will try the `CSCC' environment variable.  If that
     is not set, then csant will search for `cscc' on the PATH.

`cscc.plugins.cs'
     The pathname of the C# plugin's executable.

`cscc.plugins.c'
     The pathname of the C plugin's executable.

`csc'
     The pathname of the `csc' compiler's executable.  If this is not
     set, then csant will try the `CSC' environment variable.  If that
     is not set, then csant will search for `csc' on the PATH.

`csdoc'
     The pathname of the `csdoc' executable.  If this is not set, then
     csant will try the `CSDOC' environment variable.  If that is not
     set, then csant will search for `csdoc' on the PATH.

`mcs'
     The pathname of the `mcs' compiler's executable.  If this is not
     set, then csant will try the `MCS' environment variable.  If that
     is not set, then csant will search for `mcs' on the PATH.

   In addition, the contents of the environment are placed into
properties whose names begin with `csant.env.'.  For example, the `HOME'
environment variable is available as `csant.env.HOME'.


File: pnettools.info,  Node: Creating profiles,  Next: Assembler,  Prev: Builtin build properties,  Up: Build Management

Creating profiles to modify a build
***********************************

Profile files can be used to modify the build process, supplying
different groups of options under different circumstances.  For
example, the following profile:

     <?xml version="1.0"?>
     <profile>
     <define name="FOO" value="true"/>
     <define name="BAR" value="true"/>
     </profile>

adds macro definitions to the C# compiler command-line:

     cscc -DFOO -DBAR ...

   An alternative profile might set `FOO' to `false' instead, to
disable the corresponding feature:

     <?xml version="1.0"?>
     <profile>
     <define name="FOO" value="false"/>
     <define name="BAR" value="true"/>
     </profile>

   The Portable.NET C# library uses this feature to define profiles for
various library configurations: `full', `ecma', `compact', etc.  But
its use is not limited to Portable.NET: any application can use
user-defined profiles.


File: pnettools.info,  Node: Assembler,  Next: ilasm invocation,  Prev: Creating profiles,  Up: Top

Intermediate language assembler
*******************************

Ilasm converts Intermediate Language (IL) assembly code input into an
IL object file (`.obj'), an IL executable (`.exe'), or an IL dynamic
link library (`.dll').

   You normally won't need to invoke ilasm directly, because it is
invoked automatically by the cscc compiler.  However, if you are
building your own compiler for the Portable.NET platform, then you may
need to invoke this program.

* Menu:

* ilasm invocation::        Invoking ilasm
* Assembler Syntax::        Introduction to the assembler syntax
* Lexical Tokens::          Lexical tokens syntax
* Helper Non-Terminals::    Non-terminals that help with syntax definition
* Top-Level Declarations::  Top-level assembler declarations
* Namespace Declarations::  Namespace declarations
* Class Declarations::      Class declarations
* Type Specifications::     Specifying types in field and method signatures
* Field Declarations::      Field declarations
* Method Declarations::     Method declarations
* Property Declarations::   Property declarations
* Event Declarations::      Event declarations
* Debug Information::       Inserting debug information into the output
* Custom Attributes::       Associating custom attributes with program items
* Assembly Declarations::   Assembly declarations
* Module Declarations::     Module declarations
* Other Declarations::      Other declarations


File: pnettools.info,  Node: ilasm invocation,  Next: Assembler Syntax,  Prev: Assembler,  Up: Assembler

Invoking ilasm
==============

The general form of the ilasm syntax is as follows:

     ilasm [OPTIONS] INPUT.il ...

   Ilasm reads the supplied input files, assembles them, and writes the
output to the file specified by the `-o' option, or to a default
filename derived from the name of the first input file.  If any of the
input filenames are `-', then the standard input stream will be used.
If `-' is specified multiple times, then standard input will be parsed
only once.

   Specifying multiple input files is exactly the same as specifying
one input file which is the concatenation of all of the files.  Only
one output file is created.  Ilasm must be invoked multiple times to
assemble multiple input files into multiple output files.

`-o FILE'
`--output FILE'
     Specify the name of the file to write the assembler output to.  The
     default is `INPUT.EXT' where `EXT' is one of `obj', `exe', or
     `dll', depending on the value of the `--format' option.  If there
     are multiple input files, then the name of the output file is
     based on the name of the first input file.  If the first input
     file is `-', then the output is written to standard output.  If
     `FILE' is `-', then the output is written to standard output.

`-j'
`--format obj'
     Write a `.obj' file as output, instead of an executable or dynamic
     link library.  This is the default value.

`-e'
`--format exe'
     Write an executable file as output, instead of a `.obj' file or
     dynamic link library.

`-d'
`--format dll'
     Write a dynamic link library file as output, instead of a `.obj'
     file or executable.

`-g'
`--debug'
     Enable the generation of debug symbol information to the output
     file.

`-n'
`--no-debug'
     Disable the generation of debug symbol information to the output
     file.  This is the default value.

`-s'
`-fshort-insns'
     Always use the shortest version of an instruction when creating the
     output.  Some instructions have multiple versions.  e.g. `br' and
     `br.s' for long and short versions of the branch instruction.  The
     assembler will attempt to "squash" the instructions to occupy as
     little space as possible.  This is the default value.

     When this option is in force, the compiler does not need to concern
     itself with choosing the most compact form of an instruction,
     because the assembler will do the work.  Long instructions will be
     converted into shorter versions whenever possible, and short
     instructions will be converted into longer versions if required.
     Compiler code generators can therefore be much simpler.

`-l'
`-fno-short-insns'
     Always use the stated version of an instruction when creating the
     output.  For example, `br' will always generate a 5-byte branch
     instruction, and `br.s' will always generate a 2-byte branch
     instruction.  If the branch is too long, then using `br.s' will
     result in an error.

     The only reason to use this is to ensure that the form of
     instruction that is output by the ildasm disassembler is the same
     as the form of instruction that was input to ilasm.  This may be
     helpful when attempting to diagnose compiler problems.

`-L NAME'
`-fstdlib-name=NAME'
     Change the name of the standard library to NAME.  The default
     value is "mscorlib".

`-J'
`-mjvm'
     Assemble to JVM bytecode instead of IL.

`-3'
`-m32bit-only'
     Tag the output file so that it can only be executed on 32-bit
     platforms.

`-c'
`-mcui-subsystem'
     Tag the output file so that it can run within the command-line
     subsystem under Windows.  This is the default.

`-G'
`-mgui-subsystem'
     Tag the output file so that it can run within the GUI subsystem
     under Windows.

`--help'
     Print a usage message for the ilasm program.

`-v'
`--version'
     Print the version of the ilasm program.

`--'
     Marks the end of the command-line options, and the beginning of
     the input filenames.  You may need to use this if your filename
     begins with `-'.  e.g. `ilasm -- -input.il'.  This is not needed
     if the input is stdin: `ilasm -' is perfectly valid.

   The exit status is 1 if an error occurred while processing the input.
Otherwise the exit status is 0.

   The parser is fairly unforgiving of errors and will bail out at the
first sign of trouble.  This is not expected to be a problem because
ilasm will normally be processing the output of a compiler such as
cscc.  Compilers are presumed to be aware of how to generate correct IL
assembly code.

   Ilasm uses the host's native C types `float' and `double' to handle
floating point numbers.  If the host does not have a strict IEEE
floating point implementation, then the values of floating point
constants may not be exactly what was expected.  The problem can be
avoided by using the raw bit forms, which are guaranteed to produce
exact IEEE-compliant values.


File: pnettools.info,  Node: Assembler Syntax,  Next: Lexical Tokens,  Prev: ilasm invocation,  Up: Assembler

Assembler Syntax
================

The following sections describe the syntax of the assembly code that is
input to ilasm.  The following BNF notations are used:

`A => B'
     The non-terminal `A' can be expanded to the sequence `B'.

`*name*'
     A lexical terminal keyword called `name'.  e.g. `*public*'.

`NAME'
     A lexical terminal symbol called `NAME', used to represent
     identifiers, numbers, strings, etc.

`{A}'
     Zero or more occurrences of `A'.

`(A)+'
     One or more occurrences of `A'.

`[A]'
     Zero or one occurrences of `A'.  i.e. `A' is optional.

`A | B'
     Either `A' or `B'.

`<abcd>'
     One of the characters `a', `b', `c', or `d'.  This is normally
     written as `[abcd]' when used for grep(1) regular expressions.

`<^abcd>'
     Any character except `a', `b', `c', or `d'.

`<ANY>'
     Any character.

`'c''
     The character `c'.  This can also be expressed as `<c>'.


File: pnettools.info,  Node: Lexical Tokens,  Next: Helper Non-Terminals,  Prev: Assembler Syntax,  Up: Assembler

Lexical tokens
==============

The syntax uses lexical terminal symbols called `IDENT', `INT',
`FLOAT', `SQSTRING', `DQSTRING', and `HEXBYTE'.  Their structure is
defined as follows:

     IDENT    => IDALPHA { IDALPHA | DIGIT }
     INT      => ['-'] (DIGIT)+
               | ['-'] '0' <xX> (<0-9a-fA-F>)+
               | ['-'] '0' {<0-7>}
     FLOAT    => [<+->] (DIGIT)+ EXPONENT
               | [<+->] {DIGIT} '.' (DIGIT)+ [EXPONENT]
               | [<+->] (DIGIT)+ '.' {DIGIT} [EXPONENT]
     SQSTRING => <'> { '\' <ANY> | <^'\> } <'>
     DQSTRING => '"' { '\' <ANY> | <^"\> } '"'
     HEXBYTE  => (<0-9a-fA-F>)+
     IDALPHA  => <a-zA-Z_$?>
     DIGIT    => <0-9>
     EXPONENT => <eE> [<+->] (DIGIT)+

   The syntax is very close to that used by C for identifiers, integer
constants, floating point constants, single-quoted strings, and
double-quoted strings.  C-like escape sequences can be used for special
characters in strings.  Unlike C, single quotes are used for strings
and not character constants.  The `HEXBYTE' terminal is used for raw
sequences of bytes in some of the declaration types.

   Strings are expected to be in the UTF-8 encoding, ready for
translation into the Unicode strings used by IL binaries.  No other
character sets are supported.  It is the responsibility of the tool
that generates IL assembly code to perform any necessary character set
conversions.

   Comments can be represented in two ways: single-line and multi-line.
Single-line comments begin with `//' and continue to the end of the
current line.  Multi-line comments begin with `/*' and continue until
the next occurrence of `*/'.  Multi-line comments cannot be nested.

   White space in the input is ignored.  The allowable white space
characters are Space (0x20), Tab (0x09), Vertical Tab (0x0B), Carriage
Return (0x0D), Line Feed (0x0A), Form Feed (0x0C), and Ctrl-Z (0x1A).

   The assembly language has a large number of keywords and instruction
names that begin with lower case letters.  If the program uses a keyword
as an identifier for a class, field, method, etc, it must be quoted with
single quotes.  For example, a program identifier called `managed'
would need to be written as `'managed'' so that it does not conflict
with the `managed' keyword.

   The easiest method to protect identifiers is to quote anything that
begins with a lower case letter.  If new keywords are added to ilasm in
the future, there will be no need to modify existing compilers that use
this technique.  Compilers can quote only known keywords and
instructions if they wish, but they will not be robust against future
changes.

   The following is a list of the assembler keywords:

     *abstract algorithm alignment ansi any array as assembly assert
     at auto autochar beforefieldinit blob blob_object bool boxed
     bstr bytearray byvalstr callmostderived carray catch cdecl
     cf char cil class clsid compilercontrolled currency custom
     date decimal default demand deny disablejitoptimizer
     enablejittracking error explicit extends extern false famandassem
     family famorassem fastcall fault field filetime filter final
     finally fixed float float32 float64 forwardref fromunmanaged
     fullorigin handler hidebysig hresult idispatch il implements
     implicitcom implicitres import in inf inheritcheck init initonly
     instance int int16 int32 int64 int8 interface internalcall
     iunknown java lasterr lateinit lcid linkcheck literal lpstr lpstruct
     lptstr lpvoid lpwstr managed marshal method modopt modreq nan
     native nested newslot noappdomain noinlining nomachine nomangle
     nometadata noncasdemand noncasinheritance noncaslinkdemand
     noprocess not_in_gc_heap notserialized null object objectref ole
     opt optil out permitonly pinned pinvokeimpl prejitdeny prejitgrant
     preservesig private privatescope public publickey readonly record
     reqmin reqopt reqrefuse reqsecobj request retval rtspecialname
     runtime safearray sealed sequential serializable specialname
     static stdcall storage stored_object stream streamed_object string
     struct synchronized syschar sysstring tbstr thiscall tls to true
     typedref unicode unmanaged unmanagedexp unsigned userdefined value
     valuetype vararg variant vector virtual void wchar winapi with*

   The following is a list of assembler directives:

     *.addon .algorithm .assembly .backing .blob .capability .cctor
     .class .comtype .config .corflags .ctor .custom .data .emitbyte
     .entrypoint .event .exeloc .export .field .file .fire .get .hash
     .imagebase .implicitcom .library .line #line .locale .locals .manifestres
     .maxstack .method .mime .module .mresource .namespace .originator .os
     .other .override .pack .param .permission .permissionset .processor
     .property .publickey .publickeytoken .removeon .set .size .subsystem
     .title .try .ver .vtable .vtentry .vtfixup .zeroinit*

   The following is a list of the instruction names:

     *add add.ovf add.ovf.un and ann.call ann.catch ann.data ann.data.s
     ann.dead ann.def ann.hoisted ann.hoisted_call ann.lab ann.live
     ann.phi ann.ref ann.ref.s arglist beq beq.s bge bge.s bge.un bge.un.s
     bgt bgt.s bgt.un bgt.un.s ble ble.s ble.un ble.un.s blt blt.s blt.un
     blt.un.s bne.un bne.un.s box box_old br break brfalse brfalse.s
     brinst brinst.s brnull brnull.s br.s brtrue brtrue.s brzero brzero.s
     call calli callvirt castclass ceq cgt cgt.un ckfinite clt clt.un
     conv.i conv.i1 conv.i2 conv.i4 conv.i8 conv.ovf.i conv.ovf.i1
     conv.ovf.i1.un conv.ovf.i2 conv.ovf.i2.un conv.ovf.i4 conv.ovf.i4.un
     conv.ovf.i8 conv.ovf.i8.un conv.ovf.i.un conv.ovf.u conv.ovf.u1
     conv.ovf.u1.un conv.ovf.u2 conv.ovf.u2.un conv.ovf.u4 conv.ovf.u4.un
     conv.ovf.u8 conv.ovf.u8.un conv.ovf.u.un conv.r4 conv.r8 conv.r.un
     conv.u conv.u1 conv.u2 conv.u4 conv.u8 cpblk cpobj div div.un dup
     endfault endfilter endfinally initblk initobj isinst jmp jmpi ldarg
     ldarg.0 ldarg.1 ldarg.2 ldarg.3 ldarga ldarga.s ldarg.s ldc.i4 ldc.i4.0
     ldc.i4.1 ldc.i4.2 ldc.i4.3 ldc.i4.4 ldc.i4.5 ldc.i4.6 ldc.i4.7 ldc.i4.8
     ldc.i4.m1 ldc.i4.M1 ldc.i4.s ldc.i8 ldc.r4 ldc.r8 ldelema ldelem.i
     ldelem.i1 ldelem.i2 ldelem.i4 ldelem.i8 ldelem.r4 ldelem.r8 ldelem.ref
     ldelem.u1 ldelem.u2 ldelem.u4 ldelem.u8 ldfld ldflda ldftn ldind.i
     ldind.i1 ldind.i2 ldind.i4 ldind.i8 ldind.r4 ldind.r8 ldind.ref
     ldind.u1 ldind.u2 ldind.u4 ldind.u8 ldlen ldloc ldloc.0 ldloc.1 ldloc.2
     ldloc.3 ldloca ldloca.s ldloc.s ldnull ldobj ldptr ldsfld ldsflda
     ldstr ldtoken ldvirtftn leave leave.s localloc mkrefany mul mul.ovf
     mul.ovf.un mul.un neg newarr newobj nop not or pop refanytype
     refanyval rem rem.un ret rethrow shl shr shr.un sizeof starg starg.s
     stelem.i stelem.i1 stelem.i2 stelem.i4 stelem.i8 stelem.r4 stelem.r8
     stelem.ref stfld stind.i stind.i1 stind.i2 stind.i4 stind.i8 stind.r4
     stind.r8 stind.ref stloc stloc.0 stloc.1 stloc.2 stloc.3 stloc.s
     stobj stsfld sub sub.ovf sub.ovf.un switch tail tail. throw unbox
     volatile volatile. xor*


File: pnettools.info,  Node: Helper Non-Terminals,  Next: Top-Level Declarations,  Prev: Lexical Tokens,  Up: Assembler

Helper Non-Terminals
====================

In this section we define a number of non-terminals that will be used
later in the BNF grammar.  They do not necessarily correspond to useful
program constructs on their own.

     Identifier     => IDENT | SQSTRING
     Integer32      => INT      /* 32-bit integer */
     Integer64      => INT      /* 64-bit integer */
     Float64        => FLOAT
                     | *float32* '(' Integer32 ')'
                     | *float64* '(' Integer64 ')'
                     | *nan*
                     | *inf*
                     | '-' *inf*
     ComposedString => DQSTRING
                     | ComposedString '+' DQSTRING
     QualifiedName  => Identifier
                     | QualifiedName '.' Identifier
     Bytes          => '(' { HEXBYTE } ')'

   The second and third forms of the Float64 non-terminal can be used to
convert the raw bit representation of a floating-point number into a
floating-point value.  The second form converts the big-endian, 32-bit,
IEEE integer representation of a single-precision value into a 32-bit
float.  For example 0x3F800000 represents the value 1.0.  The third
form does the same for 64-bit IEEE integer representations of
double-precision values.

   The raw bit forms are mainly of use to compilers that wish to output
the exact binary representation of a floating-point constant, rather
than a rounded decimal value.

   The ComposedString non-terminal allows long strings to be built up by
appending a sequence of shorter strings.


File: pnettools.info,  Node: Top-Level Declarations,  Next: Namespace Declarations,  Prev: Helper Non-Terminals,  Up: Assembler

Top-Level Declarations
======================

The top-most level of the assembly input stream consists of zero or
more declarations:

     TopLevel => { Declaration }

   Declarations at the top-most level cover program items such as
classes, namespaces, global methods, assembly information, manifest
resources, etc:

     Declaration => NamespaceDeclaration
                  | ClassDeclaration
                  | FieldDeclaration
                  | MethodDeclaration
                  | DebugInformation
                  | CustomAttributeDeclaration
                  | AssemblyDeclaration
                  | AssemblyRefDeclaration
                  | ModuleDeclaration
                  | SecurityDeclaration
                  | ComTypeDeclaration
                  | FileDeclaration
                  | ManifestResDeclaration
                  | DataDeclaration
                  | VtableDeclaration
                  | VtfixupDeclaration

   The assembler does support some additional kinds of declarations
beyond those described in this document.  They are supported for
compatibility with older versions of the assembly syntax, and for
compatibility with tools from other vendors.

   The syntax described here is the official Portable.NET syntax, and
deviating from it is not recommended.  Support for other syntax may be
removed in a future version of the assembler.


File: pnettools.info,  Node: Namespace Declarations,  Next: Class Declarations,  Prev: Top-Level Declarations,  Up: Assembler

Namespace Declarations
======================

Zero or more classes may be grouped together into a namespace, which
prefixes the class name with a particular identifier.

     NamespaceDeclaration => *.namespace* QualifiedName
                             '{' { Declaration } '}'

   In the following example, classes with names `C1' and `C2' will be
created within the namespace `N':

     .namespace N
     {
         .class C1 { ... }
         .class C2 { ... }
     }

   Note: the following is not the same as above:

     .class N.C1 { ... }
     .class N.C2 { ... }

   This declares two classes called `N.C1' and `N.C2', within the
global namespace.


File: pnettools.info,  Node: Class Declarations,  Next: Class Attributes,  Prev: Namespace Declarations,  Up: Assembler

Class Declarations
==================

Strictly speaking, IL programs do not support classes at all.
Everything is a type.  However, for historical reasons, types are
declared by means of a *.class* declaration.

     ClassDeclaration => *.class* { ClassAttribute } Identifier
               [ *extends* ClassName ]
               [ *implements* ClassName { ',' ClassName } ]
               '{' { ClassMember } '}'

   If the type has custom attributes, they should appear in the assembly
stream just after the class heading and before any other class members.

* Menu:

* Class Attributes::          Attributes that may be used on types.
* Class Members::             Specifying the members of a type.
* Class Layout::              Explicit layout for types.
* Class References::          Referring to local and imported types.


File: pnettools.info,  Node: Class Attributes,  Next: Class Members,  Prev: Class Declarations,  Up: Class Declarations

Class Attributes
----------------

     ClassAttribute => *public*
                     | *private*
                     | *value*
                     | *unmanaged*
                     | *interface*
                     | *sealed*
                     | *abstract*
                     | *auto*
                     | *sequential*
                     | *explicit*
                     | *ansi*
                     | *unicode*
                     | *autochar*
                     | *import*
                     | *serializable*
                     | *nested public*
                     | *nested private*
                     | *nested family*
                     | *nested assembly*
                     | *nested famandassem*
                     | *nested famorassem*
                     | *beforefieldinit*
                     | *specialname*
                     | *rtspecialname*

*public*
     Specify that the type is exported from the assembly that declares
     it, and is accessible to any other type.  This should not be used
     on nested types.  This corresponds to the C# `public' access level
     on non-nested types.

*private*
     Specify that the type is private to the assembly that declares it,
     and is accessible only to other types in the same assembly.  This
     should not be used on nested types.  This corresponds to the C#
     `internal' access level on non-nested types.

*nested public*
     Specify that the type is publicly accessible within the scope of
     its nesting parent's accessibility.  The type is accessible to any
     other type that can access the nesting parent.  This should only
     be used on nested types.  This corresponds to the C# `public'
     access level on nested types.

*nested private*
     Specify that the type is private to its nesting parent and cannot
     be accessed by any other type.  This should only be used on nested
     types.  This corresponds to the C# `private' access level on
     nested types.

*nested family*
     Specify that the type is accessible to its nesting parent and to
     any type derived from the nesting parent.  This should only be used
     on nested types.  This corresponds to the C# `protected' access
     level on nested types.

*nested assembly*
     Specify that the type is accessible to any other type in the
     assembly that declares it.  This should only be used on nested
     types.  This corresponds to the C# `internal' access level on
     nested types.

*nested famandassem*
     Specify that the type is accessible only to types that inherit from
     the nesting parent and are also declared in the same assembly as
     this type.  This should only be used on nested types.  There is no
     C# equivalent to this access level.

*nested famorassem*
     Specify that the type is accessible only to types that inherit from
     the nesting parent or that are declared in the same assembly as
     this type.  This should only be used on nested types.  This
     corresponds to the C# `protected internal' access level on nested
     types.

*value*
     Specify that the type is normally used as a value type (C#
     `struct') instead of as an object reference.

*unmanaged*
     Specify that the type declares an unmanaged value type.

*interface*
     Specify that the type is an interface rather than a regular class
     or value type.  Interfaces should also have the *abstract*
     attribute.

*sealed*
     Specify that the type cannot be inherited.

*abstract*
     Specify that the type cannot be instantiated.  This attribute
     should be present on interfaces and on any class that has
     *abstract* methods.

*auto*
     Specify that the fields of the type should be laid out in the most
     efficient manner possible, with no user-supplied constraints.
     Normally this will be the same as *sequential*, but it does not
     have to be the same.

*sequential*
     Specify that the fields of the type should be laid out in a manner
     which is consistent with the underlying operating system.  Most
     types will have this attribute set.

*explicit*
     Specify that the fields of the type should be laid out using
     user-supplied explicit layout rules.  These rules are specified
     with the *.size* and *.pack* directives, and with explicit offset
     information on each of the fields.

*ansi*
     Specify that any strings that are marshalled to unmanaged code by
     this type should be interpreted using the system's prevailing
     locale.  If the type does not marshal strings to unmanaged code,
     then *ansi* is the default value.

*unicode*
     Specify that any strings that are marshalled to unmanaged code by
     this type should be interpreted as Unicode.  This attribute only
     makes sense on Windows machines.

*autochar*
     Specify that any strings that are marshalled to unmanaged code by
     this type should be interpreted as either Unicode or strings in
     the prevailing locale, depending upon the capabilities of the
     underlying operating system.  This attribute only makes sense on
     Windows machines.

*import*
     Specify that the type was imported from some other module within
     the assembly.  This attribute is very rare and can be ignored by
     most compilers.

*serializable*
     Specify that the fields of the type can be automatically
     serialized by the runtime engine's builtin serialization routines.
     Any fields that have the *not_serialized* attribute will be
     omitted from the builtin serialization.

*beforefieldinit*
     Specify that the type does not need to be initialized until the
     first time that a static method within the type is called.

*specialname*
     Specify that the type may have special significance to tools other
     than the runtime engine.  This is rarely needed on types.

*rtspecialname*
     Specify that the type may have special significance to the runtime
     engine.  This is rarely needed on types.


File: pnettools.info,  Node: Class Members,  Next: Class Layout,  Prev: Class Attributes,  Up: Class Declarations

Class Members
-------------

Types may contain any of the following members:

     ClassMember => ClassDeclaration
                  | ClassLayoutDeclaration
                  | FieldDeclaration
                  | MethodDeclaration
                  | PropertyDeclaration
                  | EventDeclaration
                  | DebugInformation
                  | CustomAttributeDeclaration
                  | DataDeclaration
                  | SecurityDeclaration
                  | ComTypeDeclaration
                  | ExportDeclaration
                  | OverrideDeclaration


File: pnettools.info,  Node: Class Layout,  Next: Class References,  Prev: Class Members,  Up: Class Declarations

Class Layout
------------

     ClassLayoutDeclaration => *.size* Integer32
                             | *.pack* Integer32

*.size*
     Specify the size of the type, in bytes.  This should only be used
     with *explicit* layout.  If this declaration is not present, or
     specifies the value zero, then the runtime engine will choose the
     size of the type.

*.pack*
     Specify the packing size to be used for fields of the type.  This
     must be one of the values 0, 1, 2, 4, 8, 16, 32, 64, or 128, and
     should only be used with *explicit* layout.  A packing size of
     zero, or a missing packing size, indicates that the default size
     for the underlying operating system should be used.


File: pnettools.info,  Node: Class References,  Next: Type Specifications,  Prev: Class Layout,  Up: Class Declarations

Class References
----------------

In many places within the assembly source stream, it is necessary to
refer to other classes within the same source, or in other assemblies.
This section describes the syntax of class references.

   In IL, there is a distinction defined, primitive, and composed types.
Defined types are used to define the classes and value types that are
used in the program.  Primitive types are types such as *int32*,
*bool*, *float64*, etc.  Composed types are arrays, pointers, etc, that
are built up from defined and primitive types.

   In this section, we will treat a "class name" as a reference to a
defined type, even if the type happens to correspond to a value type.
Primitive and composed types cannot be referred to using class names.

     ClassName   => [ '[' ImportScope ']' ]
                       QualifiedName { '/' QualifiedName }
     ImportScope => QualifiedName |
                  | *.module* QualifiedName
                  | *.library*

   Class names begin with an import scope, which specifies where the
defined type is being imported from.  If the import scope is not
present, the type is assumed to be declared in the same assembly
stream, or that the type will be resolved by the linker.

   If the import scope is a `QualifiedName', then it indicates that the
defined type is being imported from an assembly.  The assembler
searches for an assembly reference definition with the same name.  If
there is no such assembly reference, then it will search for an
assembly definition with the same name.  If an assembly definition is
found, then the interpretation is the same as if the scope was not
supplied at all.  An error occurs if there is no assembly reference or
definition for the name.

   If the import scope is prefixed with *.module*, then it indicates
that the defined type is being imported from a module.  This form of
import is deprecated in favour of assembly imports.

   If the import scope is *.library*, then it indicates that the
defined type is being imported from the CLI standard library.  This
library is normally in an assembly called `mscorlib', but it is
possible to specify a different name using the `--stdlib-name' option
to `ilasm'.

   Following the import scope, the name consists of one of more
components, separated by slashes.  A name with no slashes indicates a
type that is declared at the global level of the import scope.  A name
with slashes indicates a nested type.  For example, the following refers
to the type `HashEntry' which is nested within the standard
`System.Enum' type:

     [.library]System.Enum/HashEntry


File: pnettools.info,  Node: Type Specifications,  Next: Field Declarations,  Prev: Class References,  Up: Assembler

Type Specifications
===================

Thoughout the assembly source stream, it is necessary to refer to
defined, primitive, and composed types.  This is done using type
specifications, which may either be class names or composed types.

     TypeSpecification => ClassName | Type

   Types may be composed from class names, primitive types, and other
composed types as follows:

     Type => *class* ClassName
           | *valuetype* ClassName
           | Type '[' Bounds { ',' Bounds } ']'
           | Type '&'        /* reference */
           | Type '*'        /* pointer */
           | Type *pinned*
           | Type *modreq* '(' ClassName ')'
           | Type *modopt* '(' ClassName ')'
           | *method* CallingConventions Type '*'
                               '(' [ SignatureArguments ] ')'
           | PrimitiveType

   Every defined type in the program has two forms: class and value
type.  The particular form to be used may be specified using the *class*
and *valuetype* prefixes.  If the prefix is not present, then the
assembler will guess the correct form from the type definition.

   The assembler supports the following primitive type keywords:

     PrimitiveType => *void*
                    | *bool*
                    | *char*
                    | *int8*
                    | *unsigned* *int8*
                    | *int16*
                    | *unsigned* *int16*
                    | *int32*
                    | *unsigned* *int32*
                    | *int64*
                    | *unsigned* *int64*
                    | *native* *int*
                    | *native* *unsigned* *int*
                    | *float32*
                    | *float64*
                    | *native* *float*
                    | *string*
                    | *object*
                    | *typedref*

   The *string* keyword is replaced with a *class* reference to the
library class `System.String'.  The *object* keyword is replaced with a
*class* reference to the library class `System.Object'.

   Array bounds are specified as follows:

     Bounds => /* empty */
             | *...*
             | Integer32
             | Integer32 *...*
             | Integer32 *...* Integer32

   The first two forms indicate an array dimension with no lower or
upper bound.  The third form indicates an array dimension with lower
bound 0, and the upper bound as one less than the specified value.  The
fourth form indicates an array dimension with a specified lower bound,
but no upper bound.  The last form indicates an array dimension with
both lower and upper bounds specified.

   In certain contexts, types may have marshalling information
associated with them.  This marshalling information provides directions
to the runtime engine when it invokes external methods using the PInvoke
mechanism.

     MarshalledType => Type [ *marshal* '(' NativeType ')' ]
     NativeType     => /* empty */
                     | *custom* '(' ComposedString ',' ComposedString ','
                                    ComposedString ',' ComposedString ')'
                     | *fixed* *sysstring* '[' Integer32 ']'
                     | *fixed* *array* '[' Integer32 ']'
                     | NativeType '*'
                     | NativeType '[' ']'
                     | NativeType '[' Integer32 ']'
                     | NativeType '[' '+' Integer32 ']'
                     | NativeType '[' Integer32 '+' Integer32 ']'
                     | *variant*
                     | *currency*
                     | *syschar*
                     | *void*
                     | *bool*
                     | *int8*
                     | *unsigned* *int8*
                     | *int16*
                     | *unsigned* *int16*
                     | *int32*
                     | *unsigned* *int32*
                     | *int64*
                     | *unsigned* *int64*
                     | *int*
                     | *unsigned **int*
                     | *float32*
                     | *float64*
                     | *float*
                     | *error*
                     | *decimal*
                     | *date*
                     | *bstr*
                     | *lpstr*
                     | *lpwstr*
                     | *lptstr*
                     | *objectref*
                     | *iunknown*
                     | *idispatch*
                     | *struct*
                     | *interface*
                     | *nested* *struct*
                     | *byvalstr*
                     | *ansi* *bstr*
                     | *tbstr*
                     | *variant* *bool*
                     | *method*
                     | *lpvoid*
                     | *as* *any*
                     | *lpstruct*

   Note: native types are highly system-dependent.  Many of the types
above only make sense on Windows systems.


File: pnettools.info,  Node: Field Declarations,  Next: Field Attributes,  Prev: Type Specifications,  Up: Assembler

Field Declarations
==================

Fields may be defined at the global level of the assembly stream, or
within the body of a class.  If the field is global, it must appear
before all class declarations in the assembly stream.

     FieldDeclaration => *.field* [ '[' Integer32 ']' ]
                         { FieldAttribute } Type Identifier
     			        [ *at* (Integer32 | Identifier) ]
     					[ '=' FieldInitialization ]

   If the field has custom attributes, they should appear in the
assembly stream just after the field declaration.

* Menu:

* Field Attributes::          Attributes that may be used on fields.
* Field Initialization::      Specifying a constant value for a field.
* Field Layout::              Explicit layout for fields.
* Field References::          Referring to local and imported fields.


File: pnettools.info,  Node: Field Attributes,  Next: Field Initialization,  Prev: Field Declarations,  Up: Field Declarations

Field Attributes
----------------

     FieldAttribute => *public*
     				| *private*
     				| *family*
     				| *assembly*
     				| *famandassem*
     				| *famorassem*
     				| *compilercontrolled*
                     | *static*
     				| *literal*
     				| *initonly*
     				| *notserialized*
     				| *rtspecialname*
     				| *specialname*
     				| *marshal* '(' NativeType ')'

*public*
     Specify that the field is accessible from any other class.  This
     corresponds to the C# `public' access level.

*private*
     Specify that the field is only accessible to the class in which it
     is declared.  This corresponds to the C# `private' access level.

*family*
     Specify that the field is accessible to the class in which it is
     declared, and any subclass of the field's class.  This corresponds
     to the C# `protected' access level.

*assembly*
     Specify that the field is only accessible to classes in the same
     assembly as the field.  This corresponds to the C# `internal'
     access level.

*famandassem*
     Specify that the field is only accessible to classes in the same
     assembly as the field, and which inherit from the field's class.
     There is no C# equivalent of this access level.

*famorassem*
     Specify that the field is only accessible to classes in the same
     assembly as the field or to classes which inherit from the field's
     class.  This corresponds to the C# `protected internal' access
     level.

*compilercontrolled*
     Specify that the field is accessible in a manner controlled by the
     compiler.  The runtime engine treats this the same as *assembly*.
     There is no C# equivalent of this access level.

*static*
     Specify that the field is staticly declared within its class.  If
     this attribute is not present, the field will be part of the
     instances of its class.

*literal*
     Specify that the field is associated with a literal constant value.
     Such a field will not occupy space at runtime, and compilers will
     expand the literal value into the code stream at compile time.
     This corresponds to the C# `const' keyword.

*initonly*
     Specify that the field can only be written during the
     initialization process for the field's class.  Afterwards, it is
     read-only.  This corresponds to the C# `readonly' keyword.

*notserialized*
     Specify that the field will not be output during serialization if
     its class has the *serialized* attribute.

*specialname*
     Specify that the field has special significance to tools other than
     the runtime engine.  This should be used on fields that correspond
     to enumerated value storage (normally *value__*).

*rtspecialname*
     Specify that the field has special significance to the runtime
     engine.  This should be used on fields that correspond to
     enumerated value storage (normally *value__*).

*marshal*
     Specify that the field's type should be replaced with an underlying
     native type by the runtime.


File: pnettools.info,  Node: Field Initialization,  Next: Field Layout,  Prev: Field Attributes,  Up: Field Declarations

Field Initialization
--------------------

     FieldInitialization => *float32* '(' FLOAT ')'
                          | *float64* '(' FLOAT ')'
                          | *float32* '(' Integer64 ')'
                          | *float64* '(' Integer64 ')'
                          | *float32* '(' *nan* ')'
                          | *float64* '(' *nan* ')'
                          | *float32* '(' *inf* ')'
                          | *float64* '(' *inf* ')'
                          | *float32* '(' '-' *inf* ')'
                          | *float64* '(' '-' *inf* ')'
                          | *int64* '(' Integer64 ')'
                          | *int32* '(' Integer64 ')'
                          | *int16* '(' Integer64 ')'
                          | *int8* '(' Integer64 ')'
                          | *char* '(' Integer64 ')'
                          | *bool* '(' *true* ')'
                          | *bool* '(' *false* ')'
                          | ComposedString


File: pnettools.info,  Node: Field Layout,  Next: Field References,  Prev: Field Initialization,  Up: Field Declarations

Field Layout
------------

If the field is a member of an *explicit* class declaration, then a
specific offset value may be specified just after the *.field* keyword.
Use of this feature is discouraged in portable programs.

   If the field is static, it can be placed at an explicit runtime
address using the *at* clause.  Use of this feature is discouraged in
portable programs.


File: pnettools.info,  Node: Field References,  Next: Method Declarations,  Prev: Field Layout,  Up: Field Declarations

Field References
----------------

At various points within an assembly stream, it is necessary to refer
to fields defined in the same stream, or imported from other streams.
The following syntax is used for referring to fields:

     FieldReference => Type [ TypeSpecification *::* ] Identifier


File: pnettools.info,  Node: Method Declarations,  Next: Method Attributes,  Prev: Field References,  Up: Assembler

Method Declarations
===================

Methods may be defined at the global level of the assembly stream, or
within the body of a class.  If the method is global, it must appear
before all class declarations in the assembly stream.

     MethodDeclaration => *.method* { MethodAttribute }
                          CallingConventions
                          { ParameterAttribute }
                          MarshalledType MethodName
                          '(' [ SignatureArguments ] ')'
                          { ImplementationAttribute }
                          '{' { MethodMember } '}
     'MethodName => *.ctor*
                 | *.cctor*
                 | QualifiedName

   The method name *.ctor* indicates an instance constructor, and the
method name *.cctor* indicates a static constructor.

   If the method has custom attributes, they should appear in the body
of the method, or just after the method declaration.

* Menu:

* Method Attributes::         Attributes that may be used on methods.
* Calling Conventions::       Specifying a method's calling conventsions.
* Implementation Attributes:: Specifying a method's implementation style.
* Method Signatures::         Method argument signatures.
* PInvoke Methods::           Invoking foreign library methods.
* Method References::         Referring to local and imported methods.
* Method Members::            Members of a method declaration (IL).
* Java Method Members::       Members of a method declaration (Java).


File: pnettools.info,  Node: Method Attributes,  Next: Calling Conventions,  Prev: Method Declarations,  Up: Method Declarations

Method Attributes
-----------------

     MethodAttribute =>
                      | *public*
                      | *private*
                      | *family*
                      | *assembly*
                      | *famandassem*
                      | *famorassem*
                      | *compilercontrolled*
                      | *static*
                      | *virtual*
                      | *final*
                      | *abstract*
                      | *hidebysig*
                      | *newslot*
                      | *specialname*
                      | *rtspecialname*
                      | *pinvokeimpl* PInvokeParameters

*public*
     Specify that the method is accessible from any other class.  This
     corresponds to the C# `public' access level.

*private*
     Specify that the method is only accessible to the class in which
     it is declared.  This corresponds to the C# `private' access level.

*family*
     Specify that the method is accessible to the class in which it is
     declared, and any subclass of the method's class.  This corresponds
     to the C# `protected' access level.

*assembly*
     Specify that the method is only accessible to classes in the same
     assembly as the method.  This corresponds to the C# `internal'
     access level.

*famandassem*
     Specify that the method is only accessible to classes in the same
     assembly as the method, and which inherit from the method's class.
     There is no C# equivalent of this access level.

*famorassem*
     Specify that the method is only accessible to classes in the same
     assembly as the method or to classes which inherit from the
     method's class.  This corresponds to the C# `protected internal'
     access level.

*compilercontrolled*
     Specify that the method is accessible in a manner controlled by
     the compiler.  The runtime engine treats this the same as
     *assembly*.  There is no C# equivalent of this access level.

*static*
     Specify that the method is staticly declared within its class.
     The method will not have a `this' parameter.

*virtual*
     Specify that the method is virtual.

*final*
     Specify that the virtual method is the last definition of the
     method, and that it cannot be overridden in subclasses.

*abstract*
     Specify that the virtual method is abstract.  The class that
     contains the method must also have the *abstract* attribute.

*hidebysig*
     Specify that the method hides any other definition in a parent
     class only if the method name and signature are identical.  If
     this attribute is not present, then the method hides any
     definition in a parent class if the method name is identical.

*newslot*
     Specify that the virtual method occupies a different vtable slot
     from the same method in parent classes.

*specialname*
     Specify that the method has special significance to tools other
     than the runtime engine.  This should be used on methods that
     correspond to constructors, operators, property accessors, and
     event accessors.

*rtspecialname*
     Specify that the method has special significance to the runtime
     engine.  This should be used on methods that correspond to
     constructors.

*pinvokeimpl*
     Specify that the method is imported from a foreign library.  The
     parameters to this attribute specify how to perform the import.
     *Note PInvoke Methods::, for more information.


File: pnettools.info,  Node: Calling Conventions,  Next: Implementation Attributes,  Prev: Method Attributes,  Up: Method Declarations

Calling Conventions
-------------------

     CallingConventions => /* empty */
                         | *instance* CallingConventions
                         | *explicit* CallingConventions
                         | *default*
                         | *vararg*
                         | *unmanaged cdecl*
                         | *unmanaged stdcall*
                         | *unmanaged thiscall*
                         | *unmanaged fastcall*

*instance*
     Specify that the method takes an additional argument that
     corresponds to the `this' instance.

*explicit*
     Specify that the `this' instance is explicitly provided in the
     method signature.

*default*
     Specify that the default calling conventions should be used.  This
     convention is implied if no calling convention is supplied for the
     method.

*vararg*
     Specify that the method is capable of supporting a variable number
     of arguments.

*unmanaged cdecl*
     Specify that the method is in a foreign library and that it uses
     the standard C calling conventions for the underlying operating
     system.

*unmanaged stdcall*
     Specify that the method is in a foreign library and that it uses
     the "standard call" calling convention.  This is Windows-specific.

*unmanaged thiscall*
     Specify that the method is in a foreign library and that it uses
     the "this call" calling convention.  This is Windows-specific.

*unmanaged fastcall*
     Specify that the method is in a foreign library and that it uses
     the "fast call" calling convention.  This is Windows-specific.


File: pnettools.info,  Node: Implementation Attributes,  Next: Method Signatures,  Prev: Calling Conventions,  Up: Method Declarations

Implementation Attributes
-------------------------

     ImplementationAttributes => *cil*
                               | *optil*
                               | *native*
                               | *runtime*
                               | *managed*
                               | *unmanaged*
                               | *forwardref*
                               | *internalcall*
                               | *synchronized*
                               | *noinlining*
                               | *java*

*cil*
     Specify that the method is implemented in IL bytecode.  This is
     also used on *internalcall* methods, even though they are typically
     implemented with native code.

*optil*
     Specify that the method is implemented in OptIL bytecode, which is
     a variant of IL that provides extra information for JIT optimizers.
     There will normally be no reason to use this attribute.  The
     runtime engine treats OptIL identically to IL.

*native*
     Specify that the method is implemented using native machine code.
     This will rarely be required in binaries that are intended to be
     portable.

*runtime*
     Specify that the method has special meaning to the runtime engine.
     This is used when implementing delegates.

*managed*
     Specify that the method uses managed objects.  This is the default.

*unmanaged*
     Specify that the method uses unmanaged objects.

*forwardref*
     Specify that the method is not defined here.  This is provided for
     linker support only.  The runtime engine will reject methods that
     have this attribute.

*internalcall*
     Specify that the method is implemented internally within the
     runtime engine.

*synchronized*
     Specifies that the runtime engine should acquire a lock on the
     object prior to calling the method, and should release the lock
     after returning from the method.  If the method is static, then a
     lock on the method's type will be obtained.

*noinlining*
     Specifies that the JIT should not inline this method.

*java*
     Specifies that the method is implemented using Java bytecode
     instead of IL bytecode.  This must be last attribute in the list.
     i.e.  `java managed' is incorrect; it must be specifies as
     `managed java'.  This ordering allows `ilasm' to properly switch
     parsing modes to recognise the Java instruction set rather than
     the IL instruction set.


File: pnettools.info,  Node: Method Signatures,  Next: PInvoke Methods,  Prev: Implementation Attributes,  Up: Method Declarations

Method Signatures
-----------------

     SignatureArguments => SignatureArgument
                           { ',' SignatureArgument }
     SignatureArgument  => *...*
                         | { ParameterAttribute }
                           MarshalledType [ Identifier ]

     ParameterAttribute => '[' *in* ']'
                         | '[' *out* ']'
                         | '[' *opt* ']'

*in*
     Specify that the parameter is an input to the method.  The type
     must be a managed or unmanaged pointer type.

*out*
     Specify that the parameter is an output from the method.  The type
     must be a managed or unmanaged pointer type.

*opt*
     Specify that the parameter is optional.  The method will normally
     contain a *.param* declaration that specifies the default value
     for the parameter.

   Parameter attributes are ignored by the runtime engine.  They provide
information for compilers and other tools.


File: pnettools.info,  Node: PInvoke Methods,  Next: Method References,  Prev: Method Signatures,  Up: Method Declarations

PInvoke Methods
---------------

Methods in foreign libraries are referenced using the PInvoke mechanism.

     PInvokeParameters => '(' [ ComposedString
                                 [ *as* ComposedString ] ]
                            { PInvokeAttribute } ')'

   The first string indicates the name of the library from which the
foreign method is being imported.  The second string indicates the name
of the method in the foreign library.  If the second string is not
present, then the name of the method declaration will be used.

   The `ilasm' syntax allows the library name to be omitted, for
compatibility with older assemblers.  In practice, a PInvoke declaration
that does not have a library name cannot be resolved at runtime.

     PInvokeAttribute => *nomangle*
                       | *ansi*
                       | *unicode*
                       | *autochar*
                       | *ole*
                       | *lasterr*
                       | *winapi*
                       | *cdecl*
                       | *stdcall*
                       | *thiscall*
                       | *fastcall*

*nomangle*
     Specify that the foreign method name is exact.  Windows systems
     will search for 'A' and 'W' variants of the method name if this
     attribute is not specified.

*ansi*
     Specify that any strings that are passed to, or return from, the
     foreign method will be in the operating system's prevailing
     character set.

*unicode*
     Specify that any strings that are passed to, or return from, the
     foreign method will be in the Unicode character set.

*autochar*
     Specify that the runtime engine should determine the character set
     automatically.

*ole*
     Specify that the method signature has been managled to return a
     `HRESULT' value.  This is Windows-specific.

*lasterr*
     Specify that the method returns additional error information in a
     separate variable.  On Windows systems, this variable can be
     queried using `GetLastError'.  On other systems, the variable is
     usually called `errno'.

*winapi*
     Specify that the foreign method uses the "winapi" calling
     conventions.  This is Windows-specific.

*cdecl*
     Specify that the foreign method uses the standard C calling
     conventions.

*stdcall*
     Specify that the foreign method uses the "standard call" calling
     conventions.  This is Windows-specific.

*thiscall*
     Specify that the foreign method uses the "this call" calling
     conventions.  This is Windows-specific.

*fastcall*
     Specify that the foreign method uses the "fast call" calling
     conventions.  This is Windows-specific.

     If none of the above calling convention attributes are supplied,
     then the default is chosen by the runtime engine.


File: pnettools.info,  Node: Method References,  Next: Method Members,  Prev: PInvoke Methods,  Up: Method Declarations

Method References
-----------------

At various points within an assembly stream, it is necessary to refer
to methods defined in the same stream, or imported from other streams.
The following syntax is used for referring to methods:

     MethodReference => CallingConventions Type
                        [ TypeSpecification *::* ] MethodName
                        '(' [ SignatureArguments ] ')'


File: pnettools.info,  Node: Method Members,  Next: Java Method Members,  Prev: Method References,  Up: Method Declarations

Method Members
--------------

     MethodMember => *.emitbyte* Integer32
                   | ExceptionBlock
                   | *.maxstack* Integer32
                   | *.locals* '(' [ SignatureArguments ] ')'
                   | *.locals init*
                     '(' [ SignatureArguments ] ')'
                   | *.entrypoint*
                   | *.zeroinit*
                   | DataDeclaration
                   | Instruction
                   | Identifier ':'
                   | SecurityDeclaration
                   | DebugInformation
                   | CustomAttributeSpecification
                   | *.vtentry* Integer32 ':' Integer32
                   | *.override* TypeSpecification
                     *::* MethodName
                   | '{' { MethodMember } '}'
                   | *.param* '[' Integer32 ']'
                     [ '=' FieldInitialization ]


File: pnettools.info,  Node: Java Method Members,  Next: Property Declarations,  Prev: Method Members,  Up: Method Declarations

Java Method Members
-------------------

TODO


File: pnettools.info,  Node: Property Declarations,  Next: Property Attributes,  Prev: Java Method Members,  Up: Assembler

Property Declarations
=====================

     PropertyDeclaration => *.property* { PropertyAttribute }
                            CallingConventions Type Identifier
                            '(' [ SignatureArguments ] ')'
                            '{' { PropertyMember } '}'

   If the property has custom attributes, they should appear in the
body of the property, or just after the property declaration.

* Menu:

* Property Attributes::       Attributes that may be used on properties.
* Property Members::          Specifying the members of a property.


File: pnettools.info,  Node: Property Attributes,  Next: Property Members,  Prev: Property Declarations,  Up: Property Declarations

Property Attributes
-------------------

     PropertyAttribute => *specialname*
                        | *rtspecialname*

*specialname*
     Specify that the property has special significance to tools other
     than the runtime engine.

*rtspecialname*
     Specify that the property has special significance to the runtime
     engine.


File: pnettools.info,  Node: Property Members,  Next: Event Declarations,  Prev: Property Attributes,  Up: Property Declarations

Property Members
----------------

     PropertyMember => *.get* MethodReference
                     | *.set* MethodReference
                     | *.other* MethodReference
                     | CustomAttributeDeclaration
                     | DebugInformation

*.get*
     Specify the method to be used to implement the property's "get"
     accessor.

*.set*
     Specify the method to be used to implement the property's "set"
     accessor.

*.other*
     Specify the method to be used to implement the property's "other"
     accessor.  This is not currently used by C#.


File: pnettools.info,  Node: Event Declarations,  Next: Event Attributes,  Prev: Property Members,  Up: Assembler

Event Declarations
==================

     EventDeclaration => *.event* { EventAttribute }
                         [ TypeSpecification ] Identifier
                         '{' { EventMember } '}'

   If the event has custom attributes, they should appear in the body of
the event, or just after the event declaration.

* Menu:

* Event Attributes::          Attributes that may be used on events.
* Event Members::             Specifying the members of an event.


File: pnettools.info,  Node: Event Attributes,  Next: Event Members,  Prev: Event Declarations,  Up: Event Declarations

Event Attributes
----------------

     EventAttribute => *specialname*
                     | *rtspecialname*

*specialname*
     Specify that the event has special significance to tools other than
     the runtime engine.

*rtspecialname*
     Specify that the event has special significance to the runtime
     engine.


File: pnettools.info,  Node: Event Members,  Next: Debug Information,  Prev: Event Attributes,  Up: Event Declarations

Event Members
-------------

     EventMember => *.addon* MethodReference
                  | *.removeon* MethodReference
                  | *.fire* MethodReference
                  | *.other* MethodReference
                  | CustomAttributeDeclaration
                  | DebugInformation

*.addon*
     Specify the method to be used to implement the event's "add"
     accessor.

*.removeon*
     Specify the method to be used to implement the event's "remove"
     accessor.

*.fire*
     Specify the method to be used to implement the event's "fire"
     accessor.

*.other*
     Specify the method to be used to implement the event's "other"
     accessor.  This is not currently used by C#.


File: pnettools.info,  Node: Debug Information,  Next: Custom Attributes,  Prev: Event Members,  Up: Assembler

Debug Information
=================

When a program is compiled in debug mode, extra information is inserted
into the assembly stream to assist debuggers.

   Debug information in the assembly stream is only processed if the
`-g' option is supplied to `ilasm'.

     DebugInformation => *.line* INT SQSTRING
                       | *.line* INT DQSTRING
                       | *.line*

   The first two forms above specify a line number and a filename.  The
third form specifies a line number within the same file as the previous
*.line* directive.

   The keyword *#line* can be used instead of *.line*, but this usage
is deprecated.

   Debug information lines are treated differently in method bodies
versus elsewhere.  Inside a method body, debug information should
appear at the code position where the corresponding source line begins.

   Outside a method body, debug information indicates the point in the
source where the corresponding declaration was encountered.  For
example:

     .class C
     {
         .line 28 "testing.cs"
     
         .field int32 f
         .line 31
     }

   This indicates that the class `C' was declared on line 28 of the
source file `testing.cs', and that the field `f' was declared on line
31 of the same file.  Debug information for classes must precede any of
the class members.

   *Note Debug Symbols::, for more information on how debug information
is stored in IL binaries.


File: pnettools.info,  Node: Custom Attributes,  Next: Assembly Declarations,  Prev: Debug Information,  Up: Assembler

Custom Attributes
=================

     CustomAttributeDeclaration => *.custom* MethodReference '=' Bytes

   The method reference indicates the constructor to use to build the
attribute at runtime.  The hexadecimal bytes provide a serialized form
of the constructor arguments.


File: pnettools.info,  Node: Assembly Declarations,  Next: Assembly Attributes,  Prev: Custom Attributes,  Up: Assembler

Assembly Declarations
=====================

     AssemblyDeclaration => *.assembly* { AssemblyAttribute }
                            AssemblyName '{' { AssemblyMember } '}'
     AssemblyName        => QualifiedName | *.library*

   If the assembly declaration has custom attributes, they should
appear in the body of the declaration, or just after the declaration.

* Menu:

* Assembly Attributes::        Attributes that may be used on assemblies.
* Assembly Members::           Specifying the members of an assembly.
* Assembly References::        Referring to imported assemblies.
* Assembly Reference Members:: Specifying the members of an assembly reference.


File: pnettools.info,  Node: Assembly Attributes,  Next: Assembly Members,  Prev: Assembly Declarations,  Up: Assembly Declarations

Assembly Attributes
-------------------

     AssemblyAttribute => *noappdomain*
                        | *nomachine*
                        | *noprocess*

*noappdomain*
     Specifies that the assembly cannot be loaded more than once in the
     same application domain.

*nomachine*
     Specifies that the assembly cannot be loaded more than once on the
     same physical machine.

*noprocess*
     Specifies that the assembly cannot be loaded more than once in the
     same process.


File: pnettools.info,  Node: Assembly Members,  Next: Assembly References,  Prev: Assembly Attributes,  Up: Assembly Declarations

Assembly Members
----------------

     AssemblyMember => *.hash* *algorithm* Integer32
                     | *.publickey* '=' Bytes
                     | *.ver* Integer32 ':' Integer32 ':'
                              Integer32 ':' Integer32
                     | *.locale* ComposedString
                     | *.processor* Integer32
                     | *.os* Integer32 ':' Integer32 ':' Integer32
                     | CustomAttributeDeclaration
                     | SecurityDeclaration

*.hash*
     Specify the hash algorithm to use for hashing other files that make
     up the same assembly manifest.  These files are typically referred
     to using *.file* declarations.  The value 0x8004 is recommended,
     and refers to the SHA1 hash algorithm.

*.publickey*
     Specify the bytes of the public key that was used to sign this
     assembly.  Compilers that write assembly streams normally won't
     need to use this directive because separate tools are used to sign
     assemblies.

*.ver*
     Specify the version number of this assembly.  e.g. `1:0:2411:0'.

*.locale*
     Specify the culture string for this assembly.  This is called
     *.locale* instead of *.culture* for historical reasons.  An
     example of a valid culture value is `en-AU' which indicates
     "English, Australia".

*.processor*
*.os*
     Specify operating systems and processors for which this assembly
     has been built and tested.  Use of these directives is discouraged
     in portable programs.


File: pnettools.info,  Node: Assembly References,  Next: Assembly Reference Members,  Prev: Assembly Members,  Up: Assembly Declarations

Assembly References
-------------------

     AssemblyRefDeclaration => *.assembly* *extern* QualifiedName
                               '{' { AssemblyRefMember } '}'


File: pnettools.info,  Node: Assembly Reference Members,  Next: Module Declarations,  Prev: Assembly References,  Up: Assembly Declarations

Assembly Reference Members
--------------------------

     AssemblyRefMember => *.hash* '=' Bytes
                        | *.publickey* '=' Bytes
                        | *.publickeytoken* '=' Bytes
                        | *.ver* Integer32 ':' Integer32 ':'
                                 Integer32 ':' Integer32
                        | *.locale* ComposedString
                        | *.processor* Integer32
                        | *.os* Integer32 ':' Integer32 ':' Integer32
                        | CustomAttributeDeclaration

*.hash*
     Specify the hash value for the referenced assembly.

*.publickey*
     Specify the bytes of the public key that was used to sign the
     referenced assembly.

*.publickeytoken*
     Specify the low 8 bytes of the SHA1 hash of the public key that was
     used to sign the referenced assembly.

     Only one of *.publickey* or *.publickeytoken* can be specified.
     Tokens are much shorter than full public keys and the full key can
     be obtained from the referenced assembly when it is loaded.

*.ver*
     Specify the version number of the referenced assembly.  e.g.
     `1:0:2411:0'.

*.locale*
     Specify the culture string for the referenced assembly.

*.processor*
*.os*
     Specify operating systems and processors for which the referenced
     assembly has been built and tested.  Use of these directives is
     discouraged in portable programs.


File: pnettools.info,  Node: Module Declarations,  Next: Other Declarations,  Prev: Assembly Reference Members,  Up: Assembler

Module Declarations
===================

     ModuleDeclaration => *.module* QualifiedName
                        | *.module* *extern* QualifiedName

   If the module declaration has custom attributes, they should appear
just after the declaration.


File: pnettools.info,  Node: Other Declarations,  Next: Disassembler,  Prev: Module Declarations,  Up: Assembler

Other Declarations
==================

This section defines the syntax for a number of other declaration kinds
that provide miscellaneous information that does not fall into any of
the above categories.

     VtableDeclaration  => *.vtable* '=' '(' (HEXBYTE)+ ')'
     VtfixupDeclaration => *.vtfixup* '[' Integer32 ']'
                           { VtfixupAttribute } *at* Identifier
     VtfixupAttribute   => *int32*
                         | *int64*
                         | *fromunmanaged*
                         | *callmostderived*


File: pnettools.info,  Node: Disassembler,  Next: ildasm invocation,  Prev: Other Declarations,  Up: Top

Intermediate language disassembler
**********************************

Ildasm converts IL object files (`.obj'), IL executables (`.exe'), and
IL dynamic link libraries (`.dll') into Intermediate Language (IL)
assembly code.  The output is suitable for input to ilasm.

   Ildasm is useful for diagnosing problems with compilers and other
development tools.  It is rarely useful to regular users or programmers.

* Menu:

* ildasm invocation::       Invoking ildasm


File: pnettools.info,  Node: ildasm invocation,  Next: Linker,  Prev: Disassembler,  Up: Disassembler

Invoking ildasm
===============

The general form of the ildasm syntax is as follows:

     ildasm [OPTIONS] INPUT ...

`-o FILE'
`--output FILE'
     Specify the name of the file to write the assembler output to.  The
     default is standard output.  Specifying `FILE' as `-' also
     indicates that the output should be set to standard output.

`-d'
`--dump-sections'
     Dump the contents of the IL program sections in hexadecimal instead
     of as IL assembly code.  This may be useful for diagnosing problems
     with badly formatted IL binaries.

`-r'
`--real-offsets'
     By default, ildasm prints "relative virtual addresses", or RVA's,
     when dumping IL program sections in hexadecimal, and when dumping
     the names of labels within methods.  The `-r' option informs ildasm
     to use real file offsets instead.  This may assist in locating
     data within the file with separate tools.

`-t'
`--show-tokens'
     Show the token codes of program elements within the disassembly
     output.

`-q'
`--quote-names'
     Quote all identifiers within the disassembly output so that they
     are not confused with reserved words.  This is necessary if the
     output will be fed into ilasm.

`-w'
`--whole-file'
     Dump the contents of the whole input file in hexadecimal.  If the
     file is not otherwise recognized by ildasm as an IL binary, this
     may be the only way to inspect the contents to determine what the
     problem is.

`-b'
`--dump-bytes'
     Dump the IL instructions in hexadecimal.

`-n'
`--no-il'
     Do not dump the IL instructions within the methods.

`--help'
     Print a usage message for the ildasm program.

`-v'
`--version'
     Print the version of the ildasm program.

`--'
     Marks the end of the command-line options, and the beginning of
     the input filenames.  You may need to use this if your filename
     begins with `-'.  e.g. `ildasm -- -input.obj'.  This is not needed
     if the input is stdin: `ildasm -' is perfectly valid.

   The exit status is 1 if an error occurred while processing the input.
Otherwise the exit status is 0.  *Note Load Errors::, for a complete
list of errors that may occur when loading an IL image file.


File: pnettools.info,  Node: Linker,  Next: ilalink invocation,  Prev: ildasm invocation,  Up: Top

Intermediate language assembly linker
*************************************

Ilalink links a number of IL object files (`.obj') together, resolves
external references to IL libraries, and creates a final IL executable
(`.exe') or IL dynamic link library (`.dll').

* Menu:

* ilalink invocation::      Invoking ilalink


File: pnettools.info,  Node: ilalink invocation,  Next: Size,  Prev: Linker,  Up: Linker

Invoking ilalink
================

The general form of the ilalink syntax is as follows:

     ilalink [OPTIONS] INPUT ...

`-o FILE'
`--output FILE'
     Specify the name of the file to write the linker output to.  The
     default is `a.out.exe', `a.out.dll', or `a.out.obj', depending on
     the value of the `--format' option.

`-j'
`--format obj'
     Write a `.obj' file as output, instead of an executable or dynamic
     link library.  This is normally not very useful.

`-e'
`--format exe'
     Write an executable file as output, instead of a `.obj' file or
     dynamic link library.  This is the default value.

`-d'
`--format dll'
     Write a dynamic link library file as output, instead of a `.obj'
     file or executable.

`-l NAME'
`--library NAME'
     Link against the library called `NAME'.  The linker will search
     all of the library directories for a file called `NAME.dll'.  If
     `--no-stdlib' is not specified, then the standard library
     `mscorlib' will be automatically added to the list of libraries.
     The name of the standard library can be changed using the
     `-fstdlib-name' option.

`-L PATH'
`--library-dir PATH'
     Specify a directory to be searched for libraries.  The option `-L
     .'  must be explicitly supplied to search the current directory.
     If `--no-stdlib' is not specified, then a standard set of builtin
     paths will be added to the end of the list specified by the `-L'
     options.  The set of builtin paths can be overridden by setting the
     `CSCC_LIB_PATH' environment variable to an appropriate value.

`-n'
`--no-stdlib'
     Do not include the standard library or any of the builtin library
     directories.

`-S NAME'
`-fstdlib-name=NAME'
     Set the name of the standard library to `NAME'.  The default is
     `mscorlib'.

`--shared'
     Link the output as a shared image.  This is the default.

`--static'
     Link the output statically.  This option is not yet implemented.
     It is provided for compatibility with other tools.

`-a NAME'
`-fassembly-name=NAME'
     Set the name of the final assembly to `NAME'.  The default is the
     name of the output file without its directory path or extension.

`-A NN:NN:NN:NN'
`-fassembly-version NN:NN:NN:NN'
     Set the final assembly version to `NN:NN:NN:NN'.  The default is
     `0:0:0:0', unless a non-zero version is supplied by one of the
     input files.

`-M NAME'
`-fmodule-name=NAME'
     Set the name of the final module to `NAME'.  The default is the
     name of the output file without its directory path.

`-E NAME'
`--entry-point NAME'
     Specify the name of the program's entry point.  This should only
     be used if the output is an executable (`.exe').  If this option
     is not present, the linker will attempt to deduce which method is
     the entry point by inspecting the names and signatures of methods
     within the input files.  The name is either a class name, or a
     class name plus method name.  The sequence `::' is used to
     separate the class and method names.  Examples are `MyClass',
     `MyNamespace.MyClass', and `MyNamespace.MyClass::Main'.

`-r FILE'
`-fresources=FILE'
     Specify the name of a resource file to be linked with the output
     assembly.

`-R'
`--resources-only'
     Create an output assembly that only contains resources.  This is
     useful for building satellite resource assemblies for foreign
     languages.

`-p'
`-fprivate-resources'
     Mark the resources as private to the output assembly.

`-H ALG'
`-fhash-algorithm=ALG'
     Set the assembly hash algorithm to `ALG', which must be either
     `SHA1' or `MD5'.  The default is `SHA1'.

`-z'
`-fminimize-parameters'
     Minimize the size of the parameter definition table by discarding
     parameters that don't strictly need to be present for correct
     execution.

`-3'
`-m32bit-only'
     Mark the final output assembly so that it can only be used on
     32-bit systems.  Use of this option is severely discouraged.

`-c'
`-mcui-subsystem'
     Link the final output assembly for the command-line subsystem on
     Windows.  This is the default.

     Link the final output assembly for the GUI subsystem on Windows.

`--help'
     Print a usage message for the ilalink program.

`-v'
`--version'
     Print the version of the ilalink program.

`--'
     Marks the end of the command-line options, and the beginning of
     the input filenames.  You may need to use this if your filename
     begins with `-'.  e.g. `ilalink -- -input.obj'.  This is not
     needed if the input is stdin: `ilalink -' is perfectly valid.

   The `-f' and `-m' options can be specified on the cscc command-line,
and will be passed to the linker automatically by the compiler.

   The exit status is 1 if an error occurred while processing the input.
Otherwise the exit status is 0.


File: pnettools.info,  Node: Size,  Next: ilsize invocation,  Prev: ilalink invocation,  Up: Top

Intermediate language size utility
**********************************

Ilsize lists size information for each of the sections within an IL
object file (`.obj'), an IL executable (`.exe'), or an IL dynamic link
library (`.dll').  The output is similar to that produced by size(1).

* Menu:

* ilsize invocation::       Invoking ilsize


File: pnettools.info,  Node: ilsize invocation,  Next: Native,  Prev: Size,  Up: Size

Invoking ilsize
===============

The general form of the ilsize syntax is as follows:

     ilsize [OPTIONS] input ...

`--radix NUM'
     Set the radix for displaying size values within the output.  The
     default value is 10.  Legal values are 8, 10, and 16.

`-d'
     Set the radix to 10.  Same as `--radix 10'.

`-o'
     Set the radix to 8.   Same as `--radix 8'.

`-x'
     Set the radix to 16.  Same as `--radix 16'.

`-D'
`--detailed'
     Use a more detailed output that also includes the number of
     classes, fields, methods, etc.

`--help'
     Print a usage message for the ilsize program.

`-v'
`-V'
`--version'
     Print the version of the ilsize program.

`--'
     Marks the end of the command-line options, and the beginning of
     the input filenames.  You may need to use this if your filename
     begins with `-'.  e.g. `ilsize -- -input.obj'.  This is not needed
     if the input is stdin: `ilsize -' is perfectly valid.

   The exit status is 1 if an error occurred while processing the input.
Otherwise the exit status is 0.  *Note Load Errors::, for a complete
list of errors that may occur when loading an IL image file.

   Ilsize does not currently understand the format of `.a' or `.lib'
archive libraries, so it cannot display information about archive
contents like size(1) can.


File: pnettools.info,  Node: Native,  Next: ilnative invocation,  Prev: ilsize invocation,  Up: Top

Intermediate language native utility
************************************

Ilnative lists the native methods that are used within an IL object file
(`.obj'), an IL executable (`.exe'), or an IL dynamic link library
(`.dll').  This can aid developers who are building programs that use
native methods, or developers who are attempting to discover which
native methods a third party program requires.

* Menu:

* ilnative invocation::     Invoking ilnative


File: pnettools.info,  Node: ilnative invocation,  Next: Find,  Prev: Native,  Up: Native

Invoking ilnative
=================

The general form of the ilnative syntax is as follows:

     ilnative [OPTIONS] INPUT ...

`-n'
`--names-only'
     Only print the names of the methods, and not the type information.

`--help'
     Print a usage message for the ilnative program.

`-v'
`--version'
     Print the version of the ilnative program.

`--'
     Marks the end of the command-line options, and the beginning of
     the input filenames.  You may need to use this if your filename
     begins with `-'.  e.g. `ilnative -- -input.obj'.  This is not
     needed if the input is stdin: `ilnative -' is perfectly valid.

   The exit status is 1 if an error occurred while processing the input.
Otherwise the exit status is 0.  *Note Load Errors::, for a complete
list of errors that may occur when loading an IL image file.


File: pnettools.info,  Node: Find,  Next: ilfind invocation,  Prev: ilnative invocation,  Up: Top

Intermediate language name find utility
***************************************

Ilfind searches for a pattern within the supplied input files.  Each
input file must be an IL object file (`.obj'), an IL executable
(`.exe'), or an IL dynamic link library (`.dll').

   For each assembly, namespace, class, field, method, event, or
property whose name matches the pattern, a line is written to standard
output describing the match.

* Menu:

* ilfind invocation::       Invoking ilfind


File: pnettools.info,  Node: ilfind invocation,  Next: Dependencies,  Prev: Find,  Up: Find

Invoking ilfind
===============

The general form of the ilfind syntax is as follows:

     ilfind [OPTIONS] PATTERN INPUT ...

`-w'
`--whole-string'
     Match the whole pattern string against names in the input files.
     This is the default.  For example, the pattern `ABC' will match
     classes, fields, and methods called `ABC', but will not match
     items called `ABCD'.

`-s'
`--sub-string'
     Match the pattern against sub-strings of names in the input files.
     For example, the pattern `ABC' will match any item that contains
     `ABC' within its name.

`-f'
`--file-regex'
     Use a file-like regular expression matching scheme.  This is the
     default.  Patterns can use `?' and `*' to match a single character
     or multiple characters.  Patterns can use the characters `[' and
     `]' to group a set of alternative characters.  This pattern syntax
     is similar to that used to match filenames in shells such as sh(1)
     and csh(1).

`-g'

`--grep-regex'
     Use a regular expression matching scheme similar to grep(1).
     Note: the `^' and `$' characters will be implicitly prepended and
     appended to the pattern if whole string matching is enabled (`-w').

`-n'
`--no-regex'
     Do not use regular expression matching.  This will perform a simple
     identity check against names (`-w') or a simple sub-string check
     (`-s').

`-i'
`--ignore-case'
     Ignore case when matching names against the pattern.

`-p'
`--public-only'
     Search only the classes that are publicly accessible.

`--help'
     Print a usage message for the ilfind program.

`-v'
`--version'
     Print the version of the ilfind program.

`--'
     Marks the end of the command-line options.  The next argument is
     the pattern.  You may need to use this if your pattern begins with
     `-'.  e.g. `ilfind -- -name input.obj'.

   The exit status is 1 if an error occurred while processing the input.
Otherwise the exit status is 0.  *Note Load Errors::, for a complete
list of errors that may occur when loading an IL image file.


File: pnettools.info,  Node: Dependencies,  Next: ildd invocation,  Prev: ilfind invocation,  Up: Top

Intermediate language dependency utility
****************************************

Ildd lists the assemblies and modules that are referenced by an IL
object file (`.obj'), an IL executable (`.exe'), or an IL dynamic link
library (`.dll').

* Menu:

* ildd invocation::         Invoking ildd


File: pnettools.info,  Node: ildd invocation,  Next: Resources,  Prev: Dependencies,  Up: Dependencies

Invoking ildd
=============

The general form of the ildd syntax is as follows:

     ildd [OPTIONS] PATTERN INPUT ...

`-f'
`--file-names'
     Print the name of each file that is processed, even if there is
     only one file specified.

`-p'
`--pinvoke'
     Print detailed information about PInvoke declarations.

`-r'
`--recursive'
     Recursively print transitive dependencies.

`--help'
     Print a usage message for the ildd program.

`-v'
`--version'
     Print the version of the ildd program.

`--'
     Marks the end of the command-line options.  The next argument is
     the pattern.  You may need to use this if your filename begins
     with `-'.  e.g. `ildd -- -input.exe'.  This is not needed if the
     input is stdin: `ildd -' is perfectly valid.

   The exit status is 1 if an error occurred while processing the input.
Otherwise the exit status is 0.  *Note Load Errors::, for a complete
list of errors that may occur when loading an IL image file.


File: pnettools.info,  Node: Resources,  Next: resgen invocation,  Prev: ildd invocation,  Up: Top

Resource generation and conversion
**********************************

Resgen converts strings between a number of resource formats that are
used within the Portable.NET platform.  It is typically used to convert
text resources (`.txt'), XML resources (`.resx'), or GNU gettext
resources (.po) into binary resources (`.resources') that can be
attached to an IL executable or dynamic link library.

* Menu:

* resgen invocation::       Invoking resgen
* Resource Format::         Text resource file format
* Resource Examples::       Resource conversion examples


File: pnettools.info,  Node: resgen invocation,  Next: Resource Format,  Prev: Resources,  Up: Resources

Invoking resgen
===============

The general form of the resgen syntax is as follows:

     resgen [OPTIONS] INPUT ... OUTPUT

   Resgen can convert multiple input files into a single output file.
A number of options are available to specify the format of the input
files and the output file.  Alternatively, resgen can guess the format
of a file from its extension:

`.txt'
`.text'
     Text resources.

`.resources'
     Binary resources.

`.resx'
`.xml'
     XML resources.

`.po'
     GNU gettext resources.

`.exe'
`.dll'
`.obj'
`.o'
     Binary resources within an IL image (input only).

   The input filename `-' may be used to specify standard input.  If an
input format is not specified, standard input is assumed to contain
text resources.

   The output filename `-' may be used to specify standard output.  If
an output format is not specified, the format of standard output is
assumed to be text.

`-t'
`--text-input'
     The input files are all assumed to be in text resource format.

`-r'
`--res-input'
     The input files are all assumed to be in binary resource format.

`-i'
`--il-input'
     The input files are all assumed to be IL image files (i.e.
     executables, dynamic link libraries, or object files).

`-x'
`--xml-input'
     The input files are all assumed to be in XML resource format.

`-p'
`--po-input'
     The input files are all assumed to be in GNU gettext .po resource
     format.

`-T'
`--text-output'
     The output format is set to text resources.

`-R'
`--res-output'
     The output format is set to binary resources.

`-X'
`--xml-output'
     The output format is set to XML resources.

`-P'
`--po-output'
     The output format is set to GNU gettext .po resources.

`-s'
`--sort-names'
     When writing text resources as output, sort the resources by name.
     This typically makes it easier for humans to read the output.

     This option is ignored if the output format is not text.

`-l'
`--latin1'
     Interpret text and .po files as Latin-1 rather than UTF-8.

`--help'
     Print a usage message for the resgen program.

`-v'
`--version'
     Print the version of the \fBresgen\fR program.

`--'
     Marks the end of the command-line options, and the beginning of
     the input filenames.  You may need to use this if your filename
     begins with `-'.  e.g. `ilresgen -- -input.txt output.resources'.
     This is not needed if the input is stdin: `ilresgen -
     output.resources' is perfectly valid.

   The exit status is 1 if an error occurred while processing the input.
Otherwise the exit status is 0.


File: pnettools.info,  Node: Resource Format,  Next: Resource Examples,  Prev: resgen invocation,  Up: Resources

Text resource file format
=========================

Text resource files contain one line for each resource.  Each line has
the form `name=value', where `name' is the tag name associated with the
resource, and `value' is the resource's string value.  For example:

     Arg_InvalidBase=Base must be 2, 8, 10, or 16
     Overflow_Byte=Valid Byte values are between 0 and 255, inclusive

   Comments are lines that begin with a `#' character.  Blank lines are
also considered comments.

   Resource string values are assumed to be in the UTF-8 text encoding
unless the `-l' command-line option is supplied.  No other character
sets are currently supported.  Values can contain one of the following
escape sequences, which indicate special characters:

`\n'
     Newline character, `\u000A'.

`\r'
     Carriage return character, `\u000D'.

`\t'
     TAB character, `\u0009'.

`\f'
     Form feed character, `\u000C'.

`\v'
     Vertical TAB character, `\u000B'.

`\0'
     NUL character, `\u0000'.

`\NNN'
     8-bit octal Unicode character.

`\xHH'
     8-bit hexadecimal Unicode character.

`\uHHHH'
     16-bit hexadecimal Unicode character.

`\UHHHHHHHH'
     32-bit hexadecimal Unicode character.


File: pnettools.info,  Node: Resource Examples,  Next: ECMA Extensions,  Prev: Resource Format,  Up: Resources

Resource conversion examples
============================

The following command-line converts three text resource input files
into a binary resource output file:

     resgen file1.txt file2.txt file3.txt output.resources

   If the files did not have extensions whose format can be guessed,
then command-line options can be used specify the formats:

     resgen --text-input --res-output file1 file2 file3 output

   The default resources within an executable can be extracted to text
format on standard output as follows:

     resgen -s program.exe -

   The `-s' option was used here to sort the output so that it is more
easily digested by the user.


File: pnettools.info,  Node: ECMA Extensions,  Next: Object Files,  Prev: Resource Examples,  Up: Top

ECMA file format extensions
***************************

The ECMA Partition II specification for IL binaries is missing some
capabilities that a full development toolchain requires.  This chapter
describes extensions to the ECMA file formats that our development
tools use.  This information is provided to assist interoperation
between free software projects that manipulate IL binaries.

* Menu:

* Object Files::            Object file format extensions
* Debug Symbols::           Debug symbol extensions


File: pnettools.info,  Node: Object Files,  Next: Debug Symbols,  Prev: ECMA Extensions,  Up: ECMA Extensions

Object file format extensions
=============================

The ECMA specifications on IL binaries do not define an object file
format for incremental compilations.  Tools from other vendors
typically take an entire set of source files and compile them to either
a `.exe' or `.dll' in one hit.

   Because we wish to support incremental compilation of programs and
libraries through the cscc compiler, we have defined an object file
format for IL binaries, which is similar to the PE/COFF .obj format on
Windows systems.

   IL object files are PE/COFF images with the following properties:

   * There is no MS-DOS stub program or PE signature.

   * The machine type in the PE/COFF header is always 0x014C (386),
     which also acts as the "magic number" to detect whether a file is
     an object or an executable/DLL.

   * There is no optional header after the main PE/COFF header, and the
     "characteristics" field is set to zero.

   * The IL runtime header, code, resources, metadata, etc are placed in
     a read-only section called `.text$il' instead of `.text'.  The IL
     runtime header begins at the start of the section.

   * Other PE/COFF sections such as `.text', `.rsrc', and `.reloc', can
     be omitted.  If present, they provide information about native
     code which is outside the scope of this specification.

   The IL data in the `.text$il' section is formatted in accordance with
the normal ECMA conventions for DLL's.  At link time, the metadata can
be used to combine multiple object files into a single DLL or
executable.

   This format was designed to be as compatible as possible with regular
PE/COFF object files.  The main distinguishing characteristic is the
use of `.text$il' to tag the file as containing IL data.


File: pnettools.info,  Node: Debug Symbols,  Next: Load Errors,  Prev: Object Files,  Up: ECMA Extensions

Debug symbol extensions
=======================

The assembler syntax defined in the ECMA specification allows for line
number and local variable name information to be inserted into the
assembly code stream.  This information is typically used by
source-level debuggers.

   However, ECMA does not specify a standard way to represent this
debug information in the final IL binary.  It leaves it instead to the
specific implementations.

   The following sections describe the format used by our development
tools for representing debug information within the IL binary.

Requirements
------------

The following requirements were identified for the debug format:

   * It must be easy to strip from an image file.

   * It should not impact runtime engines and tools that are unaware of
     how to handle the debug information.

   * It must be extensible to new debug data in the future, while
     retaining forwards and backwards compatibility.

   * It should be efficient to locate all debug information that is
     relevant to a metadata token.

The `.ildebug' section
----------------------

All debug information for an IL image is placed into a read-only,
discardable, data section called `.ildebug'.

   The contents of `.ildebug' should be the last section within the
PE/COFF image file.  This allows the debug information to be easily
stripped by truncating the image, removing the `.ildebug' entry from
the PE/COFF section table, and reducing the total image size in the
PE/COFF headers.

   The section begins with a header consisting of the following fields:

Magic
     4-byte magic number string `ILDB'.

Version
     32-bit value indicating the version.  This must be 1.

IndexOffset
     32-bit offset from the start of this header to the beginning of
     the token index.

NumIndexEntries
     32-bit value that indicates the number of entries in the token
     index.

StringOffset
     32-bit offset from the start of this header to the beginning of
     the string table.

StringLength
     32-bit value that indicates the length of the string table.

   Unless otherwise stated, all numeric quantities will be assumed to be
in little-endian order.

Token index
-----------

The token index consists of 8-byte entries of the following form:

Token
     32-bit token value.

Offset
     32-bit offset from the start of the debug section to a block of
     debug information that is associated with the token.

   The token index must be sorted into ascending order of "Token", and
should be aligned on a 4-byte boundary.  There may be multiple entries
in the index for the same token.  Use the following algorithm to locate
all debug information for a token:

   * Perform a binary search within the index for the token.

   * Scan backwards in the index until the first entry for the token is
     found.

   * Scan forwards in the index until the last entry for the token is
     found.

   Because the token index is sorted, multiple debug information blocks
for the same token could be in any order.  Tools should not rely upon
the blocks being in any particular order, and are free to change the
order when modifying the debug section.

   All of the debug information in this document refers to a specific
metadata token.  However, in the future it may be possible for debug
information to pertain to the entire image, or to objects other than
metadata tokens.  To store debug information for non-tokens, it is
first necessary to construct a pseudo-token using the following
algorithm:

   * Pick a unique 4-character string for the item.  e.g. `ABCD'.  The
     last character must be 7-bit ASCII.

   * Convert the string into a little-endian value, where the first
     character is assumed to be the least significant byte.  e.g.
     `0x44434241'.

   * Set the high bit of the value to 1.  e.g. `0xC4434241'.

   The result is the pseudo-token value.  Because regular metadata
tokens cannot have their high bit set, this will result in a value that
won't conflict with regular tokens.

   As an additional requirement, standard pseudo-tokens will use upper
case characters in their names.  e.g. `ABCD'.  Private pseudo-tokens
will use lower case characters.  e.g. `abcd'.

String table
------------

The string table stores NUL-terminated strings that are referenced by
the debug information.  In the current version of this document, the
strings will typically be filenames and local variable names.

   Strings are referenced by their index, which is an offset from the
beginning of the string table.  The string value begins at that offset
and continues until the next zero byte is encountered.  The last byte
in the string table must be zero, which means that the string table can
never be empty.

   This document does not specify any particular character set for the
strings.

Debug information blocks
------------------------

Each entry in the token index contains an offset of the debug
information that is associated with that entry.  This debug information
begins with the following header:

Type
     The type of debug information.

Length
     The number of bytes of debug information that follow this header.

   The "Type" and "Length" values are encoded with the same multi-byte
"compressed" format used in metadata to encode unsigned 32-bit values:

0-127
     Encode as the value itself in a single byte.

128-16383
     Encode as `(0x80 | (value >> 8))', `(value & 0xFF)'.  Note: 16383
     is (2^14 - 1).

16384-536870911
     Encode as `(0xC0 | (value >> 24))', `((value >> 16) & 0xFF)',
     `((value >> 8) & 0xFF)', `(value & 0xFF)'.  Note: 536870911 is
     (2^29 - 1).

536870912-4294967295
     Encode as `0xE0', `((value >> 24) & 0xFF)', `((value >> 16) &
     0xFF)', `((value >> 8) & 0xFF)', `(value & 0xFF)'.

   The following debug types are supported, which are further described
in the following sections:

1
     Line number and column block.

2
     Line number and offsets block.

3
     Line number, column, and offsets block.

4
     Local variables block.

5
     Local variables and offsets block.

   If a debug block type is not understood, it should be silently
ignored.  This allows future versions of this specification to extend
the set of debug block types without affecting existing implementations

   All of the values described below are encoded using the above
multi-byte compressed format.

Line number and column block
----------------------------

This block begins with an index into the string table that indicates
the name of the file.  The rest of the block consists of pairs of line
number and column values.  A value of zero indicates an unspecified
line or column.

   This block type is typically used for metadata tokens, other than
methods, to indicate the line in the source file where the token was
declared.

Line number and offsets block
-----------------------------

This block begins with an index into the string table that indicates
the name of the file.  The rest of the block consists of pairs of line
number and offset values.

   This block type is typically used for method tokens, to indicate
which source file line corresponds to which offset within the method's
code.

Line number, column, and offsets block
--------------------------------------

This block begins with an index into the string table that indicates
the name of the file.  The rest of the block consists of triples of
line number, column, and offset values.  A value of zero for the line
or column indicates that it is unspecified.

   This block type is typically used for method tokens, to indicate
which source file line corresponds to which offset within the method's
code.

   The previous type is more compact if column numbers are not
available.

Local variables block
---------------------

This block consists of pairs of name and index values.  The name value
is an offset into the string table and indicates the name of the local
variable.  The index is the number assigned to the local variable within
the method's code.

   This block type is typically used for method tokens whose local
variables extend for the entire scope of the method's body.

Local variables and offsets block
---------------------------------

This block begins with two offset values, indicating the start and end
of a region of code.  The rest of the block consists of pairs of name
and index values for the local variables.

   This block is typically used for method tokens where some of the
local variables have a scope that does not extend for the entire length
of the method's body.  Thus, it is possible for the same local variable
name to refer to different indices at different points within the code.

   Multiple local variable blocks for a method do not need to be
ordered in any particular way.  Debug tools may need to sort the blocks
so that names in inner scopes override those in outer scopes.

Standard pseudo-tokens
----------------------

The `LDIR' pseudo-token is used to record the link directory, so that
relative source filenames can be properly resolved to absolute source
filenames.  The attached data block should have type 0, and contain a
string index for the link directory.


File: pnettools.info,  Node: Load Errors,  Next: Index,  Prev: Debug Symbols,  Up: Top

Errors while loading IL binaries
********************************

`filename: truncated image'
     The input file is truncated in some way that prevents it from being
     read as an IL image.

`filename: not a valid PE/COFF image'
     The input file is not a PE/COFF file.  That is, it is not formatted
     as a Windows executable or dynamic link library, and is also not
     formatted as an object file.  *Note Object Files::, for details on
     the object file format.

`filename: image does not contain IL data (may be an ordinary Windows executable)'
     The input file is a valid PE/COFF file, but it does not contain an
     IL binary within it.  It is probably an ordinary native Windows
     executable that cannot be processed by the development tools.

`filename: incorrect IL version'
     The input file is a valid PE/COFF file that contains a valid IL
     binary, but the IL data is for an unsupported version.

`filename: required sections in reverse order'
     There was something wrong with the order of sections within the
     file that caused the loader to need to seek backwards.  This will
     normally only happen for IL binaries that have been incorrectly
     generated or corrupted in some way.

`filename: not enough memory to load image'
     The IL binary was so large that it could not be loaded into memory
     prior to processing.

`filename: bad addresses in image'
     The PE/COFF file or IL binary within the file contained a "relative
     virtual address", or RVA, that was invalid.  This will normally
     only happen for IL binaries that have been incorrectly generated or
     corrupted in some way.

`filename: invalid metadata in image'
     The metadata section was invalid in some way.  Usually this
     indicates a corrupted IL binary.

`filename: uses undocumented metadata feature'
     The metadata section was mostly valid, but it used features for
     which we do not have sufficient documentation to parse
     successfully.

`filename: unresolved external references'
     The metadata section was valid, but it referred to types in another
     file that could not be fully resolved.

`metadata error: ...'
     Depending on how the development tools were built, errors of this
     kind may appear in addition to the other errors listed above.
     They provide additional diagnostics that mainly of interest to the
     authors.  If you come across a file that produces such an error,
     then contact the authors.

   In addition, any of the usual filesystem-related errors may be
produced.  For example, `filename: No such file or directory'.


File: pnettools.info,  Node: Index,  Prev: Load Errors,  Up: Top

Index
*****

* Menu:

* #using directive:                      Referring to C# types.
* -3 option (ilalink):                   ilalink invocation.
* -3 option (ilasm):                     ilasm invocation.
* -a option (ilalink):                   ilalink invocation.
* -A option (ilalink):                   ilalink invocation.
* -b option (csant):                     csant invocation.
* -B option (csant):                     csant invocation.
* -b option (ildasm):                    ildasm invocation.
* -base-build-dir option (csant):        csant invocation.
* -base-src-dir option (csant):          csant invocation.
* -C option (csant):                     csant invocation.
* -c option (csant):                     csant invocation.
* -C option (cscc plug-in):              Language Plugins.
* -c option (cscc):                      Overall Options.
* -C option (cscc):                      Preprocessor Options.
* -c option (ilalink):                   ilalink invocation.
* -c option (ilasm):                     ilasm invocation.
* -compiler option (csant):              csant invocation.
* -csc-redirect option (csant):          csant invocation.
* -D option (csant):                     csant invocation.
* -d option (csant):                     csant invocation.
* -D option (cscc plug-in):              Language Plugins.
* -D option (cscc):                      Preprocessor Options.
* -d option (ilalink):                   ilalink invocation.
* -d option (ilasm):                     ilasm invocation.
* -d option (ildasm):                    ildasm invocation.
* -D option (ilsize):                    ilsize invocation.
* -d option (ilsize):                    ilsize invocation.
* -debug option (ilasm):                 ilasm invocation.
* -define option (csant):                csant invocation.
* -detailed option (ilsize):             ilsize invocation.
* -dM option (cscc plug-in):             Language Plugins.
* -dM option (cscc):                     Preprocessor Options.
* -dN option (cscc plug-in):             Language Plugins.
* -dN option (cscc):                     Preprocessor Options.
* -dummy-doc option (csant):             csant invocation.
* -dump-bytes option (ildasm):           ildasm invocation.
* -dump-sections option (ildasm):        ildasm invocation.
* -dumpversion option (cscc):            Other Options.
* -E option (cscc plug-in):              Language Plugins.
* -E option (cscc):                      Overall Options.
* -e option (cscc):                      Linker Options.
* -E option (ilalink):                   ilalink invocation.
* -e option (ilalink):                   ilalink invocation.
* -e option (ilasm):                     ilasm invocation.
* -entry-point option (ilalink):         ilalink invocation.
* -f option (csant):                     csant invocation.
* -f option (ildd):                      ildd invocation.
* -f option (ilfind):                    ilfind invocation.
* -f* option (cscc plug-in):             Language Plugins.
* -fassembly-name option (ilalink):      ilalink invocation.
* -fassembly-version option (ilalink):   ilalink invocation.
* -fby-library option (csdoc2hier):      csdoc2hier invocation.
* -fchapternewpage option (csdoc2texi):  csdoc2texi invocation.
* -fchecked option (cscc):               Language Options.
* -fcombine-members option (csdoc2html): csdoc2html invocation.
* -fcopyright option (csdoc2texi):       csdoc2texi invocation.
* -fdecimal-constants option (cscc):     Language Options.
* -fdefn-color option (csdoc2html):      csdoc2html invocation.
* -fdescription option (csdoc2texi):     csdoc2texi invocation.
* -fembedded option (csdoc2texi):        csdoc2texi invocation.
* -ffilename option (csdoc2texi):        csdoc2texi invocation.
* -fframes option (csdoc2html):          csdoc2html invocation.
* -fhash-algorithm option (ilalink):     ilalink invocation.
* -fheader-color option (csdoc2html):    csdoc2html invocation.
* -filasm-path option (cscc):            Assembler Options.
* -file option (csant):                  csant invocation.
* -file-names option (ildd):             ildd invocation.
* -file-regex option (ilfind):           ilfind invocation.
* -findex option (csdoc2texi):           csdoc2texi invocation.
* -flatin1-charset option (cscc):        Language Options.
* -flibrary-name option (csdoc):         csdoc invocation.
* -fminimize-parameters option (ilalink): ilalink invocation.
* -fmodule-name option (ilalink):        ilalink invocation.
* -fmulti-file option (csdoc2html):      csdoc2html invocation.
* -fnamespace-directories option (csdoc2html): csdoc2html invocation.
* -fnewpage option (csdoc2texi):         csdoc2texi invocation.
* -fno-frames option (csdoc2html):       csdoc2html invocation.
* -fno-index option (csdoc2texi):        csdoc2texi invocation.
* -fno-namespace-directories option (csdoc2html): csdoc2html invocation.
* -fno-newpage option (csdoc2texi):      csdoc2texi invocation.
* -fno-peephole option (cscc):           Optimization Options.
* -fno-short-insns option (cscc):        Assembler Options.
* -fno-short-insns option (ilasm):       ilasm invocation.
* -fnostdinc option (cscc):              Directory Options.
* -fnostdinc++ option (cscc):            Directory Options.
* -foctal-chars option (cscc):           Language Options.
* -foctal-constants option (cscc):       Language Options.
* -format dll option (ilalink):          ilalink invocation.
* -format dll option (ilasm):            ilasm invocation.
* -format exe option (ilalink):          ilalink invocation.
* -format exe option (ilasm):            ilasm invocation.
* -format obj option (ilalink):          ilalink invocation.
* -format obj option (ilasm):            ilasm invocation.
* -fpage-color option (csdoc2html):      csdoc2html invocation.
* -fparent option (csdoc2texi):          csdoc2texi invocation.
* -fplugin-KEY-path option (cscc):       Other Options.
* -fprivate option (csdoc):              csdoc invocation.
* -fprivate-resources option (ilalink):  ilalink invocation.
* -fresources option (cscc):             Linker Options.
* -fresources option (ilalink):          ilalink invocation.
* -fsave-asm option (cscc):              Assembler Options.
* -fsemantic-check option (cscc):        Language Options.
* -fseparate-members option (csdoc2html): csdoc2html invocation.
* -fshort-insns option (ilasm):          ilasm invocation.
* -fsingle-file option (csdoc2html):     csdoc2html invocation.
* -fstandalone option (csdoc2texi):      csdoc2texi invocation.
* -fstdlib-name option (cscc):           Assembler Options.
* -fstdlib-name option (ilalink):        ilalink invocation.
* -fstdlib-name option (ilasm):          ilasm invocation.
* -fsyntax-check option (cscc):          Language Options.
* -ftitle option (csdoc2html):           csdoc2html invocation.
* -ftitle option (csdoc2texi):           csdoc2texi invocation.
* -funchecked option (cscc):             Language Options.
* -funsafe option (cscc):                Language Options.
* -g option (cscc plug-in):              Language Plugins.
* -g option (cscc):                      Debugging Options.
* -G option (ilalink):                   ilalink invocation.
* -g option (ilasm):                     ilasm invocation.
* -G option (ilasm):                     ilasm invocation.
* -g option (ilfind):                    ilfind invocation.
* -gnome option (cscc):                  Linker Options.
* -grep-regex option (ilfind):           ilfind invocation.
* -gtk option (cscc):                    Linker Options.
* -H option (ilalink):                   ilalink invocation.
* -help option (csant):                  csant invocation.
* -help option (cscc):                   Other Options.
* -help option (csdoc2hier):             csdoc2hier invocation.
* -help option (csdoc2html):             csdoc2html invocation.
* -help option (csdoc2texi):             csdoc2texi invocation.
* -help option (ilalink):                ilalink invocation.
* -help option (ilasm):                  ilasm invocation.
* -help option (ildasm):                 ildasm invocation.
* -help option (ildd):                   ildd invocation.
* -help option (ilfind):                 ilfind invocation.
* -help option (ilnative):               ilnative invocation.
* -help option (ilsize):                 ilsize invocation.
* -help option (resgen):                 resgen invocation.
* -I option (cscc plug-in):              Language Plugins.
* -I option (cscc):                      Directory Options.
* -i option (ilfind):                    ilfind invocation.
* -i option (resgen):                    resgen invocation.
* -ignore-case option (ilfind):          ilfind invocation.
* -il-input option (resgen):             resgen invocation.
* -J option (cscc plug-in):              Language Plugins.
* -j option (ilalink):                   ilalink invocation.
* -j option (ilasm):                     ilasm invocation.
* -J option (ilasm):                     ilasm invocation.
* -just-print option (csant):            csant invocation.
* -k option (csant):                     csant invocation.
* -K option (cscc plug-in):              Language Plugins.
* -keep-going option (csant):            csant invocation.
* -L option (cscc plug-in):              Language Plugins.
* -l option (cscc plug-in):              Language Plugins.
* -l option (cscc):                      Linker Options.
* -L option (cscc):                      Linker Options.
* -L option (ilalink):                   ilalink invocation.
* -l option (ilalink):                   ilalink invocation.
* -L option (ilasm):                     ilasm invocation.
* -l option (ilasm):                     ilasm invocation.
* -l option (resgen):                    resgen invocation.
* -latin1 option (resgen):               resgen invocation.
* -library option (ilalink):             ilalink invocation.
* -library-dir option (ilalink):         ilalink invocation.
* -m option (csant):                     csant invocation.
* -M option (cscc plug-in):              Language Plugins.
* -M option (ilalink):                   ilalink invocation.
* -m* option (cscc plug-in):             Language Plugins.
* -m32bit-only option (cscc):            Linker Options.
* -m32bit-only option (ilalink):         ilalink invocation.
* -m32bit-only option (ilasm):           ilasm invocation.
* -mcui-subsystem option (cscc):         Linker Options.
* -mcui-subsystem option (ilalink):      ilalink invocation.
* -mcui-subsystem option (ilasm):        ilasm invocation.
* -mgui-subsystem option (cscc):         Linker Options.
* -mgui-subsystem option (ilalink):      ilalink invocation.
* -mgui-subsystem option (ilasm):        ilasm invocation.
* -mjvm option (cscc plug-in):           Language Plugins.
* -mjvm option (cscc):                   Assembler Options.
* -mjvm option (ilasm):                  ilasm invocation.
* -mono-corlib option (csant):           csant invocation.
* -n option (csant):                     csant invocation.
* -n option (ilalink):                   ilalink invocation.
* -n option (ilasm):                     ilasm invocation.
* -n option (ildasm):                    ildasm invocation.
* -n option (ilfind):                    ilfind invocation.
* -n option (ilnative):                  ilnative invocation.
* -names-only option (ilnative):         ilnative invocation.
* -no-debug option (ilasm):              ilasm invocation.
* -no-il option (ildasm):                ildasm invocation.
* -no-regex option (ilfind):             ilfind invocation.
* -no-stdlib option (ilalink):           ilalink invocation.
* -nostdinc option (cscc plug-in):       Language Plugins.
* -nostdinc++ option (cscc plug-in):     Language Plugins.
* -nostdlib option (cscc plug-in):       Language Plugins.
* -nostdlib option (cscc):               Linker Options.
* -o option (cscc plug-in):              Language Plugins.
* -O option (cscc plug-in):              Language Plugins.
* -o option (cscc):                      Overall Options.
* -O option (cscc):                      Optimization Options.
* -o option (csdoc):                     csdoc invocation.
* -o option (csdoc2hier):                csdoc2hier invocation.
* -o option (csdoc2html):                csdoc2html invocation.
* -o option (csdoc2texi):                csdoc2texi invocation.
* -o option (ilalink):                   ilalink invocation.
* -o option (ilasm):                     ilasm invocation.
* -o option (ildasm):                    ildasm invocation.
* -o option (ilsize):                    ilsize invocation.
* -O0 option (cscc plug-in):             Language Plugins.
* -O0 option (cscc):                     Optimization Options.
* -O2 option (cscc plug-in):             Language Plugins.
* -O2 option (cscc):                     Optimization Options.
* -O3 option (cscc plug-in):             Language Plugins.
* -O3 option (cscc):                     Optimization Options.
* -output option (csdoc2hier):           csdoc2hier invocation.
* -output option (csdoc2html):           csdoc2html invocation.
* -output option (csdoc2texi):           csdoc2texi invocation.
* -output option (ilalink):              ilalink invocation.
* -output option (ilasm):                ilasm invocation.
* -output option (ildasm):               ildasm invocation.
* -p option (csant):                     csant invocation.
* -P option (cscc plug-in):              Language Plugins.
* -P option (cscc):                      Preprocessor Options.
* -p option (ilalink):                   ilalink invocation.
* -p option (ildd):                      ildd invocation.
* -p option (ilfind):                    ilfind invocation.
* -P option (resgen):                    resgen invocation.
* -p option (resgen):                    resgen invocation.
* -pinvoke option (ildd):                ildd invocation.
* -pipe option (cscc plug-in):           Language Plugins.
* -pipe option (cscc):                   Overall Options.
* -po-input option (resgen):             resgen invocation.
* -po-output option (resgen):            resgen invocation.
* -profile option (csant):               csant invocation.
* -public-only option (ilfind):          ilfind invocation.
* -q option (ildasm):                    ildasm invocation.
* -quote-names option (ildasm):          ildasm invocation.
* -r option (ilalink):                   ilalink invocation.
* -R option (ilalink):                   ilalink invocation.
* -r option (ildasm):                    ildasm invocation.
* -r option (ildd):                      ildd invocation.
* -r option (resgen):                    resgen invocation.
* -R option (resgen):                    resgen invocation.
* -radix option (ilsize):                ilsize invocation.
* -real-offsets option (ildasm):         ildasm invocation.
* -recursive option (ildd):              ildd invocation.
* -res-input option (resgen):            resgen invocation.
* -res-output option (resgen):           resgen invocation.
* -resources-only option (ilalink):      ilalink invocation.
* -s option (csant):                     csant invocation.
* -S option (cscc):                      Overall Options.
* -S option (ilalink):                   ilalink invocation.
* -s option (ilasm):                     ilasm invocation.
* -s option (ilfind):                    ilfind invocation.
* -s option (resgen):                    resgen invocation.
* -shared option (cscc):                 Linker Options.
* -shared option (ilalink):              ilalink invocation.
* -show-tokens option (ildasm):          ildasm invocation.
* -silent option (csant):                csant invocation.
* -sort-names option (resgen):           resgen invocation.
* -static option (cscc):                 Linker Options.
* -static option (ilalink):              ilalink invocation.
* -sub-string option (ilfind):           ilfind invocation.
* -t option (ildasm):                    ildasm invocation.
* -T option (resgen):                    resgen invocation.
* -t option (resgen):                    resgen invocation.
* -text-input option (resgen):           resgen invocation.
* -text-output option (resgen):          resgen invocation.
* -U option (cscc plug-in):              Language Plugins.
* -U option (cscc):                      Preprocessor Options.
* -undef option (cscc plug-in):          Language Plugins.
* -undef option (cscc):                  Preprocessor Options.
* -v option (csant):                     csant invocation.
* -v option (cscc plug-in):              Language Plugins.
* -v option (cscc):                      Overall Options.
* -v option (csdoc2hier):                csdoc2hier invocation.
* -v option (csdoc2html):                csdoc2html invocation.
* -v option (csdoc2texi):                csdoc2texi invocation.
* -v option (ilalink):                   ilalink invocation.
* -v option (ilasm):                     ilasm invocation.
* -v option (ildasm):                    ildasm invocation.
* -v option (ildd):                      ildd invocation.
* -v option (ilfind):                    ilfind invocation.
* -v option (ilnative):                  ilnative invocation.
* -v option (ilsize):                    ilsize invocation.
* -V option (ilsize):                    ilsize invocation.
* -v option (resgen):                    resgen invocation.
* -version option (csant):               csant invocation.
* -version option (csdoc2hier):          csdoc2hier invocation.
* -version option (csdoc2html):          csdoc2html invocation.
* -version option (csdoc2texi):          csdoc2texi invocation.
* -version option (ilalink):             ilalink invocation.
* -version option (ilasm):               ilasm invocation.
* -version option (ildasm):              ildasm invocation.
* -version option (ildd):                ildd invocation.
* -version option (ilfind):              ilfind invocation.
* -version option (ilnative):            ilnative invocation.
* -version option (ilsize):              ilsize invocation.
* -version option (resgen):              resgen invocation.
* -vv option (cscc):                     Overall Options.
* -w option (cscc plug-in):              Language Plugins.
* -W option (cscc):                      Warning Options.
* -w option (cscc):                      Warning Options.
* -w option (ildasm):                    ildasm invocation.
* -w option (ilfind):                    ilfind invocation.
* -W* option (cscc plug-in):             Language Plugins.
* -Wall option (cscc plug-in):           Language Plugins.
* -Wall option (cscc):                   Warning Options.
* -Wempty-input option (cscc):           Warning Options.
* -Werror option (cscc plug-in):         Language Plugins.
* -Werror option (cscc):                 Warning Options.
* -whole-file option (ildasm):           ildasm invocation.
* -whole-string option (ilfind):         ilfind invocation.
* -winforms option (cscc):               Linker Options.
* -Winvalid-utf8 option (cscc):          Warning Options.
* -Wlarge-unicode-chars option (cscc):   Warning Options.
* -Wmulti-char-constant option (cscc):   Warning Options.
* -Wno-* option (cscc plug-in):          Language Plugins.
* -Woctal-chars option (cscc):           Warning Options.
* -Woctal-constants option (cscc):       Warning Options.
* -Wunknown-escapes option (cscc):       Warning Options.
* -Wunsafe option (cscc):                Warning Options.
* -x option (cscc):                      Overall Options.
* -x option (ilsize):                    ilsize invocation.
* -X option (resgen):                    resgen invocation.
* -x option (resgen):                    resgen invocation.
* -xml-input option (resgen):            resgen invocation.
* -xml-output option (resgen):           resgen invocation.
* -z option (ilalink):                   ilalink invocation.
* .addon directive:                      Event Members.
* .assembly directive:                   Assembly Declarations.
* .assembly extern directive:            Assembly References.
* .class directive:                      Class Declarations.
* .custom directive:                     Custom Attributes.
* .event directive:                      Event Declarations.
* .field directive:                      Field Declarations.
* .fire directive:                       Event Members.
* .get directive:                        Property Members.
* .ildebug section:                      Debug Symbols.
* .library directive:                    Class References.
* .line directive:                       Debug Information.
* .method directive:                     Method Declarations.
* .module directive:                     Module Declarations.
* .other directive for events:           Event Members.
* .other directive for properties:       Property Members.
* .pack directive:                       Class Layout.
* .property directive:                   Property Declarations.
* .removeon directive:                   Event Members.
* .set directive:                        Property Members.
* .size directive:                       Class Layout.
* .text$il section:                      Object Files.
* __arglist keyword:                     Special Keywords.
* __asm__ keyword:                       Other keywords.
* __attribute__ keyword:                 Other keywords.
* __box keyword:                         Boxing and unboxing.
* __builtin_constant keyword:            Special Keywords.
* __catch__ keyword:                     C# keywords.
* __checked__ keyword:                   C# keywords.
* __const__ keyword:                     Other keywords.
* __CSCC__ macro:                        Pre-defined Macros.
* __declspec keyword:                    Thread-specific variables.
* __false__ keyword:                     C# keywords.
* __finally keyword:                     C# keywords.
* __finally__ keyword:                   C# keywords.
* __func__ keyword:                      Other keywords.
* __FUNCTION__ keyword:                  Other keywords.
* __inline__ keyword:                    Other keywords.
* __int64 keyword:                       Primitive types.
* __JVM__ macro:                         Pre-defined Macros.
* __lock__ keyword:                      C# keywords.
* __makeref keyword:                     Special Keywords.
* __namespace__ keyword:                 Referring to C# types.
* __null__ keyword:                      C# keywords.
* __PRETTY_FUNCTION__ keyword:           Other keywords.
* __reftype keyword:                     Special Keywords.
* __refvalue keyword:                    Special Keywords.
* __signed__ keyword:                    Other keywords.
* __true__ keyword:                      C# keywords.
* __try__ keyword:                       C# keywords.
* __typeof keyword:                      Typeof operator.
* __typeof__ keyword:                    Other keywords.
* __unsigned_int__ keyword:              Other keywords.
* __using__ keyword:                     Referring to C# types.
* __volatile__ keyword:                  Other keywords.
* __wchar__ keyword:                     Primitive types.
* _Bool keyword:                         Primitive types.
* abstract attribute (types):            Class Attributes.
* alloca:                                Setjmp and alloca.
* ansi attribute (types):                Class Attributes.
* arg (csant tag):                       Compile tag.
* Assembler:                             Assembler.
* Assembler options for cscc:            Assembler Options.
* Assembler Syntax:                      Assembler Syntax.
* Assembly Attributes:                   Assembly Attributes.
* Assembly Declarations:                 Assembly Declarations.
* Assembly Members:                      Assembly Members.
* Assembly Reference Members:            Assembly Reference Members.
* Assembly References:                   Assembly References.
* AssemblyAttribute:                     Assembly Attributes.
* AssemblyDeclaration:                   Assembly Declarations.
* AssemblyMember:                        Assembly Members.
* AssemblyName:                          Assembly Declarations.
* AssemblyRefDeclaration:                Assembly References.
* AssemblyRefMember:                     Assembly Reference Members.
* auto attribute (types):                Class Attributes.
* autochar attribute (types):            Class Attributes.
* beforefieldinit attribute (types):     Class Attributes.
* Bounds:                                Type Specifications.
* Boxing and unboxing:                   Boxing and unboxing.
* Build management:                      Build Management.
* Builtin build properties:              Builtin build properties.
* Bytes:                                 Helper Non-Terminals.
* C Compiler:                            C Compiler.
* C# Compiler:                           C# Compiler.
* C# Differences:                        Differences.
* C# keywords in C:                      C# keywords.
* C# types in C:                         Referring to C# types.
* Calling C from C#:                     Calling C from C#.
* Calling Conventions:                   Calling Conventions.
* CallingConventions:                    Calling Conventions.
* Class Attributes:                      Class Attributes.
* Class Declarations:                    Class Declarations.
* Class Layout:                          Class Layout.
* Class Members:                         Class Members.
* Class References:                      Class References.
* ClassAttribute:                        Class Attributes.
* ClassDeclaration:                      Class Declarations.
* ClassLayoutDeclaration:                Class Layout.
* ClassMember:                           Class Members.
* ClassName:                             Class References.
* compile (csant tag):                   Build file syntax.
* Compiling to the JVM:                  Compiling to the JVM.
* ComposedString:                        Helper Non-Terminals.
* copy (csant tag):                      Build file syntax.
* Creating profiles:                     Creating profiles.
* csant:                                 Build Management.
* csant (csant tag):                     Build file syntax.
* csant build file syntax:               Build file syntax.
* csant compile tag:                     Compile tag.
* csant invocation:                      csant invocation.
* csant.build.dir property:              Builtin build properties.
* csant.buildfile property:              Builtin build properties.
* csant.compiler property:               Builtin build properties.
* csant.project.name property:           Builtin build properties.
* csant.src.dir property:                Builtin build properties.
* csc (csant tag):                       Build file syntax.
* csc property:                          Builtin build properties.
* cscc:                                  C# Compiler.
* cscc (csant tag):                      Build file syntax.
* cscc invocation:                       cscc invocation.
* cscc option summary:                   Option Summary.
* cscc property:                         Builtin build properties.
* cscc.plugins.c property:               Builtin build properties.
* cscc.plugins.cs property:              Builtin build properties.
* csdoc (csant tag):                     Build file syntax.
* csdoc invocation:                      csdoc invocation.
* csdoc property:                        Builtin build properties.
* csdoc2hier invocation:                 csdoc2hier invocation.
* csdoc2html invocation:                 csdoc2html invocation.
* csdoc2texi invocation:                 csdoc2texi invocation.
* Custom Attributes:                     Custom Attributes.
* CustomAttributeDeclaration:            Custom Attributes.
* Debug Information:                     Debug Information.
* DEBUG macro:                           Pre-defined Macros.
* Debug Symbols:                         Debug Symbols.
* Debugging options for cscc:            Debugging Options.
* DebugInformation:                      Debug Information.
* Declaration:                           Top-Level Declarations.
* define (csant tag):                    Compile tag.
* delete (csant tag):                    Build file syntax.
* Dependencies:                          Dependencies.
* Directory options for cscc:            Directory Options.
* Disassembler:                          Disassembler.
* Documentation:                         Documentation.
* Documentation cross-references:        Cross-References.
* Documentation markup:                  Documentation Markup.
* Documentation sections:                Documentation Sections.
* double_epsilon builtin constant:       Special Keywords.
* double_max builtin constant:           Special Keywords.
* double_min builtin constant:           Special Keywords.
* echo (csant tag):                      Build file syntax.
* ECMA Extensions:                       ECMA Extensions.
* Event Attributes:                      Event Attributes.
* Event Declarations:                    Event Declarations.
* Event Members:                         Event Members.
* EventAttribute:                        Event Attributes.
* EventDeclaration:                      Event Declarations.
* EventMember:                           Event Members.
* explicit attribute (types):            Class Attributes.
* fail (csant tag):                      Build file syntax.
* Field Attributes:                      Field Attributes.
* Field Declarations:                    Field Declarations.
* Field Initialization:                  Field Initialization.
* Field Layout:                          Field Layout.
* Field References:                      Field References.
* FieldAttribute:                        Field Attributes.
* FieldDeclaration:                      Field Declarations.
* FieldInitialization:                   Field Initialization.
* FieldReference:                        Field References.
* Find:                                  Find.
* Float64:                               Helper Non-Terminals.
* float_epsilon builtin constant:        Special Keywords.
* float_max builtin constant:            Special Keywords.
* float_min builtin constant:            Special Keywords.
* Hello World in C:                      Hello World.
* Helper Non-Terminals:                  Helper Non-Terminals.
* Identifier:                            Helper Non-Terminals.
* ilalink:                               Linker.
* ilalink invocation:                    ilalink invocation.
* ilasm:                                 Assembler.
* ilasm invocation:                      ilasm invocation.
* ildasm:                                Disassembler.
* ildasm invocation:                     ildasm invocation.
* ildd:                                  Dependencies.
* ildd invocation:                       ildd invocation.
* ilfind:                                Find.
* ilfind invocation:                     ilfind invocation.
* ilnative:                              Native.
* ilnative invocation:                   ilnative invocation.
* ilsize:                                Size.
* ilsize invocation:                     ilsize invocation.
* Implementation Attributes:             Implementation Attributes.
* ImplementationAttributes:              Implementation Attributes.
* import attribute (types):              Class Attributes.
* ImportScope:                           Class References.
* Integer32:                             Helper Non-Terminals.
* Integer64:                             Helper Non-Terminals.
* interface attribute (types):           Class Attributes.
* Java Method Members:                   Java Method Members.
* Labels as values:                      Labels as values.
* Language options for cscc:             Language Options.
* Language plugins:                      Language Plugins.
* Lexical tokens:                        Lexical Tokens.
* Linker:                                Linker.
* Linker options for cscc:               Linker Options.
* Load Errors:                           Load Errors.
* MarshalledType:                        Type Specifications.
* mcs (csant tag):                       Build file syntax.
* mcs property:                          Builtin build properties.
* Method Attributes:                     Method Attributes.
* Method Declarations:                   Method Declarations.
* Method Members:                        Method Members.
* Method References:                     Method References.
* Method Signatures:                     Method Signatures.
* MethodAttribute:                       Method Attributes.
* MethodDeclaration:                     Method Declarations.
* MethodMember:                          Method Members.
* MethodName:                            Method Declarations.
* MethodReference:                       Method References.
* mkdir (csant tag):                     Build file syntax.
* Module Declarations:                   Module Declarations.
* ModuleDeclaration:                     Module Declarations.
* Namespace Declarations:                Namespace Declarations.
* NamespaceDeclaration:                  Namespace Declarations.
* nant (csant tag):                      Build file syntax.
* Native:                                Native.
* NativeType:                            Type Specifications.
* nested assembly attribute (types):     Class Attributes.
* nested famandassem attribute (types):  Class Attributes.
* nested family attribute (types):       Class Attributes.
* nested famorassem attribute (types):   Class Attributes.
* nested private attribute (types):      Class Attributes.
* nested public attribute (types):       Class Attributes.
* Object Files:                          Object Files.
* Object strings:                        String literals.
* Optimization options for cscc:         Optimization Options.
* Other C keywords:                      Other keywords.
* Other Declarations:                    Other Declarations.
* Other options for cscc:                Other Options.
* Overall options for cscc:              Overall Options.
* Overview:                              Overview.
* ParameterAttribute:                    Method Signatures.
* PInvoke in C:                          PInvoke importing.
* PInvoke Methods:                       PInvoke Methods.
* PInvokeAttribute:                      PInvoke Methods.
* PInvokeParameters:                     PInvoke Methods.
* Pre-defined macros:                    Pre-defined Macros.
* Pre-processor syntax:                  Pre-processor Syntax.
* Preprocessor options for cscc:         Preprocessor Options.
* Primitive C types:                     Primitive types.
* PrimitiveType:                         Type Specifications.
* private attribute (types):             Class Attributes.
* project (csant tag):                   Build file syntax.
* property (csant tag):                  Build file syntax.
* Property Attributes:                   Property Attributes.
* Property Declarations:                 Property Declarations.
* Property Members:                      Property Members.
* PropertyAttribute:                     Property Attributes.
* PropertyDeclaration:                   Property Declarations.
* PropertyMember:                        Property Members.
* public attribute (types):              Class Attributes.
* QualifiedName:                         Helper Non-Terminals.
* Reference parameters:                  Reference parameters.
* references (csant tag):                Compile tag.
* RELEASE macro:                         Pre-defined Macros.
* resgen:                                Resources.
* resgen invocation:                     resgen invocation.
* Resource Examples:                     Resource Examples.
* Resource Format:                       Resource Format.
* Resources:                             Resources.
* resources (csant tag):                 Compile tag.
* rtspecialname attribute (types):       Class Attributes.
* sealed attribute (types):              Class Attributes.
* sequential attribute (types):          Class Attributes.
* serializable attribute (types):        Class Attributes.
* setjmp:                                Setjmp and alloca.
* SignatureArgument:                     Method Signatures.
* SignatureArguments:                    Method Signatures.
* Size:                                  Size.
* sources (csant tag):                   Compile tag.
* Special Keywords:                      Special Keywords.
* specialname attribute (types):         Class Attributes.
* target (csant tag):                    Build file syntax.
* Thread-specific variables:             Thread-specific variables.
* Top-Level Declarations:                Top-Level Declarations.
* TopLevel:                              Top-Level Declarations.
* Type:                                  Type Specifications.
* Type Declarations:                     Class Declarations.
* Type Specifications:                   Type Specifications.
* typeof keyword:                        Typeof operator.
* TypeSpecification:                     Type Specifications.
* unicode attribute (types):             Class Attributes.
* unmanaged attribute (types):           Class Attributes.
* value attribute (types):               Class Attributes.
* Warning options for cscc:              Warning Options.
* Wide strings:                          String literals.



Tag Table:
Node: Top2265
Node: Overview3269
Node: C# Compiler4845
Node: cscc invocation6217
Node: Option Summary6544
Node: Overall Options8054
Node: Language Options10809
Node: Warning Options13144
Node: Debugging Options14622
Node: Optimization Options14866
Node: Preprocessor Options15203
Node: Assembler Options16617
Node: Directory Options17452
Node: Linker Options17974
Node: Other Options20661
Node: Language Plugins21166
Node: Compiling to the JVM31305
Node: Differences36446
Node: Special Keywords36964
Node: Pre-defined Macros40848
Node: Pre-processor Syntax41665
Node: C Compiler43317
Node: Hello World45166
Node: Primitive types45887
Node: C# keywords48143
Node: Referring to C# types48808
Node: String literals50794
Node: Setjmp and alloca51698
Node: Typeof operator53291
Node: Boxing and unboxing53774
Node: Labels as values54639
Node: Reference parameters55119
Node: Thread-specific variables55645
Node: PInvoke importing56399
Node: Calling C from C#57792
Node: Other keywords58385
Node: Documentation59185
Node: Documentation Sections61028
Node: Documentation Markup63866
Node: Cross-References67143
Node: csdoc invocation67855
Node: csdoc2html invocation69523
Node: csdoc2texi invocation73224
Node: csdoc2hier invocation77699
Node: Build Management79127
Node: csant invocation79765
Node: Build file syntax81803
Node: Compile tag87500
Node: Builtin build properties91566
Node: Creating profiles93324
Node: Assembler94372
Node: ilasm invocation95900
Node: Assembler Syntax100935
Node: Lexical Tokens101966
Node: Helper Non-Terminals109193
Node: Top-Level Declarations110843
Node: Namespace Declarations112357
Node: Class Declarations113145
Node: Class Attributes114098
Node: Class Members120211
Node: Class Layout120916
Node: Class References121747
Node: Type Specifications124483
Node: Field Declarations129481
Node: Field Attributes130431
Node: Field Initialization133593
Node: Field Layout134709
Node: Field References135215
Node: Method Declarations135635
Node: Method Attributes137250
Node: Calling Conventions140838
Node: Implementation Attributes142574
Node: Method Signatures145158
Node: PInvoke Methods146233
Node: Method References149151
Node: Method Members149674
Node: Java Method Members150695
Node: Property Declarations150873
Node: Property Attributes151566
Node: Property Members152042
Node: Event Declarations152755
Node: Event Attributes153339
Node: Event Members153785
Node: Debug Information154610
Node: Custom Attributes156152
Node: Assembly Declarations156555
Node: Assembly Attributes157346
Node: Assembly Members157973
Node: Assembly References159617
Node: Assembly Reference Members159926
Node: Module Declarations161492
Node: Other Declarations161873
Node: Disassembler162532
Node: ildasm invocation163106
Node: Linker165417
Node: ilalink invocation165839
Node: Size170784
Node: ilsize invocation171219
Node: Native172628
Node: ilnative invocation173187
Node: Find174113
Node: ilfind invocation174699
Node: Dependencies176852
Node: ildd invocation177249
Node: Resources178330
Node: resgen invocation178995
Node: Resource Format181677
Node: Resource Examples182994
Node: ECMA Extensions183766
Node: Object Files184381
Node: Debug Symbols186258
Node: Load Errors195549
Node: Index198255

End Tag Table
