~ubuntu-branches/ubuntu/precise/pyparsing/precise-updates

« back to all changes in this revision

Viewing changes to htmldoc/parserFwk.pyparsing.Keyword-class.html

  • Committer: Bazaar Package Importer
  • Author(s): Kevin Coyner
  • Date: 2008-02-24 18:14:15 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080224181415-9x0hjya3ca3590z1
Tags: 1.4.11-2
Reinstate release 1.4.10-2 changes, which I inadvertently omitted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="iso-8859-1"?>
2
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
 
          "DTD/xhtml1-transitional.dtd">
4
 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
 
<head>
6
 
  <title>parserFwk.pyparsing.Keyword</title>
7
 
  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
8
 
</head>
9
 
<body bgcolor="white" text="black" link="blue" vlink="#204080"
10
 
      alink="#204080">
11
 
 
12
 
<!-- =========== START OF NAVBAR =========== -->
13
 
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
14
 
  <tr valign="center">
15
 
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="parserFwk.pyparsing-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
16
 
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
17
 
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
18
 
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
19
 
    <th class="navbar" align="right" width="100%">
20
 
      <table border="0" cellpadding="0" cellspacing="0">
21
 
      <tr><th class="navbar" align="center">
22
 
        <p class="nomargin">
23
 
          pyparsing
24
 
      </p></th></tr></table>
25
 
    </th>
26
 
  </tr>
27
 
</table>
28
 
<table width="100%" cellpadding="0" cellspacing="0">
29
 
  <tr valign="top">
30
 
    <td width="100%">
31
 
      <font size="-1"><b class="breadcrumbs">
32
 
        Package&nbsp;parserFwk ::
33
 
        <a href="parserFwk.pyparsing-module.html">Module&nbsp;pyparsing</a> ::
34
 
        Class&nbsp;Keyword
35
 
      </b></font></br>
36
 
    </td>
37
 
    <td><table cellpadding="0" cellspacing="0">
38
 
      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="parserFwk.pyparsing.Keyword-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
39
 
    </table></td>
40
 
</tr></table>
41
 
 
42
 
<!-- =========== START OF CLASS DESCRIPTION =========== -->
43
 
<h2 class="class">Type Keyword</h2>
44
 
 
45
 
<pre class="base-tree">
46
 
   <a href="__builtin__.object-class.html"><code>object</code></a> --+        
47
 
            |        
48
 
<a href="parserFwk.pyparsing.ParserElement-class.html"><code>ParserElement</code></a> --+    
49
 
                |    
50
 
            <a href="parserFwk.pyparsing.Token-class.html"><code>Token</code></a> --+
51
 
                    |
52
 
                   <b>Keyword</b>
53
 
</pre><br />
54
 
 
55
 
<dl><dt><b>Known Subclasses:</b></dt>
56
 
<dd>
57
 
    <a href="parserFwk.pyparsing.CaselessKeyword-class.html"><code>CaselessKeyword</code></a></dd></dl>
58
 
 
59
 
<hr/>
60
 
 
61
 
Token to exactly match a specified string as a keyword, that is, it 
62
 
must be immediately followed by a non-keyword character. Compare with 
63
 
Literal:
64
 
<pre class="literalblock">
65
 
 Literal(&quot;if&quot;) will match the leading 'if' in 'ifAndOnlyIf'.
66
 
 Keyword(&quot;if&quot;) will not; it will only match the leading 'if in 'if x=1', or 'if(y==2)'
67
 
</pre>
68
 
Accepts two optional constructor arguments in addition to the keyword 
69
 
string: identChars is a string of characters that would be valid 
70
 
identifier characters, defaulting to all alphanumerics + &quot;_&quot; 
71
 
and &quot;$&quot;; caseless allows case-insensitive matching, default is 
72
 
False.
73
 
<hr/>
74
 
 
75
 
 
76
 
<!-- =========== START OF METHOD SUMMARY =========== -->
77
 
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
78
 
<tr bgcolor="#70b0f0" class="summary">
79
 
  <th colspan="2">Method Summary</th></tr>
80
 
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
81
 
  <td><code><a name="__init__"></a><span class="summary-sig"><span class="summary-sig-name">__init__</span>(<span class=summary-sig-arg>self</span>,
82
 
          <span class=summary-sig-arg>matchString</span>,
83
 
          <span class=summary-sig-arg>identChars</span>,
84
 
          <span class=summary-sig-arg>caseless</span>)</span></code>
85
 
</td></tr>
86
 
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
87
 
  <td><code><span class="summary-sig"><a href="parserFwk.pyparsing.Keyword-class.html#copy" class="summary-sig-name"><code>copy</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
88
 
<br />
89
 
Make a copy of this ParserElement.</td></tr>
90
 
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
91
 
  <td><code><a name="parseImpl"></a><span class="summary-sig"><span class="summary-sig-name">parseImpl</span>(<span class=summary-sig-arg>self</span>,
92
 
          <span class=summary-sig-arg>instring</span>,
93
 
          <span class=summary-sig-arg>loc</span>,
94
 
          <span class=summary-sig-arg>doActions</span>)</span></code>
