"Base class for lexical analysers.
The lexer reads characters from STREAM, which, for best results, wants to
- be a POSITION-AWARE-INPUT-STREAM.
+ be a `position-aware-input-stream'.
The lexer provides one-character lookahead by default: the current
lookahead character is available to subclasses in the slot CHAR. Before
beginning lexical analysis, the lookahead character needs to be
- established with NEXT-CHAR. If one-character lookahead is insufficient,
+ established with `next-char'. If one-character lookahead is insufficient,
the analyser can push back an arbitrary number of characters using
- PUSHBACK-CHAR.
+ `pushback-char'.
- The NEXT-TOKEN function scans and returns the next token from the STREAM,
- and makes it available as TOKEN-TYPE and TOKEN-VALUE, providing one-token
- lookahead. A parser using the lexical analyser can push back tokens using
- PUSHBACK-TOKENS.
+ The `next-token' function scans and returns the next token from the
+ STREAM, and makes it available as TOKEN-TYPE and TOKEN-VALUE, providing
+ one-token lookahead. A parser using the lexical analyser can push back
+ tokens using `pushback-tokens'.
- For convenience, the lexer implements a FILE-LOCATION method (delegated to
- the underlying stream)."))
+ For convenience, the lexer implements a `file-location' method (delegated
+ to the underlying stream)."))
;;; Reading and pushing back characters.
(:documentation
"Lexical analyser for the SOD lanuage.
- See the LEXER class for the gory details about the lexer protocol."))
+ See the `lexer' class for the gory details about the lexer protocol."))
(defmethod scan-token ((lexer sod-lexer))
(with-slots (stream char keywords location) lexer