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.
- LispGrammarDefinition
- LISP grammar definition.
- LispParserDefinition
- LISP parser definition.
- Name
- An unique symbolic name.
- NativeEnvironment
- StandardEnvironment
- The standard library.
Properties
- lispParser → Parser
-
The standard prolog parser to read rules.
final
- printer ↔ Printer
-
Default printer to output text on the console.
getter/setter pair
Functions
-
eval(
Environment env, dynamic expr) → dynamic - The evaluation function.
-
evalArguments(
Environment env, dynamic args) → dynamic - The arguments evaluation function.
-
evalList(
Environment env, dynamic expr) → dynamic - Evaluate a cons of instructions.
-
evalString(
Parser parser, Environment env, String script) → dynamic -
Reads and evaluates a
script
. -
truthy(
dynamic arg) → bool - Converts a lisp value to a Dart boolean.
Typedefs
- InterruptCallback = void Function()
- Lambda = dynamic Function(Environment env, dynamic args)
- Lambda function type in the Dart world.
- Printer = void Function(Object? object)
- Type of printer function to output text on the console.