/********************************************************
        This file is meant to try every error
     message that the idl front-end can generate.
        These errors are tested rule by rule.
*********************************************************/

/************************/
/* First, try each rule */
/************************/


/***  Test of rule 1 ***/
// An empty specification may be tested since it is not permitted


/***  Test of rule 2 ***/
// not a definition
Error
// just to resume the parsing on a right definition
interface resume1 {};
// ';' forgotten
interface interface1 {}
// just to resume the parsing on a right definition
interface resume2 {};


/***  Test of rule 3 ***/
// identifier forgotten
module
// just to resume the parsing on a right definition
interface resume3 {};
// '{' forgotten
module module2
// just to resume the parsing on a right definition
interface resume4 {};
// an empty module (not allowed)
module module3 {};
// '}' forgotten
module module4 {;};
// just to resume the parsing on a right definition
interface resume5 {};


/***  Test of rule 4 ***/ 
// nothing to test here


/***  Test of rule 5 ***/ 
// '{' forgotten
interface interface2 ERROR
// just to resume the parsing on a right definition
interface resume6 {};
// '}' forgotten
interface interface3 {;};
// just to resume the parsing on a right definition
interface resume7 {};


/***  Test of rule 6 ***/ 
// "interface" forgotten
abstract ERROR
// just to resume the parsing on a right definition
interface resume8 {};
// identifier forgotten
interface;
// just to resume the parsing on a right definition
interface resume9 {};
// identifier forgotten
abstract interface;
// just to resume the parsing on a right definition
interface resume10 {};


/***  Test of rule 7 ***/ 
// "interface" forgotten
abstract ERROR
// just to resume the parsing on a right definition
interface resume11 {};
// identifier forgotten
interface;
// just to resume the parsing on a right definition
interface resume12 {};
// identifier forgotten
abstract interface;
// just to resume the parsing on a right definition
interface resume13 {};


/***  Test of rule 8 ***/ 
// not an export
interface interface4 {
  ERROR
};


/***  Test of rule 9 ***/ 
// ';' forgotten at the end of an export
interface interface5 {
  const long const1 = 5
};


/*** test of rule 10 ***/
// forgotten interface name
interface interface6 : {};
// just to resume the parsing on a right definition
interface resume14 {};
// forgotten interface name too
interface interface7 {};
interface interface8 : interface7, {};
// just to resume the parsing on a right definition
interface resume15 {};


/*** test of rule 11 ***/
// an interface name should denote an interface
const long const1 = 5;
interface interface9 : const1 {};


/*** test of rule 12 ***/
// identifier forgotten
interface interface10 : ::;
// just to resume the parsing on a right definition
interface resume16 {};
// identifier forgotten too
interface interface11 {};
interface interface12 : interface11::;
// just to resume the parsing on a right definition
interface resume17 {};


/***  Test of rule 13 ***/
// nothing to test here


/*** Test of rule 14 ***/
// "valuetype" forgotten
abstract ERROR
// just to resume the parsing on a right definition
interface resume18 {};
// identifier forgotten
valuetype;
// just to resume the parsing on a right definition
interface resume19 {};
// identifier forgotten
abstract valuetype;
// just to resume the parsing on a right definition
interface resume20 {};


/*** Test of rule 15 ***/
// identifier forgotten
valuetype;
// just to resume the parsing on a right definition
interface resume21 {};


/*** Test of rule 16 ***/
// "valuetype" forgotten
abstract ERROR
// just to resume the parsing on a right definition
interface resume23 {};
// identifier forgotten
abstract valuetype;
// just to resume the parsing on a right definition
interface resume24 {};
// inheritance or '{' forgotten
abstract valuetype valuetype2 ERROR
// just to resume the parsing on a right definition
interface resume25 {};
// '}' forgotten
abstract valuetype valuetype3 { ERROR };
// just to resume the parsing on a right definition
interface resume26 {};


/*** Test of rule 17 ***/
// '{' forgotten
custom valuetype valuetype4 ERROR
// just to resume the parsing on a right definition
interface resume27 {};
// '}' forgotten
custom valuetype valuetype5 { ERROR };
// just to resume the parsing on a right definition
interface resume28 {};


/*** Test of rule 18 ***/
// valuetype forgotten
custom ERROR
// just to resume the parsing on a right definition
interface resume29 {};
// identifier forgotten
valuetype
// just to resume the parsing on a right definition
interface resume30 {};
// identifier forgotten
custom valuetype
// just to resume the parsing on a right definition
interface resume31 {};
// inheritance or '{' forgotten
valuetype valuetype6 ERROR
// just to resume the parsing on a right definition
interface resume32 {};
// inheritance or '{' forgotten
custom valuetype valuetype7 ERROR
// just to resume the parsing on a right definition
interface resume33 {};


