Courtesy xkcd.

Slides:



Advertisements
Similar presentations
Automata Theory December 2001 NPDAPart 3:. 2 NPDA example Example: a calculator for Reverse Polish expressions Infix expressions like: a + log((b + c)/d)
Advertisements

Regular Expressions, Backus-Naur Form and Reverse Polish Notation.
COP4020 Programming Languages Expression and assignment Prof. Xin Yuan.
Yinchong Han Linjia Jiang. Introduction There are three forms of expressions which are prefix, infix and postfix notation. The project will evaluate infix.
Department of Technical Education Andhra Pradesh
Reverse Polish Notation (RPN) & Stacks CSC 1401: Introduction to Programming with Java Week 14 – Lecture 2 Wanda M. Kunkle.
Reverse Polish Expressions Some general observations about what they are and how they relate to infix expressions. These 9 slides provide details about.
Postfix notation. About postfix notation Postfix, or Reverse Polish Notation (RPN) is an alternative to the way we usually write arithmetic expressions.
Regular Expression to NFA-  (a+ba) * a. First Parsing Step concatenate (a+ba) * a.
Basic English II Jay Melton. We will meet twice a week One class meeting in 小 7 The other class meeting in 情 2.
Please open your laptops, log in to the MyMathLab course web site, and open Daily Quiz 8. IMPORTANT NOTE: If you have time left out of your five minutes.
Ten-Key Proficiency BSAD 264  to the orientation for the ten-key class!  This presentation gives you important information about the course. Press enter.
Please open Daily Quiz 34. A scientific calculator may be used on this quiz. You can keep your yellow formula sheets out when you take the quiz. Remember.
10.3 Tree Transversal. Pre/post fix notation and order See handout. a.bc.d e f g h i j k.
Stack Applications.
SUNY Oneonta Data Structures and Algorithms Visualization Teaching materials Generation Group.
COMP 523 DIANE POZEFSKY 19 August CHAOS REIGNS.
How to Learn in This Course CS 5010 Program Design Paradigms “Bootcamp” Lesson 0.1 © Mitchell Wand, This work is licensed under a Creative Commons.
Computer Science Department Data Structure & Algorithms Problem Solving with Stack.
Data Structures : Project 5 Data Structures Project 5 – Expression Trees and Code Generation.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
CIT 590 Intro to Programming Lecture 12. Agenda More stuff with classes Few more thoughts on unit testing/coding in general Summarizing Python.
Operating Systems Session 1. Contact details TA: Alexander(Sasha) Apartsin ◦ ◦ Office hours: Homepage:
How to check the equivalence of two regular expressions using JFLAP One of the questions in the previous HW involved converting an NFA to a regular expression.
INFIX, PREFIX, & POSTFIX EXPRESSIONS Saurav Karmakar Spring 2007.
Principles of Computer Science I Honors Section Note Set 1 CSE 1341 – H 1.
Linear Data Structures LIFO – Polish notation Context Saving.
Welcome to Back-to-School Night F ifth Grade Room 22 Mr. Jovel.
C++ Programming: Program Design Including Data Structures, Fourth Edition Chapter 18: Stacks and Queues (part 2)
CMSC 330: Organization of Programming Languages Theory of Regular Expressions Finite Automata.
Review 1 Polish Notation Prefix Infix Postfix Precedence of Operators Converting Infix to Postfix Evaluating Postfix.
Prefix, Postfix and Infix. Infix notation  A-B/(C+D)  evaluate C+D (call the result X),  then B/X (call the result Y),  and finally A-Y.  The order.
Formal Methods in System Design, Lec 2 University of Utah School of Computing Ganesh Gopalakrishnan, Instructor Greg Szubzda, half-TA
COMP1927 Course Introduction 16x1
1 5. Abstract Data Structures & Algorithms 5.1 Data Structure Fundamentals.
Stacks. Stack ADT where we can only work with "top" – Top() : get value on top – Pop() : remove value on top – Push(value) : put new value on top.
BUS 475 Week 1 DQ 1 Select a small business that you may want to start and why you selected the business (The business you select should be the business.
Field Experience in Family Social Sciences
Review Use of Stack Introduction Stack in our life Stack Operations
Regular Expressions, Backus-Naur Form and Reverse Polish Notation
CS Data Structures Chapter 6 Stacks Mehmet H Gunes
Stacks Chapter 6.
Revised based on textbook author’s notes.
Infix to postfix conversion
Expressions and Assignment
COMP 523 Diane pozefsky 24 August 2016.
Stack as an ADT.
Program to search an element of array using linear search.
CO4301 – Advanced Games Development Week 2 Introduction to Parsing
ASTs, Grammars, Parsing, Tree traversals
CSE 105 theory of computation
Communicate.
September 27 – Course introductions; Adts; Stacks and Queues
106 Data Structure Homework 1
Welcome to Physics 1403!!.
Carlisle Middle School Parent/Student 6th Grade Informational Meeting
Stack Data Structure, Reverse Polish Notation, Homework 7
Computer Networks CNT5106C
Stacks, Queues, and Deques
Organization of Programming Languages
ASTs, Grammars, Parsing, Tree traversals
CS 111 Digital Image Processing
Welcome to AP Calc AB with Ms. Pfenning
Computer Science 2 5/17/2016 Finish the Queue Program
Course Information EECS 2031 Fall 2016.
Intro to CIT 594
PZ07A - Expressions Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section PZ07A.
Context Free Grammars-II
CSCI 1730: C++ and System Programming
Stacks A stack is an ordered set of elements, for which only the last element placed into the stack is accessible. The stack data type is also known as.
Presentation transcript:

Courtesy xkcd

Programming assignment number 1 Programming in a theory course … is this gonna work out?

Few points about HW3 It is a direct copy of http://ezekiel.vancouver.wsu.edu/~cs317/archive/projects/grep/grep.pdf But we have fewer things we are asking you to implement Assumes knowledge of Postfix notation 2 weeks to do the program TAs will have a special session (extra office hours/tutorial) on how to tackle this on next Wednesday Please read the specs and the code structure before attending the session

Postfix notation (Reverse Polish) Put the operator at the end 5 + ((1 + 2) * 4) − 3 is what we call infix, with the operator in the middle 5 1 2 + 4 * + 3 - Why postfix? – the operator order is no longer ambiguous. You are always operating on the most recent two operands

Postfix for regular expression (regex) We will use ‘|’ for the union and ‘&’ for the concatenation Also remember that * is a unary operation ab|*a&

Final deliverable Your program should be able to make an NFA that recognizes postfix regular expressions We are fine with you limiting yourself to the command line results that are posted in HW3 (check out the main function) Highly encouraged to have fun with the regex finder

Google regex t-shirts for fun (funsies?)