Start of CONSTRUCTOR for the Grammar G15.grm Sat Apr 03 15:44:02 2004
Terminal alphabet
# 1 = #
# 2 = x
# 3 = a
# 4 = b
# 5 = c
# 6 = d
# 7 = e
# 8 = f
Nonterminal alphabet
# 9 = `S'
#10 = `N'
#11 = `A'
Productions
P 1: `S' -> # `N' #
P 2: `N' -> `A'
P 3: `N' -> `A' `N'
P 4: `A' -> x
P 5: `A' -> a
P 6: `A' -> b
P 7: `A' -> c
P 8: `A' -> d
P 9: `A' -> e
P10: `A' -> f
Leftmost-set
Symbol | # | x | a | b | c | d | e | f | S | N | A |
9.S | * | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
10.N | 0 | * | * | * | * | * | * | * | 0 | 0 | * |
11.A | 0 | * | * | * | * | * | * | * | 0 | 0 | 0 |
Rightmost-set
Symbol | # | x | a | b | c | d | e | f | S | N | A |
9.S | * | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
10.N | 0 | * | * | * | * | * | * | * | 0 | * | * |
11.A | 0 | * | * | * | * | * | * | * | 0 | 0 | 0 |
Leftmost & rightmost sets
`S' leftmost set: `#'
`S' rightmost set: #
`N' leftmost set: `x' , `a' , `b' , `c' , `d' , `e' , `f' , `A'
`N' rightmost set: x , a , b , c , d , e , f , N , A
`A' leftmost set: `x' , `a' , `b' , `c' , `d' , `e' , `f'
`A' rightmost set: x , a , b , c , d , e , f
Precedence matrix
Symbol | # | x | a | b | c | d | e | f | S | N | A |
1.# | 0 | < | < | < | < | < | < | < | 0 | = | < |
2.x | > | > | > | > | > | > | > | > | 0 | > | > |
3.a | > | > | > | > | > | > | > | > | 0 | > | > |
4.b | > | > | > | > | > | > | > | > | 0 | > | > |
5.c | > | > | > | > | > | > | > | > | 0 | > | > |
6.d | > | > | > | > | > | > | > | > | 0 | > | > |
7.e | > | > | > | > | > | > | > | > | 0 | > | > |
8.f | > | > | > | > | > | > | > | > | 0 | > | > |
9.S | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
10.N | 5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
11.A | > | < | < | < | < | < | < | < | 0 | = | < |
The relationships of symbol #1 #:
< x | < a | < b | < c | < d | < e | < f | = `N' | < `A' |
The relationships of symbol #2 x:
> # | > x | > a | > b | > c | > d | > e | > f | > `N' | > `A' |
The relationships of symbol #3 a:
> # | > x | > a | > b | > c | > d | > e | > f | > `N' | > `A' |
The relationships of symbol #4 b:
> # | > x | > a | > b | > c | > d | > e | > f | > `N' | > `A' |
The relationships of symbol #5 c:
> # | > x | > a | > b | > c | > d | > e | > f | > `N' | > `A' |
The relationships of symbol #6 d:
> # | > x | > a | > b | > c | > d | > e | > f | > `N' | > `A' |
The relationships of symbol #7 e:
> # | > x | > a | > b | > c | > d | > e | > f | > `N' | > `A' |
The relationships of symbol #8 f:
> # | > x | > a | > b | > c | > d | > e | > f | > `N' | > `A' |
The relationships of symbol #9 `S':
The relationships of symbol #10 `N':
The relationships of symbol #11 `A':
> # | < x | < a | < b | < c | < d | < e | < f | = `N' | < `A' |
Precedence varies
P1-conflict: `N' => #
The source is the production P 1: `S' -> # `N' #
I'll add a new NT P11: `S1' -> # `N'
I'll change the production P 1: `S' -> `S1' #
New grammar
P 1: `S' -> `S1' #
P 2: `N' -> `A'
P 3: `N' -> `A' `N'
P 4: `A' -> x
P 5: `A' -> a
P 6: `A' -> b
P 7: `A' -> c
P 8: `A' -> d
P 9: `A' -> e
P10: `A' -> f
P11: `S1' -> # `N'
Leftmost-set
Symbol | # | x | a | b | c | d | e | f | S | N | A | S1 |
9.S | * | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | * |
10.N | 0 | * | * | * | * | * | * | * | 0 | 0 | * | 0 |
11.A | 0 | * | * | * | * | * | * | * | 0 | 0 | 0 | 0 |
12.S1 | * | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Rightmost-set
Symbol | # | x | a | b | c | d | e | f | S | N | A | S1 |
9.S | * | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
10.N | 0 | * | * | * | * | * | * | * | 0 | * | * | 0 |
11.A | 0 | * | * | * | * | * | * | * | 0 | 0 | 0 | 0 |
12.S1 | 0 | * | * | * | * | * | * | * | 0 | * | * | 0 |
Leftmost & rightmost sets
`S' leftmost set: `#' , `S1'
`S' rightmost set: #
`N' leftmost set: `x' , `a' , `b' , `c' , `d' , `e' , `f' , `A'
`N' rightmost set: x , a , b , c , d , e , f , N , A
`A' leftmost set: `x' , `a' , `b' , `c' , `d' , `e' , `f'
`A' rightmost set: x , a , b , c , d , e , f
`S1' leftmost set: `#'
`S1' rightmost set: x , a , b , c , d , e , f , N , A
Precedence matrix
Symbol | # | x | a | b | c | d | e | f | S | N | A | S1 |
1.# | 0 | < | < | < | < | < | < | < | 0 | = | < | 0 |
2.x | > | > | > | > | > | > | > | > | 0 | > | > | 0 |
3.a | > | > | > | > | > | > | > | > | 0 | > | > | 0 |
4.b | > | > | > | > | > | > | > | > | 0 | > | > | 0 |
5.c | > | > | > | > | > | > | > | > | 0 | > | > | 0 |
6.d | > | > | > | > | > | > | > | > | 0 | > | > | 0 |
7.e | > | > | > | > | > | > | > | > | 0 | > | > | 0 |
8.f | > | > | > | > | > | > | > | > | 0 | > | > | 0 |
9.S | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
10.N | > | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
11.A | > | < | < | < | < | < | < | < | 0 | = | < | 0 |
12.S1 | = | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
The relationships of symbol #1 #:
< x | < a | < b | < c | < d | < e | < f | = `N' | < `A' |
The relationships of symbol #2 x:
> # | > x | > a | > b | > c | > d | > e | > f | > `N' | > `A' |
The relationships of symbol #3 a:
> # | > x | > a | > b | > c | > d | > e | > f | > `N' | > `A' |
The relationships of symbol #4 b:
> # | > x | > a | > b | > c | > d | > e | > f | > `N' | > `A' |
The relationships of symbol #5 c:
> # | > x | > a | > b | > c | > d | > e | > f | > `N' | > `A' |
The relationships of symbol #6 d:
> # | > x | > a | > b | > c | > d | > e | > f | > `N' | > `A' |
The relationships of symbol #7 e:
> # | > x | > a | > b | > c | > d | > e | > f | > `N' | > `A' |
The relationships of symbol #8 f:
> # | > x | > a | > b | > c | > d | > e | > f | > `N' | > `A' |
The relationships of symbol #9 `S':
The relationships of symbol #10 `N':
The relationships of symbol #11 `A':
> # | < x | < a | < b | < c | < d | < e | < f | = `N' | < `A' |
The relationships of symbol #12 `S1':
Grammar G15.grm is a precedence grammar
Grammar G15.grm is invertible
Semantics
Semantics file is G15.sem
#=1
x=2
a=3
b=4
c=5
d=6
e=7
f=8
P1=9 $P 1: `S' -> `S1' #
P2=10 $P 2: `N' -> `A'
P3=11 $P 3: `N' -> `A' `N'
P4=12 $P 4: `A' -> x
P5=13 $P 5: `A' -> a
P6=14 $P 6: `A' -> b
P7=15 $P 7: `A' -> c
P8=16 $P 8: `A' -> d
P9=17 $P 9: `A' -> e
P10=18 $P10: `A' -> f
P11=19 $P11: `S1' -> # `N'
Result tables
File | Size |
G15.prm | 28 |
G15.pm | 169 |
G15.t | 260 |
G15.tt | 180 |
G15.ht | 1432 |
G15.sm | 84 |
G15.v | 660 |
Look at result tablesFinish of CONSTRUCTOR Sat Apr 03 15:44:02 2004