diff options
author | Chris Lattner <sabre@nondot.org> | 2007-10-23 05:43:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-10-23 05:43:01 +0000 |
commit | e39ea9e4dee04f611eb123190aa42c095dfe199a (patch) | |
tree | 42920ba2cad7a8b0c46e2c0c5c159ab62e652498 /docs | |
parent | f7325efa7fcb7528707407d94d0294944bc4a6dd (diff) | |
download | external_llvm-e39ea9e4dee04f611eb123190aa42c095dfe199a.zip external_llvm-e39ea9e4dee04f611eb123190aa42c095dfe199a.tar.gz external_llvm-e39ea9e4dee04f611eb123190aa42c095dfe199a.tar.bz2 |
Fix up a broken #include, move code to its own section, add conclusions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43239 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r-- | docs/tutorial/LangImpl2.html | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/docs/tutorial/LangImpl2.html b/docs/tutorial/LangImpl2.html index 1fdd442..510c937 100644 --- a/docs/tutorial/LangImpl2.html +++ b/docs/tutorial/LangImpl2.html @@ -753,20 +753,40 @@ $ </pre> </div> +<p>There is a lot of room for extension here. You can define new AST nodes, +extend the language in many ways, etc. In the <a href="LangImpl3.html">next +installment</a>, we will describe how to generate LLVM IR from the AST.</p> + +</div> + +<!-- *********************************************************************** --> +<div class="doc_section"><a name="code">Full Code Listing</a></div> +<!-- *********************************************************************** --> + +<div class="doc_text"> + <p> -Here is the full code. Note that it is fully self-contained: you don't even -need LLVM for this. In the <a href="LangImpl3.html">next installment</a>, we -will describe how to generate LLVM IR from the AST.</p> +Here is the complete code listing for this and the previous chapter. +Note that it is fully self-contained: you don't need LLVM or any external +libraries at all for this (other than the C and C++ standard libraries of +course). To build this, just compile with:</p> <div class="doc_code"> <pre> -// To build this: -// g++ -g toy.cpp -// ./a.out + # Compile + g++ -g toy.cpp + # Run + ./a.out +</pre> +</div> +<p>Here is the code:</p> + +<div class="doc_code"> +<pre> #include <cstdio> #include <string> -#include < +#include <map> #include <vector> //===----------------------------------------------------------------------===// |