Thursday, 10 July 2014



    I. WHAT IS A PROGRAMMING LANGUAGE?

 * it is a formal constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs to control the behaviour of a machine or to express algorithms.
* it is a computer language programmers use to develop applications, scripts, or other set of instructions for a computer to execute. Its is also a formal constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs to control the behavior of a machine or to express algorithms.
   
                       A. TYPES OF PROGRAMMING LANGUAGES
           
   *HTML
         Hyper Text Markup Language. The core language of the world wide web that is       used to define the structure and layout of web pages by using various tags and attributes. Although a fundamental language of the web, HTML is static - content created with it does not change. HTML is used to specify the content a webpage will contain, not how the page functions.
 

*XML
    Extensible Markup Language. A language developed by the W3C which works like HTML, but unlike HTML, allows for custom tags that are defined by programmers. XML allows for the transmission of data between applications and organizations through the use of its custom tags.
 

*Javascript
    A language developed by Netscape used to provide dynamic and interactive content on webpages. With Javascript it is possible to communicate with HTML, create animations, create calculators, validate forms, and more. Javascript is often confused with Java, but they are two different languages.
 

*VBScript
    Visual Basic Scripting Edition. A language developed by Microsoft that works only in Microsoft's Internet Explorer web browser and web browsers based on the Internet Explorer engine such as FlashPeak's Slim Browser. VBScript Can be used to print dates, make calculations, interact with the user, and more. VBScript is based on Visual Basic, but it is much simpler. Learn VBScript at our VBScript tutorials section.
 

