Syntax and Semantics

Only available on StudyMode
  • Download(s) : 238
  • Published : August 25, 2011
Open Document
Text Preview
Pamantasan ng Lungsod ng Muntinlupa
NBP Reservation, City of Muntinlupa

A Research study of
Programming Language Specification

Prepared and Submitted by:
Cagande , Leonnesa Louise B.
Gatchalian, Rizalina V.
Rapsing, Romalyn S.
Submitted to:
Prof. Sahawi, Malik

This research is about the components of program language in order to make a program. These are syntax, semantics and pragmatics.

Programming language is a language intended for use by a person to express a process by which a computer can solve a problem. It is use to make a program. Program is a formal description of characteristics required of a problem solution. Programs tell what should be not how to make it so. But first we have to learn and understand its component in order to write a correct program and to be able to predict the effect of execution of a program.

Syntax, semantics and pragmatics are use to construct a program. These are the source codes and the meaning of it.

Research Approach

The structural rules of a language that determine the form of a program written in the language.
Is the form in which programs are written to give the rules of syntax for a programming language to tell how statements, declarations, and other language constructs are written.

Syntactic Specification

The primary purpose of syntax is to provide a notation for communication of information between programmers and programming language processor.

A program is readable if the underlying structure of the algorithm and data represented by the program is apparent from an inspection of the program text. A readable program is often said to be self documenting, it is understandable without any separate documentation. Readability is enhanced by such language features is natural statement formats, structural statements, liberal use of keywords and noise words, provision for embedded comments, unrestricted length identifiers mnemonic operator symbols, free field formats, and complete data declarations.

The syntactic feature which make a program easy to write are often in conflict which those features which make it easy to read written ability is enhanced by use of concise and regular syntactic structures, while for readability a variety of more “verbose” constructs are helpful. Implicit syntactic conventions that allow declarations and operation to be left unspecified make programs shorter and easier to write but harder to read. Other features advance both goals; for example, the use of structured statements simple natural statement formats, mnemonic operation symbols, and unrestricted identifiers usually make program writing easier by allowing the natural structure of the problem algorithms and data to be directly represented in the program. Syntax is redundant if it communicates the same item of information in more than one way. Some redundancy is useful in programming language syntax because it makes a program easier to read and also allows more error checking to be done during translation. The disadvantage is that redundancy makes programs more verbose and thus harder to type. Most of the defaults rules for the meaning of language constructs are intended to reduce redundancy by eliminating explicit statement of meanings that can be inferred from the context.

Ease of translation
Ease of translation relates to the needs of translator that processes the written program. The key to easy translation is regularity of structure.

Lack of Ambiguity
Ambiguity is a central problem in every language design. A language definition ideally provides a unique meaning for every syntactic construct that a programmer may write. An ambiguous construction allows two or more different interpretations. The problems of ambiguity usually arise not in the structure of individual program elements but in the interplay between different structures....
tracking img