FG Group -Afrilia BP -Liana F.B.I -Maulidatun Nisa -Riza Amini F.

Slides:



Advertisements
Similar presentations
/ 251 Internet Applications Ahmed M. Zeki Sem – / Chapter 8.
Advertisements

Programming Language Concepts
Statement-Level Control Structures
Pemrograman C Risanuri Hidayat. Why C  Compact, fast, and powerful  “Mid-level” Language  Standard for program development (wide acceptance)  It is.
UNIT-III By Mr. M. V. Nikum (B.E.I.T). Programming Language Lexical and Syntactic features of a programming Language are specified by its grammar Language:-
Chapter 2 Syntax. Syntax The syntax of a programming language specifies the structure of the language The lexical structure specifies how words can be.
1 Pass Compiler 1. 1.Introduction 1.1 Types of compilers 2.Stages of 1 Pass Compiler 2.1 Lexical analysis 2.2. syntactical analyzer 2.3. Code generation.
Lecture-5 Though SQL is the natural language of the DBA, it suffers from various inherent disadvantages, when used as a conventional programming language.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
Chapter3: Language Translation issues
Outline Java program structure Basic program elements
Chapter 3 Program translation1 Chapt. 3 Language Translation Syntax and Semantics Translation phases Formal translation models.
Yu-Chen Kuo1 Chapter 2 A Simple One-Pass Compiler.
JavaScript, Third Edition
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
Chapter 3: Introduction to C Programming Language C development environment A simple program example Characters and tokens Structure of a C program –comment.
Chapter 2 Syntax A language that is simple to parse for the compiler is also simple to parse for the human programmer. N. Wirth.
Lecture 21: Languages and Grammars. Natural Language vs. Formal Language.
Compiler1 Chapter V: Compiler Overview: r To study the design and operation of compiler for high-level programming languages. r Contents m Basic compiler.
CSC312 Automata Theory Lecture # 2 Languages.
Compiler Construction Lexical Analysis. The word lexical means textual or verbal or literal. The lexical analysis implemented in the “SCANNER” module.
CS 326 Programming Languages, Concepts and Implementation Instructor: Mircea Nicolescu Lecture 2.
History of C 1950 – FORTRAN (Formula Translator) 1959 – COBOL (Common Business Oriented Language) 1971 – Pascal Between Ada.
JAVA Tokens. Introduction A token is an individual element in a program. More than one token can appear in a single line separated by white spaces.
Computer Science 101 Introduction to Programming.
Sharda University P. K. Mishra (Asst.Prof) Department of Computer Science & Technology Subject Name: Programming Using C Sub Code: CSE-106 Programming.
Copyright © 2012 Pearson Education, Inc. Chapter 2: Introduction to C++
Introduction to programming in the Java programming language.
BASICS CONCEPTS OF ‘C’.  C Character Set C Character Set  Tokens in C Tokens in C  Constants Constants  Variables Variables  Global Variables Global.
CONTENTS Processing structures and commands Control structures – Sequence Sequence – Selection Selection – Iteration Iteration Naming conventions – File.
Introducing Python CS 4320, SPRING Lexical Structure Two aspects of Python syntax may be challenging to Java programmers Indenting ◦Indenting is.
The Functions and Purposes of Translators Syntax (& Semantic) Analysis.
Chapter 5: Making Decisions. Objectives Plan decision-making logic Make decisions with the if and if…else structures Use multiple statements in if and.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
Language Translation Issues General Syntactic Criteria.
CHAPTER 2 PROBLEM SOLVING USING C++ 1 C++ Programming PEG200/Saidatul Rahah.
Agenda Comments Identifiers Keywords Syntax and Symentics Indentation Variables Datatype Operator.
Programming Language Design Issues Programming Languages – Principles and Practice by Kenneth C Louden.
Chapter 2 Scanning. Dr.Manal AbdulazizCS463 Ch22 The Scanning Process Lexical analysis or scanning has the task of reading the source program as a file.
Introducing Java Chapter 3 Review. Why Program in Java? Java, is an object-oriented programming language. OOP languages evolved out of the need to better.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Introduction to C++
Ada, Scheme, R Emory Wingard. Ada History Department of Defense in search of high level language around Requirements drafted for the language.
Java Programming Fifth Edition Chapter 1 Creating Your First Java Classes.
2.1 The Part of a C++ Program. The Parts of a C++ Program // sample C++ program #include using namespace std; int main() { cout
Chapter 6 JavaScript: Introduction to Scripting
Working with Java.
CS170 – Week 1 Lecture 3: Foundation Ismail abumuhfouz.
Lecture 1 Introduction Richard Gesick.
Lecture 1B Introduction Richard Gesick
Types and Values.
Revision Lecture
Introduction to Scripting
Section 3.2c Strings and Method Signatures
Statements, Comments & Simple Arithmetic
2.1 Parts of a C++ Program.
Chapter 1: Computer Systems
CMPE 152: Compiler Design August 21/23 Lab
Language Translation Issues
Chapter 2: Introduction to C++.
The Data Element.
Language Translation Issues
High-Level Programming Language
Chap 2. Identifiers, Keywords, and Types
Language Translation Issues
The Data Element.
Language Translation Issues
Lexical Elements & Operators
Language Translation Issues
Faculty of Computer Science and Information System
Presentation transcript:

