fixed some errors
This commit is contained in:
17
index.typ
17
index.typ
@@ -87,7 +87,7 @@ Type = ( Primitive | FuncType ) .
|
||||
```
|
||||
|
||||
- `First(Type)` can also not be computed because of the left recursion. So checking the intersection of `First(Type)` and `First(FuncType)` is not possible.
|
||||
- The amount of lookahead symbols does not matter in this case. The grammar is not LL(k) for any k.
|
||||
- Allthogh it is not LL(1) it is LL(2).
|
||||
|
||||
== 02 Beseitigung von LL(1)-Konflikten mittels Faktorisierung
|
||||
|
||||
@@ -169,6 +169,15 @@ This can be rewritten as:
|
||||
Expr = ( ident | number ) { ( "==" | "!=" ) ( ident | number ) } .
|
||||
```
|
||||
|
||||
The resulting grammer would be this:
|
||||
|
||||
```
|
||||
Fields = Type Assigns .
|
||||
Assigns = ident "=" Expr .
|
||||
Expr = ( ident | number ) { ( "==" | "!=" ) ( ident | number ) } .
|
||||
Type = ident { "->" ident } .
|
||||
```
|
||||
|
||||
|
||||
== 04 LL(4) Grammatik
|
||||
|
||||
@@ -178,7 +187,7 @@ nicht die LL(3)-Eigenschaft besitzt.
|
||||
]
|
||||
|
||||
```
|
||||
A = B | C
|
||||
B = "one" "two" "three" "B"
|
||||
C = "one" "two" "three" "C"
|
||||
A = B | C .
|
||||
B = "one" "two" "three" "B" .
|
||||
C = "one" "two" "three" "C" .
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user