[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bison parser for machine-like language

From: Laurence Finston
Subject: Re: Bison parser for machine-like language
Date: Wed, 5 Jan 2005 19:25:57 +0100 (MET)

On Wed, 5 Jan 2005, Hans Aberg wrote:

> It looks like something to ask in the newsgroup comp.compilers.

I thought about that, but I don't think my query would be appropriate
there, because I'm specifically interested in using
Bison for the parsing.  As far as the language design is concerned, I
think the problem is fairly straightforward, since the language won't have
to do very much.   All I want to do is dump information from a `Scanner_Node'
(discussed in previous threads) and then read the dumped file to create
`Id_Maps' and `Id_Map_Entry_Nodes' on a `Scanner_Node' in a subsequent
run of GNU 3DLDF.  The `Id_Map_Entry_Nodes' contain the objects created by
parsing an input file, so that `Scanner_Nodes' represent the
state of a parse.

I will probably model the language on Knuth's
MMIX language, which is designed to be like current machine languages, but
it won't have to be so complicated.

I've "compiled" Emacs-Lisp code into byte-code, but I don't really know
what the latter is.  I was just planning to use C++'s facilities for
reading and writing binary files.  I've tried this with C, but some time
ago, and I've never done it with C++.  I've always assumed that byte-code
would be less compact than such binary files, but I've never gone into
this subject before.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]