|
Yate
|
Abstract script parser. More...
#include <yatescript.h>
Public Member Functions | |
| virtual | ~ScriptParser () |
| virtual bool | parse (const char *text, bool fragment=false, const char *file=0, int len=-1)=0 |
| virtual bool | parseFile (const char *name, bool fragment=false) |
| void | clear () |
| ScriptCode * | code () const |
| void | setMaxFileLen (unsigned int len) |
| unsigned int | maxFileLen () const |
| virtual ScriptContext * | createContext () const |
| virtual ScriptRun * | createRunner (ScriptCode *code, ScriptContext *context=0, const char *title=0) const |
| ScriptRun * | createRunner (ScriptContext *context=0, const char *title=0) const |
| virtual bool | callable (const String &name) |
Public Member Functions inherited from GenObject | |
| GenObject () | |
| virtual | ~GenObject () |
| virtual bool | alive () const |
| virtual void | destruct () |
| virtual const String & | toString () const |
| virtual const String & | traceId () const |
| virtual void * | getObject (const String &name) const |
| NamedCounter * | getObjCounter () const |
| NamedCounter * | setObjCounter (NamedCounter *counter) |
Protected Member Functions | |
| ScriptParser () | |
| void | setCode (ScriptCode *code) |
Additional Inherited Members | |
Static Public Member Functions inherited from GenObject | |
| static void * | getObject (const String &name, const GenObject *obj) |
| static bool | getObjCounting () |
| static void | setObjCounting (bool enable) |
| static NamedCounter * | getObjCounter (const String &name, bool create=true) |
| static ObjList & | getObjCounters () |
Abstract script parser.
Abstract parser, base class for each language parser
|
virtual |
Destructor, releases code
|
inlineprotected |
Default constructor for derived classes
|
virtual |
Check if a script has a certain function or method
| name | Name of the function to check |
Reimplemented in JsParser.
|
inline |
Clear any existing parsed code
References setCode().
|
inline |
Retrieve the currently stored parsed code
Referenced by JsParser::createRunner(), JsParser::createRunner(), createRunner(), createRunner(), and setCode().
|
virtual |
Create a context adequate for the parsed code
Reimplemented in JsParser.
|
virtual |
Create a runner adequate for a block of parsed code
| code | Parsed code block |
| context | Script context, an empty one will be allocated if NULL |
| title | An optional name for the runner |
Reimplemented in JsParser.
References code().
Referenced by createRunner().
|
inline |
Create a runner adequate for the parsed code
| context | Script context, an empty one will be allocated if NULL |
| title | An optional name for the runner |
References code(), and createRunner().
|
inline |
Retrieve the maximum loadable file size
|
pure virtual |
Parse a string as script source code
| text | Source code text |
| fragment | True if the code is just an included fragment |
| file | Name of the file that is being parsed |
| len | Length of text, negative if unknown |
Implemented in JsParser.
|
virtual |
Parse a file as script source code
| name | Source file name |
| fragment | True if the code is just an included fragment |
|
protected |
|
inline |
Set the maximum loaded file length
| len | New maximum file length |