Most gcc front ends enngs programming hand wriwen

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: and uses a switch statement to determine the Lecture 1 next state to call Lecture 1 –  Final states rourse Mechanics Mechanics C eturn token. Course •  Op:ons 2: Single procedure MLDFA, switch Bindings rst character for Variable based on fi ML Variable Bindings –  We’ll see an example of this in a few slides. •  Pros Dan Grossman Dan Grossman –  Fairly straighvorward to write. Fall 2011 –  If wriwen well, can Fe faster than generated scanners (par:cularly ball 2011 op:on 2). –  Can handle any weird language corner cases that don’t map perfectly to the RE/NFA/DFA model. –  Readable code (mostly). •  Cons –  A lot of tedious work – thus, error prone. Winter 2013 UW CSE 401 (Michael Ringenburg) 20 10 1/14/13 DFA => code, automa:c CSE341: Programming CSE341: Programming Languages Languages •  Op:on 1: use a tool to generate table driven scanner –  Rows: states of DFA Lecture 1 Lecture 1 –  Columns: input characters Course Mechanics –  Entries:...
View Full Document

This document was uploaded on 04/04/2014.

Ask a homework question - tutors are online