help-bison
[Top][All Lists]
Advanced

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

Re: 3DLDF


From: Hans Aberg
Subject: Re: 3DLDF
Date: Sat, 14 Aug 2004 20:27:32 +0200

At 19:27 +0200 2004/08/14, Laurence Finston wrote:

>  I'm currently
>working on the next release, which is interactive and includes a Bison parser.
>  Once it's released, users of 3DLDF will no longer need to write C++ code and
>rebuild the executable in order to use the package.

This is good, because as it is, it is not so user friendly.

>This also implies that I
>will have to completely rewrite the introductory chapters of the manual.

You may have a look at the Bison manual, how it quickly goes through some
examples. Of course, this Bison manual does not give as much instructions
as some newbies would want. I think that the some of the examples in your
Pictures sections should be lifted out to produce the equivalent of the
Bison calculator example.

>I appreciate your suggestions, but I don't see any advantage to coding an
>intermediate language.

You do as you want, as it is your program. But you sounds as Akim Demaille
before he implemented M4 into Bison.

>I believe that a Metafont-like language will
>provide all the generality and convenience I need, and that a machine-like
>language is most suitable for cases where efficiency is paramount and code can
>be generated automatically.

I think that these discussions started with your problems of using Bison to
implement a MetaFont-like language. But if you have no problems there, just
go ahead.

>I designed the types
>and functions  defined in 3DLDF with the Metafont-language in mind.  Hence
>`Point' in the C++ code corresponds to `point' in the 3DLDF language, `Path'
>to `path', etc.

The point (no pun intended!) with the intermediate language is that you no
longer need to have that coupling: You merely need to create C++ classes
for the geometric objects you want. In particular, you need not deal with
this complicated constructor business, as merely need to somehow set the
parameters via the intermediate language. It will be easy to add new
geometric packages. Then you MetaFont-language will produce code for you
intermediate language.

>You might find it interesting to look at Metafont's grammar.  Knuth
>describes it using Backus-Naur form in _The METAFONTbook_, especially chapters
>25 and 26.  It's very clever and well thought out.  I never really understood
>it (or even tried to) until I started using it as the basis of my Bison
>grammar.

I'll take a raincheck on it for now. I want to design my own grammars. :-)

  Hans Aberg






reply via email to

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