The Logical Design of the Tokeniser

Size: px
Start display at page:

Download "The Logical Design of the Tokeniser"

Transcription

1 Page 1 of 21 The Logical Design of the Tokeniser Purpose 1. To split up a character string holding a RAQUEL statement expressed in linear text, into a sequence of character strings (called word tokens), each of which holds a word of RAQUEL text extracted from the statement. It simplifies the next stage of tokenisation by removing all whitespace from the character string input and providing the next stage with individual words. 2. To do a check for unbalanced curly and round brackets, thereby preventing unnecessary further work if the brackets are un-balanced. To do an equivalent check for square brackets, bearing in mind that an additional square bracket is allowed by the syntax to denote special asymmetric versions of algebraic operators. RAQUEL Word Tokens A RAQUEL word token is defined as a character string denoting any one of the following : a RAQUEL keyword, which is the name of either of : an assignment, an algebra operator, the parameter prefix of an assignment or operator (e.g. With), a special symbol, or # ; an assignment or operator parameter (including its enclosing square brackets); an additional square bracket to denote a special version of an algebraic operator; a left or right parenthesis (round bracket); the name of a container variable; a literal container value, be it a set of tuples - i.e. a relational value - or a bag of tuples or a sequence of tuples (including its enclosing curly brackets); a default tuple expressed as a 1-tuple literal container value (including its enclosing curly brackets); a literal scalar value. Each instance of every one of the above generates a RAQUEL word token. There are also two special statement delimiter RAQUEL word tokens - see below. Note that no RAQUEL word token can contain any whitespace characters, apart from any arising within the enclosing brackets of a parameter or literal value. Input A RAQUEL statement. Output 1. A sequence of RAQUEL word tokens as defined above. The order of the tokens reflects the order in which they appeared in the original statement. The sequence is

2 always prepended with the RAQUEL word token tab,tab and appended with the RAQUEL word token ; they are used as special delimiters so that it is always possible to check if any of the output has been lost.. 2. A Success list. If it is empty, it indicates that the tokenising was successful. If it contains one or more positive integers, each integer indicates a particular type of error that was detected; the order of the numbers indicates the sequence in which the errors were found. Syntax Rules There are two situations where it is necessary to have explicit syntax rules to distinguish between two otherwise ambiguous expressions : 1. Asymmetric join operators indicate whether they are left or right joins by having an additional square bracket, either a [ or a ], attached to the left or right hand end, respectively, of their parameter. Ideally whitespace could appear between the additional bracket and the parameter bracket to permit the user to format the statement as they wish. However the generalised join has a truth-valued expression as its parameter, and this could include operators and Selector literal values which themselves have parameters surrounded by [ and ]. Thus a situation could arise where the right hand end of the generalised join parameter could not be reliably recognised due its terminating in a sequence of right hand square brackets. To avoid this, the syntax constrains the user to leave no whitespace between the two right hand terminating brackets of a right hand join, and to leave at least one whitespace character between the right hand brackets that arise from nesting. For consistency this is applied to both generalised and natural joins, and also to the two left hand terminating brackets of both left hand joins. 2. Ideally there would always be whitespace left between the operands of arithmetic operators and the operator itself. However in practice many users would expect to be able to input valid arithmetic expressions without including such whitespace, e.g This causes a problem with the - character since in addition to - being used to represent the subtract operator, it is also used as a numeric prefix to indicate that the number in question has a negative value. This raises the question as to whether 3-4 actually indicates a subtraction expression or a positive number followed by a negative number. To conform with common usage, the syntax constrains the user to always have at least one whitespace character immediately before a negative number s - prefix, in order to distinguish this use of - from its use as the subtract operator. Thus would be accepted as meaning subtract -4 from 3 whereas 3--4 would result in the Tokeniser considering -- to be a word on its own, ultimately resulting in an error. The same considerations apply if the subtract operator is replaced by another arithmetic operator character. Note that this means that a statement commencing with a negative number must actually start with at least one whitespace character before the negative number. Page 2 of 21

3 Delimiters These are : whitespace : one or more of space, tab, newline and/or carriage return characters; brackets : (, ), {, }, [, ]. Alphanumerics These are : Text : a.. z A.. Z Text Delimiter : Numeric : Standalone : + - * / ^ = ~ < # ; :, These characters are meaningful (or potentially meaningful) on their own and not as part of words. They are also characters that users may not always delimit by putting whitespace characters round them, and so will have to be specially picked out by the tokeniser. Miscellaneous :! $ % & _ \? These comprise all the other remaining characters on a current standard British keyboard that not specified above. Variable Names These can be composed from any of the text, miscellaneous and numeric characters, as long as the first character is a text character. Page 3 of 21

4 Example One Input : Character string RELATION Restrict[ Attr > 3 ] Output : RAQUEL word token sequence : tab,tab RELATION Restrict [ Attr > 3 ] Success = empty list Example Two Input : Character string EMP Restrict[ Attr1 Member Attr2 ] Project[ DName ] Output : RAQUEL word token sequence : tab,tab EMP Restrict [ Attr1 Member Attr2 ] Project [ DName ] Success = empty list Page 4 of 21

5 Example Three Input : Character string PART Join{ NoPurchase, N/A }[[ SNo ]]{ Factory, 0 } SUPPLIER Restrict[ Wt > 50 ] Output : RAQUEL word token sequence : tab,tab PART Join { NoPurchase, N/A } [ [ SNo ] ] { Factory, 0 } SUPPLIER Restrict [ Wt > 50 ] Success = empty list Page 5 of 21

6 Pre-Conditions Input Variable Input? : character string Condition 0 length(input?) max (where max = maximum length of character string that can be passed into the Tokeniser). Post-Conditions Output Variables Output! : sequence( word tokens ) Success! : sequence(n) Conditions length (Success!) = 0 length (Input?) > 0 And 2 < length (Output!) And Output![1] = tab,tab And Output![ length (Output!) ] = And w ( Output![ 2.. ( length(output!) - 1 ) ] ) w = subsequence( Input? ) And w1, w2 ( Output![ 2.. ( length(output!) - 1 ) ] ) w1 = Output!( n ) w2 = Output!( n+1 ) < w1 catenate w2 > = subsequence( Input? Difference whitespace ) length (Success!) > 0 length (Output!) = 0 length (Input?) = 0 length (Success!) = 1 And length (Output!) = 0 Page 6 of 21

