|
The grammar.idl Java example source code
/*
* Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* COMPONENT_NAME: idl.parser
*
* ORIGINS: 27
*
* 5639-D57, (C) COPYRIGHT International Business Machines Corp., 1997, 1998
*
*/
CORBA 2.3 IDL
---------------
(1) <specification>
(1) <specification'> e
<definition>
(2) <definition> ";"
<const_dcl> ";"
<except_dcl> ";"
<interface> ";"
<module> ";"
<value> ";"
(3) <module> "module" "{" "}"
(3) <module'>
(3) <module''>
e
(4) <interface>
<forward_dcl>
(5) <interface_dcl> "{" "}"
(6) <forward_dcl> "abstract" "interface"
"interface" <id>
(7) <interface_header> "abstract" "interface"
"interface" <id>
(7) <interface_header'> e
<interface_inheritance_spec>
(8) <interface_body>
(8) <interface_body'> e
<export>
(9) <export> ";"
<const_dcl> ";"
<except_dcl> ";"
<attr_dcl> ";"
<op_dcl> ";"
(10) <interface_inheritance_spec> ":"
(10) <interface_inheritance_spec'> e
"," <scoped_name>
(12) <scoped_name>
"::" <id>
(12) <scoped_name'> e
"::" <id>
(13) <value>
<value_abs_dcl>
<value_box_dcl>
<value_forward_dcl>
(14) <value_forward_dcl> "abstract" "valuetype"
"valuetype" <id>
(15) <value_box_dcl> "valuetype"
(16) <value_abs_dcl> "abstract" "valuetype" "{" "}"
"abstract" "valuetype" <id> "{" "}"
(16) <vad> e
<export>
(17) <value_dcl> "{" "}"
(17) <ve> e
<value_element>
(18) <value_header> "custom" "valuetype"
"valuetype" <id>
"custom" "valuetype" <id>
"valuetype" <id>
(19) <value_inheritance_spec>
(19) <opt_inherits> e
":" "truncatable" <value_name>
":" <value_name>
(19) <value_name_list> e
"," <value_name>
(19) <opt_supports> e
"supports" <interface_name>
(19) <interface_name_list> e
"," <interface_name>
(20) <value_name>
(21) <value_element>
<state_member>
<init_dcl>
(22) <state_member> "public" ";"
"private" <type_spec> ";"
(23) <init_dcl> "factory" "(" ")"
"factory" <id> "(" ")"
(24) <init_param_dcls>
<init_param_decl> ","
(25) <init_param_dcl>
(26) <init_param_attribute> "in"
(27) <const_dcl> "const" "="
(28) <const_type>
<char_type>
<wide_char_type>
<boolean_type>
<floating_pt_type>
<string_type>
<wide_string_type>
<scoped_name>
<octet_type>
(29) <const_exp>
(30) <or_expr>
(30) <or_expr'> e
"|" <xor_expr>
(31) <xor_expr>
(31) <xor_expr'> e
"^" <and_expr>
(32) <and_expr>
(32) <and_expr'> e
"&" <shift_expr>
(33) <shift_expr>
(33) <shift_expr'> e
">>" <add_expr>
"<<"
(34) <add_expr>
(34) <add_expr'> e
"+" <mult_expr>
"-" <mult_expr>
(35) <mult_expr>
(35) <mult_expr'> e
"*" <unary_expr>
"/" <unary_expr>
"%" <unary_expr>
(36) <unary_expr>
<primary_expr>
(37) <unary_operator> "-"
"+"
"~"
(38) <primary_expr>
<literal>
"(" <const_exp> ")"
(39) <literal> <>
<>
<>
<
<
<
<
<
(40) <boolean_literal> "TRUE"
"FALSE"
(41) <positive_int_const>
(42) <type_dcl> "typedef"
<struct_type>
<union_type>
<enum_type>
"native" <simple_declarator>
(43) <type_declarator>
(44) <type_spec>
<constr_type_spec>
(45) <simple_type_spec>
<template_type_spec>
<scoped_name>
(46) <base_type_spec>
<integer_type>
<char_type>
<wide_char_type>
<boolean_type>
<octet_type>
<any_type>
<object_type>
<value_base_type>
(47) <template_type_spec>
<string_type>
<wide_string_type>
<fixed_pt_type>
(48) <constr_type_spec>
<union_type>
<enum_type>
(49) <declarators>
(49) <declarators'> e
"," <declarator>
(50) <declarator>
<complex_declarator>
(51) <simple_declarator>
(52) <complex_declarator>
(53) <floating_pt_type> "float"
"double"
"long" "double"
(54) <integer_type>
<unsigned_int>
(55) <signed_int> "long"
"short"
"long" "long"
// 56-58 omitted
(59) <unsigned_int> "unsigned"
// 60-62 omitted
(63) <char_type> "char"
(64) <wide_char_type> "wchar"
(65) <boolean_type> "boolean"
(66) <octet_type> "octet"
(67) <any_type> "any"
(68) <object_type> "Object"
(69) <struct_type> "struct" "{" "}"
(70) <member_list>
(70) <member_list'> e
<member>
(71) <member> ";"
(72) <union_type> "union" "switch" "(" ")" "{" "}"
(73) <switch_type_spec>
<char_type>
<boolean_type>
<enum_type>
<scoped_name>
(74) <switch_body>
(74) <switch_body'> e
<case>
(75) <case> ";"
(75) <case'> e
<case_label>
(76) <case_label> "case" ":"
"default" ":"
(77) <element_spec>
(78) <enum_type> "enum" "{" "}"
(78) <enum_type'> e
"," <id>
// 79 omitted
(80) <sequence_type> "sequence" "<"
(80) <sequence_type'> "," ">"
">"
(81) <string_type> "string"
"string" "<" "
(82) <wide_string_type> "wstring"
"wstring" "<" "
(83) <array_declarator>
(84) <fixed_array_size> "[" "]"
(85) <attr_dcl> "readonly" "attribute"
"attribute" <param_type_spec>
(85) <attr_dcl'> e
"," <id>
(86) <except_dcl> "exception" "{" "}"
(86) <except_dcl'> e
<member>
(87) <op_dcl>
<op_type_spec>
(87) <op_dcl'>
<macroID>
(87) <op_dcl''> e
<context_expr>
<raises_expr>
<raises_expr>
(88) <op_attribute> "oneway"
(89) <op_type_spec>
"void"
(90) <parameter_dcls> "("
(90) <parameter_dcls'> ")"
")"
(90) <parameter_dcls''> e
"," <param_dcl>
(91) <param_dcl>
(92) <param_attribute> "in"
"out"
"inout"
(93) <raises_expr> "raises" "(" ")"
(93) <raises_expr'> e
"," <scoped_name>
(94) <context_expr> "context" "(" ")"
(94) <context_expr'> e
"," <string_literal>
(95) <param_type_spec>
<string_type>
<wide_string_type>
<scoped_name>
(96) <fixed_pt_type> "fixed" "<" "," ">"
(97) <fixed_pt_const_type> "fixed"
(98) <value_base_type> "ValueBase"
NOTES:
- #define id(id, id, ...) token-string is a macro definition. There can be no space between the first id and the left paren. Since id( must be treated as a token and id( can also appear in op_dcl, see that production for the effect of this token.
Other Java examples (source code examples)
Here is a short list of links related to this Java grammar.idl source code file:
|