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