oo2c is the first compiler of the OOC project.  OOC's goal is to
provide optimizing native code Oberon-2 compilers for a number of
popular computer architectures.  The OOC home page is
  http://www.uni-kl.de/OOC/
Current oo2c versions and patches are available at
  http://www.uni-kl.de/OOC/files/oo2c/

The compiler's requirements are 
  o a 32 bit Unix system
  o an ANSI-C compiler
  o ANSI and POSIX.1 libraries.  
Please drop me a note if oo2c doesn't compile on your system although
it meets the above requirements.  I'll try to adjust the compiler
resp. its configuration process.

As of oo2c 1.3.6, the distribution no longer includes the sources of
Hans-J. Boehm's conservative garbage collector.  To use the garbage
collector, either install gc as a proper library, or unpack the
garbage collector sources in oo2c's top-level directory, prior to
running configure.  Also, oo2c now expects GNU libtool to be installed
on the target system.  See file INSTALL for details.

This distribution contains the OOC Reference Manual in info format and
as texinfo source.  The HTML version of the reference manual can be
found at
  http://www.uni-kl.de/OOC/OOCref/OOCref_toc.html
The manual is also available in texinfo, info, and postscript format
from the file server:
  http://www.uni-kl.de/OOC/files/docs/
Manual pages are also included, but the man page for the compiler oo2c
is only a subset of the information in the reference manual.


I've had reports of successful installation on the following systems:

operating system                compiler
-----------------------------   ---------------------------
Linux 2.0.35                    gcc 2.7.2.2
SunOS 4.1.2/3 aka Solaris 1.1   gcc 2.5.5, gcc 2.7.2
SunOS 5.4 aka Solaris 2.4       gcc 2.7.2.1, SunPRO-C 3.0.1
HP-UX A.09.01                   gcc 2.5.8, gcc 2.7.2.2
HP-UX B.10.20                   gcc 2.7.2.1
BeOS PR 2                       mwcc BeOS/R3

not verified again since oo2c version 1.0.0:
SunOS 5.5 aka Solaris 2.5 [1]   gcc 2.7.2.1
AIX 3.2.5                       gcc 2.7.0
IRIX 5.3                        gcc 2.7.2
SparcLinux 2.0.18 [2]           gcc 2.7.2

[1] on an UltraSPARC, compiled as 32 bit application
[2] needs --disable-gc


Needless to say, bug reports are welcome.  Please check first if the
bug is present in the most recent version of oo2c (see above for the
file server).  If this is the case, try to create a small program that
will reproduce the error.  Ideally this program is a single module
with just enough lines of code to trigger the bug.  Send me this
module, together with the following information:

  o how the bug manifests itself
  o the version of oo2c and the options you used to compile the program
    (add --write-config to oo2c's command line to obtain this information)
  o the C compiler (if possible with version number) oo2c builds upon and
    any additional options you passed to it
  o what operating system you're using

The latter two points are important if the bug is caused by some
quirk in the C compiler or OS.

                     -- Michael van Acken <acken@informatik.uni-kl.de>



------------------------------------------------------------------------

As of oo2c-1.3.10 a new utility `oocn' is included in the
distribution.  This program is still a work in progress, meaning I
intend to add further functionality to it.  The currently implemented
functions do work, though.  At the moment there is no documentation
for `oocn', neither in the OOC Reference Manual nor in form of a man
page.  Both will eventually come once `oocn' is finished.  Until then
this text must serve as documentation.

  Usage: oocn <mode> [options] <module>...
  Modes:
    --html,-H       Translate listed modules into HTML code.
    --xref,-X       Create cross reference tables in HTML format.
    --uses <decl>,-U <decl>
		    List all uses of the given declaration.
    --modules,-M    Write sorted list of modules.
    -d              Write interface of modules to stdout.
     --def-txt, --def-html, --def-xref, --def-texi
		    Produce module definitions in different output formats.
  Options:
    --closure,-C    Operate on all modules imported by set of root modules.
    --no-internal   Omit internal modules from the output of --modules.
    --line-num      Prepend original line number to every line of output.
    --colors <name> Select color set used for HTML.  Available:
			hilit (default), font-lock
    -o <dir>        Change output directory for generated files, - for stdout.
    -v              Verbose mode.
    --version       Write program version to stdout and exit.
    --help,-h       Write this text to stdout and exits.

oocn also understands the command line options --config,
--include-config, --options, and --pragmas.

Module names are resolved by the same mechanism that is used by the
compiler.  If e.g. you do `oo2c -M Foo' to built an executable, then
typing `oocn -HC Foo' in the same directory will give you HTML files
in directory html/ for all modules contributing to the executable.


Calling oocn with the option `--html' (or `-H') will convert a set of
modules into HTML text.  If the option `--closure' (or `-C') is
activated, all modules imported by the ones given on the command line
will be converted.  Otherwise only the modules listed there will be
converted.

