Jonathan S. Shapiro wrote: > On Wed, Feb 11, 2009 at 4:13 PM, <"jan"[email protected] > <mailto:[email protected]>> 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
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
