danielsdeleo-teeth 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +11 -0
- data/README.rdoc +107 -10
- data/Rakefile +47 -31
- data/VERSION.yml +4 -0
- data/doc/classes/String.html +182 -0
- data/doc/classes/Teeth/DuplicateDefinitionError.html +113 -0
- data/doc/classes/Teeth/DuplicateRuleError.html +113 -0
- data/doc/classes/Teeth/InvalidDefaultDefinitionName.html +113 -0
- data/doc/classes/Teeth/InvalidExtensionDirectory.html +113 -0
- data/doc/classes/Teeth/RuleStatement.html +291 -0
- data/doc/classes/Teeth/RuleStatementGroup.html +195 -0
- data/doc/classes/Teeth/Scanner.html +535 -0
- data/doc/classes/Teeth/ScannerDefinition.html +253 -0
- data/doc/classes/Teeth/ScannerDefinitionArgumentError.html +113 -0
- data/doc/classes/Teeth/ScannerDefinitionGroup.html +269 -0
- data/doc/classes/Teeth/ScannerError.html +111 -0
- data/doc/classes/Teeth.html +129 -0
- data/doc/created.rid +1 -0
- data/doc/files/README_rdoc.html +314 -0
- data/doc/files/ext/scan_apache_logs/scan_apache_logs_yy_c.html +101 -0
- data/doc/files/ext/scan_rails_logs/scan_rails_logs_yy_c.html +101 -0
- data/doc/files/lib/rule_statement_rb.html +101 -0
- data/doc/files/lib/scanner_definition_rb.html +101 -0
- data/doc/files/lib/scanner_rb.html +108 -0
- data/doc/files/lib/teeth_rb.html +111 -0
- data/doc/fr_class_index.html +39 -0
- data/doc/fr_file_index.html +33 -0
- data/doc/fr_method_index.html +60 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/ext/scan_apache_logs/Makefile +158 -0
- data/ext/scan_apache_logs/extconf.rb +3 -0
- data/ext/scan_apache_logs/scan_apache_logs.yy +267 -0
- data/ext/scan_apache_logs/scan_apache_logs.yy.c +8355 -0
- data/ext/scan_rails_logs/Makefile +158 -0
- data/ext/scan_rails_logs/extconf.rb +3 -0
- data/ext/scan_rails_logs/scan_rails_logs.yy +376 -0
- data/ext/scan_rails_logs/scan_rails_logs.yy.c +11127 -0
- data/lib/rule_statement.rb +61 -0
- data/lib/scanner.rb +98 -0
- data/lib/scanner_definition.rb +116 -0
- data/lib/teeth.rb +5 -1
- data/scanners/scan_apache_logs.rb +27 -0
- data/scanners/scan_rails_logs.rb +70 -0
- data/spec/fixtures/rails_1x.log +59 -0
- data/spec/fixtures/rails_22.log +12 -0
- data/spec/fixtures/rails_22_cached.log +10 -0
- data/spec/fixtures/rails_unordered.log +24 -0
- data/spec/playground/show_apache_processing.rb +13 -0
- data/spec/spec_helper.rb +6 -1
- data/spec/unit/rule_statement_spec.rb +60 -0
- data/spec/unit/{tokenize_apache_spec.rb → scan_apache_spec.rb} +16 -11
- data/spec/unit/scan_rails_logs_spec.rb +90 -0
- data/spec/unit/scaner_definition_spec.rb +65 -0
- data/spec/unit/scanner_spec.rb +109 -0
- data/teeth.gemspec +31 -0
- data/templates/tokenizer.yy.erb +168 -0
- metadata +60 -15
- data/ext/extconf.rb +0 -4
- data/ext/tokenize_apache_logs.yy +0 -215
- data/ext/tokenize_apache_logs.yy.c +0 -12067
@@ -0,0 +1,113 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Teeth::InvalidDefaultDefinitionName</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Teeth::InvalidDefaultDefinitionName</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/scanner_definition_rb.html">
|
59
|
+
lib/scanner_definition.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
<a href="ScannerError.html">
|
69
|
+
ScannerError
|
70
|
+
</a>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
|
88
|
+
</div>
|
89
|
+
|
90
|
+
|
91
|
+
<!-- if includes -->
|
92
|
+
|
93
|
+
<div id="section">
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
<!-- if method_list -->
|
103
|
+
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
|
108
|
+
<div id="validator-badges">
|
109
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
110
|
+
</div>
|
111
|
+
|
112
|
+
</body>
|
113
|
+
</html>
|
@@ -0,0 +1,113 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Teeth::InvalidExtensionDirectory</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Teeth::InvalidExtensionDirectory</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/scanner_rb.html">
|
59
|
+
lib/scanner.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
<a href="ScannerError.html">
|
69
|
+
ScannerError
|
70
|
+
</a>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
|
88
|
+
</div>
|
89
|
+
|
90
|
+
|
91
|
+
<!-- if includes -->
|
92
|
+
|
93
|
+
<div id="section">
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
<!-- if method_list -->
|
103
|
+
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
|
108
|
+
<div id="validator-badges">
|
109
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
110
|
+
</div>
|
111
|
+
|
112
|
+
</body>
|
113
|
+
</html>
|
@@ -0,0 +1,291 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Teeth::RuleStatement</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Teeth::RuleStatement</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/rule_statement_rb.html">
|
59
|
+
lib/rule_statement.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div id="method-list">
|
86
|
+
<h3 class="section-bar">Methods</h3>
|
87
|
+
|
88
|
+
<div class="name-list">
|
89
|
+
<a href="#M000027">==</a>
|
90
|
+
<a href="#M000029">function_body</a>
|
91
|
+
<a href="#M000026">new</a>
|
92
|
+
<a href="#M000028">scanner_code</a>
|
93
|
+
<a href="#M000030">yytext_statement</a>
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
|
97
|
+
</div>
|
98
|
+
|
99
|
+
|
100
|
+
<!-- if includes -->
|
101
|
+
|
102
|
+
<div id="section">
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
<div id="attribute-list">
|
109
|
+
<h3 class="section-bar">Attributes</h3>
|
110
|
+
|
111
|
+
<div class="name-list">
|
112
|
+
<table>
|
113
|
+
<tr class="top-aligned-row context-row">
|
114
|
+
<td class="context-item-name">begin</td>
|
115
|
+
<td class="context-item-value"> [R] </td>
|
116
|
+
<td class="context-item-desc"></td>
|
117
|
+
</tr>
|
118
|
+
<tr class="top-aligned-row context-row">
|
119
|
+
<td class="context-item-name">name</td>
|
120
|
+
<td class="context-item-value"> [R] </td>
|
121
|
+
<td class="context-item-desc"></td>
|
122
|
+
</tr>
|
123
|
+
<tr class="top-aligned-row context-row">
|
124
|
+
<td class="context-item-name">regex</td>
|
125
|
+
<td class="context-item-value"> [R] </td>
|
126
|
+
<td class="context-item-desc"></td>
|
127
|
+
</tr>
|
128
|
+
<tr class="top-aligned-row context-row">
|
129
|
+
<td class="context-item-name">skip_line</td>
|
130
|
+
<td class="context-item-value"> [R] </td>
|
131
|
+
<td class="context-item-desc"></td>
|
132
|
+
</tr>
|
133
|
+
<tr class="top-aligned-row context-row">
|
134
|
+
<td class="context-item-name">strip_ends</td>
|
135
|
+
<td class="context-item-value"> [R] </td>
|
136
|
+
<td class="context-item-desc"></td>
|
137
|
+
</tr>
|
138
|
+
</table>
|
139
|
+
</div>
|
140
|
+
</div>
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
<!-- if method_list -->
|
145
|
+
<div id="methods">
|
146
|
+
<h3 class="section-bar">Public Class methods</h3>
|
147
|
+
|
148
|
+
<div id="method-M000026" class="method-detail">
|
149
|
+
<a name="M000026"></a>
|
150
|
+
|
151
|
+
<div class="method-heading">
|
152
|
+
<a href="#M000026" class="method-signature">
|
153
|
+
<span class="method-name">new</span><span class="method-args">(name, regex, options={})</span>
|
154
|
+
</a>
|
155
|
+
</div>
|
156
|
+
|
157
|
+
<div class="method-description">
|
158
|
+
<p><a class="source-toggle" href="#"
|
159
|
+
onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
|
160
|
+
<div class="method-source-code" id="M000026-source">
|
161
|
+
<pre>
|
162
|
+
<span class="ruby-comment cmt"># File lib/rule_statement.rb, line 9</span>
|
163
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">regex</span>, <span class="ruby-identifier">options</span>={})
|
164
|
+
<span class="ruby-ivar">@name</span>, <span class="ruby-ivar">@regex</span> = <span class="ruby-identifier">name</span>, <span class="ruby-identifier">regex</span>
|
165
|
+
<span class="ruby-ivar">@strip_ends</span>, <span class="ruby-ivar">@skip_line</span>, <span class="ruby-ivar">@begin</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:strip_ends</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:skip_line</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:begin</span>]
|
166
|
+
<span class="ruby-ivar">@ignore</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:ignore</span>]
|
167
|
+
<span class="ruby-keyword kw">end</span>
|
168
|
+
</pre>
|
169
|
+
</div>
|
170
|
+
</div>
|
171
|
+
</div>
|
172
|
+
|
173
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
174
|
+
|
175
|
+
<div id="method-M000027" class="method-detail">
|
176
|
+
<a name="M000027"></a>
|
177
|
+
|
178
|
+
<div class="method-heading">
|
179
|
+
<a href="#M000027" class="method-signature">
|
180
|
+
<span class="method-name">==</span><span class="method-args">(other)</span>
|
181
|
+
</a>
|
182
|
+
</div>
|
183
|
+
|
184
|
+
<div class="method-description">
|
185
|
+
<p><a class="source-toggle" href="#"
|
186
|
+
onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
|
187
|
+
<div class="method-source-code" id="M000027-source">
|
188
|
+
<pre>
|
189
|
+
<span class="ruby-comment cmt"># File lib/rule_statement.rb, line 15</span>
|
190
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">other</span>)
|
191
|
+
<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">RuleStatement</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">regex</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">regex</span>
|
192
|
+
<span class="ruby-keyword kw">end</span>
|
193
|
+
</pre>
|
194
|
+
</div>
|
195
|
+
</div>
|
196
|
+
</div>
|
197
|
+
|
198
|
+
<div id="method-M000029" class="method-detail">
|
199
|
+
<a name="M000029"></a>
|
200
|
+
|
201
|
+
<div class="method-heading">
|
202
|
+
<a href="#M000029" class="method-signature">
|
203
|
+
<span class="method-name">function_body</span><span class="method-args">()</span>
|
204
|
+
</a>
|
205
|
+
</div>
|
206
|
+
|
207
|
+
<div class="method-description">
|
208
|
+
<p><a class="source-toggle" href="#"
|
209
|
+
onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
|
210
|
+
<div class="method-source-code" id="M000029-source">
|
211
|
+
<pre>
|
212
|
+
<span class="ruby-comment cmt"># File lib/rule_statement.rb, line 27</span>
|
213
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">function_body</span>
|
214
|
+
<span class="ruby-identifier">code</span> = <span class="ruby-value str">""</span>
|
215
|
+
<span class="ruby-identifier">code</span> <span class="ruby-operator">+=</span> <span class="ruby-node">" BEGIN(#{@begin});\n"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@begin</span>
|
216
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">skip_line</span>
|
217
|
+
<span class="ruby-identifier">code</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">" return EOF_KVPAIR;\n"</span>
|
218
|
+
<span class="ruby-keyword kw">else</span>
|
219
|
+
<span class="ruby-identifier">code</span> <span class="ruby-operator">+=</span> <span class="ruby-node">" KVPAIR #{name.to_s} = {\"#{name.to_s}\", #{yytext_statement}};\n"</span> <span class="ruby-operator">+</span>
|
220
|
+
<span class="ruby-node">" return #{name.to_s};\n"</span>
|
221
|
+
<span class="ruby-keyword kw">end</span>
|
222
|
+
<span class="ruby-identifier">code</span>
|
223
|
+
<span class="ruby-keyword kw">end</span>
|
224
|
+
</pre>
|
225
|
+
</div>
|
226
|
+
</div>
|
227
|
+
</div>
|
228
|
+
|
229
|
+
<div id="method-M000028" class="method-detail">
|
230
|
+
<a name="M000028"></a>
|
231
|
+
|
232
|
+
<div class="method-heading">
|
233
|
+
<a href="#M000028" class="method-signature">
|
234
|
+
<span class="method-name">scanner_code</span><span class="method-args">()</span>
|
235
|
+
</a>
|
236
|
+
</div>
|
237
|
+
|
238
|
+
<div class="method-description">
|
239
|
+
<p><a class="source-toggle" href="#"
|
240
|
+
onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
|
241
|
+
<div class="method-source-code" id="M000028-source">
|
242
|
+
<pre>
|
243
|
+
<span class="ruby-comment cmt"># File lib/rule_statement.rb, line 19</span>
|
244
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scanner_code</span>
|
245
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@ignore</span>
|
246
|
+
<span class="ruby-identifier">regex</span>
|
247
|
+
<span class="ruby-keyword kw">else</span>
|
248
|
+
<span class="ruby-node">"#{regex} {\n"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">function_body</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"}"</span>
|
249
|
+
<span class="ruby-keyword kw">end</span>
|
250
|
+
<span class="ruby-keyword kw">end</span>
|
251
|
+
</pre>
|
252
|
+
</div>
|
253
|
+
</div>
|
254
|
+
</div>
|
255
|
+
|
256
|
+
<div id="method-M000030" class="method-detail">
|
257
|
+
<a name="M000030"></a>
|
258
|
+
|
259
|
+
<div class="method-heading">
|
260
|
+
<a href="#M000030" class="method-signature">
|
261
|
+
<span class="method-name">yytext_statement</span><span class="method-args">()</span>
|
262
|
+
</a>
|
263
|
+
</div>
|
264
|
+
|
265
|
+
<div class="method-description">
|
266
|
+
<p><a class="source-toggle" href="#"
|
267
|
+
onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
|
268
|
+
<div class="method-source-code" id="M000030-source">
|
269
|
+
<pre>
|
270
|
+
<span class="ruby-comment cmt"># File lib/rule_statement.rb, line 39</span>
|
271
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">yytext_statement</span>
|
272
|
+
<span class="ruby-identifier">strip_ends</span> <span class="ruby-value">? </span><span class="ruby-value str">"strip_ends(yytext)"</span> <span class="ruby-operator">:</span> <span class="ruby-value str">"yytext"</span>
|
273
|
+
<span class="ruby-keyword kw">end</span>
|
274
|
+
</pre>
|
275
|
+
</div>
|
276
|
+
</div>
|
277
|
+
</div>
|
278
|
+
|
279
|
+
|
280
|
+
</div>
|
281
|
+
|
282
|
+
|
283
|
+
</div>
|
284
|
+
|
285
|
+
|
286
|
+
<div id="validator-badges">
|
287
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
288
|
+
</div>
|
289
|
+
|
290
|
+
</body>
|
291
|
+
</html>
|