95
 
</td></tr>
96
 
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
97
 
  <td><code><span class="summary-sig"><a href="parserFwk.pyparsing.Keyword-class.html#setDefaultKeywordChars" class="summary-sig-name"><code>setDefaultKeywordChars</code></a>(<span class=summary-sig-arg>chars</span>)</span></code>
98
 
<br />
99
 
Overrides the default Keyword chars    <i>(Static method)</i>
100
 
</td></tr>
101
 
  <tr><td colspan="2">
102
 
    <b>Inherited from <a href="parserFwk.pyparsing.Token-class.html"><code>Token</code></a>:</b>
103
 
      <a href="parserFwk.pyparsing.Token-class.html#setName"><code>setName</code></a>
104
 
      <br />
105
 
    <b>Inherited from <a href="parserFwk.pyparsing.ParserElement-class.html"><code>ParserElement</code></a>:</b>
106
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#__add__"><code>__add__</code></a>, 
107
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#__and__"><code>__and__</code></a>, 
108
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#__call__"><code>__call__</code></a>, 
109
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#__getattr__"><code>__getattr__</code></a>, 
110
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#__invert__"><code>__invert__</code></a>, 
111
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#__or__"><code>__or__</code></a>, 
112
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#__radd__"><code>__radd__</code></a>, 
113
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#__rand__"><code>__rand__</code></a>, 
114
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#__repr__"><code>__repr__</code></a>, 
115
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#__ror__"><code>__ror__</code></a>, 
116
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#__rxor__"><code>__rxor__</code></a>, 
117
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#__str__"><code>__str__</code></a>, 
118
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#__xor__"><code>__xor__</code></a>, 
119
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#addParseAction"><code>addParseAction</code></a>, 
120
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#checkRecursion"><code>checkRecursion</code></a>, 
121
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#enablePackrat"><code>enablePackrat</code></a>, 
122
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#getException"><code>getException</code></a>, 
123
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#ignore"><code>ignore</code></a>, 
124
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#leaveWhitespace"><code>leaveWhitespace</code></a>, 
125
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#normalizeParseActionArgs"><code>normalizeParseActionArgs</code></a>, 
126
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#parseFile"><code>parseFile</code></a>, 
127
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#parseString"><code>parseString</code></a>, 
128
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#parseWithTabs"><code>parseWithTabs</code></a>, 
129
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#postParse"><code>postParse</code></a>, 
130
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#preParse"><code>preParse</code></a>, 
131
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#resetCache"><code>resetCache</code></a>, 
132
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#scanString"><code>scanString</code></a>, 
133
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#searchString"><code>searchString</code></a>, 
134
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#setBreak"><code>setBreak</code></a>, 
135
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#setDebug"><code>setDebug</code></a>, 
136
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#setDebugActions"><code>setDebugActions</code></a>, 
137
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#setDefaultWhitespaceChars"><code>setDefaultWhitespaceChars</code></a>, 
138
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#setFailAction"><code>setFailAction</code></a>, 
139
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#setParseAction"><code>setParseAction</code></a>, 
140
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#setResultsName"><code>setResultsName</code></a>, 
141
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#setWhitespaceChars"><code>setWhitespaceChars</code></a>, 
142
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#skipIgnorables"><code>skipIgnorables</code></a>, 
143
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#streamline"><code>streamline</code></a>, 
144
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#suppress"><code>suppress</code></a>, 
145
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#transformString"><code>transformString</code></a>, 
146
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#tryParse"><code>tryParse</code></a>, 
147
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#validate"><code>validate</code></a>
148
 
      <br />
149
 
    <b>Inherited from <a href="__builtin__.object-class.html"><code>object</code></a>:</b>
150
 
      <a href="__builtin__.object-class.html#__delattr__"><code>__delattr__</code></a>, 
151
 
      <a href="__builtin__.object-class.html#__getattribute__"><code>__getattribute__</code></a>, 
152
 
      <a href="__builtin__.object-class.html#__hash__"><code>__hash__</code></a>, 
153
 
      <a href="__builtin__.object-class.html#__new__"><code>__new__</code></a>, 
154
 
      <a href="__builtin__.object-class.html#__reduce__"><code>__reduce__</code></a>, 
155
 
      <a href="__builtin__.object-class.html#__reduce_ex__"><code>__reduce_ex__</code></a>, 
156
 
      <a href="__builtin__.object-class.html#__setattr__"><code>__setattr__</code></a>
157
 
    </td></tr>
158
 
</table><br />
159
 
 
160
 
 
161
 
<!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
162
 
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
163
 
<tr bgcolor="#70b0f0" class="summary">
164
 
  <th colspan="2">Class Variable Summary</th></tr>
