comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@telepath.com>
Subject: Re: put a character back to the input stream
Date: 1999/10/25
Date: 1999-10-25T00:00:00+00:00	[thread overview]
Message-ID: <7v1nf4$41j$1@nnrp1.deja.com> (raw)
In-Reply-To: 3811B324.D0CC49A3@hotmail.com

In article <3811B324.D0CC49A3@hotmail.com>,
  sy278@is9.nyu.edu wrote:
> which i read a character each time
> "name + 342"
> when i found a digit, i know the whole thing's gonna be a number, so i
> put the read digit back, then read the whole number. the same thing
> happens for the string too. so i need a function to put back the
> current read character back to avoid lose the first character.

It sounds like you are doing lexical analysis on a stream of characters.
That's exactly what OpenToken was created to do. It will handle
all the minutia about reading, analyzing, and buffering characters for
you. Unless this is a homework assignment, I encourage you to check it
out at http://www.telepath.com/dennison/Ted/OpenToken/OpenToken.html

--
T.E.D.


Sent via Deja.com http://www.deja.com/
Before you buy.




      parent reply	other threads:[~1999-10-25  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-23  0:00 put a character back to the input stream Frank Shixiang Yan
1999-10-23  0:00 ` nabbasi
1999-10-24  0:00   ` Robert Dewar
1999-10-25  0:00 ` Ted Dennison [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox