java program.. the question is scary ...please help
Modify the Lexer (15 points):
1. Use a command line argument for the input file for processing tokens ? do not use simple.x
2. Recognize the new tokens > void float
Be sure to change token file appropriately and then run TokenSetup as required
3. Include line number information within tokens for subsequent error reporting, etc.
4. Print each token with line number
READLINE: program { int i int j
program left: 0 right: 6 line: 1
{ left: 8 right: 8: line: 1
int left: 10 right: 12 line: 1
i left: 14 right: 14 line: 1
int left: 16 right: 18 line: 1
j left: 20 right: 20 line: 1
.
.
5. Output the source program with line numbers (since SourceReader reads the source lines it should save the program in memory for printout after the tokens are scanned):
e.g.
1. program { int i int j
2. i = 2
3. j = 3
4. i = write(j+4)
5. }
If you encounter an error, e.g. you find a "%" on line 7 of the source file that contains 20 lines, then you should:
1. report the error
2. stop processing tokens at that point
3. echo the lines of the source file with line numbers up to and including the error line - e.g., echo lines 1 through 7 inclusive in the case with the "%" on line 7
4. exit
Comments on this lab..
1. TokenSetup should NOT be changed
2. The tokens file should be changed appropriately
3. Use the main method in Lexer.java for testing - DO NOT use other packages in the compiler (e.g. Compiler.java) since there will always be complaints due to not recognizing the new constructs
4. Each character in the input stream should be accounted for - never ignored..
5. I will post your test case just prior to the due date.
6. REMOVE ALL DEBUG statements not required
View Answers
Related Tutorials/Questions & Answers:
please help me for this program - Java Beginnersplease help me for this program Write a
program that asks the user for a starting value and an ending value and then writes all the integers (inclusive) between those two values.
Enter Start:
10
Enter End:
14
10
Advertisements
please help me in a java program !! - Java Beginnersplease help me in a
java program !! the porgram should use...://en.wikipedia.org/wiki/Kosaraju_algorithm)
there are 4 classes in my
program : Vertex... and run the
program"
i still need to modify the method kosaraju in the class Graph
C Program....PLEASE HELPC
Program....
PLEASE HELP For this assignment, you are to write a
program that calculates points along a rhodonea curve,
a.k.a. a mathematical rose..., and pointers.
I am lost and need a little
help starting
please
*int fillArray
java please please helpjava please please help Dear Friends plz
help me to complete this
program
import java.util.*;
public class StringDemo {
static...[] to HashMap so that i can seperate key and value using Map.Entry.Please
help me!
please help me to solve this question about arrayplease help me to solve this
question about array write a
program... character. The
program should ignore the case of that character (uppercase or lowercase....
Please enter character");
else {
ch = brr.charAt(0
PLEASE HELP WITH MY JAVA please help!!!!!!!!
it is a for-loop
question:
Display the first 5 multiples...
PLEASE HELP WITH MY JAVA Hey my name is Gavin and im a student... and average
If u can
please help...
please help me in coding this given programplease help me in coding this given program consider the below... are the prime numbers in ascending order
write a
program to find the nth term in this series.
(i m unable to code this
program..
please provide solution
please help me in coding this given programplease help me in coding this given program consider the below... are the prime numbers in ascending order
write a
program to find the nth term in this series.
(i m unable to code this
program..
please provide solution
Java Help PleaseJava Help Please I can't seem to figure out how to make this
program, can some one
help me
please? It is due soon!!
4) Write a
program... ints, so the input such as 02 14 2013) for a date. The
program should have
New to Java Please helpNew to
Java Please help Hi I need
help, can some one
help me.... Thanks!
If you are new in
java, then you need to learn core
java concepts.So go through the following link:
Core
Java Tutorials
Here, you will find
Java Variables Help Please!Java Variables
Help Please! Hi, I just started with
java and i need
help with my school project, this is it so far:
import java.util.*;
public...("--------------------");
System.out.println("2.From The
Question above, What is the ASCII code of the correct
beginner need help with online ordering program pleasebeginner need
help with online ordering
program please I have created a
program for an online ordering system and now have to add error handling and a few other things my teacher doesn't teach well is there a template I can go
please help javaplease help java How to Change the background color of the dashboard to black with an opacity of 0.6.
Change the opacity of the images in the dashboard to 0.5 before the dashboard slides out. Change the opacity
help please - Java Beginnershelp please i wrote this
program
but the function newLine dosnt work with me and i dont know where is exactly the error
this is the code i... on
Java visit to :
http://www.roseindia.net/
java
Thanks
help in java pleasehelp in
java please Define a class named Money whose objects represent amounts of U.S. money. The class will
have two instance variables of type... a test
program for your class.
Notes: You will need to implement the following
Help me please!!! - Java BeginnersHelp me
please!!! im badly needing the complete code for this project in
java!!!
can you
please help me???!!!
it is about 1-dimensional array... the answers 8Hours from now!!!
Kindly
help me!!
please!!
please!!!
NOTE
please help me - Java Beginnersplease help me I have some error in this programe
//write acomputer programe using
java to generate following series :
//output:
//1,2,3,0,-2,7,-4.....
class Series1HW
{
public static void main(String args
help please? are and volume of the Sphere object.
Question 3:
Write a
Java program that will declare...
help please? Define a class named Circle with the following... another class named TestCircle to test the Circle
program by creating two Circle
help in java programhelp in
java program
please could you
help me with my assignment
I have to submit it on Monday 29 October
please help me :(
Write a
program to test the Person class defined below. Your test
program should
please helpplease help
please send me the code of dynamic stack in
java without using the built in functions
Java Program(Please reply asap)Java Program(
Please reply asap) Find out the ways in which numbers can be added to get the same result
Example:- 10
1+9=10
1+2+3+4=10
1+9=10
please help//please help// Number square cube
1 1 1
3 9 27
5 25 125
7 49 343
9... need
program
class SquareAndCube
{
public static void main(String
please help//please help// Number square cube
1 1 1
3 9 27
5 25 125
7 49 343
9... need
program
class SquareAndCube
{
public static void main(String
please help//please help// Number square cube
1 1 1
3 9 27
5 25 125
7 49 343
9... need
program
class SquareAndCube
{
public static void main(String
help please?help please? Define a class named Circle with the following....
Write another class named TestCircle to test the Circle
program by creating two... the properties of both objects and also their surface area and circumference.
java Java program question ...Java program to draw a triangle of stars given N the number of stars at the bottom line Write a
program to draw a triangle of stars given N the number of stars at the bottom line. can assume that N will always be an odd number
help please?help please? Define a class named Circle with the following properties:
List item
An integer data field named radius with protected access... class named TestCircle to test the Circle
program by creating two Circle objects
help please?help please? Define a class named Circle with the following properties:
List item
â?¢ An integer data field named radius with protected access... for the calculation.
Write another class named TestCircle to test the Circle
program help please?help please? Define a class named Circle with the following properties:
List item
An integer data field named radius with protected access... named TestCircle to test the Circle
program by creating two Circle objects
help please?help please? Define a class named Circle with the following properties:
List item
An integer data field named radius with protected access... named TestCircle to test the Circle
program by creating two Circle objects
Please helpPlease help Problem: Write a
program that does addition, subtraction, multiplication and division operation on real numbers. The operation started with a user entered 2 numbers and click one of the operation buttons
help with program - Java BeginnersHelp with program Simple
Java Program // Defining class Stars.java to print stars in certain orderclass Stars{// main() functionpublic static void main(String[] args){int a = 1, b = 5, c, d, i; // declaring 5 int type
Please helpPlease help Problem: Write a
program that does addition, subtraction, multiplication and division operation on real numbers. The operation started with a user entered 2 numbers and click one of the operation buttons