165
 
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
166
 
<td><b><a href="parserFwk.pyparsing.Keyword-class.html#DEFAULT_KEYWORD_CHARS"><code>DEFAULT_KEYWORD_CHARS</code></a></b> = <span title="'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$'"><code><span class="variable-quote">'</span>abcdefghijklmnopqrstuvwxyzABCDE<span class="variable-ellipsis">...</span></code>
167
 
</span></td></tr>
168
 
  <tr><td colspan="2">
169
 
    <b>Inherited from <a href="parserFwk.pyparsing.ParserElement-class.html"><code>ParserElement</code></a>:</b>
170
 
      <a href="parserFwk.pyparsing.ParserElement-class.html#DEFAULT_WHITE_CHARS"><code>DEFAULT_WHITE_CHARS</code></a>
171
 
    </td></tr>
172
 
</table><br />
173
 
 
174
 
 
175
 
<!-- =========== START OF INSTANCE METHOD DETAILS =========== -->
176
 
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
177
 
<tr bgcolor="#70b0f0" class="details">
178
 
  <th colspan="2">Instance Method Details</th></tr>
179
 
</table>
180
 
 
181
 
<a name="copy"></a>
182
 
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
183
 
  <h3><span class="sig"><span class="sig-name">copy</span>(<span class=sig-arg>self</span>)</span>
184
 
  </h3>
185
 
  Make a copy of this ParserElement. Useful for defining different 
186
 
  parse actions for the same parsing pattern, using copies of the 
187
 
  original parse element.
188
 
  <dl><dt></dt><dd>
189
 
    <dl><dt><b>Overrides:</b></dt>
190
 
      <dd><a href="parserFwk.pyparsing.ParserElement-class.html#copy"><code>parserFwk.pyparsing.ParserElement.copy</code></a> <i>(inherited documentation)</i>
191
 
</dd>
192
 
    </dl>
193
 
  </dd></dl>
194
 
</td></tr></table>
195
 
<br />
196
 
 
197
 
 
198
 
<!-- =========== START OF STATIC METHOD DETAILS =========== -->
199
 
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
200
 
<tr bgcolor="#70b0f0" class="details">
201
 
  <th colspan="2">Static Method Details</th></tr>
202
 
</table>
203
 
 
204
 
<a name="setDefaultKeywordChars"></a>
205
 
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
206
 
  <h3><span class="sig"><span class="sig-name">setDefaultKeywordChars</span>(<span class=sig-arg>chars</span>)</span>
207
 
  </h3>
208
 
  Overrides the default Keyword chars
209
 
  <dl><dt></dt><dd>
210
 
  </dd></dl>
211
 
</td></tr></table>
212
 
<br />
213
 
 
214
 
 
215
 
<!-- =========== START OF CLASS VARIABLE DETAILS =========== -->
216
 
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
217
 
<tr bgcolor="#70b0f0" class="details">
218
 
  <th colspan="2">Class Variable Details</th></tr>
219
 
</table>
220
 
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
221
 
<a name="DEFAULT_KEYWORD_CHARS"></a>
222
 
<h3>DEFAULT_KEYWORD_CHARS</h3>
223
 
<dl>
224
 
  <dt></dt>
225
 
  <dd>
226
 
    <dl>
227
 
      <dt><b>Type:</b></dt>
228
 
      <dd>
229
 
          <code>str</code>
230
 
 
231
 
      </dd>
232
 
<span title="'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$'">      <dt><b>Value:</b></dt>
233
 
      <dd><table><tr><td>
234
 
<pre class="variable">
235
 
<span class="variable-quote">'</span>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$<span class="variable-quote">'</span>     </pre>
236
 
        </td></tr></table></dd>
237
 
</span>    </dl>
238
 
  </dd>
239
 
</dl></td></tr></table>
240
 
<br />
241
 
 
242
 
 
243
 
<!-- =========== START OF NAVBAR =========== -->
244
 
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
245
 
  <tr valign="center">
246
 
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="parserFwk.pyparsing-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
247
 
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
248
 
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
249
 
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
250
 
    <th class="navbar" align="right" width="100%">
251
 
      <table border="0" cellpadding="0" cellspacing="0">
252
 
      <tr><th class="navbar" align="center">
253
 
        <p class="nomargin">
254
 
          pyparsing
255
 
      </p></th></tr></table>
256
 
    </th>
257
 
  </tr>
258
 
</table>
259
 
 
260
 
<table border="0" cellpadding="0" cellspacing="0" width="100%">
261
 
  <tr>
262
 
    <td align="left"><font size="-2">Generated by Epydoc 2.1 on Sun Jul 22 09:32:59 2007</font></td>
263
 
    <td align="right"><a href="http://epydoc.sourceforge.net"
264
 
                      ><font size="-2">http://epydoc.sf.net</font></a></td>
265
 
  </tr>
266
 
</table>
267
 
</body>
268
 
</html>