/*** Test of rule 19 ***/
// value_name forgotten
valuetype valuetype8 : {};
// just to resume the parsing on a right definition
interface resume34 {};
// ',', "supports" or '{' expected
interface interface13 {};
valuetype valuetype9 supports interface13 ERROR
// just to resume the parsing on a right definition
interface resume35 {};
// value_name forgotten
valuetype valuetype10 {};
valuetype valuetype11 : valuetype10, {};
// just to resume the parsing on a right definition
interface resume36 {};
// interface_name forgotten
valuetype valuetype12 supports {};
// just to resume the parsing on a right definition
interface resume37 {};
// interface_name forgotten
interface interface15 {};
valuetype valuetype14 supports interface15, {};
// just to resume the parsing on a right definition
interface resume39 {};


/*** Test of rule 20 ***/
// a value_name should denote a valuetype
const long const2 = 5;
valuetype valuetype15 : const2 {};


/*** Test of rule 21 ***/
// bad value element
valuetype valuetype16 { ; };


/*** Test of rule 22 ***/
// "public" or "private" forgotten
valuetype valuetype17 { 
  long member1;
};
// type_spec forgotten
valuetype valuetype18 { 
  public ;
};
// declarators forgotten
valuetype valuetype19 { 
  public long;
};
// ';' forgotten
valuetype valuetype20 { 
  public long a,b[2]
};


