Browse thread
Dypgen C++ grammar
[
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: | Taras Glek <taras.judge@s...> |
| Subject: | Re: [Caml-list] Dypgen C++ grammar |
skaller wrote: > On Mon, 2007-06-25 at 14:26 -0700, Taras Glek wrote: > >> Hi Scott, >> Why write yet another incomplete C++ parser? You can already get a very >> nice OCaml representation of a C++ program through olmar( >> http://www.cs.ru.nl/~tews/olmar/ ). >> > > Because last I looked, olmar doesn't work, and that's > because Elkhound and Elsa, on which they're based, don't work. > By that I mean, there are bugs. > Right, and you expect to write a C++ parser without bugs that will compile everybody's weird C++? If something is complicated and has bugs, it's typically much easier to fix bugs than to write a competing library. Elsa has an some interesting design decisions, but it's a well-written library, I don't expect to see another C++ parser parser of this quality anytime soon. > >> If that doesn't suit your needs, why not point out the problems and >> maybe work together to solve them? >> > > Elkhound and Elsa are both C++ programs, which creates > portability issues, and the team maintaining them refused > to cooperate with my requirements. > I don't see why anyone would cooperate with "requirements". I think between me, the olmar maintainer and the oink maintainers we can reach a solution that benefits everybody. > My system Felix consists of an Ocaml based compiler, > which generates C++ sources. > > I actually have a *fork* of Elkhound built in to the > compile and run time system for generating parsers, > but this doesn't apply to parsing Felix sources: > I'm currently switching from Ocamlyacc to Dypgen as a > parser. > > Frankly .. I want an embeddable Ocaml code: binding > to a C++ built executable is tricky (you'd need to > use some crud like XML as an interchange format), > and it isn't extensible. > Yes, XML stuff is elsa is a deadead, but the olmar approach is a good one. > Using Frontc/Cil, which is *also* part of Felix, > is much better -- I have already embedded part of > the C parsing capabilities directly into the Felix compiler. > There is a big step from C to C++. I think you are underestimating the difficulty of it. I don't mean to imply that you don't know C++ as even Stroustroup mentioned you by name in his recent report on C++. I'm just saying that it's a lot of work. > The bottom line is that I want code written in Ocaml > because I'm sooooo sick of portability hassles.. :) > > Wouldn't we all like that :) Taras