Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] CFG's and OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-08-15 (15:31)
From: Brian Hurt <bhurt@s...>
Subject: Re: [Caml-list] CFG's and OCaml
On Sun, 15 Aug 2004, Jon Harrop wrote:

> I believe you are unnecessarily constraining the AST to be a binary
> tree. 

No, I was trying to make a graphical point.

> I think Skaller referred to the implementation of a parser for this as a 
> "chain operator", which I understand to be a way non-associative operators 
> may be parsed to create a node in the AST with a list of operands, rather 
> than the usual pair of operands.

Yep.  But notice where the trick was- it wasn't in the yacc grammar, it 
was in the Ocaml code.  He parsed the sequence as:
    / \
   a   <
      / \
     b   c

Forget I said AST.  How are the yacc rules applied?

"Usenet is like a herd of performing elephants with diarrhea -- massive,
difficult to redirect, awe-inspiring, entertaining, and a source of
mind-boggling amounts of excrement when you least expect it."
                                - Gene Spafford 

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: