kwartz 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. data/ChangeLog +36 -1
  2. data/LGPL +504 -0
  3. data/README.txt +16 -2
  4. data/bin/kwartz +1 -1
  5. data/doc-api/classes/Kwartz.html +47 -1
  6. data/doc-api/classes/Kwartz/Assertion.html +6 -6
  7. data/doc-api/classes/Kwartz/AssertionError.html +6 -6
  8. data/doc-api/classes/Kwartz/AttrInfo.html +42 -42
  9. data/doc-api/classes/Kwartz/BaseError.html +12 -12
  10. data/doc-api/classes/Kwartz/BaseTranslator.html +210 -43
  11. data/doc-api/classes/Kwartz/CharacterType.html +24 -24
  12. data/doc-api/classes/Kwartz/CommandOptionError.html +7 -7
  13. data/doc-api/classes/Kwartz/CommandOptions.html +49 -49
  14. data/doc-api/classes/Kwartz/Config.html +6 -1
  15. data/doc-api/classes/Kwartz/ConvertError.html +14 -14
  16. data/doc-api/classes/Kwartz/Converter.html +31 -30
  17. data/doc-api/classes/Kwartz/CssStyleParser.html +79 -57
  18. data/doc-api/classes/Kwartz/Defun.html +313 -0
  19. data/doc-api/classes/Kwartz/DocumentRuleset.html +58 -58
  20. data/doc-api/classes/Kwartz/ElementExpander.html +32 -32
  21. data/doc-api/classes/Kwartz/ElementInfo.html +29 -29
  22. data/doc-api/classes/Kwartz/ElementRuleset.html +126 -96
  23. data/doc-api/classes/Kwartz/EperlHandler.html +108 -84
  24. data/doc-api/classes/Kwartz/EperlTranslator.html +7 -7
  25. data/doc-api/classes/Kwartz/ErubisHandler.html +2 -2
  26. data/doc-api/classes/Kwartz/ErubisTranslator.html +8 -8
  27. data/doc-api/classes/Kwartz/ErubyHandler.html +2 -220
  28. data/doc-api/classes/Kwartz/ErubyTranslator.html +7 -7
  29. data/doc-api/classes/Kwartz/ExpandStatement.html +20 -20
  30. data/doc-api/classes/Kwartz/Handler.html +122 -117
  31. data/doc-api/classes/Kwartz/HandlerArgument.html +215 -0
  32. data/doc-api/classes/Kwartz/Helper.html +112 -0
  33. data/doc-api/classes/Kwartz/Helper/ActionViewHelper.html +221 -0
  34. data/doc-api/classes/Kwartz/Helper/RailsTemplate.html +630 -0
  35. data/doc-api/classes/Kwartz/JstlHandler.html +208 -193
  36. data/doc-api/classes/Kwartz/JstlTranslator.html +15 -15
  37. data/doc-api/classes/Kwartz/KwartzError.html +6 -6
  38. data/doc-api/classes/Kwartz/Main.html +39 -23
  39. data/doc-api/classes/Kwartz/NativeExpression.html +18 -18
  40. data/doc-api/classes/Kwartz/NativeStatement.html +25 -25
  41. data/doc-api/classes/Kwartz/Node.html +6 -6
  42. data/doc-api/classes/Kwartz/PIErubisHandler.html +113 -0
  43. data/doc-api/classes/Kwartz/PIErubisTranslator.html +200 -0
  44. data/doc-api/classes/Kwartz/ParseError.html +6 -6
  45. data/doc-api/classes/Kwartz/PhpHandler.html +102 -83
  46. data/doc-api/classes/Kwartz/PhpTranslator.html +14 -14
  47. data/doc-api/classes/Kwartz/PresentationLogicParser.html +136 -128
  48. data/doc-api/classes/Kwartz/PrintStatement.html +19 -19
  49. data/doc-api/classes/Kwartz/RailsHandler.html +121 -118
  50. data/doc-api/classes/Kwartz/RailsTranslator.html +7 -7
  51. data/doc-api/classes/Kwartz/RubyHandler.html +349 -0
  52. data/doc-api/classes/Kwartz/RubyStyleParser.html +85 -85
  53. data/doc-api/classes/Kwartz/RubyTranslator.html +218 -0
  54. data/doc-api/classes/Kwartz/StatementHelper.html +479 -0
  55. data/doc-api/classes/Kwartz/StrutsTranslator.html +12 -12
  56. data/doc-api/classes/Kwartz/TagInfo.html +28 -28
  57. data/doc-api/classes/Kwartz/TextConverter.html +28 -28
  58. data/doc-api/classes/Kwartz/Translator.html +42 -42
  59. data/doc-api/classes/Kwartz/Util.html +284 -0
  60. data/doc-api/created.rid +1 -1
  61. data/doc-api/files/__/README_txt.html +30 -3
  62. data/doc-api/files/kwartz/assert_rb.html +1 -1
  63. data/doc-api/files/kwartz/binding/eperl_rb.html +2 -2
  64. data/doc-api/files/kwartz/binding/erubis_rb.html +3 -3
  65. data/doc-api/files/kwartz/binding/eruby_rb.html +3 -2
  66. data/doc-api/files/kwartz/binding/jstl_rb.html +2 -2
  67. data/doc-api/files/kwartz/binding/php_rb.html +2 -2
  68. data/doc-api/files/kwartz/binding/pierubis_rb.html +116 -0
  69. data/doc-api/files/kwartz/binding/rails_rb.html +2 -2
  70. data/doc-api/files/kwartz/binding/ruby_rb.html +115 -0
  71. data/doc-api/files/kwartz/binding/struts_rb.html +1 -1
  72. data/doc-api/files/kwartz/config_rb.html +2 -2
  73. data/doc-api/files/kwartz/converter_rb.html +3 -2
  74. data/doc-api/files/kwartz/defun_rb.html +116 -0
  75. data/doc-api/files/kwartz/error_rb.html +1 -1
  76. data/doc-api/files/kwartz/helper/rails_rb.html +123 -0
  77. data/doc-api/files/kwartz/main_rb.html +5 -2
  78. data/doc-api/files/kwartz/node_rb.html +2 -2
  79. data/doc-api/files/kwartz/parser_rb.html +2 -2
  80. data/doc-api/files/kwartz/translator_rb.html +2 -2
  81. data/doc-api/files/kwartz/util/assert-text-equal_rb.html +1 -1
  82. data/doc-api/files/kwartz/util/testcase-helper_rb.html +2 -2
  83. data/doc-api/files/kwartz/util_rb.html +107 -0
  84. data/doc-api/files/kwartz_rb.html +3 -2
  85. data/doc-api/fr_class_index.html +11 -0
  86. data/doc-api/fr_file_index.html +5 -0
  87. data/doc-api/fr_method_index.html +242 -190
  88. data/doc/p-pattern.html +94 -94
  89. data/doc/reference.html +847 -612
  90. data/doc/users-guide.html +744 -241
  91. data/examples/rails1/README +2 -2
  92. data/examples/rails1/application_helper.rb +2 -27
  93. data/examples/rails1/link_to.plogic +5 -5
  94. data/examples/rails1/list.plogic +2 -2
  95. data/examples/rails2/app/controllers/application.rb +14 -0
  96. data/examples/rails2/app/controllers/groups_controller.rb +47 -0
  97. data/examples/rails2/app/controllers/members_controller.rb +56 -0
  98. data/examples/rails2/app/helpers/application_helper.rb +6 -0
  99. data/examples/rails2/app/helpers/groups_helper.rb +2 -0
  100. data/examples/rails2/app/helpers/members_helper.rb +2 -0
  101. data/examples/rails2/app/models/group.rb +2 -0
  102. data/examples/rails2/app/models/member.rb +3 -0
  103. data/examples/rails2/app/views/groups/_form.html +30 -0
  104. data/examples/rails2/app/views/groups/_form.plogic +11 -0
  105. data/examples/rails2/app/views/groups/_link.plogic +19 -0
  106. data/examples/rails2/app/views/groups/_read.plogic +7 -0
  107. data/examples/rails2/app/views/groups/edit.cfg.yaml +2 -0
  108. data/examples/rails2/app/views/groups/edit.html +26 -0
  109. data/examples/rails2/app/views/groups/edit.plogic +9 -0
  110. data/examples/rails2/app/views/groups/list.html +48 -0
  111. data/examples/rails2/app/views/groups/list.plogic +32 -0
  112. data/examples/rails2/app/views/groups/new.cfg.yaml +2 -0
  113. data/examples/rails2/app/views/groups/new.html +27 -0
  114. data/examples/rails2/app/views/groups/new.plogic +9 -0
  115. data/examples/rails2/app/views/groups/show.html +27 -0
  116. data/examples/rails2/app/views/groups/show.plogic +2 -0
  117. data/examples/rails2/app/views/layouts/groups.html +23 -0
  118. data/examples/rails2/app/views/layouts/groups.plogic +11 -0
  119. data/examples/rails2/app/views/layouts/members.html +23 -0
  120. data/examples/rails2/app/views/layouts/members.plogic +11 -0
  121. data/examples/rails2/app/views/layouts/members2.html +24 -0
  122. data/examples/rails2/app/views/layouts/members2.plogic +11 -0
  123. data/examples/rails2/app/views/members/_form.plogic +27 -0
  124. data/examples/rails2/app/views/members/_link.plogic +19 -0
  125. data/examples/rails2/app/views/members/_read.plogic +29 -0
  126. data/examples/rails2/app/views/members/edit.cfg.yaml +6 -0
  127. data/examples/rails2/app/views/members/edit.html +27 -0
  128. data/examples/rails2/app/views/members/edit.plogic +10 -0
  129. data/examples/rails2/app/views/members/list.html +53 -0
  130. data/examples/rails2/app/views/members/list.plogic +32 -0
  131. data/examples/rails2/app/views/members/new.html +61 -0
  132. data/examples/rails2/app/views/members/new.plogic +17 -0
  133. data/examples/rails2/app/views/members/show.html +41 -0
  134. data/examples/rails2/app/views/members/show.plogic +3 -0
  135. data/examples/rails2/db/create-tables.mysql.sql +27 -0
  136. data/examples/rails2/db/create-tables.pgsql.sql +27 -0
  137. data/examples/rails2/db/insert-data.sql +21 -0
  138. data/examples/rails2/db/tabledef.yaml +51 -0
  139. data/kwartz.gemspec +4 -4
  140. data/lib/kwartz.rb +10 -2
  141. data/lib/kwartz/assert.rb +1 -1
  142. data/lib/kwartz/binding/eperl.rb +85 -61
  143. data/lib/kwartz/binding/erubis.rb +6 -8
  144. data/lib/kwartz/binding/eruby.rb +5 -120
  145. data/lib/kwartz/binding/jstl.rb +116 -101
  146. data/lib/kwartz/binding/php.rb +79 -60
  147. data/lib/kwartz/binding/pierubis.rb +58 -0
  148. data/lib/kwartz/binding/rails.rb +45 -42
  149. data/lib/kwartz/binding/ruby.rb +193 -0
  150. data/lib/kwartz/binding/struts.rb +1 -1
  151. data/lib/kwartz/config.rb +4 -3
  152. data/lib/kwartz/converter.rb +231 -68
  153. data/lib/kwartz/defun.rb +126 -0
  154. data/lib/kwartz/error.rb +1 -1
  155. data/lib/kwartz/helper/rails.rb +437 -0
  156. data/lib/kwartz/main.rb +30 -38
  157. data/lib/kwartz/node.rb +46 -31
  158. data/lib/kwartz/parser.rb +43 -15
  159. data/lib/kwartz/translator.rb +104 -6
  160. data/lib/kwartz/util.rb +113 -0
  161. data/lib/kwartz/util/assert-text-equal.rb +1 -1
  162. data/lib/kwartz/util/testcase-helper.rb +26 -8
  163. data/test/test-compile.rb +3 -3
  164. data/test/test-compile.yaml +135 -5
  165. data/test/test-converter.rb +16 -8
  166. data/test/test-converter.yaml +307 -76
  167. data/test/test-directives.rb +1 -1
  168. data/test/test-directives.yaml +964 -979
  169. data/test/test-main.rb +61 -146
  170. data/test/test-main.yaml +235 -0
  171. data/test/test-parser.rb +10 -12
  172. data/test/test-parser.yaml +484 -326
  173. data/test/test-rails.rb +1 -1
  174. data/test/test-rails.yaml +37 -37
  175. data/test/test-ruleset.rb +1 -1
  176. data/test/test-ruleset.yaml +34 -40
  177. data/test/test.rb +1 -1
  178. metadata +82 -3
  179. data/COPYING +0 -340
@@ -94,8 +94,8 @@ translator for php
94
94
  <h3 class="section-bar">Methods</h3>
95
95
 
96
96
  <div class="name-list">
97
- <a href="#M000017">new</a>&nbsp;&nbsp;
98
- <a href="#M000018">translate_string</a>&nbsp;&nbsp;
97
+ <a href="#M000057">new</a>&nbsp;&nbsp;
98
+ <a href="#M000058">translate_string</a>&nbsp;&nbsp;
99
99
  </div>
100
100
  </div>
101
101
 
@@ -130,21 +130,21 @@ translator for php
130
130
  <div id="methods">
131
131
  <h3 class="section-bar">Public Class methods</h3>
132
132
 
133
- <div id="method-M000017" class="method-detail">
134
- <a name="M000017"></a>
133
+ <div id="method-M000057" class="method-detail">
134
+ <a name="M000057"></a>
135
135
 
136
136
  <div class="method-heading">
137
- <a href="#M000017" class="method-signature">
137
+ <a href="#M000057" class="method-signature">
138
138
  <span class="method-name">new</span><span class="method-args">(properties={})</span>
139
139
  </a>
140
140
  </div>
141
141
 
142
142
  <div class="method-description">
143
143
  <p><a class="source-toggle" href="#"
144
- onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
145
- <div class="method-source-code" id="M000017-source">
144
+ onclick="toggleCode('M000057-source');return false;">[Source]</a></p>
145
+ <div class="method-source-code" id="M000057-source">
146
146
  <pre>
