Construction of Application Generators Using Eli. Uwe Kastens, University of Paderborn, FRG. Abstract

Size: px
Start display at page:

Download "Construction of Application Generators Using Eli. Uwe Kastens, University of Paderborn, FRG. Abstract"

Transcription

1 Construction of Application Generators Using Eli Uwe Kastens, University of Paderborn, FRG Abstract Application generators are a powerful means for reuse of software design. They produce special purpose programs from domain specic descriptions. An application generator can be understood as a translator for a domain specic description language. The Eli system is an integrated toolset for language implementation. It automates a wide range of language implementation tasks, and it provides numerous reusable solutions of common subtasks. The system is designed to be also applicable by non-specialists in compiler construction. In this paper we show how the Eli system supports the construction of application generators. 1 Introduction Application generators are software systems that generate programs for dierent instances of a problem in a specialized application domain. Typical examples are programs that produce reports of data extracted from a data base. Such a program can be systematically constructed from information describing the data base and the desired layout. Many dierent variants of such programs may be needed to produce dierent reports. An application generator for this problem domain generates such a program from a specication that describes which data have to be retrieved and which layout has to be produced. In Sect. 2 we describe instance of a report generator for a bibliographic data base that is used as a running example in this paper. The term application generator was initially coined in [3] for the problem domain of data base tools. Cleaveland [1] generalizes the principle of application generators, points out their relationship to compilers, and describes tools to construct them. In [7] application generators are discussed as one of several principles for software reuse. The input for an application generator can be considered as a specication within a restricted problem domain. It is formulated in a dedicated specication language. An application generator is a translator for that language. Hence techniques for language implementation have to be applied for the construction for application generators. That correspondence is shown in Sect. 3 by matching the problem decomposition for our running example to a widely accepted one for conventional compilers. Eli [2,8] is an integrated toolset for language implementation. Eli incorporates state-ofthe-art know-how in the eld of compiler construction. Its generating tools and its library of reusable components cover a wide range of language implementation tasks. Users need not be compiler specialists to design and implement their dedicated specication language with Eli. This is most important for application generators, since they are usually constructed by people who are specialists in an application domain rather than in language implementation. Eli 1

2 has been successfully applied in many industrial and academic projects, and in many application domains. The methodological aspects that make Eli suitable for the construction of application generators are demonstrated in Sect. 4 using extracts of the specication for our running example. The complete executable specication is available on request. 2 Application Generators An application generator produces variants of programs that solve instances of problems in a certain restricted domain. Each problem instance is described in terms of a dedicated specication language, the input language for the application generator. Let us assume for example that we want to produce information extracted from a data base containing publication references. Such a data base report may look like Papers of Kastens since 1993: 1993 Executable Specifications for Language Implementation 1993 Design of a VLIW Architecture Constructed from Standard Construction of application generators using Eli 1994 Generating interpreters from compiler specifications 1994 Modularity and Reusabiltiy in Attribute Grammars Kastens published 5 papers. It may be useful to get such reports for dierent authors and time spans. Hence, we need a program to produce the report which takes the author and the year as input. Furthermore we may want to have several such programs that produce reports containing dierent information presented in a certain layouts. According to the application generator principle we describe the desired report in a specication language designed exactly for that problem class. The description for the above example may be string name = int since = int cnt = 0; InString "Which author?"; InInt "Since which year?"; "\n\npapers of ", name, " since ", since, ":\n\n"; [ SELECT name <= Author && since <= Year; cnt = cnt + 1; Year, "\t", Title, "\n"; ] "\n", name, " published ", cnt, " papers.\n\n\n"; It describes which records are to be selected from the data base, the elds to be extracted, and the layout of the desired report. The generated program consists of operations that access the data base and operations that produce the formatted output. Those operations are selected and parameterized according to the description and are systematically composed according to technical requirements for data base use and printing facilities. The application generator translates such a description into a C program, for example. The same principle can be used in other problem domains: An application generator for simulation of mechanical systems may take descriptions of system structures and of feedback 2

3 Structuring Translation Encoding Lexical analysis Syntactic analysis Semantic analysis Transformation Code generation Assembly Scanning Conversion Parsing Tree construction Name analysis Type analysis Data mapping Action mapping Execution-order determination Register allocation Instruction selection Instruction encoding Internal address resolution External address resolution Figure 1: Compilation Subproblems equations for their components as input. An instance may be the description of a car suspension. The generated simulator program can be run to validate that car suspension under dierent constraints. 3 Problem Decomposition Implementation of application generators can be considered as a language implementation task: Specications of problem instances written in a domain specic language are translated into application programs. Well established knowledge and eective tools for translator construction can be applied to solve that task. The domain specic aspects of the solution then concentrate on the design of the specication language and on the components of which application programs are composed of. Many years of research and experience in the eld of compiler construction led to a generally accepted model for decomposition of compilation tasks, as shown in Figure 1 taken from [2]. This decomposition model is applicable for the implementation of domain specic languages as well as for programming languages: in case of application generator construction both the structuring and the translation task have to be solved. The encoding phase, typical for machine language compilers, is not needed here; the high-level target program is produced by the transformation phase. For our example language the necessity of the structuring task and of the transformation is obvious. Name analysis and type analysis also apply to this language: It has constructs for named entities. They occur in dening and applied contexts. Occurrences of the same names have to be identied according to rather simple scope rules. There are also predened names for elds of the data base records. Named entities and expressions have one of the types int, bool, or string. The types determine the meaning of overloaded operators, how values are output. The transformation task maps directly to the target program. Hence, the encoding tasks of the decomposition model for programming language compilers (Figure 1) are not needed her. This situation is typical for application generators. 3

