Start of CONSTRUCTOR for the Grammar G3.grm Sat Apr 03 15:53:36 2004

Terminal alphabet

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


Nonterminal alphabet

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


Productions

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

Leftmost-set

Symbol#abcTSUV
5.T*0000000
6.S0*0000*0
7.U0*000000
8.V000*000*

Rightmost-set

Symbol#abcTSUV
5.T*0000000
6.S000*000*
7.U00*00000
8.V000*0000

Leftmost & rightmost sets

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

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

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

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


Precedence matrix

Symbol#abcTSUV
1.#0<000=<0
2.a0<=000=0
3.b00>>000>
4.c>00>0000
5.T00000000
6.S=0000000
7.U00=<000 3
8.V>00=0000

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

The relationships of symbol #2 a:
<• a=• b=• `U'

The relationships of symbol #3 b:
•> b•> c•> `V'

The relationships of symbol #4 c:
•> #•> c

The relationships of symbol #5 `T':

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

The relationships of symbol #7 `U':
=• b<• c<•=• `V'

The relationships of symbol #8 `V':
•> #=• c


Precedence varies


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

Leftmost-set

Symbol#abcTSUVS1
5.T*00000000
6.S0*0000*00
7.U0*0000000
8.V000*000*0
9.S1000*000*0

New grammar

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

Leftmost-set

Symbol#abcTSUVS1
5.T*00000000
6.S0*0000*00
7.U0*0000000
8.V000*000*0
9.S1000*000*0

Rightmost-set

Symbol#abcTSUVS1
5.T*00000000
6.S000*000**
7.U00*000000
8.V000*00000
9.S1000*000*0

Leftmost & rightmost sets

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

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

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

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

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


Precedence matrix

Symbol#abcTSUVS1
1.#0<000=<00
2.a0<=000=00
3.b00>>000>>
4.c>00>00000
5.T000000000
6.S=00000000
7.U00=<000<=
8.V>00=00000
9.S1>00000000

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

The relationships of symbol #2 a:
<• a=• b=• `U'

The relationships of symbol #3 b:
•> b•> c•> `V'•> `S1'

The relationships of symbol #4 c:
•> #•> c

The relationships of symbol #5 `T':

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

The relationships of symbol #7 `U':
=• b<• c<• `V'=• `S1'

The relationships of symbol #8 `V':
•> #=• c

The relationships of symbol #9 `S1':
•> #


Grammar G3.grm is a precedence grammar

Grammar G3.grm is invertible


Semantics

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

Result tables


FileSize
G3.prm28
G3.pm100
G3.t200
G3.tt100
G3.ht1304
G3.sm52
G3.v484

Look at result tables

Finish of CONSTRUCTOR Sat Apr 03 15:53:36 2004