Behaviours: application.
One-stop shop for all your OTPCL needs.
Theotpcl
module re-exports various functions for convenience when using
OTPCL from within other OTP applications.
column_no() = integer()
eval_error() = {error, reason(), state()}
eval_input() = string() | binary() | [token()]
eval_success() = {ok, state()}
filename() = any()
funs() = map()
level() = atom()
line_no() = integer()
parse_error() = {error, reason(), level(), [token()], [tree()]}
parse_success() = {ok, tree(), [token()]}
position() = {filename(), line_no(), column_no()}
reason() = atom() | {atom(), any()}
str_or_bin() = string() | binary()
token() = {char(), position()}
tree() = {parsed, level(), [tree()] | [token()]}
vars() = map()
cmd/2 | Get the function backing a command from an OTPCL interpreter state. |
cmd/3 | Set the function backing a command in an OTPCL interpreter state. |
eval/1 | Interpret a (charlist/binary/token) string as an OTPCL program with the default starting state. |
eval/2 | Interpret a (charlist/binary/token) string as an OTPCL program with a custom starting state. |
eval_file/1 | Interpret the contents of a file as an OTPCL program with the default starting state. |
eval_file/2 | Interpret the contents of a file as an OTPCL program with a custom starting state. |
get/2 | Get the value of a variable from an OTPCL interpreter state. |
import/2 | Import all the functions from a module into an OTPCL interpreter state. |
import/3 | Import a specific function from a module into an OTPCL interpreter state. |
interpret/1 | Interpret an OTPCL parse tree with the default starting state. |
interpret/2 | Interpret an OTPCL parse tree with a custom starting state. |
parse/1 | Parse a (charlist/binary/token) string as an OTPCL program. |
scan/1 | Convert a charlist string or binary string into a token string. |
scan/2 | Convert a charlist string or binary string into a token string. |
set/3 | Set the value of a variable in an OTPCL interpreter state. |
Get the function backing a command from an OTPCL interpreter state.
Set the function backing a command in an OTPCL interpreter state.
eval(Src::eval_input()) -> eval_success() | eval_error()
Interpret a (charlist/binary/token) string as an OTPCL program with the default starting state.
eval(Src::eval_input(), State::state()) -> eval_success() | eval_error()
Interpret a (charlist/binary/token) string as an OTPCL program with a custom starting state.
eval_file(Filename::filename()) -> eval_success() | eval_error()
Interpret the contents of a file as an OTPCL program with the default starting state.
eval_file(Filename::filename(), State::state()) -> eval_success() | eval_error()
Interpret the contents of a file as an OTPCL program with a custom starting state.
Get the value of a variable from an OTPCL interpreter state.
Import all the functions from a module into an OTPCL interpreter state.
Import a specific function from a module into an OTPCL interpreter state.
interpret(Tree::tree()) -> eval_success() | eval_error()
Interpret an OTPCL parse tree with the default starting state.
interpret(Tree::tree(), State::state()) -> eval_success() | eval_error()
Interpret an OTPCL parse tree with a custom starting state.
parse(Src::eval_input()) -> parse_success() | parse_error()
Parse a (charlist/binary/token) string as an OTPCL program.
scan(Txt::str_or_bin()) -> [token()]
Convert a charlist string or binary string into a token string. The
resulting tokens will start from the default starting position
({nofile,0,0}
).
scan(Txt::str_or_bin(), Pos::position()) -> [token()]
Convert a charlist string or binary string into a token string. The
resulting tokens will start from the starting position Pos
.
Set the value of a variable in an OTPCL interpreter state.
Generated by EDoc