1package @PKGNAME@ ; 2 3import org.omg.CORBA.OMGVMCID ; 4import org.omg.CORBA.CompletionStatus ; 5 6import org.omg.CORBA.@SYSEX@ ; 7 8public abstract class StandardException { 9 // @SYSEX@ BAD_CONTEXT 10 11 public void IdlContextNotFound( CompletionStatus completed ) 12 { 13 throw new BAD_CONTEXT( "IDL context not found", 14 OMGVMCID.value + 1, completed ) ; 15 } 16 17 public void IdlContextNotFound( ) 18 { 19 IdlContextNotFound( CompletionStatus.COMPLETED_NO ) ; 20 } 21 22Data structures: list[ ... ] vector[ ... ] ( record ) 23 24list[ ( string{exception name} list[ ( string{code name} int{value} string{description} ] ) ] 25 26Processing: 27 28 29 open file (fname) 30 fr = new FileReader( fname ) 31 br = new BufferedReader( fr ) 32 br.readLine() returns null at EOF 33 34 want a BufferedReader 35 36 while not eol read line 37 if (line start with spaces) 38 add to current index 39 else 40 new exception 41 42 create StandardException class 43 44 foreach ( excname vec ) in data 45 add import statement for execname to output 46 47 foreach ( codename value descr ) in vec 48 generate full method 49 generate short method 50 51 52(define (read-file fname) 53 (begin 54 (let port (open-input-port fname)) 55 (let obj (read port)) 56 obj 57 ) 58) 59 60 61 62