147
- <span class="ruby-comment cmt"># File kwartz/binding/php.rb, line 151</span>
147
+ <span class="ruby-comment cmt"># File kwartz/binding/php.rb, line 170</span>
148
148
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">properties</span>={})
149
149
  <span class="ruby-keyword kw">super</span>(<span class="ruby-constant">PHP_EMBED_PATTERNS</span>, <span class="ruby-identifier">properties</span>)
150
150
  <span class="ruby-keyword kw">end</span>
@@ -155,21 +155,21 @@ translator for php
155
155
 
156
156
  <h3 class="section-bar">Public Instance methods</h3>
157
157
 
158
- <div id="method-M000018" class="method-detail">
159
- <a name="M000018"></a>
158
+ <div id="method-M000058" class="method-detail">
159
+ <a name="M000058"></a>
160
160
 
161
161
  <div class="method-heading">
162
- <a href="#M000018" class="method-signature">
162
+ <a href="#M000058" class="method-signature">
163
163
  <span class="method-name">translate_string</span><span class="method-args">(str)</span>
164
164
  </a>
165
165
  </div>
166
166
 
167
167
  <div class="method-description">
168
168
  <p><a class="source-toggle" href="#"
169
- onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
170
- <div class="method-source-code" id="M000018-source">
169
+ onclick="toggleCode('M000058-source');return false;">[Source]</a></p>
170
+ <div class="method-source-code" id="M000058-source">
171
171
  <pre>
172
- <span class="ruby-comment cmt"># File kwartz/binding/php.rb, line 156</span>
172
+ <span class="ruby-comment cmt"># File kwartz/binding/php.rb, line 175</span>
173
173
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">translate_string</span>(<span class="ruby-identifier">str</span>)
174
174
  <span class="ruby-identifier">str</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/&lt;\?xml/</span>, <span class="ruby-value str">'&lt;&lt;?php ?&gt;?xml'</span>)
175
175
  <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">str</span>)
@@ -92,24 +92,24 @@
92
92
  <h3 class="section-bar">Methods</h3>
93
93
 
94
94
  <div class="name-list">
95
- <a href="#M000134">_parse_block</a>&nbsp;&nbsp;
96
- <a href="#M000121">escape?</a>&nbsp;&nbsp;
97
- <a href="#M000136">get_class</a>&nbsp;&nbsp;
98
- <a href="#M000122">getch</a>&nbsp;&nbsp;
99
- <a href="#M000128">keywords</a>&nbsp;&nbsp;
100
- <a href="#M000119">new</a>&nbsp;&nbsp;
101
- <a href="#M000133">parse</a>&nbsp;&nbsp;
102
- <a href="#M000132">parse_error</a>&nbsp;&nbsp;
103
- <a href="#M000135">register_class</a>&nbsp;&nbsp;
104
- <a href="#M000120">reset</a>&nbsp;&nbsp;
105
- <a href="#M000129">scan</a>&nbsp;&nbsp;
106
- <a href="#M000130">scan_block</a>&nbsp;&nbsp;
107
- <a href="#M000127">scan_hook</a>&nbsp;&nbsp;
108
- <a href="#M000123">scan_ident</a>&nbsp;&nbsp;
109
- <a href="#M000131">scan_line</a>&nbsp;&nbsp;
110
- <a href="#M000125">scan_string</a>&nbsp;&nbsp;
111
- <a href="#M000124">scan_string_dquoted</a>&nbsp;&nbsp;
112
- <a href="#M000126">scan_string_quoted</a>&nbsp;&nbsp;
95
+ <a href="#M000182">_parse_block</a>&nbsp;&nbsp;
96
+ <a href="#M000169">escape?</a>&nbsp;&nbsp;
97
+ <a href="#M000184">get_class</a>&nbsp;&nbsp;
98
+ <a href="#M000170">getch</a>&nbsp;&nbsp;
99
+ <a href="#M000176">keywords</a>&nbsp;&nbsp;
100
+ <a href="#M000167">new</a>&nbsp;&nbsp;
101
+ <a href="#M000181">parse</a>&nbsp;&nbsp;
102
+ <a href="#M000180">parse_error</a>&nbsp;&nbsp;
103
+ <a href="#M000183">register_class</a>&nbsp;&nbsp;
104
+ <a href="#M000168">reset</a>&nbsp;&nbsp;
105
+ <a href="#M000177">scan</a>&nbsp;&nbsp;
106
+ <a href="#M000178">scan_block</a>&nbsp;&nbsp;
107
+ <a href="#M000175">scan_hook</a>&nbsp;&nbsp;
108
+ <a href="#M000171">scan_ident</a>&nbsp;&nbsp;
109
+ <a href="#M000179">scan_line</a>&nbsp;&nbsp;
110
+ <a href="#M000173">scan_string</a>&nbsp;&nbsp;
111
+ <a href="#M000172">scan_string_dquoted</a>&nbsp;&nbsp;
112
+ <a href="#M000174">scan_string_quoted</a>&nbsp;&nbsp;
113
113
  </div>
