Start of CONSTRUCTOR for the Grammar GA15.grm Sat Apr 03 15:57:43 2004

Terminal alphabet

# 1 = #
# 2 = 0
# 3 = 1
# 4 = 2
# 5 = 3
# 6 = 4
# 7 = 5
# 8 = 6
# 9 = 7


Nonterminal alphabet

#10 = `S'
#11 = `N'
#12 = `A'


Productions

P 1: `S' -> # `N' #
P 2: `N' -> `A'
P 3: `N' -> `N' `A'
P 4: `A' -> 0
P 5: `A' -> 1
P 6: `A' -> 2
P 7: `A' -> 3
P 8: `A' -> 4
P 9: `A' -> 5
P10: `A' -> 6
P11: `A' -> 7

Leftmost-set

Symbol#01234567SNA
10.S*00000000000
11.N0********0**
12.A0********000

Rightmost-set

Symbol#01234567SNA
10.S*00000000000
11.N0********00*
12.A0********000

Leftmost & rightmost sets

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

`N' leftmost set: `0' , `1' , `2' , `3' , `4' , `5' , `6' , `7' , `N' , `A'
`N' rightmost set: 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , A

`A' leftmost set: `0' , `1' , `2' , `3' , `4' , `5' , `6' , `7'
`A' rightmost set: 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7


Precedence matrix

Symbol#01234567SNA
1.#0<<<<<<<<0 3<
2.0>>>>>>>>>00>
3.1>>>>>>>>>00>
4.2>>>>>>>>>00>
5.3>>>>>>>>>00>
6.4>>>>>>>>>00>
7.5>>>>>>>>>00>
8.6>>>>>>>>>00>
9.7>>>>>>>>>00>
10.S000000000000
11.N=<<<<<<<<00=
12.A>>>>>>>>>00>

The relationships of symbol #1 #:
<• 0<• 1<• 2<• 3<• 4<• 5<• 6<• 7<•=• `N'<• `A'

The relationships of symbol #2 0:
•> #•> 0•> 1•> 2•> 3•> 4•> 5•> 6•> 7•> `A'

The relationships of symbol #3 1:
•> #•> 0•> 1•> 2•> 3•> 4•> 5•> 6•> 7•> `A'

The relationships of symbol #4 2:
•> #•> 0•> 1•> 2•> 3•> 4•> 5•> 6•> 7•> `A'

The relationships of symbol #5 3:
•> #•> 0•> 1•> 2•> 3•> 4•> 5•> 6•> 7•> `A'

The relationships of symbol #6 4:
•> #•> 0•> 1•> 2•> 3•> 4•> 5•> 6•> 7•> `A'

The relationships of symbol #7 5:
•> #•> 0•> 1•> 2•> 3•> 4•> 5•> 6•> 7•> `A'

The relationships of symbol #8 6:
•> #•> 0•> 1•> 2•> 3•> 4•> 5•> 6•> 7•> `A'

The relationships of symbol #9 7:
•> #•> 0•> 1•> 2•> 3•> 4•> 5•> 6•> 7•> `A'

The relationships of symbol #10 `S':

The relationships of symbol #11 `N':
=• #<• 0<• 1<• 2<• 3<• 4<• 5<• 6<• 7=• `A'

The relationships of symbol #12 `A':
•> #•> 0•> 1•> 2•> 3•> 4•> 5•> 6•> 7•> `A'


Precedence varies


P2-conflict:
# <•=• `N'
The source is the production P 1: `S' -> # `N' #
I'll add a new NT P12: `S1' -> `N' #
I'll change the production P 1: `S' -> # `S1'

Leftmost-set

Symbol#01234567SNAS1
10.S*000000000000
11.N0********0**0
12.A0********0000
13.S10********0**0

New grammar

P 1: `S' -> # `S1'
P 2: `N' -> `A'
P 3: `N' -> `N' `A'
P 4: `A' -> 0
P 5: `A' -> 1
P 6: `A' -> 2
P 7: `A' -> 3
P 8: `A' -> 4
P 9: `A' -> 5
P10: `A' -> 6
P11: `A' -> 7
P12: `S1' -> `N' #

