2011 fall fall 2011 should use machine resources

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: C, or JFlex and CUP for Java) Winter 2013 UW CSE 401 (Michael Ringenburg) A-22 Scanner Output Example CSE341: Programming CSE341: •  Input text Programming Languages Languages Lecture 1 L I’m 1 // Look, I wrote a comment!ecture a good programmer!! if (x >= Course 42;! Course Mechanics y) y = Mechanics ML Variable Bindings ML Variable Bindings •  Token Stream IF LPAREN ID(x) GEQ anIGrossman D D(y) Dan Grossman IFall 2011 D(y) BECOMES Fall NT(42) I 2011 RPAREN SCOLON –  Notes: tokens are atomic items, not character strings; comments & whitespace are not tokens (in most languages, ahem, FORTRAN) •  Tokens may have associated data, e.g., a value or a variable name. Winter 2013 UW CSE 401 (Michael Ringenburg) A-23 Parser Output (IR) CSE341: Programming CSE341: Programming Languages Languages •  Given token stream from scanner, parser must produce output tectur...
View Full Document

This document was uploaded on 04/04/2014.

Ask a homework question - tutors are online