7 Tokeniser States There are three main states the tokeniser can be in : 1. The state. In this state, the tokeniser is proceeding through the assignment and/or algebra part of a statement. 2. The state. In this state, the tokeniser is proceeding through the parameter part of an assignment and/or algebra operator. 3. The Literal state. In this state, the tokeniser is proceeding through a literal relation or a default tuple. The tokeniser proceeds through a complete statement from left to right. Since in RAQUEL every valid parameter must be preceded by a RAQUEL keyword to its left, the initial state in tokenising is the standard state. Valid text in the standard state is always determined solely by the syntax of linear RAQUEL. Valid text inside a parameter is determined not only by the syntax of RAQUEL, but also by the syntax of the operators and values of the different domains that can appear within parameters; added to which, RAQUEL statements can appear recursively within parameters to any depth. Because of the consequent potential complexity of a parameter, the tokeniser makes no attempt to break it up into words, as it does with text in the standard state. Instead it simply produces a complete parameter as a single RAQUEL word token, that includes the initial and final square brackets. Valid text in a literal container or a default tuple (known for short as a literal) is likewise determined by the syntax of RAQUEL operators, and also by the syntax of the operators and values of the different domains that can appear within literals; nested literal containers can also appear there; finally RAQUEL expressions can appear within them to retrieve values are to become part of the literal. Therefore for analogous reasons to those for parameters, the tokeniser produces a literal as a single RAQUEL word token, including the initial and final curly brackets. It is convenient for the state to have several substates associated with it. One such substate is the Keyword state. This is entered when the state finds the beginning of a keyword. The Keyword state continues till the tokeniser finds the end of the keyword; then the Keyword state ceases and returns to the standard state. An exception to this is if the or Keyword states find a [ or {. As this indicates a parameter or a literal respectively, they change the state to the or Literal state. Keywords are normally words and hence delimited by whitespace characters and/or brackets of various kinds. However some keywords are actually single characters, e.g. +, =. If such characters were always delimited by spaces and/or brackets, the same procedure for handling words would suffice to handle them as well. However common usage does not always delimit them in this way; e.g. x>3 may be written instead of x > 3, but users would expect the former to be as acceptable as the latter. Hence these socalled Standalone characters are handled differently, each one being put into its own word token whether or not it is delimited. Page 7 of 21

8 Standalone characters may also be combined into sequences of 2 3 characters which still form standalone keywords in that they are not always delimited; e.g. >= and the prepends to assignments (which distinguish assignments from operators). So where 2 or more standalone characters are found sequentially, they are combined into one word token. However if any character, be it whitespace or anything else, interposes itself between 2 standalone characters, the standalone characters are not combined into one word token but each put into its own word token. Other substates of the state are required to handle values of primitive data types. A primitive data type is defined as a type whose permissible values are expressed via an Innate representation. An innate representation is so called because values of that type are innately recognised by their representation. By contrast, values of a nonprimitive type are recognised by being explicitly labelled as being of a certain data type and not by means of their innate means of representation. Each innate representation require the DBMS to possess built-in means of recognising such values. Such means are not required for non-primitive types; standard plug-ins to the DBMS suffice to provide it with this ability. There are two primitive types which must be handled, and both affect the tokeniser in order that the appropriate contents are put into word tokens. They are the numeric and textual types. Consequently there are Number and Text substates to handle them. In principle other kinds primitive data type could be required in future, but no such types are currently considered. The correct enclosure of expressions within parentheses is checked for within the state; the checking is omitted within the and Literal states where parentheses are treated merely as another character within a parameter or literal word 1. The state also has the associated sub states Enter?, Param[?, and Exit?. They arise from the complications caused by the fact that the RAQUEL syntax allows a second square bracket to appear around a parameter (either symmetrically or asymmetrically) to indicate a special version of the associated operator. To represent this, the additional square brackets become tokens in their own right. Consequently [[ does not signify two levels of enclosure/nesting by square brackets, only one. Likewise ]] signifies only one level of disclosure/un-nesting. In both cases, whitespace cannot appear between the two brackets, otherwise two brackets signifies two levels of en/disclosure. Thus entry to the state is via the Enter? substate in order to check for [[. Enter? also checks to see if three or more consecutive [ have occurred, and if so generates a suitable error message. 1 Where RAQUEL parameters themselves consist of RAQUEL statements, the tokeniser, compactor and parser are together called recursively to handle them. Thus parentheses and curly brackets within such parameters are checked by the recursive calling. Likewise, parentheses and square brackets within literals are checked by the same recursive process. Page 8 of 21

9 In order to be certain when a parameter ends, it is necessary to follow the levels of nesting and un-nesting caused by square brackets within the parameter; unbalanced square brackets within a parameter make it impossible to know where a parameter ends. So within a parameter, it is necessary to treat [[ as one bracket that adds one level of enclosure this is the purpose of the Param[? substate. The Exit? substate deals with all occurrences of ]]. Thus Exit? has to deal with the two questions whose corresponding inverses are dealt with by Enter? and Param[? : the level of disclosure implied by ] or ]], in order to see if the parameter has ended; the semantic implication of ]] that a special version of the operator was written. In fact, once Exit? has checked that ]] terminates a parameter correctly, the state is returned to the state; if a further consecutive ] occurs before any text, then the error is suitably dealt with by the state. The Literal state has to deal with a similar situation to the parameter state, except that it is much simpler by virtue of the fact that, unlike square brackets, double curly brackets do not arise as valid text. So the nesting of curly brackets within each other conforms to the normal nesting of brackets within each other. The end of a Literal state is simply indicated by there being no longer any text enclosed within curly brackets. Page 9 of 21