4 4 Eli Specications In this section we demonstrate how Eli supports application generator construction. We emphasize the consequences of the problem decomposition model and the solution methods typically applied. Eli comprises a large number of components each dedicated for the solution of a subtask in the decomposition model discussed in the previous section. There are several generating tools including generators for scanners, parsers, grammar mapping, attribute evaluators, operator identication, denition tables, and output transformers. A library of C modules provides implementations of basic tasks that are common in language implementation, e. g. input reading, storing and encoding identiers and literals, error message output, consistent renaming of identiers. Their implementations are generally applicable, validated and ecient according to the state-of-the-art in compiler construction. A library of specication modules contains complete generic solutions of particular subproblem instances which occur often in language implementation, e. g. support for name analysis, type analysis, association of properties to program objects, and transformation into target text. Such specication modules comprise input fragments for generators and applications of basic library functions. They can be easily reused and composed for the specication of particular application tasks. In order to create an application generator an Eli user supplies a set of specications. Most of them are written in languages dedicated for the addressed subtasks. That allows the specications to be less redundant and to concentrate on the particular problems to be solved; typical examples are given below. Eli deduces which of its tools are to be executed for processing the specications. The components of Eli are smoothly integrated on the base of the task decomposition model. Hence, solutions of related subtasks t together, usually without any consideration of the user. Eli also automates the technical work to congure, to compose, and to compile the translator program. 4.1 Structuring For most applications only the concrete input grammar and the notations of non-literal tokens need to be specied. Eli's generators produce a scanner and a tree constructing parser from them. The remaining tasks (reading input, token conversion, and tree construction) are solved by standard solutions added without further specication. The concrete grammar for our example is written in a conventional context-free grammar notation. We omit its presentation in this paper. The non-literal tokens are specied by Ident: NumberLit: StringLit: C_IDENTIFIER C_INTEGER C_STRING_LIT Here precoined token descriptions are related to names of terminal symbols in the concrete grammar. These descriptions also contain information which library modules should be used to store and encode token information. It is obvious that the parsing subtask can be solved by a parser generator given the contextfree grammar. The existence of the tree construction task and its solution are deduced automatically by Eli: The description of the translation task (see below) states which tree nodes are needed. An Eli tool determines how they are to be generated by the parser, without further user interaction needed. 4

5 4.2 Name Analysis The solution of the name analysis task demonstrates a method that is typical for Eli's reusable specication modules: Computational roles provided by a module are related to certain contexts of the particular grammar using a specication language based on attribute grammars. In our report language names for typed variables can be dened and used. Denition and use of a name has to be identied. A module of Eli's name analysis library is chosen by $/Name/CScope.gnrc:inst It provides a set of computations for name analysis in the style of C-like scope rules. Their implementation [5] is hidden from the user. Its computational roles IdDefScope, IdUseEnv, and RootScope are associated to symbols of our report language grammar that represent dening and applied occurrences of names and the grammar root respectively: SYMBOL Report INHERITS RootScope END; SYMBOL DefIdent INHERITS IdDefScope END; SYMBOL UseIdent INHERITS IdUseEnv, ChkIdUse END; As a result of these computations attributes DefIdent.Key and UseIdent.Key refer to denition table entries, such that properties of objects can be associated and used. Other library modules are used in a similar way to check for multiple denitions, and to introduce predened names for the record elds of our report language. 4.3 Type Analysis There are two major aspects of type analysis for our example language: denition and use of typed objects, and overloading resolution for operators in typed expressions. The former task is solved in a similar way as shown for name analysis: A module provides computational roles for type names, typed denitions, and uses of typed name. They are associated to corresponding grammar symbols. Operator overloading relates one source operator to several target operators that have different signatures. Hence, the properties of source and target operators and their relationship are to be described. Using that specication module a source operator <=, is described by SrcOpr ('<=', CmpOpr, BinOpr, LeOp) It states that the operator has the precedence of a CmpOpr as introduced in the expression syntax, that those operators are generalized to BinOpr nodes in the tree grammar, and introduces a name LeOp referred to in the target operator description. A production, the BinOpr to CmpOpr relation, and an attribute computation for the operator symbol are generated from this description. In our language this source operator is overloaded by two target operators described by TgtOpr (LeOp, ile, (inttype,inttype):booltype, TgtStr={"<="}) TgtOpr (LeOp, sle, (stringtype,stringtype):booltype, TgtStr={"SubStr"}) It states for each target operator a name, ile, sle, its signature, and a string used for its translation into output text. From such a description specications are derived for Eli's operator identication tool. It generates a set of functions used in attribute computations which are also supplied by the specication module. Further operators are described in the same form. This form of operator description allows to keep all information about operators together at one place although several Eli tools are aected by the description. The specication of type analysis for binary operators in expression then reduces to the following specication: 5

6 SYMBOL BinOpr INHERITS BinTgtOpr, ChkOpr END; RULE: Expr ::= Expr BinOpr Expr COMPUTE BinOpr.LType = Expr[2].Type; BinOpr.RType = Expr[3].Type; Expr[1].Type = BinOpr.ResType; END; The operand types are passed by attributes (LType, RType) to the BinOpr symbol. The computations for overloading resolution are obtained from the module and inherited to BinOpr. They use the above specied operator properties, and yield the result type of the expression. The above is written in the specication language LIDO for the attribute evaluator generator LIGA [4]. LIDO specications basically associate computations to grammar symbols or to grammar rules. The computations are then executed together with those from other specications during a tree walk of the generated evaluator. LIDO also contains object-oriented constructs that allow to associate sets of computations to role symbols, and inherit them to other symbols, as shown above. The design of Eli's reusable library modules is based on this technique [6]. 4.4 Transformation The specication of the transformation task is typical for application generators (and for sourceto-source translations): Two descriptions are given: One species a set of text patterns which are used to compose the target text. Eli's PTG tool generates functions from it which compose and output the text. The other describes which text patterns are used for the translation of particular tree nodes. It is specied in terms of calls of these functions and their dependencies, and is written in LIDO. The specication is further simplied by using library modules which support the composition of C programs from text fragments. Here only the translation of the output statements of our report description language is shown. Each output statement is translated into a C printf statement as described by the following pattern: PrintStmt: "printf (\"" $1 "\", " $2 ");\n" consists of three string literals and two variables ($1, $2) where the format string and the expressions to be printed are inserted. They are supplied as arguments of the calls of the generated function PTGPrintStmt. The pattern is applied at the subtree root of each output statement in the description: CHAIN CFormat, CPrintArgs: PTGNode; RULE: Statement ::= OutputItems ';' COMPUTE CHAINSTART HEAD.CFormat = PTGNULL; CHAINSTART HEAD.CPrintArgs = PTGNULL; Statement.CCode = PTGPrintStmt (TAIL.CFormat, TAIL.CPrintArgs); END; The two arguments are both obtained from the sequence of OutputItems in its subtree. Each OutputItem contributes one component to each argument. They are composed in left-toright order specied using LIDO's CHAIN-construct: The CHAINs CFormat and CPrintArgs are started in this tree context. Their results obtained by TAIL.CFormat and TAIL.CPrintArgs ll the PrintStmt pattern to constitute the translation of the statement. 6

