jpl

package module
v0.0.0-...-e587b03 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2020 License: MIT Imports: 19 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

journey - programming language

jpl - lang for ai research

Documentation

Index

Constants

View Source
const (
	OK   = "ok"
	FAIL = "fail"
	NEXT = "next"
)
View Source
const (
	TRUE      = "true"
	FALSE     = "false"
	ERROR     = "error"
	NULL      = "null"
	UNDEFINED = "undefined"
	BREAK     = "break"
	CONTINUE  = "contunue"
)

Constants -

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor

type Actor struct {
	// contains filtered or unexported fields
}

Actor -

type Alist

type Alist struct {
	Expr
	json.Marshaler
	json.Unmarshaler
	Node    parsec.ParsecNode
	Name    string
	Value   []Expr
	CtxName string
}

Alist -

func (*Alist) ChangeContext

func (alist *Alist) ChangeContext(name string)

ChangeContext -

func (*Alist) Clone

func (alist *Alist) Clone() (res Expr)

Clone -

func (*Alist) Debug

func (alist *Alist) Debug() (res string)

Debug -

func (*Alist) Equals

func (alist *Alist) Equals(e Expr) (res bool)

Equals -

func (*Alist) Eval

func (alist *Alist) Eval() (res Expr)

Eval -

func (*Alist) MarshalJSON

func (alist *Alist) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Alist) String

func (alist *Alist) String() (res string)

func (*Alist) UnmarshalJSON

func (alist *Alist) UnmarshalJSON(j []byte) error

UnmarshalJSON -

type Any

type Any struct {
	Expr
	json.Marshaler
	Value   interface{}
	Name    string
	CtxName string
}

Any -

func (*Any) ChangeContext

func (any *Any) ChangeContext(name string)

ChangeContext -

func (*Any) Clone

func (any *Any) Clone() (res Expr)

Clone -

func (*Any) Debug

func (any *Any) Debug() (res string)

Debug -

func (*Any) Equals

func (any *Any) Equals(e Expr) (res bool)

Equals -

func (*Any) Eval

func (any *Any) Eval() (res Expr)

Eval -

func (*Any) MarshalJSON

func (any *Any) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Any) String

func (any *Any) String() (res string)

type AnyClass

type AnyClass struct {
	Name        string
	Constructor Constructor
	Methods     map[string]Method
	Properties  map[string]Property
}

AnyClass -

type Constructor

type Constructor func(cls AnyClass, args []Expr, ctxName string) Expr

Constructor -

type Context

type Context struct {
	// contains filtered or unexported fields
}

Context -

type Dict

type Dict struct {
	Expr
	json.Marshaler
	json.Unmarshaler
	Node    parsec.ParsecNode
	Name    string
	Value   map[string]Expr
	CtxName string
}

Dict -

func (*Dict) ChangeContext

func (dict *Dict) ChangeContext(name string)

ChangeContext -

func (*Dict) Clone

func (dict *Dict) Clone() (res Expr)

Clone -

func (*Dict) Debug

func (dict *Dict) Debug() (res string)

Debug -

func (*Dict) Equals

func (dict *Dict) Equals(e Expr) (res bool)

Equals -

func (*Dict) Eval

func (dict *Dict) Eval() (res Expr)

Eval -

func (*Dict) MarshalJSON

func (dict *Dict) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Dict) String

func (dict *Dict) String() (res string)

func (*Dict) UnmarshalJSON

func (dict *Dict) UnmarshalJSON(j []byte) error

UnmarshalJSON -

type Expr

type Expr interface {
	fmt.Stringer
	Eval() Expr
	Equals(Expr) bool
	Clone() Expr
	ChangeContext(string)
	Debug() string
}

Expr -

type Float

type Float struct {
	Expr
	json.Marshaler
	json.Unmarshaler
	Node    parsec.ParsecNode
	Name    string
	Value   float64
	CtxName string
}

Float -

func (*Float) ChangeContext

func (num *Float) ChangeContext(name string)

