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


Groups > comp.compilers > #2862

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

From Roger L Costello <costello@mitre.org>
Newsgroups comp.compilers
Subject Does the theory and algorithms of compiler design also apply to data formats?
Date 2022-01-22 23:54 +0000
Organization Compilers Central
Message-ID <22-01-100@comp.compilers> (permalink)

Show all headers | View raw


Hello Compiler Experts!

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?

/Roger
[You could, but for the most part their syntax is so simple that a
formal parser would be overkill. For example, JSON has a handful of
atoms and only two data structures, a sequential list and a key:value
object.  Everything else is the semantics.  The Microsoft formats like
docx, xlsx, and pptx are in fact zip files containing XML files.  Unzip
one and take a look.
Also look at XDR, a widely used network data format and rpcgen which compiles
an XDR description into code to read and write it. -John]

Back to comp.compilers | Previous | NextNext 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