Package java_cup.runtime
Class ScannerBuffer
java.lang.Object
java_cup.runtime.ScannerBuffer
- All Implemented Interfaces:
Scanner
-
Constructor Summary
ConstructorsConstructorDescriptionScannerBuffer
(Scanner inner) Wraps around a custom scanner and stores all so far produced tokens in a buffer -
Method Summary
Modifier and TypeMethodDescriptionRead-Only access to the buffered SymbolsReturn the next token, ornull
on end-of-file.
-
Constructor Details
-
ScannerBuffer
Wraps around a custom scanner and stores all so far produced tokens in a buffer- Parameters:
inner
- the scanner to buffer
-
-
Method Details
-
getBuffered
Read-Only access to the buffered Symbols- Returns:
- an unmodifiable Version of the buffer
-
next_token
Description copied from interface:Scanner
Return the next token, ornull
on end-of-file.- Specified by:
next_token
in interfaceScanner
- Throws:
Exception
-