The lexer will need to handle all tokens within the MeggyJava language except for Java comments (both one-line and multi-line comments will be a feature added in a later assignment).
See the Meggy Java Tokens description in the Resources section of the website for a description of Tokens and their associated datatype values. Your token datatype in Haskell will have to match those specified:
data Token = TokenImportkw | TokenBooleankw | TokenIntkw | TokenBytekw | TokenMainkw ... | UnknownChar Char deriving (Show, Eq)See the LexerTutorial.hs we covered in class for some ideas in how to implement the lexer.
The main difference between what you will submit and the LexerTutorial.hs is that you should have a separate Main.hs and Lexer.hs. The Lexer should be in its own module. That module should be imported and used in Main.hs. Your Main.hs should print the list of tokens returned from the lexer to standard out.
svn log svn infoThe output should be from subversion or similar output from any other revision control tool.
tar cvf PA2.tar README revision-control.txt Lexer.hs Main.hs