Don't write Lisp symbol names in uppercase: use `...' instead.
[sod] / src / lexer-proto.lisp
index 5f7a9af..8e0c889 100644 (file)
    "Return the current lookahead character from the LEXER.
 
    When the lexer is first created, there is no lookahead character: you must
-   `prime the pump' by calling NEXT-CHAR.  The lexer represents encountering
-   the end of its input stream by setting the lookahead character to nil.  At
-   this point it is still possible to push back characters."))
+   `prime the pump' by calling `next-char'.  The lexer represents
+   encountering the end of its input stream by setting the lookahead
+   character to nil.  At this point it is still possible to push back
+   characters."))
 
 ;;;--------------------------------------------------------------------------
 ;;; Formatting tokens.
@@ -95,9 +96,9 @@
 
 (defgeneric fixup-stream* (lexer thunk)
   (:documentation
-   "Helper function for WITH-LEXER-STREAM.
+   "Helper function for `with-lexer-stream'.
 
-   This function does the main work for WITH-LEXER-STREAM.  The THUNK is
+   This function does the main work for `with-lexer-stream'.  The THUNK is
    invoked on a single argument, the LEXER's underlying STREAM."))
 
 (export 'with-lexer-stream)
   "Evaluate BODY with STREAMVAR bound to the LEXER's input stream.
 
    The STREAM is fixed up so that the next character read (e.g., using
-   READ-CHAR) will be the lexer's current lookahead character.  Once the BODY
-   completes, the next character in the stream is read and set as the
+   `read-char') will be the lexer's current lookahead character.  Once the
+   BODY completes, the next character in the stream is read and set as the
    lookahead character.  It is an error if the lexer has pushed-back
    characters (since these can't be pushed back into the input stream
    properly)."
    "Internal protocol for scanning tokens from an input stream.
 
    Implementing a method on this function is the main responsibility of LEXER
-   subclasses; it is called by the user-facing NEXT-TOKEN function.
+   subclasses; it is called by the user-facing `next-token' function.
 
-   The method should consume characters (using NEXT-CHAR) as necessary, and
+   The method should consume characters (using `next-char') as necessary, and
    return two values: a token type and token value.  These will be stored in
    the corresponding slots in the lexer object in order to provide the user
    with one-token lookahead."))
    determining the syntax of the input, while the token value carries any
    additional information about the token's semantic content.  The token type
    and token value are also made available for lookahead via accessors
-   TOKEN-TYPE and TOKEN-VALUE on the LEXER object.
+   TOKEN-TYPE and TOKEN-VALUE on the `lexer' object.
 
    The new lookahead token type and value are returned as two separate
    values.
 
-   If tokens have been pushed back (see PUSHBACK-TOKEN) then they are
+   If tokens have been pushed back (see `pushback-token') then they are
    returned one by one instead of scanning the stream."))
 
 (export 'pushback-token)
    Make the given TOKEN-TYPE and TOKEN-VALUE be the current lookahead token.
    The previous lookahead token is pushed down, and will be made available
    agan once this new token is consumed by NEXT-TOKEN.  If LOCATION is
-   non-nil then FILE-LOCATION is saved and replaced by LOCATION.  The
+   non-nil then `file-location' is saved and replaced by LOCATION.  The
    TOKEN-TYPE and TOKEN-VALUE can be anything at all: for instance, they need
    not be values which can actually be returned by NEXT-TOKEN."))
 
     (lexer wanted-token-type &key (errorp t) (consumep t) default)
   "Require a particular token to appear.
 
-   If the LEXER's current lookahead token has type WANTED-TOKEN-TYPE then
-   consume it (using NEXT-TOKEN) and return its value.  Otherwise, if the
+   If the LEXER's current lookahead token has type `wanted-token-type' then
+   consume it (using `next-token') and return its value.  Otherwise, if the
    token doesn't have the requested type then signal a continuable error
    describing the situation and return DEFAULT (which defaults to nil).