Yes, as below.
To compile and run the programs do this:
C:\Programs>javac WebScannerTester.java WebScanner.java MyPushbackReader.java C:\Programs>java WebScannerTester test.html :<html> :<head> :<meta name="robots" content="noindex,nofollow"> :<title> :SECTION :5 :--- :SCANNERS :WITH :ONE :CHARACTER :PUSHBACK :</title> :</head> . . .
The source files can also be compiled individually, then
run as above.
test.html
is a sample HTML, any that you want,
although a simple file would be best.
Could StringTokenizer
be used to write the scanner?