114
114
  </div>
115
115
 
@@ -195,21 +195,21 @@
195
195
  <div id="methods">
196
196
  <h3 class="section-bar">Public Class methods</h3>
197
197
 
198
- <div id="method-M000136" class="method-detail">
199
- <a name="M000136"></a>
198
+ <div id="method-M000184" class="method-detail">
199
+ <a name="M000184"></a>
200
200
 
201
201
  <div class="method-heading">
202
- <a href="#M000136" class="method-signature">
202
+ <a href="#M000184" class="method-signature">
203
203
  <span class="method-name">get_class</span><span class="method-args">(css)</span>
204
204
  </a>
205
205
  </div>
206
206
 
207
207
  <div class="method-description">
208
208
  <p><a class="source-toggle" href="#"
209
- onclick="toggleCode('M000136-source');return false;">[Source]</a></p>
210
- <div class="method-source-code" id="M000136-source">
209
+ onclick="toggleCode('M000184-source');return false;">[Source]</a></p>
210
+ <div class="method-source-code" id="M000184-source">
211
211
  <pre>
212
- <span class="ruby-comment cmt"># File kwartz/parser.rb, line 366</span>
212
+ <span class="ruby-comment cmt"># File kwartz/parser.rb, line 374</span>
213
213
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_class</span>(<span class="ruby-identifier">css</span>)
214
214
  <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@@class_table</span>[<span class="ruby-identifier">css</span>]
215
215
  <span class="ruby-keyword kw">end</span>
@@ -218,19 +218,19 @@
218
218
  </div>
219
219
  </div>
220
220
 
221
- <div id="method-M000119" class="method-detail">
222
- <a name="M000119"></a>
221
+ <div id="method-M000167" class="method-detail">
222
+ <a name="M000167"></a>
223
223
 
224
224
  <div class="method-heading">
225
- <a href="#M000119" class="method-signature">
225
+ <a href="#M000167" class="method-signature">
226
226
  <span class="method-name">new</span><span class="method-args">(properties={})</span>
227
227
  </a>
228
228
  </div>
229
229
 
230
230
  <div class="method-description">
231
231
  <p><a class="source-toggle" href="#"
232
- onclick="toggleCode('M000119-source');return false;">[Source]</a></p>
233
- <div class="method-source-code" id="M000119-source">
232
+ onclick="toggleCode('M000167-source');return false;">[Source]</a></p>
233
+ <div class="method-source-code" id="M000167-source">
234
234
  <pre>
235
235
  <span class="ruby-comment cmt"># File kwartz/parser.rb, line 65</span>
236
236
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">properties</span>={})
@@ -241,21 +241,21 @@
241
241
  </div>
242
242
  </div>
243
243
 
244
- <div id="method-M000135" class="method-detail">
245
- <a name="M000135"></a>
244
+ <div id="method-M000183" class="method-detail">
245
+ <a name="M000183"></a>
246
246
 
247
247
  <div class="method-heading">
248
- <a href="#M000135" class="method-signature">
248
+ <a href="#M000183" class="method-signature">
249
249
  <span class="method-name">register_class</span><span class="method-args">(css, klass)</span>
250
250
  </a>
251
251
  </div>
252
252
 
253
253
  <div class="method-description">
254
254
  <p><a class="source-toggle" href="#"
255
- onclick="toggleCode('M000135-source');return false;">[Source]</a></p>
256
- <div class="method-source-code" id="M000135-source">
255
+ onclick="toggleCode('M000183-source');return false;">[Source]</a></p>
256
+ <div class="method-source-code" id="M000183-source">
257
257
  <pre>
258
- <span class="ruby-comment cmt"># File kwartz/parser.rb, line 361</span>
258
+ <span class="ruby-comment cmt"># File kwartz/parser.rb, line 369</span>
259
259
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">register_class</span>(<span class="ruby-identifier">css</span>, <span class="ruby-identifier">klass</span>)
260
260
  <span class="ruby-ivar">@@class_table</span>[<span class="ruby-identifier">css</span>] = <span class="ruby-identifier">klass</span>
261
261
  <span class="ruby-keyword kw">end</span>
@@ -266,21 +266,21 @@
266
266
 
267
267
  <h3 class="section-bar">Public Instance methods</h3>
268
268
 
269
- <div id="method-M000134" class="method-detail">
270
- <a name="M000134"></a>
269
+ <div id="method-M000182" class="method-detail">
270
+ <a name="M000182"></a>
271
271
 
272
272
  <div class="method-heading">
273
- <a href="#M000134" class="method-signature">
273
+ <a href="#M000182" class="method-signature">
274
274
  <span class="method-name">_parse_block</span><span class="method-args">()</span>
275
275
  </a>
276
276
  </div>
277
277
 
278
278
  <div class="method-description">
