[LLVMdev] 'Implementing a language with LLVM' tutorial

Chris Lattner sabre at nondot.org
Mon Nov 5 17:53:45 PST 2007

On Mon, 5 Nov 2007, Ryan Brown wrote:
> Very nice.  Here's a couple comments on the first 6 chapters:
> http://llvm.org/docs/tutorial/LangImpl1.html
> "We handle comments by skipping to the end of the line and then
> returning the next comment."
> Shouldn't this say "returning the next comment"?


> http://llvm.org/docs/tutorial/LangImpl2.html
> I was a bit confused at first because the AST node classes are called
> ASTs. Instead of saying "ExprAST node" all the time, who not just call
> the class ExprNode or ExprAstNode?

I don't think ExprNode or ExprASTNode is more clear than ExprAST. 
"ExprAST" is the right thing because they are AST's and they are Expr 

> http://llvm.org/docs/tutorial/LangImpl3.html
>  case '<':
>    L = Builder.CreateFCmpULT(L, R, "multmp");
> Should this be something like "cmptmp"?

What a pain.  Fixed :)

> Also, you mention zero-argument functions, but it doesn't look like
> you can parse function calls with zero arguments.

Also painful to fix, but also fixed.  Thanks.

> http://llvm.org/docs/tutorial/LangImpl5.html
> At this point, you are probably starting to think "on no!
> Should be "Oh no"


> There's no link to the next chapter at the end of this chapter.


Thanks Ryan,


> On 11/5/07, Chris Lattner <sabre at nondot.org> wrote:
>> On Mon, 5 Nov 2007, Aaron Gray wrote:
>>>> Anyone have thoughts or feedback? :)
>>> Nice job. The only bit that is not immediately clear is the 'Proto'
>>> variable, but is clear when looking through the code at the end of the page.
>> Where in the tutorial?  What would you suggest that I say?
>>> Could do with a link to the LLVMBuilder class reference material.
>> I added a link to the doxygen info, thanks!
>> -Chris
>> --
>> http://nondot.org/sabre/
>> http://llvm.org/
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



More information about the llvm-dev mailing list