|
MIXAL
|
#include <parser.h>
Public Member Functions | |
| ParsedResult () | |
| bool | evaluate (const std::unordered_map< std::string, AtomicValue > &constants) |
| bool | evaluated () const |
Public Attributes | |
| ParsedType | parsedType |
| std::string | rawLocation |
| Expression | location |
| std::string | operation |
| std::string | rawAddress |
| Expression | address |
| std::string | rawIndex |
| Expression | index |
| std::string | rawField |
| Expression | field |
| ComputerWord | word |
| std::string | comment |
| friend | Parser |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const ParsedResult &result) |
|
inline |
| bool mixal::ParsedResult::evaluate | ( | const std::unordered_map< std::string, AtomicValue > & | constants | ) |
Evaluate base address, index, and field expressions.
Definition at line 45 of file parser.cpp.
References rawAddress, rawField, and rawIndex.
Referenced by mixal::Computer::executeSingle().
| bool mixal::ParsedResult::evaluated | ( | ) | const |
Whether the instruction has been evaluated.
Definition at line 99 of file parser.cpp.
References address, mixal::Expression::evaluated(), field, index, rawAddress, rawField, and rawIndex.
Referenced by mixal::Computer::executeSingle().
|
friend |
| Expression mixal::ParsedResult::address |
The parsed base address expression.
Definition at line 39 of file parser.h.
Referenced by evaluated(), mixal::Computer::executeSingle(), mixal::operator<<(), and mixal::Parser::parseLine().
| std::string mixal::ParsedResult::comment |
| Expression mixal::ParsedResult::field |
The parsed field expression.
Definition at line 43 of file parser.h.
Referenced by evaluated(), mixal::Computer::executeSingle(), mixal::operator<<(), and mixal::Parser::parseLine().
| Expression mixal::ParsedResult::index |
The parsed index expression.
Definition at line 41 of file parser.h.
Referenced by evaluated(), mixal::Computer::executeSingle(), mixal::operator<<(), and mixal::Parser::parseLine().
| Expression mixal::ParsedResult::location |
| std::string mixal::ParsedResult::operation |
Raw string of the operation name.
Definition at line 37 of file parser.h.
Referenced by mixal::operator<<(), and mixal::Parser::parseLine().
| ParsedType mixal::ParsedResult::parsedType |
Type of the parsed result.
Definition at line 34 of file parser.h.
Referenced by mixal::Computer::executeSingle(), and mixal::Parser::parseLine().
| std::string mixal::ParsedResult::rawAddress |
Raw string of the base address.
Definition at line 38 of file parser.h.
Referenced by evaluate(), evaluated(), mixal::operator<<(), and mixal::Parser::parseLine().
| std::string mixal::ParsedResult::rawField |
Raw string of the field.
Definition at line 42 of file parser.h.
Referenced by evaluate(), evaluated(), mixal::operator<<(), and mixal::Parser::parseLine().
| std::string mixal::ParsedResult::rawIndex |
Raw string of the index.
Definition at line 40 of file parser.h.
Referenced by evaluate(), evaluated(), mixal::operator<<(), and mixal::Parser::parseLine().
| std::string mixal::ParsedResult::rawLocation |
Raw string of the location name.
Definition at line 35 of file parser.h.
Referenced by mixal::operator<<(), and mixal::Parser::parseLine().
| ComputerWord mixal::ParsedResult::word |
The converted computer word that represents the instruction.
Definition at line 44 of file parser.h.
Referenced by mixal::Computer::executeSingle(), mixal::Computer::executeSinglePesudo(), and mixal::Parser::parseLine().