source: trunk/third/libIDL/README @ 18251

Revision 18251, 3.7 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18250, which included commits to RCS files with non-trunk default branches.
Line 
1                        libIDL README
2                        ~~~~~~~~~~~~~
3
4Introduction
5~~~~~~~~~~~~
6
7libIDL is a library licensed under the GNU LGPL for creating trees of
8CORBA Interface Definition Language (IDL) files, which is a
9specification for defining portable interfaces.  libIDL was initially
10written for ORBit (the ORB from the GNOME project, and the primary
11means of libIDL distribution).  However, the functionality was
12designed to be as reusable and portable as possible.
13
14It is written in C, and the aim is to retain the ability to compile it
15on a system with a standard C compiler.  Preprocessed parser files are
16included so you are not forced to rebuild the parser, however an
17effort is made to keep the parser and lexer compatible with standard
18Unix yacc.  Currently, flex is required to generate the lexical
19scanner.
20
21With libIDL, you can parse an IDL file which will be automatically run
22through the C preprocessor (on systems with one available), and have
23detailed error and warning messages displayed.  On a compilation
24without errors, the tree is returned to the custom application.
25libIDL performs compilation phases from lexical analysis to nearly
26full semantic analysis with some optimizations, and will attempt to
27generate meaningful errors and warnings for invalid or deprecated IDL.
28
29libIDL exports functionality used to generate detailed conforming
30error and warning messages in gcc-like format, and also comes with a
31default backend to generate IDL into a file or string (useful for
32customized messages or comments in the output).  The IDL backend is
33complete enough that most generated IDL can be reparsed by libIDL
34without errors. libIDL returns separate syntax and namespace trees,
35and includes functionality to hide syntactical information from the
36primary tree, while keeping it accessible through the namespace for
37type information and name lookup.
38
39Optional extensions to standard IDL can be enabled using parse flags.
40These include node properties, embedded code fragments, and XPIDL.
41Nodes can also have declarations tags which assign particular
42attributions to certain IDL constructs to further facilitate custom
43applications.
44
45If you are upgrading to a new version, please see the NEWS file for
46any changes which may affect code.
47
48
49Emacs Syntax Highlighting for IDL Code
50~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
51
52If you are using Emacs 20.x and do not have decent syntax highlighting
53in your IDL mode, you can use the following Emacs lisp to add
54IDL-specific highlighting using font-lock mode:
55
56(font-lock-add-keywords
57 'idl-mode
58 `(("^#[        ]*error[        ]+\\(.+\\)" 1 'font-lock-warning-face prepend)
59   ("^#[        ]*\\(include\\)[        ]+\\(<[^>\"\n]*>?\\)" 2 'font-lock-string-face)
60   ("^#[        ]*define[       ]+\\(\\sw+\\)(" 1 'font-lock-function-name-face)
61   ("^#[        ]*\\(elif\\|if\\)\\>"
62    ("\\<\\(defined\\)\\>[      ]*(?\\(\\sw+\\)?" nil nil
63     (1 'font-lock-reference-face)
64     (2 'font-lock-variable-name-face nil t)))
65   ("\\(__declspec\\)[  ]*(\\([^)]+\\))"
66    (1 'font-lock-reference-face)
67    (2 'font-lock-variable-name-face))
68   ("^#[        ]*\\(\\sw+\\)\\>[       ]*\\(\\sw+\\)?"
69    (1 'font-lock-reference-face)
70    (2 'font-lock-variable-name-face nil t))
71   ("\\<\\(raises\\)\\>" 1 'font-lock-keyword-face)
72   ("[  ]*\\([A-Za-z][A-Za-z0-9_]*\\)[  ]*(" 1 'font-lock-function-name-face)
73   ("\\<\\(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)
74   ("\\<\\(attribute\\|case\\|context\\|default\\|exception\\|FALSE\\|in\\|inout\\|oneway\\|out\\|readonly\\|switch\\|TRUE\\|typedef\\)\\>" 1 'font-lock-keyword-face)) 'set)
75(add-hook 'idl-mode-hook '(lambda () (font-lock-mode 1)))
Note: See TracBrowser for help on using the repository browser.