Start of CONSTRUCTOR for the Grammar GA20.grm Sat Apr 03 15:58:51 2004

Terminal alphabet

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


Nonterminal alphabet

# 5 = `T'
# 6 = `S'
# 7 = `V'
# 8 = `U'


Productions

P 1: `T' -> # `S' #
P 2: `S' -> `V' `U'
P 3: `U' -> a b
P 4: `V' -> c `V'
P 5: `V' -> c

Leftmost-set

Symbol#abcTSVU
5.T*0000000
6.S000*00*0
7.V000*0000
8.U0*000000

Rightmost-set

Symbol#abcTSVU
5.T*0000000
6.S00*0000*
7.V000*00*0
8.U00*00000

Leftmost & rightmost sets

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

`S' leftmost set: `c' , `V'
`S' rightmost set: b , U

`V' leftmost set: `c'
`V' rightmost set: c , V

`U' leftmost set: `a'
`U' rightmost set: b


Precedence matrix

Symbol#abcTSVU
1.#000<0=<0
2.a00=00000
3.b>0000000
4.c0>0<00=>
5.T00000000
6.S=0000000
7.V0 600000 5
8.U>0000000

The relationships of symbol #1 #:
<• c=• `S'<• `V'

The relationships of symbol #2 a:
=• b

The relationships of symbol #3 b:
•> #

The relationships of symbol #4 c:
•> a<• c=• `V'•> `U'

The relationships of symbol #5 `T':

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

The relationships of symbol #7 `V':
<••> a=••> `U'

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


Precedence varies


P1-conflict:
`V' <••> a
The source is the production P 2: `S' -> `V' `U'
I'll add a new NT P 6: `S1' -> `V'
I'll change the production P 2: `S' -> `S1' `U'

P1-conflict:
`V' =••> `U'
Cannot find any source

New grammar

P 1: `T' -> # `S' #
P 2: `S' -> `S1' `U'
P 3: `U' -> a b
P 4: `V' -> c `V'
P 5: `V' -> c
P 6: `S1' -> `V'

Leftmost-set

Symbol#abcTSVUS1
5.T*00000000
6.S000*00*0*
7.V000*00000
8.U0*0000000
9.S1000*00*00

Rightmost-set

Symbol#abcTSVUS1
5.T*00000000
6.S00*0000*0
7.V000*00*00
8.U00*000000
9.S1000*00*00

Leftmost & rightmost sets

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

`S' leftmost set: `c' , `V' , `S1'
`S' rightmost set: b , U

`V' leftmost set: `c'
`V' rightmost set: c , V

`U' leftmost set: `a'
`U' rightmost set: b

`S1' leftmost set: `c' , `V'
`S1' rightmost set: c , V


Precedence matrix

Symbol#abcTSVUS1
1.#000<0=<0<
2.a00=000000
3.b>00000000
4.c0>0<00=>0
5.T000000000
6.S=00000000
7.V0>00000>0
8.U>00000000
9.S10<00000=0

The relationships of symbol #1 #:
<• c=• `S'<• `V'<• `S1'

The relationships of symbol #2 a:
=• b

The relationships of symbol #3 b:
•> #

The relationships of symbol #4 c:
•> a<• c=• `V'•> `U'

The relationships of symbol #5 `T':

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

The relationships of symbol #7 `V':
•> a•> `U'

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

The relationships of symbol #9 `S1':
<• a=• `U'


Grammar GA20.grm is a precedence grammar

Grammar GA20.grm is invertible


Semantics

Semantics file is GA20.sem
#=1
a=2
b=3
c=4
P1=5 $P 1: `T' -> # `S' #
P2=6 $P 2: `S' -> `S1' `U'
P3=7 $P 3: `U' -> a b
P4=8 $P 4: `V' -> c `V'
P5=9 $P 5: `V' -> c
P6=10 $P 6: `S1' -> `V'

Result tables


FileSize
GA20.prm28
GA20.pm100
GA20.t200
GA20.tt100
GA20.ht1260
GA20.sm48
GA20.v452

Look at result tables

Finish of CONSTRUCTOR Sat Apr 03 15:58:51 2004