Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners java program.. the question is scary ...please help

Have Programming Question? Ask it here!
 
 
 


samaya khan
java program.. the question is scary ...please help
0 Answer(s)      3 years and 10 months ago
Posted in : Java Beginners


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

Advertisement
View Answers

Related Tutorials/Questions & Answers:
java program.. the question is scary ...please help - Java Beginners
java program.. the question is scary ...please help  Modify the Lexer..., 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
please help me in a java program !! - Java Beginners
please 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
Advertisements
please give me a java program for the following question
please give me a java program for the following question  Write a java program that displays multiple frames : Step 1: Design a frame with three buttons: ?Fruit?, ?Bird? and ?Animal? Step 2: On clicking ?Fruit? button
please help me for this program - Java Beginners
please 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
java please please help
java 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!  
C Program....PLEASE HELP
C 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
Easy Counting Java Program...Please Help? - Java Beginners
Easy Counting Java Program...Please Help?  As I said, I am a beginner at Java. I came across this problem that Im sure uses java. Could you please... someone PLEASE give me this code? I would really love to know this program! THANK
please give me an idea to develop a program for this question?
please give me an idea to develop a program for this question?  How to enter a text or number from keyboard without using InputStreamReader method in java
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...   
Java Help Please
Java 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
please help me to solve this question about array
please help me to solve this question about array  write a program... character. The program should ignore the case of that character (uppercase or lowercase...() > 1) System.out.println("It is not character. Please enter
New to Java Please help
New 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
help please - Java Beginners
help 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 please
help 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
PLZ Need some help on the 2nd part of this question...Someone please help !!!!
PLZ Need some help on the 2nd part of this question...Someone please help !!!!  write an application that displays a menue of three items in a restaurant as follows: 1.Cheeseburger 4.99 2.Pepsi 2.00 3.Chips 0.75 prompt the user
please any one can help me to write a code for this question?
please any one can help me to write a code for this question?  Q 1) In a class first day 25 students are joined. After two days that total students will increased to 60. We can develop a program by using ArrayList concept
beginner need help with online ordering program please
beginner 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 me write a Java program which will store, manipulate, and print student registration information.
PLEASE Help me write a Java program which will store, manipulate, and print student registration information.  HERES TEH QUESTION - I AM MISSING SOME..., ADDRESS AND ADMISSIONS CLASS PLEASE HELP!!! Write a Java program which
please help me to write a code for this program
please help me to write a code for this program   1 1 1 1 2 2 1 1 3 4 3 1 1 4 7 7 4 1
please help me to write a code for this program
please help me to write a code for this program   1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
please any one can help me to write a code for this question?
please any one can help me to write a code for this question?  1) Copy one file content to other? 2) Count the number of words in a file
I really need help with this assignment question Please help me out Please
I really need help with this assignment question Please help me out Please  * Description* You are hired to develop a laptop inventory information... a Java application to provide these services by connecting to a database hosted
Help me please!!! - Java Beginners
Help 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 Beginners
please 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
please help me to answers this question about C++.....huuhuhuhu
please help me to answers this question about C++.....huuhuhuhu  1) Write a full program for the bubble sort algorithm. User is required to enter specific input numbers and the program will be able to sort the given numbers
please help me to answers this question about C++.....huuhuhuhu
please help me to answers this question about C++.....huuhuhuhu  1) Write a full program for the bubble sort algorithm. User is required to enter specific input numbers and the program will be able to sort the given numbers
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
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
please please i wanna insertion sort program find calendar to array value (1000,5000,10000), please help me
Insertion sort program find calendar to array value 1000,5000,10000  program find calendar for insertion sort in jfram to array 1000
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
help in java program
help 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 help me to give code - Java Beginners
please help me to give code  Write a program that prints an n-level stair case made of text. The user should choose the text character..., http://www.roseindia.net/java
please help
please help  please send me the code of dynamic stack in java without using the built in functions
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
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
plz help me out with this problem...please write the program for me.thanxxxxx
plz help me out with this problem...please write the program for me.thanxxxxx  Write a program that will print out a hydro bill. The bill will be formatted as the example on the next page. The following information
plz help me out with this problem...please write the program for me.thanxxxxx
plz help me out with this problem...please write the program for me.thanxxxxx  Write a program that will print out a hydro bill. The bill will be formatted as the example on the next page. The following information
please help me to give code - Java Beginners
please help me to give code  Write a program that reads a file named... John von Neumann Donald Knuth Charles Babbage Grace Hopper your program should...(); } } } ------------------------------- read for more information, http://www.roseindia.net/java/beginners/read
Getting Exception on UseDefinedException sample program - Please help me how to resolve
Getting Exception on UseDefinedException sample program - Please help me how to resolve  class UseDefinedException extends Exception{ String msg...(test1.java:34) what is MyException and how it called ..please explain
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 help me to give code - Java Beginners
please help me to give code  Write a program that uses loops to generate an n x n times table. The program should get n from the user. As a model here is a 4 x4 version: | 1 2 3 4
Please help
Please 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
please help me here.. - Java Beginners
please help me here..  ..uhhmm.. im a little bit new to java and i go..."); } } } this is the program i made..it's supposed to compare the strings but it doesn't... if the first string is part of the second string... ..help..  Hi friend
Please help
Please 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
 

 

 

DMCA.com