[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-date: Tue Oct 26 18:53:59 2004 -->
- <!--x-from-r13: wbr ng znqrjryy.pbz (Xbr Egrryr) -->
- <!--x-message-id: [email protected] -->
- <!--x-subject: [Fwd: Re: [ale] OT: Lex pattern expression struggles] -->
- <h1>[fwd: Re: [ale] OT: Lex pattern expression struggles]</h1>
- <li><em>date</em>: Tue Oct 26 18:53:59 2004</li>
- <li><em>from</em>: joe at madewell.com (Joe Steele)</li>
- <li><em>subject</em>: [Fwd: Re: [ale] OT: Lex pattern expression struggles]</li>
- <title>[fwd: Re: [ale] OT: Lex pattern expression struggles]</title>
I think this pattern needs another set of brackets [], like so:
[[:alnum:]]{1,8} * (PARAM)|(TABLE)|(UPDATE) { return TOKEN_BLAH; }
Without the extra brackets, "[:alnum:]" has no special meaning, and
could just as well be "[na:mlu]". In other words, it ends up
matching only on the letters "a", "l", "n", "u", "m", and ":".
Also, because the alternation operator "|" has the lowest precedence
in the pattern, I think this pattern is equivalent to (note the added
parentheses):
([[:alnum:]]{1,8} * (PARAM))|(TABLE)|(UPDATE)
which is equivalent to:
(TABLE)|(UPDATE)|([[:alnum:]]{1,8} * (PARAM))
In other words, the expression ends up looking for an alphanumeric
token and a space before a "PARAM" token, but not before "TABLE" and
"UPDATE" tokens.
--Joe
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00970" href="msg00970.html">[Fwd: Re: [ale] OT: Lex pattern expression struggles]</a></strong>
<ul><li><em>From:</em> charles.shapiro at nubridges.com (Charles Shapiro)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00925.html">[ale] RPM command line help</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00927.html">[ale] DNS problems with comcast, anyone?</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00916.html">[Fwd: Re: [ale] OT: Lex pattern expression struggles]</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00970.html">[Fwd: Re: [ale] OT: Lex pattern expression struggles]</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00926"><strong>Date</strong></a></li>
<li><a href="threads.html#00926"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>