Note: this is the draft grammar, with notes and some thoughts, for the Project 2 version of Corgi ------------------ -> -> | -> def ( ) end | def ( ) end | def ( ) end def ( ) end -> -> | -> | -> ( ) | ( ) -> | -> | = | | if else end | if else end | if else end | if else end | return -> | + | - -> | * | / -> | | ( ) | - | Notes: slightly bizarre but cool: in Corgi you can just type a string anywhere as a statement and it gets sent to the console (still have to use print( ) to send a number) no boolean type---use "non-zero is true, 0 is false" there's only the if-else---always have to use it no loop statements---use recursion! the built-in functions fit the grammar just like user-defined functions--- will execute differently change the Lexer to remove /* ..... */ type of comments---no tokens produced change Lexer to allow \n inside a string---put \\ in the Java string Need to agree on names for all the many BIF's---see upcoming document