MiniOberon Updates Mar 16, 4:30PM: I've made the changes to AbstractSyntaxPkg which were discussed in class. I've also make some minor updates in the grammar (fixing the empty productions in type_list and var_list). I also realized that my proc_or_forward_seq had the semi-colons in the wrong place. Mar 16, 4:50PM: I realized that I also had the semi-colons in the wrong place for type_list, field_list, and var_list. Mar 18, 1:30PM: TypeVarList is designed to hold entries of type TVEntry. This was a superclass for VarEntry and TypeEntry, but these last two classes are never used anywhere in the grammar! Since the entries of TypeVarList are really VarList or TypeList, I've changed things so that TVEntry is now the superclass of VarList and TypeList (so either one can go into TypeVarList). I've also removed VarEntry and TypeEntry from the Visitor interfaces, since they weren't really being used. Mar 31, 12:15PM: The Return class was defined to have one attribute which was an ExprList. However, you can only return one value at a time, so this should be Expr. I updated AbstractSyntax/Result.java to reflect this. Apr 6, 4:30PM: There was one semicolon missing in the module production in TinyObe_BNF. It was inserted after " proc_body ID ". Apr 6, 5:00PM: I've place a sample program using arrays into the pascal directory ~mikes/170/TinyObe_progs . Apr 7, Noon: The TinyObe_progs/Orbits.to sample program was incorrectly using "NOT" as the logical not operator. It has been changed to the correct "~". Apr 7, Noon: The tree for CallStmt didn't have a field to store the name of the procedure being called. I've added a name field of type String. Apr 10, 9:45PM: The original grammar for TinyObe required that at least one variable be declared. That was an oversight on my part. To fix this I replace "VAR var_list" in the production rule for proc_body with "opt_vars" and added a new production for opt_vars. (If you never changed from the MiniOberon rules for type_or_var_seq, then you don't have to worry about this at all.) Apr 12, 11:00PM: In the FOR loops of the sample program 170/TinyObe_progs/Counting.to I had accidentally used "to" as a keyword, but it should be "TO" and has been corrected. Apr 19, 10:15PM: In my codedemo directory, the MiniJava compiler actually produced bad code if you tried to use a multiply or divide operator. I just found this out. So, I've replaced the code for those cases. Basically the "mull" operator needed to be "imull" and the divide code needed to be a bit more complicated (see codedemo/codegen/Translator.java). Apr 21, 12:10AM: The two of the test programs in the TinyObe_progs directory had (unintentional) syntax errors in them. Diamond.to had two spots where I used = instead of := in assignments and Primes.to had div instead of DIV and a missing semicolon. I've repaired both of the programs. It is my intention that the programs in that directory have no errors, so, if you find any, please let me know. Apr 21, 3:45PM: Even though we're mostly done with it, I corrected an error in the TinyObe grammar. I had an extra VAR in the production for proc_body. Apr 22, 1:00PM: The second loop in TinyObe_progs/Diamond.to should have the test left>8 , it accidentally was left<8. ~about Apr 30: I forgot to mention that I added a few more test programs to the MiniOberon_progs directory sometime around here. May 2, 3:30PM: I just added the e -> (e) production to MiniOberon. It should have been there all along. I believe you simply need to add one production to your .cup file in order to implement this change. May 3, 3:00PM: In the BubbleSort.mod sample program, the variable 'size' was never initialized. I've added 'size := 10' to the bottom of the Init routine (where it always should have been. May 5, 3:15PM: In the PrimeTest.mod sample program, the variable 'flag' was accidentally written 'FLAG' at one point. May 5, 3:30PM: The sample program BubbleSort.mod also had all sorts of problems. It seems to be correct now.