Question: in java, here is what include in the text file INT x ; READ( x , A . i n p u t ) ;

in java,

here is what include in the text file

INT x ;

READ( x , A . i n p u t ) ;

INT y ;

READ( y , B . i n p u t ) ;

here is the thing, i use a method to scan everying in the text file, character by character into a string, if its not a character or degit, ignore it and continue.

String[] keyword ={"INT","READ"}

i use

if (!keyword.contains(token))

to check if its a token, the token should be x, y

it also need to ignore everything between 2 quotation marks, but i dont know how to do that, so i end up including B, input, A, output as tokens.

what should i do to ignored that?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!