GradAssignmentOne_v3 - Write a Lexical analyzer for the...

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

View Full Document Right Arrow Icon
Write a Lexical analyzer for the Ruby Language (GRAD) Implement a scanner/lexical analyzer for the ruby, which takes input from the standard input stream ( System.in ), writes error messages to the standard error stream ( System.err ), and writes output to the standard output stream ( System.out ). The scanner should print each recognized token and its corresponding lexeme on the standard output one line at a time. Input files can be any ruby program. Use the following template for your JavaCC specification file Ruby.jj : Identify and include a count of : Reserved operators ie *,/,-… Reserved characters [,],(,) … Integers Floating point Strings Variables(identifiers) (ie begin:2, end:2, do:8) Examples are provided in the 'assignmentOneGrad' folder… (note: as such the reserved characters / operators do not have to be comprehensive to the entire language but rather to (( at least )) the examples provided.) Six program test cases (from which your lexical analyzer must be run against) are provided – look under the assignment test cases on VLT. NOTE: the last program (test case program six) will contain errors to be
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

GradAssignmentOne_v3 - Write a Lexical analyzer for the...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online