Skip to content

Commit

Permalink
[VL] Verlinke .bsp-Buttons oder verstecke sie im Skript (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
cagix committed Jul 17, 2023
1 parent e5b8365 commit 1d97214
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
4 changes: 2 additions & 2 deletions markdown/backend/interpretation/syntaxdriven.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ public class TestMyListener {
}
```

[Beispiel: [TestMyListener.java](https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/interpretation/src/TestMyListener.java) und [calc.g4](https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/interpretation/src/calc.g4)]{.bsp}
[Beispiel: TestMyListener.java und calc.g4]{.bsp href="https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/interpretation/src/TestMyListener.java"}
:::


Expand Down Expand Up @@ -448,7 +448,7 @@ public class TestMyVisitor {
}
```

[Beispiel: [TestMyVisitor.java](https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/interpretation/src/TestMyVisitor.java) und [calc.g4](https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/interpretation/src/calc.g4)]{.bsp}
[Beispiel: TestMyVisitor.java und calc.g4]{.bsp href="https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/interpretation/src/TestMyVisitor.java"}
:::


Expand Down
2 changes: 1 addition & 1 deletion markdown/frontend/lexing/antlr.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ GREETING : [a-zA-Z]+ ;
WHITESPACE : [ \t\n]+ -> skip ;
```

[Konsole: Hello (Classpath, Aliase, grun, Main, Dateien, Ausgabe)]{.bsp}
[Konsole: Hello (Classpath, Aliase, grun, Main, Dateien, Ausgabe)]{.bsp href="https://github.com/Compiler-CampusMinden/CB-Vorlesung-Master/blob/master/markdown/frontend/lexing/src/Hello.g4"}


::::::::: notes
Expand Down
6 changes: 3 additions & 3 deletions markdown/frontend/parsing/antlr.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ NUM : [0-9]+ ;
WS : [ \t\n]+ -> skip ;
```

[Konsole: Hello (grun, Parse-Tree)]{.bsp}
[Konsole: Hello (grun, Parse-Tree)]{.bsp href="https://github.com/Compiler-CampusMinden/CB-Vorlesung-Master/blob/master/markdown/frontend/parsing/src/Hello.g4"}

::::::::: notes
### Starten des Parsers
Expand Down Expand Up @@ -500,7 +500,7 @@ public class TestMyListener {
}
```

[Beispiel: [TestMyListener.java](https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/frontend/parsing/src/TestMyListener.java) und [calc.g4](https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/frontend/parsing/src/calc.g4)]{.bsp}
[Beispiel: TestMyListener.java und calc.g4]{.bsp href="https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/frontend/parsing/src/TestMyListener.java"}

In `["Syntaxgesteuerte Interpreter"]({{<ref "/backend/interpretation/syntaxdriven" >}})`{=markdown}
werden wir damit einen einfachen syntaxgesteuerten Interpreter aufbauen.
Expand Down Expand Up @@ -577,7 +577,7 @@ public class TestMyVisitor {
}
```

[Beispiel: [TestMyVisitor.java](https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/frontend/parsing/src/TestMyVisitor.java) und [calc.g4](https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/frontend/parsing/src/calc.g4)]{.bsp}
[Beispiel: TestMyVisitor.java und calc.g4]{.bsp href="https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/frontend/parsing/src/TestMyVisitor.java"}

In `["Syntaxgesteuerte Interpreter"]({{<ref "/backend/interpretation/syntaxdriven" >}})`{=markdown}
werden wir damit einen einfachen syntaxgesteuerten Interpreter aufbauen.
Expand Down
4 changes: 2 additions & 2 deletions markdown/frontend/parsing/ll-parser-impl.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ durchgereicht) über den Aufruf der Start-Regel, also beispielsweise `parser.lis

[Die Eingabe `1+2*3` muss als `1+(2*3)` interpretiert werden, da `*` Vorrang vor `+` hat.]{.notes}

[Tafel: Unterschiede im AST]{.bsp}
[[Tafel: Unterschiede im AST]{.bsp}]{.slides}

\pause

Expand Down Expand Up @@ -413,7 +413,7 @@ def lookahead(i):

[Quelle: Eigener Code basierend auf einer Idee nach [@Parr2010, p. 47]]{.origin}

[Tafel: Beispiel mit Ringpuffer: k=3 und "[1,2,3,4,5]"]{.bsp}
[[Tafel: Beispiel mit Ringpuffer: k=3 und "[1,2,3,4,5]"]{.bsp}]{.slides}


## Wrap-Up
Expand Down
2 changes: 1 addition & 1 deletion markdown/frontend/parsing/recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ stmt2 : 'int' ID '=' ID ';' ;
```

