petitparser.example.lisp library

This package contains a simple grammar and evaluator for LISP.

The code is reasonably complete to run and evaluate reasonably complex programs from the console or the web browser.

Classes

Cons
The basic data structure of LISP.
Environment
Environment of bindings.
LispGrammar
LISP grammar.
LispGrammarDefinition
LISP grammar definition.
LispParser
LISP parser.
LispParserDefinition
LISP parser definition.
Name
An unique symbolic name.
NativeEnvironment
StandardEnvironment
The standard library.

Properties

lispParser LispParser
The standard lisp parser definition.
final
printer Printer
Default printer to output text on the console.
read / write

Functions

eval(Environment env, Object expr) Object
The evaluation function.
evalArguments(Environment env, Cons args) Object
The arguments evaluation function.
evalList(Environment env, Cons expr) Object
Evaluate a cons of instructions.
evalString(Parser parser, Environment env, String script) Object
Reads and evaluates a script.

Typedefs

Printer(Object object) → void
Type of printer function to output text on the console.