7 5 Conclusion In this paper we have shown that the development of application generators can be considered as a language implementation problem. Eli is designed such that it can be used without specialized knowledge in language implementation techniques. Hence, constructors of application generators need not be specialists in both areas, their application domain and language implementation. Using data base report generators as an example for application generator we demonstrated Eli's central paradigms: a straight-forward problem decomposition model supported by cooperating tools, high level specication languages dedicated for specic tasks, and large libraries that provide reusable and combinable solutions for common tasks. These facilities allow for eective construction of application generators from descriptions on adequate levels of abstraction. Eli has proven to be a useful toolset in many real life projects in dierent domains, e. g mechanical systems simulation, data base tools, user interface tools, software conguration, signal processing, graphical music scores, and of course compiler construction. Eli is developed in cooperation of A. M. Sloane, James Cook University, Australia, W. M. Waite, University of Colorado, Boulder, the author of this paper, and their groups. For further reference to Eli see Acknowledgements This work was partially supported by the government of Nordrhein-Westfalen through the SofTec-Cooperation, and by the US Army Research Oce under grant DAAL03-92-G References 1. Cleaveland, J. C., \Building Application Generators", IEEE Software 5 (July 1988), 25{ Gray, R. W., Heuring, V. P., Levi, S. P., Sloane, A. M. & Waite, W. M., \Eli: A Complete, Flexible Compiler Construction System", Communications of the ACM 35 (February 1992), 121{ Horowitz, E., Kemper, A. & Narasimhan, B., \A Survey of Application Generators", IEEE Software 2 (Jan 1985), 40{ Kastens, U., \LIDO - Short Reference", University of Paderborn, FRG, Documentation of the LIGA System, Kastens, U. & Waite, W. M., \An Abstract Data Type for Name Analysis", Acta Informatica 28 (1991), 539{ Kastens, U. & Waite, W. M., \Modularity and Reusability in Attribute Grammars", Acta Informatica 31 (1994), 601{ Krueger, C. W., \Software Reuse", ACM Computing Surveys 24 (June 1992), 131{ Waite, W. M., Heuring, V. P. & Kastens, U., \Conguration Control in Compiler Construction", in International Workshop on Software Version and Conguration Control '88, Teubner, Stuttgart,

New Features of Eli Version 4.1

New Features of Eli Version 4.1 New Features of Eli Version 4.1 Uwe Kastens University of Paderborn D-33098 Paderborn FRG A. M. Sloane Department of Computing School of Mathematics, Physics, Computing and Electronics Macquarie University

More information

LIDO - Reference Manual

LIDO - Reference Manual LIDO - Reference Manual $Revision: 4.31 $ Uwe Kastens Compiler and Programming Language Group Faculty of Electrical Engineering, Computer Science and Mathematics University of Paderborn, Germany Copyright,

More information

LIDO - Reference Manual

LIDO - Reference Manual LIDO - Reference Manual $Revision: 4.34 $ Uwe Kastens Compiler and Programming Language Group Faculty of Electrical Engineering, Computer Science and Mathematics University of Paderborn, Germany Copyright,

More information

New Features of Eli Version 4.8

New Features of Eli Version 4.8 New Features of Eli Version 4.8 Uwe Kastens University of Paderborn D-33098 Paderborn FRG A. M. Sloane Department of Computing Division of Information and Communication Sciences Macquarie University Sydney,

More information

New Features of Eli Version 4.3

New Features of Eli Version 4.3 New Features of Eli Version 4.3 Uwe Kastens University of Paderborn D-33098 Paderborn FRG A. M. Sloane Department of Computing Division of Information and Communication Sciences Macquarie University Sydney,

More information

Tree Parsing. $Revision: 1.4 $

Tree Parsing. $Revision: 1.4 $ Tree Parsing $Revision: 1.4 $ Compiler Tools Group Department of Electrical and Computer Engineering University of Colorado Boulder, CO, USA 80309-0425 i Table of Contents 1 The Tree To Be Parsed.........................

More information

Tasks related to input processing

Tasks related to input processing Tasks related to input processing Uwe Kastens University of Paderborn D-33098 Paderborn FRG $Revision: 3.7 $ i Table of Contents 1 Insert a File into the Input Stream........... 3 2 Accessing the Current

More information

Eclipse Support for Using Eli and Teaching Programming Languages

Eclipse Support for Using Eli and Teaching Programming Languages Electronic Notes in Theoretical Computer Science 141 (2005) 189 194 www.elsevier.com/locate/entcs Eclipse Support for Using Eli and Teaching Programming Languages Anthony M. Sloane 1,2 Department of Computing

More information

A SUIF Interface Module for Eli. W. M. Waite. University of Colorado

A SUIF Interface Module for Eli. W. M. Waite. University of Colorado A SUIF Interace Module or Eli W. M. Waite Department o Electrical and Computer Enineerin University o Colorado William.Waite@Colorado.edu 1 What is Eli? Eli [2] is a domain-specic prorammin environment

More information

Structure of a compiler. More detailed overview of compiler front end. Today we ll take a quick look at typical parts of a compiler.

Structure of a compiler. More detailed overview of compiler front end. Today we ll take a quick look at typical parts of a compiler. More detailed overview of compiler front end Structure of a compiler Today we ll take a quick look at typical parts of a compiler. This is to give a feeling for the overall structure. source program lexical

More information

The Compositional C++ Language. Denition. Abstract. This document gives a concise denition of the syntax and semantics

The Compositional C++ Language. Denition. Abstract. This document gives a concise denition of the syntax and semantics The Compositional C++ Language Denition Peter Carlin Mani Chandy Carl Kesselman March 12, 1993 Revision 0.95 3/12/93, Comments welcome. Abstract This document gives a concise denition of the syntax and

More information

PRINCIPLES OF COMPILER DESIGN UNIT I INTRODUCTION TO COMPILERS

PRINCIPLES OF COMPILER DESIGN UNIT I INTRODUCTION TO COMPILERS Objective PRINCIPLES OF COMPILER DESIGN UNIT I INTRODUCTION TO COMPILERS Explain what is meant by compiler. Explain how the compiler works. Describe various analysis of the source program. Describe the

