OpenASIP  2.0
Public Member Functions | Public Attributes | List of all members
ParserGuard Class Reference

#include <ParserStructs.hh>

Collaboration diagram for ParserGuard:
Collaboration graph

Public Member Functions

std::string toString () const
 

Public Attributes

bool isGuarded
 Is guard used. More...
 
bool isInverted
 Is guard inverted. More...
 
RegisterTerm regTerm
 Guard port or register. More...
 

Detailed Description

Guard field of parsed move.

Definition at line 305 of file ParserStructs.hh.

Member Function Documentation

◆ toString()

std::string ParserGuard::toString ( ) const
inline

String representation of term for error message generation.

Definition at line 317 of file ParserStructs.hh.

317  {
318  std::stringstream retVal;
319  if (isGuarded) {
320  if (isInverted) {
321  retVal << '!';
322  } else {
323  retVal << '?';
324  }
325 
326  retVal << regTerm.toString();
327  }
328  return retVal.str();
329  }

References isGuarded, isInverted, regTerm, and RegisterTerm::toString().

Referenced by ParserMove::toString().

Here is the call graph for this function:

Member Data Documentation

◆ isGuarded

bool ParserGuard::isGuarded

Is guard used.

Definition at line 308 of file ParserStructs.hh.

Referenced by CodeSectionCreator::addMove(), and toString().

◆ isInverted

bool ParserGuard::isInverted

Is guard inverted.

Definition at line 310 of file ParserStructs.hh.

Referenced by CodeSectionCreator::addMove(), and toString().

◆ regTerm

RegisterTerm ParserGuard::regTerm

Guard port or register.

Definition at line 312 of file ParserStructs.hh.

Referenced by CodeSectionCreator::addMove(), and toString().


The documentation for this class was generated from the following file:
ParserGuard::isGuarded
bool isGuarded
Is guard used.
Definition: ParserStructs.hh:308
ParserGuard::regTerm
RegisterTerm regTerm
Guard port or register.
Definition: ParserStructs.hh:312
ParserGuard::isInverted
bool isInverted
Is guard inverted.
Definition: ParserStructs.hh:310
RegisterTerm::toString
std::string toString() const
Definition: ParserStructs.hh:161