CompiledScript Struct Reference

A list of compiled muSED statements and the parsing tools needed to create it. More...

#include <muSED.h>

Collaboration diagram for CompiledScript:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::pair
< std::string::const_iterator
&, std::string::const_iterator & > 
CharRange

Public Member Functions

void clear ()
template<class StringIterator >
void compile (StringIterator first, StringIterator last)
template<class StringContainer >
 CompiledScript (StringContainer const &script)
std::string const & error () const
bool execute (ScriptRuntimeContext *context)
void fail (std::string const &errormsg, int line)
 Set the script parsing state to fail at a certain line.
bool ok () const
 ~CompiledScript ()

Static Public Member Functions

template<class LineRange >
static void compileStream (LineRange lineRange, CharRange charRange, Statement *parent, int &line, CompiledScript *script)

Public Attributes

std::string error_
bool ok_
OuterStatement outerStatement_

Detailed Description

A list of compiled muSED statements and the parsing tools needed to create it.

Such statements can be executed on a given line in a given ScriptRuntimeContext.

The job of executing statements is broken up between the CompiledScript object and the various statements that it contains. A statement handles the job of performing a single function on a single line, and the CompiledScript handles multiple lines, error reporting, etc.

Definition at line 1479 of file muSED.h.


Member Typedef Documentation

Definition at line 1553 of file muSED.h.


Constructor & Destructor Documentation

~CompiledScript (  ) 

Definition at line 1500 of file muSED.h.

Here is the call graph for this function:

CompiledScript ( StringContainer const &  script  ) 

Definition at line 1512 of file muSED.h.

Here is the call graph for this function:


Member Function Documentation

void clear (  ) 

Definition at line 1495 of file muSED.h.

Here is the call graph for this function:

Here is the caller graph for this function:

void compile ( StringIterator  first,
StringIterator  last 
)

Definition at line 2060 of file muSED.h.

Here is the call graph for this function:

Here is the caller graph for this function:

static void compileStream ( LineRange  lineRange,
CharRange  charRange,
Statement parent,
int &  line,
CompiledScript script 
) [static]

On entry, the charRange should refer to some segment of the first line defined in the lineRange. That is, charRange must be valid pointers into lineRange.first.

Parse statements from the specified range of strings in some container and produce statements into the statements_ member variable.

Definition at line 1557 of file muSED.h.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string const& error (  )  const

Definition at line 1523 of file muSED.h.

Here is the caller graph for this function:

bool execute ( ScriptRuntimeContext context  ) 

Definition at line 1525 of file muSED.h.

Here is the call graph for this function:

Here is the caller graph for this function:

void fail ( std::string const &  errormsg,
int  line 
)

Set the script parsing state to fail at a certain line.

Definition at line 1537 of file muSED.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bool ok (  )  const

Definition at line 1521 of file muSED.h.

Here is the caller graph for this function:


Member Data Documentation

std::string error_

Definition at line 1508 of file muSED.h.

bool ok_

Definition at line 1506 of file muSED.h.

Definition at line 1493 of file muSED.h.


The documentation for this struct was generated from the following file:
Generated on Wed Feb 29 22:58:59 2012 for CXXUtilities by  doxygen 1.6.3