[bitc-dev] why the switch to c++?
Sam Rushing
sam-bitc at rushing.nightmare.com
Wed Feb 11 18:49:18 EST 2009
Jonathan S. Shapiro wrote:
> On Wed, Feb 11, 2009 at 4:13 PM, <"jan"rtm443x at gmail.com
> <mailto:rtm443x at gmail.com>> wrote:
>
> Or just write the new syntax lexer/parser by hand. Not a lot of
> fun but
> not too hard if it's a sensible syntax (ie. minimal lookahead).
>
>
> It's currently single token lookahead, but its 174 productions at the
> moment and about to grow. I'm not even going to *try* to maintain that
> by hand, and attempting to do so would make validation harder.
For Irken, I wrote a dfa-based lexer. Right now I'm planning on just
using a recursive-descent parser, other options I looked at were:
An Earley parser:
ftp://ftp.cs.indiana.edu/pub/scheme-repository/code/lang/earley.scm ...
.. and combinator parsing (chapter 11 of EOPLv1).
The generator stuff I was talking about earlier makes the connection
between the lexer and the parser nice and simple, when the parser needs
another token it just calls the token generator.
-Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.coyotos.org/pipermail/bitc-dev/attachments/20090211/5b01beda/attachment.html
More information about the bitc-dev
mailing list