More information

Reverse Engineering with a CASE Tool. Bret Johnson. Research advisors: Spencer Rugaber and Rich LeBlanc. October 6, Abstract

Reverse Engineering with a CASE Tool. Bret Johnson. Research advisors: Spencer Rugaber and Rich LeBlanc. October 6, Abstract Reverse Engineering with a CASE Tool Bret Johnson Research advisors: Spencer Rugaber and Rich LeBlanc October 6, 994 Abstract We examine using a CASE tool, Interactive Development Environment's Software

More information

Syntax and Grammars 1 / 21

Syntax and Grammars 1 / 21 Syntax and Grammars 1 / 21 Outline What is a language? Abstract syntax and grammars Abstract syntax vs. concrete syntax Encoding grammars as Haskell data types What is a language? 2 / 21 What is a language?

More information

A programming language requires two major definitions A simple one pass compiler

A programming language requires two major definitions A simple one pass compiler A programming language requires two major definitions A simple one pass compiler [Syntax: what the language looks like A context-free grammar written in BNF (Backus-Naur Form) usually suffices. [Semantics:

More information

LECTURE NOTES ON COMPILER DESIGN P a g e 2

LECTURE NOTES ON COMPILER DESIGN P a g e 2 LECTURE NOTES ON COMPILER DESIGN P a g e 1 (PCCS4305) COMPILER DESIGN KISHORE KUMAR SAHU SR. LECTURER, DEPARTMENT OF INFORMATION TECHNOLOGY ROLAND INSTITUTE OF TECHNOLOGY, BERHAMPUR LECTURE NOTES ON COMPILER

More information

Syntax Analysis. Chapter 4

Syntax Analysis. Chapter 4 Syntax Analysis Chapter 4 Check (Important) http://www.engineersgarage.com/contributio n/difference-between-compiler-andinterpreter Introduction covers the major parsing methods that are typically used

More information

Lexical Analysis. Introduction

Lexical Analysis. Introduction Lexical Analysis Introduction Copyright 2015, Pedro C. Diniz, all rights reserved. Students enrolled in the Compilers class at the University of Southern California have explicit permission to make copies

More information

2 The ASF+SDF Meta-environment [Kli93] is an example of a programming environment generator. It is a sophisticated interactive environment for the dev

2 The ASF+SDF Meta-environment [Kli93] is an example of a programming environment generator. It is a sophisticated interactive environment for the dev The algebraic specication of annotated abstract syntax trees M.G.J. van den Brand Programming Research Group, University of Amsterdam Kruislaan 403, NL-1098 SJ, Amsterdam, The Netherlands email: markvdb@fwi.uva.nl

More information

Compiler Design. Computer Science & Information Technology (CS) Rank under AIR 100

Compiler Design. Computer Science & Information Technology (CS) Rank under AIR 100 GATE- 2016-17 Postal Correspondence 1 Compiler Design Computer Science & Information Technology (CS) 20 Rank under AIR 100 Postal Correspondence Examination Oriented Theory, Practice Set Key concepts,

More information

1 Lexical Considerations

1 Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2013 Handout Decaf Language Thursday, Feb 7 The project for the course is to write a compiler

More information

Data Abstraction. An Abstraction for Inductive Data Types. Philip W. L. Fong.

Data Abstraction. An Abstraction for Inductive Data Types. Philip W. L. Fong. Data Abstraction An Abstraction for Inductive Data Types Philip W. L. Fong pwlfong@cs.uregina.ca Department of Computer Science University of Regina Regina, Saskatchewan, Canada Introduction This lecture

More information

COMPILER CONSTRUCTION LAB 2 THE SYMBOL TABLE. Tutorial 2 LABS. PHASES OF A COMPILER Source Program. Lab 2 Symbol table

COMPILER CONSTRUCTION LAB 2 THE SYMBOL TABLE. Tutorial 2 LABS. PHASES OF A COMPILER Source Program. Lab 2 Symbol table COMPILER CONSTRUCTION Lab 2 Symbol table LABS Lab 3 LR parsing and abstract syntax tree construction using ''bison' Lab 4 Semantic analysis (type checking) PHASES OF A COMPILER Source Program Lab 2 Symtab

More information

Object-oriented Compiler Construction

Object-oriented Compiler Construction 1 Object-oriented Compiler Construction Extended Abstract Axel-Tobias Schreiner, Bernd Kühl University of Osnabrück, Germany {axel,bekuehl}@uos.de, http://www.inf.uos.de/talks/hc2 A compiler takes a program

More information

Supplementary Notes on Abstract Syntax

Supplementary Notes on Abstract Syntax Supplementary Notes on Abstract Syntax 15-312: Foundations of Programming Languages Frank Pfenning Lecture 3 September 3, 2002 Grammars, as we have discussed them so far, define a formal language as a

More information

TDDD55- Compilers and Interpreters Lesson 3

TDDD55- Compilers and Interpreters Lesson 3 TDDD55- Compilers and Interpreters Lesson 3 Zeinab Ganjei (zeinab.ganjei@liu.se) Department of Computer and Information Science Linköping University 1. Grammars and Top-Down Parsing Some grammar rules

More information

Book. Signatures and grammars. Signatures and grammars. Syntaxes. The 4-layer architecture

Book. Signatures and grammars. Signatures and grammars. Syntaxes. The 4-layer architecture Book Generic Language g Technology (2IS15) Syntaxes Software Language g Engineering g by Anneke Kleppe (Addison Wesley) Prof.dr. Mark van den Brand / Faculteit Wiskunde en Informatica 13-9-2011 PAGE 1

More information

9/5/17. The Design and Implementation of Programming Languages. Compilation. Interpretation. Compilation vs. Interpretation. Hybrid Implementation

9/5/17. The Design and Implementation of Programming Languages. Compilation. Interpretation. Compilation vs. Interpretation. Hybrid Implementation Language Implementation Methods The Design and Implementation of Programming Languages Compilation Interpretation Hybrid In Text: Chapter 1 2 Compilation Interpretation Translate high-level programs to

More information

The PCAT Programming Language Reference Manual

The PCAT Programming Language Reference Manual The PCAT Programming Language Reference Manual Andrew Tolmach and Jingke Li Dept. of Computer Science Portland State University September 27, 1995 (revised October 15, 2002) 1 Introduction The PCAT language

More information

Faculty of Electrical Engineering, Mathematics, and Computer Science Delft University of Technology

Faculty of Electrical Engineering, Mathematics, and Computer Science Delft University of Technology Faculty of Electrical Engineering, Mathematics, and Computer Science Delft University of Technology exam Compiler Construction in4303 April 9, 2010 14.00-15.30 This exam (6 pages) consists of 52 True/False

More information

This book is licensed under a Creative Commons Attribution 3.0 License

This book is licensed under a Creative Commons Attribution 3.0 License 6. Syntax Learning objectives: syntax and semantics syntax diagrams and EBNF describe context-free grammars terminal and nonterminal symbols productions definition of EBNF by itself parse tree grammars

More information

6.184 Lecture 4. Interpretation. Tweaked by Ben Vandiver Compiled by Mike Phillips Original material by Eric Grimson

6.184 Lecture 4. Interpretation. Tweaked by Ben Vandiver Compiled by Mike Phillips Original material by Eric Grimson 6.184 Lecture 4 Interpretation Tweaked by Ben Vandiver Compiled by Mike Phillips Original material by Eric Grimson 1 Interpretation Parts of an interpreter Arithmetic calculator

More information

COMPILER CONSTRUCTION Seminar 02 TDDB44

COMPILER CONSTRUCTION Seminar 02 TDDB44 COMPILER CONSTRUCTION Seminar 02 TDDB44 Martin Sjölund (martin.sjolund@liu.se) Adrian Horga (adrian.horga@liu.se) Department of Computer and Information Science Linköping University LABS Lab 3 LR parsing

More information

A Simple Syntax-Directed Translator

A Simple Syntax-Directed Translator Chapter 2 A Simple Syntax-Directed Translator 1-1 Introduction The analysis phase of a compiler breaks up a source program into constituent pieces and produces an internal representation for it, called

More information

A Short Summary of Javali

A Short Summary of Javali A Short Summary of Javali October 15, 2015 1 Introduction Javali is a simple language based on ideas found in languages like C++ or Java. Its purpose is to serve as the source language for a simple compiler

More information

Intermediate Code Generation

Intermediate Code Generation Intermediate Code Generation In the analysis-synthesis model of a compiler, the front end analyzes a source program and creates an intermediate representation, from which the back end generates target

More information

TDDD55 - Compilers and Interpreters Lesson 3

TDDD55 - Compilers and Interpreters Lesson 3 TDDD55 - Compilers and Interpreters Lesson 3 November 22 2011 Kristian Stavåker (kristian.stavaker@liu.se) Department of Computer and Information Science Linköping University LESSON SCHEDULE November 1,

More information

The Compiler So Far. CSC 4181 Compiler Construction. Semantic Analysis. Beyond Syntax. Goals of a Semantic Analyzer.

The Compiler So Far. CSC 4181 Compiler Construction. Semantic Analysis. Beyond Syntax. Goals of a Semantic Analyzer. The Compiler So Far CSC 4181 Compiler Construction Scanner - Lexical analysis Detects inputs with illegal tokens e.g.: main 5 (); Parser - Syntactic analysis Detects inputs with ill-formed parse trees

More information

The Stepping Stones. to Object-Oriented Design and Programming. Karl J. Lieberherr. Northeastern University, College of Computer Science

The Stepping Stones. to Object-Oriented Design and Programming. Karl J. Lieberherr. Northeastern University, College of Computer Science The Stepping Stones to Object-Oriented Design and Programming Karl J. Lieberherr Northeastern University, College of Computer Science Cullinane Hall, 360 Huntington Ave., Boston MA 02115 lieber@corwin.ccs.northeastern.edu

More information

Syntax-Directed Translation. Lecture 14

Syntax-Directed Translation. Lecture 14 Syntax-Directed Translation Lecture 14 (adapted from slides by R. Bodik) 9/27/2006 Prof. Hilfinger, Lecture 14 1 Motivation: parser as a translator syntax-directed translation stream of tokens parser ASTs,

More information

CSE 582 Autumn 2002 Exam 11/26/02

CSE 582 Autumn 2002 Exam 11/26/02 Name There are 8 questions worth a total of 100 points. Please budget your time so you get to all of the questions. Keep your answers brief and to the point. You may refer to the following reference materials:

More information

University of Utrecht. 1992; Fokker, 1995), the use of monads to structure functional programs (Wadler,

University of Utrecht. 1992; Fokker, 1995), the use of monads to structure functional programs (Wadler, J. Functional Programming 1 (1): 1{000, January 1993 c 1993 Cambridge University Press 1 F U N C T I O N A L P E A R L S Monadic Parsing in Haskell Graham Hutton University of Nottingham Erik Meijer University

More information

Compiler Design (40-414)

Compiler Design (40-414) Compiler Design (40-414) Main Text Book: Compilers: Principles, Techniques & Tools, 2 nd ed., Aho, Lam, Sethi, and Ullman, 2007 Evaluation: Midterm Exam 35% Final Exam 35% Assignments and Quizzes 10% Project

More information

such internal data dependencies can be formally specied. A possible approach to specify

such internal data dependencies can be formally specied. A possible approach to specify Chapter 6 Specication and generation of valid data unit instantiations In this chapter, we discuss the problem of generating valid data unit instantiations. As valid data unit instantiations must adhere

More information

Compiler Code Generation COMP360

Compiler Code Generation COMP360 Compiler Code Generation COMP360 Students who acquire large debts putting themselves through school are unlikely to think about changing society. When you trap people in a system of debt, they can t afford

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Compiler Design

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Compiler Design i About the Tutorial A compiler translates the codes written in one language to some other language without changing the meaning of the program. It is also expected that a compiler should make the target

More information

COMP-421 Compiler Design. Presented by Dr Ioanna Dionysiou

COMP-421 Compiler Design. Presented by Dr Ioanna Dionysiou COMP-421 Compiler Design Presented by Dr Ioanna Dionysiou Administrative! Any questions about the syllabus?! Course Material available at www.cs.unic.ac.cy/ioanna! Next time reading assignment [ALSU07]

More information

CS5363 Final Review. cs5363 1

CS5363 Final Review. cs5363 1 CS5363 Final Review cs5363 1 Programming language implementation Programming languages Tools for describing data and algorithms Instructing machines what to do Communicate between computers and programmers

More information

Informatica 3 Syntax and Semantics

Informatica 3 Syntax and Semantics Informatica 3 Syntax and Semantics Marcello Restelli 9/15/07 Laurea in Ingegneria Informatica Politecnico di Milano Introduction Introduction to the concepts of syntax and semantics Binding Variables Routines

More information

CS 4201 Compilers 2014/2015 Handout: Lab 1

CS 4201 Compilers 2014/2015 Handout: Lab 1 CS 4201 Compilers 2014/2015 Handout: Lab 1 Lab Content: - What is compiler? - What is compilation? - Features of compiler - Compiler structure - Phases of compiler - Programs related to compilers - Some

More information

Brouillon d'article pour les Cahiers GUTenberg n?? February 5, xndy A Flexible Indexing System Roger Kehr Institut fur Theoretische Informatik

Brouillon d'article pour les Cahiers GUTenberg n?? February 5, xndy A Flexible Indexing System Roger Kehr Institut fur Theoretische Informatik Brouillon d'article pour les Cahiers GUTenberg n?? February 5, 1998 1 xndy A Flexible Indexing System Roger Kehr Institut fur Theoretische Informatik Darmstadt University of Technology Wilhelminenstrae

More information

Language Reference Manual simplicity

Language Reference Manual simplicity Language Reference Manual simplicity Course: COMS S4115 Professor: Dr. Stephen Edwards TA: Graham Gobieski Date: July 20, 2016 Group members Rui Gu rg2970 Adam Hadar anh2130 Zachary Moffitt znm2104 Suzanna

More information

Comp 411 Principles of Programming Languages Lecture 3 Parsing. Corky Cartwright January 11, 2019

Comp 411 Principles of Programming Languages Lecture 3 Parsing. Corky Cartwright January 11, 2019 Comp 411 Principles of Programming Languages Lecture 3 Parsing Corky Cartwright January 11, 2019 Top Down Parsing What is a context-free grammar (CFG)? A recursive definition of a set of strings; it is

More information

COMPILER DESIGN. Intermediate representations Introduction to code generation. COMP 442/6421 Compiler Design

COMPILER DESIGN. Intermediate representations Introduction to code generation. COMP 442/6421 Compiler Design 1 COMPILER DESIGN Intermediate representations Introduction to code generation Concordia University Introduction to code generation 2 Front end: Lexical Analysis Syntactic Analysis Intermediate Code/Representation

More information

Examples of attributes: values of evaluated subtrees, type information, source file coordinates,

Examples of attributes: values of evaluated subtrees, type information, source file coordinates, 1 2 3 Attributes can be added to the grammar symbols, and program fragments can be added as semantic actions to the grammar, to form a syntax-directed translation scheme. Some attributes may be set by

More information

SEMANTIC ANALYSIS TYPES AND DECLARATIONS

SEMANTIC ANALYSIS TYPES AND DECLARATIONS SEMANTIC ANALYSIS CS 403: Type Checking Stefan D. Bruda Winter 2015 Parsing only verifies that the program consists of tokens arranged in a syntactically valid combination now we move to check whether

More information

Sardar Vallabhbhai Patel Institute of Technology (SVIT), Vasad M.C.A. Department COSMOS LECTURE SERIES ( ) (ODD) Code Optimization

Sardar Vallabhbhai Patel Institute of Technology (SVIT), Vasad M.C.A. Department COSMOS LECTURE SERIES ( ) (ODD) Code Optimization Sardar Vallabhbhai Patel Institute of Technology (SVIT), Vasad M.C.A. Department COSMOS LECTURE SERIES (2018-19) (ODD) Code Optimization Prof. Jonita Roman Date: 30/06/2018 Time: 9:45 to 10:45 Venue: MCA

More information

CHAPTER 5 GENERAL OOP CONCEPTS

CHAPTER 5 GENERAL OOP CONCEPTS CHAPTER 5 GENERAL OOP CONCEPTS EVOLUTION OF SOFTWARE A PROGRAMMING LANGUAGE SHOULD SERVE 2 RELATED PURPOSES : 1. It should provide a vehicle for programmer to specify actions to be executed. 2. It should

More information

The SPL Programming Language Reference Manual

The SPL Programming Language Reference Manual The SPL Programming Language Reference Manual Leonidas Fegaras University of Texas at Arlington Arlington, TX 76019 fegaras@cse.uta.edu February 27, 2018 1 Introduction The SPL language is a Small Programming

More information

The Decaf Language. 1 Lexical considerations

The Decaf Language. 1 Lexical considerations The Decaf Language In this course, we will write a compiler for a simple object-oriented programming language called Decaf. Decaf is a strongly-typed, object-oriented language with support for inheritance

More information

Chapter 4. Abstract Syntax

Chapter 4. Abstract Syntax Chapter 4 Abstract Syntax Outline compiler must do more than recognize whether a sentence belongs to the language of a grammar it must do something useful with that sentence. The semantic actions of a

More information

SMURF Language Reference Manual Serial MUsic Represented as Functions

SMURF Language Reference Manual Serial MUsic Represented as Functions SMURF Language Reference Manual Serial MUsic Represented as Functions Richard Townsend, Lianne Lairmore, Lindsay Neubauer, Van Bui, Kuangya Zhai {rt2515, lel2143, lan2135, vb2363, kz2219}@columbia.edu

More information

Technical aspects of VTL to SQL translation Prepared by Regional Statistical Office in Olsztyn, Poland

Technical aspects of VTL to SQL translation Prepared by Regional Statistical Office in Olsztyn, Poland Working Paper. UNITED NATIONS ECONOMIC COMMISSION FOR EUROPE CONFERENCE OF EUROPEAN STATISTICIANS Work Session on Statistical Data Editing (The Hague, Netherlands, 24-26 April 2017) I. Introduction A.

More information

Semantic Analysis and Type Checking

Semantic Analysis and Type Checking Semantic Analysis and Type Checking The compilation process is driven by the syntactic structure of the program as discovered by the parser Semantic routines: interpret meaning of the program based on

More information

Crafting a Compiler with C (II) Compiler V. S. Interpreter

Crafting a Compiler with C (II) Compiler V. S. Interpreter Crafting a Compiler with C (II) 資科系 林偉川 Compiler V S Interpreter Compilation - Translate high-level program to machine code Lexical Analyzer, Syntax Analyzer, Intermediate code generator(semantics Analyzer),

More information

COMPILERS AND INTERPRETERS Lesson 4 TDDD16

COMPILERS AND INTERPRETERS Lesson 4 TDDD16 COMPILERS AND INTERPRETERS Lesson 4 TDDD16 Kristian Stavåker (kristian.stavaker@liu.se) Department of Computer and Information Science Linköping University TODAY Introduction to the Bison parser generator

More information

CSE 413 Languages & Implementation. Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341)

CSE 413 Languages & Implementation. Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341) CSE 413 Languages & Implementation Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341) 1 Goals Representing programs as data Racket structs as a better way to represent

