1 / 14

Introduction to Language Programming

Introduction to Language Programming. Hierarchy of programming lang. Based on machine independences: 1. Machine language 2. Assembly language 3. Higher level / user oriented language 4. Problem oriented language. Machine level language. Each instruction numeric code

makala
Download Presentation

Introduction to Language Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Language Programming Hierarchy of programming lang. Based on machine independences: 1. Machine language 2. Assembly language 3. Higher level / user oriented language 4. Problem oriented language

  2. Machine level language • Each instructionnumeric code • numerical address memory location in computer’s memory • program written in microcode(I.e. microprogram) • microcode  a set basic machine instruction

  3. Assembly language • Simbolic version • operation code  symbolic code, such ADD, MUL, DIV, PUSH, POP • memory location symbolic name, such PAY, RATE • offerring certain diagnostic and debugging assistance

  4. High level language • Such as FORTRAN, PASCAL, PL/I • offering most of features of an assembly language • offering a more enriched set of language features, such as structured control construct, nested statements, blocks, and procedures

  5. Problem oriented language • Providing for expression of problems in specific app./problem area. • Such SQL database app, COGO  civil eng. App.

  6. Advantages of high level languages over low level such machine and assembly languages • HLL more easier to learn • programmer does’nt to concern with clerical tasks involving numerical or symbolic references to intructions, mem location, constants, etc • programmer is not required to know how to convert data from external forms to various internal forms within the memory of computer • most HLL offer a programmer a variety of control structure, such IF THEN ELSE and CASE statement • programs written in HLL is usually more easily debugged

  7. Advantages > • Availability of certain features such as procedures  better documentation • HLL  relatively machine independent • since most HLL offer more powerful control and data structuring capabilitythe former class of lang. Facilitates the expression of a solution to particular problem

  8. Translator • Inputing and then converting a source program into object or target program • source program written in a source language and object belongs to object language • assembly assembler machine language • a time at which the conversion of a source program to an object program occurs compile time

  9. Compilation process

  10. Interpretive process

  11. interpreter • interpreter processes an internal form of the source program and data at the same time • interpreter does not generate object code • such BASIC, LISP, SMALLTALK

  12. Model of a compiler • Constructing a compilervery complex • a compiler must perform 2 major task: • analysis of source program  front end, the tasks deal with decomposition of source prg into its basic parts • synthesis of corresponding object program back end, the tasks  generating and optimizing object program • components of a compiler: • scanner /lexical analyzer separating the incoming text into pieces or tokens • syntax analyzer/parser  checking correct tokens and sequences tokens

  13. > models a compiler • Semantic analyzer carrying on semantic analysis, usually connected with intermediate code generator • code generator • code optimizer • table symbol

  14. Figure of model of a compiler

More Related