winter 2013 uw cse 401 michael ringenburg 43 another

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: LeP AssociaVvity) CSE341: Programming CSE341: Programming Languages Languages 4+5+x // parse 1 Lecture 1 // L ecture term { + term }* expr ::= Course expr() { Course Mechanics Mechanics ExprNode ML Variable Bindings ExprNode op1, op2; M+ 5) L Variable Bindings Op1: (4 Op2: Id(x) op1 = term(); Dan Grossman Dan Grossman while (next symbol is PLUS) { FetNextToken(); g all 2011 Fall 2011 op2 = term(); op1 = CreatePlusNode(op1, op2); } return op1; } Winter 2013 UW CSE 401 (Michael Ringenburg) 37 Example (Showing LeP AssociaVvity) CSE341: Programming CSE341: Programming Languages Languages 4+5+x // parse 1 Lecture 1 // L ecture term { + term }* expr ::= Course expr() { Course Mechanics Mechanics ExprNode ML Variable Bindings ExprNode op1, op2; M + 5) + x) Op1: ((4 L Variable Bindings Op2: Id(x) op1 = term(); Dan Grossman Dan Grossman while (next symbol is PLUS) { FetNextToke...
View Full Document

Ask a homework question - tutors are online