More information

6.037 Lecture 4. Interpretation. What is an interpreter? Why do we need an interpreter? Stages of an interpreter. Role of each part of the interpreter

6.037 Lecture 4. Interpretation. What is an interpreter? Why do we need an interpreter? Stages of an interpreter. Role of each part of the interpreter 6.037 Lecture 4 Interpretation Interpretation Parts of an interpreter Meta-circular Evaluator (Scheme-in-scheme!) A slight variation: dynamic scoping Original material by Eric Grimson Tweaked by Zev Benjamin,

More information

CSE P 501 Compilers. Static Semantics Hal Perkins Winter /22/ Hal Perkins & UW CSE I-1

CSE P 501 Compilers. Static Semantics Hal Perkins Winter /22/ Hal Perkins & UW CSE I-1 CSE P 501 Compilers Static Semantics Hal Perkins Winter 2008 1/22/2008 2002-08 Hal Perkins & UW CSE I-1 Agenda Static semantics Types Attribute grammars Representing types Symbol tables Note: this covers

More information

Context-Free Grammar. Concepts Introduced in Chapter 2. Parse Trees. Example Grammar and Derivation

Context-Free Grammar. Concepts Introduced in Chapter 2. Parse Trees. Example Grammar and Derivation Concepts Introduced in Chapter 2 A more detailed overview of the compilation process. Parsing Scanning Semantic Analysis Syntax-Directed Translation Intermediate Code Generation Context-Free Grammar A

