========================================= Juliet Programming Language Specification Author....... Kevin P. Albrecht Version...... 0.03 Date......... 22 Nov 2002 ========================================= - identifiers should be assigned a value before they are used. - variable declarations can be assignment statements as well - variables cannot be used in the same statement they are declared in - scope is defined by indentation, as in python -- program control -- #(identifier) line label goto (identifier) goto the line labeled with (identifier) cond _boolean_exp_ _block_ -- file inclusion -- $filename.jul inserts the Juliet file immediately -- special identifiers -- nl newline character cinput get string input from console -- output -- print printn -- variable declarations -- def ID:TYPE <- EXP TYPE = int rat str -- type conversions -- - cannot convert between two identical types int EXP rat EXP str EXP -- Comments -- {{ single line { multiple line } -- Literals-- examples: "Hello", 23, 23.0, "23.4" -- Operators (On Variables) -- <- Assignment - cannot assign to a constant -- String Ops -- & concatenate -- Arith. Ops -- + - / * -u () -- Logic Ops -- = <> < > <= >= or and == TOKENS ==