Glimmer: An Image Manipulation Language Terry Tai ([email protected]) Vida Ha ([email protected])2 Table of Contents 1 White Paper............................................................................................................................. 5 1.1 Introduction..................................................................................................................... 5 1.2 Justification ..................................................................................................................... 5 1.3 A Visual Example ........................................................................................................... 5 2 Language Tutorial................................................................................................................... 7 2.1 Using Glimmer to Create a Simple Image...................................................................... 7 2.2 Defining a Simple Function in Glimmer ........................................................................ 7 2.3 Two Version of Assignment ........................................................................................... 7 2.4 A More Complex Glimmer program .............................................................................. 8 3 Language Reference Manual .................................................................................................. 9 3.1 Lexical Conventions ....................................................................................................... 9 3.1.1 Comments ............................................................................................................... 9 3.1.2 Tokens..................................................................................................................... 9 3.1.3 Whitespace and Line Breaks................................................................................... 9 3.1.4 Identifiers and Literals ............................................................................................ 9 3.1.5 Keywords ................................................................................................................ 9 3.1.6 Operators............................................................................................................... 10 3.2 Types............................................................................................................................. 10 3.2.1 Images ................................................................................................................... 10 3.2.2 Pixels..................................................................................................................... 10 3.2.3 Numbers................................................................................................................ 11 3.3 Identifiers ...................................................................................................................... 11 3.3.1 Scopes ................................................................................................................... 12 3.3.2 Type-Checking...................................................................................................... 12 3.4 Program Blocks............................................................................................................. 12 3.4.1 Include Block ........................................................................................................ 12 3.4.2 Function Definition Block .................................................................................... 13 3.4.3 Program Statement Block ..................................................................................... 13 3.5 Expressions and Operators............................................................................................ 13 3.5.1 Function Calls ....................................................................................................... 14 3.5.2 Attribute Selection ................................................................................................ 14 3.5.3 Pixel References.................................................................................................... 14 3.5.4 Arithmetic, Multiplicative, and Comparative Operations..................................... 15 3.5.5 Logical Operations................................................................................................ 15 3.6 Statements ..................................................................................................................... 15 3.6.1 Set ......................................................................................................................... 15 3.6.2 Alias ...................................................................................................................... 16 3.6.3 Function Calls ....................................................................................................... 16 3.6.4 Return.................................................................................................................... 16 3.6.5 If-Else.................................................................................................................... 17 3.6.6 Scan....................................................................................................................... 17 3.6.7 Continue................................................................................................................ 173 3.6.8 Break ..................................................................................................................... 17 3.6.9 Image Input/Output............................................................................................... 17 3.6.10 Print and Print-String ............................................................................................ 18 4 Project Plan ........................................................................................................................... 19 4.1 Team Responsibilities................................................................................................... 19 4.2 Planned Project Timeline.............................................................................................. 19 4.3 Project Log.................................................................................................................... 19 4.4 Development
View Full Document