Start of CONSTRUCTOR for the Grammar G16.grm Sat Apr 03 15:44:45 2004

Terminal alphabet

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


Nonterminal alphabet

# 4 = `S'
# 5 = `A'
# 6 = `C'
# 7 = `B'


Productions

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

Leftmost-set

Symbol#abSACB
4.S*000000
5.A00*00*0
6.C00*0000
7.B0*0000*

Rightmost-set

Symbol#abSACB
4.S*000000
5.A0*0000*
6.C00*0000
7.B0*00000

Leftmost & rightmost sets

`S' leftmost set: `#'
`S' rightmost set: #

`A' leftmost set: `b' , `C'
`A' rightmost set: a , B

`C' leftmost set: `b'
`C' rightmost set: b

`B' leftmost set: `a' , `B'
`B' rightmost set: a


Precedence matrix

Symbol#abSACB
1.#00<0=<0
2.a>>00000
3.b0>0000>
4.S0000000
5.A=000000
6.C0<0000 3
7.B>=00000

The relationships of symbol #1 #:
<• b=• `A'<• `C'

The relationships of symbol #2 a:
•> #•> a

The relationships of symbol #3 b:
•> a•> `B'

The relationships of symbol #4 `S':

The relationships of symbol #5 `A':
=• #

The relationships of symbol #6 `C':
<• a<•=• `B'

The relationships of symbol #7 `B':
•> #=• a


Precedence varies


P2-conflict:
`C' <•=• `B'
The source is the production P 2: `A' -> `C' `B'
I'll add a new NT P 6: `A1' -> `B'
I'll change the production P 2: `A' -> `C' `A1'

Leftmost-set

Symbol#abSACBA1
4.S*0000000
5.A00*00*00
6.C00*00000
7.B0*0000*0
8.A10*0000*0

New grammar

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

Leftmost-set

Symbol#abSACBA1
4.S*0000000
5.A00*00*00
6.C00*00000
7.B0*0000*0
8.A10*0000*0

Rightmost-set

Symbol#abSACBA1
4.S*0000000
5.A0*0000**
6.C00*00000
7.B0*000000
8.A10*0000*0

Leftmost & rightmost sets

`S' leftmost set: `#'
`S' rightmost set: #

`A' leftmost set: `b' , `C'
`A' rightmost set: a , B , A1

`C' leftmost set: `b'
`C' rightmost set: b

`B' leftmost set: `a' , `B'
`B' rightmost set: a

`A1' leftmost set: `a' , `B'
`A1' rightmost set: a , B


Precedence matrix

Symbol#abSACBA1
1.#00<0=<00
2.a>>000000
3.b0>0000>>
4.S00000000
5.A=0000000
6.C0<0000<=
7.B>=000000
8.A1>0000000

The relationships of symbol #1 #:
<• b=• `A'<• `C'

The relationships of symbol #2 a:
•> #•> a

The relationships of symbol #3 b:
•> a•> `B'•> `A1'

The relationships of symbol #4 `S':

The relationships of symbol #5 `A':
=• #

The relationships of symbol #6 `C':
<• a<• `B'=• `A1'

The relationships of symbol #7 `B':
•> #=• a

The relationships of symbol #8 `A1':
•> #


Grammar G16.grm is a precedence grammar

Grammar G16.grm is invertible


Semantics

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

Result tables


FileSize
G16.prm28
G16.pm81
G16.t180
G16.tt80
G16.ht1256
G16.sm44
G16.v416

Look at result tables

Finish of CONSTRUCTOR Sat Apr 03 15:44:45 2004