279
279
  <p><a class="source-toggle" href="#"
280
- onclick="toggleCode('M000134-source');return false;">[Source]</a></p>
281
- <div class="method-source-code" id="M000134-source">
280
+ onclick="toggleCode('M000182-source');return false;">[Source]</a></p>
281
+ <div class="method-source-code" id="M000182-source">
282
282
  <pre>
283
- <span class="ruby-comment cmt"># File kwartz/parser.rb, line 338</span>
283
+ <span class="ruby-comment cmt"># File kwartz/parser.rb, line 346</span>
284
284
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_parse_block</span>
285
285
  <span class="ruby-identifier">scan</span>()
286
286
  <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@token</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'{'</span><span class="ruby-value str">'{'</span>
@@ -295,8 +295,8 @@
295
295
  <span class="ruby-identifier">assert</span>(<span class="ruby-node">&quot;@error=#{@error}&quot;</span>)
296
296
  <span class="ruby-keyword kw">end</span>
297
297
  <span class="ruby-keyword kw">end</span>
298
- <span class="ruby-ivar">@value</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/\A\s*\n/</span>, <span class="ruby-value str">''</span>)
299
- <span class="ruby-ivar">@value</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/^\s+\z/</span>, <span class="ruby-value str">''</span>)
298
+ <span class="ruby-ivar">@value</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/\A[ \t]*\n/</span>, <span class="ruby-value str">''</span>)
299
+ <span class="ruby-ivar">@value</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/^[ \t]+\z/</span>, <span class="ruby-value str">''</span>)
300
300
  <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@value</span>
301
301
  <span class="ruby-keyword kw">end</span>
302
302
  </pre>
@@ -304,21 +304,21 @@
304
304
  </div>
305
305
  </div>
306
306
 
307
- <div id="method-M000121" class="method-detail">
308
- <a name="M000121"></a>
307
+ <div id="method-M000169" class="method-detail">
308
+ <a name="M000169"></a>
309
309
 
310
310
  <div class="method-heading">
311
- <a href="#M000121" class="method-signature">
311
+ <a href="#M000169" class="method-signature">
312
312
  <span class="method-name">escape?</span><span class="method-args">(value)</span>
313
313
  </a>
314
314
  </div>
315
315
 
316
316
  <div class="method-description">
317
317
  <p><a class="source-toggle" href="#"
318
- onclick="toggleCode('M000121-source');return false;">[Source]</a></p>
319
- <div class="method-source-code" id="M000121-source">
318
+ onclick="toggleCode('M000169-source');return false;">[Source]</a></p>
319
+ <div class="method-source-code" id="M000169-source">
320
320
  <pre>
321
- <span class="ruby-comment cmt"># File kwartz/parser.rb, line 112</span>
321
+ <span class="ruby-comment cmt"># File kwartz/parser.rb, line 113</span>
322
322
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escape?</span>(<span class="ruby-identifier">value</span>)
323
323
  <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ESCAPE_FLAG_TABLE</span>[<span class="ruby-identifier">value</span>]
324
324
  <span class="ruby-keyword kw">end</span>
@@ -327,11 +327,11 @@
327
327
  </div>
328
328
  </div>
329
329
 
330
- <div id="method-M000122" class="method-detail">
331
- <a name="M000122"></a>
330
+ <div id="method-M000170" class="method-detail">
331
+ <a name="M000170"></a>
332
332
 
333
333
  <div class="method-heading">
334
- <a href="#M000122" class="method-signature">
334
+ <a href="#M000170" class="method-signature">
335
335
  <span class="method-name">getch</span><span class="method-args">()</span>
336
336
  </a>
337
337
  </div>
@@ -341,10 +341,10 @@
341
341
  scanner
342
342
  </p>
343
343
  <p><a class="source-toggle" href="#"
344
- onclick="toggleCode('M000122-source');return false;">[Source]</a></p>
345
- <div class="method-source-code" id="M000122-source">
344
+ onclick="toggleCode('M000170-source');return false;">[Source]</a></p>
345
+ <div class="method-source-code" id="M000170-source">
346
346
  <pre>
347
- <span class="ruby-comment cmt"># File kwartz/parser.rb, line 119</span>
347
+ <span class="ruby-comment cmt"># File kwartz/parser.rb, line 120</span>
348
348
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">getch</span>
349
349
  <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@ch</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@pos</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-ivar">@max_pos</span>
350
350
  <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@ch</span> <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
@@ -361,11 +361,11 @@ scanner
361
361
  </div>
362
362
  </div>
363
363
 
364
- <div id="method-M000128" class="method-detail">
365
- <a name="M000128"></a>
364
+ <div id="method-M000176" class="method-detail">
365
+ <a name="M000176"></a>
366
366
 
367
367
  <div class="method-heading">
368
- <a href="#M000128" class="method-signature">
368
+ <a href="#M000176" class="method-signature">
369
369
  <span class="method-name">keywords</span><span class="method-args">(keyword)</span>
370
370
  </a>
371
371
  </div>
@@ -378,10 +378,10 @@ scanner
378
378
  return symbol if keyword is token, else return nil
379
379
  </p>
380
380
  <p><a class="source-toggle" href="#"
381
- onclick="toggleCode('M000128-source');return false;">[Source]</a></p>
382
- <div class="method-source-code" id="M000128-source">
381
+ onclick="toggleCode('M000176-source');return false;">[Source]</a></p>
382
+ <div class="method-source-code" id="M000176-source">
383
383
  <pre>
384
- <span class="ruby-comment cmt"># File kwartz/parser.rb, line 223</span>
384
+ <span class="ruby-comment cmt"># File kwartz/parser.rb, line 224</span>
385
385
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keywords</span>(<span class="ruby-identifier">keyword</span>)
386
386
  <span class="ruby-identifier">not_implemented</span>
387
387
  <span class="ruby-keyword kw">end</span>
@@ -390,11 +390,11 @@ return symbol if keyword is token, else return nil
390
390
  </div>
391
391
  </div>
392
392
 