/*** Test of rule 23 ***/
// identifier forgotten
valuetype value21 {
  factory 
};
// '(' forgotten
valuetype value22 {
  factory factory1
};
// ')' forgotten
valuetype value23 {
  factory factory1 (
};
// ';' forgotten
valuetype value24 {
  factory factory1 ()
};


/*** Test of rule 24 ***/
// bad init_param_decls
valuetype value25 {
  factory factory1 (;);
};


/*** Test of rule 25 ***/
// Bad init_param_decl
valuetype value26 {
  factory factory1 (;);
};
// init_param_attribute forgotten
valuetype value27 {
  factory factory1 (long argument1);
};
// param_type_spec forgotten
valuetype value28 {
  factory factory1 (in);
};
// simple declarator forgotten
valuetype value29 {
  factory factory1 (in long);
};


/*** Test of rule 26 ***/
// Bad init param attribute
valuetype value30 {
  factory factory1 (;);
};
valuetype value31 {
  factory factory1 (out long argument1);
};
valuetype value32 {
  factory factory1 (inout long argument1);
};


/*** Test of rule 27 ***/
// const_type forgotten
const;
// just to resume the parsing on a right definition
interface resume40 {};
// identifier forgotten
const boolean;
// just to resume the parsing on a right definition
interface resume41 {};
// '=' forgotten
const boolean const3;
// just to resume the parsing on a right definition
interface resume42 {};
// const_exp forgotten
const boolean const4 =;
// just to resume the parsing on a right definition
interface resume43 {};


/*** Test of rule 28 ***/
// bad const_type
const Error;
// just to resume the parsing on a right definition
interface resume44 {};


/*** Test of rule 29 ***/
// nothing to test here


/*** Test of rule 30 ***/
// xor_expr forgotten
const short const9 = 3 |;
// just to resume the parsing on a right definition
interface resume45 {};


/*** Test of rule 31 ***/
// and_expr forgotten
const short const10 = 3 ^;
// just to resume the parsing on a right definition
interface resume46 {};


/*** Test of rule 32 ***/
// shift_expr forgotten
const short const11 = 3 &;
// just to resume the parsing on a right definition
interface resume47 {};


/*** Test of rule 33 ***/
// add_expr forgotten
const short const12 = 3 >>;
// just to resume the parsing on a right definition
interface resume48 {};
// add_expr forgotten
const short const13 = 3 <<;
// just to resume the parsing on a right definition
interface resume49 {};


/*** Test of rule 34 ***/
// mult_expr forgotten
const short const14 = 3 +;
// just to resume the parsing on a right definition
interface resume50 {};
// mult_expr forgotten
const short const15 = 3 -;
// just to resume the parsing on a right definition
interface resume51 {};


/*** Test of rule 35 ***/
// unary_expr forgotten
const short const16 = 3 *;
// just to resume the parsing on a right definition
interface resume52 {};
// unary_expr forgotten
const short const17 = 3 /;
// just to resume the parsing on a right definition
interface resume53 {};
// unary_expr forgotten
const short const18 = 3 %;
// just to resume the parsing on a right definition
interface resume54 {};


/*** Test of rule 36 ***/
// primary_expr forgotten
const short const19 = -;
// just to resume the parsing on a right definition
interface resume55 {};
// primary_expr forgotten
const short const20 = +;
// just to resume the parsing on a right definition
interface resume56 {};
// primary_expr forgotten
const short const21 = ~;
// just to resume the parsing on a right definition
interface resume57 {};


/*** Test of rule 36 ***/
// nothing to test here


/*** Test of rule 38 ***/
// bad primary_expr
const short const22 = ERROR;
// just to resume the parsing on a right definition
interface resume58 {};
// const_exp forgotten
const short const23 = ( );
// ')' forgotten
const short const24 = ( 3 ;
// just to resume the parsing on a right definition
interface resume59 {};


/*** Test of rule 39 ***/
// nothing to be tested


/*** Test of rule 40 ***/
// nothing to be tested


/*** Test of rule 41 ***/
// non positive integer
typedef sequence<long,-5> typedef1;


/*** Test of rule 42 ***/
// type_declarator forgotten
typedef ;
// just to resume the parsing on a right definition
interface resume60 {};
// simple_declarator forgotten
native ;
// just to resume the parsing on a right definition
interface resume61 {};


/*** Test of rule 43 ***/
// declarators forgotten
typedef long;
// just to resume the parsing on a right definition
interface resume62 {};


/*** Test of rule 44 ***/
// nothing to test here


/*** Test of rule 45 ***/
// nothing to test here


/*** Test of rule 46 ***/
// nothing to test here


/*** Test of rule 47 ***/
// nothing to test here


/*** Test of rule 48 ***/
// nothing to test here


/*** Test of rule 49 ***/
// declarator forgotten
typedef long typedef2, ;
// just to resume the parsing on a right definition
interface resume63 {};

/*** Test of rule 50 ***/
// nothing to test here


/*** Test of rule 51 ***/
// nothing to test here


/*** Test of rule 52 ***/
// nothing to test here


/*** Test of rule 53 ***/
// "double" forgotten
const long const25 = 2.3;


/*** Test of rule 54 ***/
// nothing to test here


/*** Test of rule 55 ***/
// nothing to test here


/*** Test of rule 56 ***/
// nothing to test here


/*** Test of rule 57 ***/
// nothing to test here


/*** Test of rule 58 ***/
// "long" forgotten
const long const26 = 56000000000;


/*** Test of rule 59 ***/
// nothing to test here


/*** Test of rule 60 ***/
// "short" forgotten
const unsigned const27 = 5;


/*** Test of rule 61 ***/
// "long" forgotten
const unsigned const28 = 5;


/*** Test of rule 62 ***/
// "long" forgotten
const unsigned const29 = 5;
// "long" forgotten
const unsigned long const30 = 56000000000;


/*** Test of rule 63 ***/
// nothing to test here


/*** Test of rule 64 ***/
// nothing to test here


/*** Test of rule 65 ***/
// nothing to test here


/*** Test of rule 66 ***/
// nothing to test here


/*** Test of rule 67 ***/
// nothing to test here


/*** Test of rule 68 ***/
// nothing to test here


/*** Test of rule 69 ***/
// identifier forgotten
struct;
// just to resume the parsing on a right definition
interface resume64 {};
// '{' forgotten
struct struct1;
// just to resume the parsing on a right definition
interface resume65 {};
// '}' forgotten
struct struct3 { long member1; ; };
// just to resume the parsing on a right definition
interface resume66 {};


/*** Test of rule 70 ***/
// empty member list
struct struct4 {};


/*** Test of rule 71 ***/
// bad member
struct struct5 {;};
// declarators forgotten
struct struct6 { long };
// ';' forgotten
struct struct7 { long member1 };


/*** Test of rule 72 ***/
// identifier forgotten
union;
// just to resume the parsing on a right definition
interface resume67 {};
// "switch" forgotten
union union2;
// just to resume the parsing on a right definition
interface resume68 {};
// '(' forgotten
union union3 switch;
// just to resume the parsing on a right definition
interface resume69 {};
// switch_type_spec forgotten
union union4 switch () { default : short element1; };
// ')' forgotten
union union5 switch (boolean ;
// just to resume the parsing on a right definition
interface resume70 {};
// '{' forgotten
union union6 switch (boolean);
// just to resume the parsing on a right definition
interface resume71 {};
// switch body forgotten
union union7 switch (boolean) {};
// '}' forgotten
union union8 switch (boolean) { case TRUE : long element1; ; };
// just to resume the parsing on a right definition
interface resume72 {};


/*** Test of rule 73 ***/
// bad switch_type_spec
union union9 switch (error) { case TRUE : long element1; };
// bad switch_type_spec
union union10 switch (string) { case TRUE : long element1; };


/*** Test of rule 74 ***/
// bad switch body
union union11 switch (boolean) { ERROR };


/*** Test of rule 75 ***/
// element_spec forgotten
union union12 switch (boolean) { case TRUE : };
// just to resume the parsing on a right definition
interface resume73 {};
// ';' forgotten
union union13 switch (boolean) { case TRUE : long element1 };
// just to resume the parsing on a right definition
interface resume74 {};


/*** Test of rule 76 ***/
// const_exp forgotten
union union14 switch (boolean) { case : long element1; };
// just to resume the parsing on a right definition
interface resume75 {};
// ':' forgotten
union union15 switch (boolean) { case TRUE long k; };
// just to resume the parsing on a right definition
interface resume76 {};
// ':' forgotten
union union16 switch (boolean) { default long k; };
// just to resume the parsing on a right definition
interface resume77 {};


/*** Test of rule 77 ***/
// declarator forgotten
union union17 switch (boolean) { default : long ; };
// just to resume the parsing on a right definition
interface resume78 {};


/*** Test of rule 78 ***/
// identifier forgotten
enum;
// just to resume the parsing on a right definition
interface resume79 {};
// '{' forgotten
enum enum1;
// just to resume the parsing on a right definition
interface resume80 {};
// enumerator forgotten
enum enum2 {};
// enumerator forgotten
enum enum3 { e1, };
// '}' forgotten
enum enum4 { e2, e3; };
// just to resume the parsing on a right definition
interface resume81 {};


/*** Test of rule 79 ***/
// nothing to test here


/*** Test of rule 80 ***/
// '<' forgotten
typedef sequence typedef3;
// just to resume the parsing on a right definition
interface resume82 {};
// simple_type_spec forgotten
typedef sequence <> typedef4;
// just to resume the parsing on a right definition
interface resume83 {};
// positive_int_const forgotten
typedef sequence <long,> typedef5;
// just to resume the parsing on a right definition
interface resume84 {};
// '>' forgotten
typedef sequence <long typedef6;
// bad type in simple_type_spec
typedef sequence<enum enum5 { e4 }> typedef7;


/*** Test of rule 81 ***/
// positive_int_const forgotten
typedef string <> typedef8;
// just to resume the parsing on a right definition
interface resume85 {};
// '>' forgotten
typedef string <10 typedef9;
// just to resume the parsing on a right definition
interface resume86 {};


/*** Test of rule 82 ***/
// positive_int_const forgotten
typedef wstring <> typedef10;
// just to resume the parsing on a right definition
interface resume87 {};
// '>' forgotten
typedef wstring <10 typedef11;
// just to resume the parsing on a right definition
interface resume88 {};


/*** Test of rule 83 ***/
// nothing to test here


/*** Test of rule 84 ***/
// positive_int_const forgotten
typedef boolean typedef12[;
// just to resume the parsing on a right definition
interface resume89 {};
// ']' forgotten
typedef boolean typedef13[7;
// just to resume the parsing on a right definition
interface resume90 {};


/*** Test of rule 85 ***/
// "attribute" forgotten
interface interface16 { readonly; };
// param_type_spec forgotten
interface interface17 { attribute; };
// simple declarator forgotten
interface interface18 { attribute long; };
// simple declarator forgotten
interface interface19 { attribute long attribute1, ; };
// bad param type
interface interface20 { attribute fixed <3,2> attribute1; };


/*** Test of rule 86 ***/
// identifier expected
exception;
// just to resume the parsing on a right definition
interface resume91 {};
// '{' expected
exception exception1;
// just to resume the parsing on a right definition
interface resume92 {};
// '}' expected
exception exception2 {; };
// just to resume the parsing on a right definition
interface resume93 {};
// bad member
exception exception3 { const ; };


/*** Test of rule 87 ***/
// op_type_spec forgotten
interface interface21 { oneway; };
// identifier forgotten
interface interface22 { void; };
// parameter_dcls forgotten
interface interface23 { void operation1; };
// bad op_type_spec
interface interface24 { fixed<3,2> operation1(); };


/***  Test of rule 88 ***/
// nothing to test here


/*** Test of rule 89 ***/
// bad op_type_spec
interface interface25 { oneway ERROR operation1(); };


/*** Test of rule 90 ***/
// param_dcl forgotten
interface interface26 { void operation1(in long arg1,); };
// ')' forgotten
interface interface27 { void operation1(in long arg1; };


/*** Test of rule 91 ***/
// param_type_spec forgotten
interface interface28 { void operation1(in); };
// simple_declarator forgotten
interface interface29 { void operation1(in long); };


/*** Test of rule 92 ***/
// bad param_attribute
interface interface30 { void operation1(long arg1); };


/*** Test of rule 93 ***/
// '(' forgotten
interface interface31 { void operation1() raises; };
// scoped_name forgotten
interface interface32 { void operation1() raises(); };
// scoped_name forgotten
exception exception4 {};
interface interface33 { void operation1() raises (exception4,); };
// ')' forgotten
exception exception5 {};
interface interface34 { void operation1() raises (exception5; };
// bad scoped name
const long const31 = 5;
interface interface35 { void operation1() raises (const31); };


/*** Test of rule 94 ***/
// '(' forgotten
interface interface36 { void operation1() context; };
// string_literal forgotten
interface interface37 { void operation1() context(); };
// string_literal forgotten
interface interface38 { void operation1() context("context1",); };
// ')' forgotten
interface interface39 { void operation1() context ("context1"; };
// bad string_literal
interface interface40 { void operation1() context ("_context1"); };
// bad string_literal
interface interface41 { void operation1() context (".context1"); };
// bad string_literal
interface interface42 { void operation1() context ("0context1"); };
// bad string_literal
interface interface43 { void operation1() context ("con%text1"); };
// bad string_literal
interface interface44 { void operation1() context ("con*text1"); };


/*** Test of rule 95 ***/
// bad param_type_spec
interface interface45 { void operation1(in fixed<2,3> arg1); };
// bad param_type_spec
interface interface46 { void operation1(in ERROR arg1); };


/*** Test of rule 96 ***/
// '<' forgotten
typedef fixed typedef14;
// just to resume the parsing on a right definition
interface resume94 {};
// positive_int_const forgotten
typedef fixed<> typedef15;
// just to resume the parsing on a right definition
interface resume95 {};
// ',' forgotten
typedef fixed<3> typedef16;
// just to resume the parsing on a right definition
interface resume96 {};
// positive_int_const forgotten
typedef fixed<3,> typedef17;
// just to resume the parsing on a right definition
interface resume97 {};
// '>' forgotten
typedef fixed<3,2 typedef18;
// just to resume the parsing on a right definition
interface resume98 {};




/*******************************/
/* Now, try each miscellaneous */
/*  point of the Idl langage   */
/*******************************/

/*** duplicated identifiers ***/
// duplicated module
module module0 { const long l = 5; };
module module0 { const long l = 5; };
interface interface0 {};
interface interface0 {};
valuetype valuetype0 {};
valuetype valuetype0 {};
const boolean const0 = TRUE;
const boolean const0 = TRUE;
typedef long type0;
typedef long type0;
typedef long type01[2];
typedef long type01[3];
struct struct0 {long memberA; };
struct struct0 {long memberA; };
union union0 switch (boolean) { case TRUE : long elementA; };
union union0 switch (boolean) { case TRUE : long elementA; };
union unionA switch (boolean) { 
  case TRUE : long elementA;
  case FALSE : long elementA;
};
enum enum0 { e0 };
enum enum0 { e01 };
enum enum01 { e02, e02 };
interface interface01 {
  attribute long attribute1;
  attribute long attribute1;
};
exception exception0 {};
exception exception0 {};
interface interface02 {
  void operation1 ();
  long operation1 (long arg1);
};
interface interface03 {
  void operation1 (in long arg1, in short arg1);
};
interface interface04 {
  exception exception1 {};
  void operation1 () raises (exception1, exception1);
};


/*** forwarded interfaces ***/
// problem of abstraction at the instantiation
abstract interface interfaceB;
interface interfaceB {};
interface interfaceC;
abstract interface interfaceC {};
// double forward
interface interfaceD;
interface interfaceD;
interface interfaceD {};
// non defined forwarded interface
module moduleB {
  interface interfaceA;
};


/*** single inheritance management for interfaces ***/
//an abstract interface cannot inherit from a stateful one
interface interfaceE {};
abstract interface interfaceF : interfaceE {};

/*** multiple inheritance management in case of interfaces ***/
// twice inherited from the same interface
interface interfaceG {};
interface interfaceH : interfaceG, interfaceG {};
// two inherited interfaces clash
interface interfaceI {
  attribute long attributeA;
};
interface interfaceJ {
  attribute long attributeA;
};
interface interfaceK : interfaceI, interfaceJ {};
// ambiguous references due to multiple inheritance
interface interfaceL {
  typedef long typeA;
  const long constA = 5;
  exception exceptionA {};
};
interface interfaceM {
  typedef short typeA;
  const long constA = 7;
  exception exceptionA {};
};
interface interfaceN : interfaceL, interfaceM {
  typedef typeA typeB;
  const long constB = constA;
  void operationA () raises (exceptionA);
};
// redefinition of attributes or operation
interface interfaceO {
  attribute long attributeA;
  void operationA ();
};
interface interfaceP : interfaceO {
  attribute long attributeA;
  void operationA (long argument);
};


/*** scoped names ***/
// non existing simple scoped name
typedef non_existing_scoped_name typeA;
// all the identifier except the last one should denote scopes
const long constA = 5;
typedef constA::l typeB;
// non existing complicated scope name
interface interfaceQ { const long constA = 5;};
typedef interfaceQ::constB typeC;


/*** recursive declaration ***/
// recursivity not allowed in a struct
struct structA {
  structA s;
};
// recursivity not allowed in an union
union unionB switch (boolean) {
  case TRUE : unionB unionC;
};


/*** forwarded values ***/
// double forward
valuetype valuetypeB;
valuetype valuetypeB;
valuetype valuetypeB {};
// problem of abstraction at the instantiation
abstract valuetype valuetypeC;
valuetype valuetypeC {};
valuetype valuetypeD;
abstract valuetype valuetypeD {};
// non defined forwarded value
module moduleC {
  valuetype valuetypeA;
};
// forward of a boxed valuetype
valuetype valuetypeE;
valuetype valuetypeE long;


/*** single inheritance management for values ***/
// no truncatable for an abstract value
abstract valuetype valuetypeF {};
abstract valuetype valuetypeG : truncatable valuetypeF {};
// no truncatable for an custom value
abstract valuetype valuetypeH {};
custom valuetype valuetypeI : truncatable valuetypeH {};
// an abstract value cannot inherit from a stateful one
valuetype valuetypeJ {};
abstract valuetype valuetypeK : valuetypeJ {};
// no truncatable for an abstract value inheritance
abstract valuetype valuetypeL {};
valuetype valuetypeM : truncatable valuetypeL {};
// no inheritance of a forward value without instantiation
valuetype valuetypeN;
valuetype valuetypeO : valuetypeN {};
valuetype valuetypeN {};
// no inheritance from a boxed value
valuetype valuetypeP long;
valuetype valuetypeQ : valuetypeP {};
// no inheritance from an interface
interface interfaceR {};
valuetype valuetypeR : interfaceR {};


/*** multiple inheritance management for values ***/
// no double inheritance of a single value
valuetype valuetypeS {};
valuetype valuetypeT : valuetypeS, valuetypeS {};
// no inheritance from more than one stateful value
valuetype valuetypeU {};
valuetype valuetypeV {};
valuetype valuetypeW : valuetypeU, valuetypeV {};
// no inheritance from a stateful value after the first inherited value
abstract valuetype valuetypeX {};
valuetype valuetypeY {};
valuetype valuetypeZ : valuetypeX, valuetypeY {};
// no inheritance of a forward value without instantiation
valuetype valuetypeAA {};
abstract valuetype valuetypeAB;
valuetype valuetypeAC : valuetypeAA, valuetypeAB {};
abstract valuetype valuetypeAB {};
// no inheritance from a boxed value
valuetype valuetypeAD {};
valuetype valuetypeAE long;
valuetype valuetypeAF : valuetypeAD, valuetypeAE {};
// no inheritance from an interface
valuetype valuetypeAG
interface interfaceS {};
valuetype valuetypeAH : valuetypeAG, interfaceS {};


/*** single support management for values ***/
// no support of a forward interface without instantiation
interface interfaceT;
valuetype valuetypeAI supports interfaceT {};
interface interfaceT {};
// no support of values
valuetype valuetypeAJ {};
valuetype valuetypeAK supports valuetypeAJ {};


/*** multiple support management for values ***/
// no double support of a single interface
abstract interface interfaceU {};
valuetype valuetypeAL supports interfaceU, interfaceU {};
// a stateful value may not support multiple stateful interfaces
interface interfaceV {};
interface interfaceW {};
valuetype valuetypeAM supports interfaceV, interfaceW {};
// no support of a forward interface without instantiation
interface interfaceX {};
interface interfaceY;
abstract valuetype valuetypeAN supports interfaceX, interfaceY {};
interface interfaceY {};
// no support of values
interface interfaceZ {};
valuetype valuetypeAO {};
valuetype valuetypeAP supports interfaceZ, valuetypeAO {};


/*** scopes and multiple inheritance in values ***/
// identifier already defined
valuetype valuetypeAQ {
  typedef long type1;
  typedef long type1;
};
valuetype valuetypeAR {
  const long constant1 = 5;
  const long constant1 = 5;
};
valuetype valuetypeAS {
  exception exception1 {};
  exception exception1 {};
};
valuetype valuetypeAT {
  attribute long attribute1;
  attribute long attribute1;
};
valuetype valuetypeAU {
  void operation1 ();
  void operation1 ();
};
valuetype valuetypeAV {
  public long member1;
  public long member1;
};
valuetype valuetypeAW {
  factory factory1 ();
  factory factory1 ();
};


/*** constant management : use of operators ***/
// not legal constant type
interface interfaceAA {};
const interfaceAA constB = 5;
// misuse of the | operator
const char constC = 'C' | 'H';
// misuse of the ^ operator
const char constD = 'C' ^ 'H';
// misuse of the & operator
const char constE = 'C' & 'H';
// negative value in a shift
const short constF = 160 >> -5;
// value > 63 in a shift
const short constG = 1 >> 65;
// misuse of the >> operator
const char constH = 'C' >> 'H';
// misuse of the << operator
const char constI = 'C' << 'H';
// misuse of the binary + operator
const char constJ = 'C' + 'H';
// misuse of the binary - operator
const char constK = 'C' - 'H';
// division by 0
const short constL = 45 / 0;
// division by 0
const float constM = 45. / 0.;
// division by 0
const fixed<2,0> constN = 45d / 0d;
// modulo by 0
const short constO = 45 % 0;
// misuse of the operator *
const char constP = 'C' * 'H';
// misuse of the operator /
const char constQ = 'C' / 'H';
// misuse of the operator %
const float constR = 1.23 % 1.23;
// misuse of the unary operator -
const char constS = - 'H';
// misuse of the unary operator +
const char constT = + 'H';
// misuse of the operator ~
const float constU = ~ 1.23;


/*** constant management : value types and scoped names ***/
// not a regular type
interface interfaceAB {};
const short constV = interfaceAB;
// incompatible types
const short constW = 4;
const char constX = constW;
// incompatible types
const short constY = 4;
const unsigned long constZ = constY;
// incompatible types
const fixed <3,1> constAA = 4.4d;
const fixed <3,2> constAB = constAA;
// incompatible types
enum enumC {eG, eH, eI};
enum enumD {eJ, eK, eL};
const enumC constAC = eL;
// incompatible types
enum enumE {eM, eN, eO};
const enumE constAD = eO;
enum enumF {eP, eQ, eR};
const enumF constAE = constAD;


/*** constant management : value types and literals ***/
// integer literal but no integer type
const float constAF = 5;
// string literal but no string type
const float constAG = "string";
// string literal and wide string type
const wstring constAH = "string";
// wide string literal but no wide string type
const float constAI = L"string";
// wide string literal and string type
const string constAJ = L"string";
// too long string literal
const string<4> constAK = "string";
// too long wide string literal
const wstring<4> constAL = L"wstring";
// char literal but no char type
const float constAM = 'c';
// char literal and wide char type
const wchar constAN = 'c';
// wide char literal but no wide char type
const float constAO = L'c';
// wide char literal and char type
const char constAP = L'c';
// floating point literal but no floating point type
const long constAQ = 5.2;
// fixed point literal but no fixed point type
const float constAR = 5.4d;
// precision in fixed point literals
const fixed<3,2> constAS = .434d;
// precision in fixed point literals
const fixed<3,1> constAT = 234.7d;
// boolean literal but no boolean type
const float constAU = TRUE;



/*** constant management : direct value ranges ***/
// octet range
const octet constAV = -2;
// octet range
const octet constAW = 280;
// short range
const short constAX = -33000;
// short range
const short constAY = 33000;
// long range
const long constAZ = -3000000000;
// long range
const long constBA = 3000000000;
// longlong range
//const long long constBB = -10000000000000000000;
// longlong range
//const long long constBC = 10000000000000000000;
// unsigned short range
const unsigned short constBD = -3;
// unsigned short range
const unsigned short constBE = 70000;
// unsigned long range
const unsigned long constBF = -3;
// unsigned long range
const unsigned long constBG = 5000000000;
// unsigned longlong range
const unsigned long long constBH = -1;
// unsigned longlong range
//const unsigned long long constBI = 18000000000000000000;
// float range
const float constBJ = -4e38;
// float range
const float constBK = 4e38;
// double range
const double constBL = -2E308;
// double range
const double constBM = 2e308;
// long double range
const long double constBN = -1.2E4932;
// long double range
const long double constBO = 1.2E4932;
// fixed point range
const fixed <32,4> constBP = 12344.254d;
// fixed point range
const fixed <4,5> constBQ = .01254d;


/*** constant management : indirect value ranges ***/
// octet range
const octet constBR = 5 - 8;
// octet range
const octet constBS = 230 + 50;
// octet range
const octet constBT = 23 * 23;
// short range
const short constBU = -30000 - 3000;
// short range
const short constBV = 30000 + 3000;
// short range
const short constBW = 30000 * 2;
// long range
const long constBX = -2000000000 - 1000000000;
// long range
const long constBY = 2000000000 + 1000000000;
// long range
const long constBZ = 2000000000 * 2;
// longlong range
//const long long constCA = -5000000000000000000 - 5000000000000000000;
// longlong range
//const long long constCB = 5000000000000000000 + 5000000000000000000;
// unsigned short range
//const long long constCC = 5000000000000000000 *2;
// unsigned short range
const unsigned short constCD = 5 - 8;
// unsigned short range
const unsigned short constCE = 40000 + 30000;
// unsigned short range
const unsigned short constCF = 40000 * 2;
// unsigned long range
const unsigned long constCG = 5 - 8;
// unsigned long range
const unsigned long constCH = 3000000000 + 2000000000;
// unsigned long range
const unsigned long constCI = 3000000000 * 2;
// unsigned longlong range
const unsigned long long constCJ = 5 - 8;
// unsigned longlong range
//const unsigned long long constCK = 9000000000000000000 + 9000000000000000000;
// unsigned longlong range
//const unsigned long long constCL = 9000000000000000000 * 2;
// float range
const float constCM = -2e38 - 2e38;
// float range
const float constCN = 2e38 + 2e38;
// float range
const float constCO = 2e38 * 2;
// double range
const double constCP = -1E308 - 1E308;
// double range
const double constCQ = 1E308 + 1E308;
// long double range
const double constCR = 1E308 * 2.;
// long double range
const long double constCS = -0.6E4932 - 0.6E4932;
// long double range
const long double constCT = 0.6E4932 + 0.6E4932;
// long double range
const long double constCU = 0.6E4932 * 2.;
// fixed point range
const fixed <3,0> constCV = 605d + 605d;
// fixed point range
const fixed <3,0> constCW = -605d - 605d;
// fixed point range
const fixed <3,0> constCX = 605d * 2d;


/*** type declarations and scoped names ***/
// invalid type
const long constCY = 5;
typedef constCY typeD;
// invalid type
module moduleD { const long constA = 5; };
typedef moduleD typeE;


/*** switch type and scoped names ***/
// bad switch type
typedef string typeF;
union unionC switch (typeF) { case TRUE : long elementA; };
// identifier clash
union unionD switch (enum enumG {eS, eT, eU}) {
  case eS : long eT;
};

/*** switch types : case label management ***/
// duplicated label
union unionE switch (short) {
  case 1 : long elementA;
  case 1 : long elementB;
};
// duplicated label
union unionF switch (short) {
  case 1 : case 3 : case 5 : long elementA;
  case 2 : case 3 : case 4 : long elementB;
};
// useless label
union unionG switch (short) {
  case 1 : default : long elementA;
};
// double default clause
union unionH switch (short) {
  default : long elementA;
  default : long elementB;
};


/*** sequence and scoped names ***/
// bad sequence type
enum enumH { eV, eW, eX };
typedef sequence<enumH> typeG;


/*** operation parameters types and scoped names ***/
// bad parameter type
typedef fixed<3,2> typeH;
interface interfaceAC { void operation1(in typeH arg1); };






/*



// multiple inheritance management
// in case of valuetypes -- To be completed
valuetype v1 {
  typedef long type1;
  const long const1 = 5;
  exception e {};
};
abstract valuetype v2 {
  typedef short type1;
  const long const1 = 7;
  exception e {};
};
valuetype v3 : v1, v2 {
  typedef type1 type2;
  const long const2 = const1;
  void echo () raises (e);
};
valuetype v4 {
  attribute long l;
  void echo ();
};
valuetype v5 : v4 {
  attribute long l;
  void echo (long arg);
};



*/