Files
musrfit/mupp/html/structmupp_1_1PAnnotation.html
T
Gitea Actions b6fac619f9 Deploy site
2026-05-28 07:32:41 +00:00

297 lines
16 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.13.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>mupp: mupp::PAnnotation&lt; Iterator &gt; Struct Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">mupp<span id="projectnumber">&#160;1.1.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.13.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search',false);
$(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacemupp.html">mupp</a></li><li class="navelem"><a class="el" href="structmupp_1_1PAnnotation.html">PAnnotation</a></li> </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structmupp_1_1PAnnotation-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">mupp::PAnnotation&lt; Iterator &gt; Struct Template Reference</div></div>
</div><!--header-->
<div class="contents">
<p>The <a class="el" href="structmupp_1_1PAnnotation.html" title="The PAnnotation struct links AST nodes to source code positions.">PAnnotation</a> struct links AST nodes to source code positions.
<a href="#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="PAnnotation_8hpp_source.html">PAnnotation.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmupp_1_1PAnnotation_1_1set__id.html">set_id</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper struct to set ID tags on AST nodes. <a href="structmupp_1_1PAnnotation_1_1set__id.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aeb5bd0c96cdeebab0bb932ea18c851ab" id="r_aeb5bd0c96cdeebab0bb932ea18c851ab"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aeb5bd0c96cdeebab0bb932ea18c851ab">PAnnotation</a> (std::vector&lt; Iterator &gt; &amp;<a class="el" href="#a3f801326f066355596a9497942aacd93">iters</a>)</td></tr>
<tr class="memdesc:aeb5bd0c96cdeebab0bb932ea18c851ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor that initializes the annotation handler. <br /></td></tr>
<tr class="separator:aeb5bd0c96cdeebab0bb932ea18c851ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a955a4806c3bd285647cc25a861088c5d" id="r_a955a4806c3bd285647cc25a861088c5d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a955a4806c3bd285647cc25a861088c5d">operator()</a> (<a class="el" href="namespacemupp_1_1ast.html#a84c241bb4d0bc750a542ce444d882ebc">ast::operand</a> &amp;ast, Iterator pos) const</td></tr>
<tr class="memdesc:a955a4806c3bd285647cc25a861088c5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Annotates an operand AST node with its source position. <br /></td></tr>
<tr class="separator:a955a4806c3bd285647cc25a861088c5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09a389e29d9db6ae432de65856fa6b57" id="r_a09a389e29d9db6ae432de65856fa6b57"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a09a389e29d9db6ae432de65856fa6b57">operator()</a> (<a class="el" href="structmupp_1_1ast_1_1assignment.html">ast::assignment</a> &amp;ast, Iterator pos) const</td></tr>
<tr class="memdesc:a09a389e29d9db6ae432de65856fa6b57"><td class="mdescLeft">&#160;</td><td class="mdescRight">Annotates an assignment AST node with its source position. <br /></td></tr>
<tr class="separator:a09a389e29d9db6ae432de65856fa6b57"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a3f801326f066355596a9497942aacd93" id="r_a3f801326f066355596a9497942aacd93"><td class="memItemLeft" align="right" valign="top">std::vector&lt; Iterator &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3f801326f066355596a9497942aacd93">iters</a></td></tr>
<tr class="memdesc:a3f801326f066355596a9497942aacd93"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reference to vector storing iterator positions indexed by AST node IDs. <br /></td></tr>
<tr class="separator:a3f801326f066355596a9497942aacd93"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;typename Iterator&gt;<br />
struct mupp::PAnnotation&lt; Iterator &gt;</div><p>The <a class="el" href="structmupp_1_1PAnnotation.html" title="The PAnnotation struct links AST nodes to source code positions.">PAnnotation</a> struct links AST nodes to source code positions. </p>
<p>The annotation handler associates each AST node with its corresponding iterator position in the source code. This mapping enables accurate error reporting during semantic analysis and compilation by allowing the error handler to pinpoint the exact location of errors in the source text.</p>
<p>The annotation is performed after successful parsing but before semantic analysis, integrated with the Spirit X3 parser.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Iterator</td><td>the iterator type for traversing the source code (typically std::string::const_iterator) </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="PAnnotation_8hpp_source.html#l00060">60</a> of file <a class="el" href="PAnnotation_8hpp_source.html">PAnnotation.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="aeb5bd0c96cdeebab0bb932ea18c851ab" name="aeb5bd0c96cdeebab0bb932ea18c851ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeb5bd0c96cdeebab0bb932ea18c851ab">&#9670;&#160;</a></span>PAnnotation()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Iterator&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structmupp_1_1PAnnotation.html">mupp::PAnnotation</a>&lt; Iterator &gt;::PAnnotation </td>
<td>(</td>
<td class="paramtype">std::vector&lt; Iterator &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>iters</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor that initializes the annotation handler. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">iters</td><td>reference to vector that will store iterator positions for each annotated AST node </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="PAnnotation_8hpp_source.html#l00069">69</a> of file <a class="el" href="PAnnotation_8hpp_source.html">PAnnotation.hpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a09a389e29d9db6ae432de65856fa6b57" name="a09a389e29d9db6ae432de65856fa6b57"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a09a389e29d9db6ae432de65856fa6b57">&#9670;&#160;</a></span>operator()() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Iterator&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="structmupp_1_1PAnnotation.html">mupp::PAnnotation</a>&lt; Iterator &gt;::operator() </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structmupp_1_1ast_1_1assignment.html">ast::assignment</a> &amp;</td> <td class="paramname"><span class="paramname"><em>ast</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">Iterator</td> <td class="paramname"><span class="paramname"><em>pos</em></span>&#160;) const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Annotates an assignment AST node with its source position. </p>
<p>Stores the iterator position and assigns a unique ID to the left-hand side variable of the assignment. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ast</td><td>reference to the assignment AST node to annotate </td></tr>
<tr><td class="paramname">pos</td><td>iterator pointing to the assignment's position in the source code </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="PAnnotation_8hpp_source.html#l00153">153</a> of file <a class="el" href="PAnnotation_8hpp_source.html">PAnnotation.hpp</a>.</p>
</div>
</div>
<a id="a955a4806c3bd285647cc25a861088c5d" name="a955a4806c3bd285647cc25a861088c5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a955a4806c3bd285647cc25a861088c5d">&#9670;&#160;</a></span>operator()() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Iterator&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="structmupp_1_1PAnnotation.html">mupp::PAnnotation</a>&lt; Iterator &gt;::operator() </td>
<td>(</td>
<td class="paramtype"><a class="el" href="namespacemupp_1_1ast.html#a84c241bb4d0bc750a542ce444d882ebc">ast::operand</a> &amp;</td> <td class="paramname"><span class="paramname"><em>ast</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">Iterator</td> <td class="paramname"><span class="paramname"><em>pos</em></span>&#160;) const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Annotates an operand AST node with its source position. </p>
<p>Stores the iterator position and assigns a unique ID to the operand node by applying the <a class="el" href="structmupp_1_1PAnnotation_1_1set__id.html" title="Helper struct to set ID tags on AST nodes.">set_id</a> visitor to handle different operand variant types. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ast</td><td>reference to the operand AST node to annotate </td></tr>
<tr><td class="paramname">pos</td><td>iterator pointing to the operand's position in the source code </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="PAnnotation_8hpp_source.html#l00138">138</a> of file <a class="el" href="PAnnotation_8hpp_source.html">PAnnotation.hpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a3f801326f066355596a9497942aacd93" name="a3f801326f066355596a9497942aacd93"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f801326f066355596a9497942aacd93">&#9670;&#160;</a></span>iters</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Iterator&gt; </div>
<table class="memname">
<tr>
<td class="memname">std::vector&lt;Iterator&gt;&amp; <a class="el" href="structmupp_1_1PAnnotation.html">mupp::PAnnotation</a>&lt; Iterator &gt;::iters</td>
</tr>
</table>
</div><div class="memdoc">
<p>Reference to vector storing iterator positions indexed by AST node IDs. </p>
<p class="definition">Definition at line <a class="el" href="PAnnotation_8hpp_source.html#l00063">63</a> of file <a class="el" href="PAnnotation_8hpp_source.html">PAnnotation.hpp</a>.</p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>/workspace/LMU/musrfit/src/musredit_qt6/mupp/var/include/<a class="el" href="PAnnotation_8hpp_source.html">PAnnotation.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2
</small></address>
</div><!-- doc-content -->
</body>
</html>