{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Project1 - CSE 450 Project 1 Spring 2008 Objectives Gain...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 450 Project 1, Spring 2008 Objectives: Gain experience constructing regular expressions to tokenize input text. Gain familiarity with the flex lexical-analyzer generator. Description: Your term project will involve the construction of a compiler for for a language called SpartanAda , which is a subset of the Ada95 programming language. You are to work on this compiler in pairs, and you will construct it in seven smaller projects. For this, the first project, you will construct a lexical analyzer (scanner) for that subset of SpartanAda that includes variable declarations, arithmetic expressions, and the statement types defined below. Your program must read in the source file (whose name is supplied as a command line argument) and process it by removing whitespace and comments while categorizing each word or symbol as a token. You will then output (to standard out) a count of how many times each token type appears in the input file. Make sure you understand the language well before you start, and remember that the
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '08
  • newline. numeric literals, flex lexical-analyzer generator, following token types, Ada95 programming language

{[ snackBarMessage ]}