More information

Benchmarking the CGNS I/O performance

Benchmarking the CGNS I/O performance 46th AIAA Aerospace Sciences Meeting and Exhibit 7-10 January 2008, Reno, Nevada AIAA 2008-479 Benchmarking the CGNS I/O performance Thomas Hauser I. Introduction Linux clusters can provide a viable and

More information

Lexical Considerations

Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Fall 2005 Handout 6 Decaf Language Wednesday, September 7 The project for the course is to write a

More information

The S-Expression Design Language (SEDL) James C. Corbett. September 1, Introduction. 2 Origins of SEDL 2. 3 The Language SEDL 2.

The S-Expression Design Language (SEDL) James C. Corbett. September 1, Introduction. 2 Origins of SEDL 2. 3 The Language SEDL 2. The S-Expression Design Language (SEDL) James C. Corbett September 1, 1993 Contents 1 Introduction 1 2 Origins of SEDL 2 3 The Language SEDL 2 3.1 Scopes : : : : : : : : : : : : : : : : : : : : : : : :

More information

Implementation of visual languages using pattern-based specifications

Implementation of visual languages using pattern-based specifications SOFTWARE PRACTICE AND EXPERIENCE Softw. Pract. Exper. 2003; 33:1471 1505 (DOI: 10.1002/spe.560) Implementation of visual languages using pattern-based specifications Carsten Schmidt and Uwe Kastens, University