ChangeContext -

func (*Float) Clone

func (num *Float) Clone() (res Expr)

Clone -

func (*Float) Debug

func (num *Float) Debug() (res string)

Debug -

func (*Float) Equals

func (num *Float) Equals(e Expr) (res bool)

Equals -

func (*Float) Eval

func (num *Float) Eval() (res Expr)

Eval -

func (*Float) MarshalJSON

func (num *Float) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Float) String

func (num *Float) String() (res string)

func (*Float) UnmarshalJSON

func (num *Float) UnmarshalJSON(j []byte) error

UnmarshalJSON -

type Fork

type Fork struct {
	// contains filtered or unexported fields
}

Fork -

type Func

type Func func([]Expr, string) Expr

Func -

type HTTPHandler

type HTTPHandler struct {
	// contains filtered or unexported fields
}

HTTPHandler -

func (*HTTPHandler) ServeHTTP

func (h *HTTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ID

type ID struct {
	Expr
	json.Marshaler
	json.Unmarshaler
	Node    parsec.ParsecNode
	Name    string
	Value   string
	CtxName string
}

ID -

func (*ID) ChangeContext

func (id *ID) ChangeContext(name string)

ChangeContext -

func (*ID) Clone

func (id *ID) Clone() (res Expr)

Clone -

func (*ID) Debug

func (id *ID) Debug() (res string)

Debug -

func (*ID) Equals

func (id *ID) Equals(e Expr) (res bool)

Equals -

func (*ID) Eval

func (id *ID) Eval() (res Expr)

Eval -

func (*ID) MarshalJSON

func (id *ID) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*ID) String

func (id *ID) String() (res string)

func (*ID) UnmarshalJSON

func (id *ID) UnmarshalJSON(j []byte) error

UnmarshalJSON -

type Int

type Int struct {
	Expr
	json.Marshaler
	json.Unmarshaler
	Node    parsec.ParsecNode
	Name    string
	Value   int
	CtxName string
}

Int -

func (*Int) ChangeContext

func (num *Int) ChangeContext(name string)

ChangeContext -

func (*Int) Clone

func (num *Int) Clone() (res Expr)

Clone -

func (*Int) Debug

func (num *Int) Debug() (res string)

Debug -

func (*Int) Equals

func (num *Int) Equals(e Expr) (res bool)

Equals -

func (*Int) Eval

func (num *Int) Eval() (res Expr)

Eval -

func (*Int) MarshalJSON

func (num *Int) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Int) String

func (num *Int) String() (res string)

func (*Int) UnmarshalJSON

func (num *Int) UnmarshalJSON(j []byte) error

UnmarshalJSON -

type JPL

type JPL struct {
	Y     parsec.Parser
	Debug bool
	// contains filtered or unexported fields
}

JPL -

func New

func New() (jpl *JPL)

New -

func (*JPL) EvalNodes

func (jpl *JPL) EvalNodes(nodes []parsec.ParsecNode)

EvalNodes -

func (*JPL) Parse

func (jpl *JPL) Parse(src []byte) []parsec.ParsecNode

Parse -

type Lamb

type Lamb struct {
	Expr
	json.Marshaler
	Name    string
	Params  []*ID
	Body    Expr
	CtxName string
}

Lamb -

func (*Lamb) Apply

func (lamb *Lamb) Apply(args []Expr, ctxName string) (res Expr)

Apply -

func (*Lamb) ChangeContext

func (lamb *Lamb) ChangeContext(name string)

ChangeContext -

func (*Lamb) Clone

func (lamb *Lamb) Clone() (res Expr)

Clone -

func (*Lamb) Debug

func (lamb *Lamb) Debug() (res string)

Debug -

func (*Lamb) Equals

func (lamb *Lamb) Equals(e Expr) (res bool)

Equals -

func (*Lamb) Eval

func (lamb *Lamb) Eval() (res Expr)

Eval -

func (*Lamb) MarshalJSON

func (lamb *Lamb) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Lamb) String

