From: Mathieu Bouchard Date: 2002-01-14T22:48:01+09:00 Subject: Re: Markus' ruby-parser On Mon, 14 Jan 2002, Robert Feldt wrote: > On Sun, 13 Jan 2002, Mathieu Bouchard wrote: > > Note that I have the intention of bundling one parser with MetaRuby. I'd > > like to know which one would be the best, and why. > Let me just summarize the state of Rulator as compared to markus parser: I'm sorry that I lost the log of my first irc conversation with you... > * Lexer is pretty well tested but not all constructs in the language has > been tested with the parser so some bugs still there. What is needed is to > write some more tests for the parser (singletons for example). How about a shareable test suite ? The main issue I see is there are several equivalent ways of parsing some expressions. For example, semicolons parse to Body structures, which have no predefined associativity, and for which flattening has no effect. If two different parsers can give two slightly unequal - but equivalent - expressions, how can all parsers have common tests? Or maybe this is a non-issue and all parsers should give exactly the same output. > handler builds an AST). So Rulator can use RubySchema if someone writes a > handler that builds RubySchema's instead of RubyTerm's. Calling the > handler buys flexibility for a small performance penalty. yeah, got that. i'll eventually get to that with a potential partial merging of RubyTerm. > Matju and I have already discussed how the resolution of RubySchema > can actually be increased if one wants to (Plus = Expr.of(:+) for > example). That would be Plus = M.of(:+), my mistake; also, a+b is M[LVar[:a],:+,[LVar[:b]],nil,nil] instead of Expr[Id["a"],:+,Id["b"]]. But the increased resolution would only would work with case-exprs, because Types in general only work with case-statements; you need Modules if you need decentralized dispatch. plus, case-exprs are slow, while method-dispatch is fast. > That's about it. Our intention has been to merge them but it hasn't > happened yet. I'd like to have both of them more tested and conform to a same spec. > (and the deadline for my PhD project started coming really close... > ;-)). How did it go? ________________________________________________________________ Mathieu Bouchard http://hostname.2y.net/~matju