loading...

CS508 Modern Programming Languages Assignment No 2 Solution Fall 2012

Familiarize with the core concepts of a special purpose programming language ‘SNOBOL’ which is used for string manipulation and handling. Learn language basic syntax.

Students will get comprehensive understanding of important concepts of SNOBOL i.e. Concatenation, Pattern Matching, Replacement and etc.
Application:
IdevSpot-Solutions for Software Companies
IdevSpot provides a range of innovative and reliable eBusiness softwares for companies intending to start their own online business and earn profits by offering membership services.
IdevSpot is specifically designed for software markets, It‟s scalable and integrated solution includes a full-featured, modular and secure eCommerce platform, a partner order and revenue management system, as well as a constantly expanding worldwide affiliate network.
IdevSpot market-proven eCommerce solution enables software companies to rapidly embrace industry shifts, reach customers effectively, and adopt new business models with a view to optimizing profitable revenue across online and offline channels.
Scenario:
IdevSpot- String Manipulation Library
IdevSpot wants to develop a stand alone library application named IdevSpot- String Manipulation Library. It adds a set of general purpose functions to the scripting languages. The main features are as follow: Significantly simplified string manipulation High performance interoperability with other source/libraries
Improved overall performance of common string operations
Evaluation:
IdevSpot-Software Development team has decided to use SNOBOL language to develop
this library. Now being a part of this project answer the following questions:
A. The project team faces some issues while developing this library. According to you what can be the reasons for these issues? [5]

SNOBOL4 is one of the most powerful programming languages ever designed. But its idiosyncratic syntax and lack of conventional control structures discourage many programmers, especially ones who have experience with more conventional languages. More fundamentally, the lack of integration of SNOBOL4’s pattern-matching facilities with other language features makes it awkward to use for some programming tasks.

B. Write the value of OUTPUT variable: [10]
a. OUTPUT = 3 * (12 + 3)
b. OUTPUT = 10 / 2 * 5
c. OUTPUT = 24 / 4 / 2
d. OUTPUT = 2 ** (2 ** 4)
e. OUTPUT = 14 + ‘ 54’
f. OUTPUT = ‘ONE,’ ‘TWO,’ ‘THREE’
g. OUTPUT = (20 – 17) ‘ DOG NIGHT’
h. OUTPUT = 19 (12 / 3)
i. ABC = ‘EGG’
D = ‘SHELL’
N1 = 43
D = 17
OUTPUT = N1 + D
OUTPUT = ABC D
j. A = „PUT‟
B = 6
OUTPUT=„OUTPUT655‟ A B
C. Write a simple SNOBOL statement that replace monkey with tiger and then remove all tigers‟ words from the given paragraph. [5]
“A monkey is in a room. Suspended from the ceiling is a bunch of bananas, beyond the
monkey’s reach. However, in the room there are also a chair and a stick. The ceiling is
just the right height so that a monkey standing on a chair could knock the bananas down
with the stick.”

This tutorial can help you for this solution.

http://www.snobol4.org/docs/burks/tutorial/ch4.htm

DOWNLOAD SOLUTION HERE
loading...