Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::scripting::mir::Scanner Class Reference

A class that parses raw text data and produces a set of tokens for the Mir scripting language. More...

#include <omScriptingMirScanner.h>

Public Member Functions

 Scanner ()
 
Bool scan (const UTF8String &source, ArrayList< Token > &tokens)
 Scan the specified source code string and place them in the output list of tokens. More...
 
Bool scan (const UTF8String &source, ArrayList< Token > &tokens, ArrayList< Error > &errors)
 Scan the specified source code string and place them in the output list of tokens. More...
 

Detailed Description

A class that parses raw text data and produces a set of tokens for the Mir scripting language.

Constructor & Destructor Documentation

om::scripting::mir::Scanner::Scanner ( )
inline

Member Function Documentation

Bool om::scripting::mir::Scanner::scan ( const UTF8String &  source,
ArrayList< Token > &  tokens 
)

Scan the specified source code string and place them in the output list of tokens.

The method clears the output token list before adding any tokens to the list.

If no errors are encountered, TRUE is returned. Otherwise, the scanning was not completely successful and FALSE is returned.

Bool om::scripting::mir::Scanner::scan ( const UTF8String &  source,
ArrayList< Token > &  tokens,
ArrayList< Error > &  errors 
)

Scan the specified source code string and place them in the output list of tokens.

The method clears the output token list before adding any tokens to the list.

If any unknown tokens are encountered, they are reported as errors, added to the end of the output error list.

If no errors are encountered, TRUE is returned. Otherwise, the scanning was not completely successful and FALSE is returned.


The documentation for this class was generated from the following file: