OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
DataLine Class Reference

#include <ParserStructs.hh>

Collaboration diagram for DataLine:
Collaboration graph

Public Member Functions

std::string toString () const
 

Public Attributes

UValue width
 Number of MAUs initialized by this data line.
 
std::string dataSpace
 Address space whose MAUs are initialized.
 
std::vector< InitDataFieldinitData
 Init data fields of data line. Uninitilized data line, if empty.
 
std::vector< std::string > labels
 Labels of this data line.
 
UValue asmLineNumber
 Line number where in source code this DA line is found.
 

Detailed Description

Parsed data area definition.

Definition at line 477 of file ParserStructs.hh.

Member Function Documentation

◆ toString()

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

String representation of term for error message generation.

Definition at line 495 of file ParserStructs.hh.

495 {
496
497 std::stringstream retVal;
498
499 retVal << "DataLine:\n"
500 << "address space:\t" << dataSpace << std::endl
501 << "data maus: \t" << width << std::endl;
502
503 retVal << "Labels:" << std::endl;
504 for (unsigned int i = 0; i < labels.size(); i++) {
505 retVal << "\t" << labels[i] << std::endl;
506 }
507
508 retVal << "Init data:" << std::endl;
509 for (unsigned int i = 0; i < initData.size(); i++) {
510 retVal << (int)initData[i].width << ":";
511
512 if (initData[i].litOrExpr.isExpression) {
513 retVal << initData[i].litOrExpr.expression.label;
514 } else {
515 retVal << (int)initData[i].litOrExpr.value;
516 }
517
518 retVal << "\t";
519
520 if ((i+1)%16 == 0) retVal << std::endl;
521 }
522
523 retVal << "\n";
524
525 return retVal.str();
526 }
UValue width
Number of MAUs initialized by this data line.
std::vector< InitDataField > initData
Init data fields of data line. Uninitilized data line, if empty.
std::vector< std::string > labels
Labels of this data line.
std::string dataSpace
Address space whose MAUs are initialized.

References dataSpace, initData, labels, and width.

Member Data Documentation

◆ asmLineNumber

UValue DataLine::asmLineNumber

◆ dataSpace

std::string DataLine::dataSpace

Address space whose MAUs are initialized.

Definition at line 482 of file ParserStructs.hh.

Referenced by DataSectionCreator::addDataLine(), AssemblerParser::definition< ScannerT >::definition(), and toString().

◆ initData

std::vector<InitDataField> DataLine::initData

Init data fields of data line. Uninitilized data line, if empty.

Definition at line 485 of file ParserStructs.hh.

Referenced by DataSectionCreator::addDataLine(), AssemblerParser::definition< ScannerT >::definition(), toString(), and DataSectionCreator::writeDataLineToTPEF().

◆ labels

std::vector<std::string> DataLine::labels

◆ width

UValue DataLine::width

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