[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| 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
Brian
-------------------
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