Re: lexing backwards

"Ron Pinkas" <Ron@Profit-Master.com>
14 May 2003 00:53:11 -0400

          From comp.compilers

Related articles
[3 earlier articles]
Re: lexing backwards maratb@cs.berkeley.edu (Marat Boshernitsan) (2003-04-07)
Re: lexing backwards stan@zaborowski.org (Stan Zaborowski) (2003-04-13)
Re: lexing backwards Ron@Profit-Master.com (Ron Pinkas) (2003-04-13)
Re: lexing backwards monnier+comp.compilers/news/@rum.cs.yale.edu (Stefan Monnier) (2003-04-15)
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: "Ron Pinkas" <Ron@Profit-Master.com>
Newsgroups: comp.compilers
Date: 14 May 2003 00:53:11 -0400
Organization: PTS
References: 03-04-015 03-04-026 03-04-030 03-05-044
Keywords: lex
Posted-Date: 14 May 2003 00:53:11 EDT

>Self Contained
>---------------
>
>These are tokens like the C language:
>
> -> ++ -- := ==
>
>That's to say no Delimiter is required to terminate such token. One may
also
>think of this class of tokens, as Multi-Character delimiters. 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.
>
> Counterexample:
>
> a/*comment*/=5;
> ^^
> If I follow you correctly "/=" is a self-contained token, but
> that is not how the above would be parsed in C/C++.
>
> [snip]


Please note that the text you quoted included this text:


-------------------------------------------------------------
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.
-------------------------------------------------------------


Original post also included this:


-------------------------------------------------------------
[Comments may also be considered streams, though they
may be commonly handled at a pre-lexing statge.]
-------------------------------------------------------------.


Ron


Post a followup to this message

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