Blame README

Packit 4a5d52
			libIDL README
Packit 4a5d52
			~~~~~~~~~~~~~
Packit 4a5d52
Packit 4a5d52
Introduction
Packit 4a5d52
~~~~~~~~~~~~
Packit 4a5d52
Packit 4a5d52
libIDL is a library licensed under the GNU LGPL for creating trees of
Packit 4a5d52
CORBA Interface Definition Language (IDL) files, which is a
Packit 4a5d52
specification for defining portable interfaces.  libIDL was initially
Packit 4a5d52
written for ORBit (the ORB from the GNOME project, and the primary
Packit 4a5d52
means of libIDL distribution).  However, the functionality was
Packit 4a5d52
designed to be as reusable and portable as possible.
Packit 4a5d52
Packit 4a5d52
It is written in C, and the aim is to retain the ability to compile it
Packit 4a5d52
on a system with a standard C compiler.  Preprocessed parser files are
Packit 4a5d52
included so you are not forced to rebuild the parser, however an
Packit 4a5d52
effort is made to keep the parser and lexer compatible with standard
Packit 4a5d52
Unix yacc.  Currently, flex is required to generate the lexical
Packit 4a5d52
scanner.
Packit 4a5d52
Packit 4a5d52
With libIDL, you can parse an IDL file which will be automatically run
Packit 4a5d52
through the C preprocessor (on systems with one available), and have
Packit 4a5d52
detailed error and warning messages displayed.  On a compilation
Packit 4a5d52
without errors, the tree is returned to the custom application.
Packit 4a5d52
libIDL performs compilation phases from lexical analysis to nearly
Packit 4a5d52
full semantic analysis with some optimizations, and will attempt to
Packit 4a5d52
generate meaningful errors and warnings for invalid or deprecated IDL.
Packit 4a5d52
Packit 4a5d52
libIDL exports functionality used to generate detailed conforming
Packit 4a5d52
error and warning messages in gcc-like format, and also comes with a
Packit 4a5d52
default backend to generate IDL into a file or string (useful for
Packit 4a5d52
customized messages or comments in the output).  The IDL backend is
Packit 4a5d52
complete enough that most generated IDL can be reparsed by libIDL
Packit 4a5d52
without errors. libIDL returns separate syntax and namespace trees,
Packit 4a5d52
and includes functionality to hide syntactical information from the
Packit 4a5d52
primary tree, while keeping it accessible through the namespace for
Packit 4a5d52
type information and name lookup.
Packit 4a5d52
Packit 4a5d52
Optional extensions to standard IDL can be enabled using parse flags.
Packit 4a5d52
These include node properties, embedded code fragments, and XPIDL.
Packit 4a5d52
Nodes can also have declarations tags which assign particular
Packit 4a5d52
attributions to certain IDL constructs to further facilitate custom
Packit 4a5d52
applications.
Packit 4a5d52
Packit 4a5d52
If you are upgrading to a new version, please see the NEWS file for
Packit 4a5d52
any changes which may affect code.
Packit 4a5d52
Packit 4a5d52
Packit 4a5d52
Emacs Syntax Highlighting for IDL Code
Packit 4a5d52
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Packit 4a5d52
Packit 4a5d52
If you are using Emacs 20.x and do not have decent syntax highlighting
Packit 4a5d52
in your IDL mode, you can use the following Emacs lisp to add
Packit 4a5d52
IDL-specific highlighting using font-lock mode:
Packit 4a5d52
Packit 4a5d52
(font-lock-add-keywords
Packit 4a5d52
 'idl-mode
Packit 4a5d52
 `(("^#[ 	]*error[ 	]+\\(.+\\)" 1 'font-lock-warning-face prepend)
Packit 4a5d52
   ("^#[ 	]*\\(include\\)[ 	]+\\(<[^>\"\n]*>?\\)" 2 'font-lock-string-face)
Packit 4a5d52
   ("^#[ 	]*define[ 	]+\\(\\sw+\\)(" 1 'font-lock-function-name-face)
Packit 4a5d52
   ("^#[ 	]*\\(elif\\|if\\)\\>"
Packit 4a5d52
    ("\\<\\(defined\\)\\>[ 	]*(?\\(\\sw+\\)?" nil nil
Packit 4a5d52
     (1 'font-lock-reference-face)
Packit 4a5d52
     (2 'font-lock-variable-name-face nil t)))
Packit 4a5d52
   ("\\(__declspec\\)[ 	]*(\\([^)]+\\))"
Packit 4a5d52
    (1 'font-lock-reference-face)
Packit 4a5d52
    (2 'font-lock-variable-name-face))
Packit 4a5d52
   ("^#[ 	]*\\(\\sw+\\)\\>[ 	]*\\(\\sw+\\)?"
Packit 4a5d52
    (1 'font-lock-reference-face)
Packit 4a5d52
    (2 'font-lock-variable-name-face nil t))
Packit 4a5d52
   ("\\<\\(raises\\)\\>" 1 'font-lock-keyword-face)
Packit 4a5d52
   ("[ 	]*\\([A-Za-z][A-Za-z0-9_]*\\)[ 	]*(" 1 'font-lock-function-name-face)
Packit 4a5d52
   ("\\<\\(any\\|boolean\\|char\\|const\\|double\\|enum\\|fixed\\|float\\|interface\\|long\\|module\\|native\\|octet\\|Object\\|sequence\\|short\\|string\\|struct\\|unsigned\\|union\\|void\\|wchar\\|wstring\\)\\>" 1 'font-lock-type-face)
Packit 4a5d52
   ("\\<\\(attribute\\|case\\|context\\|default\\|exception\\|FALSE\\|in\\|inout\\|oneway\\|out\\|readonly\\|switch\\|TRUE\\|typedef\\)\\>" 1 'font-lock-keyword-face)) 'set)
Packit 4a5d52
(add-hook 'idl-mode-hook '(lambda () (font-lock-mode 1)))