func (lamb *Lamb) String() (res string)

type Llist

type Llist struct {
	Expr
	json.Marshaler
	Node    parsec.ParsecNode
	Name    string
	Value   []Expr
	CtxName string
}

Llist -

func (*Llist) ChangeContext

func (llist *Llist) ChangeContext(name string)

ChangeContext -

func (*Llist) Clone

func (llist *Llist) Clone() (res Expr)

Clone -

func (*Llist) Debug

func (llist *Llist) Debug() (res string)

Debug -

func (*Llist) Equals

func (llist *Llist) Equals(e Expr) (res bool)

Equals -

func (*Llist) Eval

func (llist *Llist) Eval() (res Expr)

Eval -

func (*Llist) MarshalJSON

func (llist *Llist) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Llist) String

func (llist *Llist) String() (res string)

type Match

type Match func([]Expr, Expr) bool

Match -

type Method

type Method func(any *Any, args []Expr, ctxName string) Expr

Method -

type Mlist

type Mlist struct {
	Expr
	json.Marshaler
	Node    parsec.ParsecNode
	Name    string
	Value   []Expr
	CtxName string
}

Mlist -

func (*Mlist) ChangeContext

func (mlist *Mlist) ChangeContext(name string)

ChangeContext -

func (*Mlist) Clone

func (mlist *Mlist) Clone() (res Expr)

Clone -

func (*Mlist) Debug

func (mlist *Mlist) Debug() (res string)

Debug -

func (*Mlist) Equals

func (mlist *Mlist) Equals(e Expr) (res bool)

Equals -

func (*Mlist) Eval

func (mlist *Mlist) Eval() (res Expr)

Eval -

func (*Mlist) MarshalJSON

func (mlist *Mlist) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Mlist) String

func (mlist *Mlist) String() (res string)

type Pattern

type Pattern struct {
	// contains filtered or unexported fields
}

Pattern -

type Prop

type Prop struct {
	Expr
	Node    parsec.ParsecNode
	Name    string
	Key     string
	Value   Expr
	CtxName string
}

Prop -

func (*Prop) Debug

func (prop *Prop) Debug() (res string)

Debug -

func (*Prop) String

func (prop *Prop) String() (res string)

type Property

type Property struct {
	Name    string
	Adapter func(*Dict, string) interface{}
	Default interface{}
}

Property -

type Refer

type Refer struct {
	Expr
	json.Marshaler
	Node    parsec.ParsecNode
	Name    string
	Value   string
	CtxName string
}

Refer -

func (*Refer) ChangeContext

func (ref *Refer) ChangeContext(name string)

ChangeContext -

func (*Refer) Clone

func (ref *Refer) Clone() (res Expr)

Clone -

func (*Refer) Debug

func (ref *Refer) Debug() (res string)

Debug -

func (*Refer) Equals

func (ref *Refer) Equals(e Expr) (res bool)

Equals -

func (*Refer) Eval

func (ref *Refer) Eval() (res Expr)

Eval -

func (*Refer) MarshalJSON

func (ref *Refer) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Refer) String

func (ref *Refer) String() (res string)

type Text

type Text struct {
	Expr
	json.Marshaler
	json.Unmarshaler
	Node    parsec.ParsecNode
	Name    string
	Value   string
	CtxName string
}

Text -

func (*Text) ChangeContext

func (text *Text) ChangeContext(name string)

ChangeContext -

func (*Text) Clone

func (text *Text) Clone() (res Expr)

Clone -

func (*Text) Debug

func (text *Text) Debug() (res string)

Debug -

func (*Text) Equals

func (text *Text) Equals(e Expr) (res bool)

Equals -

func (*Text) Eval

func (text *Text) Eval() (res Expr)

Eval -

func (*Text) MarshalJSON

func (text *Text) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Text) String

func (text *Text) String() (res string)

func (*Text) UnmarshalJSON

func (text *Text) UnmarshalJSON(j []byte) error

UnmarshalJSON -

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址