Browse thread
Ocaml compiler features
[
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: | skaller <skaller@u...> |
| Subject: | Re: [Caml-list] Ocaml compiler features |
On Tue, 2007-01-16 at 12:01 -0600, Edgar Friendly wrote: > skaller wrote: > > So is your syntax: > > > > if cond1 then e1 > > elif cond2 then e2 > > .. > > else el > > endif > > > that would do what I want. Now is it possible to keep the open syntax > as well, for the ?: uses of if/then/else? Not directly. You could use IF .. THEN .. ENDIF and have both. Or perhaps you could add if .. do .. done to Ocaml -- "if .. then .. " and "if .. do .. " are both supported in Felix which uses Ocamlyacc to parse it, I think indicating LALR1 can distinguish these two cases? However camlp4 is recursive descent isn't it? -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net