comp.lang.ada
 help / color / mirror / Atom feed
From: Hyman Rosen <hymie@prolifics.com>
Subject: Re: Announce: OpenToken 2.0 released
Date: 2000/02/01
Date: 2000-02-01T18:16:05+00:00	[thread overview]
Message-ID: <t790146b69.fsf@calumny.jyacc.com> (raw)
In-Reply-To: 876unj$jcs$1@nnrp1.deja.com

Ted Dennison <dennison@telepath.com> writes:
> Proper binary support is not in OT because it has just never come up
> before. But as you can see, it could be modified fairly easily to
> support parsing binaries. But using a sentinel character for the end of
> file has always seemed like a nice simplification. So what are the uses
> of parsing binaries? I kinda thought that binaries are, by their very
> nature, already parsed.

Well, at one point I was writing code to parse Adobe PDF files.
They have a binary format, where arbitrary 8-bit bytes can appear,
and a structure which I think lends itself well to syntax-oriented
parsing.

In general, I like to avoid arbitrary restrictions in tools. Before
GNU, most classic UNIX utilities had arbitrary limits, especially
on line size. This led to unexpected and sometimes silent breakage
when the tools were fed files with lines which were too large. And
the tool reporting the problem isn't of much help, when I still have
that file I need to process and the tool won't work.

By the way, the normal C/C++ style for handling EOF is to have the
return type of the character reader be such that it can hold any
value of the character set, plus an out-of-band value representing
EOF. The usual is '#define EOF -1' and 'int getchar()'.




  reply	other threads:[~2000-02-01  0:00 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-27  0:00 Announce: OpenToken 2.0 released Ted Dennison
2000-01-28  0:00 ` Jürgen Pfeifer
2000-01-28  0:00   ` Ted Dennison
2000-01-31  0:00 ` Hyman Rosen
2000-02-01  0:00   ` Ted Dennison
2000-02-01  0:00     ` Hyman Rosen [this message]
2000-02-01  0:00       ` David Starner
2000-02-01  0:00         ` Brian Rogoff
2000-02-01  0:00           ` Hyman Rosen
2000-02-01  0:00             ` Brian Rogoff
2000-02-02  0:00               ` Hyman Rosen
2000-02-02  0:00             ` Vladimir Olensky
2000-02-01  0:00               ` Hyman Rosen
2000-02-02  0:00             ` Jeff Carter
2000-02-02  0:00       ` Ted Dennison
2000-02-04  0:00         ` Ted Dennison
2000-02-05  0:00           ` Ehud Lamm
2000-02-04  0:00       ` Florian Weimer
2000-02-07  0:00         ` Hyman Rosen
2000-02-07  0:00           ` Florian Weimer
2000-02-07  0:00             ` Hyman Rosen
2000-02-09  0:00           ` Robert A Duff
2000-02-09  0:00             ` Hyman Rosen
2000-02-09  0:00               ` Larry Kilgallen
2000-02-17  0:00               ` Robert A Duff
2000-02-17  0:00                 ` Hyman Rosen
2000-02-17  0:00                   ` Hyman Rosen
2000-02-17  0:00                     ` Robert A Duff
2000-02-17  0:00                       ` Hyman Rosen
2000-02-17  0:00                   ` Robert A Duff
     [not found]                   ` <88iuk2$s6d3@ftp.kvaerner.com>
2000-03-05  0:00                     ` [OT] C and in-band signalling (was: Re: Announce: OpenToken 2.0 released) Florian Weimer
2000-03-06  0:00                       ` Tarjei T. Jensen
2000-03-06  0:00                         ` Keith Thompson
replies disabled

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