C# Class LSharp.Runtime

The LSharp Runtime
Afficher le fichier Open project: RobBlackwell/LSharp Class Usage Examples

Méthodes publiques

Свойство Type Description
EXIT LSharp.Symbol
NIL LSharp.Symbol
PLUS LSharp.Symbol
PLUSPLUS LSharp.Symbol
QUASIQUOTE LSharp.Symbol
T LSharp.Symbol
UNQUOTE LSharp.Symbol
UNQUOTE_SPLICING LSharp.Symbol

Méthodes publiques

Méthode Description
Add ( IEnumerable args ) : object
AllInt ( IEnumerable args ) : bool

Returns true if all arguments are integers

AllSeq ( IEnumerable args ) : bool
AllString ( IEnumerable args ) : bool

Returns true if all arguments are strings

And ( IEnumerable args, Environment environment ) : bool
Apply ( object f, IEnumerable args, Environment environment ) : object
AsArray ( object list ) : object[]
Boolify ( object o ) : bool

LSharp has a liberal view of true and false, including T NIL and null. This method normalises any object to Boolean true or false.

Bound ( LSharp.Symbol symbol, Environment environment ) : bool
Caar ( object arg ) : Object
Cadr ( object arg ) : Object
Car ( object arg ) : Object
Cddr ( object arg ) : Object
Cdr ( object arg ) : Object
Coerce ( object o, object t ) : object

Changes the type of o to be type t

Compile ( object arg ) : Object
Cons ( object a, object b ) : Object
Disp ( object arg, TextWriter textWriter ) : Object
Divide ( object args ) : Object

(/ numerator denominator+) Divides a numerator by one or more denominators

Do1 ( object args ) : Object
EachLoop ( IEnumerable enumeration, object body, Environment environment ) : object
Err ( object o ) : Object
Eval ( object arg ) : Object
EvalReader ( TextReader textReader, Environment environment ) : Object
EvalString ( string s ) : Object
EvalStrings ( string s ) : Object
ExpandSSyntax ( Object x ) : Object
ForLoop ( int start, int finish, object body, Environment environment ) : object
FromArray ( object os, int skip ) : Pair
GreaterThan ( IEnumerable args ) : Object

(> object1 object2 object*) Returns true if object1 is greater than object2, object2 is greater than object3 and so on.

HasSyntaxChar ( string s ) : bool
Help ( object x, TextWriter writer ) : object
IdFn ( object arg ) : Object
If ( object args, Environment environment ) : object
Inspect ( object o, TextWriter writer ) : object
Is ( object a, object b ) : bool
IsAtom ( object arg ) : bool
IsEmpty ( object arg ) : bool
IsLiteral ( Object o ) : bool
IsNumber ( Object o ) : bool
IsSeq ( object o ) : bool
IsSsyntax ( object x ) : bool
Join ( IEnumerable os ) : ISequence
Join ( ISequence a, ISequence b ) : ISequence
Last ( object arg ) : object
Len ( object arg ) : int
LessThan ( IEnumerable args ) : Object

(< object1 object2 object*) Less than Returns true if object1 is less than object2 and object2 is less than object3 and so on.

List ( IEnumerable args ) : Pair
Load ( string filename ) : Object
Load ( string filename, Environment environment ) : Object
MacroExpand ( object expression, bool once, Environment environment ) : object
MakeFunction ( object parameters, object body, string documentation, Environment environment ) : Function
MakeMacro ( object parameters, object body, string documentation, Environment environment ) : Macro
Map ( Function f, object arg, Environment environment ) : ISequence
Member ( object item, object seq ) : bool
Mod ( object args ) : Object
Multiply ( object args ) : Object

(* number*) Returns the result of multiplying all number arguments

New ( object args ) : Object
Not ( object a ) : bool
Nth ( object arg, int n ) : object

Length

Or ( IEnumerable args, Environment environment ) : bool
Pr ( IEnumerable args, TextWriter textWriter ) : Object
PrintToString ( Object expression ) : string

Changes a Lisp object into the string of characters that READ would need to reconstruct it

Prn ( IEnumerable args, TextWriter textWriter ) : Object
Progn ( object args ) : Object
QuasiQuote ( Object form, Environment environment ) : object
Range ( int start, int finish, int step ) : ISequence
ReadFromString ( string s ) : object
Reduce ( Function f, object arg, Environment environment ) : object
Reference ( object assemblyNames ) : Object
Repl ( ) : void

A Read Eval Print Loop