For every converted module `Foo' a file `<output-dir>/Foo.html' will
be created.  The output directory can be adjusted with the option `-o
<dir>'.  It defaults to ./html/.  

The generated HTML'ized source text has different colours for
keywords, comments, strings, and procedure declarations.  Identifiers
of exported declaration are set in bold.  Links are inserted
  o from an import clause the imported module
  o from a qualified identifier to the place of the corresponding
    declaration 
  o from a field selector in a designator to the declaration of the
    field in the corresponding record type
  o from a call to a type-bound procedure to the (statically)
    corresponding procedure declaration; super calls are handled as 
    well
  o to a procedure's super/base definition if a type-bound procedure
    is a redefinition of an existing procedure
  o from a procedure's forward declaration to its actual definition

In short: almost every using occurence of an identifier is turned into
a hyperlink to the corresponding declaration.  It is a good idea to
disable underlining of links when inspecting source code.

Note that links to all record fields and type-bound procedures can
only be inserted if the HTML'izer was called with the option
"--closure".

The color set used for the HTML output can be selected with the option
--colors <name>.  The variants "hilit" (default) and "font-lock" are
available.



Mode --xref is similar to --html, but turns every declaration in the
source module "Foo.Mod" into a hyper-link to a companion file
"Foo_xref.html".  The xref file lists all uses of the given
declaration in the scanned modules.  For redefining type-bound
procedures it includes a link to the base definitions, and for the
original type-bound procedure definitions it lists all redefinitions
and their uses.

  Example:

  oocn -Xv -o html VisualOberonLib

  This will create a html'ized and cross referenced version of the
  whole VO source in the subdirectory "html".


Mode --uses is a command line interface to the xref code.  It takes a
string describing a declared object, and writes references to all uses
of the object to stdout in the format of oo2c's error messages.

  Example:
  
  oocn -v -o html -U VOGUIObject.Object.oMaxWidth VisualOberonLib

  This command lists all uses of the designated field.  In this case
  all but one uses happen to be local to the declaring module, and one
  use is in module `VOWindow.Mod'.


Mode --modules simply lists all modules, the ones specified on the
command line and the ones imported by them, in an order defined by the
"IMPORT" relation.  With option --no-internal all internal modules are
omitted from the output.


The program can able extract a module's exported interface from the
source code.  The output is either plain ASCII text, hyperlinked HTML
code, cross-referenced HTML code, or a text in Texinfo format.

Examples:
  oocn --def-txt -o - Strings.Mod
  (shorter: oocn -d Strings.Mod)

    Writes the ASCII version of the interface of `Strings' to stdout.

  oocn --def-txt --closure --verbose -o /tmp liboo2c
  (shorter: oocn --def-txt -Cv -o /tmp liboo2c)
  
    For every module `foo' imported by liboo2c a file `/tmp/foo_def.txt'
    is generated, which is equivalent to the source code with all
    statements and local declarations removed.

  oocn --def-html --closure --verbose -o /tmp liboo2c
  (shorter: oocn --def-html -Cv -o /tmp liboo2c)

    The same, but the text is in HTML format and written to 
    `/tmp/foo_def.html'.

  oocn --def-xref --closure --verbose -o /tmp liboo2c
  (shorter: oocn --def-xref -Cv -o /tmp liboo2c)

    An extended version of `--def-html'.  Two files are generated for
    every module `foo': `/tmp/foo_def.html' holds the module's source,
    and `/tmp/foo_def_xref.html' the cross reference table.

  oocn --def-texi --closure --verbose -o /tmp liboo2c
  (shorter: oocn --def-texi -Cv -o /tmp liboo2c)

    Creates draft versions of the public interfaces of all modules in
    liboo2c in Texinfo format.  The files are named `/tmp/foo_def.texi'.
    See the comments below for more information why the output should
    be considered "draft". 


With --def-texi a few points should be kept in mind:

  Declarations are listed in four blocks: constants, types, variables,
  and procedures.  Within the blocks the order of declarations is
  preserved.  Methods are grouped again by their receiver type.

  The lengths of an array are replaced with `n0', `n1', ..., `nm' for
  the different dimensions.

  The descriptions attached to the declarared entities are taken from
  any comment following the declaration in the source code.  Because the
  current sources where not written with this in mind, there is no
  guarantee that the right comment is chosen.  In particular, for every
  declared name a single comment at most is taken over in the .texi
  file.

  The comments are minimally changed before they are copied to the
  texinfo file: the comment delimiters are removed, all indentation is
  removed, and the characters "@", "{", and "}" are quoted.

  Nested record constructors are not handled.  The fields of any nested
  constructor must be inserted manually.  Additionally any system flags
  associated with procedure objects are discarded silently.

  Remember: This output format is only intended to generate a draft
  for a texinfo file.  The output will always need manual intervention
  to turn it into something readable.


The output directory for --html and --xref defaults to the current
directory.  Options "--xref", "--uses", and "--modules" imply
"--closure".

The option --line-num prepends the original line number to every line
of output.  Output can be HTML or plain ASCII.
