Om
1.0.0
A universal framework for multimedia simulation
|
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... | |
A class that parses raw text data and produces a set of tokens for the Mir scripting language.
|
inline |
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.