Re: lexing backwards

genew@mail.ocis.net (Gene Wirchenko)
24 May 2003 16:51:43 -0400

          From comp.compilers

Related articles
[7 earlier articles]
Re: lexing backwards cfc@TheWorld.com (Chris F Clark) (2003-04-15)
Re: lexing backwards genew@mail.ocis.net (2003-05-06)
Re: lexing backwards Ron@Profit-Master.com (Ron Pinkas) (2003-05-14)
Re: lexing backwards Ron@Profit-Master.com (Ron Pinkas) (2003-05-16)
Re: lexing backwards genew@mail.ocis.net (2003-05-16)
Re: lexing backwards Ron@Profit-Master.com (Ron Pinkas) (2003-05-18)
Re: lexing backwards genew@mail.ocis.net (2003-05-24)
| List of all articles for this month |

From: genew@mail.ocis.net (Gene Wirchenko)
Newsgroups: comp.compilers
Date: 24 May 2003 16:51:43 -0400
Organization: Posted via Supernews, http://www.supernews.com
References: 03-04-015 03-04-026 03-04-030 03-05-044 03-05-090 03-05-132 03-05-155
Keywords: lex, comment
Posted-Date: 24 May 2003 16:51:42 EDT

"Ron Pinkas" <Ron@Profit-Master.com> wrote:
>> Take 2: (I still enjoy take 1, but my educated public demands
>> more sophisticated entertainment.) No comment, no comment:
>> a=b---c;
>> Parse that backwards.
>> ...
>
>Please note that while the subject of the thread is indeed "lexing
>backwards", nothing in my post made any attempt to address *backward*
>lexing. My original post was in reply to a reply, which highlighted
>certain common classes of tokens. My reply addressed that specific
>subject, and attempted to expand and possibly further clarify that
>approach, as the conceptual basis for developing generic lexing
>engine.


          Note that "Once found in the input outside the context of a
Stream, they serve as unconditional terminator of the prior input, and
are also tokens on their own." does not say anything about the reverse
order. If you are in a situation where backwards lexing is being
considered, look-ahead (look-behind?) may be necessary to lex
correctly. It is not enough to lex in reverse.


Sincerely,


Gene Wirchenko
[Here endeth this particular argument. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.