cl-lexer

API Reference

lexer

cl-lexer: a lexical analyzer generator

LEXER

  • Macro TOKENIZE (str pos-var &rest rules)
  • Macro DEFLEXER (name &rest rules)
    Create a lexical analyser. This analyser function takes a string :position, :end, :end-token and :end-value keyword parameters, and returns a function of no arguments that returns the next token and value each time it is called, or (values end-token end-value) when the input string is exhausted. By default, position = 0, end = length of str, and end-token and end-value = nil.
  • Generic-Function NUM (x)
  • Method NUM ((x string))
  • Generic-Function INT (x)
  • Method INT ((x number))
  • Method INT ((x string))