Start of CONSTRUCTOR for the Grammar G8.grm Sat Apr 03 15:56:08 2004

Terminal alphabet

# 1 = #
# 2 = a
# 3 = b
# 4 = 1


Nonterminal alphabet

# 5 = `T'
# 6 = `S'
# 7 = `A'
# 8 = `B'


Productions

P 1: `T' -> # `S' #
P 2: `S' -> a `A' a
P 3: `S' -> b `A' b
P 4: `S' -> a `B' b
P 5: `S' -> b `B' a
P 6: `A' -> 1
P 7: `B' -> 1

Leftmost-set

Symbol#ab1TSAB
5.T*0000000
6.S0**00000
7.A000*0000
8.B000*0000

Rightmost-set

Symbol#ab1TSAB
5.T*0000000
6.S0**00000
7.A000*0000
8.B000*0000

Leftmost & rightmost sets

`T' leftmost set: `#'
`T' rightmost set: #

`S' leftmost set: `a' , `b'
`S' rightmost set: a , b

`A' leftmost set: `1'
`A' rightmost set: 1

`B' leftmost set: `1'
`B' rightmost set: 1


Precedence matrix

Symbol#ab1TSAB
1.#0<<00=00
2.a>00<00==
3.b>00<00==
4.10>>00000
5.T00000000
6.S=0000000
7.A0==00000
8.B0==00000

The relationships of symbol #1 #:
<• a<• b=• `S'

The relationships of symbol #2 a:
•> #<• 1=• `A'=• `B'

The relationships of symbol #3 b:
•> #<• 1=• `A'=• `B'

The relationships of symbol #4 1:
•> a•> b

The relationships of symbol #5 `T':

The relationships of symbol #6 `S':
=• #

The relationships of symbol #7 `A':
=• a=• b

The relationships of symbol #8 `B':
=• a=• b


Grammar G8.grm is a precedence grammar

Grammar G8.grm is not invertible


Left Context


Symbol#ab1TSAB
5.T00000000
6.S*0000000
7.A0**00000
8.B0**00000

Right Context


Symbol#ab1
5.T0000
6.S*000
7.A0**0
8.B0**0


Independent context

`T' left context:
`T' right 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 , b


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 , b


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=2 `S' -> a `A' a
{a , a}
gamma1: the source is the production
P=3 `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' -> a `B' b
{a , b}
gamma1: the source is the production
P=5 `S' -> b `B' a
{b , a}

The set of dependent context of `B':
{a , b} {b , a}

test_dep_con A and B

dependent context of `A' and `B' is different


Grammar G8.grm is BRC(1,1)-reducible

Dependent context


dependent context of `A':
{a , a} {b , b}

dependent context of `B':
{a , b} {b , a}

Semantics

Semantics file is G8.sem
#=1
a=2
b=3
1=4
P1=5 $P 1: `T' -> # `S' #
P2=6 $P 2: `S' -> a `A' a
P3=7 $P 3: `S' -> b `A' b
P4=8 $P 4: `S' -> a `B' b
P5=9 $P 5: `S' -> b `B' a
P6=10 $P 6: `A' -> 1
P7=11 $P 7: `B' -> 1

Result tables


FileSize
G8.prm28
G8.pm81
G8.t180
G8.tt100
G8.ht1316
G8.sm52
G8.v464
G8.lc81
G8.rc81
G8.dc128

Look at result tables

Finish of CONSTRUCTOR Sat Apr 03 15:56:08 2004