/* SI 413 Fall 2011
 * Lab 04
 * Flex file specifying the scanner
 * YOUR NAME
 * PARTNER'S NAME
 */
%{
#include "pat.h"
#include <iostream>
using namespace std;
%}

%option noyywrap

%%
[a-z][a-zA-Z0-9]*  { return SYM; }
"*"                { return FOLD; }
";"                { return STOP; }
":"                { return COLON; }
[A-Z][a-zA-Z0-9]*  { return NAME; }
"_r"               { return REV; }
"["                { return LB; }
"]"                { return RB; }
<<EOF>>            { return 0; }
[ \t\n]+           { }
.        { cerr << "Unrecognized token!" << endl; exit(1); }
%%