Re: It's the abstraction, man!



Paul Tarvydas <tarvydas@xxxxxxxxxxxxxxxxxxxxxxx> writes:
Bizarrely, lispers and compiler-ists often shun each others' tools.

Only for the first phases.

E.G. Most compiler-ists I know don't use lisp - probably because the thought
of writing RPN parse-trees (sexprs) manually offends them.

Counter example: Richard Stallman (have a look at the sources of gcc,
you might have a surprise).

But compiler-ists tend to use the language they compile to implement
their compilers, and since there's more job implementing non-lisp
compilers, they naturally use more non-lisp programming languages.



E.G. Most lispers don't use compiler tools. I am unaware of lisp macros
that employ yacc-like automata to parse their arguments. (Maybe I'm just
ignorant in this case - I await counter-examples :-).

http://www.cliki.net/parser

But to parse Lisp, you don't need the complexity of a parser
generator. To begin with the Common Lisp reader algorithm is
specified in such a way that the applicability of a parser generator
is dubious. You could use one to parse the standard readtable, but
it's so simple a grammar that it's hardly worth using a generator:
it's simplier to write a parser for the standard readtable by hand.

And that said, lexing and parsing are just trivial parts of
compilation. It becomes interesting starting from the parse tree. We
already have it, and we write more compilers (or translators) than any
other programmer in average.

--
__Pascal Bourguignon__ http://www.informatimago.com/

Nobody can fix the economy. Nobody can be trusted with their finger
on the button. Nobody's perfect. VOTE FOR NOBODY.
.


Quantcast