R – A Scripting language for a call routing engineFinal Report: COMS W4115: Programming Languages and TranslatorsRajiv S [email protected] – A Scripting language for a call routing engine ............................................................ 1Introduction:........................................................................................................................ 5Example Scripts:............................................................................................................. 5Date time example: ..................................................................................................... 5A caller language preference example:....................................................................... 6Features:.......................................................................................................................... 6Implementation:.............................................................................................................. 6Real Life Scenario: ......................................................................................................... 7Language Tutorial............................................................................................................... 9A simple example: .......................................................................................................... 9More Example Scripts: ................................................................................................. 10A Date time example: ............................................................................................... 10A caller language preference example:..................................................................... 11User Functions:............................................................................................................. 12Scope Rules:.................................................................................................................. 14Type conversion:........................................................................................................... 15Arrays:........................................................................................................................... 15Loops............................................................................................................................. 17Language Manual.............................................................................................................. 19Lexical Conventions:.................................................................................................... 19White Space .............................................................................................................. 19Comments................................................................................................................. 19Identifiers.................................................................................................................. 19Keywords.................................................................................................................. 19Constants................................................................................................................... 19Types......................................................................................................................... 20Program Structure......................................................................................................... 20Declarations .................................................................................................................. 21Statements..................................................................................................................... 21Expression Statement:............................................................................................... 21Operator Precedence:................................................................................................ 22Compound Statement:............................................................................................... 22Selection Statement:.................................................................................................. 22Iteration Statement.................................................................................................... 22Jump Statement......................................................................................................... 22Functions....................................................................................................................... 23Inbuilt Functions:...................................................................................................... 23User Defined Functions: ........................................................................................... 23Project Plan....................................................................................................................... 24Process .......................................................................................................................... 24Programming style guide.............................................................................................. 24Project timeline............................................................................................................. 25Roles and responsibilities ............................................................................................. 25Software development environment ............................................................................. 26Project log..................................................................................................................... 26Architectural Design......................................................................................................... 27The Lexer:..................................................................................................................... 27The Parser: .................................................................................................................... 28The Tree Walker:.......................................................................................................... 28R interpreter code:.........................................................................................................
View Full Document