Runtime ( TextReader textReader, TextWriter writer, TextWriter errorWriter ) : System

Creates a new runtime

Seq ( object o ) : Sequence
StdErr ( ) : TextWriter
StdIn ( ) : TextReader
StdOut ( ) : TextWriter
Str ( IEnumerable xs ) : string
StringAppend ( IEnumerable args ) : string
Subtract ( IEnumerable args ) : Object

(- number*) Subtraction

Time ( object arg, TextWriter textWriter, Environment environment ) : Object
ToList ( object list ) : Pair
Type ( object o ) : Type
TypeOf ( object arg ) : Type
Uniq ( ) : LSharp.Symbol
Using ( IEnumerable n ) : Object
VarRef ( LSharp.Symbol symbol, Environment environment ) : object

Returns the value that symbol is bound to in the given environment

VarSet ( LSharp.Symbol symbol, Object value, Environment environment ) : object

Binds the given symbol to the given value in the given environment

WhileLoop ( object test, object body, Environment environment ) : object
WriteC ( char c, TextWriter textWriter ) : Object

Private Methods

Méthode Description
Reverse ( object arg ) : object
SequenceLength ( ISequence sequence ) : int

Method Details

Add() public static méthode

public static Add ( IEnumerable args ) : object
args IEnumerable
Résultat object

AllInt() public static méthode

Returns true if all arguments are integers
public static AllInt ( IEnumerable args ) : bool
args IEnumerable
Résultat bool

AllSeq() public static méthode

public static AllSeq ( IEnumerable args ) : bool
args IEnumerable
Résultat bool

AllString() public static méthode

Returns true if all arguments are strings
public static AllString ( IEnumerable args ) : bool
args IEnumerable
Résultat bool

And() public static méthode

public static And ( IEnumerable args, Environment environment ) : bool
args IEnumerable
environment Environment
Résultat bool

Apply() public static méthode

public static Apply ( object f, IEnumerable args, Environment environment ) : object
f object
args IEnumerable
environment Environment
Résultat object

AsArray() public static méthode

public static AsArray ( object list ) : object[]
list object
Résultat object[]

Boolify() public static méthode

LSharp has a liberal view of true and false, including T NIL and null. This method normalises any object to Boolean true or false.
public static Boolify ( object o ) : bool
o object
Résultat bool

Bound() public static méthode

public static Bound ( LSharp.Symbol symbol, Environment environment ) : bool
symbol LSharp.Symbol
environment Environment
Résultat bool

Caar() public static méthode

public static Caar ( object arg ) : Object
arg object
Résultat Object

Cadr() public static méthode

public static Cadr ( object arg ) : Object
arg object
Résultat Object

Car() public static méthode

public static Car ( object arg ) : Object
arg object
Résultat Object

Cddr() public static méthode

public static Cddr ( object arg ) : Object
arg object
Résultat Object

Cdr() public static méthode

public static Cdr ( object arg ) : Object
arg object
Résultat Object

Coerce() public static méthode

Changes the type of o to be type t
public static Coerce ( object o, object t ) : object
o object
t object
Résultat object

Compile() public méthode

public Compile ( object arg ) : Object
arg object
Résultat Object

Cons() public static méthode

public static Cons ( object a, object b ) : Object
a object
b object
Résultat Object

Disp() public static méthode

public static Disp ( object arg, TextWriter textWriter ) : Object
arg object
textWriter System.IO.TextWriter
Résultat Object

Divide() public static méthode

(/ numerator denominator+) Divides a numerator by one or more denominators
public static Divide ( object args ) : Object
args object
Résultat Object

Do1() public static méthode

public static Do1 ( object args ) : Object
args object
Résultat Object

EachLoop() public static méthode

public static EachLoop ( IEnumerable enumeration, object body, Environment environment ) : object
enumeration IEnumerable
body object
environment Environment
Résultat object

Err() public static méthode

public static Err ( object o ) : Object
o object
Résultat Object

Eval() public méthode

public Eval ( object arg ) : Object
arg object
Résultat Object

EvalReader() public static méthode

public static EvalReader ( TextReader textReader, Environment environment ) : Object
textReader TextReader
environment Environment
Résultat Object

EvalString() public méthode

public EvalString ( string s ) : Object
s string
Résultat Object

EvalStrings() public méthode

public EvalStrings ( string s ) : Object
s string
Résultat Object

ExpandSSyntax() public static méthode

public static ExpandSSyntax ( Object x ) : Object
x Object
Résultat Object

