summaryrefslogtreecommitdiffstats
path: root/llvm/docs/tutorial/LangImpl2.html
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-10-23 05:43:01 +0000
committerChris Lattner <sabre@nondot.org>2007-10-23 05:43:01 +0000
commit61353b41dfda85bc2cad0e02efc0a295e03f0988 (patch)
tree2b9a9bf23096f19d3b7c21b07c80673718e7c189 /llvm/docs/tutorial/LangImpl2.html
parent93b76e0c603dae28aa80c0435d6e9cd260f3a63d (diff)
downloadbcm5719-llvm-61353b41dfda85bc2cad0e02efc0a295e03f0988.tar.gz
bcm5719-llvm-61353b41dfda85bc2cad0e02efc0a295e03f0988.zip
Fix up a broken #include, move code to its own section, add conclusions.
llvm-svn: 43239
Diffstat (limited to 'llvm/docs/tutorial/LangImpl2.html')
-rw-r--r--llvm/docs/tutorial/LangImpl2.html34
1 files changed, 27 insertions, 7 deletions
diff --git a/llvm/docs/tutorial/LangImpl2.html b/llvm/docs/tutorial/LangImpl2.html
index 1fdd442c651..510c9377e2e 100644
--- a/llvm/docs/tutorial/LangImpl2.html
+++ b/llvm/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 &lt;cstdio&gt;
#include &lt;string&gt;
-#include &lt;
+#include &lt;map&gt;
#include &lt;vector&gt;
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud