By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,331 Members | 1,438 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,331 IT Pros & Developers. It's quick & easy.

Lex Question

P: n/a
I was wondering if the following was possible in lex.

Let's say we have the following text:

+
A+B+C

Can we generated a rule that looks at the first delimiter token (+) and
use that delimiter to read the rest of the message? The delimiter can
be dynamic meaning it can also be sent like the following and still be
read using the same rule.

*
A*B*C

Any help would be appreciated. Thanks.

Jun 20 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
David Shin opined:
I was wondering if the following was possible in lex.


And I'm wondering what made you post a Lex question to comp.lang.c?
--
"Never make any mistaeks."
(Anonymous, in a mail discussion about to a kernel bug report.)

<http://clc-wiki.net/wiki/Introduction_to_comp.lang.c>

Jun 20 '06 #2

P: n/a
"David Shin" <Da**********@gmail.com> writes:
I was wondering if the following was possible in lex.

[snip]

Sorry, we discuss C here, not lex.

You might try comp.unix.programmer.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Jun 20 '06 #3

P: n/a
Thanks.

Keith Thompson wrote:
"David Shin" <Da**********@gmail.com> writes:
I was wondering if the following was possible in lex.

[snip]

Sorry, we discuss C here, not lex.

You might try comp.unix.programmer.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.


Jun 20 '06 #4

P: n/a
Keith Thompson wrote:
"David Shin" <Da**********@gmail.com> writes:
I was wondering if the following was possible in lex.

[snip]

Sorry, we discuss C here, not lex.

You might try comp.unix.programmer.


Or comp.compilers.

--
Chris "seeker" Dollin
"Never ask that question!" Ambassador Kosh, /Babylon 5/

Jun 21 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.