us.bpsm.edn.parser
Interface Scanner
-
public interface ScannerA Scanner knows how to read syntactically correct edn tokens from any Parseable. UseScanners.newScanner()to get an instance.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description java.lang.ObjectnextToken(Parseable pbr)
-
-
-
Method Detail
-
nextToken
java.lang.Object nextToken(Parseable pbr)
The next token read from the givenParseablemay be any of the members ofTokenor instances of the Java classes used to represent atomic values recognized by Scanner.The value
Token.END_OF_INPUTmarks the end of input, indicating that the underlyingParseablehas been fully consumed.In addition to the members of
Token,nextToken(…)may return any of the following:- A
Stringwith the contents of a string literal. - A
Characterfor a character literal. - A
Booleanfor a 'true' or 'false'. - A
Longfor an integer small enough to fit in its range and not marked by a trailing 'N'. - A
BigIntegerfor an integer too large to fit in a Long or marked by a trailing 'N'. - A
Doublefor a binary floating point literal - A
BigDecimalfor an arbitrary precision decimal floating point literal, which is indicated by a trailing 'M' in edn. - A
Symbolfor an edn symbol. ('nil', 'true' and 'false' are not symbols.) - A
Keywordfor an edn keyword, which looks like:somename. - A
Tagindicating that the next value parsed from the TokenSeq should be transformed by a function associated with this Tag.
- Returns:
- the next token read from the
Parseable(nevernull). - Throws:
EdnIOException- if the underlying Parseable throws an IOException.EdnSyntaxException- if the contents of the underlying Parseable violates the syntax of edn.
- A
-
-
DMelt 3.0 © DataMelt by jWork.ORG