| 1 |
-- { dg-do compile } |
| 2 |
|
| 3 |
package Generic_Inst1 is |
| 4 |
|
| 5 |
generic |
| 6 |
type Terminals is (<>); |
| 7 |
type Nonterminals is (<>); |
| 8 |
package Types is |
| 9 |
type Action is record |
| 10 |
data : Integer; |
| 11 |
end record; |
| 12 |
end Types; |
| 13 |
|
| 14 |
generic |
| 15 |
type States is (<>); |
| 16 |
type Input_T is (<>); |
| 17 |
type Action_T is private; |
| 18 |
package FSM is |
| 19 |
end FSM; |
| 20 |
|
| 21 |
generic |
| 22 |
with package Typs is new Types (<>); |
| 23 |
with package SMs is new FSM |
| 24 |
(States => <>, Input_T => Typs.Terminals, Action_T => Typs.Action); |
| 25 |
package Gen is |
| 26 |
end Gen; |
| 27 |
|
| 28 |
package Typs is new Types (Natural, Integer); |
| 29 |
package SMs is new FSM (Integer, Natural, Typs.Action); |
| 30 |
package Generator is new Gen (Typs, SMs); |
| 31 |
|
| 32 |
end Generic_Inst1; |