Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #2863

Re: Does the theory and algorithms of compiler design also apply to data formats?

Path csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From gah4 <gah4@u.washington.edu>
Newsgroups comp.compilers
Subject Re: Does the theory and algorithms of compiler design also apply to data formats?
Date Sat, 22 Jan 2022 20:33:49 -0800 (PST)
Organization Compilers Central
Lines 45
Sender news@iecc.com
Approved comp.compilers@iecc.com
Message-ID <22-01-102@comp.compilers> (permalink)
References <22-01-100@comp.compilers>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Injection-Info gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="43302"; mail-complaints-to="abuse@iecc.com"
Keywords parse, practice
Posted-Date 23 Jan 2022 15:06:54 EST
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
In-Reply-To <22-01-100@comp.compilers>
Xref csiph.com comp.compilers:2863

Show key headers only | View raw


On Saturday, January 22, 2022 at 5:54:52 PM UTC-8, Roger L Costello wrote:

> The books that I've read always talk about applying compiler theory and
> algorithms to programming languages. But there are other kinds of languages
> such as XML, JSON, Comma-Separated-Values (CSV). And aren't data formats such
> as JPEG, Powerpoint (ppt), Excel (xls) also languages? Does the rich theory
> and vast algorithms of compilers apply to these non-programming languages? Has
> anyone created a Bison parser for JPEG? For JSON? For CSV?

In the cases where a data format has enough structure to be parsable with
compiler tools, it is usually named a programming language.  (Unless you
define programming language as only something that can be converted
into executable object code for actual hardware.)

JPEG files are actually EXIF files containing JPEG image data.
The EXIF part contains other information such as data, time, shutter
speed, and pretty much anything related to the camera and settings
that one could think of.

Many data formats are the simplest format for the internal data
structures for some program.

PostScript is a programming language designed for controlling
printers, but it does have many of the characteristics of a more
general purpose language.  It is mostly meant to be written by
programs, but can be written by people. Some PostScript
programs contain macros to parse data inside the file and
format it for output, such as plots.

TeX is a document description language that also has
many general language features.  It is pretty much not
parsable with compiler tools, as just about everything
can be changed inside the program, such as which
characters are letters.  Since changes take effect
right away, the parser can't do too much look ahead.

metafont is a language, meant to be used with TeX,
meant for designing fonts.  It looks and works more
like a programming language, though with some features
that usual programming languages don't have.  Among
others, instead of the usual assignment statement, but
defines the relationship between variables, more generally.

In all these cases, and I am sure more, the difference
between data and program blurs just enough.

Back to comp.compilers | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Does the theory and algorithms of compiler design also apply to data formats? Roger L Costello <costello@mitre.org> - 2022-01-22 23:54 +0000
  Re: Does the theory and algorithms of compiler design also apply to data formats? gah4 <gah4@u.washington.edu> - 2022-01-22 20:33 -0800
    Re: Does the theory and algorithms of compiler design also apply to data formats? Thomas Koenig <tkoenig@netcologne.de> - 2022-01-23 21:05 +0000
  Re: Does the theory and algorithms of compiler design also apply to data formats? "matt.ti...@gmail.com" <matt.timmermans@gmail.com> - 2022-01-23 06:58 -0800

csiph-web