PPT-Attribute Grammars

Author : pasty-toler | Published Date : 2015-10-22

Prabhaker Mateti ACK Assembled from many sources About Attribute Grammars Attribute grammars AGs add semantic info on parse tree nodes Used for semantic checking

Presentation Embed Code

Download Presentation

Download Presentation The PPT/PDF document "Attribute Grammars" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

Attribute Grammars: Transcript


Prabhaker Mateti ACK Assembled from many sources About Attribute Grammars Attribute grammars AGs add semantic info on parse tree nodes Used for semantic checking and other compiletime analyses eg type checking in a compiler. Krishnaprasad Thirunarayan Metadata and Languages Laboratory Department of Computer Science and Engineering BACKGROUND Let G = (N, T, P, S) be a context-free grammar for a language L (Aho et t of Ehsan. . Khoddammohammadi. Recent Advances in Parsing Technology. WS 2012/13. Saarland University. 1. Outline. Definition and motivation behind . u. nsupervised . g. rammar learning. Non-parametric Bayesian statistics. The Chomsky hierarchy of grammars . Context-free grammars describe languages that regular grammars can’t . Unrestricted. Context-sensitive. Context-free. Regular. Slide after Durbin, . et al. ., 1998. A . shorted version from. :. Anastasia . Berdnikova. &. Denis . Miretskiy. ‘Colourless green ideas sleep furiously’.. Chomsky constructed finite formal machines – ‘. grammars. ’.. ‘Does the language contain this sentence?’ (intractable) . David Kauchak. CS30 – Spring 2016. Grammars. What is a grammar?. Grammars. Language view: . A grammar is a set of structural rules that govern the composition of sentences, phrases and words.. Computational view:. Attributes store extra . information. in . AST nodes.. type: . int. val. : . 3. code: . iconst_3. .... type: . int. val. : 4. code: . iconst_4. .... type: . int. val. : 4. env. : •. offs: 1. code: . Ravichandhran. . Madhavan. , . EPFL. Joint work with. Mikael . Mayër. , EPFL. Sumit. . Gulwani. , MSR. Viktor . Kuncak. , EPFL. Overview. u. nit -> . pkg. ? . i. mp* type*. field -> method | . Cradle. -to-Cradle . Design. . Douglas H. Fisher . Vanderbilt University. douglas.h.fisher@. vanderbilt.edu. Mary Lou Maher . University of Maryland, College Park. marylou.maher@. gmail.com. Presentation to the . David Kauchak. CS30 – Spring 2016. Grammars. What is a grammar?. Grammars. Language view: . A grammar is a set of structural rules that govern the composition of sentences, phrases and words.. Computational view:. Attributes can have any type, but often they are trees. Example:. context-free grammar rule: . A ::= B C. attribute grammar rules:. A ::= B C . { . Plus($1. , $. 2. ) . }. or, . e.g.. A ::= B. Learning . Objectives. At the conclusion of the chapter, the student will be able to:. Define the three basic concepts in the theory of computation: automaton, formal language, and grammar.. Solve exercises using mathematical techniques and notation learned in previous courses.. Review. So far, we’ve covered the following: . . Compilation methods: compilation vs. interpretation.. . The overall . c. ompilation process.. Front-end analysis . Lexical Analysis. Syntax Analysis. Chapter 3 Topics. Introduction. The General Problem of Describing Syntax. Formal Methods of Describing Syntax. Attribute Grammars. Describing . the Meanings of Programs: Dynamic Semantics. 1-. 2. Introduction. Eran. . Yahav. 1. 2. You are here. Executable . code. exe. Source. text . txt. Compiler. Lexical. Analysis. Syntax Analysis. Parsing. Semantic. Analysis. Inter.. Rep.. (IR). Code. Gen.. Last Week: Types.

Download Document

Here is the link to download the presentation.
"Attribute Grammars"The content belongs to its owner. You may download and print it for personal use, without modification, and keep all copyright notices. By downloading, you agree to these terms.

Related Documents