зеркало из https://github.com/mozilla/pjs.git
first xpidl stuff
This commit is contained in:
Родитель
b7f723b107
Коммит
4fac0478da
|
@ -0,0 +1,60 @@
|
|||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE_NAME = xpidl
|
||||
|
||||
CSRCS = \
|
||||
xpidl.c \
|
||||
xpidl_idl.c \
|
||||
xpidl_header.c \
|
||||
xpidl_invoke.c \
|
||||
xpidl_doc.c \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
# XXX replace with proper configure test for glib
|
||||
CFLAGS += $(shell glib-config --cflags)
|
||||
|
||||
# XXX need configure test
|
||||
EX_LIBS = -lIDL $(shell glib-config --libs)
|
||||
|
||||
PROGS = $(OBJDIR)/xpidl
|
||||
|
||||
TARGETS= $(PROGS)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
$(PROGS): $(OBJS)
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -o $@ $(OBJS) $(LD_FLAGS) $(EX_LIBS) $(OS_LIBS)
|
||||
|
||||
export::
|
||||
|
||||
install:: $(TARGETS)
|
||||
$(INSTALL) $(PROGS) $(DIST)/bin
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)/bin/xpidl
|
||||
rm -f $(PROGS) $(OBJS)
|
|
@ -0,0 +1,9 @@
|
|||
Mon Nov 23 13:42:39 EST 1998
|
||||
|
||||
To build the xpidl compiler, you need a lot of really wacky software that's
|
||||
only available from the GNOME CVS, etc. This will change in the near future,
|
||||
when GNOME hits a stabilization point, but for now you really need to be
|
||||
a daring hacker to use it. There are RPMs at
|
||||
http://www.hungry.com/~shaver/libIDL/ for ORBit, but you'll need glib
|
||||
of recent vintage (1.1.4 or greater), and that'll require you to update
|
||||
gtk+ as well. If I were you, I'd wait for RPMs of those, too. =)
|
|
@ -0,0 +1,75 @@
|
|||
#include "xpidl.h"
|
||||
|
||||
gboolean enable_debug = FALSE;
|
||||
gboolean enable_warnings = FALSE;
|
||||
gboolean verbose_mode = FALSE;
|
||||
gboolean generate_docs = FALSE;
|
||||
gboolean generate_invoke = FALSE;
|
||||
gboolean generate_headers = FALSE;
|
||||
gboolean generate_nothing = FALSE;
|
||||
|
||||
static char xpidl_usage_str[] =
|
||||
"Usage: %s -IDHdwvn filename.idl\n"
|
||||
" -I generate Invoke glue (filename_invoke.c)\n"
|
||||
" -D generate HTML documenation (filename.html)\n"
|
||||
" -H generate C++ headers (filename.h)\n"
|
||||
" -d turn on xpidl debugging\n"
|
||||
" -w turn on warnings (recommended)\n"
|
||||
" -v verbose mode\n"
|
||||
" -n do not generate output files, just test IDL\n";
|
||||
|
||||
static void
|
||||
xpidl_usage(int argc, char *argv[])
|
||||
{
|
||||
/* XXX Mac! */
|
||||
fprintf(stderr, xpidl_usage_str, argv[0]);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int i, idlfiles;
|
||||
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (argv[i][0] == '-') {
|
||||
switch (argv[i][1]) {
|
||||
case 'D':
|
||||
generate_docs = TRUE;
|
||||
break;
|
||||
case 'I':
|
||||
generate_invoke = TRUE;
|
||||
break;
|
||||
case 'H':
|
||||
generate_headers = TRUE;
|
||||
break;
|
||||
case 'd':
|
||||
enable_debug = TRUE;
|
||||
break;
|
||||
case 'w':
|
||||
enable_warnings = TRUE;
|
||||
break;
|
||||
case 'v':
|
||||
verbose_mode = TRUE;
|
||||
break;
|
||||
case 'n':
|
||||
generate_nothing = TRUE;
|
||||
break;
|
||||
default:
|
||||
xpidl_usage(argc, argv);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 1, idlfiles = 0; i < argc; i++) {
|
||||
if (argv[i][0] && argv[i][0] != '-')
|
||||
idlfiles += xpidl_process_idl(argv[i]);
|
||||
}
|
||||
|
||||
if (!idlfiles) {
|
||||
xpidl_usage(argc, argv);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
#ifndef __xpidl_h
|
||||
#define __xpidl_h
|
||||
|
||||
#include <glib.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <libIDL/IDL.h>
|
||||
#include <assert.h>
|
||||
|
||||
/*
|
||||
* Internal operation flags.
|
||||
*/
|
||||
extern gboolean enable_debug;
|
||||
extern gboolean enable_warnings;
|
||||
extern gboolean verbose_mode;
|
||||
extern gboolean generate_docs;
|
||||
extern gboolean generate_invoke;
|
||||
extern gboolean generate_headers;
|
||||
extern gboolean generate_nothing;
|
||||
|
||||
typedef struct {
|
||||
FILE *file;
|
||||
IDL_ns ns;
|
||||
IDL_tree tree;
|
||||
int mode;
|
||||
} TreeState;
|
||||
|
||||
#define TREESTATE_HEADER 0
|
||||
#define TREESTATE_INVOKE 1
|
||||
#define TREESTATE_DOC 2
|
||||
#define TREESTATE_NUM 3
|
||||
|
||||
/*
|
||||
* A function to handle an IDL_tree type.
|
||||
*/
|
||||
typedef gboolean (*nodeHandler)(TreeState *);
|
||||
|
||||
/*
|
||||
* An array of vectors of nodeHandlers, for handling each kind of node.
|
||||
*/
|
||||
extern nodeHandler *nodeDispatch[TREESTATE_NUM];
|
||||
|
||||
extern nodeHandler headerDispatch[];
|
||||
extern nodeHandler invokeDispatch[];
|
||||
extern nodeHandler docDispatch[];
|
||||
|
||||
/*
|
||||
* nodeHandler that reports an error.
|
||||
*/
|
||||
gboolean node_is_error(TreeState *state);
|
||||
|
||||
/*
|
||||
* Process an IDL file, generating typelib, invoke glue and headers as
|
||||
* appropriate.
|
||||
*/
|
||||
int
|
||||
xpidl_process_idl(char *filename);
|
||||
|
||||
/*
|
||||
* Add an output file to an internal list. Used to clean up temporary files
|
||||
* in case of fatal error.
|
||||
*/
|
||||
|
||||
void XPIDL_add_output_file(char *fn);
|
||||
void XPIDL_cleanup_on_error();
|
||||
|
||||
#endif /* __xpidl_h */
|
|
@ -0,0 +1,52 @@
|
|||
#include "xpidl.h"
|
||||
|
||||
/*
|
||||
* Generates documentation from javadoc-style comments in XPIDL files.
|
||||
*/
|
||||
|
||||
nodeHandler docDispatch[] = {
|
||||
NULL, /* IDLN_NONE */
|
||||
NULL, /* IDLN_ANY */
|
||||
NULL, /* IDLN_LIST */
|
||||
NULL, /* IDLN_GENTREE */
|
||||
NULL, /* IDLN_INTEGER */
|
||||
NULL, /* IDLN_STRING */
|
||||
NULL, /* IDLN_WIDE_STRING */
|
||||
NULL, /* IDLN_CHAR */
|
||||
NULL, /* IDLN_WIDE_CHAR */
|
||||
NULL, /* IDLN_FIXED */
|
||||
NULL, /* IDLN_FLOAT */
|
||||
NULL, /* IDLN_BOOLEAN */
|
||||
NULL, /* IDLN_IDENT */
|
||||
NULL, /* IDLN_TYPE_DCL */
|
||||
NULL, /* IDLN_CONST_DCL */
|
||||
NULL, /* IDLN_EXCEPT_DCL */
|
||||
NULL, /* IDLN_ATTR_DCL */
|
||||
NULL, /* IDLN_OP_DCL */
|
||||
NULL, /* IDLN_PARAM_DCL */
|
||||
NULL, /* IDLN_FORWARD_DCL */
|
||||
NULL, /* IDLN_TYPE_INTEGER */
|
||||
NULL, /* IDLN_TYPE_FLOAT */
|
||||
NULL, /* IDLN_TYPE_FIXED */
|
||||
NULL, /* IDLN_TYPE_CHAR */
|
||||
NULL, /* IDLN_TYPE_WIDE_CHAR */
|
||||
NULL, /* IDLN_TYPE_STRING */
|
||||
NULL, /* IDLN_TYPE_WIDE_STRING */
|
||||
NULL, /* IDLN_TYPE_BOOLEAN */
|
||||
NULL, /* IDLN_TYPE_OCTET */
|
||||
NULL, /* IDLN_TYPE_ANY */
|
||||
NULL, /* IDLN_TYPE_OBJECT */
|
||||
NULL, /* IDLN_TYPE_ENUM */
|
||||
NULL, /* IDLN_TYPE_SEQUENCE */
|
||||
NULL, /* IDLN_TYPE_ARRAY */
|
||||
NULL, /* IDLN_TYPE_STRUCT */
|
||||
NULL, /* IDLN_TYPE_UNION */
|
||||
NULL, /* IDLN_MEMBER */
|
||||
NULL, /* IDLN_NATIVE */
|
||||
NULL, /* IDLN_CASE_STMT */
|
||||
NULL, /* IDLN_INTERFACE */
|
||||
NULL, /* IDLN_MODULE */
|
||||
NULL, /* IDLN_BINOP */
|
||||
NULL, /* IDLN_UNARYOP */
|
||||
NULL /* IDLN_TYPE_TYPECODE */
|
||||
};
|
|
@ -0,0 +1,189 @@
|
|||
#include "xpidl.h"
|
||||
|
||||
static gboolean
|
||||
ident(TreeState *state)
|
||||
{
|
||||
printf("%s", IDL_IDENT(state->tree).str);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
interface(TreeState *state)
|
||||
{
|
||||
printf("starting interface %s\n", IDL_INTERFACE(state->tree).ident);
|
||||
state->tree = IDL_INTERFACE(state->tree).body;
|
||||
return process_node(state);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
list(TreeState *state)
|
||||
{
|
||||
IDL_tree iter;
|
||||
for (iter = state->tree; iter; iter = IDL_LIST(iter).next) {
|
||||
state->tree = IDL_LIST(iter).data;
|
||||
if (!process_node(state))
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
type_integer(TreeState *state)
|
||||
{
|
||||
IDL_tree p = state->tree;
|
||||
|
||||
if (!IDL_TYPE_INTEGER(p).f_signed)
|
||||
fputs("unsigned ", stdout);
|
||||
|
||||
switch(IDL_TYPE_INTEGER(p).f_type) {
|
||||
case IDL_INTEGER_TYPE_SHORT:
|
||||
printf("short");
|
||||
break;
|
||||
case IDL_INTEGER_TYPE_LONG:
|
||||
printf("long");
|
||||
break;
|
||||
case IDL_INTEGER_TYPE_LONGLONG:
|
||||
printf("longlong");
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
type(TreeState *state)
|
||||
{
|
||||
if (!state->tree) {
|
||||
fputs("void", stdout);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
switch(IDL_NODE_TYPE(state->tree)) {
|
||||
case IDLN_TYPE_INTEGER:
|
||||
return type_integer(state);
|
||||
case IDLN_TYPE_STRING:
|
||||
fputs("string", stdout);
|
||||
return TRUE;
|
||||
default:
|
||||
printf("unknown_type_%d", IDL_NODE_TYPE(state->tree));
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
param_dcls(TreeState *state)
|
||||
{
|
||||
IDL_tree iter;
|
||||
fputs("(", stdout);
|
||||
for (iter = state->tree; iter; iter = IDL_LIST(iter).next) {
|
||||
struct _IDL_PARAM_DCL decl = IDL_PARAM_DCL(IDL_LIST(iter).data);
|
||||
switch(decl.attr) {
|
||||
case IDL_PARAM_IN:
|
||||
fputs("in ", stdout);
|
||||
break;
|
||||
case IDL_PARAM_OUT:
|
||||
fputs("out ", stdout);
|
||||
break;
|
||||
case IDL_PARAM_INOUT:
|
||||
fputs("inout ", stdout);
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
state->tree = (IDL_tree)decl.param_type_spec;
|
||||
if (!type(state))
|
||||
return FALSE;
|
||||
fputs(" ", stdout);
|
||||
state->tree = (IDL_tree)decl.simple_declarator;
|
||||
if (!process_node(state))
|
||||
return FALSE;
|
||||
if (IDL_LIST(iter).next)
|
||||
fputs(", ", stdout);
|
||||
}
|
||||
fputs(")", stdout);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
attr_dcl(TreeState *state)
|
||||
{
|
||||
IDL_tree orig = state->tree;
|
||||
printf("%sattribute ", IDL_ATTR_DCL(state->tree).f_readonly ?
|
||||
"readonly " : "");
|
||||
state->tree = IDL_ATTR_DCL(state->tree).param_type_spec;
|
||||
if (state->tree && !process_node(state))
|
||||
return FALSE;
|
||||
fputs(" ", stdout);
|
||||
state->tree = IDL_ATTR_DCL(orig).simple_declarations;
|
||||
if (state->tree && !process_node(state))
|
||||
return FALSE;
|
||||
puts(";");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* A method is an `operation', therefore a method decl is an `op dcl'.
|
||||
* I blame Elliot.
|
||||
*/
|
||||
static gboolean
|
||||
op_dcl(TreeState *state)
|
||||
{
|
||||
struct _IDL_OP_DCL op = IDL_OP_DCL(state->tree);
|
||||
state->tree = op.op_type_spec;
|
||||
if (!type(state))
|
||||
return FALSE;
|
||||
fputs(" ", stdout);
|
||||
state->tree = op.ident;
|
||||
if (state->tree && !process_node(state))
|
||||
return FALSE;
|
||||
state->tree = op.parameter_dcls;
|
||||
if (!param_dcls(state))
|
||||
return FALSE;
|
||||
fputs(";\n", stdout);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
nodeHandler headerDispatch[] = {
|
||||
NULL, /* IDLN_NONE */
|
||||
NULL, /* IDLN_ANY */
|
||||
list, /* IDLN_LIST */
|
||||
NULL, /* IDLN_GENTREE */
|
||||
NULL, /* IDLN_INTEGER */
|
||||
NULL, /* IDLN_STRING */
|
||||
NULL, /* IDLN_WIDE_STRING */
|
||||
NULL, /* IDLN_CHAR */
|
||||
NULL, /* IDLN_WIDE_CHAR */
|
||||
NULL, /* IDLN_FIXED */
|
||||
NULL, /* IDLN_FLOAT */
|
||||
NULL, /* IDLN_BOOLEAN */
|
||||
ident, /* IDLN_IDENT */
|
||||
NULL, /* IDLN_TYPE_DCL */
|
||||
NULL, /* IDLN_CONST_DCL */
|
||||
NULL, /* IDLN_EXCEPT_DCL */
|
||||
attr_dcl, /* IDLN_ATTR_DCL */
|
||||
op_dcl, /* IDLN_OP_DCL */
|
||||
param_dcls, /* IDLN_PARAM_DCL */
|
||||
NULL, /* IDLN_FORWARD_DCL */
|
||||
type_integer, /* IDLN_TYPE_INTEGER */
|
||||
type, /* IDLN_TYPE_FLOAT */
|
||||
type, /* IDLN_TYPE_FIXED */
|
||||
type, /* IDLN_TYPE_CHAR */
|
||||
type, /* IDLN_TYPE_WIDE_CHAR */
|
||||
type, /* IDLN_TYPE_STRING */
|
||||
type, /* IDLN_TYPE_WIDE_STRING */
|
||||
type, /* IDLN_TYPE_BOOLEAN */
|
||||
type, /* IDLN_TYPE_OCTET */
|
||||
type, /* IDLN_TYPE_ANY */
|
||||
type, /* IDLN_TYPE_OBJECT */
|
||||
type, /* IDLN_TYPE_ENUM */
|
||||
type, /* IDLN_TYPE_SEQUENCE */
|
||||
type, /* IDLN_TYPE_ARRAY */
|
||||
type, /* IDLN_TYPE_STRUCT */
|
||||
type, /* IDLN_TYPE_UNION */
|
||||
NULL, /* IDLN_MEMBER */
|
||||
NULL, /* IDLN_NATIVE */
|
||||
NULL, /* IDLN_CASE_STMT */
|
||||
interface, /* IDLN_INTERFACE */
|
||||
NULL, /* IDLN_MODULE */
|
||||
NULL, /* IDLN_BINOP */
|
||||
NULL, /* IDLN_UNARYOP */
|
||||
NULL /* IDLN_TYPE_TYPECODE */
|
||||
};
|
|
@ -0,0 +1,101 @@
|
|||
#include "xpidl.h"
|
||||
|
||||
FILE *typelib_file = NULL;
|
||||
FILE *invoke_file = NULL;
|
||||
FILE *header_file = NULL;
|
||||
|
||||
nodeHandler *nodeDispatch[TREESTATE_NUM] = { NULL };
|
||||
|
||||
/*
|
||||
* Pass 1 generates #includes for headers.
|
||||
*/
|
||||
static gboolean
|
||||
process_tree_pass1(TreeState *state)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
node_is_error(TreeState *state)
|
||||
{
|
||||
fprintf(stderr, "ERROR: Unexpected node type %d\n",
|
||||
IDL_NODE_TYPE(state->tree));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* The bulk of the generation happens here.
|
||||
*/
|
||||
gboolean
|
||||
process_node(TreeState *state)
|
||||
{
|
||||
char *name = NULL;
|
||||
nodeHandler *handlerp = nodeDispatch[state->mode], handler;
|
||||
assert(state->tree);
|
||||
|
||||
if (handlerp && (handler = handlerp[IDL_NODE_TYPE(state->tree)]))
|
||||
return handler(state);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
process_tree(TreeState *state)
|
||||
{
|
||||
IDL_tree top = state->tree;
|
||||
if (!process_tree_pass1(state))
|
||||
return FALSE;
|
||||
state->tree = top; /* pass1 might mutate state */
|
||||
return process_node(state);
|
||||
}
|
||||
|
||||
int
|
||||
xpidl_process_idl(char *filename) {
|
||||
char *basename, *tmp;
|
||||
IDL_tree top;
|
||||
TreeState state;
|
||||
int rv;
|
||||
|
||||
rv = IDL_parse_filename(filename, NULL, NULL, &top,
|
||||
&state.ns, IDLF_XPIDL,
|
||||
enable_warnings ? IDL_WARNING1 : 0);
|
||||
if (rv != IDL_SUCCESS) {
|
||||
if (rv == -1) {
|
||||
g_warning("Parse of %s failed: %s", filename, g_strerror(errno));
|
||||
} else {
|
||||
g_warning("Parse of %s failed", filename);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
basename = g_strdup(filename);
|
||||
tmp = strrchr(basename, '.');
|
||||
if (tmp)
|
||||
*tmp = '\0';
|
||||
|
||||
state.file = stdout; /* XXX */
|
||||
nodeDispatch[TREESTATE_HEADER] = headerDispatch;
|
||||
nodeDispatch[TREESTATE_INVOKE] = invokeDispatch;
|
||||
nodeDispatch[TREESTATE_DOC] = docDispatch;
|
||||
if (generate_headers) {
|
||||
state.mode = TREESTATE_HEADER;
|
||||
state.tree = top;
|
||||
if (!process_tree(&state))
|
||||
return 0;
|
||||
}
|
||||
if (generate_invoke) {
|
||||
state.mode = TREESTATE_INVOKE;
|
||||
state.tree = top;
|
||||
if (!process_tree(&state))
|
||||
return 0;
|
||||
}
|
||||
if (generate_docs) {
|
||||
state.mode = TREESTATE_DOC;
|
||||
state.tree = top;
|
||||
if (!process_tree(&state))
|
||||
return 0;
|
||||
}
|
||||
IDL_ns_free(state.ns);
|
||||
IDL_tree_free(top);
|
||||
|
||||
return 1;
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
#include "xpidl.h"
|
||||
|
||||
nodeHandler invokeDispatch[] = {
|
||||
NULL, /* IDLN_NONE */
|
||||
NULL, /* IDLN_ANY */
|
||||
NULL, /* IDLN_LIST */
|
||||
NULL, /* IDLN_GENTREE */
|
||||
NULL, /* IDLN_INTEGER */
|
||||
NULL, /* IDLN_STRING */
|
||||
NULL, /* IDLN_WIDE_STRING */
|
||||
NULL, /* IDLN_CHAR */
|
||||
NULL, /* IDLN_WIDE_CHAR */
|
||||
NULL, /* IDLN_FIXED */
|
||||
NULL, /* IDLN_FLOAT */
|
||||
NULL, /* IDLN_BOOLEAN */
|
||||
NULL, /* IDLN_IDENT */
|
||||
NULL, /* IDLN_TYPE_DCL */
|
||||
NULL, /* IDLN_CONST_DCL */
|
||||
NULL, /* IDLN_EXCEPT_DCL */
|
||||
NULL, /* IDLN_ATTR_DCL */
|
||||
NULL, /* IDLN_OP_DCL */
|
||||
NULL, /* IDLN_PARAM_DCL */
|
||||
NULL, /* IDLN_FORWARD_DCL */
|
||||
NULL, /* IDLN_TYPE_INTEGER */
|
||||
NULL, /* IDLN_TYPE_FLOAT */
|
||||
NULL, /* IDLN_TYPE_FIXED */
|
||||
NULL, /* IDLN_TYPE_CHAR */
|
||||
NULL, /* IDLN_TYPE_WIDE_CHAR */
|
||||
NULL, /* IDLN_TYPE_STRING */
|
||||
NULL, /* IDLN_TYPE_WIDE_STRING */
|
||||
NULL, /* IDLN_TYPE_BOOLEAN */
|
||||
NULL, /* IDLN_TYPE_OCTET */
|
||||
NULL, /* IDLN_TYPE_ANY */
|
||||
NULL, /* IDLN_TYPE_OBJECT */
|
||||
NULL, /* IDLN_TYPE_ENUM */
|
||||
NULL, /* IDLN_TYPE_SEQUENCE */
|
||||
NULL, /* IDLN_TYPE_ARRAY */
|
||||
NULL, /* IDLN_TYPE_STRUCT */
|
||||
NULL, /* IDLN_TYPE_UNION */
|
||||
NULL, /* IDLN_MEMBER */
|
||||
NULL, /* IDLN_NATIVE */
|
||||
NULL, /* IDLN_CASE_STMT */
|
||||
NULL, /* IDLN_INTERFACE */
|
||||
NULL, /* IDLN_MODULE */
|
||||
NULL, /* IDLN_BINOP */
|
||||
NULL, /* IDLN_UNARYOP */
|
||||
NULL /* IDLN_TYPE_TYPECODE */
|
||||
};
|
|
@ -0,0 +1,60 @@
|
|||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE_NAME = xpidl
|
||||
|
||||
CSRCS = \
|
||||
xpidl.c \
|
||||
xpidl_idl.c \
|
||||
xpidl_header.c \
|
||||
xpidl_invoke.c \
|
||||
xpidl_doc.c \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
# XXX replace with proper configure test for glib
|
||||
CFLAGS += $(shell glib-config --cflags)
|
||||
|
||||
# XXX need configure test
|
||||
EX_LIBS = -lIDL $(shell glib-config --libs)
|
||||
|
||||
PROGS = $(OBJDIR)/xpidl
|
||||
|
||||
TARGETS= $(PROGS)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
$(PROGS): $(OBJS)
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -o $@ $(OBJS) $(LD_FLAGS) $(EX_LIBS) $(OS_LIBS)
|
||||
|
||||
export::
|
||||
|
||||
install:: $(TARGETS)
|
||||
$(INSTALL) $(PROGS) $(DIST)/bin
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)/bin/xpidl
|
||||
rm -f $(PROGS) $(OBJS)
|
|
@ -0,0 +1,9 @@
|
|||
Mon Nov 23 13:42:39 EST 1998
|
||||
|
||||
To build the xpidl compiler, you need a lot of really wacky software that's
|
||||
only available from the GNOME CVS, etc. This will change in the near future,
|
||||
when GNOME hits a stabilization point, but for now you really need to be
|
||||
a daring hacker to use it. There are RPMs at
|
||||
http://www.hungry.com/~shaver/libIDL/ for ORBit, but you'll need glib
|
||||
of recent vintage (1.1.4 or greater), and that'll require you to update
|
||||
gtk+ as well. If I were you, I'd wait for RPMs of those, too. =)
|
|
@ -0,0 +1,75 @@
|
|||
#include "xpidl.h"
|
||||
|
||||
gboolean enable_debug = FALSE;
|
||||
gboolean enable_warnings = FALSE;
|
||||
gboolean verbose_mode = FALSE;
|
||||
gboolean generate_docs = FALSE;
|
||||
gboolean generate_invoke = FALSE;
|
||||
gboolean generate_headers = FALSE;
|
||||
gboolean generate_nothing = FALSE;
|
||||
|
||||
static char xpidl_usage_str[] =
|
||||
"Usage: %s -IDHdwvn filename.idl\n"
|
||||
" -I generate Invoke glue (filename_invoke.c)\n"
|
||||
" -D generate HTML documenation (filename.html)\n"
|
||||
" -H generate C++ headers (filename.h)\n"
|
||||
" -d turn on xpidl debugging\n"
|
||||
" -w turn on warnings (recommended)\n"
|
||||
" -v verbose mode\n"
|
||||
" -n do not generate output files, just test IDL\n";
|
||||
|
||||
static void
|
||||
xpidl_usage(int argc, char *argv[])
|
||||
{
|
||||
/* XXX Mac! */
|
||||
fprintf(stderr, xpidl_usage_str, argv[0]);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int i, idlfiles;
|
||||
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (argv[i][0] == '-') {
|
||||
switch (argv[i][1]) {
|
||||
case 'D':
|
||||
generate_docs = TRUE;
|
||||
break;
|
||||
case 'I':
|
||||
generate_invoke = TRUE;
|
||||
break;
|
||||
case 'H':
|
||||
generate_headers = TRUE;
|
||||
break;
|
||||
case 'd':
|
||||
enable_debug = TRUE;
|
||||
break;
|
||||
case 'w':
|
||||
enable_warnings = TRUE;
|
||||
break;
|
||||
case 'v':
|
||||
verbose_mode = TRUE;
|
||||
break;
|
||||
case 'n':
|
||||
generate_nothing = TRUE;
|
||||
break;
|
||||
default:
|
||||
xpidl_usage(argc, argv);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 1, idlfiles = 0; i < argc; i++) {
|
||||
if (argv[i][0] && argv[i][0] != '-')
|
||||
idlfiles += xpidl_process_idl(argv[i]);
|
||||
}
|
||||
|
||||
if (!idlfiles) {
|
||||
xpidl_usage(argc, argv);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
#ifndef __xpidl_h
|
||||
#define __xpidl_h
|
||||
|
||||
#include <glib.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <libIDL/IDL.h>
|
||||
#include <assert.h>
|
||||
|
||||
/*
|
||||
* Internal operation flags.
|
||||
*/
|
||||
extern gboolean enable_debug;
|
||||
extern gboolean enable_warnings;
|
||||
extern gboolean verbose_mode;
|
||||
extern gboolean generate_docs;
|
||||
extern gboolean generate_invoke;
|
||||
extern gboolean generate_headers;
|
||||
extern gboolean generate_nothing;
|
||||
|
||||
typedef struct {
|
||||
FILE *file;
|
||||
IDL_ns ns;
|
||||
IDL_tree tree;
|
||||
int mode;
|
||||
} TreeState;
|
||||
|
||||
#define TREESTATE_HEADER 0
|
||||
#define TREESTATE_INVOKE 1
|
||||
#define TREESTATE_DOC 2
|
||||
#define TREESTATE_NUM 3
|
||||
|
||||
/*
|
||||
* A function to handle an IDL_tree type.
|
||||
*/
|
||||
typedef gboolean (*nodeHandler)(TreeState *);
|
||||
|
||||
/*
|
||||
* An array of vectors of nodeHandlers, for handling each kind of node.
|
||||
*/
|
||||
extern nodeHandler *nodeDispatch[TREESTATE_NUM];
|
||||
|
||||
extern nodeHandler headerDispatch[];
|
||||
extern nodeHandler invokeDispatch[];
|
||||
extern nodeHandler docDispatch[];
|
||||
|
||||
/*
|
||||
* nodeHandler that reports an error.
|
||||
*/
|
||||
gboolean node_is_error(TreeState *state);
|
||||
|
||||
/*
|
||||
* Process an IDL file, generating typelib, invoke glue and headers as
|
||||
* appropriate.
|
||||
*/
|
||||
int
|
||||
xpidl_process_idl(char *filename);
|
||||
|
||||
/*
|
||||
* Add an output file to an internal list. Used to clean up temporary files
|
||||
* in case of fatal error.
|
||||
*/
|
||||
|
||||
void XPIDL_add_output_file(char *fn);
|
||||
void XPIDL_cleanup_on_error();
|
||||
|
||||
#endif /* __xpidl_h */
|
|
@ -0,0 +1,52 @@
|
|||
#include "xpidl.h"
|
||||
|
||||
/*
|
||||
* Generates documentation from javadoc-style comments in XPIDL files.
|
||||
*/
|
||||
|
||||
nodeHandler docDispatch[] = {
|
||||
NULL, /* IDLN_NONE */
|
||||
NULL, /* IDLN_ANY */
|
||||
NULL, /* IDLN_LIST */
|
||||
NULL, /* IDLN_GENTREE */
|
||||
NULL, /* IDLN_INTEGER */
|
||||
NULL, /* IDLN_STRING */
|
||||
NULL, /* IDLN_WIDE_STRING */
|
||||
NULL, /* IDLN_CHAR */
|
||||
NULL, /* IDLN_WIDE_CHAR */
|
||||
NULL, /* IDLN_FIXED */
|
||||
NULL, /* IDLN_FLOAT */
|
||||
NULL, /* IDLN_BOOLEAN */
|
||||
NULL, /* IDLN_IDENT */
|
||||
NULL, /* IDLN_TYPE_DCL */
|
||||
NULL, /* IDLN_CONST_DCL */
|
||||
NULL, /* IDLN_EXCEPT_DCL */
|
||||
NULL, /* IDLN_ATTR_DCL */
|
||||
NULL, /* IDLN_OP_DCL */
|
||||
NULL, /* IDLN_PARAM_DCL */
|
||||
NULL, /* IDLN_FORWARD_DCL */
|
||||
NULL, /* IDLN_TYPE_INTEGER */
|
||||
NULL, /* IDLN_TYPE_FLOAT */
|
||||
NULL, /* IDLN_TYPE_FIXED */
|
||||
NULL, /* IDLN_TYPE_CHAR */
|
||||
NULL, /* IDLN_TYPE_WIDE_CHAR */
|
||||
NULL, /* IDLN_TYPE_STRING */
|
||||
NULL, /* IDLN_TYPE_WIDE_STRING */
|
||||
NULL, /* IDLN_TYPE_BOOLEAN */
|
||||
NULL, /* IDLN_TYPE_OCTET */
|
||||
NULL, /* IDLN_TYPE_ANY */
|
||||
NULL, /* IDLN_TYPE_OBJECT */
|
||||
NULL, /* IDLN_TYPE_ENUM */
|
||||
NULL, /* IDLN_TYPE_SEQUENCE */
|
||||
NULL, /* IDLN_TYPE_ARRAY */
|
||||
NULL, /* IDLN_TYPE_STRUCT */
|
||||
NULL, /* IDLN_TYPE_UNION */
|
||||
NULL, /* IDLN_MEMBER */
|
||||
NULL, /* IDLN_NATIVE */
|
||||
NULL, /* IDLN_CASE_STMT */
|
||||
NULL, /* IDLN_INTERFACE */
|
||||
NULL, /* IDLN_MODULE */
|
||||
NULL, /* IDLN_BINOP */
|
||||
NULL, /* IDLN_UNARYOP */
|
||||
NULL /* IDLN_TYPE_TYPECODE */
|
||||
};
|
|
@ -0,0 +1,189 @@
|
|||
#include "xpidl.h"
|
||||
|
||||
static gboolean
|
||||
ident(TreeState *state)
|
||||
{
|
||||
printf("%s", IDL_IDENT(state->tree).str);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
interface(TreeState *state)
|
||||
{
|
||||
printf("starting interface %s\n", IDL_INTERFACE(state->tree).ident);
|
||||
state->tree = IDL_INTERFACE(state->tree).body;
|
||||
return process_node(state);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
list(TreeState *state)
|
||||
{
|
||||
IDL_tree iter;
|
||||
for (iter = state->tree; iter; iter = IDL_LIST(iter).next) {
|
||||
state->tree = IDL_LIST(iter).data;
|
||||
if (!process_node(state))
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
type_integer(TreeState *state)
|
||||
{
|
||||
IDL_tree p = state->tree;
|
||||
|
||||
if (!IDL_TYPE_INTEGER(p).f_signed)
|
||||
fputs("unsigned ", stdout);
|
||||
|
||||
switch(IDL_TYPE_INTEGER(p).f_type) {
|
||||
case IDL_INTEGER_TYPE_SHORT:
|
||||
printf("short");
|
||||
break;
|
||||
case IDL_INTEGER_TYPE_LONG:
|
||||
printf("long");
|
||||
break;
|
||||
case IDL_INTEGER_TYPE_LONGLONG:
|
||||
printf("longlong");
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
type(TreeState *state)
|
||||
{
|
||||
if (!state->tree) {
|
||||
fputs("void", stdout);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
switch(IDL_NODE_TYPE(state->tree)) {
|
||||
case IDLN_TYPE_INTEGER:
|
||||
return type_integer(state);
|
||||
case IDLN_TYPE_STRING:
|
||||
fputs("string", stdout);
|
||||
return TRUE;
|
||||
default:
|
||||
printf("unknown_type_%d", IDL_NODE_TYPE(state->tree));
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
param_dcls(TreeState *state)
|
||||
{
|
||||
IDL_tree iter;
|
||||
fputs("(", stdout);
|
||||
for (iter = state->tree; iter; iter = IDL_LIST(iter).next) {
|
||||
struct _IDL_PARAM_DCL decl = IDL_PARAM_DCL(IDL_LIST(iter).data);
|
||||
switch(decl.attr) {
|
||||
case IDL_PARAM_IN:
|
||||
fputs("in ", stdout);
|
||||
break;
|
||||
case IDL_PARAM_OUT:
|
||||
fputs("out ", stdout);
|
||||
break;
|
||||
case IDL_PARAM_INOUT:
|
||||
fputs("inout ", stdout);
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
state->tree = (IDL_tree)decl.param_type_spec;
|
||||
if (!type(state))
|
||||
return FALSE;
|
||||
fputs(" ", stdout);
|
||||
state->tree = (IDL_tree)decl.simple_declarator;
|
||||
if (!process_node(state))
|
||||
return FALSE;
|
||||
if (IDL_LIST(iter).next)
|
||||
fputs(", ", stdout);
|
||||
}
|
||||
fputs(")", stdout);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
attr_dcl(TreeState *state)
|
||||
{
|
||||
IDL_tree orig = state->tree;
|
||||
printf("%sattribute ", IDL_ATTR_DCL(state->tree).f_readonly ?
|
||||
"readonly " : "");
|
||||
state->tree = IDL_ATTR_DCL(state->tree).param_type_spec;
|
||||
if (state->tree && !process_node(state))
|
||||
return FALSE;
|
||||
fputs(" ", stdout);
|
||||
state->tree = IDL_ATTR_DCL(orig).simple_declarations;
|
||||
if (state->tree && !process_node(state))
|
||||
return FALSE;
|
||||
puts(";");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* A method is an `operation', therefore a method decl is an `op dcl'.
|
||||
* I blame Elliot.
|
||||
*/
|
||||
static gboolean
|
||||
op_dcl(TreeState *state)
|
||||
{
|
||||
struct _IDL_OP_DCL op = IDL_OP_DCL(state->tree);
|
||||
state->tree = op.op_type_spec;
|
||||
if (!type(state))
|
||||
return FALSE;
|
||||
fputs(" ", stdout);
|
||||
state->tree = op.ident;
|
||||
if (state->tree && !process_node(state))
|
||||
return FALSE;
|
||||
state->tree = op.parameter_dcls;
|
||||
if (!param_dcls(state))
|
||||
return FALSE;
|
||||
fputs(";\n", stdout);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
nodeHandler headerDispatch[] = {
|
||||
NULL, /* IDLN_NONE */
|
||||
NULL, /* IDLN_ANY */
|
||||
list, /* IDLN_LIST */
|
||||
NULL, /* IDLN_GENTREE */
|
||||
NULL, /* IDLN_INTEGER */
|
||||
NULL, /* IDLN_STRING */
|
||||
NULL, /* IDLN_WIDE_STRING */
|
||||
NULL, /* IDLN_CHAR */
|
||||
NULL, /* IDLN_WIDE_CHAR */
|
||||
NULL, /* IDLN_FIXED */
|
||||
NULL, /* IDLN_FLOAT */
|
||||
NULL, /* IDLN_BOOLEAN */
|
||||
ident, /* IDLN_IDENT */
|
||||
NULL, /* IDLN_TYPE_DCL */
|
||||
NULL, /* IDLN_CONST_DCL */
|
||||
NULL, /* IDLN_EXCEPT_DCL */
|
||||
attr_dcl, /* IDLN_ATTR_DCL */
|
||||
op_dcl, /* IDLN_OP_DCL */
|
||||
param_dcls, /* IDLN_PARAM_DCL */
|
||||
NULL, /* IDLN_FORWARD_DCL */
|
||||
type_integer, /* IDLN_TYPE_INTEGER */
|
||||
type, /* IDLN_TYPE_FLOAT */
|
||||
type, /* IDLN_TYPE_FIXED */
|
||||
type, /* IDLN_TYPE_CHAR */
|
||||
type, /* IDLN_TYPE_WIDE_CHAR */
|
||||
type, /* IDLN_TYPE_STRING */
|
||||
type, /* IDLN_TYPE_WIDE_STRING */
|
||||
type, /* IDLN_TYPE_BOOLEAN */
|
||||
type, /* IDLN_TYPE_OCTET */
|
||||
type, /* IDLN_TYPE_ANY */
|
||||
type, /* IDLN_TYPE_OBJECT */
|
||||
type, /* IDLN_TYPE_ENUM */
|
||||
type, /* IDLN_TYPE_SEQUENCE */
|
||||
type, /* IDLN_TYPE_ARRAY */
|
||||
type, /* IDLN_TYPE_STRUCT */
|
||||
type, /* IDLN_TYPE_UNION */
|
||||
NULL, /* IDLN_MEMBER */
|
||||
NULL, /* IDLN_NATIVE */
|
||||
NULL, /* IDLN_CASE_STMT */
|
||||
interface, /* IDLN_INTERFACE */
|
||||
NULL, /* IDLN_MODULE */
|
||||
NULL, /* IDLN_BINOP */
|
||||
NULL, /* IDLN_UNARYOP */
|
||||
NULL /* IDLN_TYPE_TYPECODE */
|
||||
};
|
|
@ -0,0 +1,101 @@
|
|||
#include "xpidl.h"
|
||||
|
||||
FILE *typelib_file = NULL;
|
||||
FILE *invoke_file = NULL;
|
||||
FILE *header_file = NULL;
|
||||
|
||||
nodeHandler *nodeDispatch[TREESTATE_NUM] = { NULL };
|
||||
|
||||
/*
|
||||
* Pass 1 generates #includes for headers.
|
||||
*/
|
||||
static gboolean
|
||||
process_tree_pass1(TreeState *state)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
node_is_error(TreeState *state)
|
||||
{
|
||||
fprintf(stderr, "ERROR: Unexpected node type %d\n",
|
||||
IDL_NODE_TYPE(state->tree));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* The bulk of the generation happens here.
|
||||
*/
|
||||
gboolean
|
||||
process_node(TreeState *state)
|
||||
{
|
||||
char *name = NULL;
|
||||
nodeHandler *handlerp = nodeDispatch[state->mode], handler;
|
||||
assert(state->tree);
|
||||
|
||||
if (handlerp && (handler = handlerp[IDL_NODE_TYPE(state->tree)]))
|
||||
return handler(state);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
process_tree(TreeState *state)
|
||||
{
|
||||
IDL_tree top = state->tree;
|
||||
if (!process_tree_pass1(state))
|
||||
return FALSE;
|
||||
state->tree = top; /* pass1 might mutate state */
|
||||
return process_node(state);
|
||||
}
|
||||
|
||||
int
|
||||
xpidl_process_idl(char *filename) {
|
||||
char *basename, *tmp;
|
||||
IDL_tree top;
|
||||
TreeState state;
|
||||
int rv;
|
||||
|
||||
rv = IDL_parse_filename(filename, NULL, NULL, &top,
|
||||
&state.ns, IDLF_XPIDL,
|
||||
enable_warnings ? IDL_WARNING1 : 0);
|
||||
if (rv != IDL_SUCCESS) {
|
||||
if (rv == -1) {
|
||||
g_warning("Parse of %s failed: %s", filename, g_strerror(errno));
|
||||
} else {
|
||||
g_warning("Parse of %s failed", filename);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
basename = g_strdup(filename);
|
||||
tmp = strrchr(basename, '.');
|
||||
if (tmp)
|
||||
*tmp = '\0';
|
||||
|
||||
state.file = stdout; /* XXX */
|
||||
nodeDispatch[TREESTATE_HEADER] = headerDispatch;
|
||||
nodeDispatch[TREESTATE_INVOKE] = invokeDispatch;
|
||||
nodeDispatch[TREESTATE_DOC] = docDispatch;
|
||||
if (generate_headers) {
|
||||
state.mode = TREESTATE_HEADER;
|
||||
state.tree = top;
|
||||
if (!process_tree(&state))
|
||||
return 0;
|
||||
}
|
||||
if (generate_invoke) {
|
||||
state.mode = TREESTATE_INVOKE;
|
||||
state.tree = top;
|
||||
if (!process_tree(&state))
|
||||
return 0;
|
||||
}
|
||||
if (generate_docs) {
|
||||
state.mode = TREESTATE_DOC;
|
||||
state.tree = top;
|
||||
if (!process_tree(&state))
|
||||
return 0;
|
||||
}
|
||||
IDL_ns_free(state.ns);
|
||||
IDL_tree_free(top);
|
||||
|
||||
return 1;
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
#include "xpidl.h"
|
||||
|
||||
nodeHandler invokeDispatch[] = {
|
||||
NULL, /* IDLN_NONE */
|
||||
NULL, /* IDLN_ANY */
|
||||
NULL, /* IDLN_LIST */
|
||||
NULL, /* IDLN_GENTREE */
|
||||
NULL, /* IDLN_INTEGER */
|
||||
NULL, /* IDLN_STRING */
|
||||
NULL, /* IDLN_WIDE_STRING */
|
||||
NULL, /* IDLN_CHAR */
|
||||
NULL, /* IDLN_WIDE_CHAR */
|
||||
NULL, /* IDLN_FIXED */
|
||||
NULL, /* IDLN_FLOAT */
|
||||
NULL, /* IDLN_BOOLEAN */
|
||||
NULL, /* IDLN_IDENT */
|
||||
NULL, /* IDLN_TYPE_DCL */
|
||||
NULL, /* IDLN_CONST_DCL */
|
||||
NULL, /* IDLN_EXCEPT_DCL */
|
||||
NULL, /* IDLN_ATTR_DCL */
|
||||
NULL, /* IDLN_OP_DCL */
|
||||
NULL, /* IDLN_PARAM_DCL */
|
||||
NULL, /* IDLN_FORWARD_DCL */
|
||||
NULL, /* IDLN_TYPE_INTEGER */
|
||||
NULL, /* IDLN_TYPE_FLOAT */
|
||||
NULL, /* IDLN_TYPE_FIXED */
|
||||
NULL, /* IDLN_TYPE_CHAR */
|
||||
NULL, /* IDLN_TYPE_WIDE_CHAR */
|
||||
NULL, /* IDLN_TYPE_STRING */
|
||||
NULL, /* IDLN_TYPE_WIDE_STRING */
|
||||
NULL, /* IDLN_TYPE_BOOLEAN */
|
||||
NULL, /* IDLN_TYPE_OCTET */
|
||||
NULL, /* IDLN_TYPE_ANY */
|
||||
NULL, /* IDLN_TYPE_OBJECT */
|
||||
NULL, /* IDLN_TYPE_ENUM */
|
||||
NULL, /* IDLN_TYPE_SEQUENCE */
|
||||
NULL, /* IDLN_TYPE_ARRAY */
|
||||
NULL, /* IDLN_TYPE_STRUCT */
|
||||
NULL, /* IDLN_TYPE_UNION */
|
||||
NULL, /* IDLN_MEMBER */
|
||||
NULL, /* IDLN_NATIVE */
|
||||
NULL, /* IDLN_CASE_STMT */
|
||||
NULL, /* IDLN_INTERFACE */
|
||||
NULL, /* IDLN_MODULE */
|
||||
NULL, /* IDLN_BINOP */
|
||||
NULL, /* IDLN_UNARYOP */
|
||||
NULL /* IDLN_TYPE_TYPECODE */
|
||||
};
|
Загрузка…
Ссылка в новой задаче