text
stringlengths
0
234
F.New_Pragma
(F.New_Name (+"Pure"), F.New_Selected_Name (Package_Name));
Type_Name : constant Ada_Pretty.Node_Access :=
F.New_Name (Element_Visitor);
Type_Decl : constant Ada_Pretty.Node_Access :=
F.New_Type
(Type_Name,
Definition => F.New_Interface
(Is_Limited => True));
function Methods return Ada_Pretty.Node_Access is
Result : Ada_Pretty.Node_Access;
begin
for Item of Vector loop
if not Item.Is_Abstract then
declare
Element_Name : constant League.Strings.Universal_String :=
To_Element_Name (Item.Name);
Funct : constant Ada_Pretty.Node_Access :=
F.New_Subprogram_Declaration
(F.New_Subprogram_Specification
(Name => F.New_Name (Element_Name),
Parameters => F.New_List
(F.New_Parameter
(Name => F.New_Name (+"Self"),
Is_In => True,
Is_Out => True,
Type_Definition => F.New_Name
(Element_Visitor)),
F.New_Parameter
(Name => F.New_Name (Element),
Type_Definition => F.New_Null_Exclusion
(F.New_Selected_Name
(Full_Access_Name (Item.Name)))))),
Is_Null => True);
begin
Result := F.New_List (Result, Funct);
Function Definition: procedure Ada_LARL is
Function Body: use type Anagram.Grammars.Rule_Count;
use type Anagram.Grammars.LR.State_Count;
procedure Put_Proc_Decl
(Output : in out Writer;
Suffix : Wide_Wide_String);
procedure Put_Piece
(Piece : in out Writer;
From : Anagram.Grammars.Production_Index;
To : Anagram.Grammars.Production_Index);
procedure Put_Rule
(Output : in out Writer;
Prod : Anagram.Grammars.Production;
Rule : Anagram.Grammars.Rule);
function Image (X : Integer) return Wide_Wide_String;
procedure Print_Go_To;
procedure Print_Action;
File : constant String := Ada.Command_Line.Argument (1);
G : constant Anagram.Grammars.Grammar :=
Anagram.Grammars.Reader.Read (File);
Plain : constant Anagram.Grammars.Grammar :=
Anagram.Grammars_Convertors.Convert (G, Left => False);
AG : constant Anagram.Grammars.Grammar :=
Anagram.Grammars.Constructors.To_Augmented (Plain);
Table : constant Anagram.Grammars.LR_Tables.Table_Access :=
Anagram.Grammars.LR.LALR.Build
(Input => AG,
Right_Nulled => False);
Resolver : Anagram.Grammars.Conflicts.Resolver;
Output : Writer;
-----------
-- Image --
-----------
function Image (X : Integer) return Wide_Wide_String is
Img : constant Wide_Wide_String := Integer'Wide_Wide_Image (X);
begin
return Img (2 .. Img'Last);
end Image;
------------------
-- Print_Action --
------------------
procedure Print_Action is
use type Anagram.Grammars.Production_Count;
use type Anagram.Grammars.Part_Count;
type Action_Code is mod 2 ** 16;
Count : Natural;
Code : Action_Code;
begin