ForLoop() public static méthode

public static ForLoop ( int start, int finish, object body, Environment environment ) : object
start int
finish int
body object
environment Environment
Résultat object

FromArray() public static méthode

public static FromArray ( object os, int skip ) : Pair
os object
skip int
Résultat Pair

GreaterThan() public static méthode

(> object1 object2 object*) Returns true if object1 is greater than object2, object2 is greater than object3 and so on.
public static GreaterThan ( IEnumerable args ) : Object
args IEnumerable
Résultat Object

HasSyntaxChar() public static méthode

public static HasSyntaxChar ( string s ) : bool
s string
Résultat bool

Help() public static méthode

public static Help ( object x, TextWriter writer ) : object
x object
writer System.IO.TextWriter
Résultat object

IdFn() public static méthode

public static IdFn ( object arg ) : Object
arg object
Résultat Object

If() public static méthode

public static If ( object args, Environment environment ) : object
args object
environment Environment
Résultat object

Inspect() public static méthode

public static Inspect ( object o, TextWriter writer ) : object
o object
writer System.IO.TextWriter
Résultat object

Is() public static méthode

public static Is ( object a, object b ) : bool
a object
b object
Résultat bool

IsAtom() public static méthode

public static IsAtom ( object arg ) : bool
arg object
Résultat bool

IsEmpty() public static méthode

public static IsEmpty ( object arg ) : bool
arg object
Résultat bool

IsLiteral() public static méthode

public static IsLiteral ( Object o ) : bool
o Object
Résultat bool

IsNumber() public static méthode

public static IsNumber ( Object o ) : bool
o Object
Résultat bool

IsSeq() public static méthode

public static IsSeq ( object o ) : bool
o object
Résultat bool

IsSsyntax() public static méthode

public static IsSsyntax ( object x ) : bool
x object
Résultat bool

Join() public static méthode

public static Join ( IEnumerable os ) : ISequence
os IEnumerable
Résultat ISequence

Join() public static méthode

public static Join ( ISequence a, ISequence b ) : ISequence
a ISequence
b ISequence
Résultat ISequence

Last() public static méthode

public static Last ( object arg ) : object
arg object
Résultat object

Len() public static méthode

public static Len ( object arg ) : int
arg object
Résultat int

LessThan() public static méthode

(< object1 object2 object*) Less than Returns true if object1 is less than object2 and object2 is less than object3 and so on.
public static LessThan ( IEnumerable args ) : Object
args IEnumerable
Résultat Object

List() public static méthode

public static List ( IEnumerable args ) : Pair
args IEnumerable
Résultat Pair

Load() public méthode

public Load ( string filename ) : Object
filename string
Résultat Object

Load() public static méthode

public static Load ( string filename, Environment environment ) : Object
filename string
environment Environment
Résultat Object

MacroExpand() public static méthode

public static MacroExpand ( object expression, bool once, Environment environment ) : object
expression object
once bool
environment Environment
Résultat object

MakeFunction() public static méthode

public static MakeFunction ( object parameters, object body, string documentation, Environment environment ) : Function
parameters object
body object
documentation string
environment Environment
Résultat Function

MakeMacro() public static méthode

public static MakeMacro ( object parameters, object body, string documentation, Environment environment ) : Macro
parameters object
body object
documentation string
environment Environment
Résultat Macro

Map() public static méthode

public static Map ( Function f, object arg, Environment environment ) : ISequence
f Function
arg object
environment Environment
Résultat ISequence

Member() public static méthode

public static Member ( object item, object seq ) : bool
item object
seq object
Résultat bool

Mod() public static méthode

public static Mod ( object args ) : Object
args object
Résultat Object

Multiply() public static méthode

(* number*) Returns the result of multiplying all number arguments
public static Multiply ( object args ) : Object
args object
Résultat Object

New() public static méthode

public static New ( object args ) : Object
args object
Résultat Object

Not() public static méthode

public static Not ( object a ) : bool
a object
Résultat bool

Nth() public static méthode

Length
public static Nth ( object arg, int n ) : object
arg object
n int
Résultat object

Or() public static méthode

public static Or ( IEnumerable args, Environment environment ) : bool
args IEnumerable
environment Environment
Résultat bool

Pr() public static méthode

public static Pr ( IEnumerable args, TextWriter textWriter ) : Object
args IEnumerable
textWriter System.IO.TextWriter
Résultat Object

PrintToString() public static méthode

Changes a Lisp object into the string of characters that READ would need to reconstruct it
public static PrintToString ( Object expression ) : string
expression Object
Résultat string

