------ art_10607_23574243.1195228478981
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On Nov 16, 2007 1:20 AM, Markus Liedl <m.liedl / gmx.de> wrote:
> I have spent the last months to write an alternative Ruby grammar now
> registered at rubyforge.org under the name "Ruby top down grammar".
>
> The grammar is hosting language neutral. It must be interpreted or
> translated to be run, i.e. to parse something. Currently there are two
> translators, one to Emacs Lisp, the other to C. Both produce recursive
> descent parsers.
>
Great work Mark!
How does this grammar compare with the one the antlr one done by the
"grammarians"? Did you start from there or from scratch?
I looks like you have a unified lexer/parser. With all of the ruby parser
dependent lexer states, I can see why this might be easier. But, this is
probably also why you might be losing performance (and why you need
memoization), right? I'm guessing there might be some backtracking needed?
Do you have (E)BNF of this LL grammar, or just gram.lisp?
I'm thinking one of my next steps for my ruby-forge Grammar package (LL
grammar specified in BNF-like ruby) would be to write a (E)BNF parser to be
able to translate BNF from antlr/yacc/racc/etc. Even though mine is LL, I
handle some amount of left recursion. Of course, I'd
like to target a ruby (E)BNF working.
------ art_10607_23574243.1195228478981--