10 Variables and Their Usage C is used to count the depth of nesting of curly brackets, { and }. P is used to count the depth of nesting of parentheses, ( and ). S is used to count the depth of nesting of square brackets, [ and ], ignoring any additional brackets used to represent special variants of operators. Thus C, P and S must be set to zero before starting the tokenising. After tokenising, the following checks are carried out : IF C > 0 THEN generate unbalanced { error. IF P > 0 THEN generate unbalanced ( error. THEN generate unbalanced [ error. IF C < 0 THEN generate unbalanced } error. IF P < 0 THEN generate unbalanced ) error. IF S < 0 THEN generate unbalanced ] error. RL and RR are used to count successive repetitions of left and right square brackets respectively, in the process of checking for the error of too many [ or ] when handling special versions of an operator. AL is a truth-valued flag that records whether the last character to be put into a word token was a Standalone character or not. It is set to false initially. It s purpose is to support the algorithm to create Standalone word tokens. When a standalone character starts a new word token, AL is set to true. If another standalone character immediately follows it, it is appended to the (standalone) word token and AL left unaltered. If a non-standalone character immediately follows any standalone character, the Standalone word token is completed, the non-standalone character put into a new word token (if appropriate), and AL is set to false. This affects the, Number and Keyword states. After creating a Standalone word token, the state always remains in or reverts to the state. Prefix is a truth-valued flag that records whether a - sign could prefix a number to indicate that the number is a negative number or whether it represents the subtract operator. It is set to false initially and only set to true when a - sign is preceded by a whitespace character since this indicates that it could be the negative prefix of a number; it is reset to false after use. Page 10 of 21

