Re: High Level Assemblers vs. High Level Language Compilers

"Ira D. Baxter" <idbaxter@semdesigns.com>
22 Mar 2002 21:19:24 -0500

          From comp.compilers

Related articles
High Level Assemblers vs. High Level Language Compilers whopkins@csd.uwm.edu (2002-03-19)
Re: High Level Assemblers vs. High Level Language Compilers rhyde@cs.ucr.edu (Randall Hyde) (2002-03-21)
Re: High Level Assemblers vs. High Level Language Compilers idbaxter@semdesigns.com (Ira D. Baxter) (2002-03-22)
Re: High Level Assemblers vs. High Level Language Compilers fjh@cs.mu.OZ.AU (2002-03-22)
Re: High Level Assemblers vs. High Level Language Compilers rhyde@cs.ucr.edu (Randall Hyde) (2002-03-24)
Re: High Level Assemblers vs. High Level Language Compilers rhyde@cs.ucr.edu (Randall Hyde) (2002-03-24)
Re: High Level Assemblers vs. High Level Language Compilers kgw-news@stiscan.com (2002-03-24)
Re: High Level Assemblers vs. High Level Language Compilers whopkins@alpha2.csd.uwm.edu (2002-03-31)
Re: High Level Assemblers vs. High Level Language Compilers rhyde@cs.ucr.edu (Randall Hyde) (2002-04-06)
[1 later articles]
| List of all articles for this month |

From: "Ira D. Baxter" <idbaxter@semdesigns.com>
Newsgroups: comp.compilers
Date: 22 Mar 2002 21:19:24 -0500
Organization: Compilers Central
References: 02-03-120 02-03-127
Keywords: design
Posted-Date: 22 Mar 2002 21:19:24 EST

"Randall Hyde" <rhyde@cs.ucr.edu> wrote in message


> ... C is a terrible macro assembler simply
> because it's macro facilities are so weak. C (and derivatives) would
> be a much better language if CPP were beefed up considerably
> ...you could do tremendous
> things (like DSELs) if C (/C++) had a much better macro processor.


Yes, you could do this, and you might be able to code a DSL, but its
syntax will be controlled by limitations of the macro syntax.


There's two reasons for a DSL: one, it encodes a problem domain
situation in problem domain terms (C codes problem domain situations
essentially in machine-level solution terms), *and* it gives a
notation easily readable to a human designer familiar with that
domain. Regular expressions (grep, sed, etc.) are a really good
example that meet both criteria. You can probably code up a set of
macros that will implement regular expressions, but half the value,
readability, is likely lost.


My personal opinion is the DSLs should be supported by the "most
readable" notation that can be engineered, and that the problem of
parsing that should be pushed on parser engineers; why make the entire
crowd suffer?


> However, I'm not a member of the "semantics is everything, syntax is
> nothing" crowd. Being able to specify the syntax of [the
> instructions] is real important.


You need semantics so that a tool can reason/analyze/manipulate the
specification.
You need syntax for people, because they are a fundamental part
of the engineering process. (I'll observe you need syntax for the tools,
also, but they might be radically different, as long as they semantically
encode the same thing).
--
Ira D. Baxter, Ph.D. CTO Semantic Designs, Inc.
http://www.semdesigns.com


Post a followup to this message

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