::: slides
[Grammatik: [VarDef.g4](https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/parsing/src/VarDef.g4), Input-Beispiele: [VarDef.txt](https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/parsing/src/VarDef.txt)]{.bsp}
[Grammatik: VarDef.g4, Input-Beispiele: VarDef.txt]{.bsp href="https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/parsing/src/VarDef.g4"}
:::


Expand Down
10 changes: 5 additions & 5 deletions markdown/intermediate/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ vornehmen.
Anschließend können diverse *Writer* den AST in das gewünschte Zielformat überführen.
:::

[Konsole: pandoc [hello.md](https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/intermediate/src/hello.md) -s -t native]{.bsp}
[Konsole: pandoc hello.md -s -t native]{.bsp href="https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/intermediate/src/hello.md"}


## Zwischenformat: Drei-Adressen-Code
Expand Down Expand Up @@ -204,7 +204,7 @@ define i32 @main() #0 {
:::
::::::

[Beispiel: clang -emit-llvm -S -o - [hello.c](https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/intermediate/src/hello.c)]{.bsp}
[Beispiel: clang -emit-llvm -S -o - hello.c]{.bsp href="https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/intermediate/src/hello.c"}

::: notes
Der obige Output ist auf die *relevanten Zeilen gekürzt*; der gesamte Output im LLVM-Format
Expand Down Expand Up @@ -277,7 +277,7 @@ y = x + 35
:::
::::::

[Beispiel: python -m dis [hello.py](https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/intermediate/src/hello.py)]{.bsp}
[Beispiel: python -m dis hello.py]{.bsp href="https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/intermediate/src/hello.py"}

::: notes
Python pflegt 3 Listen: `co_names` für die Namen plus `co_values` für die dazugehörigen Werte sowie
Expand Down Expand Up @@ -340,7 +340,7 @@ public class Hello {
:::
::::::

[Beispiel: javac [Hello.java](https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/intermediate/src/Hello.java) && javap -c Hello.class]{.bsp}
[Beispiel: javac Hello.java && javap -c Hello.class]{.bsp href="https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/intermediate/src/Hello.java"}

::: notes
Für jeden Methodenaufruf wird ein entsprechender Frame auf den Stack gepusht.
Expand Down Expand Up @@ -412,7 +412,7 @@ main:
:::
::::::

[Beispiel: gcc -S -o - [hello.c](https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/intermediate/src/hello.c)]{.bsp}
[Beispiel: gcc -S -o - hello.c]{.bsp href="https://github.com/Compiler-CampusMinden/CB-Vorlesung-Bachelor/blob/master/markdown/intermediate/src/hello.c"}

::: notes
Die Ausgabe unterscheidet sich je nach Architektur, auf dem der C-Code
Expand Down
3 changes: 2 additions & 1 deletion markdown/intro/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,8 @@ Fokus auf die Frontend-Phasen legen und die Optimierung nur grob streifen.
5*4+3
```

[AST?]{.bsp}
[[AST?]{.bsp}]{.slides}
[**AST**?]{.notes}

::: notes
Problem: Vorrang von Operatoren
Expand Down

0 comments on commit 1d97214

Please sign in to comment.