Class CSVTokenStream
java.lang.Object
ca.phon.csv.CSVTokenStream
A tokenizer and queue of tokens as read from a CSV file.
- Author:
- Cristopher Yates
-
Constructor Summary
ConstructorsConstructorDescriptionCSVTokenStream
(Reader reader, CSVQuoteType quoteType, char[] separators) Constructs a new CSVTokenStream. -
Method Summary
-
Constructor Details
-
CSVTokenStream
Constructs a new CSVTokenStream.- Parameters:
reader
- The reader for reading the data from a specified file or buffer.quoteType
- An enum for which type of quote character is being used.separators
- An array of characters that act as separators in the CSV.
-
-
Method Details
-
nextToken
Gets the next token from the queue.- Returns:
- The next token from the queue.
-
LA
public ca.phon.csv.CSVTokenType LA(int n) Get the type of the token n spaces ahead in the queue without removing it.- Parameters:
n
- The number of places in the queue to look ahead.- Returns:
- The type of the token at position n - 1 ≈ in the queue.
-
LT
Get the token n spaces ahead in the queue without removing it.- Parameters:
n
- The number of places in the queue to look ahead.- Returns:
- The token at position n - 1 in the queue.
-
add
-