11 State Transition Diagram of the Tokeniser whitespace ( ) { } [ ] Literal numeric { { } { less standalone [ Number Text less ( standalone numeric ) Keyword standalone whitespace ( ) } ] [ [ [ whitespace Enter? standalone whitespace ( ) } ] ( ) { } ] { ( ) } ] Exit? ( ) { } [ ] Notes : Page 11 of 21 ] whitespace numeric Number Number whitespace less ( numeric ) ( ) } ] ( ) { } ] Param[? [ whitespace [ whitespace ( ) { }

12 Detailed Specification of the Tokeniser This specifies, by tokeniser state, the action carried out for each kind of character input - termed the event - and any state change that follows as a consequence. In specifying state changes, for terseness the term wtoken is used to mean word token. Start Create a tab,tab word token. Move to the state. All subsequent word tokens created are appended to this word token. State : Event Action State Change standalone numeric IF AL = true THEN Append character to standalone Prefix false. ELSE ( IF current wtoken not empty THEN complete wtoken ) Start standalone Insert character in it. AL true. IF standalone = - AND previous event = whitespace THEN Prefix true. ELSE Prefix false. IF previous event = - AND Prefix = true THEN Append character to standalone Prefix false. AL false. ELSE IF AL = true THEN Complete AL false. Start numeric wtoken; insert character in it. whitespace -- IF AL = true THEN Start text wtoken & insert into it. Complete Start keyword less AL false. Insert character into it. ( standalone numeric ) Number Text Keyword Page 12 of 21

13 ( Create (- P P + 1 ) Create )- P P - 1 { Start literal IF AL = true Insert { into it. THEN C C + 1 Complete } AL false. Generate unbalanced } error. [ Start parameter Insert [ into it. S S + 1 RL 1 ] Generate unbalanced ] error. Literal Enter? No more input. Create - End Note The case of a standalone event where AL is not true and the current word token is empty (and therefore should not be completed) only arises if a RAQUEL statement begins with a standalone character. However since the algorithm does not keep track of how far through the input statement it has got, it is easier to check whether the current word token is empty rather than check if the standalone character is at the beginning of the statement (and hence the current word token is empty and therefore should not be completed). State : Text Event Action State Change Insert & complete text All other characters. No more input. Append character to text Complete text Create - Generate incomplete text error. End Page 13 of 21

14 State : Number numeric Event Action State Change whitespace standalone Append character to number Complete number Start standalone Insert character into it. AL true Start text Insert into it. less ( standalone numeric ) Start keyword Insert character into it. ( Create (- IF wtoken P P + 1 valid number ) THEN Generate Create )- invalid number P P - 1 { error. Start literal Insert { into it. C C + 1 } Generate unbalanced } error. [ Start parameter Insert [ into it. S S + 1 RL 1 ] Generate unbalanced ] error. -- Text Literal Enter? No more input. Create - End Execute first. Execute next. Page 14 of 21

15 State : Keyword Event Action State Change whitespace Complete keyword standalone less standalone Complete keyword Start standalone Insert character into it. AL true Append character to keyword ( Complete keyword Create (- P P + 1 ) Complete keyword Create )- P P - 1 { Complete keyword Start literal Insert { into it. C C + 1 } Complete keyword Generate unbalanced } error. [ Complete keyword Start parameter Insert [ into it. S S + 1 RL 1 ] Complete keyword Generate unbalanced ] error. No more input. Complete keyword Create - Literal Enter? End Page 15 of 21

16 State : Literal Event Action State Change whitespace Append whitespace to literal Append character to literal ( Append ( to literal ) Append ) to literal { Append { to literal C C + 1 } Append } to literal C C - 1 IF C = 0 THEN Complete literal [ Append [ to literal ] Append ] to literal No more input. Complete literal Create - Generate unbalanced { error. IF C = 0 THEN End Page 16 of 21

17 State : Enter? Event Action State Change whitespace RL 0 RL 0 Append character to parameter ( RL 0 Append ( to parameter ) RL 0 Append ) to parameter { RL 0 Append { to parameter } RL 0 Append } to parameter [ RL RL + 1 IF RL = 2 THEN Complete [- Start parameter Insert [ into it. ELSE Generate too many successive [ error. ] Append ] to parameter RL 0 S S 1 RR 1 No more input. Create - Generate incomplete parameter error. Exit? End Page 17 of 21

18 State : Event Action State Change whitespace Append whitespace to parameter Append character to parameter ( Append ( to parameter ) Append ) to parameter { Append { to parameter } Append } to parameter [ Append [ to parameter S S + 1 RL 1 ] Append ] to parameter S S 1 RR 1 No more input. Complete parameter Create - Generate incomplete parameter error. Param[? Exit? End Page 18 of 21

19 State : Param[? Event Action State Change whitespace RL 0 RL 0 Append character to parameter ( RL 0 Append ( to parameter ) RL 0 Append ) to parameter { RL 0 Append { to parameter } RL 0 Append } to parameter [ Append [ to parameter RL RL + 1 IF RL > 2 THEN Generate too many successive [ error. ] RL 0 S S 1 RR 1 No more input. Create - Generate incomplete parameter error. Exit? End Page 19 of 21

20 State : Exit? Event Action State Change whitespace RR 0 THEN Append character to parameter wtoken ELSE Complete parameter Start wtoken without contents. RR 0 THEN Append character to parameter wtoken ELSE Complete parameter Start keyword Insert character into it. ( RR 0 THEN Append ( to parameter wtoken ELSE Complete parameter Create (- ) RR 0 THEN Append ) to parameter wtoken ELSE Complete parameter Create )- { RR 0 THEN Append { to parameter wtoken ELSE Complete parameter Start literal Insert { into it. C C + 1 } RR 0 THEN Append } to parameter wtoken ELSE Complete parameter Create unbalanced } error. [ RR 0 Generate missing keyword error. S S + 1 THEN ELSE THEN ELSE THEN ELSE THEN ELSE THEN ELSE Literal THEN ELSE Page 20 of 21

21 ] RR RR + 1 IF RR = 2 AND S = 0 THEN Complete parameter Create ]- IF RR > 2 THEN Generate too many successive ] error No more input. Complete parameter Create - THEN Create incomplete parameter error IF S = 0 THEN End End In this state, the tokeniser terminates. Notes For simplicity, the above logical design always requires a word token at the end of the word token list. However this is logically unnecessary if an error is found in the statement, since the Tokeniser should return an empty word token list if an error is found in the statement. In certain circumstances, it is not necessary to create the word token immediately before the word token when an error has been found at the end of the statement. Page 21 of 21

RAQUEL s Relational Operators

RAQUEL s Relational Operators Contents RAQUEL s Relational Operators Introduction 2 General Principles 2 Operator Parameters 3 Ordinary & High-Level Operators 3 Operator Valency 4 Default Tuples 5 The Relational Algebra Operators in

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

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

RAQUEL Parser Code Design

RAQUEL Parser Code Design Parser Input A sequence of pointers-to-tokens. RAQUEL Parser Code Design Parser Output A tree of tokens linked together by pointers AND a sequence of error codes. Pre Conditions None. Post Conditions Length(

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

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

Stored Relvars 18 th April 2013 (30 th March 2001) David Livingstone. Stored Relvars

Stored Relvars 18 th April 2013 (30 th March 2001) David Livingstone. Stored Relvars Stored Relvars Introduction The purpose of a Stored Relvar (= Stored Relational Variable) is to provide a mechanism by which the value of a real (or base) relvar may be partitioned into fragments and/or

More information

String Computation Program

String Computation Program String Computation Program Reference Manual Scott Pender scp2135@columbia.edu COMS4115 Fall 2012 10/31/2012 1 Lexical Conventions There are four kinds of tokens: identifiers, keywords, expression operators,

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

9. Elementary Algebraic and Transcendental Scalar Functions

9. Elementary Algebraic and Transcendental Scalar Functions Scalar Functions Summary. Introduction 2. Constants 2a. Numeric Constants 2b. Character Constants 2c. Symbol Constants 2d. Nested Constants 3. Scalar Functions 4. Arithmetic Scalar Functions 5. Operators

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

Examples of Relational Value Assignments

Examples of Relational Value Assignments Examples of Relational Value Assignments Example Relvars - First Set Let relvar EMP contain sample data of the ID number and name of employees, displayed in tabular format as :- No Name 1 Jack 2 Jill Example

More information

GBIL: Generic Binary Instrumentation Language. Language Reference Manual. By: Andrew Calvano. COMS W4115 Fall 2015 CVN

GBIL: Generic Binary Instrumentation Language. Language Reference Manual. By: Andrew Calvano. COMS W4115 Fall 2015 CVN GBIL: Generic Binary Instrumentation Language Language Reference Manual By: Andrew Calvano COMS W4115 Fall 2015 CVN Table of Contents 1) Introduction 2) Lexical Conventions 1. Tokens 2. Whitespace 3. Comments

More information

XDS An Extensible Structure for Trustworthy Document Content Verification Simon Wiseman CTO Deep- Secure 3 rd June 2013

XDS An Extensible Structure for Trustworthy Document Content Verification Simon Wiseman CTO Deep- Secure 3 rd June 2013 Assured and security Deep-Secure XDS An Extensible Structure for Trustworthy Document Content Verification Simon Wiseman CTO Deep- Secure 3 rd June 2013 This technical note describes the extensible Data

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

GraphQuil Language Reference Manual COMS W4115

GraphQuil Language Reference Manual COMS W4115 GraphQuil Language Reference Manual COMS W4115 Steven Weiner (Systems Architect), Jon Paul (Manager), John Heizelman (Language Guru), Gemma Ragozzine (Tester) Chapter 1 - Introduction Chapter 2 - Types

More information

Sprite an animation manipulation language Language Reference Manual

Sprite an animation manipulation language Language Reference Manual Sprite an animation manipulation language Language Reference Manual Team Leader Dave Smith Team Members Dan Benamy John Morales Monica Ranadive Table of Contents A. Introduction...3 B. Lexical Conventions...3

More information

Contents. Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual

Contents. Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual Contents 1 Introduction...2 2 Lexical Conventions...2 3 Types...3 4 Syntax...3 5 Expressions...4 6 Declarations...8 7 Statements...9

More information

FotoScript: The Language Reference Manual

FotoScript: The Language Reference Manual FotoScript: The Language Reference Manual Matthew Raibert mjr2101@columbia.edu Norman Yung ny2009@columbia.edu James Kenneth Mooney jkm2017@columbia.edu Randall Q Li rql1@columbia.edu October 23, 2004

More information

Chapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines.

Chapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines. Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of

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

Honu. Version November 6, 2010

Honu. Version November 6, 2010 Honu Version 5.0.2 November 6, 2010 Honu is a family of languages built on top of Racket. Honu syntax resembles Java. Like Racket, however, Honu has no fixed syntax, because Honu supports extensibility

More information

Crayon (.cry) Language Reference Manual. Naman Agrawal (na2603) Vaidehi Dalmia (vd2302) Ganesh Ravichandran (gr2483) David Smart (ds3361)

Crayon (.cry) Language Reference Manual. Naman Agrawal (na2603) Vaidehi Dalmia (vd2302) Ganesh Ravichandran (gr2483) David Smart (ds3361) Crayon (.cry) Language Reference Manual Naman Agrawal (na2603) Vaidehi Dalmia (vd2302) Ganesh Ravichandran (gr2483) David Smart (ds3361) 1 Lexical Elements 1.1 Identifiers Identifiers are strings used

More information

2.2 Syntax Definition

2.2 Syntax Definition 42 CHAPTER 2. A SIMPLE SYNTAX-DIRECTED TRANSLATOR sequence of "three-address" instructions; a more complete example appears in Fig. 2.2. This form of intermediate code takes its name from instructions

More information

FRAC: Language Reference Manual

FRAC: Language Reference Manual FRAC: Language Reference Manual Justin Chiang jc4127 Kunal Kamath kak2211 Calvin Li ctl2124 Anne Zhang az2350 1. Introduction FRAC is a domain-specific programming language that enables the programmer

More information

GridLang: Grid Based Game Development Language Language Reference Manual. Programming Language and Translators - Spring 2017 Prof.

GridLang: Grid Based Game Development Language Language Reference Manual. Programming Language and Translators - Spring 2017 Prof. GridLang: Grid Based Game Development Language Language Reference Manual Programming Language and Translators - Spring 2017 Prof. Stephen Edwards Akshay Nagpal Dhruv Shekhawat Parth Panchmatia Sagar Damani

More information

egrapher Language Reference Manual

egrapher Language Reference Manual egrapher Language Reference Manual Long Long: ll3078@columbia.edu Xinli Jia: xj2191@columbia.edu Jiefu Ying: jy2799@columbia.edu Linnan Wang: lw2645@columbia.edu Darren Chen: dsc2155@columbia.edu 1. Introduction

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

Generalising Relational Algebra Set Operators

Generalising Relational Algebra Set Operators Generalising Relational lgebra Set Operators Introduction The relational algebra join operators, Natural Join and Generalised (or Theta) Join, can both be generalised to so that they incorporate semi joins

More information

LESSON 1. A C program is constructed as a sequence of characters. Among the characters that can be used in a program are:

LESSON 1. A C program is constructed as a sequence of characters. Among the characters that can be used in a program are: LESSON 1 FUNDAMENTALS OF C The purpose of this lesson is to explain the fundamental elements of the C programming language. C like other languages has all alphabet and rules for putting together words

More information

Chapter 3: CONTEXT-FREE GRAMMARS AND PARSING Part2 3.3 Parse Trees and Abstract Syntax Trees

Chapter 3: CONTEXT-FREE GRAMMARS AND PARSING Part2 3.3 Parse Trees and Abstract Syntax Trees Chapter 3: CONTEXT-FREE GRAMMARS AND PARSING Part2 3.3 Parse Trees and Abstract Syntax Trees 3.3.1 Parse trees 1. Derivation V.S. Structure Derivations do not uniquely represent the structure of the strings

More information

JME Language Reference Manual

JME Language Reference Manual JME Language Reference Manual 1 Introduction JME (pronounced jay+me) is a lightweight language that allows programmers to easily perform statistic computations on tabular data as part of data analysis.

More information

BoredGames Language Reference Manual A Language for Board Games. Brandon Kessler (bpk2107) and Kristen Wise (kew2132)

BoredGames Language Reference Manual A Language for Board Games. Brandon Kessler (bpk2107) and Kristen Wise (kew2132) BoredGames Language Reference Manual A Language for Board Games Brandon Kessler (bpk2107) and Kristen Wise (kew2132) 1 Table of Contents 1. Introduction... 4 2. Lexical Conventions... 4 2.A Comments...

More information

do fifty two: Language Reference Manual

do fifty two: Language Reference Manual do fifty two: Language Reference Manual Sinclair Target Jayson Ng Josephine Tirtanata Yichi Liu Yunfei Wang 1. Introduction We propose a card game language targeted not at proficient programmers but at

More information

12/22/11. Java How to Program, 9/e. Help you get started with Eclipse and NetBeans integrated development environments.

12/22/11. Java How to Program, 9/e. Help you get started with Eclipse and NetBeans integrated development environments. Java How to Program, 9/e Education, Inc. All Rights Reserved. } Java application programming } Use tools from the JDK to compile and run programs. } Videos at www.deitel.com/books/jhtp9/ Help you get started

More information

Programming Languages Third Edition. Chapter 9 Control I Expressions and Statements

Programming Languages Third Edition. Chapter 9 Control I Expressions and Statements Programming Languages Third Edition Chapter 9 Control I Expressions and Statements Objectives Understand expressions Understand conditional statements and guards Understand loops and variation on WHILE

More information

easel LANGUAGE REFERENCE MANUAL

easel LANGUAGE REFERENCE MANUAL easel LANGUAGE REFERENCE MANUAL Manager Danielle Crosswell dac2182 Language Guru Tyrus Cukavac thc2125 System Architect Yuan-Chao Chou yc3211 Tester Xiaofei Chen xc2364 Table of Contents 1. Introduction...

More information

\n is used in a string to indicate the newline character. An expression produces data. The simplest expression

\n is used in a string to indicate the newline character. An expression produces data. The simplest expression Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of

More information

CS /534 Compiler Construction University of Massachusetts Lowell. NOTHING: A Language for Practice Implementation

CS /534 Compiler Construction University of Massachusetts Lowell. NOTHING: A Language for Practice Implementation CS 91.406/534 Compiler Construction University of Massachusetts Lowell Professor Li Xu Fall 2004 NOTHING: A Language for Practice Implementation 1 Introduction NOTHING is a programming language designed

More information

VLC : Language Reference Manual

VLC : Language Reference Manual VLC : Language Reference Manual Table Of Contents 1. Introduction 2. Types and Declarations 2a. Primitives 2b. Non-primitives - Strings - Arrays 3. Lexical conventions 3a. Whitespace 3b. Comments 3c. Identifiers

More information

COMP-202: Foundations of Programming. Lecture 3: Boolean, Mathematical Expressions, and Flow Control Sandeep Manjanna, Summer 2015

COMP-202: Foundations of Programming. Lecture 3: Boolean, Mathematical Expressions, and Flow Control Sandeep Manjanna, Summer 2015 COMP-202: Foundations of Programming Lecture 3: Boolean, Mathematical Expressions, and Flow Control Sandeep Manjanna, Summer 2015 Announcements Slides will be posted before the class. There might be few

More information

Full file at C How to Program, 6/e Multiple Choice Test Bank

Full file at   C How to Program, 6/e Multiple Choice Test Bank 2.1 Introduction 2.2 A Simple Program: Printing a Line of Text 2.1 Lines beginning with let the computer know that the rest of the line is a comment. (a) /* (b) ** (c) REM (d)

More information

Introduction to Visual Basic and Visual C++ Arithmetic Expression. Arithmetic Expression. Using Arithmetic Expression. Lesson 4.

Introduction to Visual Basic and Visual C++ Arithmetic Expression. Arithmetic Expression. Using Arithmetic Expression. Lesson 4. Introduction to Visual Basic and Visual C++ Arithmetic Expression Lesson 4 Calculation I154-1-A A @ Peter Lo 2010 1 I154-1-A A @ Peter Lo 2010 2 Arithmetic Expression Using Arithmetic Expression Calculations

More information

c) Comments do not cause any machine language object code to be generated. d) Lengthy comments can cause poor execution-time performance.

c) Comments do not cause any machine language object code to be generated. d) Lengthy comments can cause poor execution-time performance. 2.1 Introduction (No questions.) 2.2 A Simple Program: Printing a Line of Text 2.1 Which of the following must every C program have? (a) main (b) #include (c) /* (d) 2.2 Every statement in C

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

Learning Language. Reference Manual. George Liao (gkl2104) Joseanibal Colon Ramos (jc2373) Stephen Robinson (sar2120) Huabiao Xu(hx2104)

Learning Language. Reference Manual. George Liao (gkl2104) Joseanibal Colon Ramos (jc2373) Stephen Robinson (sar2120) Huabiao Xu(hx2104) Learning Language Reference Manual 1 George Liao (gkl2104) Joseanibal Colon Ramos (jc2373) Stephen Robinson (sar2120) Huabiao Xu(hx2104) A. Introduction Learning Language is a programming language designed

More information

Operators. Java operators are classified into three categories:

Operators. Java operators are classified into three categories: Operators Operators are symbols that perform arithmetic and logical operations on operands and provide a meaningful result. Operands are data values (variables or constants) which are involved in operations.

More information

Stating the obvious, people and computers do not speak the same language.

Stating the obvious, people and computers do not speak the same language. 3.4 SYSTEM SOFTWARE 3.4.3 TRANSLATION SOFTWARE INTRODUCTION Stating the obvious, people and computers do not speak the same language. People have to write programs in order to instruct a computer what

More information

ARG! Language Reference Manual

ARG! Language Reference Manual ARG! Language Reference Manual Ryan Eagan, Mike Goldin, River Keefer, Shivangi Saxena 1. Introduction ARG is a language to be used to make programming a less frustrating experience. It is similar to C

More information

RDGL Reference Manual

RDGL Reference Manual RDGL Reference Manual COMS W4115 Programming Languages and Translators Professor Stephen A. Edwards Summer 2007(CVN) Navid Azimi (na2258) nazimi@microsoft.com Contents Introduction... 3 Purpose... 3 Goals...

More information

Handout 9: Imperative Programs and State

Handout 9: Imperative Programs and State 06-02552 Princ. of Progr. Languages (and Extended ) The University of Birmingham Spring Semester 2016-17 School of Computer Science c Uday Reddy2016-17 Handout 9: Imperative Programs and State Imperative

More information

Language Reference Manual

Language Reference Manual ALACS Language Reference Manual Manager: Gabriel Lopez (gal2129) Language Guru: Gabriel Kramer-Garcia (glk2110) System Architect: Candace Johnson (crj2121) Tester: Terence Jacobs (tj2316) Table of Contents

More information

Further GroupBy & Extend Operations

Further GroupBy & Extend Operations Slide 1 Further GroupBy & Extend Operations Objectives of the Lecture : To consider whole relation Grouping; To consider the SQL Grouping option Having; To consider the Extend operator & its implementation

More information

Parser Design. Neil Mitchell. June 25, 2004

Parser Design. Neil Mitchell. June 25, 2004 Parser Design Neil Mitchell June 25, 2004 1 Introduction A parser is a tool used to split a text stream, typically in some human readable form, into a representation suitable for understanding by a computer.

More information

COLOGO A Graph Language Reference Manual

COLOGO A Graph Language Reference Manual COLOGO A Graph Language Reference Manual Advisor: Stephen A. Edwards Shen Wang (sw2613@columbia.edu) Lixing Dong (ld2505@columbia.edu) Siyuan Lu (sl3352@columbia.edu) Chao Song (cs2994@columbia.edu) Zhou

More information

There are four numeric types: 1. Integers, represented as a 32 bit (or longer) quantity. Digits sequences (possibly) signed are integer literals:

There are four numeric types: 1. Integers, represented as a 32 bit (or longer) quantity. Digits sequences (possibly) signed are integer literals: Numeric Types There are four numeric types: 1. Integers, represented as a 32 bit (or longer) quantity. Digits sequences (possibly) signed are integer literals: 1-123 +456 2. Long integers, of unlimited

More information

psed [-an] script [file...] psed [-an] [-e script] [-f script-file] [file...]

psed [-an] script [file...] psed [-an] [-e script] [-f script-file] [file...] NAME SYNOPSIS DESCRIPTION OPTIONS psed - a stream editor psed [-an] script [file...] psed [-an] [-e script] [-f script-file] [file...] s2p [-an] [-e script] [-f script-file] A stream editor reads the input

More information

CSCE 531 Spring 2009 Final Exam

CSCE 531 Spring 2009 Final Exam CSCE 531 Spring 2009 Final Exam Do all problems. Write your solutions on the paper provided. This test is open book, open notes, but no electronic devices. For your own sake, please read all problems before

More information

Illustrative Example of Logical Database Creation

Illustrative Example of Logical Database Creation Illustrative Example of Logical Database Creation A small RAQUEL DB is created to illustrate what is involved as regards the logical schemas of a RAQUEL DB. Create a Database or ExampleDB

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

Principles of Programming Languages 2017W, Functional Programming

Principles of Programming Languages 2017W, Functional Programming Principles of Programming Languages 2017W, Functional Programming Assignment 3: Lisp Machine (16 points) Lisp is a language based on the lambda calculus with strict execution semantics and dynamic typing.

More information

DINO. Language Reference Manual. Author: Manu Jain

DINO. Language Reference Manual. Author: Manu Jain DINO Language Reference Manual Author: Manu Jain Table of Contents TABLE OF CONTENTS...2 1. INTRODUCTION...3 2. LEXICAL CONVENTIONS...3 2.1. TOKENS...3 2.2. COMMENTS...3 2.3. IDENTIFIERS...3 2.4. KEYWORDS...3

More information

TED Language Reference Manual

TED Language Reference Manual 1 TED Language Reference Manual Theodore Ahlfeld(twa2108), Konstantin Itskov(koi2104) Matthew Haigh(mlh2196), Gideon Mendels(gm2597) Preface 1. Lexical Elements 1.1 Identifiers 1.2 Keywords 1.3 Constants

More information

CHAD Language Reference Manual

CHAD Language Reference Manual CHAD Language Reference Manual INTRODUCTION The CHAD programming language is a limited purpose programming language designed to allow teachers and students to quickly code algorithms involving arrays,

More information

corgi Language Reference Manual COMS W4115

corgi Language Reference Manual COMS W4115 corgi Language Reference Manual COMS W4115 Philippe Guillaume Losembe (pvl2109) Alisha Sindhwani (as4312) Melissa O Sullivan (mko2110) Justin Zhao (jxz2101) October 27, 2014 Chapter 1: Introduction corgi

More information

1. Lexical Analysis Phase

1. Lexical Analysis Phase 1. Lexical Analysis Phase The purpose of the lexical analyzer is to read the source program, one character at time, and to translate it into a sequence of primitive units called tokens. Keywords, identifiers,

More information

Full file at

Full file at Java Programming: From Problem Analysis to Program Design, 3 rd Edition 2-1 Chapter 2 Basic Elements of Java At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class

More information

Mirage. Language Reference Manual. Image drawn using Mirage 1.1. Columbia University COMS W4115 Programming Languages and Translators Fall 2006

Mirage. Language Reference Manual. Image drawn using Mirage 1.1. Columbia University COMS W4115 Programming Languages and Translators Fall 2006 Mirage Language Reference Manual Image drawn using Mirage 1.1 Columbia University COMS W4115 Programming Languages and Translators Fall 2006 Prof. Stephen Edwards Team Members: Abhilash I ai2160@columbia.edu

More information

VENTURE. Section 1. Lexical Elements. 1.1 Identifiers. 1.2 Keywords. 1.3 Literals

VENTURE. Section 1. Lexical Elements. 1.1 Identifiers. 1.2 Keywords. 1.3 Literals VENTURE COMS 4115 - Language Reference Manual Zach Adler (zpa2001), Ben Carlin (bc2620), Naina Sahrawat (ns3001), James Sands (js4597) Section 1. Lexical Elements 1.1 Identifiers An identifier in VENTURE

More information

Review of the C Programming Language

Review of the C Programming Language Review of the C Programming Language Prof. James L. Frankel Harvard University Version of 11:55 AM 22-Apr-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights reserved. Reference Manual for the

More information

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */ Overview Language Basics This chapter describes the basic elements of Rexx. It discusses the simple components that make up the language. These include script structure, elements of the language, operators,

More information

CSC 467 Lecture 3: Regular Expressions

CSC 467 Lecture 3: Regular Expressions CSC 467 Lecture 3: Regular Expressions Recall How we build a lexer by hand o Use fgetc/mmap to read input o Use a big switch to match patterns Homework exercise static TokenKind identifier( TokenKind token

More information

Repetition Through Recursion

Repetition Through Recursion Fundamentals of Computer Science I (CS151.02 2007S) Repetition Through Recursion Summary: In many algorithms, you want to do things again and again and again. For example, you might want to do something

More information

Ian Kenny. November 28, 2017

Ian Kenny. November 28, 2017 Ian Kenny November 28, 2017 Introductory Databases Relational Algebra Introduction In this lecture we will cover Relational Algebra. Relational Algebra is the foundation upon which SQL is built and is

More information

Language Reference Manual

Language Reference Manual TAPE: A File Handling Language Language Reference Manual Tianhua Fang (tf2377) Alexander Sato (as4628) Priscilla Wang (pyw2102) Edwin Chan (cc3919) Programming Languages and Translators COMSW 4115 Fall

More information

ASML Language Reference Manual

ASML Language Reference Manual ASML Language Reference Manual Tim Favorite (tuf1) & Frank Smith (fas2114) - Team SoundHammer Columbia University COMS W4115 - Programming Languages & Translators 1. Introduction The purpose of Atomic

More information

09 STACK APPLICATION DATA STRUCTURES AND ALGORITHMS REVERSE POLISH NOTATION

09 STACK APPLICATION DATA STRUCTURES AND ALGORITHMS REVERSE POLISH NOTATION DATA STRUCTURES AND ALGORITHMS 09 STACK APPLICATION REVERSE POLISH NOTATION IMRAN IHSAN ASSISTANT PROFESSOR, AIR UNIVERSITY, ISLAMABAD WWW.IMRANIHSAN.COM LECTURES ADAPTED FROM: DANIEL KANE, NEIL RHODES

More information

Functional Programming Languages (FPL)

Functional Programming Languages (FPL) Functional Programming Languages (FPL) 1. Definitions... 2 2. Applications... 2 3. Examples... 3 4. FPL Characteristics:... 3 5. Lambda calculus (LC)... 4 6. Functions in FPLs... 7 7. Modern functional

More information

Petros: A Multi-purpose Text File Manipulation Language

Petros: A Multi-purpose Text File Manipulation Language Petros: A Multi-purpose Text File Manipulation Language Language Reference Manual Joseph Sherrick js2778@columbia.edu June 20, 2008 Table of Contents 1 Introduction...................................................

More information

Typescript on LLVM Language Reference Manual

Typescript on LLVM Language Reference Manual Typescript on LLVM Language Reference Manual Ratheet Pandya UNI: rp2707 COMS 4115 H01 (CVN) 1. Introduction 2. Lexical Conventions 2.1 Tokens 2.2 Comments 2.3 Identifiers 2.4 Reserved Keywords 2.5 String

More information

Hava Language Technical Reference

Hava Language Technical Reference Hava Language Technical Reference April 25, 2009 (draft) Steven T. Hackman, Loren K. Platzman H. Milton Stewart School of Industrial and Systems Engineering Georgia Institute of Technology Hava is a numerical

More information

d-file Language Reference Manual

d-file Language Reference Manual Erwin Polio Amrita Rajagopal Anton Ushakov Howie Vegter d-file Language Reference Manual COMS 4115.001 Thursday, October 20, 2005 Fall 2005 Columbia University New York, New York Note: Much of the content

More information

Reference Grammar Meta-notation: hfooi means foo is a nonterminal. foo (in bold font) means that foo is a terminal i.e., a token or a part of a token.

Reference Grammar Meta-notation: hfooi means foo is a nonterminal. foo (in bold font) means that foo is a terminal i.e., a token or a part of a token. Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Fall 2002 Handout 6 Decaf Language Definition Wednesday, September 4 The project for the 12-unit flavor

More information

Regular Expressions. Regular expressions are a powerful search-and-replace technique that is widely used in other environments (such as Unix and Perl)

Regular Expressions. Regular expressions are a powerful search-and-replace technique that is widely used in other environments (such as Unix and Perl) Regular Expressions Regular expressions are a powerful search-and-replace technique that is widely used in other environments (such as Unix and Perl) JavaScript started supporting regular expressions in

More information

x = 3 * y + 1; // x becomes 3 * y + 1 a = b = 0; // multiple assignment: a and b both get the value 0

x = 3 * y + 1; // x becomes 3 * y + 1 a = b = 0; // multiple assignment: a and b both get the value 0 6 Statements 43 6 Statements The statements of C# do not differ very much from those of other programming languages. In addition to assignments and method calls there are various sorts of selections and

More information

CLIP - A Crytographic Language with Irritating Parentheses

CLIP - A Crytographic Language with Irritating Parentheses CLIP - A Crytographic Language with Irritating Parentheses Author: Duan Wei wd2114@columbia.edu Yi-Hsiu Chen yc2796@columbia.edu Instructor: Prof. Stephen A. Edwards July 24, 2013 Contents 1 Introduction

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

CSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York

CSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York CSc 10200! Introduction to Computing Lecture 2-3 Edgardo Molina Fall 2013 City College of New York 1 C++ for Engineers and Scientists Third Edition Chapter 2 Problem Solving Using C++ 2 Objectives In this

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

Theoretical Part. Chapter one:- - What are the Phases of compiler? Answer:

Theoretical Part. Chapter one:- - What are the Phases of compiler? Answer: Theoretical Part Chapter one:- - What are the Phases of compiler? Six phases Scanner Parser Semantic Analyzer Source code optimizer Code generator Target Code Optimizer Three auxiliary components Literal

More information

B E C Y. Reference Manual

B E C Y. Reference Manual B E C Y Tabular data manipulation language Reference Manual Authors: Bong Koh Eunchul Bae Cesar Vichdo Yongju Bang bdk2109@columbia.edu eb2263@columbia.edu cv2139@columbia.edu yb2149@columbia.edu 1 1.

More information

fpp: Fortran preprocessor March 9, 2009

fpp: Fortran preprocessor March 9, 2009 fpp: Fortran preprocessor March 9, 2009 1 Name fpp the Fortran language preprocessor for the NAG Fortran compiler. 2 Usage fpp [option]... [input-file [output-file]] 3 Description fpp is the preprocessor

More information

ECE 122 Engineering Problem Solving with Java

ECE 122 Engineering Problem Solving with Java ECE 122 Engineering Problem Solving with Java Lecture 3 Expression Evaluation and Program Interaction Outline Problem: How do I input data and use it in complicated expressions Creating complicated expressions

More information

Languages and Compilers

Languages and Compilers Principles of Software Engineering and Operational Systems Languages and Compilers SDAGE: Level I 2012-13 4. Lexical Analysis (Scanning) Dr Valery Adzhiev vadzhiev@bournemouth.ac.uk Office: TA-121 For

More information

It can be confusing when you type something like the expressions below and get an error message. a range variable definition a vector of sine values

It can be confusing when you type something like the expressions below and get an error message. a range variable definition a vector of sine values 7_april_ranges_.mcd Understanding Ranges, Sequences, and Vectors Introduction New Mathcad users are sometimes confused by the difference between range variables and vectors. This is particularly true considering

More information

COMS W4115 Programming Languages & Translators GIRAPHE. Language Reference Manual

COMS W4115 Programming Languages & Translators GIRAPHE. Language Reference Manual COMS W4115 Programming Languages & Translators GIRAPHE Language Reference Manual Name UNI Dianya Jiang dj2459 Vince Pallone vgp2105 Minh Truong mt3077 Tongyun Wu tw2568 Yoki Yuan yy2738 1 Lexical Elements

More information

Reference Grammar Meta-notation: hfooi means foo is a nonterminal. foo (in bold font) means that foo is a terminal i.e., a token or a part of a token.

Reference Grammar Meta-notation: hfooi means foo is a nonterminal. foo (in bold font) means that foo is a terminal i.e., a token or a part of a token. Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Fall 2002 Handout 7 Espresso Language Definition Wednesday, September 4 The project for the 18-unit

More information

Overview: Programming Concepts. Programming Concepts. Names, Values, And Variables

Overview: Programming Concepts. Programming Concepts. Names, Values, And Variables Chapter 18: Get With the Program: Fundamental Concepts Expressed in JavaScript Fluency with Information Technology Third Edition by Lawrence Snyder Overview: Programming Concepts Programming: Act of formulating

More information

Overview: Programming Concepts. Programming Concepts. Chapter 18: Get With the Program: Fundamental Concepts Expressed in JavaScript

Overview: Programming Concepts. Programming Concepts. Chapter 18: Get With the Program: Fundamental Concepts Expressed in JavaScript Chapter 18: Get With the Program: Fundamental Concepts Expressed in JavaScript Fluency with Information Technology Third Edition by Lawrence Snyder Overview: Programming Concepts Programming: Act of formulating

More information

YOLOP Language Reference Manual

YOLOP Language Reference Manual YOLOP Language Reference Manual Sasha McIntosh, Jonathan Liu & Lisa Li sam2270, jl3516 and ll2768 1. Introduction YOLOP (Your Octothorpean Language for Optical Processing) is an image manipulation language

More information