Start of CONSTRUCTOR for the Grammar G2A.grm Sat Apr 03 15:52:38 2004
Terminal alphabet
# 1 = #
# 2 = a
# 3 = b
# 4 = c
Nonterminal alphabet
# 5 = `T'
# 6 = `S'
# 7 = `V'
# 8 = `U'
Productions
P 1: `T' -> # `S' #
P 2: `S' -> `V' `U'
P 3: `U' -> a b
P 4: `V' -> c `V'
P 5: `V' -> c
Leftmost-set
Symbol | # | a | b | c | T | S | V | U |
5.T | * | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6.S | 0 | 0 | 0 | * | 0 | 0 | * | 0 |
7.V | 0 | 0 | 0 | * | 0 | 0 | 0 | 0 |
8.U | 0 | * | 0 | 0 | 0 | 0 | 0 | 0 |
Rightmost-set
Symbol | # | a | b | c | T | S | V | U |
5.T | * | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6.S | 0 | 0 | * | 0 | 0 | 0 | 0 | * |
7.V | 0 | 0 | 0 | * | 0 | 0 | * | 0 |
8.U | 0 | 0 | * | 0 | 0 | 0 | 0 | 0 |
Leftmost & rightmost sets
`T' leftmost set: `#'
`T' rightmost set: #
`S' leftmost set: `c' , `V'
`S' rightmost set: b , U
`V' leftmost set: `c'
`V' rightmost set: c , V
`U' leftmost set: `a'
`U' rightmost set: b
Precedence matrix
Symbol | # | a | b | c | T | S | V | U |
1.# | 0 | 0 | 0 | < | 0 | = | < | 0 |
2.a | 0 | 0 | = | 0 | 0 | 0 | 0 | 0 |
3.b | > | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4.c | 0 | > | 0 | < | 0 | 0 | = | > |
5.T | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6.S | = | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7.V | 0 | 6 | 0 | 0 | 0 | 0 | 0 | 5 |
8.U | > | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
The relationships of symbol #1 #:
The relationships of symbol #2 a:
The relationships of symbol #3 b:
The relationships of symbol #4 c:
> a | < c | = `V' | > `U' |
The relationships of symbol #5 `T':
The relationships of symbol #6 `S':
The relationships of symbol #7 `V':
The relationships of symbol #8 `U':
Precedence varies
P1-conflict: `V' <> a
The source is the production P 2: `S' -> `V' `U'
I'll add a new NT P 6: `S1' -> `V'
I'll change the production P 2: `S' -> `S1' `U'
P1-conflict: `V' => `U'
Cannot find any sourceNew grammar
P 1: `T' -> # `S' #
P 2: `S' -> `S1' `U'
P 3: `U' -> a b
P 4: `V' -> c `V'
P 5: `V' -> c
P 6: `S1' -> `V'
Leftmost-set
Symbol | # | a | b | c | T | S | V | U | S1 |
5.T | * | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6.S | 0 | 0 | 0 | * | 0 | 0 | * | 0 | * |
7.V | 0 | 0 | 0 | * | 0 | 0 | 0 | 0 | 0 |
8.U | 0 | * | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9.S1 | 0 | 0 | 0 | * | 0 | 0 | * | 0 | 0 |
Rightmost-set
Symbol | # | a | b | c | T | S | V | U | S1 |
5.T | * | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6.S | 0 | 0 | * | 0 | 0 | 0 | 0 | * | 0 |
7.V | 0 | 0 | 0 | * | 0 | 0 | * | 0 | 0 |
8.U | 0 | 0 | * | 0 | 0 | 0 | 0 | 0 | 0 |
9.S1 | 0 | 0 | 0 | * | 0 | 0 | * | 0 | 0 |
Leftmost & rightmost sets
`T' leftmost set: `#'
`T' rightmost set: #
`S' leftmost set: `c' , `V' , `S1'
`S' rightmost set: b , U
`V' leftmost set: `c'
`V' rightmost set: c , V
`U' leftmost set: `a'
`U' rightmost set: b
`S1' leftmost set: `c' , `V'
`S1' rightmost set: c , V
Precedence matrix
Symbol | # | a | b | c | T | S | V | U | S1 |
1.# | 0 | 0 | 0 | < | 0 | = | < | 0 | < |
2.a | 0 | 0 | = | 0 | 0 | 0 | 0 | 0 | 0 |
3.b | > | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4.c | 0 | > | 0 | < | 0 | 0 | = | > | 0 |
5.T | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6.S | = | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7.V | 0 | > | 0 | 0 | 0 | 0 | 0 | > | 0 |
8.U | > | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9.S1 | 0 | < | 0 | 0 | 0 | 0 | 0 | = | 0 |
The relationships of symbol #1 #:
< c | = `S' | < `V' | < `S1' |
The relationships of symbol #2 a:
The relationships of symbol #3 b:
The relationships of symbol #4 c:
> a | < c | = `V' | > `U' |
The relationships of symbol #5 `T':
The relationships of symbol #6 `S':
The relationships of symbol #7 `V':
The relationships of symbol #8 `U':
The relationships of symbol #9 `S1':
Grammar G2A.grm is a precedence grammar
Grammar G2A.grm is invertible
Semantics
Semantics file is G2A.sem
#=1
a=2
b=3
c=4
P1=5 $P 1: `T' -> # `S' #
P2=6 $P 2: `S' -> `S1' `U'
P3=7 $P 3: `U' -> a b
P4=8 $P 4: `V' -> c `V'
P5=9 $P 5: `V' -> c
P6=10 $P 6: `S1' -> `V'
Result tables
File | Size |
G2A.prm | 28 |
G2A.pm | 100 |
G2A.t | 200 |
G2A.tt | 100 |
G2A.ht | 1260 |
G2A.sm | 48 |
G2A.v | 452 |
Look at result tablesFinish of CONSTRUCTOR Sat Apr 03 15:52:38 2004