More information

Generating Continuation Passing Style Code for the Co-op Language

Generating Continuation Passing Style Code for the Co-op Language Generating Continuation Passing Style Code for the Co-op Language Mark Laarakkers University of Twente Faculty: Computer Science Chair: Software engineering Graduation committee: dr.ing. C.M. Bockisch

More information

Static Semantics. Winter /3/ Hal Perkins & UW CSE I-1

Static Semantics. Winter /3/ Hal Perkins & UW CSE I-1 CSE 401 Compilers Static Semantics Hal Perkins Winter 2009 2/3/2009 2002-09 Hal Perkins & UW CSE I-1 Agenda Static semantics Types Symbol tables General ideas for now; details later for MiniJava project

More information

SYED AMMAL ENGINEERING COLLEGE (An ISO 9001:2008 Certified Institution) Dr. E.M. Abdullah Campus, Ramanathapuram

SYED AMMAL ENGINEERING COLLEGE (An ISO 9001:2008 Certified Institution) Dr. E.M. Abdullah Campus, Ramanathapuram CS6660 COMPILER DESIGN Question Bank UNIT I-INTRODUCTION TO COMPILERS 1. Define compiler. 2. Differentiate compiler and interpreter. 3. What is a language processing system? 4. List four software tools

More information

CSE P 501 Compilers. Implementing ASTs (in Java) Hal Perkins Autumn /20/ Hal Perkins & UW CSE H-1

CSE P 501 Compilers. Implementing ASTs (in Java) Hal Perkins Autumn /20/ Hal Perkins & UW CSE H-1 CSE P 501 Compilers Implementing ASTs (in Java) Hal Perkins Autumn 2009 10/20/2009 2002-09 Hal Perkins & UW CSE H-1 Agenda Representing ASTs as Java objects Parser actions Operations on ASTs Modularity

More information

Semantic Analysis computes additional information related to the meaning of the program once the syntactic structure is known.

Semantic Analysis computes additional information related to the meaning of the program once the syntactic structure is known. SEMANTIC ANALYSIS: Semantic Analysis computes additional information related to the meaning of the program once the syntactic structure is known. Parsing only verifies that the program consists of tokens

More information

ELEC 876: Software Reengineering

ELEC 876: Software Reengineering ELEC 876: Software Reengineering () Dr. Ying Zou Department of Electrical & Computer Engineering Queen s University Compiler and Interpreter Compiler Source Code Object Compile Execute Code Results data

More information

Compiler Techniques MN1 The nano-c Language

Compiler Techniques MN1 The nano-c Language Compiler Techniques MN1 The nano-c Language February 8, 2005 1 Overview nano-c is a small subset of C, corresponding to a typical imperative, procedural language. The following sections describe in more

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