FG Group -Afrilia BP -Liana F.B.I -Maulidatun Nisa -Riza Amini F

Syntax  - A set of rules that defines the form of the language. - Syntax defines how a sentence is constructed as a sequence / order of the selection of a basic word. - The word is constructed with alphabetic characters. example keywords (reserve word) in C: while, do, if, else, etc.. - Syntax manage to combine these words into a statement with the correct shape so it can be prepared a program that can be run correctly. - Syntax not understand the meaning or content of a sentence, semantic who can interpret it. - Syntax providing other forms of notation for communication between programmer and programming language processors, thus simplifying the creation of a program. - The syntax of the programming language is defined by two sets of rules, namely rule lexical and syntactic rules. - Lexical rules specify the character set contained in the alphabet of the language and the way that these characters combined into valid words and acceptable. - An example is the Pascal language that does not pay attention to uppercase and lowercase letters, while the C and Ada language and pay attention to distinguish it.

Criteria Syntax  1) Readability: Easy to read. 2) Writeability: Easy written. 3) verifiability: Verification program (the concept of truth). 4) Ease of Translation: Translators are fast and produce efficient code. 5) Reduction of Ambiguity: Two or more meanings, examples Array (function call)

Function Syntax  Function syntax provides a notation for forms of communication and processing between programmer programming languages ​​ so as to facilitate the creation of a program.

Syntax Elements  1. Character set: function syntax provides a notation for forms of communication between programmers and language processing program can facilitate the creation of a program. 2. Identifier: the basic syntax of an identifier that is often used is a string of letters and numbers that start with the letter. However, there are many variations of the programming language that uses an identifier with a "." Or "-". This will affect the ease of reading programs. 3. Symbols for operator: Most programming languages ​​ use the character "+" and "-" to represent the two basic arithmetic operations, and use a combination as well as take advantage of special characters. For an operator, or use string to FORTRAN with like the operator. EQ. to compare the similarities and ** for powers.

 4. Comments: Adding comments in a program is important from a program documentation. Programming languages ​​ allow comments in some form. A separate comment lines in the program as in FORTRAN. The use of special characters that do not care about the line like / * and * / in C language Starting from just anywhere sector in line with the start of a special character, such as "-" in, "/ /" in C + + or "!" In FORTRAN. Noise Word: Is the word choice in a statement inserted to improve readability. An example is the statement GO TO label. GO is required keywords, while TO is optional which will improve readability. 5. Keyword & Reserved Word: Keyword is an identifier that is used as a permanent part of the syntax of a statement. For example IF for start a DO statement or condition to initiate an iteration in FORTRAN language. Keyword is a reserved word if it is not used as an identifier chosen by the programmer. For example, in FORTRAN language, and DO IF identifier can be selected as a variable name by the programmer so that a statement that starts with IF is not necessarily a condition statement.

 6. Blank: Rules on the use of space kind as programming language is an example of the C language Usually spaced ignored, except if there is a symbol "= +" which is a single operator. When separated by a space there will be a syntax error. 7. Delimiter & Brackets: Delimiter is a syntactic element is used to mark a prefix or suffix of a syntactic unit such statement or expression. The brackets are usually paired with a delimiter, such as braces or begin... end pair said. Delimiter is useful to improve the readability of a program and can also eliminate the ambiguity of a statement because it can be used explicitly to separate statements that are similar 8. Expression: is a function that accesses data in a program and returns a value. Expression is the basis of syntactic blocks of statements are constructed.

Thank you for attention  Time is a Question !