This preview shows page 1-2-3-4-5-6-7-8-9-10-11-12-82-83-84-85-86-87-88-89-90-91-92-166-167-168-169-170-171-172-173-174-175-176-177 out of 177 pages.
MapwadA Modeling LanguageBen Smith – [email protected] Weinberg – jmw211@columbia.eduWhitepaperIntroductionGoalsEase-of-useAutomation:Flexibility:Extendability:Example ApplicationsSimple levelsAdvanced levelsInterior modelingSimulationSample CodeMapwad TutorialCompilationBasic ExampleBasic Programming ConstructsAdvanced ExampleComplex ExampleLanguage Reference ManualLanguage SemanticsWhite space and CommentsWhite spaceCommentsIdentifiers (Variable, Function)NumbersStringsNullOperatorsKeywordsOther TokensProgram LayoutVariablesExplicit (User-Defined) VariablesDefinitionAssignmentScopeImplicit VariablesReadWrite/ReadOnly Access ControlTypes/ObjectsBasic TypesbooleanintfloatstringAdvanced Types/ObjectsWallImplicit VariablesWall ConstructorRoomImplicit VariablesRoom ConstructorsThingImplicit VariablesThing ConstructorLocationImplicit VariablesLocation ConstructorArraysUsageImplicit VariablesStatementsOperator StatementsArithmetic OperatorBoolean OperatorsDot OperatorPrecedenceAssignmentControl FlowConditional StatementsLoop StatementFor LoopWhile LoopFunctionsStructureInvocationReturningMap FunctionBuilt-in Mapwad FunctionsProject PlanPlanningDevelopmentTestingProgramming StyleToolsTimeline and Project LogGroup Member ResponsibilitiesArchitectural DesignBlock DiagramsArchitecture DescriptionMapwad Compiler ComponentsMapwad Compiler Components by FileTest PlanApproach to TestingTesting the ParserTesting the WalkerTesting the InternalsTesting Code GenerationTesting the Integrated CompilerLessons LearnedBen SmithAvrum TilmanJosh WeinbergRon WeissAppendixCodeMakefileLexer, Parser, WalkerCompiler Entry CodeBuilt-In FunctionsReserved Word WrappersObject Constructor WrappersScope HandlerMapwad Data Type HandlingAdvanced TypesBasic TypesInternal ProcessingMapwad Code Samplesbigmaze.mapwadhallways.mapwadrecursive2.mapwadwavyhalls.mapwadSample Mapwad.java OutputMapwad A Modeling Language Final Report Ben Smith – [email protected] AvrumTilman – [email protected] Josh Weinberg – [email protected] Ron Weiss – [email protected] Traditionally, 3D modeling tools have taken the form of graphical editors. Advances in graphics technology have made it possible to create even more detailed models, greatly increasing the complexity of the modeling process. We have developed a computer language called Mapwad that can be used to algorithmically generate virtual environments.Table of Contents 1. Whitepaper ..................................................................................................................... 5 1.1. Introduction............................................................................................................ 5 1.2. Goals........................................................................................................................ 5 1.2.1. Ease-of-use........................................................................................................ 6 1.2.2. Automation: ...................................................................................................... 6 1.2.3. Flexibility:......................................................................................................... 6 1.2.4. Extendability:.................................................................................................... 6 1.3. Example Applications............................................................................................ 6 1.3.1. Simple levels..................................................................................................... 6 1.3.2. Advanced levels................................................................................................ 6 1.3.3. Interior modeling .............................................................................................. 7 1.3.4. Simulation......................................................................................................... 7 1.4. Sample Code ........................................................................................................... 7 2. Mapwad Tutorial............................................................................................................ 9 2.1. Compilation ............................................................................................................ 9 2.2. Basic Example ........................................................................................................ 9 2.3. Basic Programming Constructs............................................................................ 9 2.4. Advanced Example .............................................................................................. 10 2.5. Complex Example ................................................................................................ 11 3. Language Reference Manual ...................................................................................... 14 3.1. Language Semantics ............................................................................................ 14 3.1.1. White space and Comments............................................................................ 14 3.1.2. Identifiers (Variable, Function) ...................................................................... 14 3.1.3. Numbers.......................................................................................................... 14 3.1.4. Strings ............................................................................................................. 14 3.1.5. Null ................................................................................................................. 15 3.1.6. Operators......................................................................................................... 15 3.1.7. Keywords ........................................................................................................ 15 3.1.8. Other Tokens................................................................................................... 15 3.2. Program Layout ................................................................................................... 15 3.3. Variables ............................................................................................................... 15 3.3.1. Explicit (User-Defined) Variables .................................................................. 16 3.3.2. Implicit
View Full Document