On 9 April 2010 18:52, Seth Hetu <[email protected]> wrote:
>> I thought recursive descent was used only for parsers, not lexers (but
>> maybe complicated context sensitive grammars would require them)?
>
> Ah, you caught me there. I've confused parsers and lexers again.
> Nonetheless, a proper lexer is no small feat (I've had to constantly
> re-write my own lexers as I found edge cases where they fail).

Hand coding a lexer for a language with complex grammar is difficult -
one of the only parts of fb2cpp that is finished is the lexing (which
uses a combined lexer/parser generator), and I discovered enormous
numbers of bugs in fbc's hand coded lexer while writing it - but right
now HSpeak's lexer is really simple, actually.

> I guess you're going for a parser next? If so, good luck. I like the
> SableCC  parser-generator myself, but that's Java-based.
>
> -->Seth

No, I won't: I don't really want to rewrite HSpeak. HSpeak is kind of
a hand coded recursive decent parser, but unusually it does its
parsing in multiple passes (about 5 or so?)
_______________________________________________
Ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to