Elxlog v0.1.6 Read View Source
Read module is input functions of Elxlog.
main function is parse/2 parse/2 recieve string from stdio or file and return listed predicate or clause data {return_val, buffer}
Link to this section Summary
Functions
iex(1)> Read.elixir_name("elx_foo") "foo"
lowercase or number char or underbar iex> Read.is_atom_str("asdf") true iex> Read.is_atom_str("asdf123") true iex> Read.is_atom_str("asdf_abc") true iex> Read.is_atom_str("Asdf") false
iex> Read.is_builtin_str("halt") true iex> Read.is_builtin_str("halz") false
if prefix of str is elx_ it is Elixir function fname iex> Read.is_elixir_func_str("elx_foo") true iex> Read.is_elixir_func_str("foo") false
iex>Read.is_float_str("123") false iex>Read.is_float_str("123.45") true iex>Read.is_float_str("3.0e1") true
atom + - is separated by tokenizer, thus + - is meaningless iex>Read.is_integer_str("123") true iex>Read.is_integer_str("+123") true iex>Read.is_integer_str("-123") true
if head charactor is upper case it is variable if head charactor is underbar it is variable iex> Read.is_var_str("Abc") true iex> Read.is_var_str("abc") false
parse/2 is main function in Read module 1st arg is tokenized list data e.g. ["1","+","2"] 2nd arg is :sidio or file return lited predicate ot clause data {return_val,buffer}
read one unit operator, operand, predicate e.g. :+ 2 [:foo,1,2] 1st arg is tokenized list 2nd arg is streawm :stdio or file
1st arg is tokenized buffer list 2nd arg is return value 3rd arg is stream :stdin or file return {return_val,buffer}
Link to this section Functions
iex(1)> Read.elixir_name("elx_foo") "foo"
lowercase or number char or underbar iex> Read.is_atom_str("asdf") true iex> Read.is_atom_str("asdf123") true iex> Read.is_atom_str("asdf_abc") true iex> Read.is_atom_str("Asdf") false
iex> Read.is_builtin_str("halt") true iex> Read.is_builtin_str("halz") false
if prefix of str is elx_ it is Elixir function fname iex> Read.is_elixir_func_str("elx_foo") true iex> Read.is_elixir_func_str("foo") false
iex>Read.is_float_str("123") false iex>Read.is_float_str("123.45") true iex>Read.is_float_str("3.0e1") true
atom + - is separated by tokenizer, thus + - is meaningless iex>Read.is_integer_str("123") true iex>Read.is_integer_str("+123") true iex>Read.is_integer_str("-123") true
if head charactor is upper case it is variable if head charactor is underbar it is variable iex> Read.is_var_str("Abc") true iex> Read.is_var_str("abc") false
parse/2 is main function in Read module 1st arg is tokenized list data e.g. ["1","+","2"] 2nd arg is :sidio or file return lited predicate ot clause data {return_val,buffer}
read one unit operator, operand, predicate e.g. :+ 2 [:foo,1,2] 1st arg is tokenized list 2nd arg is streawm :stdio or file
1st arg is tokenized buffer list 2nd arg is return value 3rd arg is stream :stdin or file return {return_val,buffer}