Prn() public static méthode

public static Prn ( IEnumerable args, TextWriter textWriter ) : Object
args IEnumerable
textWriter System.IO.TextWriter
Résultat Object

Progn() public static méthode

public static Progn ( object args ) : Object
args object
Résultat Object

QuasiQuote() public static méthode

public static QuasiQuote ( Object form, Environment environment ) : object
form Object
environment Environment
Résultat object

Range() public static méthode

public static Range ( int start, int finish, int step ) : ISequence
start int
finish int
step int
Résultat ISequence

ReadFromString() public static méthode

public static ReadFromString ( string s ) : object
s string
Résultat object

Reduce() public static méthode

public static Reduce ( Function f, object arg, Environment environment ) : object
f Function
arg object
environment Environment
Résultat object

Reference() public static méthode

public static Reference ( object assemblyNames ) : Object
assemblyNames object
Résultat Object

Repl() public méthode

A Read Eval Print Loop
public Repl ( ) : void
Résultat void

Runtime() public méthode

Creates a new runtime
public Runtime ( TextReader textReader, TextWriter writer, TextWriter errorWriter ) : System
textReader TextReader
writer System.IO.TextWriter
errorWriter System.IO.TextWriter
Résultat System

Seq() public static méthode

public static Seq ( object o ) : Sequence
o object
Résultat Sequence

StdErr() public méthode

public StdErr ( ) : TextWriter
Résultat System.IO.TextWriter

StdIn() public méthode

public StdIn ( ) : TextReader
Résultat TextReader

StdOut() public méthode

public StdOut ( ) : TextWriter
Résultat System.IO.TextWriter

Str() public static méthode

public static Str ( IEnumerable xs ) : string
xs IEnumerable
Résultat string

StringAppend() public static méthode

public static StringAppend ( IEnumerable args ) : string
args IEnumerable
Résultat string

Subtract() public static méthode

(- number*) Subtraction
public static Subtract ( IEnumerable args ) : Object
args IEnumerable
Résultat Object

Time() public static méthode

public static Time ( object arg, TextWriter textWriter, Environment environment ) : Object
arg object
textWriter System.IO.TextWriter
environment Environment
Résultat Object

ToList() public static méthode

public static ToList ( object list ) : Pair
list object
Résultat Pair

Type() public static méthode

public static Type ( object o ) : Type
o object
Résultat System.Type

TypeOf() public static méthode

public static TypeOf ( object arg ) : Type
arg object
Résultat System.Type

Uniq() public static méthode

public static Uniq ( ) : LSharp.Symbol
Résultat LSharp.Symbol

Using() public static méthode

public static Using ( IEnumerable n ) : Object
n IEnumerable
Résultat Object

VarRef() public static méthode

Returns the value that symbol is bound to in the given environment
public static VarRef ( LSharp.Symbol symbol, Environment environment ) : object
symbol LSharp.Symbol
environment Environment
Résultat object

VarSet() public static méthode

Binds the given symbol to the given value in the given environment
public static VarSet ( LSharp.Symbol symbol, Object value, Environment environment ) : object
symbol LSharp.Symbol
value Object
environment Environment
Résultat object

WhileLoop() public static méthode

public static WhileLoop ( object test, object body, Environment environment ) : object
test object
body object
environment Environment
Résultat object

WriteC() public static méthode

public static WriteC ( char c, TextWriter textWriter ) : Object
c char
textWriter System.IO.TextWriter
Résultat Object

Property Details

EXIT public_oe static_oe property

public static Symbol,LSharp EXIT
Résultat LSharp.Symbol

NIL public_oe static_oe property

public static Symbol,LSharp NIL
Résultat LSharp.Symbol

PLUS public_oe static_oe property

public static Symbol,LSharp PLUS
Résultat LSharp.Symbol

PLUSPLUS public_oe static_oe property

public static Symbol,LSharp PLUSPLUS
Résultat LSharp.Symbol

QUASIQUOTE public_oe static_oe property

public static Symbol,LSharp QUASIQUOTE
Résultat LSharp.Symbol

T public_oe static_oe property

public static Symbol,LSharp T
Résultat LSharp.Symbol

UNQUOTE public_oe static_oe property

public static Symbol,LSharp UNQUOTE
Résultat LSharp.Symbol

UNQUOTE_SPLICING public_oe static_oe property

public static Symbol,LSharp UNQUOTE_SPLICING
Résultat LSharp.Symbol