-
Notifications
You must be signed in to change notification settings - Fork 0
/
AstMatching_8h_source.html
138 lines (138 loc) · 15.6 KB
/
AstMatching_8h_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!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.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ROSE: AstMatching.h Source File</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>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link rel="search" href="search_opensearch.php?v=opensearch.xml" type="application/opensearchdescription+xml" title="ROSE"/>
<link href="roseDoxygen.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">ROSE<span id="projectnumber"> 0.11.145.141</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @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&dn=expat.txt MIT */
$(function() {
initMenu('',true,true,'search.html','Search');
$(document).ready(function() {
if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }
});
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_ab44dd72236d16e0efa23643a9299efc.html">midend</a></li><li class="navelem"><a class="el" href="dir_f97945922108dbd4da6116e864e045ab.html">astMatching</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">AstMatching.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef AST_MATCHING_H</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define AST_MATCHING_H</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">/*************************************************************</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment"> * Author : Markus Schordan *</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment"> *************************************************************/</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> </div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include "matcherparser_decls.h"</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include "MatchOperation.h"</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include "RoseAst.h"</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#include <list></span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#include <set></span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">class </span><a class="code hl_class" href="classSgNode.html">SgNode</a>;</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="keyword">class </span><a class="code hl_class" href="classMatchOperation.html">MatchOperation</a>;</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">/* update documentation:</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment"> make doxygen_docs -C build_tree/docs/Rose</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment"> webbrowser build_tree/docs/Rose/ROSE_WebPages/ROSE_HTML_Reference/classAstMatching.html</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">*/</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="foldopen" id="foldopen00187" data-start="{" data-end="};">
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"><a class="line" href="classAstMatching.html"> 187</a></span><span class="keyword">class </span><a class="code hl_class" href="classAstMatching.html">AstMatching</a> {</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <a class="code hl_class" href="classAstMatching.html">AstMatching</a>();</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <a class="code hl_class" href="classAstMatching.html">~AstMatching</a>();</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> </div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"><a class="line" href="classAstMatching.html#a62ae5f7b9cb3753f0fa86da65f8d8894"> 193</a></span> MatchResult <a class="code hl_function" href="classAstMatching.html#a62ae5f7b9cb3753f0fa86da65f8d8894">performMatching</a>(std::string matchExpression, <a class="code hl_class" href="classSgNode.html">SgNode</a>* root);</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> </div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"><a class="line" href="classAstMatching.html#a5199a1b3c979dffc63877e26d3f17916"> 196</a></span> <a class="code hl_function" href="classAstMatching.html#a5199a1b3c979dffc63877e26d3f17916">AstMatching</a>(std::string matchExpression,<a class="code hl_class" href="classSgNode.html">SgNode</a>* root);</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> </div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"><a class="line" href="classAstMatching.html#a805d9e2b097f7b1106c4541330f06a64"> 199</a></span> MatchResult <a class="code hl_function" href="classAstMatching.html#a805d9e2b097f7b1106c4541330f06a64">getResult</a>();</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> </div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"><a class="line" href="classAstMatching.html#a0b62ec3b8ba7e8adef83aa9c4c61d985"> 204</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classAstMatching.html#a0b62ec3b8ba7e8adef83aa9c4c61d985">printMatchOperationsSequence</a>();</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> </div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"><a class="line" href="classAstMatching.html#a7659389f560af0eff9eef46a1e644221"> 211</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classAstMatching.html#a7659389f560af0eff9eef46a1e644221">setKeepMarkedLocations</a>(<span class="keywordtype">bool</span> keepMarked);</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> </div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"><a class="line" href="classAstMatching.html#a2a392b74f99f9dbdb8c95616036250c6"> 216</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classAstMatching.html#a2a392b74f99f9dbdb8c95616036250c6">printMarkedLocations</a>();</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> </div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> <span class="keywordtype">bool</span> performSingleMatch(<a class="code hl_class" href="classSgNode.html">SgNode</a>* node, <a class="code hl_class" href="classMatchOpSequence.html">MatchOperationList</a>* matchOperationSequence);</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> <span class="keywordtype">void</span> performMatchingOnAst(<a class="code hl_class" href="classSgNode.html">SgNode</a>* root);</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classAstMatching.html#a62ae5f7b9cb3753f0fa86da65f8d8894">performMatching</a>();</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> <span class="keywordtype">void</span> generateMatchOperationsSequence();</div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> </div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> std::string _matchExpression;</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> <a class="code hl_class" href="classSgNode.html">SgNode</a>* _root;</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> <a class="code hl_class" href="classMatchOpSequence.html">MatchOperationList</a>* _matchOperationsSequence;</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> <a class="code hl_class" href="classMatchStatus.html">MatchStatus</a> _status;</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="keywordtype">bool</span> _keepMarkedLocations;</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span>};</div>
</div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> </div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclassAstMatching_html"><div class="ttname"><a href="classAstMatching.html">AstMatching</a></div><div class="ttdoc">The AstMatching class allows to specify arbitrary large patterns to be matched on any subtree in the ...</div><div class="ttdef"><b>Definition</b> <a href="AstMatching_8h_source.html#l00187">AstMatching.h:187</a></div></div>
<div class="ttc" id="aclassAstMatching_html_a0b62ec3b8ba7e8adef83aa9c4c61d985"><div class="ttname"><a href="classAstMatching.html#a0b62ec3b8ba7e8adef83aa9c4c61d985">AstMatching::printMatchOperationsSequence</a></div><div class="ttdeci">void printMatchOperationsSequence()</div><div class="ttdoc">This function is only for information purposes.</div></div>
<div class="ttc" id="aclassAstMatching_html_a2a392b74f99f9dbdb8c95616036250c6"><div class="ttname"><a href="classAstMatching.html#a2a392b74f99f9dbdb8c95616036250c6">AstMatching::printMarkedLocations</a></div><div class="ttdeci">void printMarkedLocations()</div><div class="ttdoc">This function is only for information purposes.</div></div>
<div class="ttc" id="aclassAstMatching_html_a5199a1b3c979dffc63877e26d3f17916"><div class="ttname"><a href="classAstMatching.html#a5199a1b3c979dffc63877e26d3f17916">AstMatching::AstMatching</a></div><div class="ttdeci">AstMatching(std::string matchExpression, SgNode *root)</div><div class="ttdoc">Constructor as a all-in-one solution.</div></div>
<div class="ttc" id="aclassAstMatching_html_a62ae5f7b9cb3753f0fa86da65f8d8894"><div class="ttname"><a href="classAstMatching.html#a62ae5f7b9cb3753f0fa86da65f8d8894">AstMatching::performMatching</a></div><div class="ttdeci">MatchResult performMatching(std::string matchExpression, SgNode *root)</div><div class="ttdoc">This is the main function to be called for matching.</div></div>
<div class="ttc" id="aclassAstMatching_html_a7659389f560af0eff9eef46a1e644221"><div class="ttname"><a href="classAstMatching.html#a7659389f560af0eff9eef46a1e644221">AstMatching::setKeepMarkedLocations</a></div><div class="ttdeci">void setKeepMarkedLocations(bool keepMarked)</div><div class="ttdoc">This flag is useful when reusing the same matcher object for performing multiple matches.</div></div>
<div class="ttc" id="aclassAstMatching_html_a805d9e2b097f7b1106c4541330f06a64"><div class="ttname"><a href="classAstMatching.html#a805d9e2b097f7b1106c4541330f06a64">AstMatching::getResult</a></div><div class="ttdeci">MatchResult getResult()</div><div class="ttdoc">Allows to access the match result if the match expression was provided as an argument to the construc...</div></div>
<div class="ttc" id="aclassMatchOpSequence_html"><div class="ttname"><a href="classMatchOpSequence.html">MatchOpSequence</a></div><div class="ttdef"><b>Definition</b> <a href="MatchOperation_8h_source.html#l00073">MatchOperation.h:73</a></div></div>
<div class="ttc" id="aclassMatchOperation_html"><div class="ttname"><a href="classMatchOperation.html">MatchOperation</a></div><div class="ttdef"><b>Definition</b> <a href="MatchOperation_8h_source.html#l00067">MatchOperation.h:67</a></div></div>
<div class="ttc" id="aclassMatchStatus_html"><div class="ttname"><a href="classMatchStatus.html">MatchStatus</a></div><div class="ttdef"><b>Definition</b> <a href="MatchOperation_8h_source.html#l00031">MatchOperation.h:31</a></div></div>
<div class="ttc" id="aclassSgNode_html"><div class="ttname"><a href="classSgNode.html">SgNode</a></div><div class="ttdoc">This class represents the base class for all IR nodes within Sage III.</div><div class="ttdef"><b>Definition</b> <a href="Cxx__Grammar_8h_source.html#l00119">Cxx_Grammar.h:120</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Oct 2 2024 00:08:22 for ROSE by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>