Leftmost-set

Symbol#01234567SNAS1
10.S*000000000000
11.N0********0**0
12.A0********0000
13.S10********0**0

Rightmost-set

Symbol#01234567SNAS1
10.S*00000000000*
11.N0********00*0
12.A0********0000
13.S1*000000000000

Leftmost & rightmost sets

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

`N' leftmost set: `0' , `1' , `2' , `3' , `4' , `5' , `6' , `7' , `N' , `A'
`N' rightmost set: 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , A

`A' leftmost set: `0' , `1' , `2' , `3' , `4' , `5' , `6' , `7'
`A' rightmost set: 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7

`S1' leftmost set: `0' , `1' , `2' , `3' , `4' , `5' , `6' , `7' , `N' , `A'
`S1' rightmost set: #


Precedence matrix

Symbol#01234567SNAS1
1.#0<<<<<<<<0<<=
2.0>>>>>>>>>00>0
3.1>>>>>>>>>00>0
4.2>>>>>>>>>00>0
5.3>>>>>>>>>00>0
6.4>>>>>>>>>00>0
7.5>>>>>>>>>00>0
8.6>>>>>>>>>00>0
9.7>>>>>>>>>00>0
10.S0000000000000
11.N=<<<<<<<<00=0
12.A>>>>>>>>>00>0
13.S10000000000000

The relationships of symbol #1 #:
<• 0<• 1<• 2<• 3<• 4<• 5<• 6<• 7<• `N'<• `A'=• `S1'

The relationships of symbol #2 0:
•> #•> 0•> 1•> 2•> 3•> 4•> 5•> 6•> 7•> `A'

The relationships of symbol #3 1:
•> #•> 0•> 1•> 2•> 3•> 4•> 5•> 6•> 7•> `A'

The relationships of symbol #4 2:
•> #•> 0•> 1•> 2•> 3•> 4•> 5•> 6•> 7•> `A'

The relationships of symbol #5 3:
•> #•> 0•> 1•> 2•> 3•> 4•> 5•> 6•> 7•> `A'

The relationships of symbol #6 4:
•> #•> 0•> 1•> 2•> 3•> 4•> 5•> 6•> 7•> `A'

The relationships of symbol #7 5:
•> #•> 0•> 1•> 2•> 3•> 4•> 5•> 6•> 7•> `A'

The relationships of symbol #8 6:
•> #•> 0•> 1•> 2•> 3•> 4•> 5•> 6•> 7•> `A'

The relationships of symbol #9 7:
•> #•> 0•> 1•> 2•> 3•> 4•> 5•> 6•> 7•> `A'

The relationships of symbol #10 `S':

The relationships of symbol #11 `N':
=• #<• 0<• 1<• 2<• 3<• 4<• 5<• 6<• 7=• `A'

The relationships of symbol #12 `A':
•> #•> 0•> 1•> 2•> 3•> 4•> 5•> 6•> 7•> `A'

The relationships of symbol #13 `S1':


Grammar GA15.grm is a precedence grammar

Grammar GA15.grm is invertible


Semantics

Semantics file is GA15.sem
#=1
0=2
1=3
2=4
3=5
4=6
5=7
6=8
7=9
P1=10 $P 1: `S' -> # `S1'
P2=11 $P 2: `N' -> `A'
P3=12 $P 3: `N' -> `N' `A'
P4=13 $P 4: `A' -> 0
P5=14 $P 5: `A' -> 1
P6=15 $P 6: `A' -> 2
P7=16 $P 7: `A' -> 3
P8=17 $P 8: `A' -> 4
P9=18 $P 9: `A' -> 5
P10=19 $P10: `A' -> 6
P11=20 $P11: `A' -> 7
P12=21 $P12: `S1' -> `N' #

Result tables


FileSize
GA15.prm28
GA15.pm196
GA15.t280
GA15.tt200
GA15.ht1468
GA15.sm92
GA15.v716

Look at result tables

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