Rev 243 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
/******************************************************************************** File: robot.flex** Copyright (c) 2006, Ira W. Snyder (devel@irasnyder.com)* License: GNU General Public License v2** This file implements the scanner that reads the input for* the robot from Project #3, Question #2.******************************************************************************/%%%byaccj%{/* store a reference to the Parser object */private Parser yyparser;/* constructor taking an additional Parser object */public Yylex(java.io.Reader r, Parser yyparser){this(r);this.yyparser = yyparser;}%}WSPACE = [\ \t]+ | \n | \r | \r\n%%"p" { return Parser.PUT; }"t" { return Parser.TAKE; }{WSPACE} { }