Common Lisp Package: COM.GIGAMONKEYS.PARSER

README:

FUNCTION

Public

* (&REST NUMBERS)

Return the product of its arguments. With no args, returns 1.

+ (&REST NUMBERS)

Return the sum of its arguments. With no args, returns 0.

/ (NUMBER &REST MORE-NUMBERS)

Divide the first argument by each of the following arguments, in turn. With one argument, return reciprocal.

Private

TOKENIZE-FILE (FILENAME LEXER-FN)

Tokenize the given file with the given lexer function.

Undocumented

DUMP-TOKENS (FILENAME LEXER-FN)

MACRO

Public

DEFCHARTYPE (NAME &BODY TYPESPEC)

Define a character-type production. The body should be a typespec that defines a type whose extension is a subset of characters, e.g. '(member #a #b #c)

DEFLEXER (NAME SPEC (&REST META))

Define a parser that collects a vector of tokens.

DEFPARSER (NAME SPEC &KEY (TYPE 'CHARACTER-PARSER))

Define a parser function in the PARSER grammar language.

DEFPROD (NAME (&REST VARS) &BODY SPEC)

Define an arbitrary production in the PARSER grammar language.

PARSELET ((&REST BINDINGS) &BODY FORMS)

Define local parsers. Parslet is to defparser as flet is to defun.

GENERIC-FUNCTION

Private

CODE (GRAMMAR PARSER &KEY SAVE-P)

Emit the code to match the gramar

EMIT-PARSER-BODY (PARSER)

Emit the whole body of the parser.

EMIT-PRODUCTION-FUNCTION (PRODUCTION PARSER)

Emit code for a function definition that will match the grammar of a given production

MAKE-GRAMMAR (SEXP)

Make a tree of grammar objects from an s-expression.

PRODUCTIONS-CALLED (GRAMMAR)

Return a list of productions called by the grammar

PRODUCTIONS-USED (GRAMMAR-OR-PRODUCTION SEEN)

Return a list of productions used by a grammar or a gramatical production.

Undocumented

IS-TOKEN (PARSER TOKEN-DESCRIPTOR)

MAKE-SPECIAL-GRAMMAR (KIND SEXP)

SLOT-ACCESSOR

Public

Undocumented

KIND (OBJECT)

SETFKIND (NEW-VALUE OBJECT)

VALUE (OBJECT)

SETFVALUE (NEW-VALUE OBJECT)

Private

Undocumented

FORM (OBJECT)

GRAMMAR (OBJECT)

NAME (OBJECT)

START (OBJECT)

SETFSTART (NEW-VALUE OBJECT)

SUB-GRAMMAR (OBJECT)

SUB-GRAMMARS (OBJECT)

TOKENS (OBJECT)

SETFTOKENS (NEW-VALUE OBJECT)

VARIABLES (OBJECT)

VARIABLE

Public

* (&REST NUMBERS)

the value of the most recent top level EVAL

+ (&REST NUMBERS)

the value of the most recent top level READ

/ (NUMBER &REST MORE-NUMBERS)

a list of all the values returned by the most recent top level EVAL

Private

Undocumented

*PRODUCTIONS*

CLASS

Private

Undocumented

ALTERNATIVE-GRAMMAR

BUILD-GRAMMAR

CHARACTER-GRAMMAR

CHARACTER-PARSER

CHARTYPE-PRODUCTION

COMPOSITE-GRAMMAR

CONJUNCTIVE-GRAMMAR

GRAMMAR (OBJECT)

GRAMMAR-PRODUCTION

LITERAL-VALUE-GRAMMAR

NEGATIVE-GRAMMAR

NOT-MATCH-GRAMMAR

OPTIONAL-GRAMMAR

PARSER

PLUS-GRAMMAR

PRODUCTION

PRODUCTION-CALL-GRAMMAR

SEQUENCE-GRAMMAR

STAR-GRAMMAR

STRING-GRAMMAR

TOKEN

TOKEN-MATCH-GRAMMAR

TOKEN-PARSER