caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Oliver Bandel <oliver@first.in-berlin.de>
To: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Camlp4-tutorial-Example
Date: Wed, 4 Sep 2002 21:46:53 +0200 (MET DST)	[thread overview]
Message-ID: <Pine.LNX.3.95.1020904213543.194A-100000@first.in-berlin.de> (raw)
In-Reply-To: <20020903090842.B30173@verdot.inria.fr>

Hi,

On Tue, 3 Sep 2002, Daniel de Rauglaudre wrote:

> Hi,
> 
> On Mon, Sep 02, 2002 at 10:52:27PM +0200, Oliver Bandel wrote:
> 
> > What I do not understand:
> > This calculator knows that * and / have higher Priority
> > than + and -.
> > How is this achieved?
> 
> By the order of the rules. The rules with same priority are grouped
> together:
>    [ ... | ... | ... ]
> 
> and there is another level of parentheses (of bracket parentheses)
> separated by vertical bars to indicate the priority:
>   [
>        [ ... | ... | ... ]        (* lowest priority *)
>      | [ ... | ... | ... ]        ...
>      | [ ... | ... | ... ]        (* highest priority *)
>   ]      
[...]

Ok, that was surprising.
But it's a very good idea. :)

BTW: The problem in the tutorial, I mentioned was my own:
I wrote wrong code.
But the reason was, that I didn't understand how the
Camlp4 really works (the Grammar-Module).

I now print the tutorial out to paper, and hope I will
see problems better than on screen.

But in general, Ocaml-Software seems to be written
for many-years-Ocaml-programmers: They are very fluently
in understanding the mli-files and using them as
sufficient for programming.

Maybe I should read more informations7documentations about
the Module-system, so that I can rely on the same
mechanism: Reading the mli-files to understand the
programs.

But nevertheless, an overwiev-documentation is always a good
Idea.

I hope that I will understand the Camlp4-tutorial,
now where I can write my comments on the paper. ;-)


> 
> > I didn't find any entries, that provide priority-distinction
> > between +,-,*,/.
> 
> Forget Yacc! :-)

OK, I decided to forget it now.

What is yacc?

;-)


> 
> > Is the Grammar-Module magic?
> > (Gramagic?)
> 
> What do you mean by "magic"?

It was a joke. :)

It looked like the Camlp4-Preprocessor and the Grammar-Module
did know, what to do, and how to handle mathematical operations.

After experimenting with changing the levels of the tutorial's
code, I thought, that the levels may be levels of priority.

I thought, not to read it in the tutorial, but maybe I have not
seen it there. I will reread the tutorial in a more patient
manner.

Ciao,
   Oliver

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2002-09-04 19:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-02 19:52 Oliver Bandel
2002-09-02 20:52 ` Oliver Bandel
2002-09-02 21:43   ` Oliver Bandel
2002-09-03  7:08   ` Daniel de Rauglaudre
2002-09-04 19:46     ` Oliver Bandel [this message]
2002-09-06 23:10     ` Oliver Bandel
2002-09-07 15:52       ` Daniel de Rauglaudre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.3.95.1020904213543.194A-100000@first.in-berlin.de \
    --to=oliver@first.in-berlin.de \
    --cc=caml-list@inria.fr \
    --cc=daniel.de_rauglaudre@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).