Start of CONSTRUCTOR for the Grammar G7.grm Sat Apr 03 15:55:49 2004
Terminal alphabet
# 1 = #
# 2 = a
# 3 = b
# 4 = 0
# 5 = 1
Nonterminal alphabet
# 6 = `T'
# 7 = `S'
# 8 = `A'
# 9 = `B'
#10 = `C'
Productions
P 1: `T' -> # `S' #
P 2: `S' -> a `A'
P 3: `S' -> b `B'
P 4: `A' -> 0 `A' 1
P 5: `A' -> `C' 1
P 6: `B' -> `C' 1
P 7: `C' -> 1
Leftmost-set
Symbol | # | a | b | 0 | 1 | T | S | A | B | C |
6.T | * | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7.S | 0 | * | * | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8.A | 0 | 0 | 0 | * | * | 0 | 0 | 0 | 0 | * |
9.B | 0 | 0 | 0 | 0 | * | 0 | 0 | 0 | 0 | * |
10.C | 0 | 0 | 0 | 0 | * | 0 | 0 | 0 | 0 | 0 |
Rightmost-set
Symbol | # | a | b | 0 | 1 | T | S | A | B | C |
6.T | * | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7.S | 0 | 0 | 0 | 0 | * | 0 | 0 | * | * | 0 |
8.A | 0 | 0 | 0 | 0 | * | 0 | 0 | 0 | 0 | 0 |
9.B | 0 | 0 | 0 | 0 | * | 0 | 0 | 0 | 0 | 0 |
10.C | 0 | 0 | 0 | 0 | * | 0 | 0 | 0 | 0 | 0 |
Leftmost & rightmost sets
`T' leftmost set: `#'
`T' rightmost set: #
`S' leftmost set: `a' , `b'
`S' rightmost set: 1 , A , B
`A' leftmost set: `0' , `1' , `C'
`A' rightmost set: 1
`B' leftmost set: `1' , `C'
`B' rightmost set: 1
`C' leftmost set: `1'
`C' rightmost set: 1
Precedence matrix
Symbol | # | a | b | 0 | 1 | T | S | A | B | C |
1.# | 0 | < | < | 0 | 0 | 0 | = | 0 | 0 | 0 |
2.a | 0 | 0 | 0 | < | < | 0 | 0 | = | 0 | < |
3.b | 0 | 0 | 0 | 0 | < | 0 | 0 | 0 | = | < |
4.0 | 0 | 0 | 0 | < | < | 0 | 0 | = | 0 | < |
5.1 | > | 0 | 0 | 0 | > | 0 | 0 | 0 | 0 | 0 |
6.T | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7.S | = | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8.A | > | 0 | 0 | 0 | = | 0 | 0 | 0 | 0 | 0 |
9.B | > | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
10.C | 0 | 0 | 0 | 0 | = | 0 | 0 | 0 | 0 | 0 |
The relationships of symbol #1 #:
The relationships of symbol #2 a:
< 0 | < 1 | = `A' | < `C' |
The relationships of symbol #3 b:
The relationships of symbol #4 0:
< 0 | < 1 | = `A' | < `C' |
The relationships of symbol #5 1:
The relationships of symbol #6 `T':
The relationships of symbol #7 `S':
The relationships of symbol #8 `A':
The relationships of symbol #9 `B':
The relationships of symbol #10 `C':
Grammar G7.grm is a precedence grammar
Grammar G7.grm is not invertible
Left Context
Symbol | # | a | b | 0 | 1 | T | S | A | B | C |
6.T | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7.S | * | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8.A | 0 | * | 0 | * | 0 | 0 | 0 | 0 | 0 | 0 |
9.B | 0 | 0 | * | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
10.C | 0 | * | * | * | 0 | 0 | 0 | 0 | 0 | 0 |
Right Context
Symbol | # | a | b | 0 | 1 |
6.T | 0 | 0 | 0 | 0 | 0 |
7.S | * | 0 | 0 | 0 | 0 |
8.A | * | 0 | 0 | 0 | * |
9.B | * | 0 | 0 | 0 | 0 |
10.C | 0 | 0 | 0 | 0 | * |
Independent context
`T' left context:
`T' right context:
`S' left context: #
`S' right context: #
`A' left context: a , 0
`A' right context: # , 1
`B' left context: b
`B' right context: #
`C' left context: a , b , 0
`C' right context: 1
Equivalent definitions:
`A' > `C' 1 & `B' > `C' 1
`A' left context: a , 0
`A' right context: # , 1
`B' left context: b
`B' right context: #
The left context of `A' and `B' is different
Grammar G7.grm is BRC(1|1)-reducible
Semantics
Semantics file is G7.sem
#=1
a=2
b=3
0=4
1=5
P1=6 $P 1: `T' -> # `S' #
P2=7 $P 2: `S' -> a `A'
P3=8 $P 3: `S' -> b `B'
P4=9 $P 4: `A' -> 0 `A' 1
P5=10 $P 5: `A' -> `C' 1
P6=11 $P 6: `B' -> `C' 1
P7=12 $P 7: `C' -> 1
Result tables
File | Size |
G7.prm | 28 |
G7.pm | 121 |
G7.t | 220 |
G7.tt | 120 |
G7.ht | 1308 |
G7.sm | 56 |
G7.v | 520 |
G7.lc | 121 |
G7.rc | 121 |
Look at result tablesFinish of CONSTRUCTOR Sat Apr 03 15:55:49 2004