MysoreScript
|
Classes | |
struct | File |
The structure representing MysoreScript File objects. More... | |
Enumerations | |
enum | StaticSelectors { length = 1, charAt, dump, print, invoke, atPut, at, add, sub, mul, div, compare, open, close, readline, write, LAST_STATIC_SELECTOR } |
Selectors for methods that are defined as part of the runtime. More... | |
Functions | |
Obj | invalidMethod (Obj obj, Selector sel) |
Invalid method function. More... | |
File * | FileOpen (File *f, Selector sel, String *file) |
The open method on File objects. More... | |
Obj | FileClose (File *f, Selector sel) |
The close method on File objects. More... | |
String * | FileReadLine (File *f, Selector sel) |
The readline method on File objects. More... | |
Obj | FileWrite (File *f, Selector sel, String *data) |
The write method on File objects. More... | |
Obj | StringLength (String *str, Selector sel) |
The .length() method for String objects. More... | |
Obj | StringCharAt (String *str, Selector sel, Obj idx) |
The .charAt(idx) method for String objects. More... | |
Obj | ArrayLength (Array *arr, Selector sel) |
The .length() method for Array objects. More... | |
Obj | ArrayAt (Array *arr, Selector sel, Obj idx) |
The .at(idx) method for Array objects. More... | |
Obj | ArrayAtPut (Array *arr, Selector sel, Obj idx, Obj obj) |
The .atPut(idx, obj) method for Array objects. More... | |
Obj | NumberDump (Obj str, Selector sel) |
The .dump() method for Number objects. More... | |
Obj | NumberPrint (Obj str, Selector sel) |
The .print() method for Number objects. More... | |
Obj | StringDump (String *str, Selector sel) |
The .dump() method for String objects. More... | |
Obj | StringPrint (String *str, Selector sel) |
The .dump() method for String objects. More... | |
Obj | StringAdd (String *str, Selector sel, String *other) |
The + method on a string, allocates a new string with the specified length. More... | |
Obj | StringCmp (String *str, Selector sel, String *other) |
Compare two strings, returning an integer representing the ordering. More... | |
Variables | |
std::vector< std::string > | selNames |
Global vector of selector names. More... | |
const char * | StaticSelectorNames [] |
The names of the selectors in the StaticSelectors enumeration. More... | |
struct Method | FileMethods [] |
Methods for the file class. More... | |
struct Method | StringMethods [] |
Method table for the String class. More... | |
struct Method | NumberMethods [] |
Method table for the Number class. More... | |
struct Method | ArrayMethods [] |
Method table for the Array class. More... | |
const char * | StringIvars [] = { "length" } |
The names of the instance variables in the String class. More... | |
const char * | ArrayIvars [] = { "length", "bufferSize", "buffer" } |
The names of the instance variables in the Array class. More... | |
const char * | FileIvars [] = { "fd" } |
The names of the instance variables in the File class. More... | |
enum anonymous_namespace{runtime.cc}::StaticSelectors |
Selectors for methods that are defined as part of the runtime.
Enumerator | |
---|---|
length | |
charAt | |
dump | |
invoke | |
atPut | |
at | |
add | |
sub | |
mul | |
div | |
compare | |
open | |
close | |
readline | |
write | |
LAST_STATIC_SELECTOR |
Definition at line 312 of file runtime.cc.
The .at(idx)
method for Array
objects.
Definition at line 174 of file runtime.cc.
The .atPut(idx, obj)
method for Array
objects.
Definition at line 192 of file runtime.cc.
The .length()
method for Array
objects.
Definition at line 163 of file runtime.cc.
The close
method on File
objects.
Note that files are not automatically closed: we could use the finaliser support in the Boehm GC to do this.
Definition at line 74 of file runtime.cc.
The open
method on File
objects.
Files can only be opened in one mode by MysoreScript (read/write, create if doesn't exist).
Definition at line 55 of file runtime.cc.
The readline
method on File
objects.
Constructs a String
containing the line.
Definition at line 88 of file runtime.cc.
The write
method on File
objects.
Definition at line 117 of file runtime.cc.
Invalid method function.
Returned when method lookup fails. This logs a message indicating the error.
Definition at line 25 of file runtime.cc.
The .dump()
method for Number
objects.
Definition at line 229 of file runtime.cc.
The .print()
method for Number
objects.
Definition at line 237 of file runtime.cc.
The + method on a string, allocates a new string with the specified length.
Definition at line 262 of file runtime.cc.
The .charAt(idx)
method for String
objects.
Definition at line 141 of file runtime.cc.
Compare two strings, returning an integer representing the ordering.
Definition at line 284 of file runtime.cc.
The .dump()
method for String
objects.
Definition at line 246 of file runtime.cc.
The .length()
method for String
objects.
Definition at line 133 of file runtime.cc.
The .dump()
method for String
objects.
Definition at line 254 of file runtime.cc.
const char* anonymous_namespace{runtime.cc}::ArrayIvars[] = { "length", "bufferSize", "buffer" } |
The names of the instance variables in the Array
class.
Definition at line 479 of file runtime.cc.
struct Method anonymous_namespace{runtime.cc}::ArrayMethods[] |
Method table for the Array
class.
Definition at line 451 of file runtime.cc.
const char* anonymous_namespace{runtime.cc}::FileIvars[] = { "fd" } |
The names of the instance variables in the File
class.
Definition at line 483 of file runtime.cc.
struct Method anonymous_namespace{runtime.cc}::FileMethods[] |
Methods for the file class.
Definition at line 361 of file runtime.cc.
struct Method anonymous_namespace{runtime.cc}::NumberMethods[] |
Method table for the Number
class.
Definition at line 433 of file runtime.cc.
std::vector<std::string> anonymous_namespace{runtime.cc}::selNames |
Global vector of selector names.
This is used to map from a selector to a string value.
Definition at line 19 of file runtime.cc.
const char* anonymous_namespace{runtime.cc}::StaticSelectorNames[] |
The names of the selectors in the StaticSelectors
enumeration.
Definition at line 336 of file runtime.cc.
const char* anonymous_namespace{runtime.cc}::StringIvars[] = { "length" } |
The names of the instance variables in the String
class.
Definition at line 475 of file runtime.cc.
struct Method anonymous_namespace{runtime.cc}::StringMethods[] |
Method table for the String
class.
Definition at line 391 of file runtime.cc.