Package java_cup.runtime
Class ScannerBuffer
- java.lang.Object
-
- java_cup.runtime.ScannerBuffer
-
-
Constructor Summary
Constructors Constructor Description ScannerBuffer(Scanner inner)
Wraps around a custom scanner and stores all so far produced tokens in a buffer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Symbol>
getBuffered()
Read-Only access to the buffered SymbolsSymbol
next_token()
Return the next token, ornull
on end-of-file.
-
-
-
Constructor Detail
-
ScannerBuffer
public ScannerBuffer(Scanner inner)
Wraps around a custom scanner and stores all so far produced tokens in a buffer- Parameters:
inner
- the scanner to buffer
-
-
Method Detail
-
getBuffered
public java.util.List<Symbol> getBuffered()
Read-Only access to the buffered Symbols- Returns:
- an unmodifiable Version of the buffer
-
next_token
public Symbol next_token() throws java.lang.Exception
Description copied from interface:Scanner
Return the next token, ornull
on end-of-file.- Specified by:
next_token
in interfaceScanner
- Throws:
java.lang.Exception
-
-