393
- <div id="method-M000133" class="method-detail">
394
- <a name="M000133"></a>
393
+ <div id="method-M000181" class="method-detail">
394
+ <a name="M000181"></a>
395
395
 
396
396
  <div class="method-heading">
397
- <a href="#M000133" class="method-signature">
397
+ <a href="#M000181" class="method-signature">
398
398
  <span class="method-name">parse</span><span class="method-args">(input, filename='')</span>
399
399
  </a>
400
400
  </div>
@@ -405,10 +405,10 @@ return symbol if keyword is token, else return nil
405
405
  href="ElementRuleset.html">ElementRuleset</a>
406
406
  </p>
407
407
  <p><a class="source-toggle" href="#"
408
- onclick="toggleCode('M000133-source');return false;">[Source]</a></p>
409
- <div class="method-source-code" id="M000133-source">
408
+ onclick="toggleCode('M000181-source');return false;">[Source]</a></p>
409
+ <div class="method-source-code" id="M000181-source">
410
410
  <pre>
411
- <span class="ruby-comment cmt"># File kwartz/parser.rb, line 333</span>
411
+ <span class="ruby-comment cmt"># File kwartz/parser.rb, line 341</span>
412
412
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse</span>(<span class="ruby-identifier">input</span>, <span class="ruby-identifier">filename</span>=<span class="ruby-value str">''</span>)
413
413
  <span class="ruby-identifier">not_implemented</span>
414
414
  <span class="ruby-keyword kw">end</span>
@@ -417,11 +417,11 @@ href="ElementRuleset.html">ElementRuleset</a>
417
417
  </div>
418
418
  </div>
419
419
 
420
- <div id="method-M000132" class="method-detail">
421
- <a name="M000132"></a>
420
+ <div id="method-M000180" class="method-detail">
421
+ <a name="M000180"></a>
422
422
 
423
423
  <div class="method-heading">
424
- <a href="#M000132" class="method-signature">
424
+ <a href="#M000180" class="method-signature">
425
425
  <span class="method-name">parse_error</span><span class="method-args">(message, linenum=@linenum, column=@column)</span>
426
426
  </a>
427
427
  </div>
@@ -431,10 +431,10 @@ href="ElementRuleset.html">ElementRuleset</a>
431
431
  parser
432
432
  </p>
433
433
  <p><a class="source-toggle" href="#"
434
- onclick="toggleCode('M000132-source');return false;">[Source]</a></p>
435
- <div class="method-source-code" id="M000132-source">
434
+ onclick="toggleCode('M000180-source');return false;">[Source]</a></p>
435
+ <div class="method-source-code" id="M000180-source">
436
436
  <pre>
437
- <span class="ruby-comment cmt"># File kwartz/parser.rb, line 327</span>
437
+ <span class="ruby-comment cmt"># File kwartz/parser.rb, line 335</span>
438
438
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_error</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">linenum</span>=<span class="ruby-ivar">@linenum</span>, <span class="ruby-identifier">column</span>=<span class="ruby-ivar">@column</span>)
439
439
  <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ParseError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">message</span>, <span class="ruby-ivar">@filename</span>, <span class="ruby-identifier">linenum</span>, <span class="ruby-identifier">column</span>)
440
440
  <span class="ruby-keyword kw">end</span>
@@ -443,11 +443,11 @@ parser
443
443
  </div>
444
444
  </div>
445
445
 
446
- <div id="method-M000129" class="method-detail">
447
- <a name="M000129"></a>
446
+ <div id="method-M000177" class="method-detail">
447
+ <a name="M000177"></a>
448
448
 
449
449
  <div class="method-heading">
450
- <a href="#M000129" class="method-signature">
450
+ <a href="#M000177" class="method-signature">
451
451
  <span class="method-name">scan</span><span class="method-args">()</span>
452
452
  </a>
453
453
  </div>
@@ -457,10 +457,10 @@ parser
457
457
  scan token
458
458
  </p>
459
459
  <p><a class="source-toggle" href="#"
460
- onclick="toggleCode('M000129-source');return false;">[Source]</a></p>
461
- <div class="method-source-code" id="M000129-source">
460
+ onclick="toggleCode('M000177-source');return false;">[Source]</a></p>
461
+ <div class="method-source-code" id="M000177-source">
462
462
  <pre>
463
- <span class="ruby-comment cmt"># File kwartz/parser.rb, line 228</span>
463
+ <span class="ruby-comment cmt"># File kwartz/parser.rb, line 229</span>
464
464
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scan</span>
465
465
  <span class="ruby-comment cmt">## skip whitespaces</span>
466
466
  <span class="ruby-identifier">c</span> = <span class="ruby-ivar">@ch</span>
@@ -476,7 +476,7 @@ scan token
476
476
 
477
477
  <span class="ruby-comment cmt">## scan hook</span>
478
478
  <span class="ruby-identifier">ret</span> = <span class="ruby-identifier">scan_hook</span>() <span class="ruby-comment cmt"># scan_hook() is overrided in subclass</span>
479
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">ret</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ret</span>
479
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">ret</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ret</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">false</span>
480
480
 
481
481
  <span class="ruby-comment cmt">## keyword or identifer</span>
482
482
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">is_identchar</span>(<span class="ruby-identifier">c</span>)
@@ -509,6 +509,13 @@ scan token
509
509
  <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@token</span> = <span class="ruby-value str">'}'</span><span class="ruby-value str">'}'</span>
510
510
  <span class="ruby-keyword kw">end</span>
511
511
 
512
+ <span class="ruby-comment cmt">## ','</span>
513
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value">?,</span>
514
+ <span class="ruby-ivar">@value</span> = <span class="ruby-value str">&quot;,&quot;</span>
515
+ <span class="ruby-identifier">getch</span>()
516
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@token</span> = <span class="ruby-value str">','</span><span class="ruby-value str">','</span>
517
+ <span class="ruby-keyword kw">end</span>
518
+
512
519
  <span class="ruby-comment cmt">##</span>
513
520
  <span class="ruby-ivar">@value</span> = <span class="ruby-identifier">c</span>.<span class="ruby-identifier">chr</span>
