Debian Codegraph @

README

raw
1 libIDL README
2 ~~~~~~~~~~~~~
3
4 Introduction
5 ~~~~~~~~~~~~
6
7 libIDL is a library licensed under the GNU LGPL for creating trees of
8 CORBA Interface Definition Language (IDL) files, which is a
9 specification for defining portable interfaces. libIDL was initially
10 written for ORBit (the ORB from the GNOME project, and the primary
11 means of libIDL distribution). However, the functionality was
12 designed to be as reusable and portable as possible.
13
14 It is written in C, and the aim is to retain the ability to compile it
15 on a system with a standard C compiler. Preprocessed parser files are
16 included so you are not forced to rebuild the parser, however an
17 effort is made to keep the parser and lexer compatible with standard
18 Unix yacc. Currently, flex is required to generate the lexical
19 scanner.
20
21 With libIDL, you can parse an IDL file which will be automatically run
22 through the C preprocessor (on systems with one available), and have
23 detailed error and warning messages displayed. On a compilation
24 without errors, the tree is returned to the custom application.
25 libIDL performs compilation phases from lexical analysis to nearly
26 full semantic analysis with some optimizations, and will attempt to
27 generate meaningful errors and warnings for invalid or deprecated IDL.
28
29 libIDL exports functionality used to generate detailed conforming
30 error and warning messages in gcc-like format, and also comes with a
31 default backend to generate IDL into a file or string (useful for
32 customized messages or comments in the output). The IDL backend is
33 complete enough that most generated IDL can be reparsed by libIDL
34 without errors. libIDL returns separate syntax and namespace trees,
35 and includes functionality to hide syntactical information from the
36 primary tree, while keeping it accessible through the namespace for
37 type information and name lookup.
38
39 Optional extensions to standard IDL can be enabled using parse flags.
40 These include node properties, embedded code fragments, and XPIDL.
41 Nodes can also have declarations tags which assign particular
42 attributions to certain IDL constructs to further facilitate custom
43 applications.
44
45 If you are upgrading to a new version, please see the NEWS file for
46 any changes which may affect code.
47
48
49 Emacs Syntax Highlighting for IDL Code
50 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
51
52 If you are using Emacs 20.x and do not have decent syntax highlighting
53 in your IDL mode, you can use the following Emacs lisp to add
54 IDL-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)))