[ Character I/O | Reference Manual | Alphabetic Index ]
Succeeds if the next token from the current input stream is successfully
read and unified with Token and its token class with Class.
- Variable or constant.
- Variable or atom.
This predicate is an interface to the ECLiPSe tokenizer. It can be used
to read terms which are not ended by a fullstop or even to build whole
new parsers. The next token from the input stream is read and unified
with Token. The token class of this token is unified with Class.
read_token(Token, Class) is equivalent to read_token(input, Token,
Class). See read_token/3 for details.
Modes and Determinism
This predicate is sensitive to its module context (tool predicate, see @/2).
- (5) type error
- Class does not unify with an atom.
- (190) end of file reached
- End of file was encountered before reading any character.
- (198) reading past the file end
- Trying to read even after the error 190 was raised.
See read_token/3 for examples.
get_chtab / 2, set_chtab / 2, read_token / 3