[LLVMdev] OCaml
Chris Lattner
sabre at nondot.org
Sun Nov 25 13:00:34 PST 2007
>> Lexing is the one issue though.
>
> How do you mean?
I think he's observing that a majority of the tutorial code is
actually spent on the lexer and parser, not on the llvm-specific pieces.
> I'm just fiddling around with it now. The lexer, parser and AST
> written using
> camlp4 might look something like this in OCaml:
Sure, the existing tutorial would be shorter if the lexer/parser used
lex/yacc too, but that wasn't the goal :). The goal was the make it
as simple and easy for newbies to understand, even if they didn't have
any previous compiler experience.
-Chris
More information about the llvm-dev
mailing list