BNF for idl.jj

NON-TERMINALS

specification ::= ( ( idl_pp )* definition )+
definition ::= type_dcl ";"
| const_dcl ";"
| except_dcl ";"
| interfacex ";"
| module ";"
module ::= "module" identifier "{" ( ( idl_pp )* definition )* "}"
interfacex ::= "pseudo" interfacex1
| "abstract" interfacex1
| interfacex1
interfacex1 ::= interface_dcl
| forward_dcl
interface_dcl ::= interface_header "{" interface_body "}"
forward_dcl ::= "interface" identifier
interface_header ::= "interface" identifier ( inheritance_spec )?
interface_body ::= ( ( idl_pp )* export )*
export ::= type_dcl ";"
| const_dcl ";"
| except_dcl ";"
| attr_dcl ";"
| op_dcl ";"
inheritance_spec ::= ":" scoped_name ( inheritance_spec1 )*
inheritance_spec1 ::= "," scoped_name
scoped_name ::= scoped_name1
scoped_name1 ::= "::" identifier ( scoped_name2 )*
| identifier ( scoped_name2 )*
scoped_name2 ::= "::" identifier
const_dcl ::= "const" const_type identifier "=" const_exp
const_type ::= floating_type
| integer_type
| char_type
| boolean_type
| string_type
| fixed_type
| scoped_name
const_exp ::= or_expr
or_expr ::= xor_expr ( or_expr1 )*
or_expr1 ::= "|" xor_expr
xor_expr ::= and_expr ( xor_expr1 )*
xor_expr1 ::= "^" and_expr
and_expr ::= shift_expr ( and_expr1 )*
and_expr1 ::= "&" shift_expr
shift_expr ::= add_expr ( shift_expr1 )*
shift_expr1 ::= ">>" add_expr
| "<<" add_expr
add_expr ::= mult_expr ( add_expr1 )*
add_expr1 ::= "+" mult_expr
| "-" mult_expr
mult_expr ::= unary_expr ( mult_expr1 )*
mult_expr1 ::= "*" unary_expr
| "/" unary_expr
| "%" unary_expr
unary_expr ::= "-" primary_expr
| "+" primary_expr
| "~" primary_expr
| primary_expr
primary_expr ::= scoped_name
| literal
| "(" const_exp ")"
literal ::= integer_literal
| string_literal
| character_literal
| floating_literal
| boolean_literal
boolean_literal ::= "TRUE"
| "FALSE"
positive_int_const ::= const_exp
type_dcl ::= "typedef" type_spec type_declarators
| "native" native_type
| constr_type_spec
type_spec ::= simple_type_spec
| constr_type_spec
simple_type_spec ::= base_type_spec
| template_type_spec
| scoped_name
base_type_spec ::= floating_type
| integer_type
| char_type
| boolean_type
| octet_type
| object_type
| any_type
template_type_spec ::= sequence_type
| fixed_type
| string_type
constr_type_spec ::= struct_type
| union_type
| enum_type
type_declarators ::= t_declarator ( "," t_declarator )*
t_declarator ::= complex_declarator
| simple_declarator
simple_declarator ::= identifier
complex_declarator ::= array_declarator
array_declarator ::= identifier ( fixed_array_size )+
fixed_array_size ::= "[" positive_int_const "]"
floating_type ::= "float"
| "double"
| "long" "double"
integer_type ::= "unsigned" int_type
| int_type
int_type ::= "long" "long"
| "long"
| "short"
char_type ::= "char"
| "wchar"
boolean_type ::= "boolean"
octet_type ::= "octet"
object_type ::= "Object"
any_type ::= "any"
native_type ::= simple_declarator
s_declarator ::= complex_declarator
| simple_declarator
e_declarator ::= complex_declarator
| simple_declarator
u_declarator ::= complex_declarator
| simple_declarator
struct_type ::= "struct" identifier "{" ( ( idl_pp )* struct_member_dcl )+ "}"
struct_member_dcl ::= type_spec struct_declarators
struct_declarators ::= s_declarator ( "," s_declarator )* ";"
union_type ::= "union" identifier "switch" "(" switch_type_spec ")" "{" switch_body "}"
switch_type_spec ::= integer_type
| char_type
| boolean_type
| enum_type
| scoped_name
switch_body ::= ( casex )+
casex ::= ( idl_pp )* case_label ( ( idl_pp )* case_label1 )* union_member_dcl ";"
case_label ::= "case" const_exp ":"
| "default" ":"
case_label1 ::= "case" const_exp ":"
union_member_dcl ::= type_spec union_declarators
union_declarators ::= u_declarator
enum_type ::= "enum" identifier "{" enumerator ( "," enumerator )* "}"
enumerator ::= identifier
sequence_type ::= "sequence" "<" simple_type_spec sequence_type1
sequence_type1 ::= "," positive_int_const ">"
| ">"
fixed_type ::= "fixed" "<" positive_int_const "," integer_literal ">"
string_type ::= "string" "<" positive_int_const ">"
| "string"
| "wstring" "<" positive_int_const ">"
| "wstring"
attr_dcl ::= "readonly" "attribute" param_type_spec attr_declarator ( "," attr_declarator )*
| "attribute" param_type_spec attr_declarator ( "," attr_declarator )*
attr_declarator ::= simple_declarator
except_dcl ::= "exception" identifier "{" ( ( idl_pp )* exception_member_dcl )* "}"
exception_member_dcl ::= type_spec exception_declarators
exception_declarators ::= e_declarator ( "," e_declarator )* ";"
op_dcl ::= "oneway" "void" identifier parameter_dcls ( context_expr )?
| op_type_spec identifier parameter_dcls ( raises_expr )? ( context_expr )?
op_type_spec ::= param_type_spec
| "void"
parameter_dcls ::= "(" ( param_dcl ( "," param_dcl )* )? ")"
param_dcl ::= param_attribute param_type_spec simple_declarator
param_attribute ::= "in"
| "out"
| "inout"
raises_expr ::= "raises" "(" raises_expr1 ( "," raises_expr1 )* ")"
raises_expr1 ::= scoped_name
context_expr ::= "context" "(" context_expr1 ( "," context_expr1 )* ")"
context_expr1 ::= string_literal
param_type_spec ::= base_type_spec
| string_type
| scoped_name
identifier ::= <ID>
integer_literal ::= <OCTALINT>
| <DECIMALINT>
| <HEXADECIMALINT>
string_literal ::= <STRING> ( string_literal1 )*
string_literal1 ::= <STRING>
character_literal ::= <CHARACTER>
floating_literal ::= <FLOATONE>
| <FLOATTWO>
idl_pp ::= <JAVADOC>
| "#pragma" <ID>
| "#" idl_post_cpp
| idl_pre_cpp
idl_pragma1 ::= scoped_name <STRING>
idl_pragma2 ::= <STRING>
idl_pragma3 ::= scoped_name integer_literal "." integer_literal
idl_post_cpp ::= integer_literal <STRING> ( idl_postcpp1 )*
idl_postcpp1 ::= integer_literal
idl_pre_cpp ::= "#include"
| "#if"
| "#ifdef"
| "#ifndef"
| "#elif"
| "#fi"