#include <Parser.h>
Public Member Functions | |
| Parser (VirtualMachine *vm) | |
| ~Parser (void) | |
| VirtualMachine * | get_vm () const |
| const cl7::string_type & | get_script_code () const |
| const std::vector< unsigned long > * | get_bytecode () const |
| bool | parse (const cl7::string_type &script_code, bool log_parser_debug_info=false, bool log_builder_debug_info=false) |
| unsigned | get_source_code_position (const cl7::string_type &script_code, unsigned code_ref, unsigned *line=NULL, unsigned *col=NULL) const |
Static Public Member Functions | |
| static bool | is_whitespace (cl7::char_type chr) |
| static bool | is_letter (cl7::char_type chr) |
| static bool | is_digit (cl7::char_type chr) |
| static bool | is_digitnz (cl7::char_type chr) |
| static bool | is_idchr (cl7::char_type chr) |
| static cl7::string_type | extract_identifier (const cl7::string_type &str, unsigned pos) |
Static Public Attributes | |
| static const cl7::char_type | CH_NUL = TEXT('\0') |
| static const cl7::char_type | CH_HT = TEXT('\t') |
| static const cl7::char_type | CH_LF = TEXT('\n') |
| static const cl7::char_type | CH_VT = TEXT('\v') |
| static const cl7::char_type | CH_FF = TEXT('\f') |
| static const cl7::char_type | CH_CR = TEXT('\r') |
| static const cl7::char_type | CH_SPACE = TEXT(' ') |
| static const cl7::char_type | CH_ESCAPE = TEXT('\\') |
| static const cl7::char_type | CH_DOUBLE_QUOTE = TEXT('"') |
| static const cl7::char_type | CH_SINGLE_QUOTE = TEXT('\'') |
| static const cl7::char_type | CH_OPENING_ROUND = TEXT('(') |
| static const cl7::char_type | CH_CLOSING_ROUND = TEXT(')') |
| static const cl7::char_type | CH_OPENING_SQUARE = TEXT('[') |
| static const cl7::char_type | CH_CLOSING_SQUARE = TEXT(']') |
| static const cl7::char_type | CH_OPENING_CURLY = TEXT('{') |
| static const cl7::char_type | CH_CLOSING_CURLY = TEXT('}') |
| el7::scripting::parsing::Parser::Parser | ( | VirtualMachine * | vm | ) |
Explicit constructor.
| el7::scripting::parsing::Parser::~Parser | ( | void | ) |
Destructor.
| cl7::string_type el7::scripting::parsing::Parser::extract_identifier | ( | const cl7::string_type & | str, | |
| unsigned | pos | |||
| ) | [static] |
Extracts the identifier at the specified character position of the given string.
| const std::vector<unsigned long>* el7::scripting::parsing::Parser::get_bytecode | ( | ) | const [inline] |
Returns the generated (raw) bytecode.
| const cl7::string_type& el7::scripting::parsing::Parser::get_script_code | ( | ) | const [inline] |
The original source code.
| unsigned el7::scripting::parsing::Parser::get_source_code_position | ( | const cl7::string_type & | script_code, | |
| unsigned | code_ref, | |||
| unsigned * | line = NULL, |
|||
| unsigned * | col = NULL | |||
| ) | const |
Returns the position within the given script source code derived from the given reference position within the corresponding preprocessed code. Additionally, the line number and column of the source code position are stored into the parameters (if possible).
| VirtualMachine* el7::scripting::parsing::Parser::get_vm | ( | ) | const [inline] |
Returns the virtual machine.
| bool el7::scripting::parsing::Parser::is_digit | ( | cl7::char_type | chr | ) | [static] |
| bool el7::scripting::parsing::Parser::is_digitnz | ( | cl7::char_type | chr | ) | [static] |
| bool el7::scripting::parsing::Parser::is_idchr | ( | cl7::char_type | chr | ) | [static] |
| bool el7::scripting::parsing::Parser::is_letter | ( | cl7::char_type | chr | ) | [static] |
| bool el7::scripting::parsing::Parser::is_whitespace | ( | cl7::char_type | chr | ) | [static] |
| bool el7::scripting::parsing::Parser::parse | ( | const cl7::string_type & | script_code, | |
| bool | log_parser_debug_info = false, |
|||
| bool | log_builder_debug_info = false | |||
| ) |
const cl7::char_type el7::scripting::parsing::Parser::CH_CLOSING_CURLY = TEXT('}') [static] |
Closing curly bracket.
const cl7::char_type el7::scripting::parsing::Parser::CH_CLOSING_ROUND = TEXT(')') [static] |
Closing round bracket.
const cl7::char_type el7::scripting::parsing::Parser::CH_CLOSING_SQUARE = TEXT(']') [static] |
Closing square bracket.
const cl7::char_type el7::scripting::parsing::Parser::CH_CR = TEXT('\r') [static] |
Carriage return (0x0d: 13).
const cl7::char_type el7::scripting::parsing::Parser::CH_DOUBLE_QUOTE = TEXT('"') [static] |
Double quote.
const cl7::char_type el7::scripting::parsing::Parser::CH_ESCAPE = TEXT('\\') [static] |
Escape character.
const cl7::char_type el7::scripting::parsing::Parser::CH_FF = TEXT('\f') [static] |
Form feed (0x0c: 12).
const cl7::char_type el7::scripting::parsing::Parser::CH_HT = TEXT('\t') [static] |
Horizontal tab (0x09: 9).
const cl7::char_type el7::scripting::parsing::Parser::CH_LF = TEXT('\n') [static] |
Line feed (0x0a: 10).
const cl7::char_type el7::scripting::parsing::Parser::CH_NUL = TEXT('\0') [static] |
Null character (0x00: 0).
const cl7::char_type el7::scripting::parsing::Parser::CH_OPENING_CURLY = TEXT('{') [static] |
Opening curly bracket.
const cl7::char_type el7::scripting::parsing::Parser::CH_OPENING_ROUND = TEXT('(') [static] |
Opening round bracket.
const cl7::char_type el7::scripting::parsing::Parser::CH_OPENING_SQUARE = TEXT('[') [static] |
Opening square bracket.
const cl7::char_type el7::scripting::parsing::Parser::CH_SINGLE_QUOTE = TEXT('\'') [static] |
Single quote.
const cl7::char_type el7::scripting::parsing::Parser::CH_SPACE = TEXT(' ') [static] |
Space (0x20: 32).
const cl7::char_type el7::scripting::parsing::Parser::CH_VT = TEXT('\v') [static] |
Vertical tab (0x0b: 11).
1.7.1