Since dypgen accepts and emits O'Caml, how does it help us for BitC? Or are you proposing building a BitC version?
shap On Wed, Feb 25, 2009 at 1:31 PM, Pal-Kristian Engstad < [email protected]> wrote: > Hi, > > In the OCaml world, there is Dypgen, a self-extensible parser and lexer > generator (http://dypgen.free.fr). It is a GLR parser that is very easy > to use, and it is easy to add fixity declarations. It is in active > development and the author seems very keen to listen to feature > requests. I would recommend using this frame-work, if only for the > front-end part of the compiler. > > Thanks, > > PKE. > > Jonathan S. Shapiro wrote: > > The BitC s-expression syntax is now showing a lot of strain. While > > s-expressions make a great deal of sense as an expression syntax, they > > aren't that great for declarations. The most recent example is that we > > wanted to discriminator tag values in unions, and there doesn't seem > > to be any graceful way to do it. > > > > You all know that I've done some preliminary work toward a post-sexpr > > surface syntax. Most of it looks straightforward. There are two issues > > that I have run into: > > > > 1. I am having difficulty coming up with a sensible syntax for loops. > > The statement-style syntax doesn't seem to lend itself to a functional > > (non-stateful) loop idiom. I would appreciate suggestions on this. > > > > 2. I'm increasingly convinced (however reluctantly) that mixfix is > > important in a non-sexpr surface syntax. The problem with this is that > > (a) there are no parser generators that seem to support this and (b) > > writing a parser for the non-sexpr syntax by hand is probably not the > > best way to coverge on a syntax. Once the syntax is stable it's not a > > problem, but hand-written parsers do not tend to be easily modified or > > easily validated. > > > > Can anyone point me at a parser generator that can be made to handle > > mixfix, or suggest some means by which an existing parser generator > > might be kludged into service at the semantic actions level? As a > > concrete example, I have considered a parse strategy in which the > > parser builds a list rather than a tree and the semantic action pass > > decides how to recover a tree from the result. Are there examples of > > this sort of thing being done successfully? > > > > I'm prepared to build a parser generator; I would just prefer not to > > do one that is excessively clever. :-) > > > > shap > > PKE. > > -- > Pål-Kristian Engstad ([email protected]), > Lead Graphics & Engine Programmer, > Naughty Dog, Inc., 1601 Cloverfield Blvd, 6000 North, > Santa Monica, CA 90404, USA. Ph.: (310) 633-9112. > > "Emacs would be a far better OS if it was shipped with > a halfway-decent text editor." -- Slashdot, Dec 13. 2005. > > > > _______________________________________________ > bitc-dev mailing list > [email protected] > http://www.coyotos.org/mailman/listinfo/bitc-dev > >
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
