Start of CONSTRUCTOR for the Grammar G17.grm Sat Apr 03 15:45:08 2004
Terminal alphabet
# 1 = #
# 2 = a
# 3 = b
# 4 = 1
Nonterminal alphabet
# 5 = `S'
# 6 = `A'
# 7 = `B'
Productions
P 1: `S' -> # a `A' a #
P 2: `S' -> # b `A' b #
P 3: `S' -> # a `B' a #
P 4: `S' -> # b `B' a #
P 5: `A' -> 1
P 6: `B' -> 1
Leftmost-set
Symbol | # | a | b | 1 | S | A | B |
5.S | * | 0 | 0 | 0 | 0 | 0 | 0 |
6.A | 0 | 0 | 0 | * | 0 | 0 | 0 |
7.B | 0 | 0 | 0 | * | 0 | 0 | 0 |
Rightmost-set
Symbol | # | a | b | 1 | S | A | B |
5.S | * | 0 | 0 | 0 | 0 | 0 | 0 |
6.A | 0 | 0 | 0 | * | 0 | 0 | 0 |
7.B | 0 | 0 | 0 | * | 0 | 0 | 0 |
Leftmost & rightmost sets
`S' leftmost set: `#'
`S' rightmost set: #
`A' leftmost set: `1'
`A' rightmost set: 1
`B' leftmost set: `1'
`B' rightmost set: 1
Precedence matrix
Symbol | # | a | b | 1 | S | A | B |
1.# | 0 | = | = | 0 | 0 | 0 | 0 |
2.a | = | 0 | 0 | < | 0 | = | = |
3.b | = | 0 | 0 | < | 0 | = | = |
4.1 | 0 | > | > | 0 | 0 | 0 | 0 |
5.S | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6.A | 0 | = | = | 0 | 0 | 0 | 0 |
7.B | 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 1:
The relationships of symbol #5 `S':
The relationships of symbol #6 `A':
The relationships of symbol #7 `B':
Grammar G17.grm is a precedence grammar
Grammar G17.grm is not invertible
Left Context
Symbol | # | a | b | 1 | S | A | B |
5.S | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6.A | 0 | * | * | 0 | 0 | 0 | 0 |
7.B | 0 | * | * | 0 | 0 | 0 | 0 |
Right Context
Symbol | # | a | b | 1 |
5.S | 0 | 0 | 0 | 0 |
6.A | 0 | * | * | 0 |
7.B | 0 | * | 0 | 0 |
Independent context
`S' left context:
`S' right context:
`A' left context: a , b
`A' right context: a , b
`B' left context: a , b
`B' right context: a
Equivalent definitions:
`A' > 1 & `B' > 1
`A' left context: a , b
`A' right context: a , b
`B' left context: a , b
`B' right context: a
The independent context of `A' and `B' is not different
independent context didn't help us. I'll try to use the dependent one.
I'll find the subsets of dependent context of `A'
gamma1: the source is the production
P=1 `S' -> # a `A' a #
{a , a}
gamma1: the source is the production
P=2 `S' -> # b `A' b #
{b , b}
The set of dependent context of `A':
{a , a} {b , b}
I'll find the subsets of dependent context of `B'
gamma1: the source is the production
P=4 `S' -> # b `B' a #
{b , a}
gamma1: the source is the production
P=3 `S' -> # a `B' a #
{a , a}
The set of dependent context of `B':
{a , a} {b , a}
test_dep_con A and B
common: {a , a}
dependent context is not different: A and B
Grammar G17.grm is not BRC-reducible
The following pairs of nonterminals are having nondifferent context:
`A'and `B'
Finish of CONSTRUCTOR Sat Apr 03 15:45:08 2004