Decaf Language Reference

Decaf Language Reference Decaf Language Reference Mike Lam, James Madison University Fall 2016 1 Introduction Decaf is an imperative language similar to Java or C, but is greatly simplified compared to those languages. It will

More information

SAMOS: an Active Object{Oriented Database System. Stella Gatziu, Klaus R. Dittrich. Database Technology Research Group

SAMOS: an Active Object{Oriented Database System. Stella Gatziu, Klaus R. Dittrich. Database Technology Research Group SAMOS: an Active Object{Oriented Database System Stella Gatziu, Klaus R. Dittrich Database Technology Research Group Institut fur Informatik, Universitat Zurich fgatziu, dittrichg@ifi.unizh.ch to appear

More information

Parallel Attribute Grammar Evaluation. Hans-Juergen Boehm. Willy Zwaenepoel. Rice University. Houston, Texas. time parsing [14].

Parallel Attribute Grammar Evaluation. Hans-Juergen Boehm. Willy Zwaenepoel. Rice University. Houston, Texas. time parsing [14]. Parallel Attribute Grammar Evaluation Hans-Juergen Boehm Willy Zwaenepoel Department of Computer Science Rice University Houston, Texas Abstract This paper reports on experiments with parallel compilation

More information

IPCoreL. Phillip Duane Douglas, Jr. 11/3/2010

IPCoreL. Phillip Duane Douglas, Jr. 11/3/2010 IPCoreL Programming Language Reference Manual Phillip Duane Douglas, Jr. 11/3/2010 The IPCoreL Programming Language Reference Manual provides concise information about the grammar, syntax, semantics, and

More information

CMPT 379 Compilers. Parse trees

CMPT 379 Compilers. Parse trees CMPT 379 Compilers Anoop Sarkar http://www.cs.sfu.ca/~anoop 10/25/07 1 Parse trees Given an input program, we convert the text into a parse tree Moving to the backend of the compiler: we will produce intermediate

More information

The Lexical Structure of Verdi TR Mark Saaltink. Release date: July 1994

The Lexical Structure of Verdi TR Mark Saaltink. Release date: July 1994 The Lexical Structure of Verdi TR-94-5463-06 Mark Saaltink Release date: July 1994 ORA Canada 267 Richmond Road, Suite 100 Ottawa, Ontario K1Z 6X3 CANADA Verdi Compiler Project TR-94-5463-06 1 This report

More information

Semantic Analysis. Role of Semantic Analysis

Semantic Analysis. Role of Semantic Analysis Semantic Analysis Chapter 4 Role of Semantic Analysis Following parsing, the next two phases of the "typical" compiler are semantic analysis (intermediate) code generation The principal job of the semantic

More information

Lexical Considerations

Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2010 Handout Decaf Language Tuesday, Feb 2 The project for the course is to write a compiler

More information

CA Compiler Construction

CA Compiler Construction CA4003 - Compiler Construction Semantic Analysis David Sinclair Semantic Actions A compiler has to do more than just recognise if a sequence of characters forms a valid sentence in the language. It must

More information

Compilers. Type checking. Yannis Smaragdakis, U. Athens (original slides by Sam

Compilers. Type checking. Yannis Smaragdakis, U. Athens (original slides by Sam Compilers Type checking Yannis Smaragdakis, U. Athens (original slides by Sam Guyer@Tufts) Summary of parsing Parsing A solid foundation: context-free grammars A simple parser: LL(1) A more powerful parser:

More information

Decaf Language Reference Manual

Decaf Language Reference Manual Decaf Language Reference Manual C. R. Ramakrishnan Department of Computer Science SUNY at Stony Brook Stony Brook, NY 11794-4400 cram@cs.stonybrook.edu February 12, 2012 Decaf is a small object oriented

More information

Compiling Regular Expressions COMP360

Compiling Regular Expressions COMP360 Compiling Regular Expressions COMP360 Logic is the beginning of wisdom, not the end. Leonard Nimoy Compiler s Purpose The compiler converts the program source code into a form that can be executed by the

More information

CSE P 501 Compilers. Implementing ASTs (in Java) Hal Perkins Winter /22/ Hal Perkins & UW CSE H-1

CSE P 501 Compilers. Implementing ASTs (in Java) Hal Perkins Winter /22/ Hal Perkins & UW CSE H-1 CSE P 501 Compilers Implementing ASTs (in Java) Hal Perkins Winter 2008 1/22/2008 2002-08 Hal Perkins & UW CSE H-1 Agenda Representing ASTs as Java objects Parser actions Operations on ASTs Modularity

More information

Compilers and Interpreters

Compilers and Interpreters Overview Roadmap Language Translators: Interpreters & Compilers Context of a compiler Phases of a compiler Compiler Construction tools Terminology How related to other CS Goals of a good compiler 1 Compilers

More information

Thunks (continued) Olivier Danvy, John Hatcli. Department of Computing and Information Sciences. Kansas State University. Manhattan, Kansas 66506, USA

Thunks (continued) Olivier Danvy, John Hatcli. Department of Computing and Information Sciences. Kansas State University. Manhattan, Kansas 66506, USA Thunks (continued) Olivier Danvy, John Hatcli Department of Computing and Information Sciences Kansas State University Manhattan, Kansas 66506, USA e-mail: (danvy, hatcli)@cis.ksu.edu Abstract: Call-by-name

More information

CS415 Compilers. Lexical Analysis

CS415 Compilers. Lexical Analysis CS415 Compilers Lexical Analysis These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University Lecture 7 1 Announcements First project and second homework

More information

CSE450. Translation of Programming Languages. Lecture 11: Semantic Analysis: Types & Type Checking

CSE450. Translation of Programming Languages. Lecture 11: Semantic Analysis: Types & Type Checking CSE450 Translation of Programming Languages Lecture 11: Semantic Analysis: Types & Type Checking Structure Project 1 - of a Project 2 - Compiler Today! Project 3 - Source Language Lexical Analyzer Syntax

More information

UNIT I Programming Language Syntax and semantics. Kainjan Sanghavi

UNIT I Programming Language Syntax and semantics. Kainjan Sanghavi UNIT I Programming Language Syntax and semantics B y Kainjan Sanghavi Contents Language Definition Syntax Abstract and Concrete Syntax Concept of binding Language Definition Should enable a person or computer

More information