String Searching Language SSL String Searching Language Authors Meera Ganesan meera ganesan intel com Dennis Kim dkim harris com Sandy MacDonald sandymac att com Satheesha Rangegowda satheesha rangegowda 923 agilent com SSL Page 1 05 12 2003 String Searching Language Table of Contents An Introduction to SSL 3 Background 3 Voila SSL 3 Where would this be useful 4 Goals of the Language 4 Quick Startup 4 Powerful 5 Productive 5 Portable 5 Performance Oriented 5 Summary 5 Tutorial 6 Hello World in SSL 6 Compiling a Program in SSL 6 More Examples 6 Language Reference Manual 8 Introduction 8 Lexical conventions 8 Comments 8 Keywords 8 White Space 9 Separators 9 Block Identifiers 9 Identifiers 10 Additional Language Specifications 11 Model of Computation 11 Storage Classes 11 Type Conversion 11 Operators 11 Statements 11 Scope 12 String Operations 12 Find 14 Replace 16 SSL Compiler Architecture 19 Assignments and Approach 21 Roles 21 Project Plan 21 Testing Strategy 22 Lessons Learned 22 Caveats and Defects 22 Appendix A End to End Test Cases 23 SSL Page 2 05 12 2003 String Searching Language An Introduction to SSL SSL which stands for String Searching Language is intended to be an intuitive string searching and manipulation language The straightforward but powerful commands enable users to quickly create programs to perform string manipulation on files Programmers will enjoy the compactness of SSL that allows them in several lines of code to perform functions that would have taken many lines of C C or Java The succinct but natural character of the language allows users to become productive quickly and to easily debug their SSL code In addition to the ability to run SSL programs in a standalone manner the compiled output of SSL programs can also be called from an existing C C or Java program The result is comparable to extending those languages to include the string searching and manipulation functions so often required by the serious programmer Background Many forms of computer processing require the searching of text strings in files Unfortunately powerful programming languages such as C C and Java are designed to build data structures algorithms from the scratch starting from primitive computer elements like bytes words String searching in these languages is time consuming and code intensive While scripting languages often provide the powerful string manipulation facilities desired they are generally designed for domain specific rapid application development They are not intended for writing applications from scratch and as such often lack the flexibility and function of their more verbose cousins e g C C Java The thought is that combining the power and flexibility of these programming languages with the concise productive abilities of the scripting facilities would be a powerful productive combination The opportunity exists for a language capable of filling this void Voila SSL SSL is designed to provide an easy to use concise language for string searching and manipulation that can be used in a stand alone mode or called from an existing program SSL Page 3 05 12 2003 String Searching Language Since useful programs can be created with only a few lines of code SSL programming is easy to learn New users will appreciate the intuitive Englishlanguage like format of the language commands Capable string manipulation functions of the language include search replace output and print options The succinct nature of the language facilitates debugging SSL allows the user to search for particular string or string concatenation in a specified file directory or directory and all subdirectories When found the indicated line can be printed or written to a temporary file for further processing The string replace feature allows the user to look for a particular string in a given document and replace with another string The programmer has access to the matched string the portion of the line before and after the string the line number and the entire line value Where would this be useful If you haven t encountered a need to perform complicated string searching and manipulation consider yourself fortunate and somewhat unique There are many applications for this function One area where such a facility would prove extremely useful is for Natural Language Processing where the need to create programs that identify extract and manipulate strings are a regular occurrence Other potential user of SSL include system programmers technical writers e book editors library maintenance system administrators and many others Goals of the Language The goals of SSL are to provide an intuitive language for string processing which can be incorporated into existing programs The language is intended to support both new and experienced users and to be powerful productive portable and performance oriented Quick Startup Since SSL commands are designed to be natural and intuitive new programmers can quickly establish adequate knowledge of the language and become productive The concise format of the language allows short programs of a few lines to perform useful functions These programs can be implemented quickly and debugged easily SSL Page 4 05 12 2003 String Searching Language Powerful SSL provides the ability to perform string identification manipulation and retrieval with a very succinct programming structure Many possible permutations can be expressed in a compact statement The result is that programs consisting of just a handful of lines can simulate functions that would have taken many lines of C C or Java code Productive Since SSL programs can be run as standalone programs or called from inside a C C or Java program it enables these programs to perform process whole files with a small set of instructions that can be fully tested outside of the calling program The reduced number of lines of code and associated quality of the resulting code will support significant productivity gains for programmers in these targeted languages Portable Since the compiled output of SSL is standard C programs written in this language can be compiled and run on a variety of platforms any of which run standard C including Sun Solaris HP Unix and IBM AIX Care has been taken with the language to eliminate the use of processor specific C C code Performance Oriented Rather than generating interpretive or byte code results the SSL compiler generates a C language program Since C programs compile on each processor to among the most efficient of possible
View Full Document
Unlocking...