*PHP
    Hypertext Preprocessor (it's a recursive acronym). A powerful language used for many tasks such as data encryption, database access, and form validation. PHP was originally created in 1994 By Rasmus Lerdorf. Learn PHP at our PHP tutorials section.
 

*Java
    A powerful and flexible language created by Sun MicroSystems that can be used to create applets (a program that is executed from within another program) that run inside webpages as well as software applications. Things you can do with Java include interacting with the user, creating graphical programs, reading from files, and more. Java is often confused with Javascript, but they are two different languages. Learn Java at our Java tutorials section.
 

*C
    An advanced programming language used for software application development. Originally developed by Dennis Ritchie at Bell Labs in the 1970's and designed to be a systems programming language but since then has proven itself to be able to be used for various software applications such as business programs, engineering programs, and even games. The UNIX operating system is written in C.
 

*C++
    Descendant of the C language. The difference between the two languages is that C++ is object-oriented. C++ was developed by Bjarne Stroustrup at Bell Labs and is a very popular language for graphical applications.
 

*Visual Basic
    A language developed by Microsoft based on the BASIC language . Visual Basic is used for creating Windows applications. The VBScript language (also developed by Microsoft) is based on Visual Basic.
 

*Java
    A powerful and flexible language created by Sun MicroSystems that can be used to create applets (a program that is executed from within another program) that run inside webpages as well as software applications. Things you can do with Java include interacting with the user, creating graphical programs, reading from files, and more. Java is often confused with Javascript, but they are two different languages.


II   EVOLUTION OF PROGRAMMING LANGUAGE
   
     A. EARLY HISTORY
  • 1952, Autocode: Language developed by Alick E. Glennie
  • 1954, Fortran (FORmula TRANslator system): Developed by John Backus and others at IBM. The language is focused on mathematical calculations.
  • 1956, IPL (Information Processing Language): Developed by A. Newell, H. Simon and J.C. Shaw. It’s a low level list processing language that implements recursion.
  • 1958, Fortran II (FORmula TRANslator system II): Developed by John Backus and others at IBM. The Fortran II enhancements included subroutines and functions, and loops.
  • 1958, Lisp (LISt Processing): Developed by John McCarthy. Language only allows recursive programming.
  • 1960, Algol (ALGOrithmic Language): Defined by an international consortium. Algol was the first language to be machine independence. It has many of the common language features, such as If-Then-Else, For and While loops, Switch with gotos, begin and end markers, local variables, etc.
  • 1960, Cobol (COmmon Business Oriented Language): Defined by a committee named the Conference on Data Systems Languages (CODASYL). The Department of Defense, universities and others were members of the committee. Cobol focuses on business needs and the syntax is believed to be easy enough to read that documentation is not required. Cobol is a procedural language, and its programs are broken into four divisions: Identification, Environment, Data and Procedure.
  • 1964, APL (A Programming Language): Developed by K. Iverson, APL is a language focused on mathematical notation.
  • 1964, BASIC (Beginner’s All-purpose Symbolic Instruction Code): Developed by John Kemeny and Thomas Kurtz. BASIC was designed to be easy to learn. One interesting feature is its use of line numbers – every line has a number assigned to it, and the programmer uses GOTO statements to jump to the desired line.
  • 1966, Logo: Developed by Fuerzeig, Seymour Papert and others. Its goal was to teach programming to children. It is often considered similar to Lisp. Its main feature included a moving “turtle” on the screen.
  • 1967, Snobol (StriNg Oriented symBOlic Language): Developed by programmers at Bell Labs, including D.J. Farber, R.E. Griswold, F.P. Polensky. Snobol extensively used strings – pattern-matching, concatenation and alternation.
  • 1968, Algol 68 (ALGOrithmic Language 68): Improved the existing Algol language by adding features like += for assignment and add, casting, etc.
  • 1970, Pascal: Developed by Niklaus Wirth and named for French mathematician Blaise Pascal. Pascal is a structured programming languages and has many similarities with C.
  • 1970, SQL (Structured Query Language): Developed by IBM as a language to query relational databases.
  • 1973, C: Developed by AT&T Bell Labs programmer Dennis Ritchie. It was intended for the Unix Operating System but quickly spread due to its portability and speed. C is the de facto language for low-level software development, and is widely taught in colleges and universities world wide.
  • 1977, Applesoft Basic: Developed by Microsoft for the Apple II computer. It was an extension of the BASIC language, and shipped with every Apple II computer sold.
  • 1981, BASICA: Developed by Microsoft’s for MS-DOS, it was shipped with early IBM PC’s.
  • 1983, Turbo Pascal: Developed by Anders Hejlsberg as an extension of Pascal. Turbo Pascal was bundled with a full IDE, and was a great improvement in speed, and is often credited with greatly aiding Pascal’s popularity.
  • 1983, C++: Developed by AT&T Bell Labs programmer Bjarne Stroustrup as an extension of the popular C language. C++ was designed to be an object oriented version of C.
  • 1987, Perl (Practical Extracting and Report Language): Developed by Larry Wall as a replacement of several command line languages. It is used today primarily for system administration and CGI scripts.
  • 1991, HTML (HyperText Markup Language): Prototypes and early concepts were initially made by Tim Berners-Lee in the 1980′s, however it didn’t go live until August 6th, 1991 running off of CERN systems. HTML is the language used to make the World Wide Web possible.
  • 1991, Visual Basic:  Developed by Microsoft for use on its Window platforms.  It was developed to be easy to learn and use.  Its last version was 6.0 released in 1998.  It was replaced by Microsoft Visual Basic .NET in 2002.
  • 1993, ASP (Active Server Pages): Developed initially by a company called Aspect Server Pages and was later purchased by Microsoft. ASP (commonly called today as “Classic ASP” to contrast with ASP.NET) is modeled off of the BASIC programming language, though it is dramatically different than the original version.
  • 1994, Ruby: Developed by Yukihiro Matsumoto and named as a pun off the “Perl” programming language. Has seen a rise in popularity of late due to the use of Ruby on Rails.
  • 1994, Java: Developed by Sun Microsystems programmers (including James Gosling), and named for the Java Conference room where it was conceived in Sun’s offices. The language is very similar to C++ in many ways, though its use is different. Java compiles into Bytecode that is then interpreted, thus allowing it to be more portable. It is commonly used in client-side applets downloaded over the web, as well as in server-side processing for a website (JSPs).
  • 1995, PHP (Personal Hypertext Processor): Developed by Rasmus Lerdorf to facilitate web development. PHP scriptlets are embedded inside HTML code.
  • 1995, JavaScript: Developed by Netscape programmer Brendan Eich as a client-side scripting language for web pages. Syntax is similar to C and Java though it is fundamentally different.


      B.   MODERN HISTORY

  • 2000, C# (pronounced C-Sharp): Developed by Microsoft to compete against Java. It is very similar in dialect to C++ and Java. C# compiles to an intermediate language called CIL (Common Intermediate Language), as well does ASP.NET. This allows the final application to use code developed in C# and ASP.NET interchangeably.
  • 2002, ASP.NET: Developed by Microsoft as a next generation of its ASP language. It compiles into Microsoft’s CIL, just as C#.

    III.WHAT IS A PROGRAMMING LANGUAGE THEORY?
     
       -a branch of computer science that deals with the design, implementation, analysis, characterization, and classification of programming languages and their individual features. It falls within the discipline of computer science, both depending on and affecting mathematics, software engineering and linguistics. It is a well-recognized branch of computer science, and an active research area, with results published in numerous journals dedicated to PLT, as well as in general computer science and engineering publications.In some ways, the history of programming language theory predates even the development of programming languages themselves.



     IV.COMPILER VS INTERPRETER

    NoCompilerInterpreter
    1Compiler Takes Entire program as inputInterpreter Takes Single instruction as input .
    2Intermediate Object Code is GeneratedNo Intermediate Object Code is Generated
    3Conditional Control Statements are Executes fasterConditional Control Statements are Executes slower
    4Memory Requirement : More(Since Object Code is Generated)Memory Requirement is Less
    5Program need not be compiled every timeEvery time higher level program is converted into lower level program
    6Errors are displayed after entire program is checkedErrors are displayed for every instruction interpreted (if any)
    7Example : C CompilerExample : BASIC

    V.  DEFINING SYNTAX

                 - is the set of rules that defines the combinations of symbols that are considered to be a correctly structured document or fragment in that language. This applies both to programming languages, where the document represents source code, and markup languages, where the document represents data. The syntax of a language defines its surface form.[Text-based computer languages are based on sequences of characters, while visual programming languages are based on the spatial layout and connections between symbols (which may be textual or graphical). Documents that are syntactically invalid are said to have a syntax error.
    Syntax – the form – is contrasted with semantics – the meaning. In processing computer languages, semantic processing generally comes after syntactic processing, but in some cases semantic processing is necessary for complete syntactic analysis, and these are done together or concurrently. In a compiler, the syntactic analysis comprises the front end, while semantic analysis comprises the back end (and middle end, if this phase is distinguished).
    A. THE CHARACTER SET
               Character sets are the fundamental elements in a regular expression. A character set is a pattern that matches a single character.
    set     := set '#' set0
            |  set0
    
    set0    := @char [ '-' @char ]
            | '.'
            |  @smac
            | '[' [^] { set } ']'
            | '~' set0
    The various character set constructions are:
    char
    The simplest character set is a single Unicode character. Note that special characters such as [ and . must be escaped by prefixing them with \ (see the lexical syntax, Section 3.1, “Lexical syntax”, for the list of special characters).
    Certain non-printable characters have special escape sequences. These are: \a\b\f\n\r\t, and \v. Other characters can be represented by using their numerical character values (although this may be non-portable): \x0A is equivalent to \n, for example.
    White space characters are ignored; to represent a literal space, escape it with \.
    char-char
    A range of characters can be expressed by separating the characters with a ‘-’, all the characters with codes in the given range are included in the set. Character ranges can also be non-portable.
    .
    The built-in set ‘.’ matches all characters except newline (\n).
    Equivalent to the set [\x00-\x10ffff] # \n.
    set0 # set1
    Matches all the characters in set0 that are not in set1.
    [sets]
    The union of sets.
    [^sets]
    The complement of the union of the sets. Equivalent to ‘. # [sets]’.
    ~set
    The complement of set. Equivalent to ‘. # set
    A set macro is written as $ followed by an identifier. There are some builtin character set macros:
    $white
    Matches all white space characters, including newline.
    Equivalent to the set [\ \t\n\f\v\r].
    $printable
    Matches all "printable characters". Currently this corresponds to Unicode code points 32 to 0x10ffff, although strictly speaking there are many non-printable code points in this region. In the future Alex may use a more precise definition of $printable.
    Character set macros can be defined at the top of the file at the same time as regular expression macros. Here are some example character set macros:
    $lls      = a-z                   -- little letters
    $not_lls  = ~a-z                  -- anything but little letters
    $ls_ds    = [a-zA-Z0-9]           -- letters and digits
    $sym      = [ \! \@ \# \$ ]       -- the symbols !, @, #, and $
    $sym_q_nl = [ \' \! \@ \# \$ \n ] -- the above symbols with ' and newline
    $quotable = $printable # \'       -- any graphic character except '
    $del      = \127                  -- ASCII DEL
 B. SYNTAX GROUP

C. SYNTAX AND PROGRAM RELIABILITY




No comments:

Post a Comment