[
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: | Jon Harrop <jon@j...> |
| Subject: | Re: [Caml-list] CFG's and OCaml |
On Sunday 15 August 2004 16:39, Brian Hurt wrote: > Forget I said AST. How are the yacc rules applied? > ... Right, yes, I see what you mean. So we're talking about using LR(1), which is necessarily a binary tree (albeit of function calls and not AST), to build up non-binary-tree data structures. This kind of goes back to what I said originally about doing as much work as possible within LALR(1) and using post-processing to do the rest. Although, in this case, I think yacc will enforce correctness, e.g. even "a<b>c<d>e" is correct etc., so the post-processing doesn't need to do any checking here. As Skaller pointed out off list, the ability to write "a<=b<c" has advantages in terms of short-circuit evaluation as well... Cheers, Jon. ------------------- 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