514
521
  <span class="ruby-ivar">@error</span> = <span class="ruby-identifier">:invalid_char</span>
@@ -519,21 +526,21 @@ scan token
519
526
  </div>
520
527
  </div>
521
528
 
522
- <div id="method-M000130" class="method-detail">
523
- <a name="M000130"></a>
529
+ <div id="method-M000178" class="method-detail">
530
+ <a name="M000178"></a>
524
531
 
525
532
  <div class="method-heading">
526
- <a href="#M000130" class="method-signature">
533
+ <a href="#M000178" class="method-signature">
527
534
  <span class="method-name">scan_block</span><span class="method-args">(skip_open_curly=false)</span>
528
535
  </a>
529
536
  </div>
530
537
 
531
538
  <div class="method-description">
532
539
  <p><a class="source-toggle" href="#"
533
- onclick="toggleCode('M000130-source');return false;">[Source]</a></p>
534
- <div class="method-source-code" id="M000130-source">
540
+ onclick="toggleCode('M000178-source');return false;">[Source]</a></p>
541
+ <div class="method-source-code" id="M000178-source">
535
542
  <pre>
536
- <span class="ruby-comment cmt"># File kwartz/parser.rb, line 283</span>
543
+ <span class="ruby-comment cmt"># File kwartz/parser.rb, line 291</span>
537
544
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scan_block</span>(<span class="ruby-identifier">skip_open_curly</span>=<span class="ruby-keyword kw">false</span>)
538
545
  <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">skip_open_curly</span>
539
546
  <span class="ruby-identifier">token</span> = <span class="ruby-identifier">scan</span>()
@@ -567,24 +574,24 @@ scan token
567
574
  </div>
568
575
  </div>
569
576
 
570
- <div id="method-M000127" class="method-detail">
571
- <a name="M000127"></a>
577
+ <div id="method-M000175" class="method-detail">
578
+ <a name="M000175"></a>
572
579
 
573
580
  <div class="method-heading">
574
- <a href="#M000127" class="method-signature">
581
+ <a href="#M000175" class="method-signature">
575
582
  <span class="method-name">scan_hook</span><span class="method-args">()</span>
576
583
  </a>
577
584
  </div>
578
585
 
579
586
  <div class="method-description">
580
587
  <p>
581
- called from scan()
588
+ called from scan(), return false when not hooked
582
589
  </p>
583
590
  <p><a class="source-toggle" href="#"
584
- onclick="toggleCode('M000127-source');return false;">[Source]</a></p>
585
- <div class="method-source-code" id="M000127-source">
591
+ onclick="toggleCode('M000175-source');return false;">[Source]</a></p>
592
+ <div class="method-source-code" id="M000175-source">
586
593
  <pre>
587
- <span class="ruby-comment cmt"># File kwartz/parser.rb, line 216</span>
594
+ <span class="ruby-comment cmt"># File kwartz/parser.rb, line 217</span>
588
595
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scan_hook</span>
589
596
  <span class="ruby-comment cmt">#not_implemented</span>
590
597
  <span class="ruby-keyword kw">end</span>
@@ -593,21 +600,21 @@ called from scan()
593
600
  </div>
594
601
  </div>
595
602
 
596
- <div id="method-M000123" class="method-detail">
597
- <a name="M000123"></a>
603
+ <div id="method-M000171" class="method-detail">
604
+ <a name="M000171"></a>
598
605
 
599
606
  <div class="method-heading">
600
- <a href="#M000123" class="method-signature">
607
+ <a href="#M000171" class="method-signature">
601
608
  <span class="method-name">scan_ident</span><span class="method-args">()</span>
602
609
  </a>
603
610
  </div>
604
611
 
605
612
  <div class="method-description">
606
613
  <p><a class="source-toggle" href="#"
607
- onclick="toggleCode('M000123-source');return false;">[Source]</a></p>
608
- <div class="method-source-code" id="M000123-source">
614
+ onclick="toggleCode('M000171-source');return false;">[Source]</a></p>
615
+ <div class="method-source-code" id="M000171-source">
609
616
  <pre>
610
- <span class="ruby-comment cmt"># File kwartz/parser.rb, line 132</span>
617
+ <span class="ruby-comment cmt"># File kwartz/parser.rb, line 133</span>
611
618
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scan_ident</span>
612
619
  <span class="ruby-comment cmt">## identifer</span>
613
620
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">is_identchar</span>(<span class="ruby-ivar">@ch</span>)
@@ -625,21 +632,21 @@ called from scan()
625
632
  </div>
626
633
  </div>
627
634
 
628
- <div id="method-M000131" class="method-detail">
629
- <a name="M000131"></a>
635
+ <div id="method-M000179" class="method-detail">
636
+ <a name="M000179"></a>
630
637
 
631
638
  <div class="method-heading">
632
- <a href="#M000131" class="method-signature">
639
+ <a href="#M000179" class="method-signature">
633
640
  <span class="method-name">scan_line</span><span class="method-args">()</span>
634
641
  </a>
635
642
  </div>
636
643
 
637
644
  <div class="method-description">
638
645
  <p><a class="source-toggle" href="#"
639
- onclick="toggleCode('M000131-source');return false;">[Source]</a></p>
640
- <div class="method-source-code" id="M000131-source">
646
+ onclick="toggleCode('M000179-source');return false;">[Source]</a></p>
647
+ <div class="method-source-code" id="M000179-source">
641
648
  <pre>
642
- <span class="ruby-comment cmt"># File kwartz/parser.rb, line 313</span>
649
+ <span class="ruby-comment cmt"># File kwartz/parser.rb, line 321</span>
643
650
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scan_line</span>
644
651
  <span class="ruby-identifier">sb</span> = <span class="ruby-ivar">@ch</span>.<span class="ruby-identifier">chr</span>
645
652
  <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">c</span> = <span class="ruby-identifier">getch</span>()) <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">!=</span> <span class="ruby-value">?\n</span>
@@ -654,21 +661,21 @@ called from scan()
654
661
  </div>
655
662
  </div>
656
663
 
657
- <div id="method-M000125" class="method-detail">
658
- <a name="M000125"></a>
664
+ <div id="method-M000173" class="method-detail">
665
+ <a name="M000173"></a>
659
666
 
660
667
  <div class="method-heading">
661
- <a href="#M000125" class="method-signature">
668
+ <a href="#M000173" class="method-signature">
662
669
  <span class="method-name">scan_string</span><span class="method-args">()</span>
663
670
  </a>
664
671
  </div>
665
672
 
666
673
  <div class="method-description">
667
674
  <p><a class="source-toggle" href="#"
668
- onclick="toggleCode('M000125-source');return false;">[Source]</a></p>
669
- <div class="method-source-code" id="M000125-source">
675
+ onclick="toggleCode('M000173-source');return false;">[Source]</a></p>
676
+ <div class="method-source-code" id="M000173-source">
670
677
  <pre>
671
- <span class="ruby-comment cmt"># File kwartz/parser.rb, line 177</span>
678
+ <span class="ruby-comment cmt"># File kwartz/parser.rb, line 178</span>
672
679
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scan_string</span>
673
680
  <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@ch</span> <span class="ruby-operator">==</span> <span class="ruby-value">?'</span>
674
681
  <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">scan_string_quoted</span>()
@@ -683,21 +690,21 @@ called from scan()
683
690
  </div>
684
691
  </div>
685
692
 
686
- <div id="method-M000124" class="method-detail">
687
- <a name="M000124"></a>
693
+ <div id="method-M000172" class="method-detail">
694
+ <a name="M000172"></a>
688
695
 
689
696
  <div class="method-heading">
690
- <a href="#M000124" class="method-signature">
697
+ <a href="#M000172" class="method-signature">
691
698
  <span class="method-name">scan_string_dquoted</span><span class="method-args">()</span>
692
699
  </a>
693
700
  </div>
694
701
 
695
702
  <div class="method-description">
696
703
  <p><a class="source-toggle" href="#"
697
- onclick="toggleCode('M000124-source');return false;">[Source]</a></p>
698
- <div class="method-source-code" id="M000124-source">
704
+ onclick="toggleCode('M000172-source');return false;">[Source]</a></p>
705
+ <div class="method-source-code" id="M000172-source">
699
706
  <pre>
700
- <span class="ruby-comment cmt"># File kwartz/parser.rb, line 146</span>
707
+ <span class="ruby-comment cmt"># File kwartz/parser.rb, line 147</span>
701
708
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scan_string_dquoted</span>
702
709
  <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@ch</span> <span class="ruby-operator">==</span> <span class="ruby-value">?&quot;</span>
703
710
  <span class="ruby-identifier">s</span> = <span class="ruby-value str">''</span>
@@ -732,21 +739,21 @@ called from scan()
732
739
  </div>
733
740
  </div>
734
741
 
735
- <div id="method-M000126" class="method-detail">
736
- <a name="M000126"></a>
742
+ <div id="method-M000174" class="method-detail">
743
+ <a name="M000174"></a>
737
744
 
738
745
  <div class="method-heading">
739
- <a href="#M000126" class="method-signature">
746
+ <a href="#M000174" class="method-signature">
740
747
  <span class="method-name">scan_string_quoted</span><span class="method-args">()</span>
741
748
  </a>
742
749
  </div>
743
750
 
744
751
  <div class="method-description">
745
752
  <p><a class="source-toggle" href="#"
746
- onclick="toggleCode('M000126-source');return false;">[Source]</a></p>
747
- <div class="method-source-code" id="M000126-source">
753
+ onclick="toggleCode('M000174-source');return false;">[Source]</a></p>
754
+ <div class="method-source-code" id="M000174-source">
748
755
  <pre>
749
- <span class="ruby-comment cmt"># File kwartz/parser.rb, line 188</span>
756
+ <span class="ruby-comment cmt"># File kwartz/parser.rb, line 189</span>
750
757
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scan_string_quoted</span>
751
758
  <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@ch</span> <span class="ruby-operator">==</span> <span class="ruby-value">?'</span>
752
759
  <span class="ruby-identifier">s</span> = <span class="ruby-value str">''</span>
@@ -779,11 +786,11 @@ called from scan()
779
786
 
780
787
  <h3 class="section-bar">Protected Instance methods</h3>
781
788
 
782
- <div id="method-M000120" class="method-detail">
783
- <a name="M000120"></a>
789
+ <div id="method-M000168" class="method-detail">
790
+ <a name="M000168"></a>
784
791
 
785
792
  <div class="method-heading">
786
- <a href="#M000120" class="method-signature">
793
+ <a href="#M000168" class="method-signature">
787
794
  <span class="method-name">reset</span><span class="method-args">(input, filename='')</span>
788
795
  </a>
789
796
  </div>
@@ -793,11 +800,12 @@ called from scan()
793
800
  called from parse() and initialize parser object
794
801
  </p>
795
802
  <p><a class="source-toggle" href="#"
796
- onclick="toggleCode('M000120-source');return false;">[Source]</a></p>
797
- <div class="method-source-code" id="M000120-source">
803
+ onclick="toggleCode('M000168-source');return false;">[Source]</a></p>
804
+ <div class="method-source-code" id="M000168-source">
798
805
  <pre>
799
806
  <span class="ruby-comment cmt"># File kwartz/parser.rb, line 71</span>
800
807
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>(<span class="ruby-identifier">input</span>, <span class="ruby-identifier">filename</span>=<span class="ruby-value str">''</span>)
808
+ <span class="ruby-identifier">input</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;#{self.class.name}#reset() requires string argument.&quot;</span>)
801
809
  <span class="ruby-ivar">@input</span> = <span class="ruby-identifier">input</span>
802
810
  <span class="ruby-ivar">@filename</span> = <span class="ruby-identifier">filename</span>
803
811
  <span class="ruby-ivar">@linenum</span> = <span class="ruby-value">1</span> <span class="ruby-comment cmt"># 1 start</span>