Skip to content

Commit 295bcef

Browse files
committed
Fixing up a bunch of reference; move a86 reference to own chapter.
There were a bunch of undefined tags because requiring a86 for-label wasn't actually resolving things correctly, so requiring a86/ast etc. for label fixes that. The a86 reference document has been pulled out to a "chapter" level in the notes. Replaced some uses of the undocumented `Plus` constructor with @.
1 parent eff45eb commit 295bcef

24 files changed

+71
-62
lines changed

www/assignments/3.scrbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@(require "../defns.rkt")
33
@title[#:tag "Assignment 3" #:style 'unnumbered]{Assignment 3: Primitives, conditionals}
44

5-
@(require (for-label a86 (except-in racket ...)))
5+
@(require (for-label a86/ast (except-in racket ...)))
66

77
@bold{Due: @assign-deadline[3]}
88

www/assignments/4.scrbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@(require "../defns.rkt")
33
@title[#:tag "Assignment 4" #:style 'unnumbered]{Assignment 4: Case}
44

5-
@(require (for-label a86 (except-in racket ...)))
5+
@(require (for-label a86/ast (except-in racket ...)))
66

77
@bold{Due: @assign-deadline[4]}
88

www/assignments/5.scrbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@(require "../defns.rkt")
33
@title[#:tag "Assignment 5" #:style 'unnumbered]{Assignment 5: When and unless}
44

5-
@(require (for-label a86 (except-in racket ...)))
5+
@(require (for-label a86/ast (except-in racket ...)))
66

77
@bold{Due: @assign-deadline[5]}
88

www/notes.scrbl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ suggestions for improving the material, @bold{please},
1414
@include-section{notes/1/what-is-a-compiler.scrbl}
1515
@include-section{notes/1/ocaml-to-racket.scrbl}
1616
@include-section{notes/a86.scrbl}
17+
@include-section[(lib "a86/scribblings/a86.scrbl")]
1718
@include-section{notes/abscond.scrbl}
1819
@include-section{notes/blackmail.scrbl}
1920
@include-section{notes/con.scrbl}

www/notes/a86.scrbl

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#lang scribble/manual
22

33
@(require (for-label (except-in racket compile)
4-
a86))
4+
a86/printer a86/ast a86/interp))
55

66
@(require scribble/examples
77
redex/reduction-semantics
@@ -121,7 +121,8 @@ of x86-64 to a small, core language (which we call @bold{
121121
to x86 as the last step in the compiler pipeline will be
122122
dead simple.
123123

124-
This chapter describes the a86 language.
124+
This chapter describes the a86 language at a high-level. See
125+
@secref["a86_Reference"] for a complete reference manual.
125126

126127
@section{Giving x86 a try}
127128

@@ -418,9 +419,9 @@ Notice how this generates exactly what you saw in @tt{tri.s}.
418419

419420
From here, we can assemble, link, and execute.
420421

421-
We can also, since we have a general purpose programming
422-
language at our disposal in the meta-language, write a
423-
program to do all that for us:
422+
We can also, since we have a general purpose programming language at
423+
our disposal in the meta-language, write a program to do all that for
424+
us, which what the implementors of the a86 library have done:
424425

425426
@ex[
426427
(asm-interp (tri 36))
@@ -436,5 +437,6 @@ interactively exploring the a86 language (you can write
436437
assembly in a REPL), but also an important tool when it
437438
comes time to test the compilers we write.
438439

439-
440-
@include-section[(lib "a86/scribblings/a86.scrbl")]
440+
There is more to a86, which you can find documented in the
441+
@secref["a86_Reference"], although we try to introduce features of a86
442+
as we encounter them.

www/notes/abscond.scrbl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#lang scribble/manual
22

3-
@(require (for-label (except-in racket compile) a86))
3+
@(require (for-label (except-in racket compile) a86/ast a86/printer))
44
@(require scribble/examples
55
redex/reduction-semantics
66
redex/pict
@@ -34,12 +34,12 @@
3434
@(shell-expand "cat 42.rkt | racket -t compile-stdin.rkt -m > 42.s")
3535

3636

37-
@title[#:tag "Abscond"]{Abscond: a language of numbers}
37+
@(define this-lang "Abscond")
38+
@(define prefix (string-append this-lang "-"))
3839

39-
@(define lang-name "abscond")
40-
@(define prefix (string-append lang-name "-"))
40+
@title[#:tag this-lang]{@|this-lang|: a language of numbers}
4141

42-
@src-code[lang-name]
42+
@src-code[this-lang]
4343

4444
@emph{Let's Make a Programming Language!}
4545

www/notes/blackmail.scrbl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#lang scribble/manual
22

3-
@(require (for-label (except-in racket compile ...) a86))
3+
@(require (for-label (except-in racket compile ...) a86/ast a86/printer))
44
@(require scribble/examples
55
redex/pict
66
"../fancyverb.rkt"
@@ -31,9 +31,12 @@
3131
@;{ Have to compile 42.s (at expand time) before listing it }
3232
@(shell-expand "cat add1-add1-40.rkt | racket -t compile-stdin.rkt -m > add1-add1-40.s")
3333

34-
@title[#:tag "Blackmail"]{Blackmail: incrementing and decrementing}
34+
@(define this-lang "Blackmail")
35+
@(define prefix (string-append this-lang "-"))
3536

36-
@src-code["blackmail"]
37+
@title[#:tag this-lang]{@|this-lang|: incrementing and decrementing}
38+
39+
@src-code[this-lang]
3740

3841
@emph{Let's Do It Again!}
3942

www/notes/con.scrbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#lang scribble/manual
22

3-
@(require (for-label (except-in racket compile ...) a86))
3+
@(require (for-label (except-in racket compile ...) a86/printer a86/ast))
44
@(require redex/pict
55
racket/runtime-path
66
scribble/examples

www/notes/dodger.scrbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#lang scribble/manual
22

3-
@(require (for-label (except-in racket ... compile) a86))
3+
@(require (for-label (except-in racket ... compile) a86/printer a86/ast))
44
@(require redex/pict
55
racket/runtime-path
66
scribble/examples

www/notes/dupe.scrbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#lang scribble/manual
22

3-
@(require (for-label (except-in racket ... compile) a86))
3+
@(require (for-label (except-in racket ... compile) a86/printer a86/ast))
44
@(require redex/pict
55
racket/runtime-path
66
scribble/examples

0 commit comments

Comments
 (0)